From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Greg KH <gregkh@linuxfoundation.org>,
torvalds@linux-foundation.org, akpm@linux-foundation.org,
alan@lxorguk.ukuu.org.uk, Will Deacon <will.deacon@arm.com>,
Russell King <rmk+kernel@arm.linux.org.uk>
Subject: [ 15/65] ARM: 7480/1: only call smp_send_stop() on SMP
Date: Mon, 13 Aug 2012 15:13:59 -0700 [thread overview]
Message-ID: <20120813221416.304707536@linuxfoundation.org> (raw)
In-Reply-To: <20120813221414.965154048@linuxfoundation.org>
From: Greg KH <gregkh@linuxfoundation.org>
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Javier Martinez Canillas <javier@dowhile0.org>
commit c5dff4ffd327088d85035bec535b7d0c9ea03151 upstream.
On reboot or poweroff (machine_shutdown()) a call to smp_send_stop() is
made (to stop the others CPU's) when CONFIG_SMP=y.
arch/arm/kernel/process.c:
void machine_shutdown(void)
{
#ifdef CONFIG_SMP
smp_send_stop();
#endif
}
smp_send_stop() calls the function pointer smp_cross_call(), which is set
on the smp_init_cpus() function for OMAP processors.
arch/arm/mach-omap2/omap-smp.c:
void __init smp_init_cpus(void)
{
...
set_smp_cross_call(gic_raise_softirq);
...
}
But the ARM setup_arch() function only calls smp_init_cpus()
if CONFIG_SMP=y && is_smp().
arm/kernel/setup.c:
void __init setup_arch(char **cmdline_p)
{
...
#ifdef CONFIG_SMP
if (is_smp())
smp_init_cpus();
#endif
...
}
Newer OMAP CPU's are SMP machines so omap2plus_defconfig sets
CONFIG_SMP=y. Unfortunately on an OMAP UP machine is_smp()
returns false and smp_init_cpus() is never called and the
smp_cross_call() function remains NULL.
If the machine is rebooted or powered off, smp_send_stop() will
be called (since CONFIG_SMP=y) leading to the following error:
[ 42.815551] Restarting system.
[ 42.819030] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[ 42.827667] pgd = d7a74000
[ 42.830566] [00000000] *pgd=96ce7831, *pte=00000000, *ppte=00000000
[ 42.837249] Internal error: Oops: 80000007 [#1] SMP ARM
[ 42.842773] Modules linked in:
[ 42.846008] CPU: 0 Not tainted (3.5.0-rc3-next-20120622-00002-g62e87ba-dirty #44)
[ 42.854278] PC is at 0x0
[ 42.856994] LR is at smp_send_stop+0x4c/0xe4
[ 42.861511] pc : [<00000000>] lr : [<c00183a4>] psr: 60000013
[ 42.861511] sp : d6c85e70 ip : 00000000 fp : 00000000
[ 42.873626] r10: 00000000 r9 : d6c84000 r8 : 00000002
[ 42.879150] r7 : c07235a0 r6 : c06dd2d0 r5 : 000f4241 r4 : d6c85e74
[ 42.886047] r3 : 00000000 r2 : 00000000 r1 : 00000006 r0 : d6c85e74
[ 42.892944] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 42.900482] Control: 10c5387d Table: 97a74019 DAC: 00000015
[ 42.906555] Process reboot (pid: 1166, stack limit = 0xd6c842f8)
[ 42.912902] Stack: (0xd6c85e70 to 0xd6c86000)
[ 42.917510] 5e60: c07235a0 00000000 00000000 d6c84000
[ 42.926177] 5e80: 01234567 c00143d0 4321fedc c00511bc d6c85ebc 00000168 00000460 00000000
[ 42.934814] 5ea0: c1017950 a0000013 c1017900 d8014390 d7ec3858 c0498e48 c1017950 00000000
[ 42.943481] 5ec0: d6ddde10 d6c85f78 00000003 00000000 d6ddde10 d6c84000 00000000 00000000
[ 42.952117] 5ee0: 00000002 00000000 00000000 c0088c88 00000002 00000000 00000000 c00f4b90
[ 42.960784] 5f00: 00000000 d6c85ebc d8014390 d7e311c8 60000013 00000103 00000002 d6c84000
[ 42.969421] 5f20: c00f3274 d6e00a00 00000001 60000013 d6c84000 00000000 00000000 c00895d4
[ 42.978057] 5f40: 00000002 d8007c80 d781f000 c00f6150 d8010cc0 c00f3274 d781f000 d6c84000
[ 42.986694] 5f60: c0013020 d6e00a00 00000001 20000010 0001257c ef000000 00000000 c00895d4
[ 42.995361] 5f80: 00000002 00000001 00000003 00000000 00000001 00000003 00000000 00000058
[ 43.003997] 5fa0: c00130c8 c0012f00 00000001 00000003 fee1dead 28121969 01234567 00000002
[ 43.012634] 5fc0: 00000001 00000003 00000000 00000058 00012584 0001257c 00000001 00000000
[ 43.021270] 5fe0: 000124bc bec5cc6c 00008f9c 4a2f7c40 20000010 fee1dead 00000000 00000000
[ 43.029968] [<c00183a4>] (smp_send_stop+0x4c/0xe4) from [<c00143d0>] (machine_restart+0xc/0x4c)
[ 43.039154] [<c00143d0>] (machine_restart+0xc/0x4c) from [<c00511bc>] (sys_reboot+0x144/0x1f0)
[ 43.048278] [<c00511bc>] (sys_reboot+0x144/0x1f0) from [<c0012f00>] (ret_fast_syscall+0x0/0x3c)
[ 43.057464] Code: bad PC value
[ 43.060760] ---[ end trace c3988d1dd0b8f0fb ]---
Add a check so smp_cross_call() is only called when there is more than one CPU on-line.
Signed-off-by: Javier Martinez Canillas <javier at dowhile0.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm/kernel/smp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -590,7 +590,8 @@ void smp_send_stop(void)
cpumask_copy(&mask, cpu_online_mask);
cpumask_clear_cpu(smp_processor_id(), &mask);
- smp_cross_call(&mask, IPI_CPU_STOP);
+ if (!cpumask_empty(&mask))
+ smp_cross_call(&mask, IPI_CPU_STOP);
/* Wait up to one second for other CPUs to stop */
timeout = USEC_PER_SEC;
next prev parent reply other threads:[~2012-08-13 22:15 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-13 22:13 [ 00/65] 3.4.9-stable review Greg Kroah-Hartman
2012-08-13 22:13 ` [ 01/65] [IA64] Redefine ATOMIC_INIT and ATOMIC64_INIT to drop the casts Greg Kroah-Hartman
2012-08-13 22:13 ` [ 02/65] asus-wmi: use ASUS_WMI_METHODID_DSTS2 as default DSTS ID Greg Kroah-Hartman
2012-08-13 22:13 ` [ 03/65] sunrpc: clnt: Add missing braces Greg Kroah-Hartman
2012-08-13 22:13 ` [ 04/65] SUNRPC: return negative value in case rpcbind client creation error Greg Kroah-Hartman
2012-08-13 22:13 ` [ 05/65] nilfs2: fix deadlock issue between chcp and thaw ioctls Greg Kroah-Hartman
2012-08-13 22:13 ` [ 06/65] media: ene_ir: Fix driver initialisation Greg Kroah-Hartman
2012-08-13 22:13 ` [ 07/65] pcdp: use early_ioremap/early_iounmap to access pcdp table Greg Kroah-Hartman
2012-08-13 22:13 ` [ 08/65] mm: fix wrong argument of migrate_huge_pages() in soft_offline_huge_page() Greg Kroah-Hartman
2012-08-13 22:13 ` [ 09/65] ARM: 7466/1: disable interrupt before spinning endlessly Greg Kroah-Hartman
2012-08-13 22:13 ` [ 10/65] ARM: 7467/1: mutex: use generic xchg-based implementation for ARMv6+ Greg Kroah-Hartman
2012-08-15 4:29 ` Ben Hutchings
2012-08-15 9:10 ` Will Deacon
2012-08-13 22:13 ` [ 11/65] ARM: 7476/1: vfp: only clear vfp state for current cpu in vfp_pm_suspend Greg Kroah-Hartman
2012-08-13 22:13 ` [ 12/65] ARM: 7477/1: vfp: Always save VFP state in vfp_pm_suspend on UP Greg Kroah-Hartman
2012-08-13 22:13 ` [ 13/65] ARM: 7478/1: errata: extend workaround for erratum #720789 Greg Kroah-Hartman
2012-08-13 22:13 ` [ 14/65] ARM: 7479/1: mm: avoid NULL dereference when flushing gate_vma with VIVT caches Greg Kroah-Hartman
2012-08-13 22:13 ` Greg Kroah-Hartman [this message]
2012-08-13 22:14 ` [ 16/65] ARM: Fix undefined instruction exception handling Greg Kroah-Hartman
2012-08-13 22:14 ` [ 17/65] ALSA: hda - add dock support for Thinkpad T430s Greg Kroah-Hartman
2012-08-13 22:14 ` [ 18/65] ALSA: hda - add dock support for Thinkpad X230 Greg Kroah-Hartman
2012-08-13 22:14 ` [ 19/65] ALSA: hda - remove quirk for Dell Vostro 1015 Greg Kroah-Hartman
2012-08-13 22:14 ` [ 20/65] ALSA: hda - Fix double quirk for Quanta FL1 / Lenovo Ideapad Greg Kroah-Hartman
2012-08-13 22:14 ` [ 21/65] mm: mmu_notifier: fix freed page still mapped in secondary MMU Greg Kroah-Hartman
2012-08-13 22:14 ` [ 22/65] md/raid1: dont abort a resync on the first badblock Greg Kroah-Hartman
2012-08-13 22:14 ` [ 23/65] video/smscufx: fix line counting in fb_write Greg Kroah-Hartman
2012-08-13 22:14 ` [ 24/65] ore: Fix out-of-bounds access in _ios_obj() Greg Kroah-Hartman
2012-08-13 22:14 ` [ 25/65] ACPI processor: Fix tick_broadcast_mask online/offline regression Greg Kroah-Hartman
2012-08-13 22:14 ` [ 26/65] mac80211: cancel mesh path timer Greg Kroah-Hartman
2012-08-13 22:14 ` [ 27/65] ath9k: Add PID/VID support for AR1111 Greg Kroah-Hartman
2012-08-13 22:14 ` [ 28/65] wireless: reg: restore previous behaviour of chan->max_power calculations Greg Kroah-Hartman
2012-08-13 22:14 ` [ 29/65] x86, nops: Missing break resulting in incorrect selection on Intel Greg Kroah-Hartman
2012-08-13 22:14 ` [ 30/65] random: make add_interrupt_randomness() do something sane Greg Kroah-Hartman
2012-08-13 22:14 ` [ 31/65] random: use lockless techniques in the interrupt path Greg Kroah-Hartman
2012-08-13 22:14 ` [ 32/65] random: create add_device_randomness() interface Greg Kroah-Hartman
2012-08-13 22:14 ` [ 33/65] usb: feed USB device information to the /dev/random driver Greg Kroah-Hartman
2012-08-13 22:14 ` [ 34/65] net: feed /dev/random with the MAC address when registering a device Greg Kroah-Hartman
2012-08-13 22:14 ` [ 35/65] random: use the arch-specific rng in xfer_secondary_pool Greg Kroah-Hartman
2012-08-13 22:14 ` [ 36/65] random: add new get_random_bytes_arch() function Greg Kroah-Hartman
2012-08-13 22:14 ` [ 37/65] random: add tracepoints for easier debugging and verification Greg Kroah-Hartman
2012-08-13 22:14 ` [ 38/65] MAINTAINERS: Theodore Tso is taking over the random driver Greg Kroah-Hartman
2012-08-13 22:14 ` [ 39/65] rtc: wm831x: Feed the write counter into device_add_randomness() Greg Kroah-Hartman
2012-08-13 22:14 ` [ 40/65] mfd: wm831x: Feed the device UUID " Greg Kroah-Hartman
2012-08-13 22:14 ` [ 41/65] random: remove rand_initialize_irq() Greg Kroah-Hartman
2012-08-13 22:14 ` [ 42/65] random: Add comment to random_initialize() Greg Kroah-Hartman
2012-08-13 22:14 ` [ 43/65] dmi: Feed DMI table to /dev/random driver Greg Kroah-Hartman
2012-08-13 22:14 ` [ 44/65] random: mix in architectural randomness in extract_buf() Greg Kroah-Hartman
2012-08-13 22:14 ` [ 45/65] HID: multitouch: add support for Novatek touchscreen Greg Kroah-Hartman
2012-08-13 22:14 ` [ 46/65] HID: add support for Cypress barcode scanner 04B4:ED81 Greg Kroah-Hartman
2012-08-13 22:14 ` [ 47/65] HID: add ASUS AIO keyboard model AK1D Greg Kroah-Hartman
2012-08-13 22:14 ` [ 48/65] x86, microcode: microcode_core.c simple_strtoul cleanup Greg Kroah-Hartman
2012-08-13 22:14 ` [ 49/65] x86, microcode: Sanitize per-cpu microcode reloading interface Greg Kroah-Hartman
2012-08-13 22:14 ` [ 50/65] mm: hugetlbfs: close race during teardown of hugetlbfs shared page tables Greg Kroah-Hartman
2012-08-13 22:14 ` [ 51/65] target: Add range checking to UNMAP emulation Greg Kroah-Hartman
2012-08-13 22:14 ` [ 52/65] target: Fix reading of data length fields for UNMAP commands Greg Kroah-Hartman
2012-08-13 22:14 ` [ 53/65] target: Fix possible integer underflow in UNMAP emulation Greg Kroah-Hartman
2012-08-13 22:14 ` [ 54/65] target: Check number of unmap descriptors against our limit Greg Kroah-Hartman
2012-08-13 22:14 ` [ 55/65] ARM: mxs: Remove MMAP_MIN_ADDR setting from mxs_defconfig Greg Kroah-Hartman
2012-08-13 22:14 ` [ 56/65] ARM: dts: imx53-ard: add regulators for lan9220 Greg Kroah-Hartman
2012-08-13 22:14 ` [ 57/65] ARM: pxa: remove irq_to_gpio from ezx-pcap driver Greg Kroah-Hartman
2012-08-13 22:14 ` [ 58/65] cfg80211: process pending events when unregistering net device Greg Kroah-Hartman
2012-08-13 22:14 ` [ 59/65] cfg80211: fix interface combinations check for ADHOC(IBSS) Greg Kroah-Hartman
2012-08-13 22:14 ` [ 60/65] tun: dont zeroize sock->file on detach Greg Kroah-Hartman
2012-08-13 22:14 ` [ 61/65] iwlwifi: disable greenfield transmissions as a workaround Greg Kroah-Hartman
2012-08-13 22:14 ` [ 62/65] e1000e: NIC goes up and immediately goes down Greg Kroah-Hartman
2012-08-13 22:14 ` [ 63/65] Input: eeti_ts: pass gpio value instead of IRQ Greg Kroah-Hartman
2012-08-13 22:14 ` [ 64/65] Input: wacom - Bamboo One 1024 pressure fix Greg Kroah-Hartman
2012-08-13 22:14 ` [ 65/65] rt61pci: fix NULL pointer dereference in config_lna_gain Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120813221416.304707536@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk+kernel@arm.linux.org.uk \
--cc=stable@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).