[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH V2 23/33] xen/arm: Allow Xen to run on multiple platform without recompilation



On Wed, 2013-05-08 at 16:32 +0100, Ian Campbell wrote:
> > +/* Helper to read/write a register */
> > +static inline uint32_t platform_read_register(uint32_t addr)
> > +{
> > +    volatile const uint32_t *reg;
> > +    uint32_t value;
> > +
> > +    set_fixmap(FIXMAP_MISC, addr >> PAGE_SHIFT, DEV_SHARED);
> > +    reg = (uint32_t *)(FIXMAP_ADDR(FIXMAP_MISC) + (addr & ~PAGE_MASK));
> > +    value = *reg;
> > +    dsb(); isb();
> > +    clear_fixmap(FIXMAP_MISC);
> 
> I don't think the fixmap is per-PCPU so you probably want some locking
> here.
> 
> FIXMAP_MISC is a bit of an awful thing, but this isn't especially new,
> so OK.

In fact now I'm wondering if the platform specific code shouldn't
establish its own permanent mapping with ioremap and use that.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.