[PATCH 00/45] CPU hotplug: stop_machine()-free CPU hotplug, part 1

2013-06-23 Thread Srivatsa S. Bhat
Hi, This patchset is a first step towards removing stop_machine() from the CPU hotplug offline path. It introduces a set of APIs (as a replacement to preempt_disable()/preempt_enable()) to synchronize with CPU hotplug from atomic contexts. The motivation behind getting rid of stop_machine() is to

[PATCH 01/45] CPU hotplug: Provide APIs to prevent CPU offline from atomic context

2013-06-23 Thread Srivatsa S. Bhat
The current CPU offline code uses stop_machine() internally. And disabling preemption prevents stop_machine() from taking effect, thus also preventing CPUs from going offline, as a side effect. There are places where this side-effect of preempt_disable() (or equivalent) is used to synchronize with

[PATCH 02/45] CPU hotplug: Clarify the usage of different synchronization APIs

2013-06-23 Thread Srivatsa S. Bhat
We have quite a few APIs now which help synchronize with CPU hotplug. Among them, get/put_online_cpus() is the oldest and the most well-known, so no problems there. By extension, its easy to comprehend the new set : get/put_online_cpus_atomic(). But there is yet another set, which might appear tem

[PATCH 03/45] Documentation, CPU hotplug: Recommend usage of get/put_online_cpus_atomic()

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption to prevent CPUs from going offline from under us. So add documentation to recommend using the new get/put_online_cpus_atomic() APIs to prevent CPUs from going offline, while invoking from atom

[PATCH 04/45] CPU hotplug: Add infrastructure to check lacking hotplug synchronization

2013-06-23 Thread Srivatsa S. Bhat
Add a debugging infrastructure to warn if an atomic hotplug reader has not invoked get_online_cpus_atomic() before traversing/accessing the cpu_online_mask. Encapsulate these checks under a new debug config option DEBUG_HOTPLUG_CPU. This debugging infrastructure proves useful in the tree-wide conv

[PATCH 05/45] CPU hotplug: Protect set_cpu_online() to avoid false-positives

2013-06-23 Thread Srivatsa S. Bhat
When bringing a secondary CPU online, the task running on the CPU coming up sets itself in the cpu_online_mask. This is safe even though this task is not the hotplug writer task. But it is kinda hard to teach this to the CPU hotplug debug infrastructure, and if we get it wrong, we risk making the

[PATCH 06/45] CPU hotplug: Sprinkle debugging checks to catch locking bugs

2013-06-23 Thread Srivatsa S. Bhat
Now that we have a debug infrastructure in place to detect cases where get/put_online_cpus_atomic() had to be used, add these checks at the right spots to help catch places where we missed converting to the new APIs. Cc: Rusty Russell Cc: Alex Shi Cc: KOSAKI Motohiro Cc: Tejun Heo Cc: Andrew M

[PATCH 07/45] CPU hotplug: Expose the new debug config option

2013-06-23 Thread Srivatsa S. Bhat
Now that we have all the pieces of the CPU hotplug debug infrastructure in place, expose the feature by growing a new Kconfig option, CONFIG_DEBUG_HOTPLUG_CPU. Cc: Andrew Morton Cc: "Paul E. McKenney" Cc: Akinobu Mita Cc: Catalin Marinas Cc: Michel Lespinasse Signed-off-by: Srivatsa S. Bhat

[PATCH 08/45] CPU hotplug: Convert preprocessor macros to static inline functions

2013-06-23 Thread Srivatsa S. Bhat
Convert the macros in the CPU hotplug code to static inline C functions. Cc: Thomas Gleixner Cc: Andrew Morton Cc: Tejun Heo Cc: "Rafael J. Wysocki" Signed-off-by: Srivatsa S. Bhat --- include/linux/cpu.h |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/includ

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

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Andrew Morton Cc: Wang

[PATCH 10/45] sched/core: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Ingo Molnar Cc: Peter

[PATCH 12/45] sched/fair: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Ingo Molnar Cc: Peter

[PATCH 11/45] migration: Use raw_spin_lock/unlock since interrupts are already disabled

2013-06-23 Thread Srivatsa S. Bhat
We need not use the raw_spin_lock_irqsave/restore primitives because all CPU_DYING notifiers run with interrupts disabled. So just use raw_spin_lock/unlock. Cc: Ingo Molnar Cc: Peter Zijlstra Signed-off-by: Srivatsa S. Bhat --- kernel/sched/core.c |4 ++-- 1 file changed, 2 insertions(+),

[PATCH 13/45] timer: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Thomas Gleixner Signed

[PATCH 14/45] sched/rt: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Ingo Molnar Cc: Peter

[PATCH 15/45] rcu: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption to prevent CPUs from going offline from under us. In RCU code, rcu_implicit_dynticks_qs() checks if a CPU is offline, while being protected by a spinlock. Use the get/put_online_cpus_atomic()

[PATCH 16/45] tick-broadcast: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Thomas Gleixner Signed

[PATCH 17/45] time/clocksource: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: John Stultz Cc: Thomas

[PATCH 18/45] softirq: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Frederic Weisbecker Cc

[PATCH 19/45] irq: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Thomas Gleixner Signed

[PATCH 21/45] block: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Jens Axboe Signed-off-

[PATCH 20/45] net: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: "David S. Miller" Cc:

[PATCH 22/45] percpu_counter: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Al Viro Signed-off-by:

[PATCH 23/45] infiniband: ehca: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Hoang-Nam Nguyen Cc: C

[PATCH 24/45] [SCSI] fcoe: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Robert Love Cc: "James

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

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Thomas Gleixner Cc: In

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

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Greg Kroah-Hartman Cc:

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

2013-06-23 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: Peter Zijlstra Cc: Paul Mackerras Cc

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

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Gleb Natapov Cc: Paolo

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

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Gleb Natapov Cc: Paolo

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

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Konrad Rzeszutek Wilk

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

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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, remove the non-ASCII

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

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Mike Frysinger Cc: Bob

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

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Mikael Starvik Cc: Jes

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

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Richard Kuo Cc: Thomas

[PATCH 36/45] ia64: smp, tlb: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Tony Luck Cc: Fenghua

[PATCH 35/45] ia64: irq, perfmon: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Tony Luck Cc: Fenghua

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

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Hirokazu Takata Cc: li

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

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Ralf Baechle Cc: David

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

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: David Howells Cc: Koic

[PATCH 40/45] powerpc, irq: Use GFP_ATOMIC allocations in atomic context

2013-06-23 Thread Srivatsa S. Bhat
The function migrate_irqs() is called with interrupts disabled and hence its not safe to do GFP_KERNEL allocations inside it, because they can sleep. So change the gfp mask to GFP_ATOMIC. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Ian Munsie Cc: Steven Rostedt Cc: Michael Ellerman Cc:

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

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Benjamin Herrenschmidt

[PATCH 42/45] powerpc: Use get/put_online_cpus_atomic() to avoid false-positive warning

2013-06-23 Thread Srivatsa S. Bhat
Bringing a secondary CPU online is a special case in which, accessing the cpu_online_mask is safe, even though that task (which running on the CPU coming online) is not the hotplug writer. It is a little hard to teach this to the debugging checks under CONFIG_DEBUG_HOTPLUG_CPU. But luckily powerpc

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

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Paul Mundt Cc: Thomas

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

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: Chris Metcalf Signed-o

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

2013-06-23 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption 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: "David S. Miller" Cc:

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

2013-06-23 Thread Matt Turner
On Sun, Jun 23, 2013 at 6:45 AM, Srivatsa S. Bhat wrote: > Once stop_machine() is gone from the CPU offline path, we won't be able > to depend on disabling preemption to prevent CPUs from going offline > from under us. > > Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going > offl

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

2013-06-23 Thread Greg Kroah-Hartman
On Sun, Jun 23, 2013 at 07:13:33PM +0530, Srivatsa S. Bhat wrote: > Once stop_machine() is gone from the CPU offline path, we won't be able > to depend on disabling preemption to prevent CPUs from going offline > from under us. > > Use the get/put_online_cpus_atomic() APIs to prevent CPUs from goi

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

2013-06-23 Thread Srivatsa S. Bhat
On 06/23/2013 11:20 PM, Matt Turner wrote: > On Sun, Jun 23, 2013 at 6:45 AM, Srivatsa S. Bhat > wrote: >> Once stop_machine() is gone from the CPU offline path, we won't be able >> to depend on disabling preemption to prevent CPUs from going offline >> from under us. >> >> Use the get/put_online_

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

2013-06-23 Thread Srivatsa S. Bhat
On 06/23/2013 11:47 PM, Greg Kroah-Hartman wrote: > On Sun, Jun 23, 2013 at 07:13:33PM +0530, Srivatsa S. Bhat wrote: >> Once stop_machine() is gone from the CPU offline path, we won't be able >> to depend on disabling preemption to prevent CPUs from going offline >> from under us. >> >> Use the ge

Re: [PATCH 07/45] CPU hotplug: Expose the new debug config option

2013-06-23 Thread Srivatsa S. Bhat
On 06/23/2013 08:38 PM, Sergei Shtylyov wrote: > Hello. > > On 23-06-2013 17:39, Srivatsa S. Bhat wrote: > >> Now that we have all the pieces of the CPU hotplug debug infrastructure >> in place, expose the feature by growing a new Kconfig option, >> CONFIG_DEBUG_HOTPLUG_CPU. > >> Cc: Andrew Mort

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

2013-06-23 Thread Joe Perches
On Mon, 2013-06-24 at 00:25 +0530, Srivatsa S. Bhat wrote: > On 06/23/2013 11:47 PM, Greg Kroah-Hartman wrote: > > On Sun, Jun 23, 2013 at 07:13:33PM +0530, Srivatsa S. Bhat wrote: [] > >> diff --git a/drivers/staging/octeon/ethernet-rx.c > >> b/drivers/staging/octeon/ethernet-rx.c [] > Honestly,

Re: [PATCH 07/45] CPU hotplug: Expose the new debug config option

2013-06-23 Thread Sergei Shtylyov
Hello. On 23-06-2013 17:39, Srivatsa S. Bhat wrote: Now that we have all the pieces of the CPU hotplug debug infrastructure in place, expose the feature by growing a new Kconfig option, CONFIG_DEBUG_HOTPLUG_CPU. Cc: Andrew Morton Cc: "Paul E. McKenney" Cc: Akinobu Mita Cc: Catalin Marinas

Re: Inbound PCI and Memory Corruption

2013-06-23 Thread Peter LaDow
On Jun 22, 2013, at 5:00 PM, Benjamin Herrenschmidt wrote: > On Fri, 2013-06-21 at 10:14 -0700, Peter LaDow wrote: >> > Afaik e300 is slightly out of order, maybe it's missing a memory barrier > somewhere One thing to try is to add some to the dma_map/unmap ops. > > Also audit the driver

Re: Inbound PCI and Memory Corruption

2013-06-23 Thread Benjamin Herrenschmidt
On Sun, 2013-06-23 at 17:56 -0700, Peter LaDow wrote: > > On Jun 22, 2013, at 5:00 PM, Benjamin Herrenschmidt > wrote: > > > On Fri, 2013-06-21 at 10:14 -0700, Peter LaDow wrote: > >> > > Afaik e300 is slightly out of order, maybe it's missing a memory > barrier > > somewhere One thing to t

Re: [PATCH] powerpc/pseries: Enable PSTORE in pseries_defconfig

2013-06-23 Thread Michael Neuling
> Enable PSTORE in pseries_defconfig Please add a "why" to your changelogs eg. "Now we have pstore support for nvram on pseries, enable it in the default config" "Why" you are changing something is more important than "what", since you can always determine "what" is being changed, by looking at t

Re: [PATCH v2] powerpc/pci: Improve device hotplug initialization

2013-06-23 Thread Benjamin Herrenschmidt
On Fri, 2013-06-21 at 09:54 -0700, Guenter Roeck wrote: > > v2: Ensure that PCI bus fixup code has been executed before calling > > device setup code. > > > Hi Ben, > > any comments/feedback on this approach ? > > It is much less invasive than before and should address your concerns. And a

Re: Inbound PCI and Memory Corruption

2013-06-23 Thread Peter LaDow
> > > On Jun 23, 2013, at 6:16 PM, Benjamin Herrenschmidt > wrote: >> Also dbl check that the MMU is indeed mapping all these pages with the >> "M" bit. > > Just to be clear, do you mean the e1000 registers in PCI space? Or the RAM > pages? > > Thanks, > Pete

Re: Inbound PCI and Memory Corruption

2013-06-23 Thread Benjamin Herrenschmidt
On Sun, 2013-06-23 at 20:47 -0700, Peter LaDow wrote: > > > > > > On Jun 23, 2013, at 6:16 PM, Benjamin Herrenschmidt > > wrote: > >> Also dbl check that the MMU is indeed mapping all these pages with the > >> "M" bit. > > > > Just to be clear, do you mean the e1000 registers in PCI space? Or

Re: [PATCH 3/4] KVM: PPC: Add support for IOMMU in-kernel handling

2013-06-23 Thread David Gibson
On Sat, Jun 22, 2013 at 08:28:06AM -0600, Alex Williamson wrote: > On Sat, 2013-06-22 at 22:03 +1000, David Gibson wrote: > > On Thu, Jun 20, 2013 at 08:55:13AM -0600, Alex Williamson wrote: > > > On Thu, 2013-06-20 at 18:48 +1000, Alexey Kardashevskiy wrote: > > > > On 06/20/2013 05:47 PM, Benjami

Re: [PATCH 3/4] KVM: PPC: Add support for IOMMU in-kernel handling

2013-06-23 Thread David Gibson
On Sun, Jun 23, 2013 at 09:28:13AM +1000, Benjamin Herrenschmidt wrote: > On Sat, 2013-06-22 at 22:03 +1000, David Gibson wrote: > > I think the interface should not take the group fd, but the container > > fd. Holding a reference to *that* would keep the necessary things > > around. But more to

Re: [PATCH 3/4] KVM: PPC: Add support for IOMMU in-kernel handling

2013-06-23 Thread Benjamin Herrenschmidt
On Mon, 2013-06-24 at 13:54 +1000, David Gibson wrote: > > DDW means an API by which the guest can request the creation of > > additional iommus for a given device (typically, in addition to the > > default smallish 32-bit one using 4k pages, the guest can request > > a larger window in 64-bit spac

Re: [PATCH v2] powerpc/pci: Improve device hotplug initialization

2013-06-23 Thread Guenter Roeck
On Mon, Jun 24, 2013 at 11:49:49AM +1000, Benjamin Herrenschmidt wrote: > On Fri, 2013-06-21 at 09:54 -0700, Guenter Roeck wrote: > > > > v2: Ensure that PCI bus fixup code has been executed before calling > > > device setup code. > > > > > Hi Ben, > > > > any comments/feedback on this appro

Re: [PATCH 3/4] KVM: PPC: Add support for IOMMU in-kernel handling

2013-06-23 Thread Alex Williamson
On Mon, 2013-06-24 at 13:52 +1000, David Gibson wrote: > On Sat, Jun 22, 2013 at 08:28:06AM -0600, Alex Williamson wrote: > > On Sat, 2013-06-22 at 22:03 +1000, David Gibson wrote: > > > On Thu, Jun 20, 2013 at 08:55:13AM -0600, Alex Williamson wrote: > > > > On Thu, 2013-06-20 at 18:48 +1000, Alex

[PATCH 2/2] powerpc/hw_brk: Fix clearing of extraneous IRQ

2013-06-23 Thread Michael Neuling
In 9422de3 "powerpc: Hardware breakpoints rewrite to handle non DABR breakpoint registers" we changed the way we mark extraneous irqs with this: - info->extraneous_interrupt = !((bp->attr.bp_addr <= dar) && - (dar - bp->attr.bp_addr < bp->attr.bp_len)); + if (!((b

[PATCH 1/2] powerpc/hw_brk: Fix setting of length for exact mode breakpoints

2013-06-23 Thread Michael Neuling
The smallest match region for both the DABR and DAWR is 8 bytes, so the kernel needs to filter matches when users want to look at regions smaller than this. Currently we set the length of PPC_BREAKPOINT_MODE_EXACT breakpoints to 8. This is wrong as in exact mode we should only match on 1 address,

[RESEND PATCH 0/3] Nvram-to-pstore: compression support for oops data

2013-06-23 Thread Aruna Balakrishnaiah
The patchset takes care of compressing oops messages while writing to NVRAM, so that more oops data can be captured in the given space. big_oops_buf (2.22 * oops_data_sz) is allocated for compression. oops_data_sz is oops header size less of oops partition size. Pstore will internally call kmsg_d

[PATCH 2/3] powerpc/pseries: Re-organise the oops compression code

2013-06-23 Thread Aruna Balakrishnaiah
nvram_compress() and zip_oops() is used by the nvram_pstore_write API to compress oops messages hence re-organise the functions accordingly to avoid forward declarations. Signed-off-by: Aruna Balakrishnaiah --- arch/powerpc/platforms/pseries/nvram.c | 104 1 fil

[PATCH 1/3] Retreive header size from pstore

2013-06-23 Thread Aruna Balakrishnaiah
pstore_get_header_size will return the size of the header added by pstore while logging messages to the registered buffer. Signed-off-by: Aruna Balakrishnaiah --- fs/pstore/platform.c |7 ++- include/linux/pstore.h |6 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff -

[PATCH 3/3] powerpc/pseries: Support compression of oops text via pstore

2013-06-23 Thread Aruna Balakrishnaiah
The patch set supports compression of oops messages while writing to NVRAM, this helps in capturing more of oops data to lnx,oops-log. The pstore file for oops messages will be in decompressed format making it readable. In case compression fails, the patch takes care of copying the header added by

[PATCH v2] powerpc/pseries: Enable PSTORE in pseries_defconfig

2013-06-23 Thread Aruna Balakrishnaiah
Since now we have pstore support for nvram in pseries, enable it in the default config. With this config option enabled, pstore infra-structure will be used to read/write the messages from/to nvram. Signed-off-by: Aruna Balakrishnaiah --- arch/powerpc/configs/pseries_defconfig |1 + 1 file c

Re: [PATCH] powerpc/pseries: Enable PSTORE in pseries_defconfig

2013-06-23 Thread Aruna Balakrishnaiah
Hi Michael, On Monday 24 June 2013 06:51 AM, Michael Neuling wrote: Enable PSTORE in pseries_defconfig Please add a "why" to your changelogs eg. "Now we have pstore support for nvram on pseries, enable it in the default config" "Why" you are changing something is more important than "what", si

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

2013-06-23 Thread Jesper Nilsson
On Sun, Jun 23, 2013 at 07:15:39PM +0530, Srivatsa S. Bhat wrote: > Once stop_machine() is gone from the CPU offline path, we won't be able > to depend on disabling preemption to prevent CPUs from going offline > from under us. > > Use the get/put_online_cpus_atomic() APIs to prevent CPUs from goi

[PATCH v3] powerpc/pseries: Enable PSTORE in pseries_defconfig

2013-06-23 Thread Aruna Balakrishnaiah
Since now we have pstore support for nvram in pseries, enable it in the default config. With this config option enabled, pstore infra-structure will be used to read/write the messages from/to nvram. Signed-off-by: Aruna Balakrishnaiah --- v3: Move pstore config to right place v2: