pandora-kernel.git
13 years ago[S390] chsc: consolidate memory allocations
Sebastian Ott [Mon, 25 Oct 2010 14:10:29 +0000 (16:10 +0200)]
[S390] chsc: consolidate memory allocations

Most wrappers around the channel subsystem call have their own logic
to allocate memory (with proper alignment) or use preallocated or
static memory. This patch converts most users of the channel
subsystem call to use the same preallocated page (proteced by a
spinlock).

Note: The sei_page which is used in our crw handler to call
"store event information" has to coexist, since
a) in crw context, while accessing the sei_page, sleeping is allowed
   (which will conflict with the spinlock protection of the chsc_page)
b) in crw context, while accessing the sei_page, channel subsystem
   calls are allowed (which itself would require the page).

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] chsc: initialization fixes
Sebastian Ott [Mon, 25 Oct 2010 14:10:28 +0000 (16:10 +0200)]
[S390] chsc: initialization fixes

This patch fixes:
 * kfree vs. free_page usage
 * structure definition for determine_css_characteristics
 * naming convention for the chsc init function
 * deregistration of crw handlers in the cleanup path

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] cio: add lock to struct channel_path
Sebastian Ott [Mon, 25 Oct 2010 14:10:27 +0000 (16:10 +0200)]
[S390] cio: add lock to struct channel_path

Serialize access to members of struct channel_path with a mutex.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] cio: fix memleak in resume path
Sebastian Ott [Mon, 25 Oct 2010 14:10:26 +0000 (16:10 +0200)]
[S390] cio: fix memleak in resume path

If a ccwdevice is lost during hibernation and a different
ccwdevice is attached to the same subchannel, we will
deregister the old ccw device and register the new one.

Since deregistration is not allowed in this context, we
handle this action later. However, some parts of the
registration process for the new device were started anyway,
so that the old device structure is no longer accessible.

Fix this by deferring both actions to the afterwards
scheduled subchannel event.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] cio: remove custom implementation of hex_to_bin()
Andy Shevchenko [Mon, 25 Oct 2010 14:10:25 +0000 (16:10 +0200)]
[S390] cio: remove custom implementation of hex_to_bin()

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] dasd fix dump_sense_dbf
Stefan Haberland [Mon, 25 Oct 2010 14:10:24 +0000 (16:10 +0200)]
[S390] dasd fix dump_sense_dbf

The dasd_eckd_dump_sense_dbf function uses a macro for s390 debug
feature that can handle up to 8 parameters (for the DASD device
driver).
Fix the function to use only the maximum number of parameters.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] css: fix sparse warning
Sebastian Ott [Mon, 25 Oct 2010 14:10:23 +0000 (16:10 +0200)]
[S390] css: fix sparse warning

fix this sparse warning:

drivers/s390/cio/css.c:580:6: warning: symbol 'css_schedule_eval_all_unreg'
was not declared. Should it be static?

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] hvc_iucv: do not call iucv_unregister if iucv_register failed
Hendrik Brueckner [Mon, 25 Oct 2010 14:10:22 +0000 (16:10 +0200)]
[S390] hvc_iucv: do not call iucv_unregister if iucv_register failed

If the iucv_register() functions fails, the error recovery calls
iucv_unregister() which might cause the following stack backtrace:

(<0000000000100ab2> show_trace+0xee/0x144)
<00000000004f1842> panic+0xb6/0x248
<00000000001010a6> die+0x15a/0x16c
<000000000011d936> do_no_context+0xa6/0xe4
<00000000004f84dc> do_protection_exception+0x2e8/0x3a4
<0000000000113afc> pgm_exit+0x0/0x14
<00000000004e786e> iucv_unregister+0x5a/0x17c
(<00000000004e785e> iucv_unregister+0x4a/0x17c)
<000000000076de74> hvc_iucv_init+0x228/0x5dc
<00000000001000c2> do_one_initcall+0x3e/0x19c
<00000000007524a2> kernel_init+0x28e/0x404
<0000000000105dd6> kernel_thread_starter+0x6/0xc
<0000000000105dd0> kernel_thread_starter+0x0/0xc

Remove the call to iucv_unregister() and remove the goto label
as unregistering is the last step in the hvc_iucv initialization.
If iucv_register() fails, simply clean up hvc terminals and free
resources.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] cmm: fix crash on case conversion
Heiko Carstens [Mon, 25 Oct 2010 14:10:21 +0000 (16:10 +0200)]
[S390] cmm: fix crash on case conversion

When the cmm module is compiled into the kernel it will crash when
writing to the R/O data section.
Reason is the lower to upper case conversion of the "sender" module
parameter which ignored the fact that the pointer is preinitialized.

Introduced with 41b42876 "cmm, smsgiucv_app: convert sender to
uppercase"

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] drivers/s390/char: Use static const char arrays
Joe Perches [Mon, 25 Oct 2010 14:10:20 +0000 (16:10 +0200)]
[S390] drivers/s390/char: Use static const char arrays

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] switch_to: get rid of prev == next check
Heiko Carstens [Mon, 25 Oct 2010 14:10:19 +0000 (16:10 +0200)]
[S390] switch_to: get rid of prev == next check

schedule() makes sure that prev != next before calling switch_to().
Therefore remove the redundant check.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] switch_to: dont restore/save access & fpu regs for kernel threads
Heiko Carstens [Mon, 25 Oct 2010 14:10:18 +0000 (16:10 +0200)]
[S390] switch_to: dont restore/save access & fpu regs for kernel threads

If the previous task was a kernel thread there is no need to save the
contents of the fpu and access registers since they aren't used in
kernel mode.
For the same reason it is not necessary to restore these registers if
the next task is a kernel thread.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] Add config option for z196 code generation.
Heiko Carstens [Mon, 25 Oct 2010 14:10:17 +0000 (16:10 +0200)]
[S390] Add config option for z196 code generation.

Add a kernel config option for the IBM zEnterprise 196. This will
produce faster code on newer compilers using the -march=z196 option.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] sysinfo: display capacity adjustment indicator
Heiko Carstens [Mon, 25 Oct 2010 14:10:16 +0000 (16:10 +0200)]
[S390] sysinfo: display capacity adjustment indicator

Display machine capacity adjustment indicator and capacity
change reason if available in /proc/sysinfo.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] add z196 instructions to kernel disassembler
Martin Schwidefsky [Mon, 25 Oct 2010 14:10:15 +0000 (16:10 +0200)]
[S390] add z196 instructions to kernel disassembler

Add the new instructions introduced with z196 to the kernel disassembler.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] add support for nonquiescing sske
Martin Schwidefsky [Mon, 25 Oct 2010 14:10:14 +0000 (16:10 +0200)]
[S390] add support for nonquiescing sske

Improve performance of the sske operation by using the nonquiescing
variant if the affected page has no mappings established. On machines
with no support for the new sske variant the mask bit will be ignored.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] store indication fault optimization
Martin Schwidefsky [Mon, 25 Oct 2010 14:10:13 +0000 (16:10 +0200)]
[S390] store indication fault optimization

Use the store indication bit in the translation exception code on
page faults to avoid the protection faults that immediatly follow
the page fault if the access has been a write.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] cpu hotplug/idle: move cpu_die call to enabled context
Heiko Carstens [Mon, 25 Oct 2010 14:10:12 +0000 (16:10 +0200)]
[S390] cpu hotplug/idle: move cpu_die call to enabled context

There is no difference if cpu_die is called from enabled or disabled
context. Except that the fast_gup code might be called via
cpu_die -> idle_task_exit -> __mm_drop -> crst_table_free. Which in
turn grabs and releases a spinlock using the _bh ops, which is not
allowed in irq disabled context, since spin_unlock_bh will
unconditionally enable interrupts again.
To get rid of the warning emitted by the softirq code just move the
code to enabled context.

In this case this doesn't fix a bug, we just get rid of a warning.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] lockless get_user_pages_fast()
Martin Schwidefsky [Mon, 25 Oct 2010 14:10:11 +0000 (16:10 +0200)]
[S390] lockless get_user_pages_fast()

Implement get_user_pages_fast without locking in the fastpath on s390.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] set ARCH_HAS_SG_CHAIN for s390
Christof Schmitt [Mon, 25 Oct 2010 14:10:10 +0000 (16:10 +0200)]
[S390] set ARCH_HAS_SG_CHAIN for s390

Set ARCH_HAS_SG_CHAIN for scatter lists on s390. Without this flag the
SCSI code limits the maximum number of segments, so set it to make
proper use of the FCP channel hardware.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] standardize Kbuild rules
Heiko Carstens [Mon, 25 Oct 2010 14:10:09 +0000 (16:10 +0200)]
[S390] standardize Kbuild rules

Introducing this Kbuild file allow us to:

make arch/s390/

And thus building all the core part of s390.
Same as on other architectures.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] dasd: let recovery cqr inherit flags from failed cqr
Stefan Weinhuber [Mon, 25 Oct 2010 14:10:08 +0000 (16:10 +0200)]
[S390] dasd: let recovery cqr inherit flags from failed cqr

The usual way to recover a failed DASD ECKD request (cqr) is to create
a new request with an appropriate recovery CCW program.  Certain
features, e.g. failfast, can be enabled per request and are stored in
the requests flags. These flags have to be copied from the failed to
the recovery request, to let the recovery request use the same
features as the original one.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] zero page cache synonyms
Martin Schwidefsky [Mon, 25 Oct 2010 14:10:07 +0000 (16:10 +0200)]
[S390] zero page cache synonyms

If the zero page is mapped to virtual user space addresses that differ
only in bit 2^12 or 2^13 we get L1 cache synonyms which can affect
performance. Follow the mips model and use multiple zero pages to avoid
the synonyms.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years agouwb: Orphan the UWB and WUSB subsystems
David Vrabel [Mon, 25 Oct 2010 13:05:36 +0000 (14:05 +0100)]
uwb: Orphan the UWB and WUSB subsystems

I'm no longer in a position to be the maintainer for the Ultra-Wide
Band (UWB) and Ceritified Wireless USB (WUSB) subsystems and no one else
has volunteered to take over.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
13 years agouwb: Remove the WLP subsystem and drivers
David Vrabel [Mon, 25 Oct 2010 12:57:32 +0000 (13:57 +0100)]
uwb: Remove the WLP subsystem and drivers

The only Wimedia LLC Protocol (WLP) hardware was an Intel i1480 chip
with a beta release of firmware that was never commercially available as
a product.  This hardware and firmware is no longer available as Intel
sold their UWB/WLP IP.  I also see little prospect of other WLP
capable hardware ever being available.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
13 years agoBlackfin: ppi/spi/twi headers: add missing __BFP undef
Mike Frysinger [Sun, 24 Oct 2010 18:13:31 +0000 (18:13 +0000)]
Blackfin: ppi/spi/twi headers: add missing __BFP undef

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: update defconfigs
Mike Frysinger [Sun, 24 Oct 2010 18:11:50 +0000 (18:11 +0000)]
Blackfin: update defconfigs

- enable pm for ADI boards
- drop security option as no one uses it
- enable uninitialized mmap for everyone
- disable wireless by default as no one uses it
- disable cfq io sched as noop is fine

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: bfin_twi.h: start a common TWI header
Mike Frysinger [Fri, 22 Oct 2010 05:11:21 +0000 (05:11 +0000)]
Blackfin: bfin_twi.h: start a common TWI header

Start one place for TWI definitions.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agonetdev: bfin_mac: push settings to platform resources
Sonic Zhang [Fri, 11 Jun 2010 10:44:22 +0000 (10:44 +0000)]
netdev: bfin_mac: push settings to platform resources

Move all the pin settings out of the Kconfig and into the platform
resources (MII vs RMII).  This clean up also lets us push out the
phy settings so that board porters may control the layout.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoMerge branch 'topic/hda' into for-linus
Takashi Iwai [Mon, 25 Oct 2010 08:40:05 +0000 (10:40 +0200)]
Merge branch 'topic/hda' into for-linus

13 years agoALSA: hda - Disable sticky PCM stream assignment for AD codecs
Takashi Iwai [Mon, 25 Oct 2010 08:37:11 +0000 (10:37 +0200)]
ALSA: hda - Disable sticky PCM stream assignment for AD codecs

The sticky PCM stream assignment introduced in 2.6.36 kernel seems
causing problems on AD codecs.  At some time later, the streaming no
longer works by unknown reason.  A simple workaround is to disable
sticky-assignment for these codecs.

Tested-by: Vasily Khoruzhick <anarsoul@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoMerge branch 'topic/asoc' into for-linus
Takashi Iwai [Mon, 25 Oct 2010 08:00:30 +0000 (10:00 +0200)]
Merge branch 'topic/asoc' into for-linus

Conflicts:
arch/powerpc/platforms/85xx/p1022_ds.c

13 years agoMerge branch 'topic/misc' into for-linus
Takashi Iwai [Mon, 25 Oct 2010 07:56:32 +0000 (09:56 +0200)]
Merge branch 'topic/misc' into for-linus

13 years agoMerge branch 'next' into for-linus
Dmitry Torokhov [Mon, 25 Oct 2010 05:11:17 +0000 (22:11 -0700)]
Merge branch 'next' into for-linus

13 years agoInput: wacom - specify Cinitq supported tools
Ping Cheng [Mon, 25 Oct 2010 04:53:40 +0000 (21:53 -0700)]
Input: wacom - specify Cinitq supported tools

Cintiq, being a display tablet, doesn't have mouse and associated BTN_s.
Make sure we do not specify them when registering Cintiq's input device
so that userland can retrieve the exact tool set the device supports.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: ab8500-ponkey - fix IRQ freeing in error path
Nicolas Kaiser [Mon, 25 Oct 2010 04:48:11 +0000 (21:48 -0700)]
Input: ab8500-ponkey - fix IRQ freeing in error path

Looks like an obvious typo to me.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agosh: i2c-sh7760: Replase from ctrl_* to __raw_*
Nobuhiro Iwamatsu [Fri, 22 Oct 2010 22:07:00 +0000 (07:07 +0900)]
sh: i2c-sh7760: Replase from ctrl_* to __raw_*

ctrl_* is deprecated. We should to use __raw_*.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agonfsd4: fix connection allocation in sequence()
J. Bruce Fields [Thu, 21 Oct 2010 21:17:31 +0000 (17:17 -0400)]
nfsd4: fix connection allocation in sequence()

We're doing an allocation under a spinlock, and ignoring the
possibility of allocation failure.

A better fix wouldn't require an unnecessary allocation in the common
case, but we'll leave that for later.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
13 years agoNFSv4.1: Use more sensible names for 'initialize_mountpoint'
Trond Myklebust [Thu, 21 Oct 2010 20:56:48 +0000 (16:56 -0400)]
NFSv4.1: Use more sensible names for 'initialize_mountpoint'

The initialize_mountpoint/uninitialise_mountpoint functions are really about
setting or clearing the layout driver to be used on this filesystem. Change
the names to the more descriptive 'set_layoutdriver/clear_layoutdriver'.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoNFSv4.1: pnfs: filelayout: add driver's LAYOUTGET and GETDEVICEINFO infrastructure
Andy Adamson [Wed, 20 Oct 2010 04:18:04 +0000 (00:18 -0400)]
NFSv4.1: pnfs: filelayout: add driver's LAYOUTGET and GETDEVICEINFO infrastructure

Implement the driver's io_ops->alloc_lseg and free_lseg functions,
which integrate into the deviceid cache and calls out to
nfs4_proc_getdeviceinfo when necessary.

Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Dean Hildebrand <dhildebz@umich.edu>
Signed-off-by: Marc Eshel <eshel@almaden.ibm.com>
Signed-off-by: Mike Sager <sager@netapp.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Ricardo Labiaga <ricardo.labiaga@netapp.com>
Signed-off-by: Tao Guo <guotao@nrchpc.ac.cn>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoNFSv4.1: pnfs: add LAYOUTGET and GETDEVICEINFO infrastructure
Andy Adamson [Wed, 20 Oct 2010 04:18:03 +0000 (00:18 -0400)]
NFSv4.1: pnfs: add LAYOUTGET and GETDEVICEINFO infrastructure

Add the ability to actually send LAYOUTGET and GETDEVICEINFO.  This also adds
in the machinery to handle layout state and the deviceid cache.  Note that
GETDEVICEINFO is not called directly by the generic layer.  Instead it
is called by the drivers while parsing the LAYOUTGET opaque data in response
to an unknown device id embedded therein.  RFC 5661 only encodes
device ids within the driver-specific opaque data.

Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Dean Hildebrand <dhildebz@umich.edu>
Signed-off-by: Marc Eshel <eshel@almaden.ibm.com>
Signed-off-by: Mike Sager <sager@netapp.com>
Signed-off-by: Ricardo Labiaga <ricardo.labiaga@netapp.com>
Signed-off-by: Tao Guo <guotao@nrchpc.ac.cn>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoNFS: client needs to maintain list of inodes with active layouts
Andy Adamson [Wed, 20 Oct 2010 04:18:02 +0000 (00:18 -0400)]
NFS: client needs to maintain list of inodes with active layouts

In particular, server reboot will invalidate all layouts.

Note that in order to have an active layout, we must get a successful response
from the server.  To avoid adding that machinery, this patch just includes a
stub that fakes up a successful return.  Since the layout is never referenced
for io, this is not a problem.

Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Dean Hildebrand <dhildebz@umich.edu>
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoNFS: create and destroy inode's layout cache
Benny Halevy [Wed, 20 Oct 2010 04:18:01 +0000 (00:18 -0400)]
NFS: create and destroy inode's layout cache

At the start of the io paths, try to grab the relevant layout
information.  This will initiate the inode's layout cache, but
stubs ensure the cache stays empty.

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Dean Hildebrand <dhildebz@umich.edu>
Signed-off-by: Marc Eshel <eshel@almaden.ibm.com>
Signed-off-by: Tao Guo <guotao@nrchpc.ac.cn>
Signed-off-by: Ricardo Labiaga <ricardo.labiaga@netapp.com>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoNFSv4.1: pnfs: filelayout: introduce minimal file layout driver
Dean Hildebrand [Wed, 20 Oct 2010 04:18:00 +0000 (00:18 -0400)]
NFSv4.1: pnfs: filelayout: introduce minimal file layout driver

This driver just registers itself and supplies trivial mount/umount functions.

Signed-off-by: Dean Hildebrand <dhildebz@umich.edu>
Signed-off-by: Marc Eshel <eshel@almaden.ibm.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoNFSv4.1: pnfs: full mount/umount infrastructure
Fred Isaman [Wed, 20 Oct 2010 04:17:59 +0000 (00:17 -0400)]
NFSv4.1: pnfs: full mount/umount infrastructure

Allow a module implementing a layout type to register, and
have its mount/umount routines called for filesystems that
the server declares support it.

Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Marc Eshel <eshel@almaden.ibm.com>
Signed-off-by: Andy Adamson<andros@netapp.com>
Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoNFS: set layout driver
Ricardo Labiaga [Wed, 20 Oct 2010 04:17:58 +0000 (00:17 -0400)]
NFS: set layout driver

Put in the infrastructure that uses information returned from the
server at mount to select a layout driver module.

In this patch, a stub is used that always returns "no driver found".

Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com>
Signed-off-by: Dean Hildebrand <dhildebz@umich.edu>
Signed-off-by: Marc Eshel <eshel@almaden.ibm.com>
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoNFS: ask for layouttypes during v4 fsinfo call
Andy Adamson [Wed, 20 Oct 2010 04:17:57 +0000 (00:17 -0400)]
NFS: ask for layouttypes during v4 fsinfo call

This information will be used to determine which layout driver,
if any, to use for subsequent IO on this filesystem.  Each driver
is assigned an integer id, with 0 reserved to indicate no driver.

The server can in theory return multiple ids.  However, our current
client implementation only notes the first entry and ignores the
rest.

Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoNFS: change stateid to be a union
Alexandros Batsakis [Wed, 20 Oct 2010 04:17:56 +0000 (00:17 -0400)]
NFS: change stateid to be a union

In NFSv4.1 the stateid consists of the other and seqid fields. For layout
processing we need to numerically compare the seqid value of layout stateids.
To do so, introduce a union to nfs4_stateid to switch between opaque(16 bytes)
and opaque(12 bytes) / __be32

Signed-off-by: Alexandros Batsakis <batsakis@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoNFSv4.1: pnfsd, pnfs: protocol level pnfs constants
Dean Hildebrand [Wed, 20 Oct 2010 04:17:55 +0000 (00:17 -0400)]
NFSv4.1: pnfsd, pnfs: protocol level pnfs constants

Use only layoutreturn constant for both returns and recalls.
(return_* works better for recall_type rather the other way around)

Signed-off-by: Dean Hildebrand <dhildebz@umich.edu>
Signed-off-by: Marc Eshel <eshel@almaden.ibm.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoSUNRPC: define xdr_decode_opaque_fixed
Benny Halevy [Wed, 20 Oct 2010 04:17:54 +0000 (00:17 -0400)]
SUNRPC: define xdr_decode_opaque_fixed

A helper for decoding a fixed length opaque value.
Returns a pointer to the next item in the xdr stream.

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoNFSD: remove duplicate NFS4_STATEID_SIZE
Andy Adamson [Wed, 20 Oct 2010 04:17:53 +0000 (00:17 -0400)]
NFSD: remove duplicate NFS4_STATEID_SIZE

Already accepted by Bruce

Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoSUNRPC: Cleanup duplicate assignment in rpcauth_refreshcred
Trond Myklebust [Sun, 24 Oct 2010 22:00:46 +0000 (18:00 -0400)]
SUNRPC: Cleanup duplicate assignment in rpcauth_refreshcred

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agonfs: fix unchecked value
Roman Borisov [Wed, 13 Oct 2010 12:54:51 +0000 (16:54 +0400)]
nfs: fix unchecked value

Return value of "decode_attr_bitmap()" was not checked;

Signed-off-by: Roman Borisov <ext-roman.borisov@nokia.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoAsk for time_delta during fsinfo probe
Ricardo Labiaga [Tue, 12 Oct 2010 23:30:06 +0000 (16:30 -0700)]
Ask for time_delta during fsinfo probe

Used by the client to determine if the server has a granular enough
time stamp.

Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoRevalidate caches on lock
Ricardo Labiaga [Tue, 12 Oct 2010 23:30:05 +0000 (16:30 -0700)]
Revalidate caches on lock

Instead of blindly zapping the caches, attempt to revalidate them if
the server has indicated that it uses high resolution timestamps.

NFSv4 should be able to always revalidate the cache since the
protocol requires the update of the change attribute on modification of
the data.  In reality, there are servers (the Linux NFS server
for example) that do not obey this requirement and use ctime as the
basis for change attribute.  Long term, the server needs to be fixed.
At this time, and to be on the safe side, continue zapping caches if
the server indicates that it does not have a high resolution timestamp.

Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoSUNRPC: After calling xprt_release(), we must restart from call_reserve
Trond Myklebust [Sun, 24 Oct 2010 21:17:31 +0000 (17:17 -0400)]
SUNRPC: After calling xprt_release(), we must restart from call_reserve

Rob Leslie reports seeing the following Oops after his Kerberos session
expired.

BUG: unable to handle kernel NULL pointer dereference at 00000058
IP: [<e186ed94>] rpcauth_refreshcred+0x11/0x12c [sunrpc]
*pde = 00000000
Oops: 0000 [#1]
last sysfs file: /sys/devices/platform/pc87360.26144/temp3_input
Modules linked in: autofs4 authenc esp4 xfrm4_mode_transport ipt_LOG ipt_REJECT xt_limit xt_state ipt_REDIRECT xt_owner xt_HL xt_hl xt_tcpudp xt_mark cls_u32 cls_tcindex sch_sfq sch_htb sch_dsmark geodewdt deflate ctr twofish_generic twofish_i586 twofish_common camellia serpent blowfish cast5 cbc xcbc rmd160 sha512_generic sha1_generic hmac crypto_null af_key rpcsec_gss_krb5 nfsd exportfs nfs lockd fscache nfs_acl auth_rpcgss sunrpc ip_gre sit tunnel4 dummy ext3 jbd nf_nat_irc nf_conntrack_irc nf_nat_ftp nf_conntrack_ftp iptable_mangle iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 iptable_filter ip_tables x_tables pc8736x_gpio nsc_gpio pc87360 hwmon_vid loop aes_i586 aes_generic sha256_generic dm_crypt cs5535_gpio serio_raw cs5535_mfgpt hifn_795x des_generic geode_rng rng_core led_class ext4 mbcache jbd2 crc16 dm_mirror dm_region_hash dm_log dm_snapshot dm_mod sd_mod crc_t10dif ide_pci_generic cs5536 amd74xx ide_core pata_cs5536 ata_generic libata usb_storage via_rhine mii scsi_mod btrfs zlib_deflate crc32c libcrc32c [last unloaded: scsi_wait_scan]

Pid: 12875, comm: sudo Not tainted 2.6.36-net5501 #1 /
EIP: 0060:[<e186ed94>] EFLAGS: 00010292 CPU: 0
EIP is at rpcauth_refreshcred+0x11/0x12c [sunrpc]
EAX: 00000000 EBX: defb13a0 ECX: 00000006 EDX: e18683b8
ESI: defb13a0 EDI: 00000000 EBP: 00000000 ESP: de571d58
 DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
Process sudo (pid: 12875, ti=de570000 task=decd1430 task.ti=de570000)
Stack:
 e186e008 00000000 defb13a0 0000000d deda6000 e1868f22 e196f12b defb13a0
<0> defb13d8 00000000 00000000 e186e0aa 00000000 defb13a0 de571dac 00000000
<0> e186956c de571e34 debea5c0 de571dc8 e186967a 00000000 debea5c0 de571e34
Call Trace:
 [<e186e008>] ? rpc_wake_up_next+0x114/0x11b [sunrpc]
 [<e1868f22>] ? call_decode+0x24a/0x5af [sunrpc]
 [<e196f12b>] ? nfs4_xdr_dec_access+0x0/0xa2 [nfs]
 [<e186e0aa>] ? __rpc_execute+0x62/0x17b [sunrpc]
 [<e186956c>] ? rpc_run_task+0x91/0x97 [sunrpc]
 [<e186967a>] ? rpc_call_sync+0x40/0x5b [sunrpc]
 [<e1969ca2>] ? nfs4_proc_access+0x10a/0x176 [nfs]
 [<e19572fa>] ? nfs_do_access+0x2b1/0x2c0 [nfs]
 [<e186ed61>] ? rpcauth_lookupcred+0x62/0x84 [sunrpc]
 [<e19573b6>] ? nfs_permission+0xad/0x13b [nfs]
 [<c0177824>] ? exec_permission+0x15/0x4b
 [<c0177fbd>] ? link_path_walk+0x4f/0x456
 [<c017867d>] ? path_walk+0x4c/0xa8
 [<c0179678>] ? do_path_lookup+0x1f/0x68
 [<c017a3fb>] ? user_path_at+0x37/0x5f
 [<c016359c>] ? handle_mm_fault+0x229/0x55b
 [<c0170a2d>] ? sys_faccessat+0x93/0x146
 [<c0170aef>] ? sys_access+0xf/0x13
 [<c02cf615>] ? syscall_call+0x7/0xb
Code: 0f 94 c2 84 d2 74 09 8b 44 24 0c e8 6a e9 8b de 83 c4 14 89 d8 5b 5e 5f 5d c3 55 57 56 53 83 ec 1c fc 89 c6 8b 40 10 89 44 24 04 <8b> 58 58 85 db 0f 85 d4 00 00 00 0f b7 46 70 8b 56 20 89 c5 83
EIP: [<e186ed94>] rpcauth_refreshcred+0x11/0x12c [sunrpc] SS:ESP 0068:de571d58
CR2: 0000000000000058

This appears to be caused by the function rpc_verify_header() first
calling xprt_release(), then doing a call_refresh. If we release the
transport slot, we should _always_ jump back to call_reserve before
calling anything else.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@kernel.org
13 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Linus Torvalds [Sun, 24 Oct 2010 20:41:39 +0000 (13:41 -0700)]
Merge branch 'for-next' of git://git./linux/kernel/git/jikos/trivial

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
  Update broken web addresses in arch directory.
  Update broken web addresses in the kernel.
  Revert "drivers/usb: Remove unnecessary return's from void functions" for musb gadget
  Revert "Fix typo: configuation => configuration" partially
  ida: document IDA_BITMAP_LONGS calculation
  ext2: fix a typo on comment in ext2/inode.c
  drivers/scsi: Remove unnecessary casts of private_data
  drivers/s390: Remove unnecessary casts of private_data
  net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data
  drivers/infiniband: Remove unnecessary casts of private_data
  drivers/gpu/drm: Remove unnecessary casts of private_data
  kernel/pm_qos_params.c: Remove unnecessary casts of private_data
  fs/ecryptfs: Remove unnecessary casts of private_data
  fs/seq_file.c: Remove unnecessary casts of private_data
  arm: uengine.c: remove C99 comments
  arm: scoop.c: remove C99 comments
  Fix typo configue => configure in comments
  Fix typo: configuation => configuration
  Fix typo interrest[ing|ed] => interest[ing|ed]
  Fix various typos of valid in comments
  ...

Fix up trivial conflicts in:
drivers/char/ipmi/ipmi_si_intf.c
drivers/usb/gadget/rndis.c
net/irda/irnet/irnet_ppp.c

13 years agoMerge branch 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/edac
Linus Torvalds [Sun, 24 Oct 2010 20:06:57 +0000 (13:06 -0700)]
Merge branch 'devel' of git://git./linux/kernel/git/mchehab/edac

* 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/edac: (25 commits)
  i7300_edac: Properly initialize per-csrow memory size
  V4L/DVB: i7300_edac: better initialize page counts
  MAINTAINERS: Add maintainer for i7300-edac driver
  i7300-edac: CodingStyle cleanup
  i7300_edac: Improve comments
  i7300_edac: Cleanup: reorganize the file contents
  i7300_edac: Properly detect channel on CE errors
  i7300_edac: enrich FBD error info for corrected errors
  i7300_edac: enrich FBD error info for fatal errors
  i7300_edac: pre-allocate a buffer used to prepare err messages
  i7300_edac: Fix MTR x4/x8 detection logic
  i7300_edac: Make the debug messages coherent with the others
  i7300_edac: Cleanup: remove get_error_info logic
  i7300_edac: Add a code to cleanup error registers
  i7300_edac: Add support for reporting FBD errors
  i7300_edac: Properly detect the type of error correction
  i7300_edac: Detect if the device is on single mode
  i7300_edac: Adds detection for enhanced scrub mode on x8
  i7300_edac: Clear the error bit after reading
  i7300_edac: Add error detection code for global errors
  ...

13 years agoRevert "block: fix accounting bug on cross partition merges"
Jens Axboe [Sun, 24 Oct 2010 20:06:02 +0000 (22:06 +0200)]
Revert "block: fix accounting bug on cross partition merges"

This reverts commit 7681bfeeccff5efa9eb29bf09249a3c400b15327.

Conflicts:

include/linux/genhd.h

It has numerous issues with the cleanup path and non-elevator
devices. Revert it for now so we can come up with a clean
version without rushing things.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg...
Linus Torvalds [Sun, 24 Oct 2010 19:47:55 +0000 (12:47 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/penberg/slab-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6: (27 commits)
  SLUB: Fix memory hotplug with !NUMA
  slub: Move functions to reduce #ifdefs
  slub: Enable sysfs support for !CONFIG_SLUB_DEBUG
  SLUB: Optimize slab_free() debug check
  slub: Move NUMA-related functions under CONFIG_NUMA
  slub: Add lock release annotation
  slub: Fix signedness warnings
  slub: extract common code to remove objects from partial list without locking
  SLUB: Pass active and inactive redzone flags instead of boolean to debug functions
  slub: reduce differences between SMP and NUMA
  Revert "Slub: UP bandaid"
  percpu: clear memory allocated with the km allocator
  percpu: use percpu allocator on UP too
  percpu: reduce PCPU_MIN_UNIT_SIZE to 32k
  vmalloc: pcpu_get/free_vm_areas() aren't needed on UP
  SLUB: Fix merged slab cache names
  Slub: UP bandaid
  slub: fix SLUB_RESILIENCY_TEST for dynamic kmalloc caches
  slub: Fix up missing kmalloc_cache -> kmem_cache_node case for memoryhotplug
  slub: Add dummy functions for the !SLUB_DEBUG case
  ...

13 years agoMerge branch 'kvm-updates/2.6.37' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Sun, 24 Oct 2010 19:47:25 +0000 (12:47 -0700)]
Merge branch 'kvm-updates/2.6.37' of git://git./virt/kvm/kvm

* 'kvm-updates/2.6.37' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (321 commits)
  KVM: Drop CONFIG_DMAR dependency around kvm_iommu_map_pages
  KVM: Fix signature of kvm_iommu_map_pages stub
  KVM: MCE: Send SRAR SIGBUS directly
  KVM: MCE: Add MCG_SER_P into KVM_MCE_CAP_SUPPORTED
  KVM: fix typo in copyright notice
  KVM: Disable interrupts around get_kernel_ns()
  KVM: MMU: Avoid sign extension in mmu_alloc_direct_roots() pae root address
  KVM: MMU: move access code parsing to FNAME(walk_addr) function
  KVM: MMU: audit: check whether have unsync sps after root sync
  KVM: MMU: audit: introduce audit_printk to cleanup audit code
  KVM: MMU: audit: unregister audit tracepoints before module unloaded
  KVM: MMU: audit: fix vcpu's spte walking
  KVM: MMU: set access bit for direct mapping
  KVM: MMU: cleanup for error mask set while walk guest page table
  KVM: MMU: update 'root_hpa' out of loop in PAE shadow path
  KVM: x86 emulator: Eliminate compilation warning in x86_decode_insn()
  KVM: x86: Fix constant type in kvm_get_time_scale
  KVM: VMX: Add AX to list of registers clobbered by guest switch
  KVM guest: Move a printk that's using the clock before it's ready
  KVM: x86: TSC catchup mode
  ...

13 years agoMerge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvar...
Linus Torvalds [Sun, 24 Oct 2010 19:46:24 +0000 (12:46 -0700)]
Merge branch 'i2c-for-linus' of git://git./linux/kernel/git/jdelvare/staging

* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  i2c-viapro: Don't log nacks
  i2c/pca954x: Remove __devinit and __devexit from probe and remove functions
  MAINTAINERS: Add maintainer for PCA9541 I2C bus master selector driver
  i2c/mux: Driver for PCA9541 I2C Master Selector
  i2c: Optimize function i2c_detect()
  i2c: Discard warning message on device instantiation from user-space
  i2c-amd8111: Add proper error handling
  i2c: Change to new flag variable
  i2c: Remove unneeded inclusions of <linux/i2c-id.h>
  i2c: Let i2c_parent_is_i2c_adapter return the parent adapter
  i2c: Simplify i2c_parent_is_i2c_adapter
  i2c-pca-platform: Change device name of request_irq
  i2c: Fix Kconfig dependencies

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Sun, 24 Oct 2010 19:44:59 +0000 (12:44 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/hid

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (47 commits)
  HID: fix mismerge in hid-lg
  HID: hidraw: fix window in hidraw_release
  HID: hid-sony: override usbhid_output_raw_report for Sixaxis
  HID: add absolute axis resolution calculation
  HID: force feedback support for Logitech RumblePad gamepad
  HID: support STmicroelectronics and Sitronix with hid-stantuml driver
  HID: magicmouse: Adjust major / minor axes to scale
  HID: Fix for problems with eGalax/DWAV multi-touch-screen
  HID: waltop: add support for Waltop Slim Tablet 12.1 inch
  HID: add NOGET quirk for AXIS 295 Video Surveillance Joystick
  HID: usbhid: remove unused hiddev_driver
  HID: magicmouse: Use hid-input parsing rather than bypassing it
  HID: trivial formatting fix
  HID: Add support for Logitech Speed Force Wireless gaming wheel
  HID: don't Send Feature Reports on Interrupt Endpoint
  HID: 3m: Adjust major / minor axes to scale
  HID: 3m: Correct touchscreen emulation
  HID: 3m: Convert to MT slots
  HID: 3m: Output proper orientation range
  HID: 3m: Adjust to sequential MT HID protocol
  ...

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Sun, 24 Oct 2010 19:44:34 +0000 (12:44 -0700)]
Merge git://git./linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: Makefile - replace the use of <module>-objs with <module>-y
  crypto: hifn_795x - use cancel_delayed_work_sync()
  crypto: talitos - sparse check endian fixes
  crypto: talitos - fix checkpatch warning
  crypto: talitos - fix warning: 'alg' may be used uninitialized in this function
  crypto: cryptd - Adding the AEAD interface type support to cryptd
  crypto: n2_crypto - Niagara2 driver needs to depend upon CRYPTO_DES
  crypto: Kconfig - update broken web addresses
  crypto: omap-sham - Adjust DMA parameters
  crypto: fips - FIPS requires algorithm self-tests
  crypto: omap-aes - OMAP2/3 AES hw accelerator driver
  crypto: updates to enable omap aes
  padata: add missing __percpu markup in include/linux/padata.h
  MAINTAINERS: Add maintainer entries for padata/pcrypt

13 years agoNFSv4: Fix up the 'dircount' hint in encode_readdir
Trond Myklebust [Sun, 24 Oct 2010 16:11:42 +0000 (12:11 -0400)]
NFSv4: Fix up the 'dircount' hint in encode_readdir

Also ensure we only ask for either fileid or mounted_on_fileid in the
readdirplus case too...

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoNFSv4: Clean up nfs4_decode_dirent
Trond Myklebust [Sun, 24 Oct 2010 15:52:55 +0000 (11:52 -0400)]
NFSv4: Clean up nfs4_decode_dirent

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoNFSv4: nfs4_decode_dirent must clear entry->fattr->valid
Trond Myklebust [Sun, 24 Oct 2010 17:14:02 +0000 (13:14 -0400)]
NFSv4: nfs4_decode_dirent must clear entry->fattr->valid

Otherwise, we may end up reading uninitialised data from the resulting
struct nfs_fattr.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoMerge branch 'master' into for-linus
Pekka Enberg [Sun, 24 Oct 2010 16:57:05 +0000 (19:57 +0300)]
Merge branch 'master' into for-linus

Conflicts:
include/linux/percpu.h
mm/percpu.c

13 years agoi2c-viapro: Don't log nacks
Jean Delvare [Sun, 24 Oct 2010 16:16:59 +0000 (18:16 +0200)]
i2c-viapro: Don't log nacks

Transactions not acked can happen every now and then, in particular
during device detection, and various transaction types can be used for
this purpose. So stop logging this event, except when debugging is
enabled. This is what other similar drivers (e.g. i2c-i801 or
i2c-piix4) do.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agoi2c/pca954x: Remove __devinit and __devexit from probe and remove functions
Guenter Roeck [Sun, 24 Oct 2010 16:16:59 +0000 (18:16 +0200)]
i2c/pca954x: Remove __devinit and __devexit from probe and remove functions

The underlying I2C adapter may or may not be present when this driver
gets initialized, and may disappear later, so there is no safe time at
which the probe and remove functions can be discarded.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agoMAINTAINERS: Add maintainer for PCA9541 I2C bus master selector driver
Guenter Roeck [Sun, 24 Oct 2010 16:16:59 +0000 (18:16 +0200)]
MAINTAINERS: Add maintainer for PCA9541 I2C bus master selector driver

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agoi2c/mux: Driver for PCA9541 I2C Master Selector
Guenter Roeck [Sun, 24 Oct 2010 16:16:58 +0000 (18:16 +0200)]
i2c/mux: Driver for PCA9541 I2C Master Selector

This patch adds support for PCA9541, an I2C Bus Master Selector.
The driver is modeled as single channel I2C Multiplexer to be able to utilize
the I2C multiplexer framework.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Tom Grennan <tom.grennan@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
13 years agoi2c: Optimize function i2c_detect()
Jean Delvare [Sun, 24 Oct 2010 16:16:58 +0000 (18:16 +0200)]
i2c: Optimize function i2c_detect()

Check the class flags before allocating the temporary i2c_client
structure, to avoid allocating it when we don't need it.

Also optimize the inner loop a bit.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
13 years agoi2c: Discard warning message on device instantiation from user-space
Jean Delvare [Sun, 24 Oct 2010 16:16:58 +0000 (18:16 +0200)]
i2c: Discard warning message on device instantiation from user-space

The "new_device" sysfs interface has been there for quite some time
now, nobody complained about it so it must be good enough. Time to
remove the warning and call it stable.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Michael Lawnick <ml.lawnick@gmx.de>
13 years agoi2c-amd8111: Add proper error handling
Julia Lawall [Sun, 24 Oct 2010 16:16:58 +0000 (18:16 +0200)]
i2c-amd8111: Add proper error handling

The functions the functions amd_ec_wait_write and amd_ec_wait_read have an
unsigned return type, but return a negative constant to indicate an error
condition.

A sematic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@exists@
identifier f;
constant C;
@@

 unsigned f(...)
 { <+...
*  return -C;
 ...+> }
// </smpl>

Fixing amd_ec_wait_write and amd_ec_wait_read leads to the need to adjust
the return type of the functions amd_ec_write and amd_ec_read, which are
the only functions that call amd_ec_wait_write and amd_ec_wait_read.
amd_ec_write and amd_ec_read, in turn, are only called from within the
function amd8111_access, which already returns a signed typed value.  Each
of the calls to amd_ec_write and amd_ec_read are updated using the
following semantic patch:

// <smpl>
@@
@@

+ status = amd_ec_write
- amd_ec_write
  (...);
+ if (status) return status;

@@
@@

+ status = amd_ec_read
- amd_ec_read
  (...);
+ if (status) return status;
// </smpl>

The patch also adds the declaration of the status variable.

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agoi2c: Change to new flag variable
matt mooney [Sun, 24 Oct 2010 16:16:58 +0000 (18:16 +0200)]
i2c: Change to new flag variable

Replace EXTRA_CFLAGS with ccflags-y.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agoi2c: Remove unneeded inclusions of <linux/i2c-id.h>
Jean Delvare [Sun, 24 Oct 2010 16:16:58 +0000 (18:16 +0200)]
i2c: Remove unneeded inclusions of <linux/i2c-id.h>

These drivers don't use anything which is defined in <linux/i2c-id.h>.
This header file was never meant to be included directly anyway, and
will be deleted soon.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: Dave Airlie <airlied@linux.ie>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
13 years agoi2c: Let i2c_parent_is_i2c_adapter return the parent adapter
Jean Delvare [Sun, 24 Oct 2010 16:16:57 +0000 (18:16 +0200)]
i2c: Let i2c_parent_is_i2c_adapter return the parent adapter

This makes the calling site's code clearer IMHO.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Michael Lawnick <ml.lawnick@gmx.de>
13 years agoi2c: Simplify i2c_parent_is_i2c_adapter
Jean Delvare [Sun, 24 Oct 2010 16:16:57 +0000 (18:16 +0200)]
i2c: Simplify i2c_parent_is_i2c_adapter

Only i2c devices can have their type set to i2c_adapter_type, so
testing the bus type is redundant.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Michael Lawnick <ml.lawnick@gmx.de>
13 years agoi2c-pca-platform: Change device name of request_irq
Nobuhiro Iwamatsu [Sun, 24 Oct 2010 16:16:57 +0000 (18:16 +0200)]
i2c-pca-platform: Change device name of request_irq

i2c->adap.name shouldn't be used in request_irq.
Instead the driver name "i2c-pca-platform" should be used.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: stable@kernel.org
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 years agoi2c: Fix Kconfig dependencies
Jean Delvare [Sun, 24 Oct 2010 16:16:57 +0000 (18:16 +0200)]
i2c: Fix Kconfig dependencies

drivers/i2c/algos/Kconfig makes all the algorithms dependent on
!I2C_HELPER_AUTO, which triggers a Kconfig warning about broken
dependencies when some driver selects one of the algorithms. Ideally
we would make only the prompts dependent on !I2C_HELPER_AUTO, however
Kconfig doesn't currently support that. So we have to redefine the
symbols separately for the I2C_HELPER_AUTO=y case.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Michal Marek <mmarek@suse.cz>
13 years agoi7core_edac: return -ENODEV when devices were already probed
Mauro Carvalho Chehab [Sun, 24 Oct 2010 13:36:19 +0000 (11:36 -0200)]
i7core_edac: return -ENODEV when devices were already probed

Due to the nature of i7core, we need to probe and attach all PCI
devices used by this driver during the first time probe is called.
However, PCI core will call the probe routine one time for each CPU
socket. If we return -EINVAL to those calls, it would seem that the
driver fails, when, in fact, there's no more devices left to initialize.

Changing the return code to -ENODEV solves this issue.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoi7core_edac: properly terminate pci_dev_table
Mauro Carvalho Chehab [Sun, 24 Oct 2010 13:12:28 +0000 (11:12 -0200)]
i7core_edac: properly terminate pci_dev_table

At pci_xeon_fixup(), it waits for a null-terminated table, while at
i7core_get_all_devices, it just do a for 0..ARRAY_SIZE. As other tables
are zero-terminated, change it to be terminate with 0 as well, and fixes
a bug where it may be running out of the table elements.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoi7core_edac: Avoid PCI refcount to reach zero on successive load/reload
Mauro Carvalho Chehab [Sat, 21 Aug 2010 11:52:41 +0000 (08:52 -0300)]
i7core_edac: Avoid PCI refcount to reach zero on successive load/reload

That's a nasty bug that took me a lot of time to track, and whose
solution took just one line to solve. The best fragrances and the worse
poisons are shipped on the smalest bottles.

The drivers/pci/quick.c implements the pci_get_device function. The normal
behavior is that you call it, the function returns you a pdev pointer
and increment pdev->kobj.kref.refcount of the pci device. However,
if you want to keep searching an object, you need to pass the previous
pdev function to the search.

When you use a not null pointer to pdev "from" field, pci_get_device
will decrement pdev->kobj.kref.refcount, assuming that the driver won't
be using the previous pdev.

The solution is simple: we just need to call pci_dev_get() manually,
for the pdev's that the driver will actually use.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoi7core_edac: Fix refcount error at PCI devices
Mauro Carvalho Chehab [Sat, 21 Aug 2010 04:03:52 +0000 (01:03 -0300)]
i7core_edac: Fix refcount error at PCI devices

Probably due to a bug or some testing logic at PCI level, device
refcount for <bus>:00.0 device is decremented at the end of the
pci_get_device, made by i7core_get_all_devices(). The fact is that
the first versions of the driver relied on those devices to probe
for Nehalem, but the current versions don't use it at all.

So, let's just remove those devices from the driver, making it simpler
and fixing the bug.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoi7core_edac: it is safe to i7core_unregister_mci() when mci=NULL
Mauro Carvalho Chehab [Fri, 20 Aug 2010 18:39:38 +0000 (15:39 -0300)]
i7core_edac: it is safe to i7core_unregister_mci() when mci=NULL

i7core_unregister_mci() checks internally when mci=NULL. There's no
need to test it outside.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoi7core_edac: Fix an oops at i7core probe
Mauro Carvalho Chehab [Fri, 20 Aug 2010 15:48:26 +0000 (12:48 -0300)]
i7core_edac: Fix an oops at i7core probe

changeset c91d57ba9ce5b5c93a7077e2f72510eb1f9131c4 moved the init
of the priv pointer to the end of the probe routine. However, we need
them before that, otherwise, we hit an OOPS:

[   67.743453] EDAC DEBUG: mci_bind_devs: Associated fn 0.0, dev = ffff88011b46e000, socket 0
[   67.751861] BUG: unable to handle kernel NULL pointer dereference at 0000000000000010
[   67.759685] IP: [<ffffffffa017e484>] i7core_probe+0x979/0x130c [i7core_edac]
[   67.766721] PGD 10bd38067 PUD 10bd37067 PMD 0
[   67.771178] Oops: 0000 [#1] SMP
[   67.774414] last sysfs file: /sys/devices/system/cpu/cpu1/cache/index2/shared_cpu_map
[   67.782213] CPU 1
[   67.784042] Modules linked in: i7core_edac(+) edac_core cpufreq_ondemand binfmt_misc dm_multipath video output pci_slot snd_hda_codd

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoi7core_edac: Remove unused member channels in i7core_pvt
Hidetoshi Seto [Fri, 20 Aug 2010 07:33:10 +0000 (04:33 -0300)]
i7core_edac: Remove unused member channels in i7core_pvt

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoi7core_edac: Remove unused arg csrow from get_dimm_config
Hidetoshi Seto [Fri, 20 Aug 2010 07:32:56 +0000 (04:32 -0300)]
i7core_edac: Remove unused arg csrow from get_dimm_config

A local is enough.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoi7core_edac: Reduce args of i7core_register_mci
Hidetoshi Seto [Fri, 20 Aug 2010 07:32:45 +0000 (04:32 -0300)]
i7core_edac: Reduce args of i7core_register_mci

We can check the number of channels in i7core_register_mci.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoi7core_edac: Introduce i7core_unregister_mci
Hidetoshi Seto [Fri, 20 Aug 2010 07:32:33 +0000 (04:32 -0300)]
i7core_edac: Introduce i7core_unregister_mci

In i7core_probe, when setup of mci for 2nd or later socket failed,
we should cleanup prepared mci for 1st socket or so before "put" of
all devices.

So let have i7core_unregister_mci that can be shared between here
and i7core_remove.

While here fix a typo "hanler".

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoi7core_edac: Use saved pointers
Hidetoshi Seto [Fri, 20 Aug 2010 07:32:05 +0000 (04:32 -0300)]
i7core_edac: Use saved pointers

We already have saved pointers.  Use shorter ones.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoi7core_edac: Check probe counter in i7core_remove
Hidetoshi Seto [Fri, 20 Aug 2010 07:29:47 +0000 (04:29 -0300)]
i7core_edac: Check probe counter in i7core_remove

Prevent i7core_remove from running multiple times.
Otherwise value proved will be negative and something will be wrong.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoi7core_edac: Call pci_dev_put() when alloc_i7core_dev() failed
Hidetoshi Seto [Fri, 20 Aug 2010 07:28:51 +0000 (04:28 -0300)]
i7core_edac: Call pci_dev_put() when alloc_i7core_dev()  failed

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoi7core_edac: Fix error path of i7core_register_mci
Hidetoshi Seto [Fri, 20 Aug 2010 07:28:40 +0000 (04:28 -0300)]
i7core_edac: Fix error path of i7core_register_mci

Release resources properly.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoi7core_edac: Fix order of lines in i7core_register_mci
Hidetoshi Seto [Fri, 20 Aug 2010 07:28:25 +0000 (04:28 -0300)]
i7core_edac: Fix order of lines in i7core_register_mci

The flag is_registered is not initialized until mci_bind_devs()
is called.  Refer it properly.

The mci->dev and mci->edac_check is required in edac_mc_add_mc(),
so prepare them just before the call.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoi7core_edac: Always do get/put for all devices
Hidetoshi Seto [Fri, 20 Aug 2010 07:28:14 +0000 (04:28 -0300)]
i7core_edac: Always do get/put for all devices

We already do 'get' for all sockets at once. So do 'put' in the
same way.

And let args of the 'get' function to void since it handles
only the single, static and known size table pci_dev_table[].

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoi7core_edac: Introduce i7core_pci_ctl_create/release
Hidetoshi Seto [Fri, 20 Aug 2010 07:25:18 +0000 (04:25 -0300)]
i7core_edac: Introduce i7core_pci_ctl_create/release

Have a couple of method.
while here sort out lines in the i7core_register_mci() a bit.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoi7core_edac: Introduce free_i7core_dev
Hidetoshi Seto [Fri, 20 Aug 2010 07:25:00 +0000 (04:25 -0300)]
i7core_edac: Introduce free_i7core_dev

Have a method to make a couple with alloc_i7core_dev() previously
introduced.  Using in pair will help proper resource handling.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoi7core_edac: Introduce alloc_i7core_dev
Hidetoshi Seto [Fri, 20 Aug 2010 07:24:44 +0000 (04:24 -0300)]
i7core_edac: Introduce alloc_i7core_dev

It's nice to have a method for a single purpose.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>