linux/arch/arm/kernel
Stephen Boyd 787047eea2 ARM: 8392/3: smp: Only expose /sys/.../cpuX/online if hotpluggable
Writes to /sys/.../cpuX/online fail if we determine the platform
doesn't support hotplug for that CPU. Furthermore, if the cpu_die
op isn't specified the system hangs when we try to offline a CPU
and it comes right back online unexpectedly. Let's figure this
stuff out before we make the sysfs nodes so that the online file
doesn't even exist if it isn't (at least sometimes) possible to
hotplug the CPU.

Add a new 'cpu_can_disable' op and repoint all 'cpu_disable'
implementations at it because all implementers use the op to
indicate if a CPU can be hotplugged or not in a static fashion.
With PSCI we may need to add a 'cpu_disable' op so that the
secure OS can be migrated off the CPU we're trying to hotplug.
In this case, the 'cpu_can_disable' op will indicate that all
CPUs are hotpluggable by returning true, but the 'cpu_disable' op
will make a PSCI migration call and occasionally fail, denying
the hotplug of a CPU. This shouldn't be any worse than x86 where
we may indicate that all CPUs are hotpluggable but occasionally
we can't offline a CPU due to check_irq_vectors_for_cpu_disable()
failing to find a CPU to move vectors to.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Nicolas Pitre <nico@linaro.org>
Cc: Dave Martin <Dave.Martin@arm.com>
Acked-by: Simon Horman <horms@verge.net.au> [shmobile portion]
Tested-by: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: <linux-sh@vger.kernel.org>
Tested-by: Tyler Baker <tyler.baker@linaro.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2015-07-31 18:58:30 +01:00
..
.gitignore
arch_timer.c
armksyms.c ARM: 8151/1: add missing exports for asm functions required by get_user macro 2014-09-16 16:09:30 +01:00
asm-offsets.c Merge branch 'exec_domain_rip_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2015-04-15 13:53:55 -07:00
atags.h
atags_compat.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
atags_parse.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
atags_proc.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
bios32.c ARM: 8293/1: kernel: fix pci_mmap_page_range() offset calculation 2015-02-23 14:43:58 +00:00
calls.S ARM: wire up execveat syscall 2015-01-07 20:31:54 +00:00
cpuidle.c ARM: cpuidle: Document the code 2015-03-25 09:53:43 +01:00
crash_dump.c ARM: 8012/1: kdump: Avoid overflow when converting pfn to physaddr 2014-04-07 12:10:00 +01:00
debug.S ARM: unify MMU/!MMU addruart calls 2015-05-20 23:09:51 +02:00
devtree.c arm: Add devicetree fixup machine function 2014-07-29 21:26:49 -06:00
dma-isa.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
dma.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
early_printk.c
elf.c
entry-armv.S Fixup various init.h misuses that are fragile wrt code moving to module.h 2015-07-02 11:07:27 -07:00
entry-common.S Merge branch 'bsym' into for-next 2015-06-12 21:18:38 +01:00
entry-ftrace.S ARM: replace BSYM() with badr assembly macro 2015-05-08 17:33:50 +01:00
entry-header.S ARM: 8266/1: Remove early stack deallocation from restore_user_regs 2015-01-12 19:26:57 +00:00
entry-v7m.S ARM: 8340/1: ARMv7-M: Enlarge vector table up to 256 entries 2015-05-08 10:42:21 +01:00
fiq.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
fiqasm.S ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ 2014-07-18 12:29:04 +01:00
ftrace.c ARM: kprobes: enable OPTPROBES for ARM 32 2015-01-13 16:10:17 +00:00
head-common.S ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ 2014-07-18 12:29:04 +01:00
head-nommu.S ARM: 8383/1: nommu: avoid deprecated source register on mov 2015-06-12 21:18:48 +01:00
head.S Merge branch 'bsym' into for-next 2015-06-12 21:18:38 +01:00
hibernate.c ARM: move reboot code to arch/arm/kernel/reboot.c 2015-04-02 09:50:45 +01:00
hw_breakpoint.c perf: Remove type specific target pointers 2015-03-23 10:58:04 +01:00
hyp-stub.S Here are the PPC and ARM changes for KVM, which I separated because 2014-08-07 11:35:30 -07:00
insn.c
io.c ARM: io.c: clean up EXPORT_SYMBOL()s 2014-11-21 15:25:02 +00:00
irq.c ARM: 8261/1: l2c: Get outer cache .write_sec callback from mach_desc only if not NULL 2015-01-16 14:35:33 +00:00
isa.c arm: convert use of typedef ctl_table to struct ctl_table 2014-06-06 16:08:15 -07:00
iwmmxt.S ARM: 8221/1: PJ4: allow building in Thumb-2 mode 2014-12-03 16:08:00 +00:00
jump_label.c ARM: kprobes: enable OPTPROBES for ARM 32 2015-01-13 16:10:17 +00:00
kgdb.c ARM: probes: move all probe code to dedicate directory 2015-01-09 09:36:50 +00:00
machine_kexec.c ARM: 8338/1: kexec: Relax SMP validation to improve DT compatibility 2015-04-02 09:59:43 +01:00
Makefile Merge branch 'devel-stable' into for-next 2015-06-12 21:18:57 +01:00
module-plts.c ARM: 8364/1: fix BE32 module loading 2015-06-02 09:58:17 +01:00
module.c ARM: 8220/1: allow modules outside of bl range 2015-05-08 10:42:34 +01:00
module.lds ARM: 8220/1: allow modules outside of bl range 2015-05-08 10:42:34 +01:00
opcodes.c
patch.c ARM: probes: move all probe code to dedicate directory 2015-01-09 09:36:50 +00:00
perf_callchain.c arm: perf: factor out callchain code 2014-10-30 12:16:58 +00:00
perf_event.c ARM: 8401/1: perf: Set affinity for PPI based PMUs 2015-07-10 11:08:42 +01:00
perf_event_v6.c arm: perf: factor out armv6 pmu driver 2015-05-28 16:54:13 +01:00
perf_event_v7.c arm: perf: factor out armv7 pmu driver 2015-05-28 16:54:18 +01:00
perf_event_xscale.c arm: perf: factor out xscale pmu driver 2015-05-28 16:54:09 +01:00
perf_regs.c perf: Move task_pt_regs sampling into arch code 2015-01-09 11:12:28 +01:00
pj4-cp0.c ARM: 8040/1: pj4: properly detect existence of iWMMXt coprocessor 2014-04-25 12:07:34 +01:00
process.c Merge branches 'misc', 'vdso' and 'fixes' into for-next 2015-04-14 22:28:25 +01:00
psci-call.S ARM: 8307/1: psci: move psci firmware calls out of line 2015-03-29 23:11:17 +01:00
psci.c ARM: 8307/1: psci: move psci firmware calls out of line 2015-03-29 23:11:17 +01:00
psci_smp.c ARM: Check if a CPU has gone offline 2014-05-15 10:16:30 -04:00
ptrace.c Merge git://git.infradead.org/users/eparis/audit 2014-10-19 16:25:56 -07:00
reboot.c ARM: move reboot code to arch/arm/kernel/reboot.c 2015-04-02 09:50:45 +01:00
reboot.h ARM: move reboot code to arch/arm/kernel/reboot.c 2015-04-02 09:50:45 +01:00
relocate_kernel.S ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ 2014-07-18 12:29:04 +01:00
return_address.c ARM: 8328/1: remove empty preprocessor #else branch 2015-03-28 16:54:53 +00:00
setup.c ARM: 8392/3: smp: Only expose /sys/.../cpuX/online if hotpluggable 2015-07-31 18:58:30 +01:00
signal.c arm: Remove signal translation and exec_domain 2015-04-12 20:58:24 +02:00
sigreturn_codes.S
sleep.S ARM: fix new BSYM() usage introduced via for-arm-soc branch 2015-06-12 21:19:35 +01:00
smp.c ARM: 8392/3: smp: Only expose /sys/.../cpuX/online if hotpluggable 2015-07-31 18:58:30 +01:00
smp_scu.c ARM: 8122/1: smp_scu: enable SCU standby support 2014-08-02 08:51:53 +01:00
smp_tlb.c ARM: 8111/1: Enable erratum 798181 for Broadcom Brahma-B15 2014-07-24 14:40:26 +01:00
smp_twd.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
stacktrace.c ARM: 8172/1: Use current_stack_pointer in save_stack_trace_tsk 2014-11-13 23:58:03 +00:00
suspend.c ARM: 8248/1: pm: remove outdated comment 2015-01-21 15:58:57 +00:00
swp_emulate.c ARM: 8322/1: keep .text and .fixup regions closer together 2015-03-29 23:11:56 +01:00
sys_arm.c
sys_oabi-compat.c separate kernel- and userland-side msghdr 2014-11-19 16:22:59 -05:00
tcm.c ARM: 8388/1: tcm: Don't crash when TCM banks are protected by TrustZone 2015-06-06 10:37:28 +01:00
thumbee.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
time.c ARM, clocksource/drivers: Provide read_boot_clock64() and read_persistent_clock64() and use them 2015-04-03 08:18:23 +02:00
topology.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00
traps.c ARM: remove __bad_xchg definition 2015-06-02 09:58:19 +01:00
unwind.c ARM: 8176/1: Use current_stack_pointer in unwind_backtrace 2014-11-13 23:58:09 +00:00
v7m.c
vdso.c Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2015-04-14 21:03:26 -07:00
vmlinux.lds.S arm64 updates for 4.1: 2015-04-16 13:58:29 -05:00
xscale-cp0.c ARM: convert printk(KERN_* to pr_* 2014-11-21 15:24:50 +00:00