linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: <arc-linux-dev@synopsys.com>
Cc: David Howells <dhowells@redhat.com>,
	James Hogan <james@albanarts.com>,
	"torvalds@osdl.org" <torvalds@osdl.org>,
	"arnd@arndb.de" <arnd@arndb.de>, "hpa@zytor.com" <hpa@zytor.com>,
	"alan@lxorguk.ukuu.org.uk" <alan@lxorguk.ukuu.org.uk>,
	"fengguang.wu@intel.com" <fengguang.wu@intel.com>,
	"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [arc-linux-dev] Re: UAPI for new arches (was Re: [GIT PULL] User API Disintegrate: Preparatory patches)
Date: Mon, 12 Nov 2012 16:27:56 +0530	[thread overview]
Message-ID: <50A0D634.20005@synopsys.com> (raw)
In-Reply-To: <14356.1352416788@warthog.procyon.org.uk>

On Friday 09 November 2012 04:49 AM, David Howells wrote:
> Vineet Gupta <Vineet.Gupta1@synopsys.com> 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.

Understood.

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

Correct. And if there's nothing to export in there the script will not
generate the empty uapi sibling.

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

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).

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


  reply	other threads:[~2012-11-12 10:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-02 18:36 [GIT PULL] User API Disintegrate: Preparatory patches David Howells
2012-10-04 17:12 ` Geert Uytterhoeven
2012-10-04 17:36 ` David Howells
2012-10-17  8:42 ` James Hogan
2012-10-22 11:50   ` James Hogan
2012-11-01 10:41     ` UAPI for new arches (was Re: [GIT PULL] User API Disintegrate: Preparatory patches) Vineet Gupta
2012-11-08 12:38     ` David Howells
2012-11-08 14:36     ` David Howells
2012-11-08 15:07     ` David Howells
2012-11-08 18:21       ` Vineet Gupta
2012-11-08 23:19       ` David Howells
2012-11-12 10:57         ` Vineet Gupta [this message]
2012-11-12 13:14         ` [arc-linux-dev] " David Howells
2012-11-14 13:01           ` James Hogan
2012-11-14 16:28           ` David Howells

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=50A0D634.20005@synopsys.com \
    --to=vineet.gupta1@synopsys.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arc-linux-dev@synopsys.com \
    --cc=arnd@arndb.de \
    --cc=dhowells@redhat.com \
    --cc=fengguang.wu@intel.com \
    --cc=hpa@zytor.com \
    --cc=james@albanarts.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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;
as well as URLs for NNTP newsgroup(s).