linux/arch/arm
Russell King 633dc92a28 ARM: DMA mapping: fix bad atomic test
Realview fails to boot with this warning:
BUG: spinlock lockup suspected on CPU#0, init/1
 lock: 0xcf8bde10, .magic: dead4ead, .owner: init/1, .owner_cpu: 0
Backtrace:
[<c00185d8>] (dump_backtrace+0x0/0x10c) from [<c03294e8>] (dump_stack+0x18/0x1c) r6:cf8bde10 r5:cf83d1c0 r4:cf8bde10 r3:cf83d1c0
[<c03294d0>] (dump_stack+0x0/0x1c) from [<c018926c>] (spin_dump+0x84/0x98)
[<c01891e8>] (spin_dump+0x0/0x98) from [<c0189460>] (do_raw_spin_lock+0x100/0x198)
[<c0189360>] (do_raw_spin_lock+0x0/0x198) from [<c032cbac>] (_raw_spin_lock+0x3c/0x44)
[<c032cb70>] (_raw_spin_lock+0x0/0x44) from [<c01c9224>] (pl011_console_write+0xe8/0x11c)
[<c01c913c>] (pl011_console_write+0x0/0x11c) from [<c002aea8>] (call_console_drivers.clone.7+0xdc/0x104)
[<c002adcc>] (call_console_drivers.clone.7+0x0/0x104) from [<c002b320>] (console_unlock+0x2e8/0x454)
[<c002b038>] (console_unlock+0x0/0x454) from [<c002b8b4>] (vprintk_emit+0x2d8/0x594)
[<c002b5dc>] (vprintk_emit+0x0/0x594) from [<c0329718>] (printk+0x3c/0x44)
[<c03296dc>] (printk+0x0/0x44) from [<c002929c>] (warn_slowpath_common+0x28/0x6c)
[<c0029274>] (warn_slowpath_common+0x0/0x6c) from [<c0029304>] (warn_slowpath_null+0x24/0x2c)
[<c00292e0>] (warn_slowpath_null+0x0/0x2c) from [<c0070ab0>] (lockdep_trace_alloc+0xd8/0xf0)
[<c00709d8>] (lockdep_trace_alloc+0x0/0xf0) from [<c00c0850>] (kmem_cache_alloc+0x24/0x11c)
[<c00c082c>] (kmem_cache_alloc+0x0/0x11c) from [<c00bb044>] (__get_vm_area_node.clone.24+0x7c/0x16c)
[<c00bafc8>] (__get_vm_area_node.clone.24+0x0/0x16c) from [<c00bb7b8>] (get_vm_area_caller+0x48/0x54)
[<c00bb770>] (get_vm_area_caller+0x0/0x54) from [<c0020064>] (__alloc_remap_buffer.clone.15+0x38/0xb8)
[<c002002c>] (__alloc_remap_buffer.clone.15+0x0/0xb8) from [<c0020244>] (__dma_alloc+0x160/0x2c8)
[<c00200e4>] (__dma_alloc+0x0/0x2c8) from [<c00204d8>] (arm_dma_alloc+0x88/0xa0)[<c0020450>] (arm_dma_alloc+0x0/0xa0) from [<c00beb00>] (dma_pool_alloc+0xcc/0x1a8)
[<c00bea34>] (dma_pool_alloc+0x0/0x1a8) from [<c01a9d14>] (pl08x_fill_llis_for_desc+0x28/0x568)
[<c01a9cec>] (pl08x_fill_llis_for_desc+0x0/0x568) from [<c01aab8c>] (pl08x_prep_slave_sg+0x258/0x3b0)
[<c01aa934>] (pl08x_prep_slave_sg+0x0/0x3b0) from [<c01c9f74>] (pl011_dma_tx_refill+0x140/0x288)
[<c01c9e34>] (pl011_dma_tx_refill+0x0/0x288) from [<c01ca748>] (pl011_start_tx+0xe4/0x120)
[<c01ca664>] (pl011_start_tx+0x0/0x120) from [<c01c54a4>] (__uart_start+0x48/0x4c)
[<c01c545c>] (__uart_start+0x0/0x4c) from [<c01c632c>] (uart_start+0x2c/0x3c)
[<c01c6300>] (uart_start+0x0/0x3c) from [<c01c795c>] (uart_write+0xcc/0xf4)
[<c01c7890>] (uart_write+0x0/0xf4) from [<c01b0384>] (n_tty_write+0x1c0/0x3e4)
[<c01b01c4>] (n_tty_write+0x0/0x3e4) from [<c01acfe8>] (tty_write+0x144/0x240)
[<c01acea4>] (tty_write+0x0/0x240) from [<c01ad17c>] (redirected_tty_write+0x98/0xac)
[<c01ad0e4>] (redirected_tty_write+0x0/0xac) from [<c00c371c>] (vfs_write+0xbc/0x150)
[<c00c3660>] (vfs_write+0x0/0x150) from [<c00c39c0>] (sys_write+0x4c/0x78)
[<c00c3974>] (sys_write+0x0/0x78) from [<c0014460>] (ret_fast_syscall+0x0/0x3c)

This happens because the DMA allocation code is not respecting atomic
allocations correctly.

GFP flags should not be tested for GFP_ATOMIC to determine if an
atomic allocation is being requested.  GFP_ATOMIC is not a flag but
a value.  The GFP bitmask flags are all prefixed with __GFP_.

The rest of the kernel tests for __GFP_WAIT not being set to indicate
an atomic allocation.  We need to do the same.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-02-08 10:25:23 +00:00
..
boot Merge branch 'vexpress/fixes' of git://git.linaro.org/people/pawelmoll/linux into fixes 2013-01-24 08:12:24 -08:00
common ARM: GIC: fix GIC cpumask initialization 2013-02-08 10:17:22 +00:00
configs ARM: at91/at91_dt_defconfig: add at91sam9n12 SoC to DT defconfig 2013-01-23 10:39:58 +01:00
crypto
include Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2012-12-20 18:05:28 -08:00
kernel Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm 2013-01-24 12:44:57 -08:00
lib
mach-at91 ARM: at91: rm9200: remake the BGA as default version 2013-01-23 10:31:14 +01:00
mach-bcm Add support for generic BCM SoC chipsets 2012-11-19 22:39:07 -08:00
mach-bcm2835 ARM: arm-soc: SoC updates for 3.8 2012-12-12 12:05:15 -08:00
mach-clps711x ARM: clps711x: Rename board files to match functionality 2012-11-21 09:57:46 -08:00
mach-cns3xxx ARM: arm-soc: Non-critical bug fixes 2012-12-12 11:32:16 -08:00
mach-davinci ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-dove ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-ebsa110
mach-ep93xx ARM: ep93xx: properly wait for UART FIFO to be empty 2012-12-12 11:22:56 +11:00
mach-exynos ARM: EXYNOS: skip the clock initialization for exynos5440 2013-01-05 08:32:55 -08:00
mach-footbridge
mach-gemini
mach-h720x
mach-highbank ARM: highbank: save and restore L2 cache and GIC on suspend 2013-01-07 21:08:26 -08:00
mach-imx ARM: arm-soc: Fixes for 3.8-rc, take 2 2013-01-24 12:42:50 -08:00
mach-integrator ARM: integrator: move syscon remap for AP PCIv3 2013-01-11 11:25:22 -08:00
mach-iop13xx ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-iop32x
mach-iop33x
mach-ixp4xx Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2012-12-12 11:30:02 -08:00
mach-kirkwood Merge branch 'v3.8-samsung-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into fixes 2013-01-16 19:58:58 -08:00
mach-ks8695 ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-l7200/include/mach
mach-lpc32xx ARM: LPC32xx: Add the motor PWM clock 2012-11-12 11:27:40 +01:00
mach-mmp ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-msm ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-mv78xx0 ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-mvebu arm: mvebu: Fix compile for multiplatform when ARMv6 is selected 2013-01-11 12:17:58 -08:00
mach-mxs Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-12-18 09:58:09 -08:00
mach-netx treewide: Fix typos in various drivers 2012-12-03 11:05:04 +01:00
mach-nomadik ARM: nomadik: bump the IRQ numbers again 2013-01-03 23:42:07 +01:00
mach-omap1 ARM: arm-soc fixes for 3.8-rc 2013-01-08 18:53:56 -08:00
mach-omap2 ARM: OMAP2+: omap4-panda: add UART2 muxing for WiLink shared transport 2013-01-21 10:39:53 -08:00
mach-orion5x ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-picoxcell
mach-prima2 ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-pxa Merge remote-tracking branch 'asoc/fix/pxa' into tmp 2013-01-10 12:22:16 +00:00
mach-realview ARM: realview: ensure that we have sufficient IRQs available 2013-02-08 10:23:32 +00:00
mach-rpc
mach-s3c24xx ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-s3c64xx ARM: S3C64XX: Fix up IRQ mapping for balblair on Cragganmore 2013-01-16 15:49:53 -08:00
mach-s3c2410
mach-s3c2412
mach-s3c2440
mach-s5p64x0 ARM: S5P64X0: Add I2S clkdev support 2012-12-19 09:49:29 -08:00
mach-s5pc100 ARM: S5PC100: Add I2S clkdev support 2012-12-19 09:49:29 -08:00
mach-s5pv210 ARM: S5PV210: Avoid passing the clks through platform data 2012-12-19 09:49:29 -08:00
mach-sa1100 ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-shark
mach-shmobile fbdev changes for 3.8: 2012-12-15 13:03:48 -08:00
mach-socfpga ARM: socfpga: mark secondary_trampoline as cpuinit 2012-11-06 23:14:49 +01:00
mach-spear3xx ARM: SPEAr3xx: Shirq: Move shirq controller out of plat/ 2012-11-26 16:55:33 +05:30
mach-spear6xx
mach-spear13xx ARM: SPEAr1310: Fix AUXDATA for compact flash controller 2012-11-26 16:55:31 +05:30
mach-sunxi sunxi: Change the machine compatible string. 2012-12-23 18:20:15 +01:00
mach-tegra ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-u300 ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mach-ux500 ARM: ux500: add pinctrl address resources 2012-12-26 01:59:54 +01:00
mach-versatile ARM: 7610/1: versatile: bump IRQ numbers 2013-01-02 10:35:06 +00:00
mach-vexpress ARM: 7609/1: disable errata work-arounds which access secure registers 2013-01-02 10:35:05 +00:00
mach-vt8500 ARM: arm-soc: multiplatform conversion patches 2012-12-13 10:57:16 -08:00
mach-w90x900
mach-zynq ARM: zynq: Remove all unused mach headers 2012-11-21 10:52:21 +01:00
mm ARM: DMA mapping: fix bad atomic test 2013-02-08 10:25:23 +00:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-12-12 18:07:07 -08:00
nwfpe
oprofile
plat-iop
plat-omap ARM: arm-soc fixes for 3.8-rc 2013-01-08 18:53:56 -08:00
plat-orion ARM: arm-soc: Updates for Marvell mvebu/kirkwood 2012-12-14 14:54:26 -08:00
plat-pxa ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
plat-s3c24xx Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-12-13 12:00:02 -08:00
plat-samsung ARM: arm-soc fixes for 3.8-rc 2013-01-08 18:53:56 -08:00
plat-spear ARM: SPEAr3xx: Shirq: Move shirq controller out of plat/ 2012-11-26 16:55:33 +05:30
plat-versatile ARM: vexpress: extend the MPIDR range used for pen release check 2013-01-24 12:19:23 +00:00
tools ARM: boot: Fix usage of kecho 2012-11-12 23:22:54 +01:00
vfp ARM: 7627/1: Predicate preempt logic on PREEMP_COUNT not PREEMPT alone 2013-01-16 16:51:10 +00:00
xen Features: 2012-12-13 14:29:16 -08:00
Kconfig Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm 2013-01-09 08:58:57 -08:00
Kconfig-nommu
Kconfig.debug ARM: arm-soc: multiplatform conversion patches 2012-12-13 10:57:16 -08:00
Makefile ARM: arm-soc: multiplatform conversion patches 2012-12-13 10:57:16 -08:00