linux/arch/arm
Paul Walmsley 0d8e2d0dad OMAP2+: PM/serial: hold console semaphore while OMAP UARTs are disabled
The console semaphore must be held while the OMAP UART devices are
disabled, lest a console write cause an ARM abort (and a kernel crash)
when the underlying console device is inaccessible.  These crashes
only occur when the console is on one of the OMAP internal serial
ports.

While this problem has been latent in the PM idle loop for some time,
the crash was not triggerable with an unmodified kernel until commit
6f251e9db1 ("OMAP: UART: omap_device
conversions, remove implicit 8520 assumptions").  After this patch, a
console write often occurs after the console UART has been disabled in
the idle loop, crashing the system.  Several users have encountered
this bug:

    http://www.mail-archive.com/linux-omap@vger.kernel.org/msg38396.html

    http://www.mail-archive.com/linux-omap@vger.kernel.org/msg36602.html

The same commit also introduced new code that disabled the UARTs
during init, in omap_serial_init_port().  The kernel will also crash
in this code when earlyconsole and extra debugging is enabled:

    http://www.mail-archive.com/linux-omap@vger.kernel.org/msg36411.html

The minimal fix for the -rc series is to hold the console semaphore
while the OMAP UARTs are disabled.  This is a somewhat overbroad fix,
since the console may not be located on an OMAP UART, as is the case
with the GPMC UART on Zoom3.  While it is technically possible to
determine which devices the console or earlyconsole is actually
running on, it is not a trivial problem to solve, and the code to do
so is not really appropriate for the -rc series.

The right long-term fix is to ensure that no code outside of the OMAP
serial driver can disable an OMAP UART.  As I understand it, code to
implement this is under development by TI.

This patch is a collaboration between Paul Walmsley <paul@pwsan.com>
and Tony Lindgren <tony@atomide.com>.  Thanks to Ming Lei
<tom.leiming@gmail.com> and Pramod <pramod.gurav@ti.com> for their
feedback on earlier versions of this patch.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Ming Lei <tom.leiming@gmail.com>
Cc: Pramod <pramod.gurav@ti.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Jean Pihet <jean.pihet@newoldbits.com>
Cc: Govindraj.R <govindraj.raja@ti.com>
2010-11-24 16:14:30 -08:00
..
boot ARM: avoid marking decompressor .stack section as having contents 2010-11-22 12:00:59 +00:00
common ARM: GIC: don't disable software generated interrupts 2010-11-12 15:15:29 +00:00
configs Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel-stable 2010-10-28 11:13:00 +01:00
include/asm ARM: 6490/1: MM: bugfix: initialize spinlock for init_mm.context 2010-11-23 22:46:12 +00:00
kernel ARM: arch/arm/kernel/traps.c: Convert sprintf_symbol to %pS 2010-11-07 17:58:40 +00:00
lib ARM: 6482/2: Fix find_next_zero_bit and related assembly 2010-11-24 20:17:46 +00:00
mach-aaec2000 ARM: 6484/1: fix compile warning in mm/init.c 2010-11-21 22:05:56 +00:00
mach-at91 at91/atmel-mci: inclusion of sd/mmc driver in at91sam9g45 chip and board 2010-10-26 11:32:49 +02:00
mach-bcmring ARM: 6484/1: fix compile warning in mm/init.c 2010-11-21 22:05:56 +00:00
mach-clps711x ARM: 6484/1: fix compile warning in mm/init.c 2010-11-21 22:05:56 +00:00
mach-cns3xxx arm: remove machine_desc.io_pg_offst and .phys_io 2010-10-20 00:27:46 -04:00
mach-davinci ASoC: davinci: fixes for multi-component 2010-11-17 18:36:40 +00:00
mach-dove arm: remove machine_desc.io_pg_offst and .phys_io 2010-10-20 00:27:46 -04:00
mach-ebsa110 ARM: 6484/1: fix compile warning in mm/init.c 2010-11-21 22:05:56 +00:00
mach-ep93xx ARM: 6462/1: EP93xx: Document DMA M2P API 2010-11-07 16:13:30 +00:00
mach-footbridge ARM: 6484/1: fix compile warning in mm/init.c 2010-11-21 22:05:56 +00:00
mach-gemini arm: remove machine_desc.io_pg_offst and .phys_io 2010-10-20 00:27:46 -04:00
mach-h720x ARM: 6484/1: fix compile warning in mm/init.c 2010-11-21 22:05:56 +00:00
mach-imx ARM i.MX27 eukrea: Fix compilation 2010-11-15 09:25:05 +01:00
mach-integrator ARM: 6484/1: fix compile warning in mm/init.c 2010-11-21 22:05:56 +00:00
mach-iop13xx Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2010-10-21 16:42:32 -07:00
mach-iop32x arm: remove machine_desc.io_pg_offst and .phys_io 2010-10-20 00:27:46 -04:00
mach-iop33x arm: remove machine_desc.io_pg_offst and .phys_io 2010-10-20 00:27:46 -04:00
mach-ixp4xx arm: remove machine_desc.io_pg_offst and .phys_io 2010-10-20 00:27:46 -04:00
mach-ixp23xx arm: remove machine_desc.io_pg_offst and .phys_io 2010-10-20 00:27:46 -04:00
mach-ixp2000 ARM: 6460/1: ixp2000: fix type of ixp2000_timer_interrupt 2010-10-27 21:40:28 +01:00
mach-kirkwood Merge git://git.kernel.org/pub/scm/linux/kernel/git/nico/orion 2010-11-07 16:10:56 +00:00
mach-ks8695 arm: remove machine_desc.io_pg_offst and .phys_io 2010-10-20 00:27:46 -04:00
mach-l7200/include/mach arm: return both physical and virtual addresses from addruart 2010-10-20 00:27:33 -04:00
mach-lh7a40x arm: remove machine_desc.io_pg_offst and .phys_io 2010-10-20 00:27:46 -04:00
mach-loki arm: remove machine_desc.io_pg_offst and .phys_io 2010-10-20 00:27:46 -04:00
mach-lpc32xx Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2010-10-21 16:42:32 -07:00
mach-mmp ARM: mmp: fix cpuid detection on mmp2 2010-11-03 23:11:16 +08:00
mach-msm ARM: 6484/1: fix compile warning in mm/init.c 2010-11-21 22:05:56 +00:00
mach-mv78xx0 Merge git://git.kernel.org/pub/scm/linux/kernel/git/nico/orion 2010-11-07 16:10:56 +00:00
mach-mx3 ARM i.MX pcm037 eet: compile fixes 2010-11-15 09:25:03 +01:00
mach-mx5 Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel-stable 2010-10-28 11:13:00 +01:00
mach-mx25 mx25: fix spi device registration typo 2010-11-15 09:25:06 +01:00
mach-mxc91231 arm: remove machine_desc.io_pg_offst and .phys_io 2010-10-20 00:27:46 -04:00
mach-netx ARM: 6484/1: fix compile warning in mm/init.c 2010-11-21 22:05:56 +00:00
mach-nomadik arm: remove machine_desc.io_pg_offst and .phys_io 2010-10-20 00:27:46 -04:00
mach-ns9xxx arm: return both physical and virtual addresses from addruart 2010-10-20 00:27:33 -04:00
mach-nuc93x arm: remove machine_desc.io_pg_offst and .phys_io 2010-10-20 00:27:46 -04:00
mach-omap1 ARM: 6484/1: fix compile warning in mm/init.c 2010-11-21 22:05:56 +00:00
mach-omap2 OMAP2+: PM/serial: hold console semaphore while OMAP UARTs are disabled 2010-11-24 16:14:30 -08:00
mach-orion5x Merge git://git.kernel.org/pub/scm/linux/kernel/git/nico/orion 2010-11-07 16:10:56 +00:00
mach-pnx4008 ARM: 6484/1: fix compile warning in mm/init.c 2010-11-21 22:05:56 +00:00
mach-pxa ARM: pxa/saar: fix the building failure caused by typo 2010-11-03 23:11:19 +08:00
mach-realview arm: remove machine_desc.io_pg_offst and .phys_io 2010-10-20 00:27:46 -04:00
mach-rpc ARM: 6484/1: fix compile warning in mm/init.c 2010-11-21 22:05:56 +00:00
mach-s3c24a0/include/mach Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into devel-stable 2010-10-28 12:27:34 +01:00
mach-s3c64xx ARM: SAMSUNG: Fix HAVE_S3C2410_WATCHDOG warnings 2010-11-13 16:30:29 +09:00
mach-s3c2400
mach-s3c2410 Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2010-10-30 08:26:25 -07:00
mach-s3c2412 Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into devel-stable 2010-10-28 12:27:34 +01:00
mach-s3c2416 Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into devel-stable 2010-10-28 12:27:34 +01:00
mach-s3c2440 Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2010-10-30 08:26:25 -07:00
mach-s3c2443 Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into devel-stable 2010-10-28 12:27:34 +01:00
mach-s5p64x0 Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into devel-stable 2010-10-28 12:27:34 +01:00
mach-s5p6442 Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into devel-stable 2010-10-28 12:27:34 +01:00
mach-s5pc100 Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into devel-stable 2010-10-28 12:27:34 +01:00
mach-s5pv210 Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into devel-stable 2010-10-28 12:27:34 +01:00
mach-s5pv310 Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into devel-stable 2010-10-28 12:27:34 +01:00
mach-sa1100 ARM: 6449/1: Fix for compiler warning of uninitialized variable. 2010-10-27 21:40:28 +01:00
mach-shark ARM: 6484/1: fix compile warning in mm/init.c 2010-11-21 22:05:56 +00:00
mach-shmobile Merge branch 'common/clkfwk' into sh-fixes-for-linus 2010-11-16 10:11:20 +09:00
mach-spear3xx
mach-spear6xx
mach-stmp37xx arm: remove machine_desc.io_pg_offst and .phys_io 2010-10-20 00:27:46 -04:00
mach-stmp378x arm: remove machine_desc.io_pg_offst and .phys_io 2010-10-20 00:27:46 -04:00
mach-tcc8k arm: remove machine_desc.io_pg_offst and .phys_io 2010-10-20 00:27:46 -04:00
mach-tegra Remove duplicate includes from many files 2010-10-27 18:03:18 -07:00
mach-u300 Merge branch 'next-spi' of git://git.secretlab.ca/git/linux-2.6 2010-11-01 07:50:43 -04:00
mach-ux500 ARM: 6473/1: Small update to ux500 specific L2 cache code 2010-11-21 22:05:56 +00:00
mach-versatile ARM: 6484/1: fix compile warning in mm/init.c 2010-11-21 22:05:56 +00:00
mach-vexpress ARM: 6472/1: vexpress ct-ca9x4: only set twd_base if local timers are being used 2010-11-10 15:11:19 +00:00
mach-w90x900 arm: remove machine_desc.io_pg_offst and .phys_io 2010-10-20 00:27:46 -04:00
mm ARM: avoid annoying <4>'s in printk output 2010-11-23 22:27:55 +00:00
nwfpe
oprofile
plat-iop
plat-mxc ARM i.MX spi: fix compilation for i.MX21 2010-11-15 09:25:04 +01:00
plat-nomadik ARM: 6488/1: nomadik: prevent sched_clock() wraparound 2010-11-21 22:05:57 +00:00
plat-omap Merge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2010-11-15 14:06:11 -08:00
plat-orion [ARM] Kirkwood: restrict the scope of the PCIe reset workaround 2010-10-21 15:52:03 -04:00
plat-pxa Merge git://git.infradead.org/mtd-2.6 2010-10-30 08:31:35 -07:00
plat-s3c24xx Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2010-10-30 08:26:25 -07:00
plat-s5p ARM: S5P: Add initial map for GPIO2 and GPIO3 2010-10-25 16:06:22 +09:00
plat-samsung Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into devel-stable 2010-10-28 12:27:34 +01:00
plat-spear arm: return both physical and virtual addresses from addruart 2010-10-20 00:27:33 -04:00
plat-stmp3xxx arm: return both physical and virtual addresses from addruart 2010-10-20 00:27:33 -04:00
plat-tcc arm: return both physical and virtual addresses from addruart 2010-10-20 00:27:33 -04:00
plat-versatile
tools
vfp
Kconfig Merge branch 's5p-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung 2010-11-15 08:43:04 -08:00
Kconfig-nommu
Kconfig.debug Merge branch 'devel-stable' into devel 2010-10-19 22:06:36 +01:00
Makefile Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into devel-stable 2010-10-19 20:12:24 +01:00