[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190128142440.591d2115ac7844863713aa77@suse.de>
Date: Mon, 28 Jan 2019 14:24:40 +0100
From: Thomas Bogendoerfer <tbogendoerfer@...e.de>
To: Christoph Hellwig <hch@...radead.org>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>,
James Hogan <jhogan@...nel.org>, linux-kernel@...r.kernel.org,
linux-mips@...r.kernel.org, linux-pci@...r.kernel.org,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Paul Burton <paul.burton@...s.com>,
Ralf Baechle <ralf@...ux-mips.org>
Subject: Re: [PATCH 2/7] MIPS: SGI-IP27: clean up bridge access and header
files
On Mon, 28 Jan 2019 05:20:03 -0800
Christoph Hellwig <hch@...radead.org> wrote:
> On Thu, Jan 24, 2019 at 06:47:23PM +0100, Thomas Bogendoerfer wrote:
> > #ifndef __ASSEMBLY__
> > +/* Address translation entry for mapped pci32 accesses */
> > +union bridge_ate {
> > + u64 ent;
> > + struct ate_s {
> > + u64 rmf:16;
> > + u64 addr:36;
> > + u64 targ:4;
> > + u64 reserved:3;
> > + u64 barrier:1;
> > + u64 prefetch:1;
> > + u64 precise:1;
> > + u64 coherent:1;
> > + u64 valid:1;
> > + } field;
>
> Note that we generally try to avoid using bitfields for hardware
> descriptions and instead use masking/shifting, possibly hidden in
> macros. The portability argument for that doesn't really apply
> here as the code is obviously MIPS/big endian specific, but I think
> it generally is a good example and more readable as well.
I totally agreed. I only moved the original defintion around while cleaning
up the header file. Right now there is no code using it. Should I remove it
and access macros as soon there is a need for it ?
Thomas.
--
SUSE Linux GmbH
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Powered by blists - more mailing lists