Re: [PATCH 1/2] [v3][POWERPC] refactor dcr code

2008-04-21 Thread Josh Boyer
On Sun, 20 Apr 2008 20:56:20 -0700 "Stephen Neuendorffer" <[EMAIL PROTECTED]> wrote: > > > > > +void dcr_unmap_generic(dcr_host_t host, unsigned int dcr_c) > > > +{ > > > + if (host.type == NATIVE) > > > + dcr_unmap_native(host.host.native, dcr_c); > > > + else > > > + dcr_unmap_

RE: [PATCH 1/2] [v3][POWERPC] refactor dcr code

2008-04-20 Thread Stephen Neuendorffer
> > +void dcr_unmap_generic(dcr_host_t host, unsigned int dcr_c) > > +{ > > + if (host.type == NATIVE) > > + dcr_unmap_native(host.host.native, dcr_c); > > + else > > + dcr_unmap_mmio(host.host.mmio, dcr_c); > > What happens if host.type == INVALID? Same question for the

Re: [PATCH 1/2] [v3][POWERPC] refactor dcr code

2008-04-19 Thread Josh Boyer
On Fri, 18 Apr 2008 14:55:03 -0700 Stephen Neuendorffer <[EMAIL PROTECTED]> wrote: > Previously, dcr support was configured at compile time to either using > MMIO or native dcr instructions. Although this works for most > platforms, it fails on FPGA platforms: > > 1) Systems may include more tha

Re: [PATCH 1/2] [v3][POWERPC] refactor dcr code

2008-04-18 Thread Benjamin Herrenschmidt
> By current conventions; these should probably be static functions (but > don't make them inline). The compiler will do the right thing with > them. Functions are easier to validate by the compiler and sparse > than #defines. Not necessarily... yes we tend to prefer functions, but in that case

Re: [PATCH 1/2] [v3][POWERPC] refactor dcr code

2008-04-18 Thread Grant Likely
On Fri, Apr 18, 2008 at 3:55 PM, Stephen Neuendorffer <[EMAIL PROTECTED]> wrote: > Previously, dcr support was configured at compile time to either using > MMIO or native dcr instructions. Although this works for most > platforms, it fails on FPGA platforms: > > 1) Systems may include more than