]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years agoi386, dumpstack: unify die()
Alexander van Heukelum [Wed, 22 Oct 2008 10:00:14 +0000 (12:00 +0200)]
i386, dumpstack: unify die()

Make i386's die() equal to x86_64's version.

Whitespace-only changes on x86_64, to make it equal to i386's
version. (user_mode and user_mode_vm are equal on x86_64.)

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoi386, dumpstack: use oops_begin/oops_end in die_nmi
Alexander van Heukelum [Wed, 22 Oct 2008 10:00:13 +0000 (12:00 +0200)]
i386, dumpstack: use oops_begin/oops_end in die_nmi

Use oops_begin and oops_end in die_nmi.

Whitespace-only changes on x86_64, to make it equal to i386's
version.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoi386, dumpstack: use x86_64's method to account die_nest_count
Alexander van Heukelum [Wed, 22 Oct 2008 10:00:12 +0000 (12:00 +0200)]
i386, dumpstack: use x86_64's method to account die_nest_count

oops_begin/oops_end should always be used in pairs. On x86_64
oops_begin increments die_nest_count, and oops_end decrements
die_nest_count. Doing this makes oops_begin and oops_end equal
to the x86_64 versions.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86, dumpstack: always call oops_exit from oops_end
Alexander van Heukelum [Wed, 22 Oct 2008 10:00:11 +0000 (12:00 +0200)]
x86, dumpstack: always call oops_exit from oops_end

Always call oops_exit from oops_end, even if signr==0.

Also, move add_taint(TAINT_DIE) from __die to oops_end
on x86_64 and interchange two lines to make oops_end
more similar to the i386-version.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86_64, dumpstack: move kexec_crash from __die to oops_end
Alexander van Heukelum [Wed, 22 Oct 2008 10:00:10 +0000 (12:00 +0200)]
x86_64, dumpstack: move kexec_crash from __die to oops_end

oops_end is preceded by either a call to __die, or a conditional
call to crash_kexec. Move the conditional call to crash_kexec
from the end of __die to the start of oops_end and remove
the superfluous call to crash_kexec in die_nmi.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86, dumpstack: let signr=0 signal no do_exit
Alexander van Heukelum [Wed, 22 Oct 2008 10:00:09 +0000 (12:00 +0200)]
x86, dumpstack: let signr=0 signal no do_exit

Change oops_end such that signr=0 signals that do_exit
is not to be called.

Currently, each use of __die is soon followed by a call
to oops_end and 'regs' is set to NULL if oops_end is expected
not to call do_exit. Change all such pairs to set signr=0
instead. On x86_64 oops_end is used 'bare' in die_nmi; use
signr=0 instead of regs=NULL there, too.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoi386, dumpstack: move crash_kexec before bust_spinlocks(0) in oops_end
Alexander van Heukelum [Wed, 22 Oct 2008 10:00:08 +0000 (12:00 +0200)]
i386, dumpstack: move crash_kexec before bust_spinlocks(0) in oops_end

crash_kexec should not be called with console_sem held. Move
the call before bust_spinlocks(0) in oops_end to avoid the
problem.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Acked-by: "Neil Horman" <nhorman@tuxdriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86, kexec: fix hang on i386 when panic occurs while console_sem is held
Neil Horman [Fri, 17 Oct 2008 21:00:13 +0000 (17:00 -0400)]
x86, kexec: fix hang on i386 when panic occurs while console_sem is held

There's a corner case in 32 bit x86 kdump at the moment.  When the box
panics via nmi, we call bust_spinlocks(1) to disable sensitivity to the
console_sem (allowing us to print to the console in all cases), but we don't
call crash_kexec, until after we call bust_spinlocks(0), which re-enables
console_sem sensitivity.

The result is that, if we get an nmi while the console_sem is held and
kdump is configured, and we try to print something to the console during
kdump shutdown (which we often do) we deadlock the box.  The fix is to
simply do what 64 bit die_nmi does which is to not call bust_spinlocks(0)
until after we call crash_kexec.

Patch below tested successfully by me.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86, mm: enable GBPAGES option by default
Nick Piggin [Wed, 22 Oct 2008 10:33:16 +0000 (12:33 +0200)]
x86, mm: enable GBPAGES option by default

DIRECT_GBPAGES was under DEBUG_KERNEL && EXPERIMENTAL and disabled by default.
Turn it on by default and put it under EMBEDDED.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years ago[netdrvr] fec_mpc52xx: Implement polling, to make netconsole work.
Jon Smirl [Sat, 18 Oct 2008 11:40:59 +0000 (11:40 +0000)]
[netdrvr] fec_mpc52xx: Implement polling, to make netconsole work.

Implement polling for 5200FEC to make netconsole work. Tested on
Phytec pcm030 and Efika.

Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agoMCE: Don't run 32bit machine checks with interrupts on
Andi Kleen [Tue, 21 Oct 2008 20:45:22 +0000 (22:45 +0200)]
MCE: Don't run 32bit machine checks with interrupts on

Running machine checks with interrupt on is a extremly bad idea. The machine
check handler only runs when the system is broken and needs to finish
as quickly as possible.

Remove the respective bogus post 2.6.27 regression and call
the machine check vector directly again.

This removes only code.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
[Cherry-picked from x86/mce]
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agosh: update defconfigs.
Paul Mundt [Wed, 22 Oct 2008 11:05:11 +0000 (20:05 +0900)]
sh: update defconfigs.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agoqlge: Fix MSI/legacy single interrupt bug.
Ron Mercer [Mon, 20 Oct 2008 17:30:26 +0000 (10:30 -0700)]
qlge: Fix MSI/legacy single interrupt bug.

The chip can issue spurious interrupts for single interrupt
modes. We use disable to clear the condition and allow processing to
continue. Also got rid of legacy specific code since it now needs to
be done on MSI single irq also.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agosmc911x: Make the driver safer on SMP
Catalin Marinas [Mon, 20 Oct 2008 17:15:37 +0000 (18:15 +0100)]
smc911x: Make the driver safer on SMP

This patch extends the critical regions covered by lp->lock to make it
safer on SMP. The main failure point was the smc911x_hard_start_xmit
function being called from different CPUs. It was tested on the ARM SMP
platforms.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agosmc911x: Add IRQ polarity configuration
Catalin Marinas [Mon, 20 Oct 2008 17:15:30 +0000 (18:15 +0100)]
smc911x: Add IRQ polarity configuration

Platforms like ARM Ltd's RealView require the IRQ polarity bit to be set
for the SMC9118 chip. This patch allows the dynamic configuration via
the smc911x_platdata structure.

This patch also changes the smc91x_platdata structure name to the
correct smc911x_platdata in the smc911x_drv_probe() function.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agosmc911x: Allow Kconfig dependency on ARM
Catalin Marinas [Mon, 20 Oct 2008 17:15:17 +0000 (18:15 +0100)]
smc911x: Allow Kconfig dependency on ARM

Since more ARM platforms use this device, it is easier to add a
dependency on ARM rather than individual platforms.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agosis190: add identifier for Atheros AR8021 PHY
Francois Romieu [Mon, 20 Oct 2008 21:37:55 +0000 (23:37 +0200)]
sis190: add identifier for Atheros AR8021 PHY

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

Contributed by pablomme@googlemail.com, coenraad@wish.org.za
and a few others.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years ago8139x: reduce message severity on driver overlap
Stephen Hemminger [Wed, 22 Oct 2008 01:04:27 +0000 (18:04 -0700)]
8139x: reduce message severity on driver overlap

The 8139 drivers are a source of error messages that confuse users.

Since this device can not be disambiguated by normal PCI device
id's two drivers match the same info. But the module utilities
seem to correctly handle this overlap, they try one driver, then
if that doesn't load try the other. Therefore there is no need for
a message to be logged with error level severity, just using info
level instead. Can't be completely silent because user might have
configure one driver and forgot the other one.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agoigb: add IGB_DCA instead of selecting INTEL_IOATDMA
Jeff Kirsher [Fri, 17 Oct 2008 18:08:31 +0000 (11:08 -0700)]
igb: add IGB_DCA instead of selecting INTEL_IOATDMA

Add a bool IGB_DCA defined to y if IGB and DCA are enabled, but IGB isn't y while DCA=m.  And thus remove the need to select INTEL_IOATDMA when IGB is enabled, so that non-x86 architectures can build the igb driver.
Based on work/patch from Brice Goglin <brice@myri.com>

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agoigb: fix tx data corruption with transition to L0s on 82575
Alexander Duyck [Fri, 17 Oct 2008 04:26:57 +0000 (21:26 -0700)]
igb: fix tx data corruption with transition to L0s on 82575

The 82575 has an issue in which the DMA will go out of sync if the link
partner goes into an L0s state.  To prevent this we set the pci-e link
partner capability bits to disable the L0s transition on the hw.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agosh: Kill off unused p1fc divisors from SH7763 clk fwk.
Paul Mundt [Wed, 22 Oct 2008 10:38:30 +0000 (19:38 +0900)]
sh: Kill off unused p1fc divisors from SH7763 clk fwk.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agoehea: Fix memory hotplug support
Hannes Hering [Thu, 16 Oct 2008 09:36:42 +0000 (11:36 +0200)]
ehea: Fix memory hotplug support

This patch implements the memory notifier to update the busmap
instantly instead of rebuilding the whole map. This is necessary
because walk_memory_resource provides different information than
required during memory hotplug.

Signed-off-by: Hannes Hering <hering2@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agonetdev: DM9000: remove BLACKFIN hacking in DM9000 netdev driver
Bryan Wu [Thu, 16 Oct 2008 17:40:44 +0000 (01:40 +0800)]
netdev: DM9000: remove BLACKFIN hacking in DM9000 netdev driver

remove integer casting in the read/write IO accessors,
because Blackfin now provides those functions

Tested-by: Javier Herrero <jherrero@hvsistemas.es>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agocxgb3: Fix kernel crash caused by uninitialized l2t_entry.arpq
Roland Dreier [Fri, 17 Oct 2008 21:18:26 +0000 (14:18 -0700)]
cxgb3: Fix kernel crash caused by uninitialized l2t_entry.arpq

Commit 147e70e6 ("cxgb3: Use SKB list interfaces instead of home-grown
implementation.") causes a crash in t3_l2t_send_slow() when an iWARP
connection request is received.  This is because the new l2t_entry.arpq
skb queue is never initialized, and therefore trying to add an skb to
it causes a NULL dereference.  With the old code there was no need to
initialize the queues because the l2t_entry structures were zeroed,
and the code used NULL to mean empty.

Fix this by adding __skb_queue_head_init() when all the l2t_entry
structures get allocated.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agoSMC911x: unbreak PXA builds
Dmitry Baryshkov [Tue, 21 Oct 2008 00:36:29 +0000 (04:36 +0400)]
SMC911x: unbreak PXA builds

Currently SMC911x driver is broken on ARM/PXA builds.
Unbreak such configurations.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agomyri10ge: disable NAPI on failure to setup the interface
Brice Goglin [Mon, 20 Oct 2008 11:54:12 +0000 (13:54 +0200)]
myri10ge: disable NAPI on failure to setup the interface

Disable NAPI if a failure occurs when setting up the interface. Leaving
it enabled could cause a BUG the next time an ifconfig up is issued.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agonet: Make SMC91X selectable on other MIPS boards
Atsushi Nemoto [Mon, 20 Oct 2008 15:00:29 +0000 (00:00 +0900)]
net: Make SMC91X selectable on other MIPS boards

RBTX4939 board has SMC91X chip and there can be other MIPS boards with
that chip.  Make SMC91X selectable on all MIPS board would be better than
enumerating each boards in Kconfig.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: jeff@garzik.org
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agoAX88796: ax_probe() fix irq assignment
roel kluin [Tue, 21 Oct 2008 05:44:02 +0000 (01:44 -0400)]
AX88796: ax_probe() fix irq assignment

dev->irq is unsigned

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agogianfar: fix handle errors returned by platform_get_irq*()
roel kluin [Tue, 21 Oct 2008 05:35:34 +0000 (01:35 -0400)]
gianfar: fix handle errors returned by platform_get_irq*()

platform_get_irq*() returns on -ENXIO when the resource cannot be
found, but this remains unnoticed if stored in an unsigned.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agor8169: checks against wrong mac addresse init
Francois Romieu [Thu, 16 Oct 2008 20:46:13 +0000 (22:46 +0200)]
r8169: checks against wrong mac addresse init

Checking the signature of the eeprom and the validity of the
MAC address should be enough to filter out the bad addresses
observed so far.

Contributed by Ivan Vecera and Martin Capitanio.

Tested on 8102el, 8168b and 8169 for a start.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agor8169: verbose mac address init
Francois Romieu [Thu, 16 Oct 2008 20:04:07 +0000 (22:04 +0200)]
r8169: verbose mac address init

I prefer the debug information to be displayed until
the issue is properly handled.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agoMerge branch 'oprofile/x86-oprofile-for-tip' into oprofile/for-linus
Robert Richter [Wed, 22 Oct 2008 10:12:06 +0000 (12:12 +0200)]
Merge branch 'oprofile/x86-oprofile-for-tip' into oprofile/for-linus

17 years agox86: SB600: skip IRQ0 override if it is not routed to INT2 of IOAPIC
Andreas Herrmann [Wed, 15 Oct 2008 09:51:53 +0000 (11:51 +0200)]
x86: SB600: skip IRQ0 override if it is not routed to INT2 of IOAPIC

Impact: fix hung bootup and other misbehavior on certain laptops

On some more HP laptops BIOS reports an IRQ0 override
but the SB600 chipset is configured such that timer
interrupts go to INT0 of IOAPIC.

Check IRQ0 routing and if it is routed to INT0 of IOAPIC skip the
timer override.

See following bug reports:

  http://bugzilla.kernel.org/show_bug.cgi?id=11715
  http://bugzilla.kernel.org/show_bug.cgi?id=11516

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years ago[ARM] msm: vreg interface to msm7k pmic
Brian Swetland [Mon, 29 Sep 2008 21:07:14 +0000 (14:07 -0700)]
[ARM] msm: vreg interface to msm7k pmic

The baseband cpu owns the pmic, so voltage regulator control is only
available via a relatively limited interface through the proc_comm
transport.

Signed-off-by: Brian Swetland <swetland@google.com>
17 years ago[ARM] msm: dma: various basic dma improvements and bugfixes
Brian Swetland [Wed, 10 Sep 2008 21:58:25 +0000 (14:58 -0700)]
[ARM] msm: dma: various basic dma improvements and bugfixes

San:
- Propagate DM errors to the originator of the request.
- Implement msm_dmov_stop_cmd()
- Add return value to init code
- Modify msm_dmov_stop_cmd() to support ungraceful flushing

Arve:
- Disable datamover interrupt when not in use.
  We turn off the interrrupt to allow power collapse from idle.

Signed-off-by: San Mehat <san@android.com>
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Brian Swetland <swetland@google.com>
17 years ago[ARM] msm: clock: provide clk_*() api support for
Brian Swetland [Tue, 9 Sep 2008 18:04:14 +0000 (11:04 -0700)]
[ARM] msm: clock: provide clk_*() api support for

Makes use of the proc_comm interface to provide clock control on
MSM7X01A family SoCs.

Signed-off-by: Brian Swetland <swetland@google.com>
17 years ago[ARM] msm: clean up iomap and devices
Brian Swetland [Wed, 10 Sep 2008 21:00:53 +0000 (14:00 -0700)]
[ARM] msm: clean up iomap and devices

- Add some more peripherals (sdcc, etc) to the iomap.
- Remove virtual base addresses for devices that we should be passing
  physical addresses to drivers via resources and ioremap()ing.
- don't try to use uarts for ll debug once the mmu is enabled due to
  problems with the peripheral window
- make base addresses void __iomem * and fixup irq.c and timer.c
- Remove common.c and bring in devices.c/devices.h similar to
  the PXA architecture.

Signed-off-by: Brian Swetland <swetland@google.com>
17 years ago[ARM] msm: add proc_comm support, necessary for clock and power control
Brian Swetland [Tue, 9 Sep 2008 16:36:50 +0000 (09:36 -0700)]
[ARM] msm: add proc_comm support, necessary for clock and power control

The proc_comm protocol is the lowest level protocol available for
communicating with the modem core.  It provides access to clock and
power control, among other things, and is safe for use from atomic
contexts, unlike the higher level SMD and RPC transports.

Signed-off-by: Brian Swetland <swetland@google.com>
17 years ago[ARM] msm: rename ARCH_MSM7X00A to ARCH_MSM
Brian Swetland [Tue, 9 Sep 2008 14:13:33 +0000 (07:13 -0700)]
[ARM] msm: rename ARCH_MSM7X00A to ARCH_MSM

The MSM architecture covers a wider family of chips than just the MSM7X00A.
Move to a more generic name, in perparation for supporting the specific
SoC variants as sub-architectures (ARCH_MSM7X01A, ARCH_MSM722X, etc).  This
gives us ARCH_MSM for the (many) common peripherals.

This also removes the unused/obsolete config item MSM7X00A_IDLE.

Signed-off-by: Brian Swetland <swetland@google.com>
17 years agosh: improve pinmux support for single direction pins
Magnus Damm [Wed, 22 Oct 2008 09:29:17 +0000 (18:29 +0900)]
sh: improve pinmux support for single direction pins

This patch improves the support for gpio pins that are hard wired
to either input or output and lack control register association.
A special force enum id is used to allow use without control
register but still mark the gpio pin as input or output.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: use 10MHz VIO_CLK for ov772x on Migo-R
Magnus Damm [Wed, 22 Oct 2008 09:25:39 +0000 (18:25 +0900)]
sh: use 10MHz VIO_CLK for ov772x on Migo-R

Use a slower VIO_CKO clock frequency for the ov772x on Migo-R.
This improves the camera picture quality on Panel Board V2.1.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosched: add CONFIG_SMP consistency
Li Zefan [Wed, 22 Oct 2008 07:25:26 +0000 (15:25 +0800)]
sched: add CONFIG_SMP consistency

a patch from Henrik Austad did this:

>> Do not declare select_task_rq as part of sched_class when CONFIG_SMP is
>> not set.

Peter observed:

> While a proper cleanup, could you do it by re-arranging the methods so
> as to not create an additional ifdef?

Do not declare select_task_rq and some other methods as part of sched_class
when CONFIG_SMP is not set.

Also gather those methods to avoid CONFIG_SMP mess.

Idea-by: Henrik Austad <henrik.austad@gmail.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Henrik Austad <henrik@austad.us>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoMerge branch 'timers/range-hrtimers' into v28-range-hrtimers-for-linus-v2
Thomas Gleixner [Wed, 22 Oct 2008 07:48:06 +0000 (09:48 +0200)]
Merge branch 'timers/range-hrtimers' into v28-range-hrtimers-for-linus-v2

Conflicts:

kernel/time/tick-sched.c

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
17 years agotracing: create tracers menu
Peter Zijlstra [Tue, 21 Oct 2008 14:31:18 +0000 (16:31 +0200)]
tracing: create tracers menu

We seem to have plenty tracers, lets create a menu and not clutter
the already cluttered debug menu more.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Frédéric Weisbecker <fweisbec@gmail.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoMerge branch 'tracing/ftrace' into tracing/urgent
Ingo Molnar [Wed, 22 Oct 2008 07:08:14 +0000 (09:08 +0200)]
Merge branch 'tracing/ftrace' into tracing/urgent

17 years agox86, uv: use consistent names for region size and conherence id on x86 and ia64
Russ Anderson [Tue, 21 Oct 2008 19:09:51 +0000 (14:09 -0500)]
x86, uv: use consistent names for region size and conherence id on x86 and ia64

Use consistent names for region size and conherence id on x86 and ia64.

The SGI xp drivers are used on both ia64 and x86.  Using the same
names (sn_coherency_id, sn_region_size) simplies the driver code.

Signed-off-by: Russ Anderson <rja@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoALSA: hda - correct bracketing in spdif test in patch_sigmatel.c
Harvey Harrison [Wed, 22 Oct 2008 03:28:04 +0000 (20:28 -0700)]
ALSA: hda - correct bracketing in spdif test in patch_sigmatel.c

Noticed by sparse:
sound/pci/hda/patch_sigmatel.c:1285:43: warning: dubious: !x & y

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoirq: make variable static
roel kluin [Tue, 21 Oct 2008 23:49:09 +0000 (19:49 -0400)]
irq: make variable static

This variable is only used in the source file, so make it static.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: make variables static
roel kluin [Tue, 21 Oct 2008 23:49:09 +0000 (19:49 -0400)]
x86: make variables static

These variables are only used in their source files, so make them static.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agopowerpc: Support for relocatable kdump kernel
Mohan Kumar M [Tue, 21 Oct 2008 17:38:10 +0000 (17:38 +0000)]
powerpc: Support for relocatable kdump kernel

This adds relocatable kernel support for kdump. With this one can
use the same regular kernel to capture the kdump. A signature (0xfeed1234)
is passed in r6 from panic code to the next kernel through kexec_sequence
and purgatory code. The signature is used to differentiate between
kdump kernel and non-kdump kernels.

The purgatory code compares the signature and sets the __kdump_flag in
head_64.S.  During the boot up, kernel code checks __kdump_flag and if it
is set, the kernel will behave as relocatable kdump kernel. This kernel
will boot at the address where it was loaded by kexec-tools ie. at the
address reserved through crashkernel boot parameter.

CONFIG_CRASH_DUMP depends on CONFIG_RELOCATABLE option to build kdump
kernel as relocatable. So the same kernel can be used as production and
kdump kernel.

This patch incorporates the changes suggested by Paul Mackerras to avoid
GOT use and to avoid two copies of the code.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Mohan Kumar M <mohan@in.ibm.com>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agopowerpc: Don't use a 16G page if beyond mem= limits
Jon Tollefson [Tue, 21 Oct 2008 15:27:36 +0000 (15:27 +0000)]
powerpc: Don't use a 16G page if beyond mem= limits

If mem= is used on the boot command line to limit memory then the memory block where a 16G page resides may not be available.

Thanks to Michael Ellerman for finding the problem.

Signed-off-by: Jon Tollefson <kniht@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agopowerpc: Add del_node() for early boot code to prune inapplicable devices.
Mike Ditto [Tue, 21 Oct 2008 11:32:29 +0000 (11:32 +0000)]
powerpc: Add del_node() for early boot code to prune inapplicable devices.

Some platforms have variants that can share most of a flat device tree but need
a few devices selectively pruned at boot time.  This adds del_node() to ops.h
to allow access to the existing fdt_del_node().

Signed-off-by: Mike Ditto <mditto@consentry.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agoi7300_idle driver v1.55
Andy Henroid [Thu, 9 Oct 2008 18:45:22 +0000 (11:45 -0700)]
i7300_idle driver v1.55

The Intel 7300 Memory Controller supports dynamic throttling of memory which can
be used to save power when system is idle. This driver does the memory
throttling when all CPUs are idle on such a system.

Refer to "Intel 7300 Memory Controller Hub (MCH)" datasheet
for the config space description.

Signed-off-by: Andy Henroid <andrew.d.henroid@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
17 years agox86 allow modules to register idle notifiers
Venkatesh Pallipadi [Thu, 16 Oct 2008 20:34:43 +0000 (16:34 -0400)]
x86 allow modules to register idle notifiers

needed if the i7300_idle driver is to be modular.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Len Brown <len.brown@intel.com>
17 years agopowerpc: Further compile fixup for STRICT_MM_TYPECHECKS
David Gibson [Mon, 20 Oct 2008 17:55:29 +0000 (17:55 +0000)]
powerpc: Further compile fixup for STRICT_MM_TYPECHECKS

A patch of mine was recently committed to fix up STRICT_MM_TYPECHECKS
behaviour on powerpc (f5ea64dcbad89875d130596df14c9b25d994a737).
However, something which breaks it again seems to have slipped in
afterwards.  So, here's another small fix.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agopowerpc: Remove empty #else from signal_64.c
Michael Neuling [Wed, 15 Oct 2008 18:21:07 +0000 (18:21 +0000)]
powerpc: Remove empty #else from signal_64.c

Remove empty/bogus #else from signal_64.c

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agopowerpc: Move memory size print into common show_cpuinfo for 32-bit
Becky Bruce [Wed, 15 Oct 2008 08:25:28 +0000 (08:25 +0000)]
powerpc: Move memory size print into common show_cpuinfo for 32-bit

Most of the platforms were printing the size of the memory
in their show_cpuinfo implementations. This moves that to
the common show_cpuinfo, so that all 32-bit platforms will
now print the size of memory.  I also update the code
to deal with the fact that total_memory is now a phys_addr_t.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agohvc_console: Remove __devexit annotation of hvc_remove()
Hendrik Brueckner [Mon, 13 Oct 2008 23:12:52 +0000 (23:12 +0000)]
hvc_console: Remove __devexit annotation of hvc_remove()

Removed __devexit annotation of hvc_remove() to avoid a section mismatch
if the backend initialization fails and hvc_remove() must be used to
clean up allocated hvc structs (called in section __init or __devinit).

Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agohvc_console: Add support for tty window resizing
Hendrik Brueckner [Tue, 14 Oct 2008 05:02:09 +0000 (05:02 +0000)]
hvc_console: Add support for tty window resizing

The patch provides the hvc_resize() function to update the terminal
window dimensions (struct winsize) for a specified hvc console.
The function stores the new window size and schedules a function
that finally updates the tty winsize and signals the change to
user space (SIGWINCH).
Because the winsize update must acquire a mutex and might sleep,
the function is scheduled instead of being called from hvc_poll()
or khvcd.

This patch uses the tty_do_resize() routine from the tty layer.
A pending resize work is canceled in hvc_close() and hvc_hangup().

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agohvc_console: Fix loop if put_char() returns 0
Hendrik Brueckner [Mon, 13 Oct 2008 23:12:50 +0000 (23:12 +0000)]
hvc_console: Fix loop if put_char() returns 0

If put_char() routine of a hvc console backend returns 0, then the
hvc console starts looping in the following scenarios:

1. hvc_console_print()
If put_char() returns 0 then the while loop may loop forever.
I have added the missing check for 0 to throw away console messages.

2. khvcd may loop:
The thread calls hvc_poll() --> hvc_push()... if there are still
buffered data then the HVC_POLL_WRITE bit is set and causes the
khvcd thread to loop (if yield() returns immediately).

However, instead of looping, the khvcd thread could sleep for
MIN_TIMEOUT (doing the same as for get_chars()).
The MIN_TIMEOUT is set if hvc_push() was not able to write
data to the backend. If data has been written, the timeout is
set to 0 to immediately re-schedule hvc_poll().

Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com> (virtio_console)
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agohvc_console: Add tty driver flag TTY_DRIVER_RESET_TERMIOS
Hendrik Brueckner [Mon, 13 Oct 2008 23:12:49 +0000 (23:12 +0000)]
hvc_console: Add tty driver flag TTY_DRIVER_RESET_TERMIOS

After a tty hangup() or close() operation, processes might not reset the
termio settings to a sane state. In order to reset the termios to its
default settings the tty driver flag TTY_DRIVER_RESET_TERMIOS has been added.

TTY driver flag description from include/linux/tty_driver.h:
TTY_DRIVER_RESET_TERMIOS --- requests the tty layer to reset the
  termios setting when the last process has closed the device.
  Used for PTY's, in particular.

Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agohvc_console: Add a hangup notifier for backends
Hendrik Brueckner [Mon, 13 Oct 2008 23:12:48 +0000 (23:12 +0000)]
hvc_console: Add a hangup notifier for backends

I have added a hangup notifier that can be used by hvc console
backends to handle a tty hangup. The default irq hangup notifier
calls the notifier_del_irq() for compatibility.

Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agomfd: check for platform_get_irq() return value in sm501
Roel Kluin [Tue, 21 Oct 2008 23:39:55 +0000 (01:39 +0200)]
mfd: check for platform_get_irq() return value in sm501

sm501_devdata->irq is unsigned, while platform_get_irq() returns a
signed int.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
17 years agotcp: should use number of sack blocks instead of -1
Ilpo Järvinen [Tue, 21 Oct 2008 23:28:36 +0000 (16:28 -0700)]
tcp: should use number of sack blocks instead of -1

While looking for the recent "sack issue" I also read all eff_sacks
usage that was played around by some relevant commit. I found
out that there's another thing that is asking for a fix (unrelated
to the "sack issue" though).

This feature has probably very little significance in practice.
Opposite direction timeout with bidirectional tcp comes to me as
the most likely scenario though there might be other cases as
well related to non-data segments we send (e.g., response to the
opposite direction segment). Also some ACK losses or option space
wasted for other purposes is necessary to prevent the earlier
SACK feedback getting to the sender.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agomfd: use pci_ioremap_bar() in sm501
Arjan van de Ven [Sun, 28 Sep 2008 23:14:52 +0000 (16:14 -0700)]
mfd: use pci_ioremap_bar() in sm501

Use the newly introduced pci_ioremap_bar() function in drivers/mfd.
pci_ioremap_bar() just takes a pci device and a bar number, with the goal
of making it really hard to get wrong, while also having a central place
to stick sanity checks.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
17 years agomfd: Don't store volatile bits in WM8350 register cache
Mark Brown [Mon, 20 Oct 2008 21:58:50 +0000 (23:58 +0200)]
mfd: Don't store volatile bits in WM8350 register cache

This makes the contents of the cache clearer and fixes incorrect
initialisation of the cache for partially volatile registers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
17 years agomfd: don't export wm3850 static functions
Stephen Rothwell [Mon, 20 Oct 2008 21:55:30 +0000 (23:55 +0200)]
mfd: don't export wm3850 static functions

October 10th linux-next build (powerpc allyesconfig) failed like this:

drivers/mfd/wm8350-core.c:1131: error: __ksymtab_wm8350_create_cache causes a section type conflict

Caused by commit 89b4012befb1abca5e86d232bc0e2a797b0d9825 ("mfd: Core
support for the WM8350 AudioPlus PMIC"). wm8350_create_cache is not used
elsewhere, so remove the EXPORT_SYMBOL.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
17 years agomfd: twl4030-gpio driver
David Brownell [Mon, 20 Oct 2008 21:51:46 +0000 (23:51 +0200)]
mfd: twl4030-gpio driver

This adds basic support for the GPIOs in the twl4030 power management
chip.  That includes two open drain LED drivers, and the use of GPIO-0
(and GPIO-1) as MMC/SD card detect switches which can control whether
the VMMC1 (and VMMC2) regulators are active.

This version of the code has a debounce call that will probably be
replaced before long, when a more generic interface exists.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
17 years agomfd: rtc-twl4030 driver
David Brownell [Mon, 20 Oct 2008 21:50:05 +0000 (23:50 +0200)]
mfd: rtc-twl4030 driver

This adds a driver for the RTC inside the TWL4030 multi-function device.
It's a fairly basic RTC, with a wake-capable alarm.

Note that many of the pre-release Overo boards now in circulation can't
effectively use this RTC, because of a wiring error that puts its TWL
chip into "secure" mode.  (As in "secure yourself against tampering".)
This isn't an issue on other OMAP3 boards now supported in mainline,
such as Beagle and Labrador.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
17 years agomfd: twl4030 IRQ handling update
David Brownell [Mon, 20 Oct 2008 21:46:28 +0000 (23:46 +0200)]
mfd: twl4030 IRQ handling update

- Move it into a separate file; clean and streamline it
 - Restructure the init code for reuse during secondary dispatch
 - Support both levels (primary, secondary) of IRQ dispatch
 - Use a workqueue for irq mask/unmask and trigger configuration

Code for two subchips currently share that secondary handler code.
One is the power subchip; its IRQs are now handled by this core,
courtesy of this patch.  The other is the GPIO module, which will
be supported through a later patch.

There are also minor changes to the header file, mostly related
to GPIO support; nothing yet in mainline cares about those.  A
few references to OMAP-specific symbols are disabled; when they
can all be removed, the TWL4030 support ceases being OMAP-specific.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
17 years agostop_machine: fix error code handling on multiple cpus
Heiko Carstens [Wed, 22 Oct 2008 15:00:26 +0000 (10:00 -0500)]
stop_machine: fix error code handling on multiple cpus

Using |= for updating a value which might be updated on several cpus
concurrently will not always work since we need to make sure that the
update happens atomically.
To fix this just use a write if the called function returns an error
code on a cpu. We end up writing the error code of an arbitrary cpu
if multiple ones fail but that should be sufficient.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
17 years agostop_machine: use workqueues instead of kernel threads
Heiko Carstens [Mon, 13 Oct 2008 21:50:10 +0000 (23:50 +0200)]
stop_machine: use workqueues instead of kernel threads

Convert stop_machine to a workqueue based approach. Instead of using kernel
threads for stop_machine we now use a an rt workqueue to synchronize all
cpus.
This has the advantage that all needed per cpu threads are already created
when stop_machine gets called. And therefore a call to stop_machine won't
fail anymore. This is needed for s390 which needs a mechanism to synchronize
all cpus without allocating any memory.
As Rusty pointed out free_module() needs a non-failing stop_machine interface
as well.

As a side effect the stop_machine code gets simplified.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
17 years agoworkqueue: introduce create_rt_workqueue
Heiko Carstens [Mon, 13 Oct 2008 21:50:09 +0000 (23:50 +0200)]
workqueue: introduce create_rt_workqueue

create_rt_workqueue will create a real time prioritized workqueue.
This is needed for the conversion of stop_machine to a workqueue based
implementation.
This patch adds yet another parameter to __create_workqueue_key to tell
it that we want an rt workqueue.
However it looks like we rather should have something like "int type"
instead of singlethread, freezable and rt.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Ingo Molnar <mingo@elte.hu>
17 years agoCall init_workqueues before pre smp initcalls.
Heiko Carstens [Mon, 13 Oct 2008 21:50:08 +0000 (23:50 +0200)]
Call init_workqueues before pre smp initcalls.

This allows to create workqueues from within the context of
a pre smp initcall (aka early_initcall).

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
17 years agoMake panic= and panic_on_oops into core_params
Rusty Russell [Wed, 22 Oct 2008 15:00:24 +0000 (10:00 -0500)]
Make panic= and panic_on_oops into core_params

This allows them to be examined and set after boot, plus means they
actually give errors if they are misused (eg. panic=yes).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
17 years agoMake initcall_debug a core_param
Rusty Russell [Wed, 22 Oct 2008 15:00:23 +0000 (10:00 -0500)]
Make initcall_debug a core_param

This is the one I really wanted: now it effects module loading, it
makes sense to be able to flip it after boot.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
17 years agocore_param() for genuinely core kernel parameters
Rusty Russell [Wed, 22 Oct 2008 15:00:23 +0000 (10:00 -0500)]
core_param() for genuinely core kernel parameters

There are a lot of one-liner uses of __setup() in the kernel: they're
cumbersome and not queryable (definitely not settable) via /sys.  Yet
it's ugly to simplify them to module_param(), because by default that
inserts a prefix of the module name (usually filename).

So, introduce a "core_param".  The parameter gets no prefix, but
appears in /sys/module/kernel/parameters/ (if non-zero perms arg).  I
thought about using the name "core", but that's more common than
"kernel".  And if you create a module called "kernel", you will die
a horrible death.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
17 years agoparam: Fix duplicate module prefixes
Rusty Russell [Wed, 22 Oct 2008 15:00:22 +0000 (10:00 -0500)]
param: Fix duplicate module prefixes

Instead of insisting each new module_param sysfs entry is unique,
handle the case where it already exists (for builtin modules).

The current code assumes that all identical prefixes are together in
the section: true for normal uses, but not necessarily so if someone
overrides MODULE_PARAM_PREFIX.  More importantly, it's not true with
the new "core_param()" code which uses "kernel" as a prefix.

This simplifies the caller for the builtin case, at a slight loss of
efficiency (we do the lookup every time to see if the directory
exists).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
17 years agomodule: check kernel param length at compile time, not runtime
Rusty Russell [Wed, 22 Oct 2008 15:00:22 +0000 (10:00 -0500)]
module: check kernel param length at compile time, not runtime

The kparam code tries to handle over-length parameter prefixes at
runtime.  Not only would I bet this has never been tested, it's not
clear that truncating names is a good idea either.

So let's check at compile time.  We need to move the #define to
moduleparam.h to do this, though.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
17 years agoRemove stop_machine during module load v2
Andi Kleen [Sat, 30 Aug 2008 08:09:00 +0000 (10:09 +0200)]
Remove stop_machine during module load v2

Remove stop_machine during module load v2

module loading currently does a stop_machine on each module load to insert
the module into the global module lists.  Especially on larger systems this
can be quite expensive.

It does that to handle concurrent lock lessmodule list readers
like kallsyms.

I don't think stop_machine() is actually needed to insert something
into a list though. There are no concurrent writers because the
module mutex is taken. And the RCU list functions know how to insert
a node into a list with the right memory ordering so that concurrent
readers don't go off into the wood.

So remove the stop_machine for the module list insert and just
do a list_add_rcu() instead.

Module removal will still do a stop_machine of course, it needs
that for other reasons.

v2: Revised readers based on Paul's comments. All readers that only
    rely on disabled preemption need to be changed to list_for_each_rcu().
    Done that. The others are ok because they have the modules mutex.
    Also added a possible missing preempt disable for print_modules().

[cc Paul McKenney for review. It's not RCU, but quite similar.]

Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
17 years agomodule: simplify load_module.
Rusty Russell [Wed, 22 Oct 2008 15:00:13 +0000 (10:00 -0500)]
module: simplify load_module.

Linus' recent catch of stack overflow in load_module lead me to look
at the code.  A couple of helpers to get a section address and get
objects from a section can help clean things up a little.

(And in case you're wondering, the stack size also dropped from 328 to
284 bytes).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
17 years ago[ARM] clps711x: add sparsemem definitions
Russell King [Tue, 21 Oct 2008 22:29:56 +0000 (23:29 +0100)]
[ARM] clps711x: add sparsemem definitions

Fix the edb7211_defconfig build errors.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoomap: Add basic support for Pandora handheld console
Grazvydas Ignotas [Sat, 18 Oct 2008 21:55:15 +0000 (00:55 +0300)]
omap: Add basic support for Pandora handheld console

This patch adds support for basic features: nand, uarts, i2c,
mmc, rtc, and usb. Also includes defconfig.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoARM: OMAP3: Fix get_irqnr_and_base to clear spurious interrupt bits
Tony Lindgren [Tue, 21 Oct 2008 17:51:40 +0000 (10:51 -0700)]
ARM: OMAP3: Fix get_irqnr_and_base to clear spurious interrupt bits

On omap24xx, INTCPS_SIR_IRQ_OFFSET bits [6:0] contains the current
active interrupt number.

However, on 34xx INTCPS_SIR_IRQ_OFFSET bits [31:7] also contains the
SPURIOUSIRQFLAG, which gets set if the interrupt sorting information
is invalid.

If the SPURIOUSIRQFLAG bits are not ignored, the interrupt code will
occasionally produce a bunch of confusing errors:

irq -33, desc: c02ddcc8, depth: 0, count: 0, unhandled: 0
->handle_irq():  c006f23c, handle_bad_irq+0x0/0x22c
->chip(): 00000000, 0x0
->action(): 00000000

Fix this by masking out only the ACTIVEIRQ bits. Also fix a
confusing comment.

Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoRevert "OMAP3: ack spurious IRQs in get_irqnr_and_base"
Tony Lindgren [Tue, 21 Oct 2008 22:04:30 +0000 (15:04 -0700)]
Revert "OMAP3: ack spurious IRQs in get_irqnr_and_base"

This reverts commit 3da0e10243d075b905dfa8f1b4a6cb3694ab2ce0.

The real bug behind this issue is the fact that we're not
masking out the SPURIOUSIRQFLAG bits [31:7] from the active
interrupt number. The following patch will replace this
patch with the fix.

Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years ago[ARM] 5315/1: Fix section mismatch warning (sa1111)
Kristoffer Ericson [Tue, 21 Oct 2008 18:47:22 +0000 (19:47 +0100)]
[ARM] 5315/1: Fix section mismatch warning (sa1111)

This patch fixes the section mismatch warning from
sa1111.o at buildtime.

  CC      arch/arm/common/sa1111.o
  LD      arch/arm/common/built-in.o
  LD      vmlinux.o
  MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0x87f4): Section mismatch in reference from the function sa1111_probe() to the function .devinit.text:sa1110_mb_enable()
The function sa1111_probe() references
the function __devinit sa1110_mb_enable().
This is often because sa1111_probe lacks a __devinit
annotation or the annotation of sa1110_mb_enable is wrong.

Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoALSA: emu10k1: fix faulty commit 18c71092
Vedran Miletic [Tue, 21 Oct 2008 19:31:27 +0000 (21:31 +0200)]
ALSA: emu10k1: fix faulty commit 18c71092

Commit 18c7109289625106cdc810b20b628cd13b46d6dd had #endif leftoff from
compilation. This patch fixes it.
Also, I replaced a misplaced comment by a useful one, that explains why are
here #ifdef and #endif added in compilation.

Signed-off-by: Vedran Miletic <rivanvx@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoide: remove useless subdirs from drivers/ide/
Bartlomiej Zolnierkiewicz [Tue, 21 Oct 2008 18:57:23 +0000 (20:57 +0200)]
ide: remove useless subdirs from drivers/ide/

Suggested-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoNOHZ: fix thinko in the timer restart code path
Thomas Gleixner [Tue, 21 Oct 2008 18:17:35 +0000 (20:17 +0200)]
NOHZ: fix thinko in the timer restart code path

commit fb02fbc14d17837b4b7b02dbb36142c16a7bf208 (NOHZ: restart tick
device from irq_enter())

solves the problem of stale jiffies when long running softirqs happen
in a long idle sleep period, but it has a major thinko in it:

When the interrupt which came in _is_ the timer interrupt which should
expire ts->sched_timer then we cancel and rearm the timer _before_ it
gets expired in hrtimer_interrupt() to the next period. That means the
call back function is not called. This game can go on for ever :(

Prevent this by making sure to only rearm the timer when the expiry
time is more than one tick_period away. Otherwise keep it running as
it is either already expired or will expiry at the right point to
update jiffies.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Venkatesch Pallipadi <venkatesh.pallipadi@intel.com>
17 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
David Woodhouse [Tue, 21 Oct 2008 18:42:20 +0000 (19:42 +0100)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6

Conflicts:

drivers/pci/dmar.c

17 years agodm: tidy local_init
Kiyoshi Ueda [Tue, 21 Oct 2008 16:45:08 +0000 (17:45 +0100)]
dm: tidy local_init

This patch tidies local_init() in preparation for request-based dm.
No functional change.

Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm: remove unused flush_all
Kiyoshi Ueda [Tue, 21 Oct 2008 16:45:07 +0000 (17:45 +0100)]
dm: remove unused flush_all

This patch removes the DM_WQ_FLUSH_ALL state that is unnecessary.

The dm_queue_flush(md, DM_WQ_FLUSH_ALL, NULL) in dm_suspend()
is never invoked because:
  - 'goto flush_and_out' is the same as 'goto out' because
    the 'goto flush_and_out' is called only when '!noflush'
  - If r is non-zero, then the code above will invoke 'goto out'
    and skip this code.

No functional change.

Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm raid1: separate region_hash interface part1
Heinz Mauelshagen [Tue, 21 Oct 2008 16:45:06 +0000 (17:45 +0100)]
dm raid1: separate region_hash interface part1

Separate the region hash code from raid1 so it can be shared by forthcoming
targets.  Use BUG_ON() for failed async dm_io() calls.

Signed-off-by: Heinz Mauelshagen <hjm@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm: mark split bio as cloned
Martin K. Petersen [Tue, 21 Oct 2008 16:45:04 +0000 (17:45 +0100)]
dm: mark split bio as cloned

When a bio gets split, mark its fragments with the BIO_CLONED flag.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm crypt: remove waitqueue
Milan Broz [Tue, 21 Oct 2008 16:45:03 +0000 (17:45 +0100)]
dm crypt: remove waitqueue

Remove waitqueue no longer needed with the async crypto interface.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm crypt: fix async split
Milan Broz [Tue, 21 Oct 2008 16:45:02 +0000 (17:45 +0100)]
dm crypt: fix async split

When writing io, dm-crypt has to allocate a new cloned bio
and encrypt the data into newly-allocated pages attached to this bio.
In rare cases, because of hw restrictions (e.g. physical segment limit)
or memory pressure, sometimes more than one cloned bio has to be used,
each processing a different fragment of the original.

Currently there is one waitqueue which waits for one fragment to finish
and continues processing the next fragment.

But when using asynchronous crypto this doesn't work, because several
fragments may be processed asynchronously or in parallel and there is
only one crypt context that cannot be shared between the bio fragments.
The result may be corruption of the data contained in the encrypted bio.

The patch fixes this by allocating new dm_crypt_io structs (with new
crypto contexts) and running them independently.

The fragments contains a pointer to the base dm_crypt_io struct to
handle reference counting, so the base one is properly deallocated
after all the fragments are finished.

In a low memory situation, this only uses one additional object from the
mempool.  If the mempool is empty, the next allocation simple waits for
previous fragments to complete.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm crypt: tidy sector
Milan Broz [Tue, 21 Oct 2008 16:45:00 +0000 (17:45 +0100)]
dm crypt: tidy sector

Prepare local sector variable (offset) for later patch.
Do not update io->sector for still-running I/O.

No functional change.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm: remove dm header from targets
Mikulas Patocka [Tue, 21 Oct 2008 16:44:59 +0000 (17:44 +0100)]
dm: remove dm header from targets

Change #include "dm.h" to #include <linux/device-mapper.h> in all targets.
Targets should not need direct access to internal DM structures.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm: publish array_too_big
Mikulas Patocka [Tue, 21 Oct 2008 16:44:57 +0000 (17:44 +0100)]
dm: publish array_too_big

Move array_too_big to include/linux/device-mapper.h because it is
used by targets.

Remove the test from dm-raid1 as the number of mirror legs is limited
such that it can never fail.  (Even for stripes it seems rather
unlikely.)

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
17 years agodm exception store: fix misordered writes
Mikulas Patocka [Tue, 21 Oct 2008 16:44:56 +0000 (17:44 +0100)]
dm exception store: fix misordered writes

We must zero the next chunk on disk *before* writing out the current chunk, not
after.  Otherwise if the machine crashes at the wrong time, the "end of metadata"
marker may be missing.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: stable@kernel.org