Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-10 Thread Josh Boyer
On Thu, 2007-05-10 at 19:29 +1000, Benjamin Herrenschmidt wrote: > On Thu, 2007-05-10 at 01:53 -0700, David Miller wrote: > > From: Andrew Morton <[EMAIL PROTECTED]> > > Date: Thu, 10 May 2007 01:50:36 -0700 > > > > > We discussed this a couple of months back. davem landed firmly in the > > >

Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-10 Thread Benjamin Herrenschmidt
On Thu, 2007-05-10 at 01:53 -0700, David Miller wrote: > From: Andrew Morton <[EMAIL PROTECTED]> > Date: Thu, 10 May 2007 01:50:36 -0700 > > > We discussed this a couple of months back. davem landed firmly in the > > second camp and everyone then shut up ;) > > No I landed in the first :-))) >

Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-10 Thread David Miller
From: Andrew Morton <[EMAIL PROTECTED]> Date: Thu, 10 May 2007 01:50:36 -0700 > We discussed this a couple of months back. davem landed firmly in the > second camp and everyone then shut up ;) No I landed in the first :-))) I think the empty lines are a waste and only serve to eat up precious

Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-10 Thread Andrew Morton
On Thu, 10 May 2007 18:41:45 +1000 Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > > > > What about my comment layout style ? I've been using that forever ... Or > > > do you mean I should use a function documentation style layout there ? > > > > /* This > > * is > > * wrong > > */ > >

Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-10 Thread David Miller
From: Benjamin Herrenschmidt <[EMAIL PROTECTED]> Date: Thu, 10 May 2007 18:41:45 +1000 > > > > What about my comment layout style ? I've been using that forever ... Or > > > do you mean I should use a function documentation style layout there ? > > > > /* This > > * is > > * wrong > > */ > >

Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-10 Thread Benjamin Herrenschmidt
On Thu, 2007-05-10 at 13:24 +0530, Satyam Sharma wrote: > But then, what _is_ the problem with your approach above? An arch that > wants (and implements) hard_irq_disable will also #define that dummy > macro, so we just need to pull in the appropriate header (directly, > indirectly, anyhow -- we

Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-10 Thread Benjamin Herrenschmidt
> > What about my comment layout style ? I've been using that forever ... Or > > do you mean I should use a function documentation style layout there ? > > /* This > * is > * wrong > */ > > /* > * This > * is > * right > */ Hrm... how bad are you about that one ? I must say I prefer my

Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-10 Thread Satyam Sharma
On 5/10/07, Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > So you're saying that this mechanism forces the arch (that really > wants hard_irq_disable) to _#define_ hard_irq_disable (as a macro), > and if it implements it as an inline function, for example, then we're > screwed? No. The

Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-10 Thread Andrew Morton
On Thu, 10 May 2007 16:35:51 +1000 Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > On Wed, 2007-05-09 at 22:41 -0700, Andrew Morton wrote: > > On Thu, 10 May 2007 15:25:58 +1000 Benjamin Herrenschmidt <[EMAIL > > PROTECTED]> wrote: > > > > > --- linux-cell.orig/include/linux/interrupt.h

Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-10 Thread Benjamin Herrenschmidt
> So you're saying that this mechanism forces the arch (that really > wants hard_irq_disable) to _#define_ hard_irq_disable (as a macro), > and if it implements it as an inline function, for example, then we're > screwed? No. The idea is to do like we did for a few other things already

Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-10 Thread Satyam Sharma
Hi Andrew, On 5/10/07, Andrew Morton <[EMAIL PROTECTED]> wrote: On Thu, 10 May 2007 15:25:58 +1000 Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > --- linux-cell.orig/include/linux/interrupt.h 2007-05-10 14:51:22.0 +1000 > +++ linux-cell/include/linux/interrupt.h 2007-05-10

Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-10 Thread Benjamin Herrenschmidt
On Wed, 2007-05-09 at 22:41 -0700, Andrew Morton wrote: > On Thu, 10 May 2007 15:25:58 +1000 Benjamin Herrenschmidt <[EMAIL PROTECTED]> > wrote: > > > --- linux-cell.orig/include/linux/interrupt.h 2007-05-10 > > 14:51:22.0 +1000 > > +++ linux-cell/include/linux/interrupt.h

Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-10 Thread Benjamin Herrenschmidt
On Wed, 2007-05-09 at 22:41 -0700, Andrew Morton wrote: On Thu, 10 May 2007 15:25:58 +1000 Benjamin Herrenschmidt [EMAIL PROTECTED] wrote: --- linux-cell.orig/include/linux/interrupt.h 2007-05-10 14:51:22.0 +1000 +++ linux-cell/include/linux/interrupt.h2007-05-10

Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-10 Thread Satyam Sharma
Hi Andrew, On 5/10/07, Andrew Morton [EMAIL PROTECTED] wrote: On Thu, 10 May 2007 15:25:58 +1000 Benjamin Herrenschmidt [EMAIL PROTECTED] wrote: --- linux-cell.orig/include/linux/interrupt.h 2007-05-10 14:51:22.0 +1000 +++ linux-cell/include/linux/interrupt.h 2007-05-10

Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-10 Thread Benjamin Herrenschmidt
So you're saying that this mechanism forces the arch (that really wants hard_irq_disable) to _#define_ hard_irq_disable (as a macro), and if it implements it as an inline function, for example, then we're screwed? No. The idea is to do like we did for a few other things already (according to

Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-10 Thread Andrew Morton
On Thu, 10 May 2007 16:35:51 +1000 Benjamin Herrenschmidt [EMAIL PROTECTED] wrote: On Wed, 2007-05-09 at 22:41 -0700, Andrew Morton wrote: On Thu, 10 May 2007 15:25:58 +1000 Benjamin Herrenschmidt [EMAIL PROTECTED] wrote: --- linux-cell.orig/include/linux/interrupt.h 2007-05-10

Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-10 Thread Satyam Sharma
On 5/10/07, Benjamin Herrenschmidt [EMAIL PROTECTED] wrote: So you're saying that this mechanism forces the arch (that really wants hard_irq_disable) to _#define_ hard_irq_disable (as a macro), and if it implements it as an inline function, for example, then we're screwed? No. The idea is

Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-10 Thread Benjamin Herrenschmidt
What about my comment layout style ? I've been using that forever ... Or do you mean I should use a function documentation style layout there ? /* This * is * wrong */ /* * This * is * right */ Hrm... how bad are you about that one ? I must say I prefer my style :-)

Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-10 Thread Benjamin Herrenschmidt
On Thu, 2007-05-10 at 13:24 +0530, Satyam Sharma wrote: But then, what _is_ the problem with your approach above? An arch that wants (and implements) hard_irq_disable will also #define that dummy macro, so we just need to pull in the appropriate header (directly, indirectly, anyhow -- we don't

Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-10 Thread David Miller
From: Benjamin Herrenschmidt [EMAIL PROTECTED] Date: Thu, 10 May 2007 18:41:45 +1000 What about my comment layout style ? I've been using that forever ... Or do you mean I should use a function documentation style layout there ? /* This * is * wrong */ /* * This *

Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-10 Thread Andrew Morton
On Thu, 10 May 2007 18:41:45 +1000 Benjamin Herrenschmidt [EMAIL PROTECTED] wrote: What about my comment layout style ? I've been using that forever ... Or do you mean I should use a function documentation style layout there ? /* This * is * wrong */ /* * This *

Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-10 Thread David Miller
From: Andrew Morton [EMAIL PROTECTED] Date: Thu, 10 May 2007 01:50:36 -0700 We discussed this a couple of months back. davem landed firmly in the second camp and everyone then shut up ;) No I landed in the first :-))) I think the empty lines are a waste and only serve to eat up precious

Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-10 Thread Benjamin Herrenschmidt
On Thu, 2007-05-10 at 01:53 -0700, David Miller wrote: From: Andrew Morton [EMAIL PROTECTED] Date: Thu, 10 May 2007 01:50:36 -0700 We discussed this a couple of months back. davem landed firmly in the second camp and everyone then shut up ;) No I landed in the first :-))) I think

Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-10 Thread Josh Boyer
On Thu, 2007-05-10 at 19:29 +1000, Benjamin Herrenschmidt wrote: On Thu, 2007-05-10 at 01:53 -0700, David Miller wrote: From: Andrew Morton [EMAIL PROTECTED] Date: Thu, 10 May 2007 01:50:36 -0700 We discussed this a couple of months back. davem landed firmly in the second camp and

Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-09 Thread Andrew Morton
On Thu, 10 May 2007 15:25:58 +1000 Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > --- linux-cell.orig/include/linux/interrupt.h 2007-05-10 14:51:22.0 > +1000 > +++ linux-cell/include/linux/interrupt.h 2007-05-10 15:18:04.0 > +1000 > @@ -241,6 +241,16 @@ static inline

[PATCH 2/3] Add hard_irq_disable()

2007-05-09 Thread Benjamin Herrenschmidt
Some architectures, like powerpc, implement lazy disabling of interrupts. That means that on those, local_irq_disable() doesn't actually disable interrupts on the CPU, but only sets some per CPU flag which cause them to be disabled only if an interrupt actually occurs. However, in some cases,

[PATCH 2/3] Add hard_irq_disable()

2007-05-09 Thread Benjamin Herrenschmidt
Some architectures, like powerpc, implement lazy disabling of interrupts. That means that on those, local_irq_disable() doesn't actually disable interrupts on the CPU, but only sets some per CPU flag which cause them to be disabled only if an interrupt actually occurs. However, in some cases,

Re: [PATCH 2/3] Add hard_irq_disable()

2007-05-09 Thread Andrew Morton
On Thu, 10 May 2007 15:25:58 +1000 Benjamin Herrenschmidt [EMAIL PROTECTED] wrote: --- linux-cell.orig/include/linux/interrupt.h 2007-05-10 14:51:22.0 +1000 +++ linux-cell/include/linux/interrupt.h 2007-05-10 15:18:04.0 +1000 @@ -241,6 +241,16 @@ static inline void