[lkml]   [2004]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: RFC: Testing for kernel features in external modules
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.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:04    [W:0.075 / U:1.408 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site