public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* How to force Kconfig tristate into range n..m?
@ 2007-05-15 23:30 Paul E. McKenney
  2007-05-15 23:41 ` Randy Dunlap
  2007-05-16 12:18 ` Andi Kleen
  0 siblings, 2 replies; 7+ messages in thread
From: Paul E. McKenney @ 2007-05-15 23:30 UTC (permalink / raw)
  To: linux-kernel, ak

Hello!

It would be nice to constrain RCU_TORTURE_TEST to "n" or "m", excluding
"y", since "y" gives anti-social results that I have never seen a use
for.  So I tried adding a "range n m" to the Kconfig.debug entry for
RCU_TORTURE_TEST.  This gives me the following warning at "make xconfig"
time:

   lib/Kconfig.debug:386:warning: range is only allowed for int or hex symbols

and xconfig ignores the restriction.

A few clumsy hacks get rid of the error message, but fail to cause
xconfig to enforce the limit.

Is there some other way to prohibit modules from being compiled into
the main kernel?

						Thanx, Paul

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to force Kconfig tristate into range n..m?
  2007-05-15 23:30 How to force Kconfig tristate into range n..m? Paul E. McKenney
@ 2007-05-15 23:41 ` Randy Dunlap
  2007-05-16  0:18   ` Paul E. McKenney
  2007-05-16 12:18 ` Andi Kleen
  1 sibling, 1 reply; 7+ messages in thread
From: Randy Dunlap @ 2007-05-15 23:41 UTC (permalink / raw)
  To: paulmck; +Cc: linux-kernel, ak

On Tue, 15 May 2007 16:30:02 -0700 Paul E. McKenney wrote:

> Hello!
> 
> It would be nice to constrain RCU_TORTURE_TEST to "n" or "m", excluding
> "y", since "y" gives anti-social results that I have never seen a use
> for.  So I tried adding a "range n m" to the Kconfig.debug entry for
> RCU_TORTURE_TEST.  This gives me the following warning at "make xconfig"
> time:
> 
>    lib/Kconfig.debug:386:warning: range is only allowed for int or hex symbols
> 
> and xconfig ignores the restriction.
> 
> A few clumsy hacks get rid of the error message, but fail to cause
> xconfig to enforce the limit.
> 
> Is there some other way to prohibit modules from being compiled into
> the main kernel?

I think that
	depends on m
will do what you want.  That's what some ancient PCMCIA drivers
do, as well as the crypto test module.


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to force Kconfig tristate into range n..m?
  2007-05-15 23:41 ` Randy Dunlap
@ 2007-05-16  0:18   ` Paul E. McKenney
  0 siblings, 0 replies; 7+ messages in thread
From: Paul E. McKenney @ 2007-05-16  0:18 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: linux-kernel, ak

On Tue, May 15, 2007 at 04:41:30PM -0700, Randy Dunlap wrote:
> On Tue, 15 May 2007 16:30:02 -0700 Paul E. McKenney wrote:
> 
> > Hello!
> > 
> > It would be nice to constrain RCU_TORTURE_TEST to "n" or "m", excluding
> > "y", since "y" gives anti-social results that I have never seen a use
> > for.  So I tried adding a "range n m" to the Kconfig.debug entry for
> > RCU_TORTURE_TEST.  This gives me the following warning at "make xconfig"
> > time:
> > 
> >    lib/Kconfig.debug:386:warning: range is only allowed for int or hex symbols
> > 
> > and xconfig ignores the restriction.
> > 
> > A few clumsy hacks get rid of the error message, but fail to cause
> > xconfig to enforce the limit.
> > 
> > Is there some other way to prohibit modules from being compiled into
> > the main kernel?
> 
> I think that
> 	depends on m
> will do what you want.  That's what some ancient PCMCIA drivers
> do, as well as the crypto test module.

This indeed works!  Thank you!!!

						Thanx, Paul

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to force Kconfig tristate into range n..m?
  2007-05-15 23:30 How to force Kconfig tristate into range n..m? Paul E. McKenney
  2007-05-15 23:41 ` Randy Dunlap
@ 2007-05-16 12:18 ` Andi Kleen
  2007-05-16 14:30   ` Stefan Richter
  2007-05-16 15:44   ` Paul E. McKenney
  1 sibling, 2 replies; 7+ messages in thread
From: Andi Kleen @ 2007-05-16 12:18 UTC (permalink / raw)
  To: paulmck; +Cc: linux-kernel

 
>
> Is there some other way to prohibit modules from being compiled into
> the main kernel?

One way is to use a separate symbol that is not user visible, but depends
on your main symbol and uses default m

(similar to the now infamous CONFIG_SCSI_WAIT_SCAN)

-Andi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to force Kconfig tristate into range n..m?
  2007-05-16 12:18 ` Andi Kleen
@ 2007-05-16 14:30   ` Stefan Richter
  2007-05-16 15:36     ` Satyam Sharma
  2007-05-16 15:44   ` Paul E. McKenney
  1 sibling, 1 reply; 7+ messages in thread
From: Stefan Richter @ 2007-05-16 14:30 UTC (permalink / raw)
  To: Andi Kleen; +Cc: paulmck, linux-kernel

Andi Kleen wrote:
> One way is to use a separate symbol that is not user visible, but depends
> on your main symbol and uses default m
> 
> (similar to the now infamous CONFIG_SCSI_WAIT_SCAN)

Actually CONFIG_SCSI_WAIT_SCAN should be visible and restricted to m or
n. :-)
-- 
Stefan Richter
-=====-=-=== -=-= =----
http://arcgraph.de/sr/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to force Kconfig tristate into range n..m?
  2007-05-16 14:30   ` Stefan Richter
@ 2007-05-16 15:36     ` Satyam Sharma
  0 siblings, 0 replies; 7+ messages in thread
From: Satyam Sharma @ 2007-05-16 15:36 UTC (permalink / raw)
  To: Stefan Richter; +Cc: Andi Kleen, paulmck, linux-kernel

On 5/16/07, Stefan Richter <stefanr@s5r6.in-berlin.de> wrote:
> Andi Kleen wrote:
> > One way is to use a separate symbol that is not user visible,

Gargle ... gargle ...

> > but depends on your main symbol
> > and uses default m

Aargh!

Please don't recommend such a hack.

[ Note to LKML archive readers: Andi never said this, you never read this. ]

> > (similar to the now infamous CONFIG_SCSI_WAIT_SCAN)
>
> Actually CONFIG_SCSI_WAIT_SCAN should be visible and restricted to m or
> n. :-)

Actually, SCSI_WAIT_SCAN doesn't want to be a separate module in the
first place :-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to force Kconfig tristate into range n..m?
  2007-05-16 12:18 ` Andi Kleen
  2007-05-16 14:30   ` Stefan Richter
@ 2007-05-16 15:44   ` Paul E. McKenney
  1 sibling, 0 replies; 7+ messages in thread
From: Paul E. McKenney @ 2007-05-16 15:44 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-kernel

On Wed, May 16, 2007 at 02:18:48PM +0200, Andi Kleen wrote:
> 
> >
> > Is there some other way to prohibit modules from being compiled into
> > the main kernel?
> 
> One way is to use a separate symbol that is not user visible, but depends
> on your main symbol and uses default m
> 
> (similar to the now infamous CONFIG_SCSI_WAIT_SCAN)

Cool!!!  Any problem you see with Randy Dunlap's suggestion of simply
adding "depends on m", though?

						Thanx, Paul

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-05-16 15:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-15 23:30 How to force Kconfig tristate into range n..m? Paul E. McKenney
2007-05-15 23:41 ` Randy Dunlap
2007-05-16  0:18   ` Paul E. McKenney
2007-05-16 12:18 ` Andi Kleen
2007-05-16 14:30   ` Stefan Richter
2007-05-16 15:36     ` Satyam Sharma
2007-05-16 15:44   ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox