[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 1/2] xen: introduce header file with section related symbols
On 19.04.2024 12:02, Roger Pau Monne wrote: > Start by declaring the beginning and end of the init section. > > No functional change intended. > > Requested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> > --- > xen/arch/arm/mmu/setup.c | 3 +-- > xen/arch/x86/setup.c | 3 +-- > xen/include/xen/sections.h | 17 +++++++++++++++++ > 3 files changed, 19 insertions(+), 4 deletions(-) > create mode 100644 xen/include/xen/sections.h Noticing a few things only after committing / pushing: For one, I should have waited for an Arm ack. I hope that's not a big issue. > --- a/xen/arch/arm/mmu/setup.c > +++ b/xen/arch/arm/mmu/setup.c > @@ -7,6 +7,7 @@ > > #include <xen/init.h> > #include <xen/libfdt/libfdt.h> > +#include <xen/sections.h> > #include <xen/sizes.h> > #include <xen/vmap.h> > > @@ -62,8 +63,6 @@ vaddr_t directmap_virt_start __read_mostly; > unsigned long directmap_base_pdx __read_mostly; > #endif > > -extern char __init_begin[], __init_end[]; Then I wonder why it was this rather than ... > --- a/xen/arch/x86/setup.c > +++ b/xen/arch/x86/setup.c > @@ -5,6 +5,7 @@ > #include <xen/param.h> > #include <xen/sched.h> > #include <xen/domain.h> > +#include <xen/sections.h> > #include <xen/serial.h> > #include <xen/softirq.h> > #include <xen/acpi.h> > @@ -309,8 +310,6 @@ void __init discard_initial_images(void) > initial_images = NULL; > } > > -extern unsigned char __init_begin[], __init_end[]; ... this ... > --- /dev/null > +++ b/xen/include/xen/sections.h > @@ -0,0 +1,17 @@ > +/* SPDX-License-Identifier: GPL-2.0-only */ > + > +#ifndef __XEN_SECTIONS_H__ > +#define __XEN_SECTIONS_H__ > + > +/* SAF-0-safe */ > +extern char __init_begin[], __init_end[]; ... that was moved. "unsigned char" is generally preferred over declaring binary stuff "strings". I further wonder why the opportunity wasn't taken to make both array-of-const. And finally I'm slightly puzzled by the SAF comment appearing with no mention at all in the description; of course I don't mind its addition. Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |