GitHub/LineageOS/android_kernel_motorola_exynos9610.git
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Linus Torvalds [Thu, 20 Mar 2008 17:20:07 +0000 (10:20 -0700)]
Merge git://git./linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] a100u2w: fix bitmap lookup routine
  [SCSI] fix media change events for polled devices
  [SCSI] sd, sr: do not emit change event at device add
  [SCSI] mpt fusion: Power Management fixes for MPT SAS PCI-E controllers
  [SCSI] gdth: Allocate sense_buffer to prevent NULL pointer dereference
  [SCSI] arcmsr: fix iounmap error for Type B adapter
  [SCSI] isd200: Allocate sense_buffer for hacked up scsi_cmnd
  [SCSI] fix bsg queue oops with iscsi logout
  [SCSI] Fix dependency problems in SCSI drivers
  [SCSI] advansys: Fix bug in AdvLoadMicrocode

16 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Thu, 20 Mar 2008 16:50:21 +0000 (09:50 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 4872/1: Replaces buggy macro in S3C2410 irq include
  [ARM] 4870/1: fix signal return code when enable CONFIG_OABI_COMPAT
  [ARM] 4869/1: ARM: OMAP: Fix compile for mcbsp
  [ARM] 4865/1: Register the F75375 device in the GLAN Tank platform code
  [ARM] 4864/1: Enable write buffer coalescing on IOP
  [ARM] 4863/1: AT91: CAP9 USART definitions for early debug
  [ARM] 4861/1: AT91: Update maintainer email address (again)
  ARM: OMAP1: Fix typo in OMAP1 MPU clock source initialization
  ARM: OMAP: Fix DMA CLINK mask, clear spurious interrupt
  ARM: OMAP: Fix chain_a_transfer return value
  ARM: OMAP: Fix missing makefile options
  ARM: OMAP: Fix GPIO IRQ unmask
  ARM: OMAP: Fix clockevent support for hrtimers

16 years agoMerge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Thu, 20 Mar 2008 16:48:49 +0000 (09:48 -0700)]
Merge branch 'for-linus' of git://git390.osdl.marist.edu/linux-2.6

* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] futex: let futex_atomic_cmpxchg_pt survive early functional tests.

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
Linus Torvalds [Thu, 20 Mar 2008 16:48:15 +0000 (09:48 -0700)]
Merge git://git./linux/kernel/git/mchehab/v4l-dvb

* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
  V4L/DVB (7367): bug #10211: Fix depencencies for cx2341x
  V4L/DVB (7362): tvp5150.c: logical-bitwise and confusion
  V4L/DVB (7334): usb video: add a device link to usbvideo devices, else hal will ignore them
  V4L/DVB (7330): V4L1 - fix v4l_compat_translate_ioctl possible NULL deref
  V4L/DVB (7328): usb/opera1.c: fix a memory leak
  V4L/DVB (7291): em28xx: correct use of and fix
  V4L/DVB (7285): em28xx: Correct use of ! and &
  V4L/DVB (7279): ivtv: Add missing sg_init_table()
  V4L/DVB (7268): saa7134: fix: tuner should be loaded before calling saa7134_board_init2()
  V4L/DVB (7267): cx88: Fix: Loads tuner module before sending commands to it
  V4L/DVB (7251): VIDEO_VIVI must depend on VIDEO_DEV
  V4L/DVB (7242): ivtv: fix for yuv filter table check
  V4L/DVB (7236): bttv: struct member initialized twice
  V4L/DVB (7228): saa7134: fix FM radio support for the Pinnacle PCTV 110i

16 years agofile capabilities: remove cap_task_kill()
Serge Hallyn [Fri, 29 Feb 2008 15:14:57 +0000 (15:14 +0000)]
file capabilities: remove cap_task_kill()

The original justification for cap_task_kill() was as follows:

check_kill_permission() does appropriate uid equivalence checks.
However with file capabilities it becomes possible for an
unprivileged user to execute a file with file capabilities
resulting in a more privileged task with the same uid.

However now that cap_task_kill() always returns 0 (permission
granted) when p->uid==current->uid, the whole hook is worthless,
and only likely to create more subtle problems in the corner cases
where it might still be called but return -EPERM.  Those cases
are basically when uids are different but euid/suid is equivalent
as per the check in check_kill_permission().

One example of a still-broken application is 'at' for non-root users.

This patch removes cap_task_kill().

Signed-off-by: Serge Hallyn <serge@hallyn.com>
Acked-by: Andrew G. Morgan <morgan@kernel.org>
Earlier-version-tested-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[S390] futex: let futex_atomic_cmpxchg_pt survive early functional tests.
Heiko Carstens [Thu, 20 Mar 2008 16:33:38 +0000 (17:33 +0100)]
[S390] futex: let futex_atomic_cmpxchg_pt survive early functional tests.

a0c1e9073ef7428a14309cba010633a6cd6719ea "futex: runtime enable pi and
robust functionality" introduces a test wether futex in atomic stuff
works or not.
It does that by writing to address 0 of the kernel address space. This
will crash on older machines where addressing mode switching is enabled
but where the mvcos instruction is not available. Page table walking is
done by hand and therefore the code tries to access current->mm which
is NULL.
Therefore add an extra check, so we survive the early test.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
16 years agoMerge branch 'omap-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/tmlind/linux...
Russell King [Thu, 20 Mar 2008 15:59:51 +0000 (15:59 +0000)]
Merge branch 'omap-fixes' of /linux/kernel/git/tmlind/linux-omap-2.6 into m

* 'omap-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
  ARM: OMAP1: Fix typo in OMAP1 MPU clock source initialization
  ARM: OMAP: Fix DMA CLINK mask, clear spurious interrupt
  ARM: OMAP: Fix chain_a_transfer return value
  ARM: OMAP: Fix missing makefile options
  ARM: OMAP: Fix GPIO IRQ unmask
  ARM: OMAP: Fix clockevent support for hrtimers

16 years ago[ARM] 4872/1: Replaces buggy macro in S3C2410 irq include
Davide Rizzo [Wed, 19 Mar 2008 12:51:48 +0000 (13:51 +0100)]
[ARM] 4872/1: Replaces buggy macro in S3C2410 irq include

This is a bug correction for a macro that generated wrong results.
Nobody used it in official kernel tree, my driver did.

Signed-off-by: Davide Rizzo <davide@elpa.it>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 4870/1: fix signal return code when enable CONFIG_OABI_COMPAT
janboe [Wed, 19 Mar 2008 02:34:23 +0000 (03:34 +0100)]
[ARM] 4870/1: fix signal return code when enable CONFIG_OABI_COMPAT

fix signal return code when enable CONFIG_OABI_COMPAT

Signed-off-by: Janboe Ye <janboe.ye@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 4869/1: ARM: OMAP: Fix compile for mcbsp
Tony Lindgren [Mon, 17 Mar 2008 12:01:07 +0000 (13:01 +0100)]
[ARM] 4869/1: ARM: OMAP: Fix compile for mcbsp

Until DSP MMU code is merged, dsp_request_mem() does not exist.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 4865/1: Register the F75375 device in the GLAN Tank platform code
Gordon Farquharson [Fri, 14 Mar 2008 03:07:46 +0000 (04:07 +0100)]
[ARM] 4865/1: Register the F75375 device in the GLAN Tank platform code

This patch adds the code required to register the F75375 device on the
GLAN Tank.

Signed-off-by: Gordon Farquharson <gordonfarquharson@gmail.com>
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 4864/1: Enable write buffer coalescing on IOP
Arnaud Patard [Thu, 13 Mar 2008 08:53:21 +0000 (09:53 +0100)]
[ARM] 4864/1: Enable write buffer coalescing on IOP

Some bootloaders are disabling write buffer coalescing. Enable it back
under linux.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 4863/1: AT91: CAP9 USART definitions for early debug
Andrew Victor [Wed, 12 Mar 2008 21:33:57 +0000 (22:33 +0100)]
[ARM] 4863/1: AT91: CAP9 USART definitions for early debug

Define AT91_USART0, 1, 2 so the selection of the UART for early kernel
messages works.
   (See commit fa3218d8594869b38b1a170ea36d176ac455b897).

Replace AT91_SHDC with AT91_SHDWC to be consistent with other AT91 platforms.

Signed-off-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 4861/1: AT91: Update maintainer email address (again)
Andrew Victor [Wed, 12 Mar 2008 20:29:09 +0000 (21:29 +0100)]
[ARM] 4861/1: AT91: Update maintainer email address (again)

Change email address of AT91 maintainer.

This reverts the incorrect change in commit
6650e0a517bbfa1c47aa3da6b3562fcb1a066c63

Signed-off-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years agoV4L/DVB (7367): bug #10211: Fix depencencies for cx2341x
Mauro Carvalho Chehab [Fri, 14 Mar 2008 00:08:20 +0000 (21:08 -0300)]
V4L/DVB (7367): bug #10211: Fix depencencies for cx2341x

Fix for build #408

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7362): tvp5150.c: logical-bitwise and confusion
Roel Kluin [Mon, 10 Mar 2008 00:19:13 +0000 (21:19 -0300)]
V4L/DVB (7362): tvp5150.c: logical-bitwise and confusion

logical-bitwise & confusion

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7334): usb video: add a device link to usbvideo devices, else hal will ignor...
Pascal Terjan [Fri, 7 Mar 2008 11:22:57 +0000 (08:22 -0300)]
V4L/DVB (7334): usb video: add a device link to usbvideo devices, else hal will ignore them

Signed-off-by: Pascal Terjan <pterjan@mandriva.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7330): V4L1 - fix v4l_compat_translate_ioctl possible NULL deref
Cyrill Gorcunov [Wed, 5 Mar 2008 23:24:43 +0000 (20:24 -0300)]
V4L/DVB (7330): V4L1 - fix v4l_compat_translate_ioctl possible NULL deref

There are possible NULL pointer derefs in case of kzalloc fails so fix them.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7328): usb/opera1.c: fix a memory leak
Adrian Bunk [Thu, 28 Feb 2008 00:21:15 +0000 (21:21 -0300)]
V4L/DVB (7328): usb/opera1.c: fix a memory leak

This patch fixes a memory leak in the "testval == 0x67" case spotted by
the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7291): em28xx: correct use of and fix
Andrew Morton [Tue, 4 Mar 2008 16:09:09 +0000 (13:09 -0300)]
V4L/DVB (7291): em28xx: correct use of and fix

be less silly while we're there.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7285): em28xx: Correct use of ! and &
Julia Lawall [Tue, 26 Feb 2008 23:43:56 +0000 (20:43 -0300)]
V4L/DVB (7285): em28xx: Correct use of ! and &

In commit e6bafba5b4765a5a252f1b8d31cbf6d2459da337, a bug was fixed that
involved converting !x & y to !(x & y).  The code below shows the same
pattern, and thus should perhaps be fixed in the same way.

This is not tested and clearly changes the semantics, so it is only
something to consider.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@ expression E1,E2; @@
(
  !E1 & !E2
|
- !E1 & E2
+ !(E1 & E2)
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7279): ivtv: Add missing sg_init_table()
Ian Armstrong [Tue, 26 Feb 2008 19:09:00 +0000 (16:09 -0300)]
V4L/DVB (7279): ivtv: Add missing sg_init_table()

If a dma transfer is attempted for either yuv or framebuffer output, a missing
sg_init_table() call causes a kernel BUG in scatterlist.h if CONFIG_DEBUG_SG
is set.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7268): saa7134: fix: tuner should be loaded before calling saa7134_board_init2()
Mauro Carvalho Chehab [Tue, 19 Feb 2008 19:26:33 +0000 (16:26 -0300)]
V4L/DVB (7268): saa7134: fix: tuner should be loaded before calling saa7134_board_init2()

There are several parts of saa7134_board_init2() that calls tuner modules. We
should first load tuner, otherwise, the commands will fail.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7267): cx88: Fix: Loads tuner module before sending commands to it
Mauro Carvalho Chehab [Tue, 19 Feb 2008 19:22:25 +0000 (16:22 -0300)]
V4L/DVB (7267): cx88: Fix: Loads tuner module before sending commands to it

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7251): VIDEO_VIVI must depend on VIDEO_DEV
Adrian Bunk [Mon, 25 Feb 2008 03:08:10 +0000 (00:08 -0300)]
V4L/DVB (7251): VIDEO_VIVI must depend on VIDEO_DEV

This patch fixes the following compile error with
VIDEO_VIVI=y, VIDEO_DEV=m reported by Toralf Förster:

<--  snip  -->

...
  LD      .tmp_vmlinux1
drivers/built-in.o: In function `vivi_release':
vivi.c:(.text+0x322f5): undefined reference to `video_unregister_device'
vivi.c:(.text+0x32337): undefined reference to `video_device_release'
drivers/built-in.o: In function `vivi_open':
vivi.c:(.text+0x32845): undefined reference to `v4l2_type_names'
drivers/built-in.o: In function `vivi_init':
vivi.c:(.init.text+0x1d20): undefined reference to `video_device_alloc'
vivi.c:(.init.text+0x1d48): undefined reference to `video_register_device'
drivers/built-in.o:(.rodata+0x1b40): undefined reference to
`video_ioctl2'drivers/built-in.o:(.data+0x140c): undefined reference to
`video_device_release'

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7242): ivtv: fix for yuv filter table check
Ian Armstrong [Sat, 26 Jan 2008 11:52:58 +0000 (08:52 -0300)]
V4L/DVB (7242): ivtv: fix for yuv filter table check

As the result of a previous change that delayed the loading of the firmware,
the driver can sometimes report a bogus error regarding the yuv output filter
table not being found in the firmware. This patch moves the filter table
check to ensure it's only done after the firmware has been loaded.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7236): bttv: struct member initialized twice
Harvey Harrison [Sat, 23 Feb 2008 10:29:16 +0000 (07:29 -0300)]
V4L/DVB (7236): bttv: struct member initialized twice

fixes sparse warning:
drivers/media/video/bt8xx/bttv-driver.c:3391:3: warning: Initializer entry defined twice
drivers/media/video/bt8xx/bttv-driver.c:3392:3:   also defined here

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7228): saa7134: fix FM radio support for the Pinnacle PCTV 110i
Yuri Funduryan [Sun, 17 Feb 2008 04:22:37 +0000 (01:22 -0300)]
V4L/DVB (7228): saa7134: fix FM radio support for the Pinnacle PCTV 110i

This also has some coding style fixes.

Signed-off-by: Yuri Funduryan <yurifun@mail.ru>
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Reviewed-by: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoARM: OMAP1: Fix typo in OMAP1 MPU clock source initialization
Will Newton [Tue, 11 Mar 2008 09:47:43 +0000 (09:47 +0000)]
ARM: OMAP1: Fix typo in OMAP1 MPU clock source initialization

Fix typo in OMAP1 MPU clock source initialization.

Signed-off-by: Will Newton <will.newton@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoARM: OMAP: Fix DMA CLINK mask, clear spurious interrupt
Gadiyar, Anand [Sat, 8 Mar 2008 13:49:13 +0000 (05:49 -0800)]
ARM: OMAP: Fix DMA CLINK mask, clear spurious interrupt

Fix CLINK mask, clear spurious interrupt.

Signed-off-by: Gadiyar, Anand <gadiyar@ti.com>
Signed-off-by: Kevin Hilman <khilman@mvista.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoARM: OMAP: Fix chain_a_transfer return value
Anand Gadiyar [Mon, 10 Mar 2008 19:40:35 +0000 (01:10 +0530)]
ARM: OMAP: Fix chain_a_transfer return value

This patch changes the return value of omap_dma_chain_a_transfer
to 0 on success instead of the flag 'start_dma', which wasn't really useful
for anything.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoARM: OMAP: Fix missing makefile options
Tony Lindgren [Thu, 13 Mar 2008 13:03:36 +0000 (15:03 +0200)]
ARM: OMAP: Fix missing makefile options

Although audio and dsp drivers are not integrated yet,
allow compiling in mailbox and mcbsp to see any build
warnings.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoARM: OMAP: Fix GPIO IRQ unmask
Kevin Hilman [Thu, 17 Jan 2008 05:56:14 +0000 (21:56 -0800)]
ARM: OMAP: Fix GPIO IRQ unmask

GPIO IRQ unmask doesn't actually do anything useful.  The problem is
hidden by a separate explicit mass unmask at the end of the chained
bank handler.

Signed-off-by: Kevin Hilman <khilman@mvista.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoARM: OMAP: Fix clockevent support for hrtimers
Kevin Hilman [Fri, 19 Oct 2007 06:04:43 +0000 (23:04 -0700)]
ARM: OMAP: Fix clockevent support for hrtimers

One-shot mode was broken in MPU-timer support for OMAP1 due to a typo.

Also, ensure timer is stopped before changing the auto-reload flag.
The TRM says changing the AR flag when timer is running is undefined.

Also set GENERIC_CLOCKEVENTS for all omaps.

Signed-off-by: Tim Bird <tim.bird@am.sony.com>
Signed-off-by: Kevin Hilman <khilman@mvista.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years ago[SCSI] a100u2w: fix bitmap lookup routine
Akinobu Mita [Mon, 17 Mar 2008 12:32:02 +0000 (21:32 +0900)]
[SCSI] a100u2w: fix bitmap lookup routine

This patch is only compile tested.

It seems that bitmap lookup routine for allocation_map in
a100u2w driver is simply wrong.

It cannot lookup more than first 32 bits. If all first 32 bits
are set, it just returns 33-th orc_scb even though the 33-th bit
is not set.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Tested-by: Alan Cox <alan@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years agodrivers/char/rocket portability fixes
Al Viro [Wed, 19 Mar 2008 16:27:48 +0000 (16:27 +0000)]
drivers/char/rocket portability fixes

unsigned long != __le32, TYVM, and unsigned char[4] is not guaranteed
to be aligned for u32.

While we are at it, sanitize sOutDW() a bit - have it take Byte_t * and
handle dereferencing internally.

NB: sWriteTxPrioByte() is almost certainly buggered on big-endian and is
missing cpu_to_le16() on assignments to *WordPtr; I've left it alone for now.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Thu, 20 Mar 2008 02:10:56 +0000 (19:10 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Update some defconfigs
  [POWERPC] Hide resources on Axon PCIE root complex nodes
  [POWERPC] Fix cell IOMMU code to cope with empty dma-ranges and non-PCI devices
  [POWERPC] Fix build failure for tqm8540 and sbc85xx defconfigs
  [POWERPC] Fix PMU + soft interrupt disable bug
  [POWERPC] user_regset PTRACE_SETREGS regression fix

16 years agofbdev: defio and Metronomefb
Jaya Kumar [Thu, 20 Mar 2008 00:01:10 +0000 (17:01 -0700)]
fbdev: defio and Metronomefb

Implement support for the E-Ink Metronome controller.  It provides an mmapable
interface to the controller using defio support.  It was tested with a gumstix
pxa255 with Vizplex media using Xfbdev and various X clients such as xeyes,
xpdf, xloadimage.

This patch also fixes the following bug: Defio would cause a hang on write
access to the framebuffer as the page fault would be called ad-infinitum.  It
fixes fb_defio by setting the mapping to be used by page_mkclean.

Signed-off-by: Jaya Kumar <jayakumar.lkml@gmail.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agortc-at91sam9 fixes
David Brownell [Thu, 20 Mar 2008 00:01:09 +0000 (17:01 -0700)]
rtc-at91sam9 fixes

Updates to the at91sam9 rtt-as-rtc driver:

 - Bugfix:  IRQ enable bits need shifting before masking with status
 - Platform code to initialize wakeup bits didn't get merged; cope

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Justin Waters <justin.waters@timesys.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agorevert "clocksource: make clocksource watchdog cycle through online CPUs"
Andrew Morton [Thu, 20 Mar 2008 00:01:08 +0000 (17:01 -0700)]
revert "clocksource: make clocksource watchdog cycle through online CPUs"

Revert commit 1ada5cba6a0318f90e45b38557e7b5206a9cba38 ("clocksource:
make clocksource watchdog cycle through online CPUs") due to the
regression reported by Gabriel C at

http://lkml.org/lkml/2008/2/24/281

(short vesion: it makes TSC be marked as always unstable on his
machine).

Cc: Andi Kleen <ak@suse.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Robert Hancock <hancockr@shaw.ca>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Gabriel C <nix.or.die@googlemail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomemstick: optimize setup of JMicron host parameters
Alex Dubov [Thu, 20 Mar 2008 00:01:08 +0000 (17:01 -0700)]
memstick: optimize setup of JMicron host parameters

Set correct clock management values to improve over-all performance.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomemstick: add support for 8-bit parallel mode
Alex Dubov [Thu, 20 Mar 2008 00:01:07 +0000 (17:01 -0700)]
memstick: add support for 8-bit parallel mode

Newer MemoryStick (HG) cards and hosts support 8-bit parallel mode of
operation in addition to original 4-bit and 1-bit modes.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomemstick: automatically retrieve "INT" value from command response
Alex Dubov [Thu, 20 Mar 2008 00:01:06 +0000 (17:01 -0700)]
memstick: automatically retrieve "INT" value from command response

MemoryStick storage cards, when in parallel mode, send several meaningful bits
of their "INT" register as part of command response.  This data is stored by
host and can be used to spare invocation of "GET_INT" TPC on each data page
transferred between host and card.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofs/ufs/balloc.c: fix sparc64 printk warning
Andrew Morton [Thu, 20 Mar 2008 00:01:05 +0000 (17:01 -0700)]
fs/ufs/balloc.c: fix sparc64 printk warning

fs/ufs/balloc.c: In function `ufs_change_blocknr':
fs/ufs/balloc.c:317: warning: long long unsigned int format, long unsigned int arg (arg 2)
fs/ufs/balloc.c:317: warning: long long unsigned int format, long unsigned int arg (arg 3)

sector_t is u64 and we don't know what type the architecture uses to implement
u64.

Cc: Evgeniy Dushistov <dushistov@mail.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodrivers/md/raid5.c: fix printk warnings
Andrew Morton [Thu, 20 Mar 2008 00:01:05 +0000 (17:01 -0700)]
drivers/md/raid5.c: fix printk warnings

gcc-3.4.5 on sparc64:

drivers/md/raid5.c: In function `raid5_end_read_request':
drivers/md/raid5.c:1147: warning: long long unsigned int format, long unsigned int arg (arg 4)
drivers/md/raid5.c:1164: warning: long long unsigned int format, long unsigned int arg (arg 3)
drivers/md/raid5.c:1170: warning: long long unsigned int format, long unsigned int arg (arg 3)

sector_t is u64, and we don't know what type the architecture uses to
implement u64 (on some it is unsigned long).

Cc: Neil Brown <neilb@suse.de>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomemstick: drivers/memstick/host/jmb38x_ms.c: suppress uninitialized var warning
Andrew Morton [Thu, 20 Mar 2008 00:01:04 +0000 (17:01 -0700)]
memstick: drivers/memstick/host/jmb38x_ms.c: suppress uninitialized var warning

drivers/memstick/host/jmb38x_ms.c: In function 'jmb38x_ms_transfer_data':
drivers/memstick/host/jmb38x_ms.c:294: warning: 'p_off' may be used uninitialized in this function

Cc: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomemstick: drivers/memstick/host/jmb38x_ms.c needs dma-mapping.h
Andrew Morton [Thu, 20 Mar 2008 00:01:03 +0000 (17:01 -0700)]
memstick: drivers/memstick/host/jmb38x_ms.c needs dma-mapping.h

sparc32:

drivers/memstick/host/jmb38x_ms.c: In function 'jmb38x_ms_probe':
drivers/memstick/host/jmb38x_ms.c:818: error: 'DMA_32BIT_MASK' undeclared (first use in this function)
drivers/memstick/host/jmb38x_ms.c:818: error: (Each undeclared identifier is reported only once
drivers/memstick/host/jmb38x_ms.c:818: error: for each function it appears in.)

Cc: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomm/readahead: fix kernel-doc notation
Randy Dunlap [Thu, 20 Mar 2008 00:01:02 +0000 (17:01 -0700)]
mm/readahead: fix kernel-doc notation

Fix kernel-doc notation in mm/readahead.c.

Change ":" to ";" so that it doesn't get treated as a doc section heading.
Move the comment block ending "*/" to a line by itself so that the text on
that last line is not lost (dropped).

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agozisofs: fix readpage() outside i_size
Dave Young [Thu, 20 Mar 2008 00:01:01 +0000 (17:01 -0700)]
zisofs: fix readpage() outside i_size

A read request outside i_size will be handled in do_generic_file_read().  So
we just return 0 to avoid getting -EIO as normal reading, let
do_generic_file_read do the rest.

At the same time we need unlock the page to avoid system stuck.

Fixes http://bugzilla.kernel.org/show_bug.cgi?id=10227

Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Acked-by: Jan Kara <jack@suse.cz>
Report-by: Christian Perle <chris@linuxinfotag.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofs: fix kernel-doc notation warnings
Randy Dunlap [Thu, 20 Mar 2008 00:01:00 +0000 (17:01 -0700)]
fs: fix kernel-doc notation warnings

Fix kernel-doc notation warnings in fs/.

Warning(mmotm-2008-0314-1449//fs/super.c:560): missing initial short description on line:
 * mark_files_ro
Warning(mmotm-2008-0314-1449//fs/locks.c:1277): missing initial short description on line:
 * lease_get_mtime
Warning(mmotm-2008-0314-1449//fs/locks.c:1277): missing initial short description on line:
 * lease_get_mtime
Warning(mmotm-2008-0314-1449//fs/namei.c:1368): missing initial short description on line:
 * lookup_one_len:  filesystem helper to lookup single pathname component
Warning(mmotm-2008-0314-1449//fs/buffer.c:3221): missing initial short description on line:
 * bh_uptodate_or_lock: Test whether the buffer is uptodate
Warning(mmotm-2008-0314-1449//fs/buffer.c:3240): missing initial short description on line:
 * bh_submit_read: Submit a locked buffer for reading
Warning(mmotm-2008-0314-1449//fs/fs-writeback.c:30): missing initial short description on line:
 * writeback_acquire: attempt to get exclusive writeback access to a device
Warning(mmotm-2008-0314-1449//fs/fs-writeback.c:47): missing initial short description on line:
 * writeback_in_progress: determine whether there is writeback in progress
Warning(mmotm-2008-0314-1449//fs/fs-writeback.c:58): missing initial short description on line:
 * writeback_release: relinquish exclusive writeback access against a device.
Warning(mmotm-2008-0314-1449//include/linux/jbd.h:351): contents before sections
Warning(mmotm-2008-0314-1449//include/linux/jbd.h:561): contents before sections
Warning(mmotm-2008-0314-1449//fs/jbd/transaction.c:1935): missing initial short description on line:
 * void journal_invalidatepage()

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoeCryptfs: Swap dput() and mntput()
Michael Halcrow [Thu, 20 Mar 2008 00:00:58 +0000 (17:00 -0700)]
eCryptfs: Swap dput() and mntput()

ecryptfs_d_release() is doing a mntput before doing the dput.  This patch
moves the dput before the mntput.

Thanks to Rajouri Jammu for reporting this.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Cc: Rajouri Jammu <rajouri.jammu@gmail.com>
Cc: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agorcu: fix misplaced mb() in rcu_enter/exit_nohz()
Paul E. McKenney [Thu, 20 Mar 2008 00:00:57 +0000 (17:00 -0700)]
rcu: fix misplaced mb() in rcu_enter/exit_nohz()

In the process of writing up the mechanical proof of correctness for the
dynticks/preemptable-RCU interface, I noticed misplaced memory barriers in
rcu_enter_nohz() and rcu_exit_nohz().

This patch puts them in the right place and adds a comment.  The key thing to
keep in mind is that rcu_enter_nohz() is -exiting- the mode that can legally
execute RCU read-side critical sections.

The memory barrier must be between any potential RCU read-side critical
sections and the increment of the per-CPU dynticks_progress_counter, and thus
must come -before- this increment.  And vice versa for rcu_exit_nohz().

The locking in the scheduler is probably saving us for the moment.

Also, switch to smp_mb() - we don't need a barrier for uniprocessor kernels.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Steven Rostedt <srostedt@redhat.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoi810fb: fix console switch regression
Stefan Bauer [Thu, 20 Mar 2008 00:00:55 +0000 (17:00 -0700)]
i810fb: fix console switch regression

Since 4c7ffe0b9f7f40bd818fe3af51342f64c483908e ("fbdev: prevent drivers that
have hardware cursors from calling software cursor code") every call of
i810fb_cursor fails with -ENXIO because of a incorrect "!".

This hasn't struck until eaa0ff15c30dc9799eb4d12660edb73aeb6d32c5 ("fix !
versus & precedence in various places") surrounded the expression with braces,
so that the intended behavior was inverted.  That caused 'pixel waste' - the
same line of multi-colored pixels repeated over the whole screen - during
console switch.

This switches back to the original pre-4c7ffe0 behavior.

Signed-off-by: Stefan Bauer <stefan.bauer@cs.tu-chemnitz.de>
Tested-by: Stefan Bauer <stefan.bauer@cs.tu-chemnitz.de>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Antonino Daplas <adaplas@pol.net>
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agojbd2: correctly unescape journal data blocks
Duane Griffin [Thu, 20 Mar 2008 00:00:54 +0000 (17:00 -0700)]
jbd2: correctly unescape journal data blocks

Fix a long-standing typo (predating git) that will cause data corruption if a
journal data block needs unescaping.  At the moment the wrong buffer head's
data is being unescaped.

To test this case mount a filesystem with data=journal, start creating and
deleting a bunch of files containing only JBD2_MAGIC_NUMBER (0xc03b3998), then
pull the plug on the device.  Without this patch the files will contain zeros
instead of the correct data after recovery.

Signed-off-by: Duane Griffin <duaneg@dghda.com>
Acked-by: Jan Kara <jack@suse.cz>
Cc: <linux-ext4@vger.kernel.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agojbd: correctly unescape journal data blocks
Duane Griffin [Thu, 20 Mar 2008 00:00:53 +0000 (17:00 -0700)]
jbd: correctly unescape journal data blocks

Fix a long-standing typo (predating git) that will cause data corruption if a
journal data block needs unescaping.  At the moment the wrong buffer head's
data is being unescaped.

To test this case mount a filesystem with data=journal, start creating and
deleting a bunch of files containing only JFS_MAGIC_NUMBER (0xc03b3998), then
pull the plug on the device.  Without this patch the files will contain zeros
instead of the correct data after recovery.

Signed-off-by: Duane Griffin <duaneg@dghda.com>
Acked-by: Jan Kara <jack@suse.cz>
Cc: <linux-ext4@vger.kernel.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agortc: fix kconfig help
Alessandro Zummo [Thu, 20 Mar 2008 00:00:51 +0000 (17:00 -0700)]
rtc: fix kconfig help

Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agosmack: do not dereference NULL ipc object
Ahmed S. Darwish [Thu, 20 Mar 2008 00:00:51 +0000 (17:00 -0700)]
smack: do not dereference NULL ipc object

In the SYSV ipc msgctl(),semctl(),shmctl() family, if the user passed *_INFO
as the desired operation, no specific object is meant to be controlled and
only system-wide information is returned.  This leads to a NULL IPC object in
the LSM hooks if the _INFO flag is given.

Avoid dereferencing this NULL pointer in Smack ipc *ctl() methods.

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoROMFS: Fix up an error in iget removal
David Howells [Thu, 20 Mar 2008 00:00:50 +0000 (17:00 -0700)]
ROMFS: Fix up an error in iget removal

Fix up an error in iget removal in which romfs_lookup() making a successful
call to romfs_iget() continues through the negative/error handling (previously
the successful case jumped around the negative/error handling case):

 (1) inode is initialised to NULL at the top of the function, eliminating the
     need for specific negative-inode handling.  This means the positive
     success handling now flows straight through.

 (2) Rename the labels to be clearer about what they mean.

Also make romfs_lookup()'s result variable of type long so as to avoid
32-bit/64-bit conversions with PTR_ERR() and friends.

Based upon a report and patch from Adam Richter.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: "Adam J. Richter" <adam@yggdrasil.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoext3: fix wrong gfp type under transaction
Josef Bacik [Thu, 20 Mar 2008 00:00:49 +0000 (17:00 -0700)]
ext3: fix wrong gfp type under transaction

There are several places where we make allocations with GFP_KERNEL while under
a transaction, which could lead to an assertion panic or lockup if under
memory pressure.  This patch switches these problem areas to use GFP_NOFS to
keep these problems from happening.

Signed-off-by: Josef Bacik <jbacik@redhat.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoibmpex: report temperatures in mC, not C
Darrick J. Wong [Thu, 20 Mar 2008 00:00:48 +0000 (17:00 -0700)]
ibmpex: report temperatures in mC, not C

ibmpex's temperature sensors report incorrect units.  Apply a conversion
factor so that tempertures report correctly.  Until now, no systems seemed to
report temperatures this way, but evidently QS2x blades do.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoibmpex: update Kconfig to list more supported models
Darrick J. Wong [Thu, 20 Mar 2008 00:00:48 +0000 (17:00 -0700)]
ibmpex: update Kconfig to list more supported models

Enhanced the list of supported machines.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Cc: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoibmpex: correct power use multipliers for QS2x blade
Darrick J. Wong [Thu, 20 Mar 2008 00:00:47 +0000 (17:00 -0700)]
ibmpex: correct power use multipliers for QS2x blade

The QS2x blades ships with v2.54 of the firmware, which use the same
multiplier for all power meters.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Cc: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoquota: add possibly missing iput() when quotaon and quotaoff races
Jan Kara [Thu, 20 Mar 2008 00:00:46 +0000 (17:00 -0700)]
quota: add possibly missing iput() when quotaon and quotaoff races

We should always put inode we have reference to, even if quota was reenabled
in the mean time.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomemcgroup: fix check for thread being a group leader in memcgroup
Pavel Emelyanov [Thu, 20 Mar 2008 00:00:45 +0000 (17:00 -0700)]
memcgroup: fix check for thread being a group leader in memcgroup

The check t->pid == t->pid is not the blessed way to check whether a task is a
group leader.

This is not about the code beautifulness only, but about pid namespaces fixes
- both the tgid and the pid fields on the task_struct are (slowly :( )
becoming deprecated.

Besides, the thread_group_leader() macro makes only one dereference :)

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agojbd: fix jbd kernel-doc notation
Randy Dunlap [Thu, 20 Mar 2008 00:00:44 +0000 (17:00 -0700)]
jbd: fix jbd kernel-doc notation

Fix kernel-doc notation in jbd.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomd: remove the 'super' sysfs attribute from devices in an 'md' array
NeilBrown [Thu, 20 Mar 2008 00:00:44 +0000 (17:00 -0700)]
md: remove the 'super' sysfs attribute from devices in an 'md' array

Exposing the binary blob which is the md 'super-block' via sysfs doesn't
really fit with the whole sysfs model, and ever since commit
8118a859dc7abd873193986c77a8d9bdb877adc8 ("sysfs: fix off-by-one error
in fill_read_buffer()") it doesn't actually work at all (as the size of
the blob is often one page).

(akpm: as in, fs/sysfs/file.c:fill_read_buffer() goes BUG)

So just remove it altogether.  It isn't really useful.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomm: rmap kernel-doc fixes
Randy Dunlap [Thu, 20 Mar 2008 00:00:43 +0000 (17:00 -0700)]
mm: rmap kernel-doc fixes

Correct kernel-doc function names and parameters in rmap.c.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomm: highmem kernel-doc additions
Randy Dunlap [Thu, 20 Mar 2008 00:00:42 +0000 (17:00 -0700)]
mm: highmem kernel-doc additions

Add kernel-doc comments to highmem.c.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomm/oom_kill: fix kernel-doc
Randy Dunlap [Thu, 20 Mar 2008 00:00:42 +0000 (17:00 -0700)]
mm/oom_kill: fix kernel-doc

Fix kernel-doc notation in oom_kill.c.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomm/shmem and tiny-shmem: fix some kernel-doc
Randy Dunlap [Thu, 20 Mar 2008 00:00:41 +0000 (17:00 -0700)]
mm/shmem and tiny-shmem: fix some kernel-doc

Convert tiny-shmem.c function comments to kernel-doc.  Add parameters and
convert/fix other kernel-doc in shmem.c.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomm: fix various kernel-doc comments
Randy Dunlap [Thu, 20 Mar 2008 00:00:40 +0000 (17:00 -0700)]
mm: fix various kernel-doc comments

Fix various kernel-doc notation in mm/:

filemap.c: add function short description; convert 2 to kernel-doc
fremap.c: change parameter 'prot' to @prot
pagewalk.c: change "-" in function parameters to ":"
slab.c: fix short description of kmem_ptr_validate()
swap.c: fix description & parameters of put_pages_list()
swap_state.c: fix function parameters
vmalloc.c: change "@returns" to "Returns:" since that is not a parameter

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoaio: bad AIO race in aio_complete() leads to process hang
Quentin Barnes [Thu, 20 Mar 2008 00:00:39 +0000 (17:00 -0700)]
aio: bad AIO race in aio_complete() leads to process hang

My group ran into a AIO process hang on a 2.6.24 kernel with the process
sleeping indefinitely in io_getevents(2) waiting for the last wakeup to come
and it never would.

We ran the tests on x86_64 SMP.  The hang only occurred on a Xeon box
("Clovertown") but not a Core2Duo ("Conroe").  On the Xeon, the L2 cache isn't
shared between all eight processors, but is L2 is shared between between all
two processors on the Core2Duo we use.

My analysis of the hang is if you go down to the second while-loop
in read_events(), what happens on processor #1:
1) add_wait_queue_exclusive() adds thread to ctx->wait
2) aio_read_evt() to check tail
3) if aio_read_evt() returned 0, call [io_]schedule() and sleep

In aio_complete() with processor #2:
A) info->tail = tail;
B) waitqueue_active(&ctx->wait)
C) if waitqueue_active() returned non-0, call wake_up()

The way the code is written, step 1 must be seen by all other processors
before processor 1 checks for pending events in step 2 (that were recorded by
step A) and step A by processor 2 must be seen by all other processors
(checked in step 2) before step B is done.

The race I believed I was seeing is that steps 1 and 2 were
effectively swapped due to the __list_add() being delayed by the L2
cache not shared by some of the other processors.  Imagine:
proc 2: just before step A
proc 1, step 1: adds to ctx->wait, but is not visible by other processors yet
proc 1, step 2: checks tail and sees no pending events
proc 2, step A: updates tail
proc 1, step 3: calls [io_]schedule() and sleeps
proc 2, step B: checks ctx->wait, but sees no one waiting, skips wakeup
                so proc 1 sleeps indefinitely

My patch adds a memory barrier between steps A and B.  It ensures that the
update in step 1 gets seen on processor 2 before continuing.  If processor 1
was just before step 1, the memory barrier makes sure that step A (update
tail) gets seen by the time processor 1 makes it to step 2 (check tail).

Before the patch our AIO process would hang virtually 100% of the time.  After
the patch, we have yet to see the process ever hang.

Signed-off-by: Quentin Barnes <qbarnes+linux@yahoo-inc.com>
Reviewed-by: Zach Brown <zach.brown@oracle.com>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Cc: <stable@kernel.org>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
[ We should probably disallow that "if (waitqueue_active()) wake_up()"
  coding pattern, because it's so often buggy wrt memory ordering ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[POWERPC] Update some defconfigs
Paul Mackerras [Thu, 20 Mar 2008 00:21:32 +0000 (11:21 +1100)]
[POWERPC] Update some defconfigs

Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Hide resources on Axon PCIE root complex nodes
Michael Ellerman [Wed, 19 Mar 2008 06:10:55 +0000 (17:10 +1100)]
[POWERPC] Hide resources on Axon PCIE root complex nodes

The PCI bridge representing the PCIE root complex on Axon, contains
device BARs for a memory range and ROM that define inbound accesses.
This confuses the kernel resource management code -- the resources
need to be hidden when Axon is a host bridge.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Fix cell IOMMU code to cope with empty dma-ranges and non-PCI devices
Michael Ellerman [Fri, 14 Mar 2008 05:47:39 +0000 (16:47 +1100)]
[POWERPC] Fix cell IOMMU code to cope with empty dma-ranges and non-PCI devices

The cell IOMMU code to parse the dma-ranges properties, used for the fixed
mapping, was broken in two ways for some devices.

Firstly it didn't cope with empty dma-ranges properties. An empty property
implies no translation so can be safely skipped.

The code also wrongly assumed it would be looking at PCI devices, and hard
coded the number of address and size cells.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Fix build failure for tqm8540 and sbc85xx defconfigs
Paul Gortmaker [Tue, 18 Mar 2008 05:13:10 +0000 (16:13 +1100)]
[POWERPC] Fix build failure for tqm8540 and sbc85xx defconfigs

The wrapper script didn't have entries for the TQM8540 board and the
SBC8548 or SBC8560 boards.  I've assumed that the TQM8540 console is
8250 based and not CPM based by looking at its defconfig.  There was
also a trailing * on the TQM8555 entry that I removed too.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Fix PMU + soft interrupt disable bug
Anton Blanchard [Mon, 17 Mar 2008 04:27:09 +0000 (15:27 +1100)]
[POWERPC] Fix PMU + soft interrupt disable bug

Since the PMU is an NMI now, it can come at any time we are only soft
disabled.  We must hard disable around the two places we allow the kernel
stack SLB and r1 to go out of sync.  Otherwise the PMU exception can
force a kernel stack SLB into another slot, which can lead to it
getting evicted, which can lead to a nasty unrecoverable SLB miss
in the exception entry code.

Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] user_regset PTRACE_SETREGS regression fix
Roland McGrath [Thu, 13 Mar 2008 08:25:35 +0000 (19:25 +1100)]
[POWERPC] user_regset PTRACE_SETREGS regression fix

The PTRACE_SETREGS request was only recently added on powerpc,
and gdb does not use it.  So it slipped through without getting
all the testing it should have had.

The user_regset changes had a simple bug in storing to all of
the 32-bit general registers block on 64-bit kernels.  This bug
only comes up with PTRACE_SETREGS, not PPC_PTRACE_SETREGS.
It causes a BUG_ON to hit, so this fix needs to go in ASAP.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[SCSI] fix media change events for polled devices
Kay Sievers [Wed, 19 Mar 2008 12:04:47 +0000 (13:04 +0100)]
[SCSI] fix media change events for polled devices

Commit:
  a341cd0f (SCSI: add asynchronous event notification API)
breaks:
  285e9670 (sr,sd: send media state change modification events)
by introducing an event filter, which is removed here, to make
events, we are depending on, happen again.

Fix this by removing the event filter.  It's pretty much broken at the
moment, since a user can't set it (the attribute being read only).  A
proper fix will be to make the event discriminator distinguish between
AN and Polled media change events.

Cc: David Zeuthen <david@fubar.dk>
Cc: kristen accardi <kaccardi@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] sd, sr: do not emit change event at device add
Kay Sievers [Wed, 19 Mar 2008 12:09:56 +0000 (13:09 +0100)]
[SCSI] sd, sr: do not emit change event at device add

Initialize the "state changed" flag, so we do not send a change event
immediately after registering a new device.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
Linus Torvalds [Wed, 19 Mar 2008 04:34:48 +0000 (21:34 -0700)]
Merge branch 'fixes' of git://git./linux/kernel/git/djbw/async_tx

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx:
  async_tx: avoid the async xor_zero_sum path when src_cnt > device->max_xor
  fsldma: Fix the DMA halt when using DMA_INTERRUPT async_tx transfer.

16 years agoRevert "ACPI: EC: Handle IRQ storm on Acer laptops"
Alexey Starikovskiy [Tue, 18 Mar 2008 23:45:12 +0000 (02:45 +0300)]
Revert "ACPI: EC: Handle IRQ storm on Acer laptops"

This reverts commit 2c81ce4c9c37b910210f2640c28e98a0c398dc26.

It caused several new troubles (eg suspend slowdown bisected down to
this patch by Pavel Machek), so just revert it for now.

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Cc: Pavel Machek <pavel@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux...
Linus Torvalds [Wed, 19 Mar 2008 04:27:13 +0000 (21:27 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mingo/linux-2.6-sched-devel

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched-devel:
  sched: tune multi-core idle balancing
  sched: retune wake granularity
  sched: wakeup-buddy tasks are cache-hot
  sched: improve affine wakeups
  sched, net: socket wakeups are sync
  sched: clean up wakeup balancing, code flow
  sched: clean up wakeup balancing, rename variables
  sched: clean up wakeup balancing, move wake_affine()

16 years agoIDE: Make taskfile interface more robust wrt unexpected end-of-command
Linus Torvalds [Wed, 19 Mar 2008 04:26:24 +0000 (21:26 -0700)]
IDE: Make taskfile interface more robust wrt unexpected end-of-command

Now that we handle all the special commands using REQ_TYPE_ATA_TASKFILE
rather than using the old REQ_TYPE_ATA_CMD model, we need to also
emulate the lack of full taskfile data that comes with the old command
model (ie when commands are generated with the HDIO_DRIVE_CMD ioctl
rather than using the HDIO_DRIVE_TASK[FILE] ioctls).

In particular, this means that we should handle command completion the
more relaxed way that the old drive_cmd_intr() code did.  It allows
commands to finish early even if they don't use up all the data that we
thought we had for them.

This fixes a regression seen by Anders Eriksson where some SMART
commands sent by smartd would cause a boot-time system hang on his
machine because the IDE command handling code didn't realize that the
command had completed.

Tested-by: Anders Eriksson <aeriksson@fastmail.fm>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Ingo Molnar <mingo@elte.hu>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'slab-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/christoph/vm
Linus Torvalds [Wed, 19 Mar 2008 04:13:19 +0000 (21:13 -0700)]
Merge branch 'slab-linus' of git://git./linux/kernel/git/christoph/vm

* 'slab-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/christoph/vm:
  slub page alloc fallback: Enable interrupts for GFP_WAIT.

16 years agosched: tune multi-core idle balancing
Ingo Molnar [Sun, 16 Mar 2008 10:14:30 +0000 (11:14 +0100)]
sched: tune multi-core idle balancing

WAKE_IDLE is too agressive on multi-core CPUs with the new
wake-affine code, keep it on for SMT/HT balancing alone
(where there's no cache affinity at all between logical CPUs).

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: retune wake granularity
Ingo Molnar [Tue, 18 Mar 2008 17:47:57 +0000 (18:47 +0100)]
sched: retune wake granularity

reduce wake-up granularity for better interactivity.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: wakeup-buddy tasks are cache-hot
Ingo Molnar [Sat, 15 Mar 2008 16:10:34 +0000 (17:10 +0100)]
sched: wakeup-buddy tasks are cache-hot

Wakeup-buddy tasks are cache-hot - this makes it a bit harder
for the load-balancer to tear them apart. (but it's still possible,
if the load is sufficiently assymetric)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: improve affine wakeups
Ingo Molnar [Wed, 19 Mar 2008 00:42:00 +0000 (01:42 +0100)]
sched: improve affine wakeups

improve affine wakeups. Maintain the 'overlap' metric based on CFS's
sum_exec_runtime - which means the amount of time a task executes
after it wakes up some other task.

Use the 'overlap' for the wakeup decisions: if the 'overlap' is short,
it means there's strong workload coupling between this task and the
woken up task. If the 'overlap' is large then the workload is decoupled
and the scheduler will move them to separate CPUs more easily.

( Also slightly move the preempt_check within try_to_wake_up() - this has
  no effect on functionality but allows 'early wakeups' (for still-on-rq
  tasks) to be correctly accounted as well.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched, net: socket wakeups are sync
Ingo Molnar [Wed, 19 Mar 2008 00:44:24 +0000 (01:44 +0100)]
sched, net: socket wakeups are sync

'sync' wakeups are a hint towards the scheduler that (certain)
networking related wakeups likely create coupling between tasks.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: clean up wakeup balancing, code flow
Ingo Molnar [Sun, 16 Mar 2008 20:21:47 +0000 (21:21 +0100)]
sched: clean up wakeup balancing, code flow

Clean up the code flow. No code changed:

kernel/sched.o:

   text    data     bss     dec     hex filename
  42521    2858     232   45611    b22b sched.o.before
  42521    2858     232   45611    b22b sched.o.after

md5:
   09b31c44e9aff8666f72773dc433e2df  sched.o.before.asm
   09b31c44e9aff8666f72773dc433e2df  sched.o.after.asm

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: clean up wakeup balancing, rename variables
Ingo Molnar [Sun, 16 Mar 2008 19:56:26 +0000 (20:56 +0100)]
sched: clean up wakeup balancing, rename variables

rename 'cpu' to 'prev_cpu'. No code changed:

kernel/sched.o:

   text    data     bss     dec     hex filename
  42521    2858     232   45611    b22b sched.o.before
  42521    2858     232   45611    b22b sched.o.after

md5:
   09b31c44e9aff8666f72773dc433e2df  sched.o.before.asm
   09b31c44e9aff8666f72773dc433e2df  sched.o.after.asm

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: clean up wakeup balancing, move wake_affine()
Ingo Molnar [Sun, 16 Mar 2008 19:36:10 +0000 (20:36 +0100)]
sched: clean up wakeup balancing, move wake_affine()

split out the affine-wakeup bits.

No code changed:

kernel/sched.o:

   text    data     bss     dec     hex filename
  42521    2858     232   45611    b22b sched.o.before
  42521    2858     232   45611    b22b sched.o.after

md5:
   9d76738f1272aa82f0b7affd2f51df6b  sched.o.before.asm
   09b31c44e9aff8666f72773dc433e2df  sched.o.after.asm

(the md5's changed because stack slots changed and some registers
get scheduled by gcc in a different order - but otherwise the before
and after assembly is instruction for instruction equivalent.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoasync_tx: avoid the async xor_zero_sum path when src_cnt > device->max_xor
Dan Williams [Wed, 19 Mar 2008 04:23:59 +0000 (21:23 -0700)]
async_tx: avoid the async xor_zero_sum path when src_cnt > device->max_xor

If the channel cannot perform the operation in one call to
->device_prep_dma_zero_sum, then fallback to the xor+page_is_zero path.
This only affects users with arrays larger than 16 devices on iop13xx or
32 devices on iop3xx.

Cc: <stable@kernel.org>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
16 years agofsldma: Fix the DMA halt when using DMA_INTERRUPT async_tx transfer.
Zhang Wei [Wed, 19 Mar 2008 01:45:00 +0000 (18:45 -0700)]
fsldma: Fix the DMA halt when using DMA_INTERRUPT async_tx transfer.

The DMA_INTERRUPT async_tx is a NULL transfer, thus the BCR(count register)
is 0. When the transfer started with a byte count of zero, the DMA
controller will triger a PE(programming error) event and halt, not a normal
interrupt. I add special codes for PE event and DMA_INTERRUPT
async_tx testing.

Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
16 years ago[SCSI] mpt fusion: Power Management fixes for MPT SAS PCI-E controllers
Prakash, Sathya [Fri, 7 Mar 2008 10:49:50 +0000 (16:19 +0530)]
[SCSI] mpt fusion: Power Management fixes for MPT SAS PCI-E controllers

The system power state changes like hibernation and standby are not happening
properly with 106XE controllers, this patch modifies the driver to free
resources and allocate resources in power management entry points

[jejb: compile fixes for upstream]

Signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years agoMerge branch 'audit.b49' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit...
Linus Torvalds [Tue, 18 Mar 2008 15:43:59 +0000 (08:43 -0700)]
Merge branch 'audit.b49' of git://git./linux/kernel/git/viro/audit-current

* 'audit.b49' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
  [PATCH] export sessionid alongside the loginuid in procfs

16 years ago[PATCH] export sessionid alongside the loginuid in procfs
Eric Paris [Thu, 13 Mar 2008 12:15:31 +0000 (08:15 -0400)]
[PATCH] export sessionid alongside the loginuid in procfs

Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Tue, 18 Mar 2008 14:49:59 +0000 (07:49 -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:
  HID: update key codes for Apple aluminium
  HID: fix comment in hid_input_report()
  HID: BADPAD entry for NATSU Playstation USB adapter
  HID: Use DIV_ROUND_UP
  HID: remove HID_QUIRK_APPLE_ISO_KEYBOARD for 4th generation macbook

16 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Tue, 18 Mar 2008 14:48:23 +0000 (07:48 -0700)]
Merge branch 'release' of git://git./linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  ACPI: Set flag DOCK_UNDOCKING when triggered via sysfs
  Revert "ACPI: video: Ignore devices that aren't present in hardware"
  asus_acpi: remove misleading mask
  Revert "ACPI: video: Ignore ACPI video devices that aren't present in hardware"
  thermal: delete "default y"
  thermal: re-document thermal units
  Revert "thermal: fix generic thermal I/F for hwmon"
  ACPI: fix ATA_ACPI build
  ACPI: battery: Don't return -EFAIL on broken packages.
  ACPI: lockdep warning on boot, 2.6.25-rc5