Mark Brown [Tue, 16 Dec 2008 10:15:12 +0000 (10:15 +0000)]
ASoC: Add WM8350 AudioPlus codec driver
The WM8350 is an integrated audio and power management subsystem which
provides a single-chip solution for portable audio and multimedia systems.
The integrated audio CODEC provides all the necessary functions for
high-quality stereo recording and playback. Programmable on-chip
amplifiers allow for the direct connection of headphones and microphones
with a minimum of external components. A programmable low-noise bias
voltage is available to feed one or more electret microphones.
Additional audio features include programmable high-pass filter in the
ADC input path.
This driver was originally written by Liam Girdwood with further updates
from me.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Tue, 16 Dec 2008 14:44:48 +0000 (14:44 +0000)]
ASoC: Ease merge difficulties from new architectures
Rather than listing lots of architectures per line in Kconfig and
Makefile, causing merge conflicts all the time, have one per line
in alphabetical order.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Takashi Iwai [Thu, 11 Dec 2008 09:28:18 +0000 (10:28 +0100)]
ALSA: ASoC - Fix DAI registration in s3c2443-ac97.c
Fixed the registration of dais in s3c2443-ac97.c.
sound/soc/s3c24xx/s3c2443-ac97.c: In function 's3c2443_ac97_init':
sound/soc/s3c24xx/s3c2443-ac97.c:401: warning: passing argument 1 of 'snd_soc_register_dai' from incompatible pointer type
sound/soc/s3c24xx/s3c2443-ac97.c: In function 's3c2443_ac97_exit':
sound/soc/s3c24xx/s3c2443-ac97.c:407: warning: passing argument 1 of 'snd_soc_unregister_dai' from incompatible pointer type
Mark Brown [Wed, 10 Dec 2008 18:36:42 +0000 (18:36 +0000)]
ASoC: Convert WM8903 driver to register at I2C probe time
The driver now registers the codec and DAI when probed as an I2C device.
Also convert the driver to use a single dynamic allocation to simplify
error handling.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Wed, 10 Dec 2008 15:38:36 +0000 (15:38 +0000)]
ASoC: Convert WM8900 to do more work at I2C probe time
Redo the instantiation of the WM8900 to do most of the initialisation
work when the I2C driver probes rather than when the ASoC device is
instantiated, registering the codec with the ASoC core when done.
Also move all dynamic allocations into a single kmalloc() to simplify
error handling and rename the I2C driver to make output more sensible.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Wed, 10 Dec 2008 14:32:45 +0000 (14:32 +0000)]
ASoC: Add codec registration API
Another part of the backporting of Liam's ASoC v2 work. Using this is
more complicated than the other registration types since currently the
codec is instantiated during the probe of the ASoC device so we can't
currently readily wait for the codec to register.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Wed, 10 Dec 2008 11:08:33 +0000 (11:08 +0000)]
ASoC: Work around warnings from some build environments
BUG() should be marked as not returning but for at least some
configurations (including some widely deployed compilers) that's either
not happening or being forgotten by the compiler. Add some extra return
statements to the affected paths.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Takashi Iwai [Wed, 10 Dec 2008 06:59:33 +0000 (07:59 +0100)]
ALSA: ASoC - Fix symbol conflicts in omac-mcbsp.c
Add snd_ prefix to avoid the conflict of symbols in omac-mcbsp.c:
sound/soc/omap/omap-mcbsp.c:503: error: static declaration of 'omap_mcbsp_init' follows non-static declaration
arch/arm/plat-omap/include/mach/mcbsp.h:373: error: previous declaration of 'omap_mcbsp_init' was here
Takashi Iwai [Wed, 10 Dec 2008 06:40:24 +0000 (07:40 +0100)]
ALSA: ASoC - Fix module init entry for twl4030.c
Fixed the function name of module init entry for twl4030.c, which
conflicted with the existing hardware init function:
sound/soc/codecs/twl4030.c:1278: error: conflicting types for 'twl4030_init'
sound/soc/codecs/twl4030.c:1187: error: previous definition of 'twl4030_init' was here
Mark Brown [Tue, 9 Dec 2008 12:51:56 +0000 (12:51 +0000)]
ASoC: Convert WM8900 to allow registration by machine code
This makes use of the support for delayed DAI registration to allow the
WM8900 I2C device to be registered by general platform/architecture code
rather than as part of the ASoC device probe.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Thu, 4 Dec 2008 15:32:53 +0000 (15:32 +0000)]
ASoC: Initial framework for dynamic card instantiation
Use the lists of platforms, platform DAIs and cards to check to see that
everything has registered. Since relationships are still specified by
direct references to the structures in the drivers and the drivers all
register everything at modprobe there should be no practical effect yet.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Mon, 8 Dec 2008 19:17:58 +0000 (19:17 +0000)]
ASoC: Register non-AC97 codec DAIs
Currently this is done at module probe time since ASoC ties in codec
device probe to the instantiation of the entire ASoC device. Subsequent
patches will refactor the codec drivers to handle probing separately.
Note that the core does not yet use this information.
AC97 is special since the codec is controlled over the AC97 link but
we want to give the machine driver a chance to set up the system before
trying to instantiate since it may need to do configuration before the
AC97 link will operate
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Wed, 3 Dec 2008 19:58:17 +0000 (19:58 +0000)]
ASoC: Register platform drivers
This is done at modprobe time, mirroring current behaviour, except for
mpc5200_psc_i2s where we do registration at the same time as we register
with soc-of-simple. Since the core currently ignores registration this
has no practical impact.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Wed, 3 Dec 2008 19:40:30 +0000 (19:40 +0000)]
ASoC: Add platform registration API
ASoC v2 allows platform drivers to instantiate independantly of the
overall ASoC card. This API allows drivers to notify the core when
they are registered.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Wed, 3 Dec 2008 19:26:35 +0000 (19:26 +0000)]
ASoC: Register platform DAIs
Register all platform DAIs with the core. In line with current behaviour
this is done at module probe time rather than when the devices are probed
(since currently that only happens as the entire ASoC card is registered
except for those drivers that currently implement some kind of hotplug).
Since the core currently ignores DAI registration this has no practical
effect.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Sun, 30 Nov 2008 23:31:24 +0000 (23:31 +0000)]
ASoC: Add DAI registration API
Add API calls to register and unregister DAIs with the core. Currently
these APIs are ineffective. Since multiple DAIs for a given device are
a common case bulk variants are provided.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Fri, 28 Nov 2008 13:29:45 +0000 (13:29 +0000)]
ASoC: Add card registration API
ASoC v2 allows cards, codecs and platforms to instantiate separately,
with the overall ASoC device only being instantiated once all the
required components have registered. As part of backporting Liam's work
introduce an initial version of the card registration functions. At
present these do nothing active and are internal only, they will be
exposed to machine drivers after further backporting. Adding this now
allows the datastructures used for dynamic card instantiation to be
built up gradually.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Tue, 9 Dec 2008 10:35:52 +0000 (12:35 +0200)]
ASoC: TWL4030: Do not alter the Headset output volume on power-up/down
There is a separate gain control for the Headset output already.
Do not reset the gain to 0 dB at power up.
In power-down, there is no need to set the Headset output gain
to power-down mode, since if the CODECPDZ is in powered off this
setting has no effect.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Wed, 3 Dec 2008 17:34:03 +0000 (17:34 +0000)]
ASoC: Push debugfs files out of the snd_soc_device structure
This is in preparation for the removal of struct snd_soc_device.
The pop time configuration should really be a property of the card not
the codec but since DAPM currently uses the codec rather than the card
using the codec is fine for now.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Daniel Mack [Wed, 3 Dec 2008 10:44:17 +0000 (11:44 +0100)]
ASoC: tlv320aic3x: headset/button press support
- Add aic3x_set_headset_detection() function to define the headset
detection mode for tlv32aic3x chips
- added aic3x_button_pressed()
- Read from the real-time registers in aic3x_headset_detected() to query
headset presence without an occured interrupt
Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: TWL4030: Add input selection and gain controls
The TWL4030 codec device has two ADCs. Both of them can have
several inputs routed to them, but TRM says that only one source
can be selected for every ADC, even though every source has a
dedicated bit in the registers.
This patch adds input source controls. It modifies default register
values to have no inputs selected and ADCs disabled. When some
input is selected, control handlers enable apropriate input
amplifier and ADC. If a microphone is selected, bias power is
automatically enabled. When some input is deselected, unused
chip parts are disabled.
Microphone and line input recording tested on OMAP3 pandora board.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Tue, 2 Dec 2008 15:08:03 +0000 (15:08 +0000)]
ASoC: Push workqueue data into snd_soc_card
ASoC v2 does not use the struct snd_soc_device at runtime, using struct
snd_soc_card as the root of the card. Begin removing data from
snd_soc_device by pushing the workqueue data into snd_soc_card, using a
backpointer to the snd_soc_device to keep things going for the time
being.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Mon, 1 Dec 2008 08:03:46 +0000 (10:03 +0200)]
ASoC: TWL4030: Change the common playback volume controls
Add Playback volume controls for all four DACs.
All four paths has three levels of volume controls:
Digital Fine gain, Digital Coarse gain, Analog gain.
The controls are named to reflect their connection to the DACs.
Per DAC volume can be performed, if needed:
amixer sset 'DAC1 Analog' 5,10
DACL1 analog gain to 5
DACR1 analog gain to 10
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Fri, 28 Nov 2008 11:49:07 +0000 (11:49 +0000)]
ASoC: Rename snd_soc_register_card() to snd_soc_init_card()
Currently ASoC card initialisation is completed by a function called
snd_soc_register_card(). As part of the work to allow independant
registration of cards, codecs and machines in ASoC v2 a new function of
the same name has been added so rename the existing function to
facilitate the merge of v2.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Takashi Iwai [Mon, 1 Dec 2008 19:00:47 +0000 (20:00 +0100)]
ALSA: ASoC: Fix compile warnings on corgi.c
Fix the wrong shutdown callback type. Also removed the unused variables
there:
sound/soc/pxa/corgi.c: In function 'corgi_shutdown':
sound/soc/pxa/corgi.c:114: warning: unused variable 'codec'
sound/soc/pxa/corgi.c: At top level:
sound/soc/pxa/corgi.c:175: warning: initialization from incompatible pointer type
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Linus Torvalds [Mon, 1 Dec 2008 16:33:59 +0000 (08:33 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: Apple ALU wireless keyboards are bluetooth devices
HID: remove setup mutex, fix possible deadlock
HID: add USB ID for another dual gameron adapter
HID: unignore mouse on unibody macbooks
HID: fix blacklist entries for greenasia/pantherlord
Kevin Hao [Mon, 1 Dec 2008 11:36:16 +0000 (11:36 +0000)]
Add kref to fake tty used by USB console
We alloc a fake tty in usb serial console setup function. we should
init the tty's kref otherwise we will face WARN_ON after following
invoke of tty_port_tty_set --> tty_kref_get.
Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Will Newton [Mon, 1 Dec 2008 11:36:06 +0000 (11:36 +0000)]
drivers/char/tty_io.c: Avoid panic when no console is configured.
When no console is configured tty_open tries to call kref_get on a NULL
pointer, return ENODEV instead.
Signed-off-by: Will Newton <will.newton@gmail.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
USB: serial: add more Onda device ids to option driver
USB: usb-storage: unusual_devs entry for Nikon D2H
USB: storage: unusual_devs entry for Mio C520-GPS
USB: fsl_usb2_udc: Report disconnect before unbinding
USB: fsl_qe_udc: Report disconnect before unbinding
USB: fix SB600 USB subsystem hang bug
Revert "USB: improve ehci_watchdog's side effect in CPU power management"
Requested-by: David Miller <davem@davemloft.net> Acked-by: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Takashi Iwai [Mon, 1 Dec 2008 14:39:13 +0000 (15:39 +0100)]
ALSA: soc - Fix compile warnings in wm8903.c
Hide annoying uninitialized warnings:
sound/soc/codecs/wm8903.c:382: warning: ‘reg’ may be used uninitialized in this function
sound/soc/codecs/wm8903.c:383: warning: ‘shift’ may be used uninitialized in this function
Alan Stern [Fri, 21 Nov 2008 21:15:12 +0000 (16:15 -0500)]
USB: storage: unusual_devs entry for Mio C520-GPS
This patch (as1176) adds an unusual_devs entry for the Mio C520 GPS
unit. Other devices also based on the Mitac hardware use the same USB
interface firmware, so the Vendor and Product names are generalized.
Anton Vorontsov [Thu, 13 Nov 2008 11:57:20 +0000 (14:57 +0300)]
USB: fsl_qe_udc: Report disconnect before unbinding
Gadgets disable endpoints in their disconnect callbacks, so
we must call disconnect before unbinding. This also fixes
muram memory leak, since we free muram in the qe_ep_disable().
But mainly the patch fixes following badness:
root@b1:~# insmod fsl_qe_udc.ko
fsl_qe_udc: Freescale QE/CPM USB Device Controller driver, 1.0
fsl_qe_udc e01006c0.usb: QE USB controller initialized as device
root@b1:~# insmod g_ether.ko
g_ether gadget: using random self ethernet address
g_ether gadget: using random host ethernet address
usb0: MAC be:2d:3c:fa:be:f0
usb0: HOST MAC 62:b8:6a:df:38:66
g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
g_ether gadget: g_ether ready
fsl_qe_udc e01006c0.usb: fsl_qe_udc bind to driver g_ether
g_ether gadget: high speed config #1: CDC Ethernet (ECM)
root@b1:~# rmmod g_ether.ko
------------[ cut here ]------------
Badness at drivers/usb/gadget/composite.c:871
[...]
NIP [d10c1374] composite_unbind+0x24/0x15c [g_ether]
LR [d10a82f4] usb_gadget_unregister_driver+0x128/0x168 [fsl_qe_udc]
Call Trace:
[cfb93e80] [cfb1f3a0] 0xcfb1f3a0 (unreliable)
[cfb93eb0] [d10a82f4] usb_gadget_unregister_driver+0x128/0x168 [fsl_qe_udc]
[cfb93ed0] [d10c2a3c] usb_composite_unregister+0x3c/0x4c [g_ether]
[cfb93ee0] [c006bde0] sys_delete_module+0x130/0x19c
[cfb93f40] [c00142d8] ret_from_syscall+0x0/0x38
[...]
fsl_qe_udc e01006c0.usb: unregistered gadget driver 'g_ether'
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Shane Huang [Tue, 25 Nov 2008 07:12:33 +0000 (15:12 +0800)]
USB: fix SB600 USB subsystem hang bug
This patch is required for all AMD SB600 revisions to avoid USB subsystem hang
symptom. The USB subsystem hang symptom is observed when the system has
multiple USB devices connected to it. In some cases a USB hub may be required
to observe this symptom.
It was the wrong thing to do, and does not really do what it said
it did.
Cc: Yi Yang <yi.y.yang@intel.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Milton Miller [Sun, 16 Nov 2008 11:44:42 +0000 (11:44 +0000)]
powerpc: Fix build for 32-bit SMP configs
attr_smt_snooze_delay is only defined for CONFIG_PPC64, so protect the
attribute removal with the same condition. This fixes this build error
on 32-bit SMP configurations:
/data/home/miltonm/next.git/arch/powerpc/kernel/sysfs.c: In function ‘unregister_cpu_online’:
/data/home/miltonm/next.git/arch/powerpc/kernel/sysfs.c:722: error: ‘attr_smt_snooze_delay’ undeclared (first use in this function)
/data/home/miltonm/next.git/arch/powerpc/kernel/sysfs.c:722: error: (Each undeclared identifier is reported only once
/data/home/miltonm/next.git/arch/powerpc/kernel/sysfs.c:722: error: for each function it appears in.)
Linus Torvalds [Mon, 1 Dec 2008 00:45:13 +0000 (16:45 -0800)]
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
drm/i915: Fix copy'n'pasteo that broke VT switch if flushing was non-empty.
Linus Torvalds [Mon, 1 Dec 2008 00:44:18 +0000 (16:44 -0800)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
powerpc: Fix system calls on Cell entered with XER.SO=1
powerpc/cell: Fix GDB watchpoints, again
powerpc/mpic: Don't reset affinity for secondary MPIC on boot
powerpc/cell/axon-msi: Retry on missing interrupt
powerpc: Fix boot freeze on machine with empty memory node
powerpc: Fix IRQ assignment for some PCIe devices
powerpc/spufs: Fix spinning in spufs_ps_fault on signal
powerpc/mpc832x_rdb: fix swapped ethernet ids
powerpc: Use generic PHY driver for Marvell 88E1111 PHY on GE Fanuc SBC610
powerpc/85xx: L2 cache size wrong in 8572DS dts
powerpc/virtex: Update defconfigs
powerpc/52xx: update defconfigs
xsysace: Fix driver to use resource_size_t instead of unsigned long
powerpc/virtex: fix various format/casting printk mismatches
powerpc/mpc5200: fix bestcomm Kconfig dependencies
powerpc/44x: Fix 460EX/460GT machine check handling
powerpc/40x: Limit allocable DRAM during early mapping
Linus Torvalds [Mon, 1 Dec 2008 00:39:06 +0000 (16:39 -0800)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
Allow architectures to override copy_user_highpage()
[ARM] pxa/palmtx: misc fixes to use generic GPIO API
ARM: OMAP: Fixes for suspend / resume GPIO wake-up handling
[ARM] pxa/corgi: update default config to exclude tosa from being built
[ARM] pxa/pcm990: use negative number for an invalid GPIO in camera data
ARM: OMAP: Typo fix for clock_allow_idle
ARM: OMAP: Remove broken LCD driver for SX1
[ARM] 5335/1: pxa25x_udc: Fix is_vbus_present to return 1 or 0
[ARM] pxa/MioA701: bluetooth resume fix
[ARM] pxa/MioA701: fix memory corruption.
Paul Mackerras [Sun, 30 Nov 2008 11:49:45 +0000 (11:49 +0000)]
powerpc: Fix system calls on Cell entered with XER.SO=1
It turns out that on Cell, on a kernel with CONFIG_VIRT_CPU_ACCOUNTING
= y, if a program sets the SO (summary overflow) bit in the XER and
then does a system call, the SO bit in CR0 will be set on return
regardless of whether the system call detected an error. Since CR0.SO
is used as the error indication from the system call, this means that
all system calls appear to fail.
The reason is that the workaround for the timebase bug on Cell uses a
compare instruction. With CONFIG_VIRT_CPU_ACCOUNTING = y, the
ACCOUNT_CPU_USER_ENTRY macro reads the timebase, so we end up doing a
compare instruction, which copies XER.SO to CR0.SO. Since we were
doing this in the system call entry patch after clearing CR0.SO but
before saving the CR, this meant that the saved CR image had CR0.SO
set if XER.SO was set on entry.
This fixes it by moving the clearing of CR0.SO to after the
ACCOUNT_CPU_USER_ENTRY call in the system call entry path.
Signed-off-by: Paul Mackerras <paulus@samba.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Arnd Bergmann [Fri, 28 Nov 2008 09:51:24 +0000 (09:51 +0000)]
powerpc/cell: Fix GDB watchpoints, again
An earlier patch from Jens Osterkamp attempted to fix GDB
watchpoints by enabling the DABRX register at boot time.
Unfortunately, this did not work on SMP setups, where
secondary CPUs were still using the power-on DABRX value.
This introduces the same change for secondary CPUs on cell
as well.
Arnd Bergmann [Fri, 28 Nov 2008 09:51:23 +0000 (09:51 +0000)]
powerpc/mpic: Don't reset affinity for secondary MPIC on boot
Kexec/kdump currently fails on the IBM QS2x blades when the kexec happens
on a CPU other than the initial boot CPU. It turns out that this is the
result of mpic_init trying to set affinity of each interrupt vector to the
current boot CPU.
As far as I can tell, the same problem is likely to exist on any
secondary MPIC, because they have to deliver interrupts to the first
output all the time. There are two potential solutions for this: either
not set up affinity at all for secondary MPICs, or assume that a single
CPU output is connected to the upstream interrupt controller and hardcode
affinity to that per architecture.
This patch implements the second approach, defaulting to the first output.
Currently, all known secondary MPICs are routed to their upstream port
using the first destination, so we hardcode that.
Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
Arnd Bergmann [Fri, 28 Nov 2008 09:51:22 +0000 (09:51 +0000)]
powerpc/cell/axon-msi: Retry on missing interrupt
The MSI capture logic for the axon bridge can sometimes
lose interrupts in case of high DMA and interrupt load,
when it signals an MSI interrupt to the MPIC interrupt
controller while we are already handling another MSI.
Each MSI vector gets written into a FIFO buffer in main
memory using DMA, and that DMA access is normally flushed
by the actual interrupt packet on the IOIF. An MMIO
register in the MSIC holds the position of the last
entry in the FIFO buffer that was written. However,
reading that position does not flush the DMA, so that
we can observe stale data in the buffer.
In a stress test, we have observed the DMA to arrive
up to 14 microseconds after reading the register.
This patch works around this problem by retrying the
access to the FIFO buffer.
We can reliably detect the conditioning by writing
an invalid MSI vector into the FIFO buffer after
reading from it, assuming that all MSIs we get
are valid. After detecting an invalid MSI vector,
we udelay(1) in the interrupt cascade for up to
100 times before giving up.
Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
I've reproduced this on 2.6.27.7. It is caused by commit 8f64e1f2d1e09267ac926e15090fd505c1c0cbcb ("powerpc: Reserve in bootmem
lmb reserved regions that cross NUMA nodes").
The problem is that Jon took a loop which was (in pseudocode):
The issue comes in when the 'careful_alloc()' is called on a node with
no memory. It falls back to using bootmem from a previously-initialized
node. But, bootmem has not yet been reserved when Jon's patch is
applied. It gives back bogus memory (0xc000000000000000) and pukes
later in boot.
The following patch collapses the loop back together. It also breaks
the mark_reserved_regions_for_nid() code out into a function and adds
some comments. I think a huge part of introducing this bug is because
for loop was too long and hard to read.
Currently, some PCIe devices on POWER6 machines do not get interrupts
assigned correctly. The problem is that OF doesn't create an
"interrupt" property for them. The fix is for of_irq_map_pci to fall
back to using the value in the PCI interrupt-pin register in config
space, as we do when there is no OF device-tree node for the device.
I have verified that this works fine with a pair of Squib-E SAS
adapter on a P6-570.
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6:
parisc: struct device - replace bus_id with dev_name(), dev_set_name()
parisc: fix kernel crash when unwinding a userspace process
parisc: __kernel_time_t is always long
Linus Torvalds [Sun, 30 Nov 2008 21:06:47 +0000 (13:06 -0800)]
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
sched: prevent divide by zero error in cpu_avg_load_per_task, update
sched, cpusets: fix warning in kernel/cpuset.c
sched: prevent divide by zero error in cpu_avg_load_per_task
Linus Torvalds [Sun, 30 Nov 2008 21:06:20 +0000 (13:06 -0800)]
Merge branch 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
irq.h: fix missing/extra kernel-doc
genirq: __irq_set_trigger: change pr_warning to pr_debug
irq: fix typo
x86: apic honour irq affinity which was set in early boot
genirq: fix the affinity setting in setup_irq
genirq: keep affinities set from userspace across free/request_irq()
Linus Torvalds [Sun, 30 Nov 2008 21:01:04 +0000 (13:01 -0800)]
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: always define DECLARE_PCI_UNMAP* macros
x86: fixup config space size of CPU functions for AMD family 11h
x86, bts: fix wrmsr and spinlock over kmalloc
x86, pebs: fix PEBS record size configuration
x86, bts: turn macro into static inline function
x86, bts: exclude ds.c from build when disabled
arch/x86/kernel/pci-calgary_64.c: change simple_strtol to simple_strtoul
x86: use limited register constraint for setnz
xen: pin correct PGD on suspend
x86: revert irq number limitation
x86: fixing __cpuinit/__init tangle, xsave_cntxt_init()
x86: fix __cpuinit/__init tangle in init_thread_xstate()
oprofile: fix an overflow in ppro code
Linus Torvalds [Sun, 30 Nov 2008 21:00:21 +0000 (13:00 -0800)]
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
drm/i915: Save/restore HWS_PGA on suspend/resume
drm: move drm vblank initialization/cleanup to driver load/unload
drm/i915: execbuffer pins objects, no need to ensure they're still in the GTT
drm/i915: Always read pipestat in irq_handler
drm/i915: Subtract total pinned bytes from available aperture size
drm/i915: Avoid BUG_ONs on VT switch with a wedged chipset.
drm/i915: Remove IMR masking during interrupt handler, and restart it if needed.
drm/i915: Manage PIPESTAT to control vblank interrupts instead of IMR.
Linus Torvalds [Sun, 30 Nov 2008 19:43:41 +0000 (11:43 -0800)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
[CPUFREQ] powernow-k8: ignore out-of-range PstateStatus value
[CPUFREQ] Documentation: Add Blackfin to list of supported processors
Linus Torvalds [Sun, 30 Nov 2008 19:36:57 +0000 (11:36 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/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 - Check model for Dell 92HD73xx laptops
ALSA: hda - mark Dell studio 1535 quirk
ALSA: hda - No 'Headphone as Line-out' swich without line-outs
ALSA: hda - Fix AFG power management on IDT 92HD* codecs
ALSA: hda - Fix caching of SPDIF status bits
ALSA: hda - Add a quirk for Dell Studio 15
ALSA: hda: Add STAC_DELL_M4_3 quirk
sound/sound_core: Fix sparse warnings
ALSA: hda: STAC_DELL_M6 EAPD
Linus Torvalds [Sun, 30 Nov 2008 19:34:17 +0000 (11:34 -0800)]
Merge branch 'linux-next' of git://git.infradead.org/~dedekind/ubi-2.6
* 'linux-next' of git://git.infradead.org/~dedekind/ubi-2.6:
UBI: Don't exit from ubi_thread until kthread_should_stop() is true
UBI: fix EBADMSG handling