[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2] make use of .startof.() and .sizeof.() assembler expressions
Hi Jan, On 24/08/16 08:44, Jan Beulich wrote: --- a/xen/arch/arm/device.c +++ b/xen/arch/arm/device.c @@ -21,8 +21,8 @@ #include <xen/errno.h> #include <xen/lib.h> -extern const struct device_desc _sdevice[], _edevice[]; -extern const struct acpi_device_desc _asdevice[], _aedevice[]; +extern const struct device_desc _sdevice[] asm(".startof.(.dev.info)"); +extern const struct device_desc _edevice[]; int __init device_init(struct dt_device_node *dev, enum device_class class, const void *data) @@ -51,6 +51,11 @@ int __init device_init(struct dt_device_ return -EBADF; } +#ifdef CONFIG_ACPI Why did you add the #ifdef CONFIG_ACPI here? It is not explained in the commit message. If you want to add it, it should be a separate patch and we should go further by removing the section in the linker script. + +extern const struct acpi_device_desc _asdevice[] asm(".startof.(.adev.info)"); +extern const struct acpi_device_desc _aedevice[]; + int __init acpi_device_init(enum device_class class, const void *data, int class_type) { const struct acpi_device_desc *desc; @@ -68,6 +73,8 @@ int __init acpi_device_init(enum device_ return -EBADF; } +#endif + enum device_class device_get_class(const struct dt_device_node *dev) { const struct device_desc *desc; --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -2058,7 +2058,7 @@ static void __init find_gnttab_region(st * enough space for a large grant table */ kinfo->gnttab_start = __pa(_stext); - kinfo->gnttab_size = (_etext - _stext) & PAGE_MASK; + kinfo->gnttab_size = _sizeof_text & PAGE_MASK; /* Make sure the grant table will fit in the region */ if ( (kinfo->gnttab_size >> PAGE_SHIFT) < max_grant_frames ) --- a/xen/arch/arm/platform.c +++ b/xen/arch/arm/platform.c @@ -22,7 +22,8 @@ #include <xen/init.h> #include <asm/psci.h> -extern const struct platform_desc _splatform[], _eplatform[]; +extern const struct platform_desc _splatform[] asm(".startof.(.arch.info)"); +extern const struct platform_desc _eplatform[]; /* Pointer to the current platform description */ static const struct platform_desc *platform; --- a/xen/arch/arm/xen.lds.S +++ b/xen/arch/arm/xen.lds.S @@ -31,7 +31,6 @@ SECTIONS . = XEN_VIRT_START; _start = .; .text : /* XXX should be AT ( XEN_PHYS_START ) */ { - _stext = .; /* Text section */ I don't see any removal of _stext in xen/arch/arm/alternative.c. *(.text) *(.text.cold) *(.text.unlikely) @@ -42,7 +41,6 @@ SECTIONS . = ALIGN(PAGE_SIZE); .rodata : { - _srodata = .; /* Read-only data */ /* Bug frames table */ __start_bug_frames = .; *(.bug_frames.0) @@ -104,21 +102,18 @@ SECTIONS . = ALIGN(8); .arch.info : { - _splatform = .; *(.arch.info) _eplatform = .; } :text . = ALIGN(8); .dev.info : { - _sdevice = .; *(.dev.info) _edevice = .; } :text . = ALIGN(8); .adev.info : { - _asdevice = .; *(.adev.info) _aedevice = .; } :text @@ -126,7 +121,6 @@ SECTIONS . = ALIGN(PAGE_SIZE); /* Init code and data */ __init_begin = .; .init.text : { - _sinittext = .; *(.init.text) _einittext = .; } :text @@ -174,7 +168,6 @@ SECTIONS __init_end = .; .bss : { /* BSS */ - __bss_start = .; *(.bss.stack_aligned) . = ALIGN(PAGE_SIZE); *(.bss.page_aligned) @@ -186,7 +179,6 @@ SECTIONS *(.bss.percpu.read_mostly) . = ALIGN(SMP_CACHE_BYTES); __per_cpu_data_end = .; - __bss_end = .; } :text _end = . ; Regards, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |