linux/arch/powerpc/platforms
Li Zhong e4f387d8db powerpc: Fix unpaired probe_hcall_entry and probe_hcall_exit
Unpaired calling of probe_hcall_entry and probe_hcall_exit might happen
as following, which could cause incorrect preempt count.

__trace_hcall_entry => trace_hcall_entry -> probe_hcall_entry =>
get_cpu_var => preempt_disable

__trace_hcall_exit => trace_hcall_exit -> probe_hcall_exit =>
put_cpu_var => preempt_enable

where:
A => B and A -> B means A calls B, but
=> means A will call B through function name, and B will definitely be
called.
-> means A will call B through function pointer, so B might not be
called if the function pointer is not set.

So error happens when only one of probe_hcall_entry and probe_hcall_exit
get called during a hcall.

This patch tries to move the preempt count operations from
probe_hcall_entry and probe_hcall_exit to its callers.

Reported-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
Tested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
CC: stable@kernel.org [v2.6.32+]
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-01-03 12:09:27 +11:00
..
8xx powerpc: remove non-required uses of include <linux/module.h> 2011-10-31 19:30:44 -04:00
40x Merge remote-tracking branch 'jwb/next' into next 2011-12-16 11:24:25 +11:00
44x powerpc/44x: Fix build error on currituck platform 2011-12-20 10:41:28 -05:00
52xx Merge remote-tracking branch 'agust/next' into merge 2011-11-08 14:53:55 +11:00
82xx powerpc/82xx: updates for mgcoge 2011-10-11 16:18:41 -05:00
83xx powerpc/83xx: make mpc830x_rdb use mpc83xx_setup_pci 2011-11-24 02:01:41 -06:00
85xx powerpc/mpic: Invert the meaning of MPIC_PRIMARY 2011-12-07 13:43:08 +11:00
86xx powerpc/mpic: Invert the meaning of MPIC_PRIMARY 2011-12-07 13:43:08 +11:00
512x Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
amigaone pcspkr: Cleanup Kconfig dependencies 2011-06-09 15:01:41 +02:00
cell powerpc/mpic: Add in-core support for cascaded MPICs 2011-12-07 13:43:09 +11:00
chrp powerpc/mpic: Invert the meaning of MPIC_PRIMARY 2011-12-07 13:43:08 +11:00
embedded6xx powerpc/mpic: Invert the meaning of MPIC_PRIMARY 2011-12-07 13:43:08 +11:00
iseries powerpc: remove non-required uses of include <linux/module.h> 2011-10-31 19:30:44 -04:00
maple powerpc/mpic: Invert the meaning of MPIC_PRIMARY 2011-12-07 13:43:08 +11:00
pasemi powerpc/mpic: Invert the meaning of MPIC_PRIMARY 2011-12-07 13:43:08 +11:00
powermac powerpc/pmac: Fix SMP kernels on pre-core99 UP machines 2011-12-16 11:10:25 +11:00
powernv powerpc/powernv: Fix problems in onlining CPUs 2011-12-08 14:22:53 +11:00
prep powerpc: drop unused Kconfig symbols 2011-10-31 23:39:52 +01:00
ps3 powerpc/ps3: Add __init to ps3_smp_probe 2011-12-08 14:05:55 +11:00
pseries powerpc: Fix unpaired probe_hcall_entry and probe_hcall_exit 2012-01-03 12:09:27 +11:00
wsp powerpc/wsp: Mark opb cascade handler IRQF_NO_THREAD 2011-11-25 14:11:29 +11:00
fsl_uli1575.c PCI: add pci_bus_for_each_resource(), remove direct bus->resource[] refs 2010-02-23 09:43:31 -08:00
Kconfig powerpc/cpuidle: Enable cpuidle and directly call cpuidle_idle_call() for pSeries 2011-12-08 13:57:20 +11:00
Kconfig.cputype powerpc: Kconfig updates for FSL BookE HUGETLB 64-bit 2011-12-07 16:26:23 +11:00
Makefile powerpc: Add skeleton PowerNV platform 2011-09-20 15:53:25 +10:00