Subject: Re: mfdcr/mtdcr
To: Jachym Holecek <freza@dspfpga.com>
From: Simon Burge <simonb@wasabisystems.com>
List: port-powerpc
Date: 05/10/2006 11:36:16
Jachym Holecek wrote:

> Hello,
> 
> I'd like to move mfdcr()/mtdcr() macro definitions into a separate file.
> Motivation:
> 
>   * Currently, they're defined multiple times in include/ibm4xx/dcr40*.h
> 
>   * For evbppc/virtex, I'd like to be able to access DCR without
>     also pulling in irrelevant address definitions (DCR address
>     layout is completely up to the HDL designer)
> 
> The diff below (relative to arch/powerpc/include/ibm4xx) creates dcr.h
> and makes dcr40*.h use it. Other option would be to move the macros to
> ibm4xx/cpu.h (the m{f,t}dcr instructions are 4xx specific).

DCRs are mentioned in BookE, insofar as "they can exist" which doesn't
say too much.  Are they really only available on 4xx?  If so, then
I I think I prefer putting them in ibm4xx/cpu.h.  Otherwise just
powerpc/cpu.h rather than making a new header?  I do agree that having
multiple identical definitions is not good.

Any other opinions?

Cheers,
Simon.
--
Simon Burge                            <simonb@wasabisystems.com>
NetBSD Support and Service:         http://www.wasabisystems.com/