[PATCHv1] crypto: caam - Added property fsl, sec-era in SEC4.0 device tree binding.

2013-01-22 Thread Vakul Garg
This new property defines the era of the particular SEC version. The compatible property in device tree "crypto" node has been updated not to contain SEC era numbers. Signed-off-by: Vakul Garg --- Changelog: 1. Marked fsl,sec-era as 'optional'. .../devicetree/bindings/crypto/fsl-sec4.tx

[PATCH] crypto: caam - Added property fsl, sec-era in SEC4.0 device tree binding.

2013-01-22 Thread Vakul Garg
This new property defines the era of the particular SEC version. The compatible property in device tree "crypto" node has been updated not to contain SEC era numbers. Signed-off-by: Vakul Garg --- .../devicetree/bindings/crypto/fsl-sec4.txt| 12 +--- 1 files changed, 9 insertio

[PATCH 6/6][v4]: perf: Document the ABI of perf sysfs entries

2013-01-22 Thread Sukadev Bhattiprolu
[PATCH 6/6][v4]: perf: Document the ABI of perf sysfs entries This patchset addes two new sets of files to sysfs for POWER architecture. - perf event config format in /sys/devices/cpu/format/event - generic and POWER-specific perf events in /sys/devices/cpu/events/ The format of

[PATCH 5/6][v4]: perf: Create a sysfs entry for Power event format

2013-01-22 Thread Sukadev Bhattiprolu
[PATCH 5/6][v4]: perf: Create a sysfs entry for Power event format Create a sysfs entry, '/sys/bus/event_source/devices/cpu/format/event' which describes the format of a POWER cpu. The format of the event is the same for all POWER cpus at least in (Power6, Power7), so bulk of this change is comm

[PATCH 4/6][v4]: perf/POWER7: Make some POWER7 events available in sysfs

2013-01-22 Thread Sukadev Bhattiprolu
[PATCH 4/6][v4]: perf/POWER7: Make some POWER7 events available in sysfs Make some POWER7-specific perf events available in sysfs. $ /bin/ls -1 /sys/bus/event_source/devices/cpu/events/ branch-instructions branch-misses cache-misses cache-references

[PATCH 3/6][v4]: perf/POWER7: Make generic event translations available in sysfs

2013-01-22 Thread Sukadev Bhattiprolu
[PATCH 3/6][v4]: perf/POWER7: Make generic event translations available in sysfs Make the generic perf events in POWER7 available via sysfs. $ ls /sys/bus/event_source/devices/cpu/events branch-instructions branch-misses cache-misses cache-references

[PATCH 2/6][v4]: perf: Make EVENT_ATTR global

2013-01-22 Thread Sukadev Bhattiprolu
[PATCH 2/6][v4]: perf: Make EVENT_ATTR global Rename EVENT_ATTR() to PMU_EVENT_ATTR() and make it global so it is available to all architectures. Further to allow architectures flexibility, have PMU_EVENT_ATTR() pass in the variable name as a parameter. Changelog[v2] - [Jiri Osla] No ne

[PATCH 1/6][v4]: perf/Power7: Use macros to identify perf events

2013-01-22 Thread Sukadev Bhattiprolu
[PATCH 1/6][v4]: perf/Power7: Use macros to identify perf events Define and use macros to identify perf events codes This would make it easier and more readable when these event codes need to be used in more than one place. Signed-off-by: Sukadev Bhattiprolu Acked-by: Jiri Olsa --- arch/power

[PATCH 0/6][v4]: perf: Make POWER7 events available in sysfs

2013-01-22 Thread Sukadev Bhattiprolu
[PATCH 0/6][v4]: perf: Make POWER7 events available in sysfs Make the generic and some POWER7-specific perf events available in sysfs. These changes mainly extend similar functionality implemented in x86 to work on POWER architecture as well. Thanks to input from Stephane Eranian, Robert Richter,

Re: [PATCH 1/6][v3] perf/Power7: Use macros to identify perf events

2013-01-22 Thread Michael Ellerman
On Wed, 2013-01-09 at 17:03 -0800, Sukadev Bhattiprolu wrote: > [PATCH 1/6][v3] perf/Power7: Use macros to identify perf events > > Define and use macros to identify perf events codes. This would make it > easier and more readable when these event codes need to be used in more > than one place. >

[PATCH][v2] KVM: PPC: add paravirt idle loop for 64-bit book E

2013-01-22 Thread Stuart Yoder
From: Stuart Yoder Signed-off-by: Stuart Yoder --- -v2 -macro'ized loop in idle_book3e.S to avoid code duplication, paravirt loop is now in idle_book3e.S arch/powerpc/kernel/epapr_hcalls.S |2 ++ arch/powerpc/kernel/idle_book3e.S | 30 -- 2 files cha

Re: [PATCH] perf: Fix compile warnings in tests/attr.c

2013-01-22 Thread Michael Ellerman
On Mon, 2013-01-21 at 13:38 -0800, Sukadev Bhattiprolu wrote: > Jiri Olsa [jo...@redhat.com] wrote: > | On Fri, Jan 18, 2013 at 05:30:52PM -0800, Sukadev Bhattiprolu wrote: > | > From 4d266e5040c33103f5d226b0d16b89f8ef79e3ad Mon Sep 17 00:00:00 2001 > | > From: Sukadev Bhattiprolu > | > Date: Fri,

Re: [PATCH 1/2] powerpc/5200: Fix size to request_mem_region() call

2013-01-22 Thread Anatolij Gustschin
Hi Grant, On Fri, 18 Jan 2013 01:39:59 + Grant Likely wrote: > The Bestcomm driver requests a memory region larger than the one > described in the device tree. This is due to an extra undocumented field > in the bestcomm register structure. This hasn't been a problem up to > now, but there i

Re: [PATCH v5 01/45] percpu_rwlock: Introduce the global reader-writer lock backend

2013-01-22 Thread Stephen Hemminger
On Tue, 22 Jan 2013 13:03:22 +0530 "Srivatsa S. Bhat" wrote: > A straight-forward (and obvious) algorithm to implement Per-CPU Reader-Writer > locks can also lead to too many deadlock possibilities which can make it very > hard/impossible to use. This is explained in the example below, which help

Re: [PATCH v5 01/45] percpu_rwlock: Introduce the global reader-writer lock backend

2013-01-22 Thread Steven Rostedt
On Wed, 2013-01-23 at 01:28 +0530, Srivatsa S. Bhat wrote: > > I thought global locks are now fair. That is, a reader will block if a > > writer is waiting. Hence, the above should deadlock on the current > > rwlock_t types. > > > > Oh is it? Last I checked, lockdep didn't complain about this AB

Re: [PATCH v5 01/45] percpu_rwlock: Introduce the global reader-writer lock backend

2013-01-22 Thread Srivatsa S. Bhat
On 01/23/2013 01:02 AM, Steven Rostedt wrote: > On Tue, 2013-01-22 at 13:03 +0530, Srivatsa S. Bhat wrote: >> A straight-forward (and obvious) algorithm to implement Per-CPU Reader-Writer >> locks can also lead to too many deadlock possibilities which can make it very >> hard/impossible to use. Thi

Re: [PATCH v5 01/45] percpu_rwlock: Introduce the global reader-writer lock backend

2013-01-22 Thread Srivatsa S. Bhat
On 01/23/2013 12:15 AM, Stephen Hemminger wrote: > On Tue, 22 Jan 2013 13:03:22 +0530 > "Srivatsa S. Bhat" wrote: > >> A straight-forward (and obvious) algorithm to implement Per-CPU Reader-Writer >> locks can also lead to too many deadlock possibilities which can make it very >> hard/impossible

Re: [PATCH v5 01/45] percpu_rwlock: Introduce the global reader-writer lock backend

2013-01-22 Thread Steven Rostedt
On Tue, 2013-01-22 at 13:03 +0530, Srivatsa S. Bhat wrote: > A straight-forward (and obvious) algorithm to implement Per-CPU Reader-Writer > locks can also lead to too many deadlock possibilities which can make it very > hard/impossible to use. This is explained in the example below, which helps >

Re: [PATCH 6/6][v3] perf: Document the ABI of perf sysfs entries

2013-01-22 Thread Jiri Olsa
On Fri, Jan 18, 2013 at 09:46:54AM -0800, Sukadev Bhattiprolu wrote: > Jiri Olsa [jo...@redhat.com] wrote: SNIP > + > +Contact: Linux kernel mailing list > + Linux Powerpc mailing list > + > +Description: POWER-systems specific performance monitoring events > + > + A

Re: [PATCH] perf: Fix compile warnings in tests/attr.c

2013-01-22 Thread Jiri Olsa
On Mon, Jan 21, 2013 at 01:38:23PM -0800, Sukadev Bhattiprolu wrote: > Jiri Olsa [jo...@redhat.com] wrote: > | On Fri, Jan 18, 2013 at 05:30:52PM -0800, Sukadev Bhattiprolu wrote: SNIP > __u64 is 'unsigned long long' on x86 and PRIu64 is 'llu' which is fine. > > __u64 is 'unsigned long' on Power

[PATCH Bug fix 4/4] Rename movablecore_map to movablemem_map.

2013-01-22 Thread Tang Chen
Since "core" could be confused with cpu cores, but here it is memory, so rename the boot option movablecore_map to movablemem_map. Signed-off-by: Tang Chen --- Documentation/kernel-parameters.txt |8 ++-- include/linux/memblock.h|2 +- include/linux/mm.h |

[PATCH Bug fix 2/4] Bug fix: Fix the doc format.

2013-01-22 Thread Tang Chen
Signed-off-by: Tang Chen --- mm/page_alloc.c | 23 ++- 1 files changed, 14 insertions(+), 9 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 00037a3..cd6f8a6 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -4372,7 +4372,7 @@ static unsigned long __mem

[PATCH Bug fix 3/4] Bug fix: Remove the unused sanitize_zone_movable_limit() definition.

2013-01-22 Thread Tang Chen
When CONFIG_HAVE_MEMBLOCK_NODE_MAP is not defined, sanitize_zone_movable_limit() is also not used. So remove it. Signed-off-by: Tang Chen --- mm/page_alloc.c |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index cd6f8a6..2bd529e 1006

[PATCH Bug fix 1/4] Bug fix: Use CONFIG_HAVE_MEMBLOCK_NODE_MAP to protect movablecore_map in memblock_overlaps_region().

2013-01-22 Thread Tang Chen
The definition of struct movablecore_map is protected by CONFIG_HAVE_MEMBLOCK_NODE_MAP but its use in memblock_overlaps_region() is not. So add CONFIG_HAVE_MEMBLOCK_NODE_MAP to protect the use of movablecore_map in memblock_overlaps_region(). Reported-by: Stephen Rothwell Signed-off-by: Tang Chen

[PATCH Bug fix 0/4] Bug fix for movablecore_map boot option.

2013-01-22 Thread Tang Chen
Hi Andrew, patch1 ~ patch3 fix some problems of movablecore_map boot option. And since the name "core" could be confused, patch4 rename this option to movablemem_map. All these patches are based on the latest -mm tree. git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git akpm Tang C

[PATCH Bug fix 4/5] cpu-hotplug, memory-hotplug: clear cpu_to_node() when offlining the node

2013-01-22 Thread Tang Chen
From: Wen Congyang When the node is offlined, there is no memory/cpu on the node. If a sleep task runs on a cpu of this node, it will be migrated to the cpu on the other node. So we can clear cpu-to-node mapping. Cc: Yasuaki Ishimatsu Cc: David Rientjes Cc: Jiang Liu Cc: Minchan Kim Cc: KOSA

[PATCH Bug fix 5/5] Do not use cpu_to_node() to find an offlined cpu's node.

2013-01-22 Thread Tang Chen
If a cpu is offline, its nid will be set to -1, and cpu_to_node(cpu) will return -1. As a result, cpumask_of_node(nid) will return NULL. In this case, find_next_bit() in for_each_cpu will get a NULL pointer and cause panic. Here is a call trace: [ 609.824017] Call Trace: [ 609.824017] [ 609.8

[PATCH Bug fix 3/5] cpu-hotplug, memory-hotplug: try offline the node when hotremoving a cpu

2013-01-22 Thread Tang Chen
From: Wen Congyang The node will be offlined when all memory/cpu on the node is hotremoved. So we should try offline the node when hotremoving a cpu on the node. Cc: Yasuaki Ishimatsu Cc: David Rientjes Cc: Jiang Liu Cc: Minchan Kim Cc: KOSAKI Motohiro Cc: Andrew Morton Cc: Mel Gorman Cc:

[PATCH Bug fix 1/5] cpu_hotplug: clear apicid to node when the cpu is hotremoved

2013-01-22 Thread Tang Chen
From: Wen Congyang When a cpu is hotpluged, we call acpi_map_cpu2node() in _acpi_map_lsapic() to store the cpu's node and apicid's node. But we don't clear the cpu's node in acpi_unmap_lsapic() when this cpu is hotremove. If the node is also hotremoved, we will get the following messages: [ 1646.

[PATCH Bug fix 2/5] memory-hotplug: export the function try_offline_node()

2013-01-22 Thread Tang Chen
From: Wen Congyang The node will be offlined when all memory/cpu on the node have been hotremoved. So we need the function try_offline_node() in cpu-hotplug path. If the memory-hotplug is disabled, and cpu-hotplug is enabled 1. no memory no the node we don't online the node, and cpu's node is

[PATCH Bug fix 0/5] Bug fix for node offline

2013-01-22 Thread Tang Chen
Based on physical memory hot-remove functionality, we can implement node hot-remove. But there are some problems in cpu driver when offlining a node. This patch-set will fix them. All these patches are based on the latest -mm tree. git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git

[PATCH Bug fix 5/5] Bug fix: Fix the doc format in drivers/firmware/memmap.c

2013-01-22 Thread Tang Chen
Make the comments in drivers/firmware/memmap.c kernel-doc compliant. Reported-by: Julian Calaby Signed-off-by: Tang Chen --- drivers/firmware/memmap.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/firmware/memmap.c b/drivers/firmware/memmap.c index

[PATCH Bug fix 4/5] Bug fix: Fix section mismatch problem of release_firmware_map_entry().

2013-01-22 Thread Tang Chen
The function release_firmware_map_entry() references the function __meminit firmware_map_find_entry_in_list(). So it should also have __meminit. And since the firmware_map_entry->kobj is initialized with memmap_ktype, the memmap_ktype should also be prefixed by __refdata. Signed-off-by: Tang Chen

[PATCH Bug fix 3/5] Bug fix: Do not split pages when freeing pagetable pages.

2013-01-22 Thread Tang Chen
The old way we free pagetable pages was wrong. The old way is: When we got a hugepage, we split it into smaller pages. And sometimes, we only need to free some of the smaller pages because the others are still in use. And the whole larger page will be freed if all the smaller pages are not in use.

[PATCH Bug fix 2/5] Bug-fix: mempolicy: fix is_valid_nodemask()

2013-01-22 Thread Tang Chen
From: Lai Jiangshan is_valid_nodemask() is introduced by 19770b32. but it does not match its comments, because it does not check the zone which > policy_zone. Also in b377fd, this commits told us, if highest zone is ZONE_MOVABLE, we should also apply memory policies to it. so ZONE_MOVABLE should

[PATCH Bug fix 0/5] Bug fix for physical memory hot-remove.

2013-01-22 Thread Tang Chen
Here are some bug fix patches for physical memory hot-remove. All these patches are based on the latest -mm tree. git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git akpm And patch1 and patch3 are very important. patch1: free compound pages when freeing memmap, otherwise the kernel

[PATCH Bug fix 1/5] Bug fix: consider compound pages when free memmap

2013-01-22 Thread Tang Chen
From: Wen Congyang usemap could also be allocated as compound pages. Should also consider compound pages when freeing memmap. If we don't fix it, there could be problems when we free vmemmap pagetables which are stored in compound pages. The old pagetables will not be freed properly, and when we

[PATCH v5 45/45] Documentation/cpu-hotplug: Remove references to stop_machine()

2013-01-22 Thread Srivatsa S. Bhat
Since stop_machine() is no longer used in the CPU offline path, we cannot disable CPU hotplug using preempt_disable()/local_irq_disable() etc. We need to use the newly introduced get/put_online_cpus_atomic() APIs. Reflect this in the documentation. Cc: Rob Landley Cc: linux-...@vger.kernel.org Si

[PATCH v5 44/45] CPU hotplug, stop_machine: Decouple CPU hotplug from stop_machine() in Kconfig

2013-01-22 Thread Srivatsa S. Bhat
... and also cleanup a comment that refers to CPU hotplug being dependent on stop_machine(). Cc: David Howells Signed-off-by: Srivatsa S. Bhat --- include/linux/stop_machine.h |2 +- init/Kconfig |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/incl

[PATCH v5 43/45] cpu: No more __stop_machine() in _cpu_down()

2013-01-22 Thread Srivatsa S. Bhat
From: Paul E. McKenney The _cpu_down() function invoked as part of the CPU-hotplug offlining process currently invokes __stop_machine(), which is slow and inflicts substantial real-time latencies on the entire system. This patch substitutes stop_one_cpu() for __stop_machine() in order to improve

[PATCH v5 42/45] tile: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-01-22 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on preempt_disable() or local_irq_disable() to prevent CPUs from going offline from under us. Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going offline, while invoking from atomic context. Cc: Chr

[PATCH v5 41/45] sparc: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-01-22 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on preempt_disable() or local_irq_disable() to prevent CPUs from going offline from under us. Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going offline, while invoking from atomic context. Cc: "Da

[PATCH v5 40/45] sh: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-01-22 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on preempt_disable() or local_irq_disable() to prevent CPUs from going offline from under us. Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going offline, while invoking from atomic context. Cc: Pau

[PATCH v5 39/45] powerpc: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-01-22 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on preempt_disable() or local_irq_disable() to prevent CPUs from going offline from under us. Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going offline, while invoking from atomic context. Cc: Ben

[PATCH v5 38/45] parisc: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-01-22 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on preempt_disable() or local_irq_disable() to prevent CPUs from going offline from under us. Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going offline, while invoking from atomic context. Cc: "Ja

[PATCH v5 37/45] mn10300: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-01-22 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on preempt_disable() or local_irq_disable() to prevent CPUs from going offline from under us. Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going offline, while invoking from atomic context. Cc: Dav

[PATCH v5 36/45] MIPS: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-01-22 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on preempt_disable() or local_irq_disable() to prevent CPUs fom going offline from under us. Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going offline, while invoking from atomic context. Cc: Ralf

[PATCH v5 35/45] m32r: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-01-22 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on preempt_disable() or local_irq_disable() to prevent CPUs from going offline from under us. Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going offline, while invoking from atomic context. Cc: Hir

[PATCH v5 34/45] ia64: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-01-22 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on preempt_disable() or local_irq_disable() to prevent CPUs from going offline from under us. Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going offline, while invoking from atomic context. Cc: Ton

[PATCH v5 33/45] hexagon/smp: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-01-22 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on preempt_disable() or local_irq_disable() to prevent CPUs from going offline from under us. Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going offline, while invoking from atomic context. Cc: Ric

[PATCH v5 32/45] cris/smp: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-01-22 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on preempt_disable() or local_irq_disable() to prevent CPUs from going offline from under us. Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going offline, while invoking from atomic context. Cc: Mik

[PATCH v5 31/45] blackfin/smp: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-01-22 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on preempt_disable() or local_irq_disable() to prevent CPUs from going offline from under us. Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going offline, while invoking from atomic context. Cc: Mik

[PATCH v5 30/45] alpha/smp: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-01-22 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on preempt_disable() or local_irq_disable() to prevent CPUs from going offline from under us. Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going offline, while invoking from atomic context. Also, r

[PATCH v5 29/45] x86/xen: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-01-22 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on preempt_disable() or local_irq_disable() to prevent CPUs from going offline from under us. Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going offline, while invoking from atomic context. Cc: Kon

[PATCH v5 28/45] kvm/vmx: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-01-22 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on preempt_disable() or local_irq_disable() to prevent CPUs from going offline from under us. Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going offline, while invoking from atomic context (in vmx_v

[PATCH v5 27/45] KVM: Use get/put_online_cpus_atomic() to prevent CPU offline from atomic context

2013-01-22 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on preempt_disable() or local_irq_disable() to prevent CPUs from going offline from under us. Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going offline, while invoking from atomic context. Cc: Mar

[PATCH v5 26/45] perf/x86: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-01-22 Thread Srivatsa S. Bhat
The CPU_DYING notifier modifies the per-cpu pointer pmu->box, and this can race with functions such as uncore_pmu_to_box() and uncore_pci_remove() when we remove stop_machine() from the CPU offline path. So protect them using get/put_online_cpus_atomic(). Cc: "H. Peter Anvin" Cc: x...@kernel.org

[PATCH v5 25/45] x86: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-01-22 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on preempt_disable() or local_irq_disable() to prevent CPUs from going offline from under us. Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going offline, while invoking from atomic context. Cc: "H.

[PATCH v5 24/45] staging: octeon: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-01-22 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on preempt_disable() or local_irq_disable() to prevent CPUs from going offline from under us. Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going offline, while invoking from atomic context. Cc: Gre