public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* Specific processing during user space header generation
@ 2011-02-10  0:06 H. Peter Anvin
  2011-02-10  5:54 ` Sam Ravnborg
  0 siblings, 1 reply; 6+ messages in thread
From: H. Peter Anvin @ 2011-02-10  0:06 UTC (permalink / raw)
  To: linux-kbuild

I'm stuck with a problem where a header needs specific postprocessing in
addition to what headers_install.pl does.  Is that possible as things
currently sit, or will that require changes to the core kbuild scripts?

	-hpa

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

* Re: Specific processing during user space header generation
  2011-02-10  0:06 Specific processing during user space header generation H. Peter Anvin
@ 2011-02-10  5:54 ` Sam Ravnborg
  2011-02-10 23:55   ` H. Peter Anvin
  0 siblings, 1 reply; 6+ messages in thread
From: Sam Ravnborg @ 2011-02-10  5:54 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: linux-kbuild

On Wed, Feb 09, 2011 at 04:06:07PM -0800, H. Peter Anvin wrote:
> I'm stuck with a problem where a header needs specific postprocessing in
> addition to what headers_install.pl does.  Is that possible as things
> currently sit, or will that require changes to the core kbuild scripts?
You will nned to patch core kbuild.
We do no processing apart from headers_install.pl - so there is no place
to hook in.
And headers_install.pl has not been prepared to do any tricks like that.

	Sam

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

* Re: Specific processing during user space header generation
  2011-02-10  5:54 ` Sam Ravnborg
@ 2011-02-10 23:55   ` H. Peter Anvin
  2011-02-11 15:13     ` Michal Marek
  2011-02-11 19:14     ` Sam Ravnborg
  0 siblings, 2 replies; 6+ messages in thread
From: H. Peter Anvin @ 2011-02-10 23:55 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linux-kbuild

On 02/09/2011 09:54 PM, Sam Ravnborg wrote:
> On Wed, Feb 09, 2011 at 04:06:07PM -0800, H. Peter Anvin wrote:
>> I'm stuck with a problem where a header needs specific postprocessing in
>> addition to what headers_install.pl does.  Is that possible as things
>> currently sit, or will that require changes to the core kbuild scripts?
> You will nned to patch core kbuild.
> We do no processing apart from headers_install.pl - so there is no place
> to hook in.
> And headers_install.pl has not been prepared to do any tricks like that.

Would you (plural) consider a patchset looking something like:

when processing foo.h, also look for foo.h.pl; if so, invoke that from
inside headers_install.pl?

	-hpa


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

* Re: Specific processing during user space header generation
  2011-02-10 23:55   ` H. Peter Anvin
@ 2011-02-11 15:13     ` Michal Marek
  2011-02-11 19:14     ` Sam Ravnborg
  1 sibling, 0 replies; 6+ messages in thread
From: Michal Marek @ 2011-02-11 15:13 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Sam Ravnborg, linux-kbuild

On Thu, Feb 10, 2011 at 03:55:56PM -0800, H. Peter Anvin wrote:
> On 02/09/2011 09:54 PM, Sam Ravnborg wrote:
> > On Wed, Feb 09, 2011 at 04:06:07PM -0800, H. Peter Anvin wrote:
> >> I'm stuck with a problem where a header needs specific postprocessing in
> >> addition to what headers_install.pl does.  Is that possible as things
> >> currently sit, or will that require changes to the core kbuild scripts?
> > You will nned to patch core kbuild.
> > We do no processing apart from headers_install.pl - so there is no place
> > to hook in.
> > And headers_install.pl has not been prepared to do any tricks like that.
> 
> Would you (plural) consider a patchset looking something like:
> 
> when processing foo.h, also look for foo.h.pl; if so, invoke that from
> inside headers_install.pl?

Something like this should work.

Michal

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

* Re: Specific processing during user space header generation
  2011-02-10 23:55   ` H. Peter Anvin
  2011-02-11 15:13     ` Michal Marek
@ 2011-02-11 19:14     ` Sam Ravnborg
  2011-02-11 20:08       ` H. Peter Anvin
  1 sibling, 1 reply; 6+ messages in thread
From: Sam Ravnborg @ 2011-02-11 19:14 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: linux-kbuild

On Thu, Feb 10, 2011 at 03:55:56PM -0800, H. Peter Anvin wrote:
> On 02/09/2011 09:54 PM, Sam Ravnborg wrote:
> > On Wed, Feb 09, 2011 at 04:06:07PM -0800, H. Peter Anvin wrote:
> >> I'm stuck with a problem where a header needs specific postprocessing in
> >> addition to what headers_install.pl does.  Is that possible as things
> >> currently sit, or will that require changes to the core kbuild scripts?
> > You will nned to patch core kbuild.
> > We do no processing apart from headers_install.pl - so there is no place
> > to hook in.
> > And headers_install.pl has not been prepared to do any tricks like that.
> 
> Would you (plural) consider a patchset looking something like:
> 
> when processing foo.h, also look for foo.h.pl; if so, invoke that from
> inside headers_install.pl?

The purpose of headers_install is to install the existing kernel headers
and during the installation process do some minimal adjustments to make
then suit userspace consumption.

What you suggest smells like something else - care to explain what
you have in mind?

	Sam

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

* Re: Specific processing during user space header generation
  2011-02-11 19:14     ` Sam Ravnborg
@ 2011-02-11 20:08       ` H. Peter Anvin
  0 siblings, 0 replies; 6+ messages in thread
From: H. Peter Anvin @ 2011-02-11 20:08 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linux-kbuild

On 02/11/2011 11:14 AM, Sam Ravnborg wrote:
> 
> The purpose of headers_install is to install the existing kernel headers
> and during the installation process do some minimal adjustments to make
> then suit userspace consumption.
> 
> What you suggest smells like something else - care to explain what
> you have in mind?
> 

I am working with H.J. Lu on an experimental native 32-bit ABI for
x86-64.  As a result, we are adding an <asm/unistd_x32.h> for new system
call numbers.

Now, the kernel needs to use both <asm/unistd_64.h> and
<asm/unistd_x32.h>, since as far as the kernel are concerned they are
both 64-bit system calls.  As such, the latter contains symbols like:

	__NR_x32_ioctl

... however, when used in user space, we want it to look like

	__NR_ioctl

... just like any other ABI.

Incidentally we have a similar situation with the i386 ABI, but that one
is sort of backwards -- since unistd_32.h is also used by native 32
bits, we can't just make the transformation for userspace there.

The alternative, of course (which would also work for the native 32 bit
case, now when I think about it) is for the human-written file to be the
user space version, and use a script to generate the kernel version.

	-hpa


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

end of thread, other threads:[~2011-02-11 20:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-10  0:06 Specific processing during user space header generation H. Peter Anvin
2011-02-10  5:54 ` Sam Ravnborg
2011-02-10 23:55   ` H. Peter Anvin
2011-02-11 15:13     ` Michal Marek
2011-02-11 19:14     ` Sam Ravnborg
2011-02-11 20:08       ` H. Peter Anvin

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