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

From: David Howells
Date: Thu Nov 08 2012 - 18:20:23 EST


Vineet Gupta <Vineet.Gupta1@xxxxxxxxxxxx> wrote:

> While I'd done some of the prep work in my code such as splitting __KERNEL__
> && __ASSEMBLY__ into two separate lines, majority of orig headers didn't
> have #ifdef __KERNEL__ guard despite the code not being meant for user-space
> ABI. Is that fundamental to UAPI split scripting

Yes. My scripts work purely along __KERNEL__ lines. If there are no
__KERNEL__ markers and the header is marked for export, it is simply moved.

> because it seems to be causing setup.h to be in uapi despite seemingly being
> kernel internal only.

Check also include/uapi/asm-generic/Kbuild.asm. That exports setup.h, whether
you think it should be exported or not.

Vineet Gupta <Vineet.Gupta1@xxxxxxxxxxxx> wrote:

> 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?

> For any ABI changes to headers per review of the new port on list
> (e.g. don't export pt_regs) would mean moving the code manually from uapi to
> orig header - right. And if the file becomes empty just nuke it completely.

You can't necessarily remove a UAPI header completely. Userspace may depend
on its existence, even if it gets no content from there.

> How do you reckon we go about fixing these. I don't want to bother you
> multiple times hence it would be best if I could reproduce this at my end.

The best advice I can give you without more specific examples is to compare
what's in your arch's headers to those of, say, hexagon or arm64. Those are
recent additions and should be pretty clean as to what they contain.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/