All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	Josh Triplett <josh@joshtriplett.org>,
	laijs@cn.fujitsu.com, manfred@colorfullife.com,
	dhowells@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rcu: avoid checking for constant
Date: Thu, 12 Jan 2012 07:29:12 -0800	[thread overview]
Message-ID: <20120112152912.GB2419@linux.vnet.ibm.com> (raw)
In-Reply-To: <alpine.LNX.2.01.1201121154530.21275@frira.zrqbmnf.qr>

On Thu, Jan 12, 2012 at 11:57:10AM +0100, Jan Engelhardt wrote:
> On Thursday 2012-01-12 11:54, Eric Dumazet wrote:
> 
> >Le jeudi 12 janvier 2012 à 11:34 +0100, Jan Engelhardt a écrit :
> >
> >> When compiling kernel or module code with -O0, "offset" is no longer
> >> considered a constant, and therefore always triggers the build error
> >> that BUILD_BUG_ON is defined to yield.
> >
> >Why compiling kernel with -O0 is even considered ?
> 
> The compile error was observed when trying to compile an out-of-tree 
> module with -O0.

Hmmm...  Why not have a glue .c file in your out-of-tree module
that contains function like:

	void kfree_rcu_foo(struct foo *fp)
	{
		kfree_rcu(fp, foo_rcu);
	}

Compile this .c file normally, then apply -O0 only to the other
files in your module.

							Thanx, Paul


  reply	other threads:[~2012-01-12 15:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-12  5:11 [PATCH] rcu: avoid checking for constant Jan Engelhardt
2012-01-12  7:14 ` Josh Triplett
2012-01-12  9:25   ` Jan Engelhardt
2012-01-12  9:52     ` Josh Triplett
2012-01-12 10:34       ` Jan Engelhardt
2012-01-12 10:54         ` Eric Dumazet
2012-01-12 10:57           ` Jan Engelhardt
2012-01-12 15:29             ` Paul E. McKenney [this message]
2012-01-12 16:08               ` Jan Engelhardt
2012-01-12 16:14                 ` Eric Dumazet
2012-01-12 11:58         ` Josh Triplett
2012-01-12 15:38           ` Jan Engelhardt
2012-01-12 18:41             ` Josh Triplett
2012-04-19 18:57               ` Paul E. McKenney

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=20120112152912.GB2419@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=dhowells@redhat.com \
    --cc=eric.dumazet@gmail.com \
    --cc=jengelh@medozas.de \
    --cc=josh@joshtriplett.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.