lkml.org 
[lkml]   [2008]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] add typecheck on irqsave and friends for correct flags

On Thu, 1 May 2008, Andrew Morton wrote:
> >
> > Then we would have been forced to do the
> >
> > irqflags_t spin_lock_irqsave(spinlock_t *lock);
> >
> > trick. Which would probably be the better long term solution, but the
> > biggest PITA for you in the short term.
>
> We should have done that from day one. If there's an architecture out
> there which cannot fit its interrupt state into its unsigned long (hard to
> believe) then it'll need to pull stunts with cookies and lookups or
> something. And on 64-bit architectures we're using 4 more bytes of local
> storage than is needed.
>
> But I don't think we've had enough problems with this particular issue to
> justify a kernel-wide edit like that. And this patch should settle the
> issue.

I'm just thinking of all the wonderful tricks at hand if we had a special
irqflags_t type. But I'm sure you don't want any more special tricks from
us with respect to spinlocks ;-)

-- Steve



\
 
 \ /
  Last update: 2008-05-02 03:59    [W:0.036 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site