pandora-kernel.git
15 years agoARM: OMAP: Remove cm_rmw_reg_bits()
Tony Lindgren [Wed, 4 Jun 2008 18:35:12 +0000 (11:35 -0700)]
ARM: OMAP: Remove cm_rmw_reg_bits()

If done, rmw() should be implemented in a generic way and
discussed on LKML.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: No functions in headers, make them inline
Tony Lindgren [Wed, 4 Jun 2008 18:16:16 +0000 (11:16 -0700)]
ARM: OMAP: No functions in headers, make them inline

Also remove extra verbose debugging as requested by RMK.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Remove __atribute__(unused), use inline instead of __inline__
Tony Lindgren [Wed, 4 Jun 2008 18:10:21 +0000 (11:10 -0700)]
ARM: OMAP: Remove __atribute__(unused), use inline instead of __inline__

As requested by RMK earlier.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Do not mark function prototypes as __init
Tony Lindgren [Wed, 4 Jun 2008 00:44:40 +0000 (17:44 -0700)]
ARM: OMAP: Do not mark function prototypes as __init

Also don't include common headers from omap headers

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Remove trailing white space from id.c
Tony Lindgren [Wed, 4 Jun 2008 00:37:48 +0000 (17:37 -0700)]
ARM: OMAP: Remove trailing white space from id.c

Remove trailing white space from id.c

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Remove space before tab in clock34xx.c
Tony Lindgren [Tue, 3 Jun 2008 23:13:47 +0000 (16:13 -0700)]
ARM: OMAP: Remove space before tab in clock34xx.c

Remove space before tab in clock34xx.c

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Remove unnecessary include from clock.c
Tony Lindgren [Tue, 3 Jun 2008 23:00:02 +0000 (16:00 -0700)]
ARM: OMAP: Remove unnecessary include from clock.c

Remove unnecessary include from clock.c

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Rename DMA end_type to be omap specific
Tony Lindgren [Tue, 3 Jun 2008 17:30:15 +0000 (10:30 -0700)]
ARM: OMAP: Rename DMA end_type to be omap specific

Also remove a space to shrink diff with mainline dma.h

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoMACH-OMAP2: MCBSP: Add support for mcbsp on mach-omap2
Eduardo Valentin [Thu, 29 May 2008 16:50:50 +0000 (12:50 -0400)]
MACH-OMAP2: MCBSP: Add support for mcbsp on mach-omap2

This patch adds support for mach-omap2 based on current
mcbsp platform driver.

Signed-off-by: Eduardo Valentin <eduardo.valentin@indt.org.br>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoFix mcbsp clock definition on clock34xx.h
Eduardo Valentin [Thu, 29 May 2008 16:50:49 +0000 (12:50 -0400)]
Fix mcbsp clock definition on clock34xx.h

This patch fix the clock definition for mcbsps on clock34xx.h.
Device identification must be done using .id field, not
only name field.

Signed-off-by: Eduardo Valentin <eduardo.valentin@indt.org.br>
15 years agoARM: OMAP: Fix 24xx mcbsp clocks
Tony Lindgren [Thu, 29 May 2008 16:50:48 +0000 (12:50 -0400)]
ARM: OMAP: Fix 24xx mcbsp clocks

Fix 24xx mcbsp clocks

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoMACH-OMAP1: MCBSP: Add support for mcbsp on mach-omap1
Eduardo Valentin [Thu, 29 May 2008 16:50:47 +0000 (12:50 -0400)]
MACH-OMAP1: MCBSP: Add support for mcbsp on mach-omap1

This patch adds support for mach-omap1 based on current
mcbsp platform driver.

Signed-off-by: Eduardo Valentin <eduardo.valentin@indt.org.br>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoPLAT-OMAP: MCBSP: Transform into platform driver
Eduardo Valentin [Thu, 29 May 2008 16:50:46 +0000 (12:50 -0400)]
PLAT-OMAP: MCBSP: Transform into platform driver

This patch transform mcbsp code into a very initial
implementation of a platform driver.

It also gets ride of ifdefs on mcbsp.c code.
To do it, a platform data structure was defined.

Platform devices are located in arch/arm/plat-omap/devices.c

Signed-off-by: Eduardo Valentin <eduardo.valentin@indt.org.br>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Use omap_globals for CPU detection for multi-omap
Tony Lindgren [Fri, 30 May 2008 21:12:57 +0000 (14:12 -0700)]
ARM: OMAP: Use omap_globals for CPU detection for multi-omap

This allows to get rid of the ifdefs and will allow simpler
CPU detection in the future.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Change to use CM offsets for clocks for multi-omap
Tony Lindgren [Fri, 16 May 2008 18:45:51 +0000 (11:45 -0700)]
ARM: OMAP: Change to use CM offsets for clocks for multi-omap

Change to use CM offsets for clocks for multi-omap

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Remove OMAP_CM_REGADDR for multi-boot
Tony Lindgren [Fri, 16 May 2008 18:45:52 +0000 (11:45 -0700)]
ARM: OMAP: Remove OMAP_CM_REGADDR for multi-boot

Please use OMAP2420_CM_REGADDR, OMAP2430_CM_REGADDR or
OMAP34XX_CM_REGADDR instead.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Remove OMAP_PRM_REGADDR
Tony Lindgren [Fri, 30 May 2008 21:12:57 +0000 (14:12 -0700)]
ARM: OMAP: Remove OMAP_PRM_REGADDR

Remove OMAP_PRM_REGADDR. Use prm_read/write_mod_reg() instead.
For assembly, use OMAPXXXX_PRM_REGADDR macros.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Introduce omap_globals and prcm access functions for multi-omap
Tony Lindgren [Fri, 30 May 2008 21:12:56 +0000 (14:12 -0700)]
ARM: OMAP: Introduce omap_globals and prcm access functions for multi-omap

New struct omap_globals contains the omap processor specific
module bases. Use omap_globals to set the various base addresses
before to make detecting omap chip type simpler.

Also introduce OMAP2_IO_ADDRESS for future multi-omap patches.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Remove __REG access for multi-omap
Tony Lindgren [Fri, 16 May 2008 18:45:44 +0000 (11:45 -0700)]
ARM: OMAP: Remove __REG access for multi-omap

This does not play nicely with multi-omap as it cannot be replaced
by a function in io.c for omaps with different IO bases.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agomusb_hdrc: Change __REG access to omap_read/write for multi-boot
Tony Lindgren [Fri, 16 May 2008 18:45:43 +0000 (11:45 -0700)]
musb_hdrc: Change __REG access to omap_read/write for multi-boot

Change __REG access to omap_read/write for multi-boot

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Change __REG access to omap/read write for traffic controller
Tony Lindgren [Fri, 16 May 2008 18:45:41 +0000 (11:45 -0700)]
ARM: OMAP: Change __REG access to omap/read write for traffic controller

Change __REG access to omap/read write for traffic controller

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoUSB: Change omap USB code to use omap_read/write instead of __REG for multi-omap
Tony Lindgren [Thu, 1 May 2008 22:43:44 +0000 (15:43 -0700)]
USB: Change omap USB code to use omap_read/write instead of __REG for multi-omap

Change omap USB code to use omap_read/write instead of __REG for multi-omap

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoCF: Change omap_cf.c to use omap_readw/writew instead of __REG for multi-omap
Tony Lindgren [Thu, 1 May 2008 22:39:05 +0000 (15:39 -0700)]
CF: Change omap_cf.c to use  omap_readw/writew instead of __REG for multi-omap

Change omap_cf.c to use  omap_readw/writew instead of __REG for multi-omap

Signed-off-by: Tony Lindren <tony@atomide.com>
15 years agoARM: OMAP: Remove omap_sram_patch_va
Tony Lindgren [Fri, 30 May 2008 21:12:55 +0000 (14:12 -0700)]
ARM: OMAP: Remove omap_sram_patch_va

This is no longer needed as the 24xx *.S files have been split
into 242x and 243x specific files.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Split sram24xx.S into sram242x.S and sram243x.S
Tony Lindgren [Fri, 30 May 2008 21:12:55 +0000 (14:12 -0700)]
ARM: OMAP: Split sram24xx.S into sram242x.S and sram243x.S

Split sram24xx.S into sram242x.S and sram243x.S

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Split sleep24xx.S into sleep242x.S and sleep243x.S
Tony Lindgren [Fri, 30 May 2008 21:12:55 +0000 (14:12 -0700)]
ARM: OMAP: Split sleep24xx.S into sleep242x.S and sleep243x.S

Split sleep24xx.S into sleep242x.S and sleep243x.S. This is easier
to follow than rewriting the registers.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Enable framebuffer for omap_3430sdp_defconfig
Tony Lindgren [Fri, 30 May 2008 20:47:03 +0000 (13:47 -0700)]
ARM: OMAP: Enable framebuffer for omap_3430sdp_defconfig

Enable framebuffer for omap_3430sdp_defconfig

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Update omap_3430sdp_defconfig
Tony Lindgren [Fri, 30 May 2008 20:38:25 +0000 (13:38 -0700)]
ARM: OMAP: Update omap_3430sdp_defconfig

Update omap_3430sdp_defconfig

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: beagleboard defconfig: increase FB DMA size to 4MB so the 1024x768x24...
Koen Kooi [Wed, 28 May 2008 22:33:44 +0000 (00:33 +0200)]
ARM: OMAP: beagleboard defconfig: increase FB DMA size to 4MB so the 1024x768x24 default fits

beagleboard defconfig: increase FB DMA size to 4MB so the 1024x768x24 default fits

Signed-off-by: Koen Kooi <koen@openembedded.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP3 clockdomains: include D2D clockdomain on 34xx ES2+
Paul Walmsley [Thu, 22 May 2008 17:33:59 +0000 (11:33 -0600)]
OMAP3 clockdomains: include D2D clockdomain on 34xx ES2+

The OMAP34xx ES2+ TRMs do not document the CLKTRCTRL_D2D bit, even
though the clockdomain logic remains on the chip, and must be
programmed appropriately for the CORE clockdomain to go inactive.

Thanks to Rajendra Najak <rnayak@ti.com> and Richard Woodruff
<r-woodruff2@ti.com> of TI for providing more detail on this issue;
and to Jouni Högander <jouni.hogander@nokia.com> for proposing this
fix.

This patch obsoletes the D2D clockdomain workaround in pm34xx.c in
Jouni's recent patch set.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP3 PM: convert open-coded iterator to use pwrdm_for_each_clkdm()
Paul Walmsley [Thu, 22 May 2008 17:33:54 +0000 (11:33 -0600)]
OMAP3 PM: convert open-coded iterator to use pwrdm_for_each_clkdm()

Convert iterators of the list of clockdomains in a powerdomain to use
pwrdm_for_each_clkdm(), rather than an open-coded for-loop.

This also fixes a bug when the D2D clockdomain is added to the 3430ES2
chip.  The open-coded for-loop tested for a NULL pointer in pwrdm_clkdms[]
to determine when to end the loop.  This causes the iterator to fall
off the end of the array when the powerdomain contains the maximum number
of clockdomains per powerdomain (currently 3).

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoDSP Gateway: remove manual clockdomain/powerdomain tweaking
Paul Walmsley [Wed, 21 May 2008 00:43:00 +0000 (18:43 -0600)]
DSP Gateway: remove manual clockdomain/powerdomain tweaking

The recent powerdomain and clockdomain layer updates for OMAP24XX should
now control the DSP powerdomain and clockdomain automatically when
DSP Gateway calls clk_{enable,disable}().  Remove the manual
clockdomain/powerdomain register tweaks from DSP Gateway.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years ago24xx PM: convert pm24xx.c code to use pwrdm/clkdm interfaces
Paul Walmsley [Wed, 21 May 2008 00:41:52 +0000 (18:41 -0600)]
24xx PM: convert pm24xx.c code to use pwrdm/clkdm interfaces

Convert the existing OMAP24xx pm24xx.c code to use the recent
powerdomain/clockdomain interface code.  This mostly consists of removing
direct register reads and writes and replacing it with code that can be
more generic.

Also update some of the comments to better reflect what is actually
happening on the chip.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoclockdomain: add clkdm_get_pwrdm()
Paul Walmsley [Wed, 21 May 2008 00:41:35 +0000 (18:41 -0600)]
clockdomain: add clkdm_get_pwrdm()

Add clkdm_get_pwrdm() to the clockdomain code.  It will return a
pointer to the powerdomain struct that the clockdomain is contained
within.  Used by the PM code.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agopowerdomain: add pwrdm_get_mem_bank_count()
Paul Walmsley [Wed, 21 May 2008 00:41:33 +0000 (18:41 -0600)]
powerdomain: add pwrdm_get_mem_bank_count()

Add a function pwrdm_get_mem_bank_count() to the powerdomain code to
return the number of memory banks contained inside an OMAP
powerdomain.  This will be used by the PM code to configure the memory
bank retention state.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years ago24xx clock: add missing SSI L4 interface clock
Paul Walmsley [Wed, 21 May 2008 00:41:28 +0000 (18:41 -0600)]
24xx clock: add missing SSI L4 interface clock

This patch adds a missing OMAP24xx clock, the SSI L4 interface clock,
as "ssi_l4_ick".

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years ago24xx clock: associate clocks with clockdomains
Paul Walmsley [Wed, 21 May 2008 00:41:20 +0000 (18:41 -0600)]
24xx clock: associate clocks with clockdomains

Associate each OMAP24xx clock in arch/arm/mach-omap2/clock24xx.h
with a clockdomain.

Also move the L4 clock up higher in the file in preparation to
define the SSI L4 iclk.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoDriver for omap34xx temperature sensor. second version.
Peter 'p2' De Schrijver [Fri, 23 May 2008 10:49:42 +0000 (13:49 +0300)]
Driver for omap34xx temperature sensor. second version.

This patch adds a hwmon driver for the OMAP34xx internal temperature
sensor. I get unusually high values (80 degrees and more) from this
sensor though.

Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoAdd SDTI device for OMAP3 and unify address definitions for OMAP1 and OMAP2.
Roman Tereshonkov [Wed, 28 May 2008 16:05:58 +0000 (19:05 +0300)]
Add SDTI device for OMAP3 and unify address definitions for OMAP1 and OMAP2.

Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoRemove config conditional tcm825x_regs_* declarations
trickie@gmail.com [Sat, 24 May 2008 20:20:44 +0000 (22:20 +0200)]
Remove config conditional tcm825x_regs_* declarations

Signed-off-by: Nick Loeve <trickie@gmail.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP3 Beagle: enable fb in defconfig
Steve Sakoman [Wed, 28 May 2008 05:46:22 +0000 (22:46 -0700)]
OMAP3 Beagle: enable fb in defconfig

Enable fb in defconfig

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP3 Beagle: enable usb in defconfig
Steve Sakoman [Wed, 28 May 2008 05:46:10 +0000 (22:46 -0700)]
OMAP3 Beagle: enable usb in defconfig

Enable usb in defconfig

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP3 Beagle: enable rtc in defconfig
Steve Sakoman [Wed, 28 May 2008 05:45:52 +0000 (22:45 -0700)]
OMAP3 Beagle: enable rtc in defconfig

Enable rtc in defconfig

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP3 Beagle: enable mmc in defconfig
Steve Sakoman [Wed, 28 May 2008 05:45:29 +0000 (22:45 -0700)]
OMAP3 Beagle: enable mmc in defconfig

Enable mmc in defconfig

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Fix USB peripheral DMA for omap1
Tony Lindgren [Wed, 28 May 2008 03:37:36 +0000 (20:37 -0700)]
ARM: OMAP: Fix USB peripheral DMA for omap1

Fix USB peripheral DMA for omap1. This got broken by
patch e1528b547b90079b8eaa37bf1b0739c35d4faa08.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Misc compile fixes
Tony Lindgren [Wed, 28 May 2008 01:25:38 +0000 (18:25 -0700)]
ARM: OMAP: Misc compile fixes

Misc compile fixes

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoMerge current mainline tree into linux-omap tree
Tony Lindgren [Tue, 27 May 2008 19:52:26 +0000 (12:52 -0700)]
Merge current mainline tree into linux-omap tree

Merge branches 'master' and 'linus'

Conflicts:

arch/arm/plat-omap/clock.c
include/asm-arm/arch-omap/clock.h

15 years agoLinux 2.6.26-rc4 v2.6.26-rc4
Linus Torvalds [Mon, 26 May 2008 18:07:53 +0000 (11:07 -0700)]
Linux 2.6.26-rc4

15 years agoposix timers: discard SI_TIMER signals on exec
Oleg Nesterov [Mon, 26 May 2008 16:55:42 +0000 (20:55 +0400)]
posix timers: discard SI_TIMER signals on exec

Based on Roland's patch. This approach was suggested by Austin Clements
from the very beginning, and then by Linus.

As Austin pointed out, the execing task can be killed by SI_TIMER signal
because exec flushes the signal handlers, but doesn't discard the pending
signals generated by posix timers. Perhaps not a bug, but people find this
surprising. See http://bugzilla.kernel.org/show_bug.cgi?id=10460

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Austin Clements <amdragon+kernelbugzilla@mit.edu>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoposix timers: sigqueue_free: don't free sigqueue if it is queued
Oleg Nesterov [Mon, 26 May 2008 16:55:42 +0000 (20:55 +0400)]
posix timers: sigqueue_free: don't free sigqueue if it is queued

Currently sigqueue_free() removes sigqueue from list, but doesn't cancel the
pending signal. This is not consistent, the task should either receive the
"full" signal along with siginfo_t, or it shouldn't receive the signal at all.

Change sigqueue_free() to clear SIGQUEUE_PREALLOC but leave sigqueue on list
if it is queued.

This is a user-visible change. If the signal is blocked, it stays queued
after sys_timer_delete() until unblocked with the "stale" si_code/si_value,
and of course it is still counted wrt RLIMIT_SIGPENDING which also limits
the number of posix timers.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Austin Clements <amdragon+kernelbugzilla@mit.edu>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
Linus Torvalds [Mon, 26 May 2008 17:24:06 +0000 (10:24 -0700)]
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6

* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  i2c: Align i2c_device_id
  tuner: Do not alter i2c_client.name

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg...
Linus Torvalds [Mon, 26 May 2008 17:21:26 +0000 (10:21 -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:
  slub: ksize() abuse checks
  slob: Fix to return wrong pointer

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.26
Linus Torvalds [Mon, 26 May 2008 17:20:40 +0000 (10:20 -0700)]
Merge git://git./linux/kernel/git/lethal/sh-2.6.26

* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.26:
  sh: Drop broken URAM support on SH7723.
  sh: update Migo-R defconfig
  sh: use sm501 8250 mfd support on r2d boards
  sh: add probe support for new sh7723 cut
  sh: fix VPU interrupt vector for sh7723
  sh: fix USBF resource for sh7722

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Mon, 26 May 2008 17:14:37 +0000 (10:14 -0700)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc64: global_reg_snapshot is not for userspace

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Mon, 26 May 2008 17:14:02 +0000 (10:14 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (52 commits)
  vlan: Use bitmask of feature flags instead of seperate feature bits
  fmvj18x_cs: add NextCom NC5310 rev B support
  xirc2ps_cs: re-initialize the multicast address in do_reset
  3C509: rx_bytes should not be increased when alloc_skb failed
  NETFRONT: Use __skb_queue_purge()
  VIRTIO: Use __skb_queue_purge()
  phylib: do EXPORT_SYMBOL on get_phy_id
  netlink: Fix nla_parse_nested_compat() to call nla_parse() directly
  WAN: protect HDLC proto list while insmod/rmmod
  drivers/net/fs_enet: remove null pointer dereference
  S2io: Version update for napi and MSI-X patches
  S2io: Added napi support when MSIX is enabled.
  S2io: Move all the transmit completions to a single msi-x (alarm) vector
  drivers/net/ehea - remove unnecessary memset after kzalloc
  au1000_eth: remove useless check
  Blackfin EMAC Driver: Removed duplicated include <linux/ethtool.h>
  cpmac bugfixes and enhancements
  e1000e: use resource_size_t, not unsigned long, for phys addrs
  net/usb: add support for Apple USB Ethernet Adapter
  uli526x: add support for netpoll
  ...

15 years agoi2c: Align i2c_device_id
Jiri Slaby [Mon, 26 May 2008 14:08:40 +0000 (16:08 +0200)]
i2c: Align i2c_device_id

Align i2c_device_id.driver_data to 8 bytes to not fail on crossbuilds.

(Added in d2653e92732bd3911feff6bee5e23dbf959381db.)

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agotuner: Do not alter i2c_client.name
Michael Krufky [Mon, 26 May 2008 14:08:40 +0000 (16:08 +0200)]
tuner: Do not alter i2c_client.name

The tuner driver used to change i2c_client.name for its own needs, but
it really shouldn't, as this field is used by i2c-core to do the
device/driver matching. So, create and use a separate field for the
tuner driver needs.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agosparc64: global_reg_snapshot is not for userspace
Adrian Bunk [Mon, 26 May 2008 05:50:16 +0000 (22:50 -0700)]
sparc64: global_reg_snapshot is not for userspace

global_reg_snapshot shouldn't be visible in our userspace headers.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosh: Drop broken URAM support on SH7723.
Paul Mundt [Mon, 26 May 2008 02:45:45 +0000 (11:45 +0900)]
sh: Drop broken URAM support on SH7723.

This was copied over from the previous MobileR bits, which doesn't
apply to R2. The URAM block on R2 is recycled for the L2 instead.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
Linus Torvalds [Sun, 25 May 2008 22:00:27 +0000 (15:00 -0700)]
Merge git://git./linux/kernel/git/sam/kbuild-fixes

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
  Kconfig: introduce ARCH_DEFCONFIG to DEFCONFIG_LIST
  .gitignore: match ncscope.out
  scripts/ver_linux use 'gcc -dumpversion'

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
Linus Torvalds [Sun, 25 May 2008 21:59:59 +0000 (14:59 -0700)]
Merge git://git./linux/kernel/git/wim/linux-2.6-watchdog

* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] Add ICH9DO into the iTCO_wdt.c driver
  [WATCHDOG] Fix booke_wdt.c on MPC85xx SMP system's
  [WATCHDOG] Add a watchdog driver based on the CS5535/CS5536 MFGPT timers
  [WATCHDOG] hpwdt: Fix NMI handling.
  [WATCHDOG] Blackfin Watchdog Driver: split platform device/driver
  [WATCHDOG] Add w83697h_wdt early_disable option
  [WATCHDOG] Make w83697h_wdt timeout option string similar to others
  [WATCHDOG] Make w83697h_wdt void-like functions void

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Sun, 25 May 2008 21:59:27 +0000 (14:59 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  [ALSA] hda - Fix capture mute Widget for stac9250/9251
  [ALSA] snd-pcsp - fix pcsp_treble_info() to honour an item number
  [ALSA] hda - Added support for Foxconn P35AX-S mainboard
  [ALSA] hda - Fix COEF and EAPD in ALC889 auto-configuration mode
  [ALSA] hda - Fix noise on VT1708 codec
  [ALSA] hda - Add model for ASUS P5K-E/WIFI-AP

15 years agoKconfig: introduce ARCH_DEFCONFIG to DEFCONFIG_LIST
Sam Ravnborg [Sun, 25 May 2008 21:03:18 +0000 (23:03 +0200)]
Kconfig: introduce ARCH_DEFCONFIG to DEFCONFIG_LIST

init/Kconfig contains a list of configs that are searched
for if 'make *config' are used with no .config present.
Extend this list to look at the config identified by
ARCH_DEFCONFIG.

With this change we now try the defconfig targets last.

This fixes a regression reported
by: Linus Torvalds <torvalds@linux-foundation.org>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
15 years ago.gitignore: match ncscope.out
Jike Song [Thu, 22 May 2008 01:23:10 +0000 (09:23 +0800)]
.gitignore: match ncscope.out

Sometimes I got this:

    $ git-status
    {snip}
    # On branch master
    # Untracked files:
    #   (use "git add <file>..." to include in what will be committed)
    #
    #       ncscope.out
    nothing added to commit but untracked files present (use "git add"
to track)

Fix it.

Signed-off-by: Jike Song <albcamus@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agoscripts/ver_linux use 'gcc -dumpversion'
Gabriel C [Wed, 21 May 2008 18:36:19 +0000 (20:36 +0200)]
scripts/ver_linux use 'gcc -dumpversion'

These magic greps and hacks in ver_linux to get the gcc version always break after some gcc releases.

Since now gcc >4.3 allows compiling with '--with-pkgversion' ( which can be everything 'My Cool Gcc' or something )
ver_linux will report random junk for these.

Simply use 'gcc -dumpversion' to get the gcc version which should always work.

Signed-off-by: Gabriel C <nix.or.die@googlemail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years ago[ALSA] hda - Fix capture mute Widget for stac9250/9251
Mauro Carvalho Chehab [Sun, 25 May 2008 16:20:06 +0000 (18:20 +0200)]
[ALSA] hda - Fix capture mute Widget for stac9250/9251

Fix capture mute widget for STAC9250/9251 codecs.  The widget 0x09
has no mute but 0x14 does actually.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years ago[ALSA] snd-pcsp - fix pcsp_treble_info() to honour an item number
Stas Sergeev [Sat, 24 May 2008 16:05:47 +0000 (18:05 +0200)]
[ALSA] snd-pcsp - fix pcsp_treble_info() to honour an item number

This solves the problem with mixers wrongly displaying the PWM freq.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years ago[WATCHDOG] Add ICH9DO into the iTCO_wdt.c driver
Gabriel C [Wed, 30 Apr 2008 14:51:10 +0000 (16:51 +0200)]
[WATCHDOG] Add ICH9DO into the iTCO_wdt.c driver

Add the Intel ICH9DO controller ID's for the iTCO_wdt kernel driver and bump
the driver version.

Tested on an P5E-VM DO ASUS motherboard.

Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
15 years ago[WATCHDOG] Fix booke_wdt.c on MPC85xx SMP system's
Chen Gong [Tue, 29 Apr 2008 08:42:05 +0000 (16:42 +0800)]
[WATCHDOG] Fix booke_wdt.c on MPC85xx SMP system's

On Book-E SMP systems each core has its own private watchdog.  If only one
watchdog is enabled, when the core that doesn't enable the watchdog is hung,
system can't reset because no watchdog is running on it.  That's bad.  It
means we must enable watchdogs on both cores.

We can use smp_call_function() to send appropriate messages to all the other
cores to enable and update the watchdog.

Signed-off-by: Chen Gong <g.chen@freescale.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
15 years ago[WATCHDOG] Add a watchdog driver based on the CS5535/CS5536 MFGPT timers
Jordan Crouse [Mon, 21 Jan 2008 17:07:00 +0000 (10:07 -0700)]
[WATCHDOG] Add a watchdog driver based on the CS5535/CS5536 MFGPT timers

Add a watchdog timer based on the MFGPT timers in the CS5535/CS5536
companion chips to the AMD Geode GX and LX processors.  Only caveat
is that the BIOS must provide at least a one free timer, and most
do not.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] hpwdt: Fix NMI handling.
Mingarelli, Thomas [Tue, 25 Mar 2008 17:17:30 +0000 (17:17 +0000)]
[WATCHDOG] hpwdt: Fix NMI handling.

I need to just return in case it's not my NMI so someone else can take a look
at it (and reset die_nmi_called to 0 in case I actually do get one that's mine
to handle).

Signed-off-by: Thomas Mingarelli <thomas.mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] Blackfin Watchdog Driver: split platform device/driver
Mike Frysinger [Thu, 27 Mar 2008 18:53:32 +0000 (11:53 -0700)]
[WATCHDOG] Blackfin Watchdog Driver: split platform device/driver

 - split platform device/driver registering from actual watchdog device/driver
   registering so that we can cleanly load/unload
 - fixup __initdata with __initconst and __devinitdata with __devinitconst

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] Add w83697h_wdt early_disable option
Samuel Tardieu [Wed, 12 Mar 2008 13:28:03 +0000 (14:28 +0100)]
[WATCHDOG] Add w83697h_wdt early_disable option

Pádraig Brady requested the possibility of not disabling the watchdog
at module load time or kernel boot time if it had been previously enabled
in the bios. It may help rebooting the machine if it freezes before the
userland daemon kicks in.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Cc: Pádraig Brady <P@draigBrady.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] Make w83697h_wdt timeout option string similar to others
Samuel Tardieu [Wed, 12 Mar 2008 13:28:02 +0000 (14:28 +0100)]
[WATCHDOG] Make w83697h_wdt timeout option string similar to others

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[WATCHDOG] Make w83697h_wdt void-like functions void
Samuel Tardieu [Wed, 12 Mar 2008 13:28:01 +0000 (14:28 +0100)]
[WATCHDOG] Make w83697h_wdt void-like functions void

Some non-exported functions always returned 0. Mark them void instead.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 24 May 2008 17:20:00 +0000 (10:20 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/x86/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip:
  x86: prevent PGE flush from interruption/preemption
  x86: use explicit copy in vdso_gettimeofday()
  namespacecheck: automated fixes
  x86/xen: fix arbitrary_virt_to_machine()
  x86: don't read maxlvt before checking if APIC is mapped
  x86: disable TSC for sched_clock() when calibration failed
  x86: distangle user disabled TSC from unstable
  x86: fix setup of cyc2ns in tsc_64.c

15 years agoMerge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Sat, 24 May 2008 17:13:16 +0000 (10:13 -0700)]
Merge branch 'for-linus' of /home/rmk/linux-2.6-arm

* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] integrator: fix build warnings and errors
  [ARM] fix OMAP include loops
  Revert "[ARM] pxa: spitz wants PXA27x UDC definitions"
  [ARM] 5053/1: define before use of processor_id
  [ARM] 5052/1: export clock functions for the at91x40
  [ARM] 5051/1: define pgtable_t for the !CONFIG_MMU case too
  [ARM] omap: fix omap clk support build errors
  [ARM] 5039/1: S3C244X: Rename SDI device if running on S3C244X.
  [ARM] 5043/1: pxafb: remove unused mode variable in pxafb_init_fbinfo
  [ARM] 5041/1: VR1000: Fix DM9000 IRQ flags initialisation
  [ARM] 5040/1: BAST: Fix DM9000 IRQ flags initialisation
  [ARM] 5038/1: ARM: OMAP: Remove tsc2102 references from board-palmte.c
  [ARM] 5025/2: fix collie cpu initialisation

15 years agospi: remove some spidev oops-on-rmmod paths
David Brownell [Fri, 23 May 2008 20:05:03 +0000 (13:05 -0700)]
spi: remove some spidev oops-on-rmmod paths

Somehow the spidev code forgot to include a critical mechanism: when the
underlying device is removed (e.g.  spi_master rmmod), open file
descriptors must be prevented from issuing new I/O requests to that
device.  On penalty of the oopsing reported by Sebastian Siewior
<bigeasy@tglx.de> ...

This is a partial fix, adding handshaking between the lower level (SPI
messaging) and the file operations using the spi_dev.  (It also fixes an
issue where reads and writes didn't return the number of bytes sent or
received.)

There's still a refcounting issue to be addressed (separately).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Reported-by: Sebastian Siewior <bigeasy@tglx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocgroups: remove node_ prefix_from ns subsystem
Cedric Le Goater [Fri, 23 May 2008 20:05:02 +0000 (13:05 -0700)]
cgroups: remove node_ prefix_from ns subsystem

This is a slight change in the namespace cgroup subsystem api.

The change is that previously when cgroup_clone() was called (currently
only from the unshare path in ns_proxy cgroup, you'd get a new group named
"node_$pid" whereas now you'll get a group named after just your pid.)

The only users who would notice it are those who are using the ns_proxy
cgroup subsystem to auto-create cgroups when namespaces are unshared -
something of an experimental feature, which I think really needs more
complete container/namespace support in order to be useful.  I suspect the
only users are Cedric and Serge, or maybe a few others on
containers@lists.linux-foundation.org.  And in fact it would only be
noticed by the users who make the assumption about how the name is
generated, rather than getting it from the /proc/<pid>/cgroups file for
the process in question.

Whether the change is actually needed or not I'm fairly agnostic on, but I
guess it is more elegant to just use the pid as the new group name rather
than adding a fairly arbitrary "node_" prefix on the front.

[menage@google.com: provided changelog]
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Cc: "Paul Menage" <menage@google.com>
Cc: "Serge E. Hallyn" <serue@us.ibm.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofor_each_online_pgdat(): kerneldoc fix
Fernando Luis Vazquez Cao [Fri, 23 May 2008 20:05:01 +0000 (13:05 -0700)]
for_each_online_pgdat(): kerneldoc fix

for_each_pgdat() was renamed to for_each_online_pgdat() and kerneldoc
comments should be updated accordingly.

Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofrv: export empty_zero_page
Adrian Bunk [Fri, 23 May 2008 20:05:00 +0000 (13:05 -0700)]
frv: export empty_zero_page

Fix the following build error:

ERROR: "empty_zero_page" [fs/ext4/ext4dev.ko] undefined!

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosys_prctl(): fix return of uninitialized value
Shi Weihua [Fri, 23 May 2008 20:04:59 +0000 (13:04 -0700)]
sys_prctl(): fix return of uninitialized value

If none of the switch cases match, the PR_SET_PDEATHSIG and
PR_SET_DUMPABLE cases of the switch statement will never write to local
variable `error'.

Signed-off-by: Shi Weihua <shiwh@cn.fujitsu.com>
Cc: Andrew G. Morgan <morgan@kernel.org>
Acked-by: "Serge E. Hallyn" <serue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoedac: mpc85xx: fix building as a module
Kumar Gala [Fri, 23 May 2008 20:04:58 +0000 (13:04 -0700)]
edac: mpc85xx: fix building as a module

including of <asm/mpc85xx.h> causes build problems since it doesn't exist.

Also removed warning:
drivers/edac/mpc85xx_edac.c:45: warning: 'mpc85xx_ctl_name' defined but not used

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Doug Thompson <dougthompson@xmission.com>
Acked-by: Dave Jiang <djiang@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agogpio: build fixes
David Brownell [Fri, 23 May 2008 20:04:58 +0000 (13:04 -0700)]
gpio: build fixes

This fixes various gpio-related build errors (mostly potential)
reported in part by Russell King and Uwe Kleine-König.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoS3C2410: fix driver MODULE_ALIAS()
Ben Dooks [Fri, 23 May 2008 20:04:57 +0000 (13:04 -0700)]
S3C2410: fix driver MODULE_ALIAS()

Add a correct MODULE_ALIAS() entry for this driver to enable udev module
loading.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoS3C2410: clean out changelog header and tidy
Ben Dooks [Fri, 23 May 2008 20:04:56 +0000 (13:04 -0700)]
S3C2410: clean out changelog header and tidy

Remove the old changelog entries which are now out of date and should be
extractable from git anyway.  Also tidy up the copyright for the driver.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoS3C2410: add error print if we cannot add attribute
Ben Dooks [Fri, 23 May 2008 20:04:56 +0000 (13:04 -0700)]
S3C2410: add error print if we cannot add attribute

Fix the following warning by checking the result of device_create_file and
printing an error but not removing the device (loss of debug registers is
not fatal).

drivers/video/s3c2410fb.c:905: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoS3C2410: ensure that FB_BLANK_POWERDOWN shuts down the controller
Ben Dooks [Fri, 23 May 2008 20:04:55 +0000 (13:04 -0700)]
S3C2410: ensure that FB_BLANK_POWERDOWN shuts down the controller

When a blank level of FB_BLANK_POWERDOWN is used, we should shut down the
controller so that it no longer tries to produce any panel signals or
data, and shuts down the DMA which is not needed.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoSM501: reverse FPEN/VBIASEN flags behaviour
Ben Dooks [Fri, 23 May 2008 20:04:53 +0000 (13:04 -0700)]
SM501: reverse FPEN/VBIASEN flags behaviour

To keep backwards compatibility, reverse the meanings of these flags so
that when they are not set, the driver uses the original behvaiour.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomemory hotplug: fix early allocation handling
Heiko Carstens [Fri, 23 May 2008 20:04:52 +0000 (13:04 -0700)]
memory hotplug: fix early allocation handling

Trying to add memory via add_memory() from within an initcall function
results in

bootmem alloc of 163840 bytes failed!
Kernel panic - not syncing: Out of memory

This is caused by zone_wait_table_init() which uses system_state to decide
if it should use the bootmem allocator or not.

When initcalls are handled the system_state is still SYSTEM_BOOTING but
the bootmem allocator doesn't work anymore.  So the allocation will fail.

To fix this use slab_is_available() instead as indicator like we do it
everywhere else.

[akpm@linux-foundation.org: coding-style fix]
Reviewed-by: Andy Whitcroft <apw@shadowen.org>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agozonelists: handle a node zonelist with no applicable entries
Andy Whitcroft [Fri, 23 May 2008 20:04:50 +0000 (13:04 -0700)]
zonelists: handle a node zonelist with no applicable entries

When booting 2.6.26-rc3 on a multi-node x86_32 numa system we are seeing
panics when trying node local allocations:

 BUG: unable to handle kernel NULL pointer dereference at 0000034c
 IP: [<c1042507>] get_page_from_freelist+0x4a/0x18e
 *pdpt = 00000000013a7001 *pde = 0000000000000000
 Oops: 0000 [#1] SMP
 Modules linked in:

 Pid: 0, comm: swapper Not tainted (2.6.26-rc3-00003-g5abc28d #82)
 EIP: 0060:[<c1042507>] EFLAGS: 00010282 CPU: 0
 EIP is at get_page_from_freelist+0x4a/0x18e
 EAX: c1371ed8 EBX: 00000000 ECX: 00000000 EDX: 00000000
 ESI: f7801180 EDI: 00000000 EBP: 00000000 ESP: c1371ec0
  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
 Process swapper (pid: 0, ti=c1370000 task=c12f5b40 task.ti=c1370000)
 Stack: 00000000 00000000 00000000 00000000 000612d0 000412d0 00000000 000412d0
        f7801180 f7c0101c f7c01018 c10426e4 f7c01018 00000001 00000044 00000000
        00000001 c12f5b40 00000001 00000010 00000000 000412d0 00000286 000412d0
 Call Trace:
  [<c10426e4>] __alloc_pages_internal+0x99/0x378
  [<c10429ca>] __alloc_pages+0x7/0x9
  [<c105e0e8>] kmem_getpages+0x66/0xef
  [<c105ec55>] cache_grow+0x8f/0x123
  [<c105f117>] ____cache_alloc_node+0xb9/0xe4
  [<c105f427>] kmem_cache_alloc_node+0x92/0xd2
  [<c122118c>] setup_cpu_cache+0xaf/0x177
  [<c105e6ca>] kmem_cache_create+0x2c8/0x353
  [<c13853af>] kmem_cache_init+0x1ce/0x3ad
  [<c13755c5>] start_kernel+0x178/0x1ee

This occurs when we are scanning the zonelists looking for a ZONE_NORMAL
page.  In this system there is only ZONE_DMA and ZONE_NORMAL memory on
node 0, all other nodes are mapped above 4GB physical.  Here is a dump
of the zonelists from this system:

    zonelists pgdat=c1400000
     0: c14006c0:2 f7c006c0:2 f7e006c0:2 c1400360:1 c1400000:0
     1: c14006c0:2 c1400360:1 c1400000:0
    zonelists pgdat=f7c00000
     0: f7c006c0:2 f7e006c0:2 c14006c0:2 c1400360:1 c1400000:0
     1: f7c006c0:2
    zonelists pgdat=f7e00000
     0: f7e006c0:2 c14006c0:2 f7c006c0:2 c1400360:1 c1400000:0
     1: f7e006c0:2

When performing a node local allocation we call get_page_from_freelist()
looking for a page.  It in turn calls first_zones_zonelist() which returns
a preferred_zone.  Where there are no applicable zones this will be NULL.
However we use this unconditionally, leading to this panic.

Where there are no applicable zones there is no possibility of a successful
allocation, so simply fail the allocation.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoserial: fix enable_irq_wake/disable_irq_wake imbalance in serial_core.c
Arjan van de Ven [Fri, 23 May 2008 20:04:49 +0000 (13:04 -0700)]
serial: fix enable_irq_wake/disable_irq_wake imbalance in serial_core.c

enable_irq_wake() and disable_irq_wake() need to be balanced.  However,
serial_core.c calls these for different conditions during the suspend and
resume functions...

This is causing a regular WARN_ON() as found at
http://www.kerneloops.org/search.php?search=set_irq_wake

This patch makes the conditions for triggering the _wake enable/disable
sequence identical.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoproc: proc_get_inode() should get module only once
Denis V. Lunev [Fri, 23 May 2008 20:04:47 +0000 (13:04 -0700)]
proc: proc_get_inode() should get module only once

Any file under /proc/net opened more than once leaked the refcounter
on the module it belongs to.

The problem is that module_get is called for each file opening while
module_put is called only when /proc inode is destroyed. So, lets put
module counter if we are dealing with already initialised inode.

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=10737

Signed-off-by: Denis V. Lunev <den@openvz.org>
Cc: David Miller <davem@davemloft.net>
Cc: Patrick McHardy <kaber@trash.net>
Acked-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Robert Olsson <robert.olsson@its.uu.se>
Acked-by: Eric W. Biederman <ebiederm@xmission.com>
Reported-by: Roland Kletzing <devzero@web.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agobrd: don't show ramdisks in /proc/partitions
Marcin Krol [Fri, 23 May 2008 20:04:46 +0000 (13:04 -0700)]
brd: don't show ramdisks in /proc/partitions

In 2.6.25, ramdisk devices show up in /proc/partitions, which is a
behaviour change from the old rd.c.  Add GENHD_FL_SUPPRESS_PARTITION_INFO,
which was present in rd.c.

All kernels prior to 2.6.25 weren't displaying ramdisks in
/proc/partitions.  Since there are many userspace tools using information
from /proc/partitions some of them may now behave incorrectly (I didn't
tested any though).  For example before 2.6.25 /proc/partitions was empty
if no block devices like hard disks and such were detected by kernel.  Now
all 16 ramdisks are always visible there.  Some software may rely on such
information (I mean, on empty /proc/partitions).

There was quite similar situation back in 2004, and ramdisks were excluded
back from displaying.  Thats why I called this a regression (maybe a bit
unfortunate).  See this patch for info:
http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.3-rc2/2.6.3-rc2-mm1/broken-out/nbd-proc-partitions-fix.patch

I also think that someone somewhere (long time ago) excluded ramdisks from
/proc/partitions for good reasons.  It is possible that now such new
"feature" is harmless, but I think there are more chances that someone
will say "hey, /proc/partitions has changed, now my software doesn't work"
then "hey where did my new 2.6.25 feature go".  nbd devices are also
excluded, maybe for very same (unknown to me) reasons.

Signed-off-by: Marcin Krol <hawk@pld-linux.org>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoip2: fix crashes on load/unload
Alan Cox [Fri, 23 May 2008 20:04:45 +0000 (13:04 -0700)]
ip2: fix crashes on load/unload

This doesn't need to be two modules, and making it one cleans up the
problem

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agogpiolib: fix off by one errors
Trent Piepho [Fri, 23 May 2008 20:04:44 +0000 (13:04 -0700)]
gpiolib: fix off by one errors

The last gpio belonging to a chip is chip->base + chip->ngpios - 1.  Some
places in the code, but not all, forgot the critical minus one.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agogpio: mcp23s08 debug fix
Roel Kluin [Fri, 23 May 2008 20:04:43 +0000 (13:04 -0700)]
gpio: mcp23s08 debug fix

The return value of mcp23s08_read_regs() can only be evaluated when signed

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agogpio: pca953x driver handles pca9554 too
David Brownell [Fri, 23 May 2008 20:04:42 +0000 (13:04 -0700)]
gpio: pca953x driver handles pca9554 too

Teach drivers/gpio/pca953x.c about PCA9554, another compatible chip.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosignals: fix sigqueue_free() vs __exit_signal() race
Oleg Nesterov [Fri, 23 May 2008 20:04:41 +0000 (13:04 -0700)]
signals: fix sigqueue_free() vs __exit_signal() race

__exit_signal() does flush_sigqueue(tsk->pending) outside of ->siglock.
This can race with another thread doing sigqueue_free(), we can free the
same SIGQUEUE_PREALLOC sigqueue twice or corrupt the pending->list.

Note that even sys_exit_group() can trigger this race, not only
sys_timer_delete().

Move the callsite of flush_sigqueue(tsk->pending) under ->siglock.

This patch doesn't touch flush_sigqueue(->shared_pending) below, it is
called when there are no other threads which can play with signals, and
sigqueue_free() can't be used outside of our thread group.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomd: restart recovery cleanly after device failure.
NeilBrown [Fri, 23 May 2008 20:04:39 +0000 (13:04 -0700)]
md: restart recovery cleanly after device failure.

When we get any IO error during a recovery (rebuilding a spare), we abort
the recovery and restart it.

For RAID6 (and multi-drive RAID1) it may not be best to restart at the
beginning: when multiple failures can be tolerated, the recovery may be
able to continue and re-doing all that has already been done doesn't make
sense.

We already have the infrastructure to record where a recovery is up to
and restart from there, but it is not being used properly.
This is because:
  - We sometimes abort with MD_RECOVERY_ERR rather than just MD_RECOVERY_INTR,
    which causes the recovery not be be checkpointed.
  - We remove spares and then re-added them which loses important state
    information.

The distinction between MD_RECOVERY_ERR and MD_RECOVERY_INTR really isn't
needed.  If there is an error, the relevant drive will be marked as
Faulty, and that is enough to ensure correct handling of the error.  So we
first remove MD_RECOVERY_ERR, changing some of the uses of it to
MD_RECOVERY_INTR.

Then we cause the attempt to remove a non-faulty device from an array to
fail (unless recovery is impossible as the array is too degraded).  Then
when remove_and_add_spares attempts to remove the devices on which
recovery can continue, it will fail, they will remain in place, and
recovery will continue on them as desired.

Issue:  If we are halfway through rebuilding a spare and another drive
fails, and a new spare is immediately available,  do we want to:
 1/ complete the current rebuild, then go back and rebuild the new spare or
 2/ restart the rebuild from the start and rebuild both devices in
    parallel.

Both options can be argued for.  The code currently takes option 2 as
  a/ this requires least code change
  b/ this results in a minimally-degraded array in minimal time.

Cc: "Eivind Sarto" <ivan@kasenna.com>
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>