From: Nathan Lynch <ntl@pobox.com>
To: Suresh Kodati <kodatisu@in.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch] fix smp_processor_id() use in include/asm-generic/percpu.h
Date: Fri, 23 Dec 2005 19:08:38 -0600 [thread overview]
Message-ID: <20051224010838.GA9734@localhost.localdomain> (raw)
In-Reply-To: <20051222203528.GA4407@dyn9041041086.austin.ibm.com>
Suresh Kodati wrote:
> This patch suppresses the following BUG() seen during bootup of 2.6.15-rc5-mm3 on i386 machines by replacing smp_processor_id with raw_smp_processor_id().
>
> <snip>
> [ 11.258828] Freeing unused kernel memory: 260k freed
> [ 11.258864] BUG: using smp_processor_id() in preemptible [00000001] code: swapper/1
> [ 11.258878] caller is mod_page_state_offset+0x12/0x28
> </snip>
>
> Signed-off-by: Suresh Kodati <kodatisu@in.ibm.com>
> --
>
> include/asm-generic/percpu.h | 2 +-
> 1 files changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-2.6.15-rc5/include/asm-generic/percpu.h.orig 2005-12-21 15:13:27.000000000 -0600
> +++ linux-2.6.15-rc5/include/asm-generic/percpu.h 2005-12-21 15:13:43.000000000 -0600
> @@ -13,7 +13,7 @@ extern unsigned long __per_cpu_offset[NR
>
> /* var is in discarded region: offset to particular copy we want */
> #define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu]))
> -#define __get_cpu_var(var) per_cpu(var, smp_processor_id())
> +#define __get_cpu_var(var) per_cpu(var, raw_smp_processor_id())
Surely this isn't the right way to address the warning you are seeing?
This change would keep us from catching preempt-unsafe uses of per-cpu
data.
Nathan
prev parent reply other threads:[~2005-12-24 1:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-22 20:35 Suresh Kodati
2005-12-24 1:08 ` Nathan Lynch [this message]
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=20051224010838.GA9734@localhost.localdomain \
--to=ntl@pobox.com \
--cc=kodatisu@in.ibm.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®