From: Andrew Morton <akpm@linux-foundation.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu,
peterz@infradead.org, hch@infradead.org, adobriyan@gmail.com,
bunk@kernel.org
Subject: Re: [PATCH] add typecheck on irqsave and friends for correct flags
Date: Thu, 1 May 2008 18:49:05 -0700 [thread overview]
Message-ID: <20080501184905.b7e0dade.akpm@linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0805012114180.31096@gandalf.stny.rr.com>
On Thu, 1 May 2008 21:16:48 -0400 (EDT) Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Thu, 1 May 2008, Andrew Morton wrote:
> > > This patch adds a typecheck inside the irqsave and restore functions
> > > to flag these cases.
> >
> > hm, not exactly a thing of beauty, but it could have been worse.
>
> Beauty is in the eye of the beholder.
> (a mother always thinks their kid is beautiful ;-).
As long as your patch doesn't soil its diaper.
> >
> >
> > If we had implemeted these things properly, as
> >
> > unsigned long spin_lock_irqsave(spinlock_t *lock);
>
> 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.
next prev parent reply other threads:[~2008-05-02 1:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-01 23:51 [PATCH] add typecheck on irqsave and friends for correct flags Steven Rostedt
2008-05-02 0:28 ` Andrew Morton
2008-05-02 1:16 ` Steven Rostedt
2008-05-02 1:49 ` Andrew Morton [this message]
2008-05-02 1:57 ` Steven Rostedt
2008-05-02 8:37 ` Alexey Dobriyan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080501184905.b7e0dade.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=adobriyan@gmail.com \
--cc=bunk@kernel.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox