Thread (15 messages) 15 messages, 5 authors, 2012-11-14

Re: [arc-linux-dev] Re: UAPI for new arches (was Re: [GIT PULL] User API Disintegrate: Preparatory patches)

From: David Howells <dhowells@redhat.com>
Date: 2012-11-12 13:14:12
Also in: lkml

Vineet Gupta [off-list ref] wrote:
quoted
quoted
Per you email from last week, When I ran the disintergrate-one.pl script
myself I saw a whole bunch of empty UAPI files being generated with
references in orig header.  I'm not sure what I'm doing wrong.
Can you give an example of such a header?
tlb.h - despite having __KERNEL__ guard in orig file. Here's how I did it.

1. In my orig tree, I created arch/arc/include/uapi/asm/Kbuild, with
following 2 lines

# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm

2.  ./disintegrate-one.pl arch/arc/include/asm/tlb.h
arch/arc/include/uapi/asm/tlb.h

This generates a empty uapi/asm/tlb.h, a reference to it in asm/tlb.h
and is also exported from Kbuild.asm - all 3 of which are wrong.
Actually, this is the correct operation - it's just that there's nothing in
tlb.h to export.  (Note that Kbuild.asm is not modified, but rather
uapi/asm/Kbuild.  asm/Kbuild would too, but there's no export line there to be
removed.)

However... tlb.h isn't exported in Kbuild.asm - nor is it exported in arc's
asm/Kbuild, so the script shouldn't be run on that.
But now that I think about it - I was wrong to call this script for
all/any arch headers. It should be done only for the ones in
include/uapi/asm-generic/Kbuild.asm or any specific ones that arch wants
to export (cachectl.h for our case).
Exactly so.  I should probably have mentioned that, but I've had it automated
for so long, that I don't think about it any more.  You should only call it
for arch headers

I've attached a script that I use to work out which files need disintegration
in a directory.  Run as:

	genfilelist.pl arch/arc/include/asm/

I get:

	byteorder.h
	cachectl.h
	page.h
	ptrace.h
	setup.h
	sigcontext.h
	signal.h
	swab.h
	unistd.h

as being all that you need to disintegrate.  Almost everything seems to be
generic.

David

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help