linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <compudj@krystal.dyndns.org>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: linux arch <linux-arch@vger.kernel.org>,
	Randy Dunlap <rdunlap@xenotime.net>
Subject: Re: HAVE or ARCH_HAS or ARCH_SUPPORTS and use of select
Date: Thu, 15 Nov 2007 07:21:51 -0500	[thread overview]
Message-ID: <20071115122151.GA10359@Krystal> (raw)
In-Reply-To: <20071115090215.GA20612@uranus.ravnborg.org>

* Sam Ravnborg (sam@ravnborg.org) wrote:
> I just asked Mathieu to use ARCH_HAS_<config-symbol>
> when an architecture should say that it uses the
> generic KPROBSE functionality.
> 
> ARCH_HAS was selected from a pure "what is most popular today"
> grep of the kernel source.
> 
> It is used roughly like this:
> 
> *Generic Kconfig file:*
> config KPROBES
> 	depends on ARCH_HAS_KPROBES
> 	bool "bla bla"
> 
> # let arch that support KPROBES select the below symbol.
> # Note: no dependencies allowed on ARCH_HAS_ symbols!
> config ARCH_HAS_KPROBES
> 	def_bool n
> 
> *Arch specific Kconfig file:*
> config X86
> 	select ARCH_HAS_KPROBES
> 
> 
> But I felt a bit uneasy with the wording "ARCH_HAS" because
> in reality it is "ARCH_USES" or "ARCH_SUPPORTS" because
> in this case X86 uses the generic KPROBES functionality
> or maybe it just supports it.
> On the config level do we really want to ditingush between "HAS",
> "SUPPORTS", "USE" and whatever the next person come up with?
> 
> automake and friends uses HAVE_ and I dunno about other tools.
> 

FWIW, I've used "NEED_*" in my LTTng patchset to specify when an
architecture needs support from an architecture independent module. (it
could be an alternative to USE_*).

Mathieu

> Could we come up with a naming that fits the current usages we
> could standardize on this.
> When we have it defined I will update kconfig-language.txt
> and try to chase people that fail to use the naming scheme.
> (Or I will ask Randy to do it so it is readable for humans..)
> 
> For x86 for instance there is potential for some cleaning and likewise
> in other archs.
> 
> 	Sam
> 

-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68

  parent reply	other threads:[~2007-11-15 12:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-15  9:02 HAVE or ARCH_HAS or ARCH_SUPPORTS and use of select Sam Ravnborg
2007-11-15 10:26 ` Russell King
2007-11-15 12:21 ` Mathieu Desnoyers [this message]
2007-11-15 18:14   ` Sam Ravnborg
2007-11-15 22:13     ` Geert Uytterhoeven
2007-11-15 22:56       ` David Howells

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=20071115122151.GA10359@Krystal \
    --to=compudj@krystal.dyndns.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    --cc=sam@ravnborg.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;
as well as URLs for NNTP newsgroup(s).