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

Re: [PATCH v1 3/3] xen/riscv: register Xen's load address as a boot module



On Tue, 2024-10-01 at 17:49 +0200, Jan Beulich wrote:
> On 30.09.2024 17:08, Oleksii Kurochko wrote:
> > @@ -26,6 +27,8 @@ unsigned char __initdata
> > cpu0_boot_stack[STACK_SIZE]
> >  void __init noreturn start_xen(unsigned long bootcpu_id,
> >                                 paddr_t dtb_addr)
> >  {
> > +    struct bootmodule *xen_bootmodule;
> 
> With just the uses below this can be pointer-to-const. Question of
> course
> is whether you already know of further uses.
It could be dropped as it is used only for BUG_ON(!xen_bootmodule) as
it looks to me a little bit better then:
    BUG_ON(!add_boot_module(BOOTMOD_XEN, virt_to_maddr(_start),
                            (_end - _start), false));
But I am okay to drop xen_bootmodule variable.

> 
> > @@ -44,6 +47,13 @@ void __init noreturn start_xen(unsigned long
> > bootcpu_id,
> >                "Please check your bootloader.\n",
> >                dtb_addr, BOOT_FDT_VIRT_SIZE);
> >  
> > +    /* Register Xen's load address as a boot module. */
> > +    xen_bootmodule = add_boot_module(BOOTMOD_XEN,
> > +                                     virt_to_maddr(_start),
> > +                                     (paddr_t)(_end - _start),
> > false);
> 
> There's no real need for the cast, is there? Plus if anything, it
> would be
> more to size_t than to paddr_t.
In this case the cast isn't really needed. I will drop it.

Thanks.

~ Oleksii

 


Rackspace

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