From: Grant Likely <grant.likely@secretlab.ca>
To: Andres Salomon <dilinger@queued.net>
Cc: sparclinux@vger.kernel.org, davem@davemloft.net,
linux-kernel@vger.kernel.org, Sam Ravnborg <sam@ravnborg.org>,
devicetree-discuss@lists.ozlabs.org
Subject: Re: [PATCH 1/2 v2] of: move phandle/ihandle into types.h and export to userspace
Date: Fri, 8 Oct 2010 11:12:10 -0600 [thread overview]
Message-ID: <20101008171210.GE3863@angua.secretlab.ca> (raw)
In-Reply-To: <20101008004354.13b5b254@debxo>
On Fri, Oct 08, 2010 at 12:43:54AM -0700, Andres Salomon wrote:
>
> We need phandle for some exported sparc headers; of.h isn't an
> exported header, and it would be silly to export it when all we
> really need is one or two types from it. Also, later patches
> use phandle in structs that are exported to userspace, so export
> a __kernel_phandle type.
>
> Signed-off-by: Andres Salomon <dilinger@queued.net>
Looks okay to me. I'm build testing it now on powerpc and
microblaze. If davem agrees, then I'll pick it up into my
devicetree-next branch.
Question though; since sparc userspace is the only user of this,
should the types.h header avoid exposing it on non-sparc?
g.
> ---
> include/linux/of.h | 3 ---
> include/linux/types.h | 7 +++++++
> 2 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/of.h b/include/linux/of.h
> index cad7cf0..db184dc 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -25,9 +25,6 @@
>
> #ifdef CONFIG_OF
>
> -typedef u32 phandle;
> -typedef u32 ihandle;
> -
> struct property {
> char *name;
> int length;
> diff --git a/include/linux/types.h b/include/linux/types.h
> index 01a082f..67a034a 100644
> --- a/include/linux/types.h
> +++ b/include/linux/types.h
> @@ -178,10 +178,17 @@ typedef __u64 __bitwise __be64;
> typedef __u16 __bitwise __sum16;
> typedef __u32 __bitwise __wsum;
>
> +/* Basic openboot/openfirmware types */
> +typedef __u32 __kernel_phandle;
> +typedef __u32 __kernel_ihandle;
> +
> #ifdef __KERNEL__
> typedef unsigned __bitwise__ gfp_t;
> typedef unsigned __bitwise__ fmode_t;
>
> +typedef __kernel_phandle phandle;
> +typedef __kernel_ihandle ihandle;
> +
> #ifdef CONFIG_PHYS_ADDR_T_64BIT
> typedef u64 phys_addr_t;
> #else
> --
> 1.5.6.5
>
next prev parent reply other threads:[~2010-10-08 17:12 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-08 7:43 Andres Salomon
2010-10-08 17:12 ` Grant Likely [this message]
2010-10-08 17:17 ` David Miller
2010-10-08 17:36 ` Grant Likely
2010-10-08 17:45 ` David Miller
2010-10-08 18:27 ` Grant Likely
2010-10-08 18:38 ` Andres Salomon
2010-10-08 18:34 ` [PATCH] sparc: stop exporting openprom.h header Andres Salomon
2010-10-08 18:52 ` David Miller
2010-10-08 19:00 ` Grant Likely
2010-10-08 19:02 ` David Miller
2010-10-08 21:34 ` Andres Salomon
2010-10-09 8:51 ` Grant Likely
2010-10-09 20:48 ` Andres Salomon
2010-10-10 5:13 ` Grant Likely
2010-10-10 7:19 ` Andres Salomon
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=20101008171210.GE3863@angua.secretlab.ca \
--to=grant.likely@secretlab.ca \
--cc=davem@davemloft.net \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=dilinger@queued.net \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=sparclinux@vger.kernel.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
Powered by JetHome