]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
12 years agoMerge remote-tracking branch 'cgroup/for-next'
Stephen Rothwell [Mon, 2 Apr 2012 01:42:29 +0000 (11:42 +1000)]
Merge remote-tracking branch 'cgroup/for-next'

12 years agoMerge branch 'quilt/rr'
Stephen Rothwell [Mon, 2 Apr 2012 01:35:16 +0000 (11:35 +1000)]
Merge branch 'quilt/rr'

Conflicts:
arch/arm/kernel/kprobes.c
drivers/virtio/virtio_balloon.c

12 years agoMerge commit 'refs/next/20120330/sound-asoc'
Stephen Rothwell [Mon, 2 Apr 2012 01:32:21 +0000 (11:32 +1000)]
Merge commit 'refs/next/20120330/sound-asoc'

12 years agoMerge remote-tracking branch 'sound/for-next'
Stephen Rothwell [Mon, 2 Apr 2012 01:19:50 +0000 (11:19 +1000)]
Merge remote-tracking branch 'sound/for-next'

12 years agoMerge remote-tracking branch 'crypto/master'
Stephen Rothwell [Mon, 2 Apr 2012 01:18:22 +0000 (11:18 +1000)]
Merge remote-tracking branch 'crypto/master'

12 years agoMerge remote-tracking branch 'l2-mtd/master'
Stephen Rothwell [Mon, 2 Apr 2012 01:18:18 +0000 (11:18 +1000)]
Merge remote-tracking branch 'l2-mtd/master'

Conflicts:
drivers/dma/mxs-dma.c
drivers/mmc/host/mxs-mmc.c
drivers/mtd/devices/spear_smi.c
drivers/mtd/nand/Kconfig
drivers/mtd/nand/atmel_nand.c
drivers/mtd/nand/docg4.c
drivers/mtd/nand/gpmi-nand/gpmi-lib.c
fs/jffs2/fs.c
include/linux/mtd/spear_smi.h
sound/soc/mxs/mxs-pcm.h

12 years agoMerge remote-tracking branch 'bluetooth/master'
Stephen Rothwell [Mon, 2 Apr 2012 01:08:34 +0000 (11:08 +1000)]
Merge remote-tracking branch 'bluetooth/master'

12 years agoMerge remote-tracking branch 'dmaengine/next'
Stephen Rothwell [Mon, 2 Apr 2012 01:07:02 +0000 (11:07 +1000)]
Merge remote-tracking branch 'dmaengine/next'

12 years agoMerge remote-tracking branch 'isci/all'
Stephen Rothwell [Mon, 2 Apr 2012 01:05:23 +0000 (11:05 +1000)]
Merge remote-tracking branch 'isci/all'

12 years agoMerge remote-tracking branch 'target-merge/for-next-merge'
Stephen Rothwell [Mon, 2 Apr 2012 01:03:46 +0000 (11:03 +1000)]
Merge remote-tracking branch 'target-merge/for-next-merge'

12 years agoMerge remote-tracking branch 'ieee1394/for-next'
Stephen Rothwell [Mon, 2 Apr 2012 01:03:28 +0000 (11:03 +1000)]
Merge remote-tracking branch 'ieee1394/for-next'

12 years agoMerge remote-tracking branch 'infiniband/for-next'
Stephen Rothwell [Mon, 2 Apr 2012 01:03:14 +0000 (11:03 +1000)]
Merge remote-tracking branch 'infiniband/for-next'

12 years agoMerge remote-tracking branch 'kconfig/for-next'
Stephen Rothwell [Mon, 2 Apr 2012 01:03:08 +0000 (11:03 +1000)]
Merge remote-tracking branch 'kconfig/for-next'

12 years agoMerge remote-tracking branch 'kbuild/for-next'
Stephen Rothwell [Mon, 2 Apr 2012 01:03:01 +0000 (11:03 +1000)]
Merge remote-tracking branch 'kbuild/for-next'

12 years agoMerge remote-tracking branch 'v4l-dvb/master'
Stephen Rothwell [Mon, 2 Apr 2012 01:01:33 +0000 (11:01 +1000)]
Merge remote-tracking branch 'v4l-dvb/master'

12 years agoMerge remote-tracking branch 'hwmon-staging/hwmon-next'
Stephen Rothwell [Mon, 2 Apr 2012 01:00:04 +0000 (11:00 +1000)]
Merge remote-tracking branch 'hwmon-staging/hwmon-next'

12 years agoMerge branch 'quilt/jdelvare-hwmon'
Stephen Rothwell [Mon, 2 Apr 2012 01:00:02 +0000 (11:00 +1000)]
Merge branch 'quilt/jdelvare-hwmon'

12 years agoMerge remote-tracking branch 'bjdooks-i2c/next-i2c'
Stephen Rothwell [Mon, 2 Apr 2012 00:59:58 +0000 (10:59 +1000)]
Merge remote-tracking branch 'bjdooks-i2c/next-i2c'

Conflicts:
drivers/i2c/busses/i2c-omap.c

12 years agoMerge remote-tracking branch 'fuse/for-next'
Stephen Rothwell [Mon, 2 Apr 2012 00:58:11 +0000 (10:58 +1000)]
Merge remote-tracking branch 'fuse/for-next'

12 years agoMerge remote-tracking branch 'ecryptfs/next'
Stephen Rothwell [Mon, 2 Apr 2012 00:56:40 +0000 (10:56 +1000)]
Merge remote-tracking branch 'ecryptfs/next'

Conflicts:
fs/ecryptfs/ecryptfs_kernel.h

12 years agoMerge remote-tracking branch 'cifs/master'
Stephen Rothwell [Mon, 2 Apr 2012 00:50:17 +0000 (10:50 +1000)]
Merge remote-tracking branch 'cifs/master'

12 years agoMerge remote-tracking branch 'tile/master'
Stephen Rothwell [Mon, 2 Apr 2012 00:37:38 +0000 (10:37 +1000)]
Merge remote-tracking branch 'tile/master'

Conflicts:
arch/tile/include/asm/barrier.h
arch/tile/include/asm/pgtable.h

12 years agoMerge remote-tracking branch 'sparc-next/master'
Stephen Rothwell [Mon, 2 Apr 2012 00:10:36 +0000 (10:10 +1000)]
Merge remote-tracking branch 'sparc-next/master'

12 years agoMerge remote-tracking branch 's390/features'
Stephen Rothwell [Mon, 2 Apr 2012 00:09:06 +0000 (10:09 +1000)]
Merge remote-tracking branch 's390/features'

12 years agoMerge remote-tracking branch 'galak/next'
Stephen Rothwell [Mon, 2 Apr 2012 00:07:40 +0000 (10:07 +1000)]
Merge remote-tracking branch 'galak/next'

12 years agoMerge remote-tracking branch 'mpc5xxx/next'
Stephen Rothwell [Mon, 2 Apr 2012 00:07:38 +0000 (10:07 +1000)]
Merge remote-tracking branch 'mpc5xxx/next'

12 years agoMerge remote-tracking branch 'parisc/for-next'
Stephen Rothwell [Mon, 2 Apr 2012 00:07:34 +0000 (10:07 +1000)]
Merge remote-tracking branch 'parisc/for-next'

12 years agoMerge remote-tracking branch 'mips/mips-for-linux-next'
Stephen Rothwell [Mon, 2 Apr 2012 00:07:32 +0000 (10:07 +1000)]
Merge remote-tracking branch 'mips/mips-for-linux-next'

12 years agoMerge remote-tracking branch 'microblaze/next'
Stephen Rothwell [Mon, 2 Apr 2012 00:06:06 +0000 (10:06 +1000)]
Merge remote-tracking branch 'microblaze/next'

12 years agoMerge remote-tracking branch 'm68k/for-next'
Stephen Rothwell [Mon, 2 Apr 2012 00:04:39 +0000 (10:04 +1000)]
Merge remote-tracking branch 'm68k/for-next'

12 years agoMerge remote-tracking branch 'ia64/next'
Stephen Rothwell [Mon, 2 Apr 2012 00:03:12 +0000 (10:03 +1000)]
Merge remote-tracking branch 'ia64/next'

12 years agoMerge branch 'quilt/hexagon'
Stephen Rothwell [Mon, 2 Apr 2012 00:01:44 +0000 (10:01 +1000)]
Merge branch 'quilt/hexagon'

Conflicts:
arch/hexagon/Kconfig

12 years agoMerge remote-tracking branch 'cris/for-next'
Stephen Rothwell [Sun, 1 Apr 2012 23:59:49 +0000 (09:59 +1000)]
Merge remote-tracking branch 'cris/for-next'

12 years agoMerge remote-tracking branch 'blackfin/for-linus'
Stephen Rothwell [Sun, 1 Apr 2012 23:58:23 +0000 (09:58 +1000)]
Merge remote-tracking branch 'blackfin/for-linus'

12 years agoMerge remote-tracking branch 'gpio-current/gpio/merge'
Stephen Rothwell [Sun, 1 Apr 2012 23:56:25 +0000 (09:56 +1000)]
Merge remote-tracking branch 'gpio-current/gpio/merge'

12 years agoMerge remote-tracking branch 'spi-current/spi/merge'
Stephen Rothwell [Sun, 1 Apr 2012 23:56:24 +0000 (09:56 +1000)]
Merge remote-tracking branch 'spi-current/spi/merge'

12 years agoMerge remote-tracking branch 'crypto-current/master'
Stephen Rothwell [Sun, 1 Apr 2012 23:56:17 +0000 (09:56 +1000)]
Merge remote-tracking branch 'crypto-current/master'

12 years agoMerge remote-tracking branch 'net/master'
Stephen Rothwell [Sun, 1 Apr 2012 23:56:11 +0000 (09:56 +1000)]
Merge remote-tracking branch 'net/master'

12 years agoMerge remote-tracking branch 'sparc/master'
Stephen Rothwell [Sun, 1 Apr 2012 23:56:10 +0000 (09:56 +1000)]
Merge remote-tracking branch 'sparc/master'

12 years agoMerge remote-tracking branch 'm68k-current/for-linus'
Stephen Rothwell [Sun, 1 Apr 2012 23:56:09 +0000 (09:56 +1000)]
Merge remote-tracking branch 'm68k-current/for-linus'

12 years agoMerge remote-tracking branch 'arm-current/fixes'
Stephen Rothwell [Sun, 1 Apr 2012 23:56:08 +0000 (09:56 +1000)]
Merge remote-tracking branch 'arm-current/fixes'

12 years agoMerge remote-tracking branch 'fixes/master'
Stephen Rothwell [Sun, 1 Apr 2012 23:49:21 +0000 (09:49 +1000)]
Merge remote-tracking branch 'fixes/master'

12 years agoipv6: Fix RTM_GETROUTE's interpretation of RTA_IIF to be consistent with ipv4
Shmulik Ladkani [Sun, 1 Apr 2012 04:03:45 +0000 (04:03 +0000)]
ipv6: Fix RTM_GETROUTE's interpretation of RTA_IIF to be consistent with ipv4

In IPv4, if an RTA_IIF attribute is specified within an RTM_GETROUTE
message, then a route is searched as if a packet was received on the
specified 'iif' interface.

However in IPv6, RTA_IIF is not interpreted in the same way:
'inet6_rtm_getroute()' always calls 'ip6_route_output()', regardless the
RTA_IIF attribute.

As a result, in IPv6 there's no way to use RTM_GETROUTE in order to look
for a route as if a packet was received on a specific interface.

Fix 'inet6_rtm_getroute()' so that RTA_IIF is interpreted as "lookup a
route as if a packet was received on the specified interface", similar
to IPv4's 'inet_rtm_getroute()' interpretation.

Reported-by: Ami Koren <amikoren@yahoo.com>
Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc: pgtable_64: change include order
Aaro Koskinen [Sun, 1 Apr 2012 08:54:38 +0000 (08:54 +0000)]
sparc: pgtable_64: change include order

Fix the following build breakage in v3.4-rc1:

  CC      arch/sparc/kernel/cpu.o
In file included from /home/aaro/git/linux/arch/sparc/include/asm/pgtable_64.h:15:0,
                 from /home/aaro/git/linux/arch/sparc/include/asm/pgtable.h:4,
                 from arch/sparc/kernel/cpu.c:15:
include/asm-generic/pgtable-nopud.h:13:16: error: unknown type name 'pgd_t'
include/asm-generic/pgtable-nopud.h:25:28: error: unknown type name 'pgd_t'
include/asm-generic/pgtable-nopud.h:26:27: error: unknown type name 'pgd_t'
include/asm-generic/pgtable-nopud.h:27:31: error: unknown type name 'pgd_t'
include/asm-generic/pgtable-nopud.h:28:30: error: unknown type name 'pgd_t'
include/asm-generic/pgtable-nopud.h:38:34: error: unknown type name 'pgd_t'
In file included from /home/aaro/git/linux/arch/sparc/include/asm/pgtable_64.h:783:0,
                 from /home/aaro/git/linux/arch/sparc/include/asm/pgtable.h:4,
                 from arch/sparc/kernel/cpu.c:15:
include/asm-generic/pgtable.h: In function 'pgd_none_or_clear_bad':
include/asm-generic/pgtable.h:258:2: error: implicit declaration of function 'pgd_none' [-Werror=implicit-function-declaration]
include/asm-generic/pgtable.h:260:2: error: implicit declaration of function 'pgd_bad' [-Werror=implicit-function-declaration]
include/asm-generic/pgtable.h: In function 'pud_none_or_clear_bad':
include/asm-generic/pgtable.h:269:6: error: request for member 'pgd' in something not a structure or union

Reported-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoscsi/atari: Make more functions static
Geert Uytterhoeven [Sun, 12 Jun 2011 18:48:33 +0000 (20:48 +0200)]
scsi/atari: Make more functions static

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Schmitz <schmitzmic@googlemail.com>
Cc: James E.J. Bottomley <JBottomley@parallels.com>
Cc: linux-scsi@vger.kernel.org
12 years agoscsi/atari: Revive "atascsi=" setup option
Geert Uytterhoeven [Sun, 18 Mar 2012 10:54:40 +0000 (11:54 +0100)]
scsi/atari: Revive "atascsi=" setup option

It was documented in Documentation/m68k/kernel-options.txt and
Documentation/scsi/scsi-parameters.txt, but the implementation was
missing.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Schmitz <schmitzmic@googlemail.com>
Cc: James E.J. Bottomley <JBottomley@parallels.com>
Cc: linux-scsi@vger.kernel.org
12 years agonet/ariadne: Improve debug prints
Geert Uytterhoeven [Mon, 27 Jun 2011 21:09:20 +0000 (23:09 +0200)]
net/ariadne: Improve debug prints

Remove casts and use proper printf()-style format specifiers instead.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Acked-by: David S. Miller <davem@davemloft.net>
12 years agom68k/atari: Change VME irq numbers from unsigned long to unsigned int
Geert Uytterhoeven [Thu, 18 Aug 2011 18:01:51 +0000 (20:01 +0200)]
m68k/atari: Change VME irq numbers from unsigned long to unsigned int

Device interrupts numbers were changed to unsigned int in 1997, the year
IRQ_MACHSPEC was killed as well.

Also kill a related cast while we're at it.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: netdev@vger.kernel.org
12 years agom68k/amiga: Use arch_initcall() for registering platform devices
Geert Uytterhoeven [Sun, 22 Jan 2012 11:45:45 +0000 (12:45 +0100)]
m68k/amiga: Use arch_initcall() for registering platform devices

module_init() maps to device_initcall(), opening the possibility of
race conditions between platform_driver_probe() and registering platform
devices.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
12 years agom68k/amiga: Add error checks when registering platform devices
Geert Uytterhoeven [Sun, 22 Jan 2012 11:44:25 +0000 (12:44 +0100)]
m68k/amiga: Add error checks when registering platform devices

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
12 years agom68k/amiga: Mark z_dev_present() __init
Geert Uytterhoeven [Sun, 22 Jan 2012 11:25:55 +0000 (12:25 +0100)]
m68k/amiga: Mark z_dev_present() __init

It's called from amiga_init_devices() only, which is __init.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
12 years agom68k: Remove unused MAX_NOINT_IPL definition
Geert Uytterhoeven [Sun, 19 Jun 2011 09:13:31 +0000 (11:13 +0200)]
m68k: Remove unused MAX_NOINT_IPL definition

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
12 years agom68k/q40: Add missing platform check before registering platform devices
Geert Uytterhoeven [Sun, 18 Mar 2012 12:20:27 +0000 (13:20 +0100)]
m68k/q40: Add missing platform check before registering platform devices

On multi-platform kernels, the Q40/Q60 platform devices should be
registered when running on Q40/Q60 only. Else it may crash later.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
12 years agom68k/mac: Add missing platform check before registering platform devices
Geert Uytterhoeven [Sun, 18 Mar 2012 12:21:38 +0000 (13:21 +0100)]
m68k/mac: Add missing platform check before registering platform devices

On multi-platform kernels, the Mac platform devices should be registered
when running on Mac only. Else it may crash later.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: stable@vger.kernel.org
12 years agom68k: include asm/cmpxchg.h in our m68k atomic.h
Greg Ungerer [Fri, 30 Mar 2012 05:52:09 +0000 (15:52 +1000)]
m68k: include asm/cmpxchg.h in our m68k atomic.h

After commit 9ffc93f203c18a70623f21950f1dd473c9ec48cd ("Remove all

  CC      init/main.o
In file included from include/linux/mm.h:15:0,
                 from include/linux/ring_buffer.h:5,
                 from include/linux/ftrace_event.h:4,
                 from include/trace/syscall.h:6,
                 from include/linux/syscalls.h:78,
                 from init/main.c:16:
include/linux/debug_locks.h: In function ‘__debug_locks_off’:
include/linux/debug_locks.h:16:2: error: implicit declaration of function ‘xchg’

There is no indirect inclusions of the new asm/cmpxchg.h for m68k here.
Looking at most other architectures they include asm/cmpxchg.h in their
asm/atomic.h. M68k currently does not do this. Including this in atomic.h
fixes all m68k build problems.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
12 years agonet: lpc_eth: Fix rename of dev_hw_addr_random
stigge@antcom.de [Wed, 28 Mar 2012 12:36:26 +0000 (12:36 +0000)]
net: lpc_eth: Fix rename of dev_hw_addr_random

In parallel to the integration of lpc_eth.c, dev_hw_addr_random() has been
renamed to eth_hw_addr_random(). This patch fixes it also in the new driver
lpc_eth.c.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/netfilter/nfnetlink_acct.c: use linux/atomic.h
Andrew Morton [Wed, 28 Mar 2012 12:10:57 +0000 (12:10 +0000)]
net/netfilter/nfnetlink_acct.c: use linux/atomic.h

There's no known problem here, but this is one of only two non-arch files
in the kernel which use asm/atomic.h instead of linux/atomic.h.

Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Patrick McHardy <kaber@trash.net>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agorose_dev: fix memcpy-bug in rose_set_mac_address
danborkmann@iogearbox.net [Tue, 27 Mar 2012 22:47:43 +0000 (22:47 +0000)]
rose_dev: fix memcpy-bug in rose_set_mac_address

If both addresses equal, nothing needs to be done. If the device is down,
then we simply copy the new address to dev->dev_addr. If the device is up,
then we add another loopback device with the new address, and if that does
not fail, we remove the loopback device with the old address. And only
then, we update the dev->dev_addr.

Signed-off-by: Daniel Borkmann <daniel.borkmann@tik.ee.ethz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoFix non TBI PHY access; a bad merge undid bug fix in a previous commit.
Kenth Eriksson [Tue, 27 Mar 2012 22:05:54 +0000 (22:05 +0000)]
Fix non TBI PHY access; a bad merge undid bug fix in a previous commit.

The merge done in commit b26e478f undid bug fix in commit c3e072f8
("net: fsl_pq_mdio: fix non tbi phy access"), with the result that non
TBI (e.g. MDIO) PHYs cannot be accessed.

Signed-off-by: Kenth Eriksson <kenth.eriksson@transmode.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/garp: avoid infinite loop if attribute already exists
David Ward [Tue, 27 Mar 2012 09:01:52 +0000 (09:01 +0000)]
net/garp: avoid infinite loop if attribute already exists

An infinite loop occurred if garp_attr_create was called with the values
of an existing attribute. This might happen if a previous leave request
for the attribute has not yet been followed by a PDU transmission (or,
if the application previously issued a join request for the attribute
and is now issuing another one, without having issued a leave request).

If garp_attr_create finds an existing attribute having the same values,
return the address to it. Its state will then get updated (i.e., if it
was in a leaving state, it will move into a non-leaving state and not
get deleted during the next PDU transmission).

To accomplish this fix, collapse garp_attr_insert into garp_attr_create
(which is its only caller).

Thanks to Jorge Boncompte [DTI2] <jorge@dti2.net> for contributing to
this fix.

Signed-off-by: David Ward <david.ward@ll.mit.edu>
Acked-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
David S. Miller [Sun, 1 Apr 2012 20:47:08 +0000 (16:47 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless

12 years agocgroup: make css->refcnt clearing on cgroup removal optional
Tejun Heo [Sun, 1 Apr 2012 19:09:56 +0000 (12:09 -0700)]
cgroup: make css->refcnt clearing on cgroup removal optional

Currently, cgroup removal tries to drain all css references.  If there
are active css references, the removal logic waits and retries
->pre_detroy() until either all refs drop to zero or removal is
cancelled.

This semantics is unusual and adds non-trivial complexity to cgroup
core and IMHO is fundamentally misguided in that it couples internal
implementation details (references to internal data structure) with
externally visible operation (rmdir).  To userland, this is a behavior
peculiarity which is unnecessary and difficult to expect (css refs is
otherwise invisible from userland), and, to policy implementations,
this is an unnecessary restriction (e.g. blkcg wants to hold css refs
for caching purposes but can't as that becomes visible as rmdir hang).

Unfortunately, memcg currently depends on ->pre_destroy() retrials and
cgroup removal vetoing and can't be immmediately switched to the new
behavior.  This patch introduces the new behavior of not waiting for
css refs to drain and maintains the old behavior for subsystems which
have __DEPRECATED_clear_css_refs set.

Once, memcg is updated, we can drop the code paths for the old
behavior as proposed in the following patch.  Note that the following
patch is incorrect in that dput work item is in cgroup and may lose
some of dputs when multiples css's are released back-to-back, and
__css_put() triggers check_for_release() when refcnt reaches 0 instead
of 1; however, it shows what part can be removed.

  http://thread.gmane.org/gmane.linux.kernel.containers/22559/focus=75251

Note that, in not-too-distant future, cgroup core will start emitting
warning messages for subsys which require the old behavior, so please
get moving.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
12 years agocgroup: use negative bias on css->refcnt to block css_tryget()
Tejun Heo [Sun, 1 Apr 2012 19:09:56 +0000 (12:09 -0700)]
cgroup: use negative bias on css->refcnt to block css_tryget()

When a cgroup is about to be removed, cgroup_clear_css_refs() is
called to check and ensure that there are no active css references.

This is currently achieved by dropping the refcnt to zero iff it has
only the base ref.  If all css refs could be dropped to zero, ref
clearing is successful and CSS_REMOVED is set on all css.  If not, the
base ref is restored.  While css ref is zero w/o CSS_REMOVED set, any
css_tryget() attempt on it busy loops so that they are atomic
w.r.t. the whole css ref clearing.

This does work but dropping and re-instating the base ref is somewhat
hairy and makes it difficult to add more logic to the put path as
there are two of them - the regular css_put() and the reversible base
ref clearing.

This patch updates css ref clearing such that blocking new
css_tryget() and putting the base ref are separate operations.
CSS_DEACT_BIAS, defined as INT_MIN, is added to css->refcnt and
css_tryget() busy loops while refcnt is negative.  After all css refs
are deactivated, if they were all one, ref clearing succeeded and
CSS_REMOVED is set and the base ref is put using the regular
css_put(); otherwise, CSS_DEACT_BIAS is subtracted from the refcnts
and the original postive values are restored.

css_refcnt() accessor which always returns the unbiased positive
reference counts is added and used to simplify refcnt usages.  While
at it, relocate and reformat comments in cgroup_has_css_refs().

This separates css->refcnt deactivation and putting the base ref,
which enables the next patch to make ref clearing optional.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
12 years agocgroup: implement cgroup_rm_cftypes()
Tejun Heo [Sun, 1 Apr 2012 19:09:56 +0000 (12:09 -0700)]
cgroup: implement cgroup_rm_cftypes()

Implement cgroup_rm_cftypes() which removes an array of cftypes from a
subsystem.  It can be called whether the target subsys is attached or
not.  cgroup core will remove the specified file from all existing
cgroups.

This will be used to improve sub-subsys modularity and will be helpful
for unified hierarchy.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
12 years agocgroup: introduce struct cfent
Tejun Heo [Sun, 1 Apr 2012 19:09:56 +0000 (12:09 -0700)]
cgroup: introduce struct cfent

This patch adds cfent (cgroup file entry) which is the association
between a cgroup and a file.  This is in-cgroup representation of
files under a cgroup directory.  This simplifies walking walking
cgroup files and thus cgroup_clear_directory(), which is now
implemented in two parts - cgroup_rm_file() and a loop around it.

cgroup_rm_file() will be used to implement cftype removal and cfent is
scheduled to serve cgroup specific per-file data (e.g. for sysfs-like
"sever" semantics).

v2: - cfe was freed from cgroup_rm_file() which led to use-after-free
      if the file had openers at the time of removal.  Moved to
      cgroup_diput().

    - cgroup_clear_directory() triggered WARN_ON_ONCE() if d_subdirs
      wasn't empty after removing all files.  This triggered
      spuriously if some files were open during directory clearing.
      Removed.

v3: - In cgroup_diput(), WARN_ONCE(!list_empty(&cfe->node)) could be
      spuriously triggered for root cgroups because they don't go
      through cgroup_clear_directory() on unmount.  Don't trigger WARN
      for root cgroups.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Glauber Costa <glommer@parallels.com>
12 years agocgroup: relocate __d_cgrp() and __d_cft()
Tejun Heo [Sun, 1 Apr 2012 19:09:55 +0000 (12:09 -0700)]
cgroup: relocate __d_cgrp() and __d_cft()

Move the two macros upwards as they'll be used earlier in the file.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
12 years agocgroup: remove cgroup_add_file[s]()
Tejun Heo [Sun, 1 Apr 2012 19:09:55 +0000 (12:09 -0700)]
cgroup: remove cgroup_add_file[s]()

No controller is using cgroup_add_files[s]().  Unexport them, and
convert cgroup_add_files() to handle NULL entry terminated array
instead of taking count explicitly and continue creation on failure
for internal use.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
12 years agocgroup: convert memcg controller to the new cftype interface
Tejun Heo [Sun, 1 Apr 2012 19:09:55 +0000 (12:09 -0700)]
cgroup: convert memcg controller to the new cftype interface

Convert memcg to use the new cftype based interface.  kmem support
abuses ->populate() for mem_cgroup_sockets_init() so it can't be
removed at the moment.

tcp_memcontrol is updated so that tcp_files[] is registered via a
__initcall.  This change also allows removing the forward declaration
of tcp_files[].  Removed.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: Glauber Costa <glommer@parallels.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Greg Thelen <gthelen@google.com>
12 years agomemcg: always create memsw files if CONFIG_CGROUP_MEM_RES_CTLR_SWAP
Tejun Heo [Sun, 1 Apr 2012 19:09:55 +0000 (12:09 -0700)]
memcg: always create memsw files if CONFIG_CGROUP_MEM_RES_CTLR_SWAP

Instead of conditioning creation of memsw files on do_swap_account,
always create the files if compiled-in and fail read/write attempts
with -EOPNOTSUPP if !do_swap_account.

This is suggested by KAMEZAWA to simplify memcg file creation so that
it can use cgroup->subsys_cftypes.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
12 years agocgroup: convert all non-memcg controllers to the new cftype interface
Tejun Heo [Sun, 1 Apr 2012 19:09:55 +0000 (12:09 -0700)]
cgroup: convert all non-memcg controllers to the new cftype interface

Convert debug, freezer, cpuset, cpu_cgroup, cpuacct, net_prio, blkio,
net_cls and device controllers to use the new cftype based interface.
Termination entry is added to cftype arrays and populate callbacks are
replaced with cgroup_subsys->base_cftypes initializations.

This is functionally identical transformation.  There shouldn't be any
visible behavior change.

memcg is rather special and will be converted separately.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Paul Menage <paul@paulmenage.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Vivek Goyal <vgoyal@redhat.com>
12 years agocgroup: relocate cftype and cgroup_subsys definitions in controllers
Tejun Heo [Sun, 1 Apr 2012 19:09:55 +0000 (12:09 -0700)]
cgroup: relocate cftype and cgroup_subsys definitions in controllers

blk-cgroup, netprio_cgroup, cls_cgroup and tcp_memcontrol
unnecessarily define cftype array and cgroup_subsys structures at the
top of the file, which is unconventional and necessiates forward
declaration of methods.

This patch relocates those below the definitions of the methods and
removes the forward declarations.  Note that forward declaration of
tcp_files[] is added in tcp_memcontrol.c for tcp_init_cgroup().  This
will be removed soon by another patch.

This patch doesn't introduce any functional change.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
12 years agocgroup: merge cft_release_agent cftype array into the base files array
Tejun Heo [Sun, 1 Apr 2012 19:09:55 +0000 (12:09 -0700)]
cgroup: merge cft_release_agent cftype array into the base files array

Now that cftype can express whether a file should only be on root,
cft_release_agent can be merged into the base files cftypes array.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
12 years agocgroup: implement cgroup_add_cftypes() and friends
Tejun Heo [Sun, 1 Apr 2012 19:09:55 +0000 (12:09 -0700)]
cgroup: implement cgroup_add_cftypes() and friends

Currently, cgroup directories are populated by subsys->populate()
callback explicitly creating files on each cgroup creation.  This
level of flexibility isn't needed or desirable.  It provides largely
unused flexibility which call for abuses while severely limiting what
the core layer can do through the lack of structure and conventions.

Per each cgroup file type, the only distinction that cgroup users is
making is whether a cgroup is root or not, which can easily be
expressed with flags.

This patch introduces cgroup_add_cftypes().  These deal with cftypes
instead of individual files - controllers indicate that certain types
of files exist for certain subsystem.  Newly added CFTYPE_*_ON_ROOT
flags indicate whether a cftype should be excluded or created only on
the root cgroup.

cgroup_add_cftypes() can be called any time whether the target
subsystem is currently attached or not.  cgroup core will create files
on the existing cgroups as necessary.

Also, cgroup_subsys->base_cftypes is added to ease registration of the
base files for the subsystem.  If non-NULL on subsys init, the cftypes
pointed to by ->base_cftypes are automatically registered on subsys
init / load.

Further patches will convert the existing users and remove the file
based interface.  Note that this interface allows dynamic addition of
files to an active controller.  This will be used for sub-controller
modularity and unified hierarchy in the longer term.

This patch implements the new mechanism but doesn't apply it to any
user.

v2: replaced DECLARE_CGROUP_CFTYPES[_COND]() with
    cgroup_subsys->base_cftypes, which works better for cgroup_subsys
    which is loaded as module.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
12 years agocgroup: build list of all cgroups under a given cgroupfs_root
Tejun Heo [Sun, 1 Apr 2012 19:09:54 +0000 (12:09 -0700)]
cgroup: build list of all cgroups under a given cgroupfs_root

Build a list of all cgroups anchored at cgroupfs_root->allcg_list and
going through cgroup->allcg_node.  The list is protected by
cgroup_mutex and will be used to improve cgroup file handling.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
12 years agocgroup: move cgroup_clear_directory() call out of cgroup_populate_dir()
Tejun Heo [Sun, 1 Apr 2012 19:09:54 +0000 (12:09 -0700)]
cgroup: move cgroup_clear_directory() call out of cgroup_populate_dir()

cgroup_populate_dir() currently clears all files and then repopulate
the directory; however, the clearing part is only useful when it's
called from cgroup_remount().  Relocate the invocation to
cgroup_remount().

This is to prepare for further cgroup file handling updates.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
12 years agocgroup: deprecate remount option changes
Tejun Heo [Sun, 1 Apr 2012 19:09:54 +0000 (12:09 -0700)]
cgroup: deprecate remount option changes

This patch marks the following features for deprecation.

* Rebinding subsys by remount: Never reached useful state - only works
  on empty hierarchies.

* release_agent update by remount: release_agent itself will be
  replaced with conventional fsnotify notification.

v2: Lennart pointed out that "name=" is necessary for mounts w/o any
    controller attached.  Drop "name=" deprecation.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Lennart Poettering <mzxreary@0pointer.de>
12 years agoCIFS: Fix VFS lock usage for oplocked files
Pavel Shilovsky [Wed, 28 Mar 2012 17:56:19 +0000 (21:56 +0400)]
CIFS: Fix VFS lock usage for oplocked files

We can deadlock if we have a write oplock and two processes
use the same file handle. In this case the first process can't
unlock its lock if the second process blocked on the lock in the
same time.

Fix it by using posix_lock_file rather than posix_lock_file_wait
under cinode->lock_mutex. If we request a blocking lock and
posix_lock_file indicates that there is another lock that prevents
us, wait untill that lock is released and restart our call.

Cc: stable@kernel.org
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <sfrench@us.ibm.com>
12 years agoRevert "CIFS: Fix VFS lock usage for oplocked files"
Steve French [Sun, 1 Apr 2012 18:52:54 +0000 (13:52 -0500)]
Revert "CIFS: Fix VFS lock usage for oplocked files"

Revert previous version of patch to incorporate feedback
so that we can merge version 3 of the patch instead.w

This reverts commit b5efb978469d152c2c7c0a09746fb0bfc6171868.

12 years agoMAINTAINERS: update EDAC information
Chris Metcalf [Sat, 31 Mar 2012 13:46:03 +0000 (09:46 -0400)]
MAINTAINERS: update EDAC information

The bluesmoke mailing list no longer works, so use
linux-edac@vger.kernel.org.  And, use a less restrictive pattern so all
drivers/edac changes go to linux-edac as well.

Borislav suggested I just push this through the tile tree since there
is currently no core edac maintainer (emails to Doug Thompson bounce).

Acked-by: Borislav Petkov <bp@amd64.org>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
12 years agotilepro ethernet driver: fix a few minor issues
Chris Metcalf [Fri, 30 Mar 2012 23:23:35 +0000 (19:23 -0400)]
tilepro ethernet driver: fix a few minor issues

This commit fixes a number of issues seen with the driver:

- Improve handling of return credits to the hardware shim
- Use skb_frag_size() appropriately
- Add netpoll support to run console over UDP

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
12 years agotile-srom.c driver: minor code cleanup
Chris Metcalf [Fri, 30 Mar 2012 23:03:04 +0000 (19:03 -0400)]
tile-srom.c driver: minor code cleanup

This doesn't fix any bugs, but it makes the code a little cleaner.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
12 years agoedac: say "TILEGx" not "TILEPro" for the tilegx edac driver
Chris Metcalf [Fri, 30 Mar 2012 22:58:37 +0000 (18:58 -0400)]
edac: say "TILEGx" not "TILEPro" for the tilegx edac driver

This is just an aesthetic change but it was silly to say TILEPro
when booting up on the tilegx architecture.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
12 years agoarch/tile: add descriptive text if the kernel reports a bad trap
Chris Metcalf [Fri, 30 Mar 2012 20:31:08 +0000 (16:31 -0400)]
arch/tile: add descriptive text if the kernel reports a bad trap

If the kernel unexpectedly takes a bad trap, it's convenient to
have it report the type of trap as part of the error.  This gives
customers a bit more context before they call up customer support.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
12 years agoarch/tile: avoid accidentally unmasking NMI-type interrupt accidentally
Chris Metcalf [Fri, 30 Mar 2012 20:29:06 +0000 (16:29 -0400)]
arch/tile: avoid accidentally unmasking NMI-type interrupt accidentally

The return path as we reload registers and core state requires that r30
hold a boolean indicating whether we are returning from an NMI, but in a
couple of cases we weren't setting this properly, with the result that we
could accidentally unmask the NMI interrupt(s), which could cause confusion.
Now we set r30 in every place where we jump into the interrupt return path.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
12 years agoarch/tile: remove bogus performance optimization
Chris Metcalf [Fri, 30 Mar 2012 20:27:20 +0000 (16:27 -0400)]
arch/tile: remove bogus performance optimization

We were re-homing the initial task's kernel stack on the boot cpu,
but in fact it's better to let it stay globally homed, since that
task isn't bound to the boot cpu anyway.  This is more of a general
cleanup than an actual performance optimization, but it removes
code, which is a good thing. :-)

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
12 years agoarch/tile: return SIGBUS for addresses that are unaligned AND invalid
Chris Metcalf [Fri, 30 Mar 2012 20:24:41 +0000 (16:24 -0400)]
arch/tile: return SIGBUS for addresses that are unaligned AND invalid

Previously we were returning SIGSEGV in this case.  It seems cleaner
to return SIGBUS since the hardware figures out alignment traps
before TLB violations, so SIGBUS is the "more correct" signal.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
12 years agoarch/tile: allow querying cpu module information from the hypervisor
Chris Metcalf [Fri, 30 Mar 2012 20:21:17 +0000 (16:21 -0400)]
arch/tile: allow querying cpu module information from the hypervisor

This just adds a few more attributes to the information Linux
can query from the hypervisor for the /sys/hypervisor/board/ directory,
providing part, serial#, revision#, and description for cpu modules
(as opposed to the board itself, or any mezzanine boards).

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
12 years agoarch/tile: fix hardwall for tilegx and generalize for idn and ipi
Chris Metcalf [Fri, 30 Mar 2012 20:01:48 +0000 (16:01 -0400)]
arch/tile: fix hardwall for tilegx and generalize for idn and ipi

The hardwall drain code was not properly implemented for tilegx,
just tilepro, so you couldn't reliably restart an application that
made use of the udn.

In addition, the code was only applicable to the udn (user dynamic
network).  On tilegx there is a second user network that is available
(the "idn"), and there is support for having I/O shims deliver
user-level interrupts to applications ("ipi") which functions in a
very similar way to the inter-core permissions used for udn/idn.
So this change also generalizes the code from supporting just the udn
to supports udn/idn/ipi on tilegx.

By default we now use /dev/hardwall/{udn,idn,ipi} with separate
minor numbers for the three devices.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
12 years agoarch/tile: fix a reference to cpu_possible_map in a comment
Chris Metcalf [Fri, 30 Mar 2012 19:55:13 +0000 (15:55 -0400)]
arch/tile: fix a reference to cpu_possible_map in a comment

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
12 years agoarch/tile: remove references to cpu_*_map.
Rusty Russell [Wed, 15 Feb 2012 04:58:04 +0000 (15:28 +1030)]
arch/tile: remove references to cpu_*_map.

This has been obsolescent for a while; time for the final push.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
12 years agoarch/tile: fix finv_buffer_remote() for tilegx
Chris Metcalf [Fri, 30 Mar 2012 19:47:38 +0000 (15:47 -0400)]
arch/tile: fix finv_buffer_remote() for tilegx

There were some correctness issues with this code that are now fixed
with this change.  The change is likely less performant than it could
be, but it should no longer be vulnerable to any races with memory
operations on the memory network while invalidating a range of memory.
This code is run infrequently so performance isn't critical, but
correctness definitely is.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
12 years agoarch/tile: use atomic exchange in arch_write_unlock()
Chris Metcalf [Fri, 30 Mar 2012 19:46:29 +0000 (15:46 -0400)]
arch/tile: use atomic exchange in arch_write_unlock()

This idiom is used elsewhere when we do an unlock by writing a zero,
but I missed it here.  Using an atomic operation avoids waiting
on the write buffer for the unlocking write to be sent to the home cache.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
12 years agoarch/tile: support multiple huge page sizes dynamically
Chris Metcalf [Sun, 1 Apr 2012 18:04:21 +0000 (14:04 -0400)]
arch/tile: support multiple huge page sizes dynamically

This change adds support for a new "super" bit in the PTE, using the new
arch_make_huge_pte() method.  The Tilera hypervisor sees the bit set at a
given level of the page table and gangs together 4, 16, or 64 consecutive
pages from that level of the hierarchy to create a larger TLB entry.

One extra "super" page size can be specified at each of the three levels
of the page table hierarchy on tilegx, using the "hugepagesz" argument
on the boot command line.  A new hypervisor API is added to allow Linux
to tell the hypervisor how many PTEs to gang together at each level of
the page table.

To allow pre-allocating huge pages larger than the buddy allocator can
handle, this change modifies the Tilera bootmem support to put all of
memory on tilegx platforms into bootmem.

As part of this change I eliminate the vestigial CONFIG_HIGHPTE support,
which never worked anyway, and eliminate the hv_page_size() API in favor
of the standard vma_kernel_pagesize() API.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
12 years agomm: add new arch_make_huge_pte() method for tile support
Chris Metcalf [Sun, 1 Apr 2012 18:01:34 +0000 (14:01 -0400)]
mm: add new arch_make_huge_pte() method for tile support

The tile support for multiple-size huge pages requires tagging
the hugetlb PTE with a "super" bit for PTEs that are multiples of
the basic size of a pagetable span.  To set that bit properly
we need to tweak the PTe in make_huge_pte() based on the vma.

This change provides the API for a subsequent tile-specific
change to use.

Reviewed-by: Hillf Danton <dhillf@gmail.com>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
12 years agohwmon: (it87) Add support for IT8782F and IT8783E/F
Guenter Roeck [Fri, 2 Mar 2012 19:46:44 +0000 (11:46 -0800)]
hwmon: (it87) Add support for IT8782F and IT8783E/F

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
12 years agohwmon: (k10temp) Add support for AMD Trinity CPUs
Andre Przywara [Fri, 30 Mar 2012 20:48:20 +0000 (16:48 -0400)]
hwmon: (k10temp) Add support for AMD Trinity CPUs

The on-chip northbridge's temperature sensor of the upcoming
AMD Trinity CPUs works the same as for the previous CPUs.
Since it has a different PCI-ID, we just add the new one to the list
supported by k10temp.
This allows to use the k10temp driver on those CPUs.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Cc: stable@vger.kernel.org # 3.0+
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
12 years agohwmon: (w83627ehf) mark const init data with __initconst instead of __initdata
Uwe Kleine-König [Fri, 30 Mar 2012 20:04:55 +0000 (16:04 -0400)]
hwmon: (w83627ehf) mark const init data with __initconst instead of __initdata

As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with

error: $variablename causes a section type conflict

because a section containing const variables is marked read only and so
cannot contain non-const variables.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: lm-sensors@lm-sensors.org
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
12 years agohwmon: (acpi_power_meter) fix lockdep spew due to non-static lock class
Kyle McMartin [Wed, 28 Mar 2012 19:11:47 +0000 (15:11 -0400)]
hwmon: (acpi_power_meter) fix lockdep spew due to non-static lock class

Similar to a30dcb4f which fixed asus_atk0110.ko, I recently received a
bug report from someone hitting the same issue in acpi_power_meter.

[   13.963168] power_meter ACPI000D:00: Found ACPI power meter.
[   13.963900] BUG: key ffff8802161f3920 not in .data!
[   13.963904] ------------[ cut here ]------------
[   13.963915] WARNING: at kernel/lockdep.c:2986
lockdep_init_map+0x52f/0x560()

So let's fix that up for them by statically declaring the
lockdep_class_key.

Signed-off-by: Kyle McMartin <kyle@redhat.com>
Cc: stable@vger.kernel.org # 3.0+
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
12 years agohwmon: (adm1031) Fix compiler warning
Guenter Roeck [Sat, 24 Mar 2012 15:51:05 +0000 (08:51 -0700)]
hwmon: (adm1031) Fix compiler warning

Some configurations produce the following compile warning:

drivers/hwmon/adm1031.c: In function 'set_fan_auto_channel':
drivers/hwmon/adm1031.c:292: warning: 'reg' may be used uninitialized in this function

While this is a false positive, it can easily be fixed by overloading the return
value from get_fan_auto_nearest with both register value and error return code
(the register value is never negative). Coincidentially, that also reduces
module size by a few bytes.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
12 years agohwmon: (f75375s) Fix warning message seen in some configurations
Guenter Roeck [Sat, 24 Mar 2012 15:38:21 +0000 (08:38 -0700)]
hwmon: (f75375s) Fix warning message seen in some configurations

In some configurations, BUG() does not result in an endless loop but returns to
the caller. This results in the following compiler warning:

drivers/hwmon/f75375s.c: In function 'duty_mode_enabled':
drivers/hwmon/f75375s.c:280: warning: control reaches end of non-void function
drivers/hwmon/f75375s.c: In function 'auto_mode_enabled':
drivers/hwmon/f75375s.c:295: warning: control reaches end of non-void function

Fix the warning by returning something sensible after BUG().

Cc: Nikolaus Schulz <schulz@macnetix.de>
Cc: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>