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

Re: [PATCH v1 2/3] xen/riscv: switch LINK_TO_LOAD() to virt_to_maddr()



On Tue, 2024-10-01 at 17:44 +0200, Jan Beulich wrote:
> On 30.09.2024 17:08, Oleksii Kurochko wrote:
> > Except for switching LINK_TO_LOAD() to virt_to_maddr(),
> > LINK_TO_LOAD() is dropped, as virt_to_maddr() covers all
> > the cases where LINK_TO_LOAD() is used.
> 
> Why "Except for ..."? I'm afraid I can'rt make sense of this.
I will reword that for clarity:
   Use virt_to_maddr() instead of LINK_TO_LOAD as virt_to_maddr()
   covers all the cases where LINK_TO_LOAD() is used.
   
Thanks.

~ Oleksii
> 
> > @@ -225,7 +224,7 @@ void __init setup_fixmap_mappings(void)
> >  
> >      BUG_ON(pte_is_valid(*pte));
> >  
> > -    tmp = paddr_to_pte(LINK_TO_LOAD((unsigned long)&xen_fixmap),
> > PTE_TABLE);
> > +    tmp = paddr_to_pte(virt_to_maddr(&xen_fixmap), PTE_TABLE);
> 
> Just like you don't open-code a cast here, ...
> 
> > @@ -312,7 +311,7 @@ void __init remove_identity_mapping(void)
> >      pte_t *pgtbl;
> >      unsigned int index, xen_index;
> >      unsigned long ident_start =
> > -        LINK_TO_LOAD(turn_on_mmu) & XEN_PT_LEVEL_MAP_MASK(0);
> > +        virt_to_maddr((unsigned long)turn_on_mmu) &
> > XEN_PT_LEVEL_MAP_MASK(0);
> 
> ... you shouldn't do so here. The virt_to_maddr() wrapper macro does
> so already.
> 
> Jan




 


Rackspace

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