|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH][for-4.19 v3 1/8] xen: add declarations for variables where needed
On 19/10/2023 23:13, Stefano Stabellini wrote: On Thu, 19 Oct 2023, Nicola Vetrini wrote:Some variables with external linkage used in C code do not have a visible declaration where they are defined. Providing such declaration also resolves violations of MISRA C:2012 Rule 8.4. Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx> --- Changes in v2: - make xenpf_lock static on ARM Changes in v3: - moved back code from symbols.h to symbols.c - dropped two declarations, now deviated --- xen/arch/arm/include/asm/setup.h | 3 +++ xen/arch/arm/include/asm/smp.h | 3 +++ xen/arch/arm/platform_hypercall.c | 2 +- xen/arch/x86/cpu/mcheck/mce.c | 6 +++--- xen/arch/x86/irq.c | 2 +- xen/include/xen/symbols.h | 1 + 6 files changed, 12 insertions(+), 5 deletions(-)diff --git a/xen/arch/arm/include/asm/setup.h b/xen/arch/arm/include/asm/setup.hindex 98af6f55f5a0..2a2d6114f2eb 100644 --- a/xen/arch/arm/include/asm/setup.h +++ b/xen/arch/arm/include/asm/setup.h@@ -184,9 +184,12 @@ int map_range_to_domain(const struct dt_device_node *dev,extern lpae_t boot_pgtable[XEN_PT_LPAE_ENTRIES]; #ifdef CONFIG_ARM_64 +extern lpae_t boot_first[XEN_PT_LPAE_ENTRIES]; extern lpae_t boot_first_id[XEN_PT_LPAE_ENTRIES]; #endif +extern lpae_t boot_second[XEN_PT_LPAE_ENTRIES]; extern lpae_t boot_second_id[XEN_PT_LPAE_ENTRIES]; +extern lpae_t boot_third[XEN_PT_LPAE_ENTRIES * XEN_NR_ENTRIES(2)]; extern lpae_t boot_third_id[XEN_PT_LPAE_ENTRIES];/* Find where Xen will be residing at runtime and return a PT entry */ diff --git a/xen/arch/arm/include/asm/smp.h b/xen/arch/arm/include/asm/smp.hindex 4fabdf5310d8..28bf24a01d95 100644 --- a/xen/arch/arm/include/asm/smp.h +++ b/xen/arch/arm/include/asm/smp.h @@ -6,6 +6,9 @@ #include <asm/current.h> #endif +extern struct init_info init_data; +extern unsigned long smp_up_cpu; + DECLARE_PER_CPU(cpumask_var_t, cpu_sibling_mask); DECLARE_PER_CPU(cpumask_var_t, cpu_core_mask);diff --git a/xen/arch/arm/platform_hypercall.c b/xen/arch/arm/platform_hypercall.cindex 743687a30390..fde4bc3e5809 100644 --- a/xen/arch/arm/platform_hypercall.c +++ b/xen/arch/arm/platform_hypercall.c @@ -17,7 +17,7 @@ #include <asm/current.h> #include <asm/event.h> -DEFINE_SPINLOCK(xenpf_lock); +static DEFINE_SPINLOCK(xenpf_lock);long do_platform_op(XEN_GUEST_HANDLE_PARAM(xen_platform_op_t) u_xenpf_op) I left it in on purpose, to separate code from the header guard. -- Nicola Vetrini, BSc Software Engineer, BUGSENG srl (https://bugseng.com)
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |