mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: linux-kernel@vger.kernel.org
Subject: Re: RFC: Testing for kernel features in external modules
Date: Thu, 24 Jun 2004 23:23:11 +0200	[thread overview]
Message-ID: <20040624212311.GB4700@mars.ravnborg.org> (raw)
In-Reply-To: <20040624203516.GV31203@schnapps.adilger.int>

On Thu, Jun 24, 2004 at 02:35:16PM -0600, Andreas Dilger wrote:
> On Jun 24, 2004  22:30 +0200, Sam Ravnborg wrote:
> > +if [ -f remap4.o ]; then
> > +	echo "#define REMAP4 1" > $2
> > +elif [ -f remap5.o ]; then
> > +	echo "#define REMAP5 1" > $2
> > +fi
> 
> I would prefer that these be called something like HAVE_REMAP5, or
> better yet something descriptive like HAVE_REMAP_PAGE_RANGE_VMA.

Agreed - the above was just to give intro to the concept.
> 
> This obviously needs to be smarter also, to handle adding multiple
> #defines to a single .h file.
Agreed again - using >> would do the trick here.


The idea was to have a common way for external modules to detect
certain API changes, type changes etc. that would cause the build
to fail otherwise.

Also the code fragment shown were supposed to be part of the
external modules - not the main steram kernel.

> Ideally, when people make an incompatible kernel API change like this
> they would just #define HAVE_REMAP_PAGE_RANGE_VMA in the header that
> declares remap_page_range() directly (e.g. KERNEL_AS_O_DIRECT was added
> for this reason) instead of external builds having to figure this out
> themselves.  Adding the check script is no less work than just adding
> the #define to the appropriate header directly.

That practice would be nice.

	Sam

  parent reply	other threads:[~2004-06-24 21:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-24 20:30 Sam Ravnborg
2004-06-24 20:24 ` Patrick McFarland
2004-06-24 20:49   ` Sam Ravnborg
2004-06-24 20:35 ` Andreas Dilger
2004-06-24 21:07   ` Gerd Knorr
2004-06-24 21:23   ` Sam Ravnborg [this message]
2004-06-25  8:32   ` Andreas Gruenbacher
2004-06-25  9:04     ` Lars Marowsky-Bree
2004-06-26 23:48       ` Adrian Bunk

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=20040624212311.GB4700@mars.ravnborg.org \
    --to=sam@ravnborg.org \
    --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®