All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] arch-dependent Kconfig file options?
@ 2007-02-08 17:08 Robert P. J. Day
  2007-02-08 17:52 ` Randy Dunlap
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Robert P. J. Day @ 2007-02-08 17:08 UTC (permalink / raw)
  To: kernel-janitors


  is there a way to make the visibility of Kconfig file options
dependent on the underlying architecture?  as a specific example,
there are two archs (alpha and frv) that support debugging semaphores.
but that's not a general Kconfig-selectable setting -- those two
arches independently define those options:

  $ grep -r SEMAPHORE . | grep DEBUG

which seems wasteful.  why not just have that option in one place?
(lib/Kconfig.debug would be the obvious place, of course.)

  however, since that option applies only to a couple of arches, it
should be displayed only for those arches. is there a way to do this?

rday

p.s.  yes, i realize that it's not that big a deal here since it
involves only two architectures.  but it's the more general case i'm
curious about, when *other* architectures decide they want semaphore
debugging as well.

-- 
====================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
====================================
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

* Re: [KJ] arch-dependent Kconfig file options?
  2007-02-08 17:08 [KJ] arch-dependent Kconfig file options? Robert P. J. Day
@ 2007-02-08 17:52 ` Randy Dunlap
  2007-02-08 18:09 ` Matthew Wilcox
  2007-02-08 18:34 ` Robert P. J. Day
  2 siblings, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2007-02-08 17:52 UTC (permalink / raw)
  To: kernel-janitors

On Thu, 8 Feb 2007 12:08:45 -0500 (EST) Robert P. J. Day wrote:

> 
>   is there a way to make the visibility of Kconfig file options
> dependent on the underlying architecture?  as a specific example,
> there are two archs (alpha and frv) that support debugging semaphores.
> but that's not a general Kconfig-selectable setting -- those two
> arches independently define those options:
> 
>   $ grep -r SEMAPHORE . | grep DEBUG
> 
> which seems wasteful.  why not just have that option in one place?
> (lib/Kconfig.debug would be the obvious place, of course.)
> 
>   however, since that option applies only to a couple of arches, it
> should be displayed only for those arches. is there a way to do this?

Sure there is.  Look at lib/Kconfig.debug entries for
MAGIC_SYSRQ (for !UML) or DETECT_SOFTLOCKUP (!S390)
or DEBUG_BUGVERBOSE:

config DEBUG_BUGVERBOSE
	bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EMBEDDED
	depends on BUG
	depends on ARM || ARM26 || AVR32 || M32R || M68K || SPARC32 || SPARC64 || FRV || SUPERH || GENERIC_BUG
	default !EMBEDDED

or FRAME_POINTER:

config FRAME_POINTER
	bool "Compile the kernel with frame pointers"
	depends on DEBUG_KERNEL && (X86 || CRIS || M68K || M68KNOMMU || FRV || UML || S390 || AVR32 || SUPERH)
	default y if DEBUG_INFO && UML


> rday
> 
> p.s.  yes, i realize that it's not that big a deal here since it
> involves only two architectures.  but it's the more general case i'm
> curious about, when *other* architectures decide they want semaphore
> debugging as well.


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

* Re: [KJ] arch-dependent Kconfig file options?
  2007-02-08 17:08 [KJ] arch-dependent Kconfig file options? Robert P. J. Day
  2007-02-08 17:52 ` Randy Dunlap
@ 2007-02-08 18:09 ` Matthew Wilcox
  2007-02-08 18:34 ` Robert P. J. Day
  2 siblings, 0 replies; 4+ messages in thread
From: Matthew Wilcox @ 2007-02-08 18:09 UTC (permalink / raw)
  To: kernel-janitors

On Thu, Feb 08, 2007 at 12:08:45PM -0500, Robert P. J. Day wrote:
>   is there a way to make the visibility of Kconfig file options
> dependent on the underlying architecture?  as a specific example,

Yes, and there's an example in the very file you reference:

config DEBUG_BUGVERBOSE
        bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EMBEDDED
	depends on BUG
	depends on ARM || ARM26 || AVR32 || M32R || M68K || SPARC32 || SPARC64 | | FRV || SUPERH || GENERIC_BUG

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

* Re: [KJ] arch-dependent Kconfig file options?
  2007-02-08 17:08 [KJ] arch-dependent Kconfig file options? Robert P. J. Day
  2007-02-08 17:52 ` Randy Dunlap
  2007-02-08 18:09 ` Matthew Wilcox
@ 2007-02-08 18:34 ` Robert P. J. Day
  2 siblings, 0 replies; 4+ messages in thread
From: Robert P. J. Day @ 2007-02-08 18:34 UTC (permalink / raw)
  To: kernel-janitors

On Thu, 8 Feb 2007, Matthew Wilcox wrote:

> On Thu, Feb 08, 2007 at 12:08:45PM -0500, Robert P. J. Day wrote:
> >   is there a way to make the visibility of Kconfig file options
> > dependent on the underlying architecture?  as a specific example,
>
> Yes, and there's an example in the very file you reference:
>
> config DEBUG_BUGVERBOSE
>         bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EMBEDDED
> 	depends on BUG
> 	depends on ARM || ARM26 || AVR32 || M32R || M68K || SPARC32 || SPARC64 | | FRV || SUPERH || GENERIC_BUG

crap.  i really need to get more sleep.  thanks.

rday

-- 
====================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
====================================
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

end of thread, other threads:[~2007-02-08 18:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-08 17:08 [KJ] arch-dependent Kconfig file options? Robert P. J. Day
2007-02-08 17:52 ` Randy Dunlap
2007-02-08 18:09 ` Matthew Wilcox
2007-02-08 18:34 ` Robert P. J. Day

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.