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

Re: [Xen-devel] [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required



On Wed, 6 Mar 2019, Jan Beulich wrote:
> >>> On 05.03.19 at 23:38, <sstabellini@xxxxxxxxxx> wrote:
> > --- a/xen/arch/x86/percpu.c
> > +++ b/xen/arch/x86/percpu.c
> > @@ -13,7 +13,8 @@ unsigned long __per_cpu_offset[NR_CPUS];
> >   * context of PV guests.
> >   */
> >  #define INVALID_PERCPU_AREA (0x8000000000000000L - (long)__per_cpu_start)
> > -#define PERCPU_ORDER get_order_from_bytes(__per_cpu_data_end - 
> > __per_cpu_start)
> > +#define PERCPU_ORDER get_order_from_bytes(per_cpu_diff(__per_cpu_start,    
> >  \
> > +                                                       __per_cpu_data_end))
> 
> Please use _bytediff() when bytes are meant (i.e. also below, and
> perhaps elsewhere).

OK


> > @@ -600,7 +602,9 @@ static void noinline init_done(void)
> >      unregister_init_virtual_region();
> >  
> >      /* Zero the .init code and data. */
> > -    for ( va = __init_begin; va < _p(__init_end); va += PAGE_SIZE )
> > +    for ( va = (char *)__init_begin;
> > +          init_lt(va, __init_end);
> > +          va += PAGE_SIZE )
> 
> Is the line wrapping really needed here?

It would end at 80 characters exactly otherwise. I am happy to do as you
prefer.


> > --- a/xen/drivers/vpci/vpci.c
> > +++ b/xen/drivers/vpci/vpci.c
> > @@ -31,9 +31,9 @@ struct vpci_register {
> >  };
> >  
> >  #ifdef __XEN__
> > -extern vpci_register_init_t *const __start_vpci_array[];
> > -extern vpci_register_init_t *const __end_vpci_array[];
> > -#define NUM_VPCI_INIT (__end_vpci_array - __start_vpci_array)
> > +typedef vpci_register_init_t *const vpci_array_t;
> 
> You don't want to keep the const here - DECLARE_BOUNDS() will
> suitably add it.

OK


> Also how about vcpi_init_t or vpci_reg_init_t or some such? The
> defined type is not really an array after all.

OK


> > +DECLARE_BOUNDS(vpci_array, __start_vpci_array, __end_vpci_array);
> > +#define NUM_VPCI_INIT (vpci_array_diff(__start_vpci_array, 
> > __end_vpci_array))
> 
> Unnecessary outermost parentheses.

OK

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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