From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: Geert Uytterhoeven
<geert.uytterhoeven-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: michal.simek-g5w7nrANp4BDPfheJLI6IQ@public.gmane.org,
Linux Kernel list
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Subject: Re: Removing __kernel_old_uid_t, git_t, dev_t
Date: Mon, 30 Mar 2009 17:17:56 +0200 [thread overview]
Message-ID: <200903301717.57184.arnd@arndb.de> (raw)
In-Reply-To: <10f740e80903300741h387e6342veba0ccceea6714e9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Monday 30 March 2009, Geert Uytterhoeven wrote:
> On Mon, Mar 30, 2009 at 15:58, Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org> wrote:
> > +/*
> > + * int-ll64 is used on all 32 bit architectures and on x86-64,
> > + * so use it as a reasonable default.
> > + */
> > +#include <asm-generic/int-ll64.h>
> > +
>
> Most 64-bit archs have been migrated to ll64 by now.
> Alpha, ia64, and mips64 are the remaining exceptions.
Right, the comment is stale.
> > +/*
> > + * DMA addresses may be larger than pointers, but not smaller.
> > + * Do not define the dma64_addr_t type, which never really
> > + * worked.
> > + */
> > +#if defined(CONFIG_64BIT) || defined(CONFIG_PHYS_64BIT)
> > +typedef u64 dma_addr_t;
> > +#else
> > +typedef u32 dma_addr_t;
> > +#endif /* 64 bit DMA pointer */
>
> Is there any specific reason why dma_addr_t is in <asm/types.h>, while
> phys_addr_t is in
> <linux/types.h>?
dma_addr_t is a big mess that was traditionally defined per
architecture, in lots of wrong ways, including the misconception
of dma64_addr_t. Sparc64 still uses a 32 bit dma_addr_t, possibly
because it always uses an IOMMU (?). It can save some space in
scatterlists, but might come back to bite us if someone tries
to build a sparc64 system with actual 64-bit DMA.
phys_addr_t is a new definition that was added last August (after
I did my patch) by Jeremy Fitzhardinge and is for DMA purposes.
> Furthermore, CONFIG_PHYS_64BIT is used on PPC only. Probably it should be
> replaced by CONFIG_PHYS_ADDR_T_64BIT, which is always set if CONFIG_64BIT,
> so the #ifdef above becomes even simpler?
Yes, they could be consolidated now, which would make the default
dma_addr_t the same as phys_addr_t, with the possible exception of
sparc64.
Arnd <><
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: Geert Uytterhoeven <geert.uytterhoeven@gmail.com>
Cc: michal.simek@petalogix.com,
Linux Kernel list <linux-kernel@vger.kernel.org>,
linux-arch@vger.kernel.org, linux-api@vger.kernel.org,
David Miller <davem@davemloft.net>
Subject: Re: Removing __kernel_old_uid_t, git_t, dev_t
Date: Mon, 30 Mar 2009 17:17:56 +0200 [thread overview]
Message-ID: <200903301717.57184.arnd@arndb.de> (raw)
Message-ID: <20090330151756.0CaDj1B1wv9XMVIKkoJxme2GvHaEbC83vSRx4rE-EmI@z> (raw)
In-Reply-To: <10f740e80903300741h387e6342veba0ccceea6714e9@mail.gmail.com>
On Monday 30 March 2009, Geert Uytterhoeven wrote:
> On Mon, Mar 30, 2009 at 15:58, Arnd Bergmann <arnd@arndb.de> wrote:
> > +/*
> > + * int-ll64 is used on all 32 bit architectures and on x86-64,
> > + * so use it as a reasonable default.
> > + */
> > +#include <asm-generic/int-ll64.h>
> > +
>
> Most 64-bit archs have been migrated to ll64 by now.
> Alpha, ia64, and mips64 are the remaining exceptions.
Right, the comment is stale.
> > +/*
> > + * DMA addresses may be larger than pointers, but not smaller.
> > + * Do not define the dma64_addr_t type, which never really
> > + * worked.
> > + */
> > +#if defined(CONFIG_64BIT) || defined(CONFIG_PHYS_64BIT)
> > +typedef u64 dma_addr_t;
> > +#else
> > +typedef u32 dma_addr_t;
> > +#endif /* 64 bit DMA pointer */
>
> Is there any specific reason why dma_addr_t is in <asm/types.h>, while
> phys_addr_t is in
> <linux/types.h>?
dma_addr_t is a big mess that was traditionally defined per
architecture, in lots of wrong ways, including the misconception
of dma64_addr_t. Sparc64 still uses a 32 bit dma_addr_t, possibly
because it always uses an IOMMU (?). It can save some space in
scatterlists, but might come back to bite us if someone tries
to build a sparc64 system with actual 64-bit DMA.
phys_addr_t is a new definition that was added last August (after
I did my patch) by Jeremy Fitzhardinge and is for DMA purposes.
> Furthermore, CONFIG_PHYS_64BIT is used on PPC only. Probably it should be
> replaced by CONFIG_PHYS_ADDR_T_64BIT, which is always set if CONFIG_64BIT,
> so the #ifdef above becomes even simpler?
Yes, they could be consolidated now, which would make the default
dma_addr_t the same as phys_addr_t, with the possible exception of
sparc64.
Arnd <><
next prev parent reply other threads:[~2009-03-30 15:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-30 7:15 Removing __kernel_old_uid_t, git_t, dev_t Michal Simek
2009-03-30 13:58 ` Arnd Bergmann
2009-03-30 14:41 ` Geert Uytterhoeven
[not found] ` <10f740e80903300741h387e6342veba0ccceea6714e9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-03-30 15:17 ` Arnd Bergmann [this message]
2009-03-30 15:17 ` Arnd Bergmann
[not found] ` <200903301717.57184.arnd-r2nGTMty4D4@public.gmane.org>
2009-03-30 21:11 ` David Miller
2009-03-30 21:11 ` David Miller
[not found] ` <20090330.141156.62568451.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2009-03-31 0:26 ` Arnd Bergmann
2009-03-31 0:26 ` Arnd Bergmann
2009-04-01 14:11 ` [RFC] asm-generic/{unistd,types,posix_types}.h for new arch Arnd Bergmann
2009-04-01 14:11 ` Arnd Bergmann
[not found] ` <200904011611.53355.arnd-r2nGTMty4D4@public.gmane.org>
2009-04-01 14:39 ` Will Newton
2009-04-01 14:39 ` Will Newton
2009-04-01 15:04 ` Arnd Bergmann
2009-04-01 21:20 ` H. Peter Anvin
2009-04-01 21:32 ` Roland McGrath
[not found] ` <20090401213219.7B324FC3AB-nL1rrgvulkc2UH6IwYuUx0EOCMrvLtNR@public.gmane.org>
2009-04-02 13:06 ` Arnd Bergmann
2009-04-02 13:06 ` Arnd Bergmann
2009-04-01 17:55 ` Arnd Bergmann
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=200903301717.57184.arnd@arndb.de \
--to=arnd-r2ngtmty4d4@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=geert.uytterhoeven-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=michal.simek-g5w7nrANp4BDPfheJLI6IQ@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.