Re: [BUG] irq_dispose_mapping after irq request failure

2013-02-10 Thread Baruch Siach
Hi Michael, On Mon, Feb 11, 2013 at 05:19:49PM +1100, Michael Ellerman wrote: > On Mon, Feb 11, 2013 at 07:31:00AM +0200, Baruch Siach wrote: [...] > > mpc85xx_pci_err_probe: Unable to requiest irq 16 for MPC85xx PCI err > While you're there, can you fix the typo :) The patch fixing it is alrea

Re: [BUG] irq_dispose_mapping after irq request failure

2013-02-10 Thread Michael Ellerman
On Mon, Feb 11, 2013 at 07:31:00AM +0200, Baruch Siach wrote: > Hi lkml, Hi Baruch, > The drivers/edac/mpc85xx_edac.c driver contains the following (abbreviated) > code snippet it its .probe: You dropped an important detail which is the preceeding line: pdata->irq = irq_of_parse_and_map

[BUG] irq_dispose_mapping after irq request failure

2013-02-10 Thread Baruch Siach
Hi lkml, The drivers/edac/mpc85xx_edac.c driver contains the following (abbreviated) code snippet it its .probe: res = devm_request_irq(&op->dev, pdata->irq, mpc85xx_pci_isr, IRQF_DISABLED, "[EDAC] PCI e

[PATCH] iommu: adding missing kvm_iommu_map_pages/kvm_iommu_unmap_pages

2013-02-10 Thread Alexey Kardashevskiy
The IOMMU API implements groups creating/deletion, device binding and IOMMU map/unmap operations. The POWERPC implementation uses most of the API except map/unmap operations which are implemented on POWERPC using hypercalls. However in order to link a kernel with the CONFIG_IOMMU_API enabled, the

Re: PS3 platform is broken on Linux 3.7.0

2013-02-10 Thread Michael Ellerman
On Sun, Feb 10, 2013 at 09:51:37PM +0400, Phileas Fogg wrote: > > >Phileas Fogg < phileas-f...@mail.ru > writes: > > > > Patch: > > --- arch/powerpc/kernel/setup_64.c.old    2013-02-10 19:34:53.787366191 +0100 > +++ arch/powerpc/kernel/setup_64.c    2013-02-10 19:35:38.834035478 +0100 > @@ -186,

Re[5]: PS3 platform is broken on Linux 3.7.0

2013-02-10 Thread Phileas Fogg
>Phileas Fogg < phileas-f...@mail.ru > writes: > >> Please ignore the previous patch to fix the PACA issue on PS3 arch. >> This is the correct one: >> >> --- a/arch/powerpc/kernel/setup_64.c 2013-02-10 13:56:12.803855673 +0100 >> +++ b/arch/powerpc/kernel/setup_64.c 2013-02-10 14:07:22.870561322

Re: [PATCH v5 04/45] percpu_rwlock: Implement the core design of Per-CPU Reader-Writer Locks

2013-02-10 Thread Paul E. McKenney
On Mon, Feb 11, 2013 at 01:39:24AM +0530, Srivatsa S. Bhat wrote: > On 02/11/2013 01:20 AM, Oleg Nesterov wrote: > > On 02/11, Srivatsa S. Bhat wrote: > >> > >> On 02/10/2013 11:36 PM, Oleg Nesterov wrote: > > +static void announce_writer_inactive(struct percpu_rwlock *pcpu_rwlock) > > +{ >

Re: [PATCH v5 04/45] percpu_rwlock: Implement the core design of Per-CPU Reader-Writer Locks

2013-02-10 Thread Srivatsa S. Bhat
On 02/11/2013 01:43 AM, Oleg Nesterov wrote: > On 02/11, Srivatsa S. Bhat wrote: >> >> On 02/09/2013 04:40 AM, Paul E. McKenney wrote: +static void announce_writer_inactive(struct percpu_rwlock *pcpu_rwlock) +{ + unsigned int cpu; + + drop_writer_signal(pcpu_rwlock, smp_p

Re: [PATCH v5 04/45] percpu_rwlock: Implement the core design of Per-CPU Reader-Writer Locks

2013-02-10 Thread Oleg Nesterov
On 02/11, Srivatsa S. Bhat wrote: > > On 02/09/2013 04:40 AM, Paul E. McKenney wrote: > >> +static void announce_writer_inactive(struct percpu_rwlock *pcpu_rwlock) > >> +{ > >> + unsigned int cpu; > >> + > >> + drop_writer_signal(pcpu_rwlock, smp_processor_id()); > > > > Why do we drop ourselves

Re: [PATCH v5 04/45] percpu_rwlock: Implement the core design of Per-CPU Reader-Writer Locks

2013-02-10 Thread Srivatsa S. Bhat
On 02/11/2013 01:20 AM, Oleg Nesterov wrote: > On 02/11, Srivatsa S. Bhat wrote: >> >> On 02/10/2013 11:36 PM, Oleg Nesterov wrote: > +static void announce_writer_inactive(struct percpu_rwlock *pcpu_rwlock) > +{ > + unsigned int cpu; > + > + drop_writer_signal(pcpu_rwlock, s

Re: [PATCH v5 09/45] smp, cpu hotplug: Fix smp_call_function_*() to prevent CPU offline properly

2013-02-10 Thread Srivatsa S. Bhat
On 02/11/2013 01:26 AM, Paul E. McKenney wrote: > On Mon, Feb 11, 2013 at 01:11:29AM +0530, Srivatsa S. Bhat wrote: >> On 02/09/2013 05:37 AM, Paul E. McKenney wrote: >>> On Tue, Jan 22, 2013 at 01:05:10PM +0530, Srivatsa S. Bhat wrote: Once stop_machine() is gone from the CPU offline path, we

Re: [PATCH v5 04/45] percpu_rwlock: Implement the core design of Per-CPU Reader-Writer Locks

2013-02-10 Thread Srivatsa S. Bhat
On 02/11/2013 01:17 AM, Paul E. McKenney wrote: > On Mon, Feb 11, 2013 at 12:40:56AM +0530, Srivatsa S. Bhat wrote: >> On 02/09/2013 04:40 AM, Paul E. McKenney wrote: >>> On Tue, Jan 22, 2013 at 01:03:53PM +0530, Srivatsa S. Bhat wrote: Using global rwlocks as the backend for per-CPU rwlocks h

Re: [PATCH v5 09/45] smp, cpu hotplug: Fix smp_call_function_*() to prevent CPU offline properly

2013-02-10 Thread Paul E. McKenney
On Mon, Feb 11, 2013 at 01:11:29AM +0530, Srivatsa S. Bhat wrote: > On 02/09/2013 05:37 AM, Paul E. McKenney wrote: > > On Tue, Jan 22, 2013 at 01:05:10PM +0530, Srivatsa S. Bhat wrote: > >> Once stop_machine() is gone from the CPU offline path, we won't be able to > >> depend on preempt_disable()

Re: [PATCH v5 04/45] percpu_rwlock: Implement the core design of Per-CPU Reader-Writer Locks

2013-02-10 Thread Paul E. McKenney
On Sun, Feb 10, 2013 at 07:06:07PM +0100, Oleg Nesterov wrote: > On 02/08, Paul E. McKenney wrote: [ . . . ] > > > +static inline void sync_reader(struct percpu_rwlock *pcpu_rwlock, > > > +unsigned int cpu) > > > +{ > > > + smp_rmb(); /* Paired with smp_[w]mb() in percpu_r

Re: [PATCH v5 04/45] percpu_rwlock: Implement the core design of Per-CPU Reader-Writer Locks

2013-02-10 Thread Oleg Nesterov
On 02/11, Srivatsa S. Bhat wrote: > > On 02/10/2013 11:36 PM, Oleg Nesterov wrote: > >>> +static void announce_writer_inactive(struct percpu_rwlock *pcpu_rwlock) > >>> +{ > >>> + unsigned int cpu; > >>> + > >>> + drop_writer_signal(pcpu_rwlock, smp_processor_id()); > >> > >> Why do we drop ours

Re: [PATCH v5 04/45] percpu_rwlock: Implement the core design of Per-CPU Reader-Writer Locks

2013-02-10 Thread Paul E. McKenney
On Mon, Feb 11, 2013 at 12:40:56AM +0530, Srivatsa S. Bhat wrote: > On 02/09/2013 04:40 AM, Paul E. McKenney wrote: > > On Tue, Jan 22, 2013 at 01:03:53PM +0530, Srivatsa S. Bhat wrote: > >> Using global rwlocks as the backend for per-CPU rwlocks helps us avoid many > >> lock-ordering related probl

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

2013-02-10 Thread Srivatsa S. Bhat
On 02/09/2013 05:45 AM, Paul E. McKenney wrote: > On Tue, Jan 22, 2013 at 01:15:22PM +0530, Srivatsa S. Bhat wrote: >> ... and also cleanup a comment that refers to CPU hotplug being dependent on >> stop_machine(). >> >> Cc: David Howells >> Signed-off-by: Srivatsa S. Bhat > > Reviewed-by: Paul

Re: [PATCH v5 14/45] rcu, CPU hotplug: Fix comment referring to stop_machine()

2013-02-10 Thread Srivatsa S. Bhat
On 02/09/2013 05:44 AM, Paul E. McKenney wrote: > On Tue, Jan 22, 2013 at 01:06:34PM +0530, Srivatsa S. Bhat wrote: >> Don't refer to stop_machine() in the CPU hotplug path, since we are going >> to get rid of it. Also, move the comment referring to callback adoption >> to the CPU_DEAD case, becaus

Re: [PATCH v5 09/45] smp, cpu hotplug: Fix smp_call_function_*() to prevent CPU offline properly

2013-02-10 Thread Srivatsa S. Bhat
On 02/09/2013 05:37 AM, Paul E. McKenney wrote: > On Tue, Jan 22, 2013 at 01:05:10PM +0530, Srivatsa S. Bhat wrote: >> Once stop_machine() is gone from the CPU offline path, we won't be able to >> depend on preempt_disable() to prevent CPUs from going offline from under us. >> >> Use the get/put_on

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

2013-02-10 Thread Srivatsa S. Bhat
Hi Namhyung, On 01/29/2013 03:51 PM, Namhyung Kim wrote: > Hi Srivatsa, > > On Tue, 22 Jan 2013 13:04:54 +0530, Srivatsa S. Bhat wrote: >> @@ -246,15 +291,21 @@ struct take_cpu_down_param { >> static int __ref take_cpu_down(void *_param) >> { >> struct take_cpu_down_param *param = _param;

Re: [PATCH v5 06/45] percpu_rwlock: Allow writers to be readers, and add lockdep annotations

2013-02-10 Thread Srivatsa S. Bhat
On 02/09/2013 05:17 AM, Paul E. McKenney wrote: > On Tue, Jan 22, 2013 at 01:04:23PM +0530, Srivatsa S. Bhat wrote: >> CPU hotplug (which will be the first user of per-CPU rwlocks) has a special >> requirement with respect to locking: the writer, after acquiring the per-CPU >> rwlock for write, mus

Re: [PATCH v5 05/45] percpu_rwlock: Make percpu-rwlocks IRQ-safe, optimally

2013-02-10 Thread Srivatsa S. Bhat
On 02/11/2013 12:12 AM, Oleg Nesterov wrote: > only one cosmetic nit... > > On 01/22, Srivatsa S. Bhat wrote: >> >> +#define READER_PRESENT (1UL << 16) >> +#define READER_REFCNT_MASK (READER_PRESENT - 1) >> + >> #define reader_uses_percpu_refcnt(pcpu_rwlock, cpu) \ >

Re: [PATCH v5 05/45] percpu_rwlock: Make percpu-rwlocks IRQ-safe, optimally

2013-02-10 Thread Srivatsa S. Bhat
On 02/09/2013 05:14 AM, Paul E. McKenney wrote: > On Tue, Jan 22, 2013 at 01:04:11PM +0530, Srivatsa S. Bhat wrote: >> If interrupt handlers can also be readers, then one of the ways to make >> per-CPU rwlocks safe, is to disable interrupts at the reader side before >> trying to acquire the per-CPU

Re: [PATCH v5 04/45] percpu_rwlock: Implement the core design of Per-CPU Reader-Writer Locks

2013-02-10 Thread Srivatsa S. Bhat
On 02/10/2013 11:36 PM, Oleg Nesterov wrote: > On 02/08, Paul E. McKenney wrote: >> >> On Tue, Jan 22, 2013 at 01:03:53PM +0530, Srivatsa S. Bhat wrote: >>> >>> void percpu_read_unlock(struct percpu_rwlock *pcpu_rwlock) >>> { >>> - read_unlock(&pcpu_rwlock->global_rwlock); >> >> We need an smp_

Re: [PATCH v5 04/45] percpu_rwlock: Implement the core design of Per-CPU Reader-Writer Locks

2013-02-10 Thread Srivatsa S. Bhat
On 02/09/2013 04:40 AM, Paul E. McKenney wrote: > On Tue, Jan 22, 2013 at 01:03:53PM +0530, Srivatsa S. Bhat wrote: >> Using global rwlocks as the backend for per-CPU rwlocks helps us avoid many >> lock-ordering related problems (unlike per-cpu locks). However, global >> rwlocks lead to unnecessary

Re: [PATCH v5 05/45] percpu_rwlock: Make percpu-rwlocks IRQ-safe, optimally

2013-02-10 Thread Oleg Nesterov
only one cosmetic nit... On 01/22, Srivatsa S. Bhat wrote: > > +#define READER_PRESENT (1UL << 16) > +#define READER_REFCNT_MASK (READER_PRESENT - 1) > + > #define reader_uses_percpu_refcnt(pcpu_rwlock, cpu) \ > (ACCESS_ONCE(per_cpu(*((pcpu_rwlock)->

Re: [PATCH v5 04/45] percpu_rwlock: Implement the core design of Per-CPU Reader-Writer Locks

2013-02-10 Thread Srivatsa S. Bhat
On 02/09/2013 04:17 AM, Paul E. McKenney wrote: > On Tue, Jan 29, 2013 at 08:12:37PM +0900, Namhyung Kim wrote: >> On Thu, 24 Jan 2013 10:00:04 +0530, Srivatsa S. Bhat wrote: >>> On 01/24/2013 01:27 AM, Tejun Heo wrote: On Thu, Jan 24, 2013 at 01:03:52AM +0530, Srivatsa S. Bhat wrote: > CP

Re: [PATCH v5 04/45] percpu_rwlock: Implement the core design of Per-CPU Reader-Writer Locks

2013-02-10 Thread Oleg Nesterov
On 02/08, Paul E. McKenney wrote: > > On Tue, Jan 22, 2013 at 01:03:53PM +0530, Srivatsa S. Bhat wrote: > > > > void percpu_read_unlock(struct percpu_rwlock *pcpu_rwlock) > > { > > - read_unlock(&pcpu_rwlock->global_rwlock); > > We need an smp_mb() here to keep the critical section ordered befo

Re: Re[3]: PS3 platform is broken on Linux 3.7.0

2013-02-10 Thread Aneesh Kumar K.V
Phileas Fogg writes: > And another note. > I took a look at the MMU chapter in the Cell Architecture handbook and indeed > the first 15 bits in VA are treated as 0 by the hardware. > > Quote: > > 1. High-order bits above 65 bits in the 80-bit virtual address (VA[0:14]) are > not implemented. T

Re: Re[3]: PS3 platform is broken on Linux 3.7.0

2013-02-10 Thread Aneesh Kumar K.V
Phileas Fogg writes: > Please ignore the previous patch to fix the PACA issue on PS3 arch. > This is the correct one: > > --- a/arch/powerpc/kernel/setup_64.c 2013-02-10 13:56:12.803855673 +0100 > +++ b/arch/powerpc/kernel/setup_64.c 2013-02-10 14:07:22.870561322 +0100 > @@ -186,6 +186,9 @@ >

Re: [RFC PATCH 2/5] powerpc: Exception hooks for context tracking subsystem

2013-02-10 Thread Frederic Weisbecker
2013/2/1 Li Zhong : > This is the exception hooks for context tracking subsystem, including > data access, program check, single step, instruction breakpoint, machine > check, > alignment, fp unavailable, altivec assist, unknown exception, whose handlers > might use RCU. > > This patch corresponds

Re[3]: PS3 platform is broken on Linux 3.7.0

2013-02-10 Thread Phileas Fogg
Please ignore the previous patch to fix the PACA issue on PS3 arch. This is the correct one: --- a/arch/powerpc/kernel/setup_64.c2013-02-10 13:56:12.803855673 +0100 +++ b/arch/powerpc/kernel/setup_64.c2013-02-10 14:07:22.870561322 +0100 @@ -186,6 +186,9 @@ initialise_paca(&boot_pa

Re[2]: PS3 platform is broken on Linux 3.7.0

2013-02-10 Thread Phileas Fogg
>On Fri, 2012-12-14 at 16:35 +0400, Phileas Fogg wrote: >> Hi, >> >> I wanted to bring to your attention the fact that the PS3 platform is broken >> on Linux 3.7.0. >> >> i'm not able to boot Linux 3.7.0 on my PS3 slim. Linux 3.6.10 boots just >> fine but not 3.7.0 >> When i try to boot Linux

Re: [RFC PATCH 1/5] powerpc: Syscall hooks for context tracking subsystem

2013-02-10 Thread Frederic Weisbecker
2013/2/1 Li Zhong : > This is the syscall slow path hooks for context tracking subsystem, > corresponding to > [PATCH] x86: Syscall hooks for userspace RCU extended QS > commit bf5a3c13b939813d28ce26c01425054c740d6731 > > TIF_MEMDIE is moved to the second 16-bits (with value 17), as it seems ther

Re[3]: PS3 platform is broken on Linux 3.7.0

2013-02-10 Thread Phileas Fogg
And another note. I took a look at the MMU chapter in the Cell Architecture handbook and indeed the first 15 bits in VA are treated as 0 by the hardware. Quote: 1. High-order bits above 65 bits in the 80-bit virtual address (VA[0:14]) are not implemented. The hardware always    treats these bi

Re[2]: PS3 platform is broken on Linux 3.7.0

2013-02-10 Thread Phileas Fogg
Hi, i found where the problem lies. I also printed some values in ps3_hpte_insert with and without 64TB support, i used OpenWRT with Linux 3.7.6 for testing. Some values without 64TB support: - [    0.060487] RPC: Registered named UNIX socket tra