|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 1/7] xen/arm: introduce early_ioremap
On Thu, 10 Jan 2013, Ian Campbell wrote:
> On Tue, 2013-01-08 at 20:03 +0000, Stefano Stabellini wrote:
> > Introduce a function to map a range of physical memory into Xen virtual
> > memory.
> > It doesn't need domheap to be setup.
> > It is going to be used to map the videoram.
> >
> > Add flush_xen_data_tlb_range_va, that flushes a range of virtual addresses.
> > Replace all the calls to flush_xen_data_tlb_va with calls to
> > flush_xen_data_tlb_range_va and remove flush_xen_data_tlb_va.
> >
> > In the case of the dest_va tlb flush at the beginning of
> > setup_pagetables, flush the entire 2MB mapping rather than just the
> > first 4K.
> >
> >
> > Changes in v4:
> > - rename flush_xen_data_tlb_range to flush_xen_data_tlb_range_va;
> > - replace all the calls to flush_xen_data_tlb_va, with calls to
> > flush_xen_data_tlb_range_va;
> > - flush the entire 2MB mapping at BOOT_MISC_VIRT_START rather than just
> > the first 4k;
> > - remove flush_xen_data_tlb_va;
>
> These all seem like a separate patch (or patches) to me.
I created three other patches: one to introduce
flush_xen_data_tlb_range_va and replace all the calls to
flush_xen_data_tlb_va with calls to flush_xen_data_tlb_range_va; a
second one to fix the 2MB flush at the beginning of setup_pagetables;
and a third one to introduce the missing FIRST, SECOND and THIRD MASK
and SIZE definitions.
> > - fix indentation;
> > - rename EARLY_VMAP_START/END to EARLY_VMAP_VIRT_START/END;
> > - mark early_ioremap as __init;
> > - reduce the amount of casts in early_ioremap.
>
> [...]
> > /*
> > - * Flush one VA's hypervisor mappings from the data TLB. This is not
> > + * Flush a range of VA's hypervisor mappings from the data TLB. This is not
> > * sufficient when changing code mappings or for self modifying code.
> > */
> > -static inline void flush_xen_data_tlb_va(unsigned long va)
> > +static inline void flush_xen_data_tlb_range_va(unsigned long va, unsigned
> > long size)
> > {
> > - asm volatile("dsb;" /* Ensure preceding are visible */
> > - STORE_CP32(0, TLBIMVAH)
> > - "dsb;" /* Ensure completion of the TLB flush */
> > - "isb;"
> > - : : "r" (va) : "memory");
> > + unsigned long end = va + size;
> > + while ( va < end ) {
> > + asm volatile("dsb;" /* Ensure preceding are visible */
> > + STORE_CP32(0, TLBIMVAH)
> > + "dsb;" /* Ensure completion of the TLB flush */
> > + "isb;"
>
> You can hoist all the barriers here to above/below the loop I think.
OK
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |