xen: arm: rework early bring up
Subsystems (2)
v4 cover xen: arm: rework early bring up
The following reworks early bring up on ARM to use a separate set of boot pagetables. This simplifies things by avoiding the need to bring up all CPUs in lock step, which in turn allows us to do secondary CPU bringup in C code.
Unfortunately the main bulk of this change is a single large patch which is hard to decompose any further since it is basically pulling on the thread and then knitting a new jumper from it.
With these changes Xen now absolutely requires that the bootloader calls the hypervisor in HYP mode, the previous workarounds have been removed. For use on models a bootwrapper is now required. See
git://xenbits.xen.org/people/ianc/boot-wrapper.git xen-arm32
git://xenbits.xen.org/people/ianc/boot-wrapper-aarch64.git xen-arm64
I have implemented support for CPU bringup on the fastmodel vexpress platforms (v7and v8) here. Julien reports that it works on a real vexpress to.
I'm hoping that those of you with access to other platforms will implement the required cpu_up platform hook, it should be pretty simple in each case, I think. (Update: I've implemented exynos5 now)
It should now also be possible to implement PSCI, but I have not done so.
Changes since v4:
- Rebased, needed to preserved DTB mapping since "xen/arm:
Support dtb /memreserve/ regions"
- Julien asked me to repost since he has some comments he would like to make.
PATCH v4 1/11 xen: arm: Load xen under 4GB on 32-bit
We need to be able to use a 1:1 mapping during bring up.
--- xen/arch/arm/setup.c | 8 ++++++++ 1 file changed, 8 insertions(+)
xen/arch/arm/setup.c +8 -0
@@ -323,6 +323,14 @@ static paddr_t __init get_xen_paddr(void)if ( !e )continue ; +#ifdef CONFIG_ARM_32 +/* Xen must be under 4GB */ +if ( e >0x100000000ULL ) + e =0x100000000ULL ; +if ( e < bank->start ) +continue ; +#endif + s = e - min_size;if ( s > paddr )
Signature · 1 line
1.7.10.4
PATCH v4 2/11 xen: arm: build platform support only on the relevant arch
In reply to Ian Campbellmidway, omap5 and exynos are all 32-bit only platforms. This avoids needing CONFIG_ARM_32 ifdefs around the SMP callbacks on such platforms.
Vexpress is both.
--- xen/arch/arm/platforms/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
xen/arch/arm/platforms/Makefile +3 -3
@@ -1,4 +1,4 @@ obj-y += vexpress.o -obj-y += exynos5.o -obj-y += midway.o -obj-y += omap5.o +obj-$(CONFIG_ARM_32) += exynos5.o +obj-$(CONFIG_ARM_32) += midway.o +obj-$(CONFIG_ARM_32) += omap5.o
Signature · 1 line
1.7.10.4
PATCH v4 3/11 xen: arm: Log the raw MIDR on boot.
In reply to Ian Campbell---
v2: Fixed overlong line
--- xen/arch/arm/setup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
xen/arch/arm/setup.c +3 -2
@@ -84,8 +84,9 @@ static void __init processor_id(void)printk ("Huh, cpu architecture %x, expected 0xf (defined by cpuid)\n" , c->midr.architecture); -printk ("Processor: \"%s\", variant: 0x%x, part 0x%03x, rev 0x%x\n" , - implementer, c->midr.variant, c->midr.part_number, c->midr.revision); +printk ("Processor: %08" PRIx32": \"%s\", variant: 0x%x, part 0x%03x, rev 0x%x\n" , + c->midr.bits, implementer, + c->midr.variant, c->midr.part_number, c->midr.revision);#if defined(CONFIG_ARM_64 )printk ("64-bit Execution:\n" );
Signature · 1 line
1.7.10.4
PATCH v4 4/11 xen: arm: make sure we stay within the memory bank during mm setup
In reply to Ian CampbellOtherwise if there is a module in another bank we can run off the end.
Rename *n to *end to make it clearer what is happening.
---
v3: typoes.
v2: Improve commend. s/*n/*end/
--- xen/arch/arm/setup.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
xen/arch/arm/setup.c +10 -3
@@ -264,9 +264,11 @@ static paddr_t __init consider_modules(paddr_t s, paddr_t e,* Return the end of the non-module region starting at s. In other * words return s the start of the next modules after s. * -* Also returns the end of that module in *n. +* On input *end is the end of the region which should be considered +* and it is updated to reflect the end of the module, clipped to the +* end of the region if it would run over. */ -static paddr_t __init next_module (paddr_t s,paddr_t *n) +static paddr_t __init next_module (paddr_t s,paddr_t *end) {struct dt_module_info *mi = &early_info.modules;paddr_t lowest = ~(paddr_t )0 ;
@@ -281,8 +283,10 @@ static paddr_t __init next_module(paddr_t s, paddr_t *n)continue ;if ( mod_s > lowest )continue ; +if ( mod_s > *end ) +continue ; lowest = mod_s; - *n = mod_e; + *end =min (*end, mod_e); }return lowest; }
@@ -528,6 +532,9 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size) e = n = bank_end; } +if ( e > bank_end ) + e = bank_end; +setup_xenheap_mappings (s>>PAGE_SHIFT , (e-s)>>PAGE_SHIFT ); xenheap_mfn_end = e;
Signature · 1 line
1.7.10.4
PATCH v4 5/11 xen: arm: add two new device tree helpers
In reply to Ian Campbell - dt_property_read_u64
- dt_find_node_by_type
---
v2: fix some typos
rebase and update for change to some underlying functions (added dt_ prefix)
--- xen/common/device_tree.c | 29 +++++++++++++++++++++++++++++ xen/include/xen/device_tree.h | 17 +++++++++++++++++ 2 files changed, 46 insertions(+)
xen/common/device_tree.c +29 -0
@@ -511,6 +511,21 @@ bool_t dt_property_read_u32(const struct dt_device_node *np,return 1 ; } + +bool_t dt_property_read_u64 (const struct dt_device_node *np, +const char *name,u64 *out_value) +{ +u32 len; +const __be32 *val; + + val =dt_get_property (np, name, &len); +if ( !val || len <sizeof (*out_value) ) +return 0 ; + + *out_value =dt_read_number (val,2 ); + +return 1 ; +}int dt_property_read_string (const struct dt_device_node *np,const char *propname,const char **out_string) {
@@ -576,6 +591,20 @@ struct dt_device_node *dt_find_node_by_name(struct dt_device_node *from,return np; } +struct dt_device_node *dt_find_node_by_type (struct dt_device_node *from, +const char *type) +{ +struct dt_device_node *np; +struct dt_device_node *dt; + + dt = from ? from->allnext : dt_host; +dt_for_each_device_node (dt, np) +if ( np->type && (dt_node_cmp (np->type, type) ==0 ) ) +break ; + +return np; +} +struct dt_device_node *dt_find_node_by_path (const char *path) {struct dt_device_node *np;
xen/include/xen/device_tree.h +17 -0
@@ -352,6 +352,17 @@ const void *dt_get_property(const struct dt_device_node *np,bool_t dt_property_read_u32 (const struct dt_device_node *np,const char *name,u32 *out_value);/** +* dt_property_read_u64 - Helper to read a u64 property. +* @np: node to get the value +* @name: name of the property +* @out_value: pointer to return value +* +* Return true if get the desired value. +*/ +bool_t dt_property_read_u64 (const struct dt_device_node *np, +const char *name,u64 *out_value); + +/** * dt_property_read_string - Find and read a string from a property * @np: Device node from which the property value is to be read * @propname: Name of the property to be searched
@@ -400,6 +411,12 @@ struct dt_device_node *dt_find_node_by_name(struct dt_device_node *node, const char *name);/** +* dt_find_node_by_type - Find a node by its "type" property +*/ +struct dt_device_node *dt_find_node_by_type (struct dt_device_node *from, +const char *type); + +/** * df_find_node_by_alias - Find a node matching an alias * @alias: The alias to match *
Signature · 1 line
1.7.10.4
PATCH v4 6/11 xen: arm: implement arch/platform SMP and CPU initialisation framework
In reply to Ian CampbellIncludes an implementation for vexpress using the sysflags interface and support for the ARMv8 "spin-table" method.
Unused until the next patch, split out to simplify review.
--- xen/arch/arm/arm32/Makefile | 1 + xen/arch/arm/arm32/head.S | 2 +- xen/arch/arm/arm32/smpboot.c | 29 ++++++++++++ xen/arch/arm/arm64/Makefile | 1 + xen/arch/arm/arm64/head.S | 1 + xen/arch/arm/arm64/smpboot.c | 89 +++++++++++++++++++++++++++++++++++++ xen/arch/arm/platform.c | 18 ++++++++ xen/arch/arm/platforms/vexpress.c | 38 ++++++++++++++++ xen/include/asm-arm/platform.h | 9 ++++ xen/include/asm-arm/smp.h | 9 ++++ 10 files changed, 196 insertions(+), 1 deletion(-) create mode 100644 xen/arch/arm/arm32/smpboot.c create mode 100644 xen/arch/arm/arm64/smpboot.c
xen/arch/arm/arm32/Makefile +1 -0
@@ -7,5 +7,6 @@ obj-y += proc-v7.o obj-y += traps.o obj-y += domain.o obj-y += vfp.o +obj-y += smpboot.o obj-$(EARLY_PRINTK) += debug.o
xen/arch/arm/arm32/head.S +1 -1
@@ -59,7 +59,7 @@ * or the initial pagetable code below will need adjustment. */ .global start start: - +GLOBAL(init_secondary) /* currently unused */ /* zImage magic header, see: * http://www.simtec.co.uk/products/SWLINUX/files/booting_article.html#d0e309 */
xen/arch/arm/arm32/smpboot.c new file +29 -0
@@ -0,0 +1,29 @@ +#include <xen/device_tree.h> +#include <xen/init.h> +#include <xen/smp.h> +#include <asm/platform.h> + +int __init arch_smp_init (void ) +{ +return platform_smp_init (); +} + +int __init arch_cpu_init (int cpu,struct dt_device_node *dn) +{ +/* TODO handle PSCI init */ +return 0 ; +} + +int __init arch_cpu_up (int cpu) +{ +return platform_cpu_up (cpu); +} + +/* +* Local variables: +* mode: C +* c-file-style: "BSD" +* c-basic-offset: 4 +* indent-tabs-mode: nil +* End: +*/
xen/arch/arm/arm64/Makefile +1 -0
@@ -6,5 +6,6 @@ obj-y += mode_switch.o obj-y += traps.o obj-y += domain.o obj-y += vfp.o +obj-y += smpboot.o obj-$(EARLY_PRINTK) += debug.o
xen/arch/arm/arm64/head.S +1 -0
@@ -65,6 +65,7 @@ .global start start: +GLOBAL(init_secondary) /* currently unused */ /* * DO NOT MODIFY. Image header expected by Linux boot-loaders. */
xen/arch/arm/arm64/smpboot.c new file +89 -0
89 lines not on this page · raw message
xen/arch/arm/platform.c +18 -0
@@ -105,6 +105,24 @@ int __init platform_specific_mapping(struct domain *d)return res; } +#ifdef CONFIG_ARM_32 +int __init platform_cpu_up (int cpu) +{ +if ( platform && platform->cpu_up ) +return platform->cpu_up (cpu); + +return -EAGAIN ; +} + +int __init platform_smp_init (void ) +{ +if ( platform && platform->smp_init ) +return platform->smp_init (); + +return 0 ; +} +#endif +void platform_reset (void ) {if ( platform && platform->reset )
xen/arch/arm/platforms/vexpress.c +38 -0
@@ -22,6 +22,7 @@#include <xen/mm.h> #include <xen/vmap.h> #include <asm/io.h> +#include <asm/gic.h> #define DCC_SHIFT 26#define FUNCTION_SHIFT 20
@@ -120,6 +121,39 @@ static void vexpress_reset(void)iounmap (sp810); } +#ifdef CONFIG_ARM_32 + +static int __init vexpress_smp_init (void ) +{ +void __iomem *sysflags; + + sysflags =ioremap_nocache (V2M_SYS_MMIO_BASE ,PAGE_SIZE ); +if ( !sysflags ) + { +dprintk (XENLOG_ERR ,"Unable to map vexpress MMIO\n" ); +return -EFAULT ; + } + +printk ("Set SYS_FLAGS to %" PRIpaddr" (%p)\n" , +__pa (init_secondary), init_secondary); +writel (~0 , sysflags +V2M_SYS_FLAGSCLR ); +writel (__pa (init_secondary), sysflags +V2M_SYS_FLAGSSET ); + +iounmap (sysflags); + +return 0 ; +} + +static int __init vexpress_cpu_up (int cpu) +{ +/* Nothing to do here, the generic sev() will suffice to kick CPUs +* out of either the firmware or our own smp_up_cpu gate, +* depending on where they have ended up. */ + +return 0 ; +} +#endif +static const char *const vexpress_dt_compat[]__initdata = {"arm,vexpress" ,
@@ -144,6 +178,10 @@ static const struct dt_device_match vexpress_blacklist_dev[] __initconst =PLATFORM_START (vexpress,"VERSATILE EXPRESS" ) .compatible = vexpress_dt_compat, +#ifdef CONFIG_ARM_32 + .smp_init = vexpress_smp_init, + .cpu_up = vexpress_cpu_up, +#endif .reset = vexpress_reset, .blacklist_dev = vexpress_blacklist_dev,PLATFORM_END
xen/include/asm-arm/platform.h +9 -0
@@ -15,6 +15,11 @@ struct platform_desc {/* Platform initialization */ int (*init)(void );int (*init_time)(void ); +#ifdef CONFIG_ARM_32 +/* SMP */ +int (*smp_init)(void ); +int (*cpu_up)(int cpu); +#endif /* Specific mapping for dom0 */ int (*specific_mapping)(struct domain *d);/* Platform reset */
@@ -43,6 +48,10 @@ struct platform_desc {int __init platform_init (void );int __init platform_init_time (void );int __init platform_specific_mapping (struct domain *d); +#ifdef CONFIG_ARM_32 +int platform_smp_init (void ); +int platform_cpu_up (int cpu); +#endif void platform_reset (void );void platform_poweroff (void );bool_t platform_has_quirk (uint32_t quirk);
xen/include/asm-arm/smp.h +9 -0
@@ -4,6 +4,7 @@#ifndef __ASSEMBLY__#include <xen/config.h> #include <xen/cpumask.h> +#include <xen/device_tree.h> #include <asm/current.h> #endif
@@ -22,9 +23,17 @@ extern void stop_cpu(void);extern void make_cpus_ready (unsigned int max_cpus,unsigned long boot_phys_offset); +extern int arch_smp_init (void ); +extern int arch_cpu_init (int cpu,struct dt_device_node *dn); +extern int arch_cpu_up (int cpu); + +/* Secondary CPU entry point */ +extern void init_secondary (void ); +extern void smp_clear_cpu_maps (void );extern int smp_get_max_cpus (void );#endif +/* * Local variables: * mode: C
Signature · 1 line
1.7.10.4
PATCH v4 7/11 xen: arm: implement smp initialisation callbacks for exynos5
In reply to Ian CampbellThese were removed in "xen: arm: rewrite start of day page table and cpu bring up". This code is based on that assembly code but is compile tested only.
--- xen/arch/arm/platforms/exynos5.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+)
xen/arch/arm/platforms/exynos5.c +31 -0
@@ -65,6 +65,35 @@ static int exynos5_specific_mapping(struct domain *d)return 0 ; } +static int __init exynos5_smp_init (void ) +{ +void __iomem *sysram; + + sysram =ioremap_nocache (S5P_PA_SYSRAM ,PAGE_SIZE ); +if ( !sysram ) + { +dprintk (XENLOG_ERR ,"Unable to map exynos5 MMIO\n" ); +return -EFAULT ; + } + +printk ("Set SYSRAM to %" PRIpaddr" (%p)\n" , +__pa (init_secondary), init_secondary); +writel (__pa (init_secondary), sysram); + +iounmap (sysram); + +return 0 ; +} + +static int __init exynos5_cpu_up (int cpu) +{ +/* Nothing to do here, the generic sev() will suffice to kick CPUs +* out of either the firmware or our own smp_up_cpu gate, +* depending on where they have ended up. */ + +return 0 ; +} +static void exynos5_reset (void ) {void __iomem *pmu;
@@ -107,6 +136,8 @@ PLATFORM_START(exynos5, "SAMSUNG EXYNOS5") .compatible = exynos5_dt_compat, .init_time = exynos5_init_time, .specific_mapping = exynos5_specific_mapping, + .smp_init = exynos5_smp_init, + .cpu_up = exynos5_cpu_up, .reset = exynos5_reset, .quirks = exynos5_quirks, .blacklist_dev = exynos5_blacklist_dev,
Signature · 1 line
1.7.10.4
Re: [PATCH v4 07/11] xen: arm: implement smp initialisation callbacks for exynos5
Quoted 4 lines · Ian Campbell
These were removed in "xen: arm: rewrite start of day page table and cpu bring up". This code is based on that assembly code but is compile tested only.
Signed-off-by Ian Campbell <[email protected]>
Quoted 54 lines
--- xen/arch/arm/platforms/exynos5.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+)xen/arch/arm/platforms/exynos5.c +31
-0@@ -65,6 +65,35 @@ static int exynos5_specific_mapping(struct domain *d)return 0 ; } +static int __init exynos5_smp_init (void ) +{ +void __iomem *sysram; + + sysram =ioremap_nocache (S5P_PA_SYSRAM ,PAGE_SIZE ); +if ( !sysram ) + { +dprintk (XENLOG_ERR ,"Unable to map exynos5 MMIO\n" ); +return -EFAULT ; + } + +printk ("Set SYSRAM to %" PRIpaddr" (%p)\n" , +__pa (init_secondary), init_secondary); +writel (__pa (init_secondary), sysram); + +iounmap (sysram); + +return 0 ; +} + +static int __init exynos5_cpu_up (int cpu) +{ +/* Nothing to do here, the generic sev() will suffice to kick CPUs +* out of either the firmware or our own smp_up_cpu gate, +* depending on where they have ended up. */ + +return 0 ; +} +static void exynos5_reset (void ) {void __iomem *pmu;@@ -107,6 +136,8 @@ PLATFORM_START(exynos5, "SAMSUNG EXYNOS5") .compatible = exynos5_dt_compat, .init_time = exynos5_init_time, .specific_mapping = exynos5_specific_mapping, + .smp_init = exynos5_smp_init, + .cpu_up = exynos5_cpu_up, .reset = exynos5_reset, .quirks = exynos5_quirks, .blacklist_dev = exynos5_blacklist_dev,
Signature · 1 line
Julien Grall
PATCH v4 8/11 xen: arm: rewrite start of day page table and cpu bring up
In reply to Ian CampbellThis is unfortunately a rather large monolithic patch.
Rather than bringing up all CPUs in lockstep as we setup paging and relocate Xen instead create a simplified set of dedicated boot time pagetables.
This allows secondary CPUs to remain powered down or in the firmware until we actually want to enable them. The bringup is now done later on in C and can be driven by DT etc. I have included code for the vexpress platform, but other platforms will need to be added.
The mechanism for deciding how to bring up a CPU differs between arm32 and arm64. On arm32 it is essentially a per-platform property, with the exception of PSCI which can be implemented globally (but isn't here). On arm64 there is a per-cpu property in the device tree.
Secondary CPUs are brought up directly into the relocated Xen image, instead of relying on being able to launch on the unrelocated Xen and hoping that it hasn't been clobbered.
As part of this change drop support for switching from secure mode to NS HYP as well as the early CPU kick. Xen now requires that it is launched in NS HYP mode and that firmware configure things such that secondary CPUs can be woken up by a primarly CPU in HYP mode. This may require fixes to bootloaders or the use of a boot wrapper.
The changes done here (re)exposed an issue with relocating Xen and the compiler spilling values to the stack between the copy and the actual switch to the relocaed copy of Xen in setup_pagetables. Therefore switch to doing the copy and switch in a single asm function where we can control precisely what gets spilled to the stack etc.
Since we now have a separate set of boot pagetables it is much easier to build the real Xen pagetables inplace before relocating rather than the more complex approach of rewriting the pagetables in the relocated copy before switching.
This will also enable Xen to be loaded above the 4GB boundary on 64-bit.
---
v4: rebase due to fixups. Need to preserved DTB mapping since "xen/arm:
Support dtb /memreserve/ regions".
v3: add a dsb before the smp_up_cpu wait loop.
move arch_smp_init() and arch_cpu_init() int init_cpus_maps() which I rename to smp_init_cpus().
v2: Lots of review feedback from Julien and Tim
Reintroduce a smp_up_cpu gate. We cannot reliably wake a single CPU so we add our own gate. However it is purely in the relocated image.
--- xen/arch/arm/arm32/Makefile | 1 - xen/arch/arm/arm32/head.S | 391 ++++++++++++++++++----------- xen/arch/arm/arm32/mode_switch.S | 158 ------------ xen/arch/arm/arm64/Makefile | 1 - xen/arch/arm/arm64/head.S | 396 ++++++++++++++++++++---------- xen/arch/arm/arm64/mode_switch.S | 89 ------- xen/arch/arm/mm.c | 197 +++++++++------ xen/arch/arm/setup.c | 26 +- xen/arch/arm/smpboot.c | 57 ++--- xen/include/asm-arm/mm.h | 3 +- xen/include/asm-arm/platforms/exynos5.h | 14 -- xen/include/asm-arm/platforms/vexpress.h | 11 - xen/include/asm-arm/smp.h | 6 - 13 files changed, 676 insertions(+), 674 deletions(-) delete mode 100644 xen/arch/arm/arm32/mode_switch.S delete mode 100644 xen/arch/arm/arm64/mode_switch.S
xen/arch/arm/arm32/Makefile +0 -1
@@ -1,7 +1,6 @@ subdir-y += lib obj-y += entry.o -obj-y += mode_switch.o obj-y += proc-v7.o obj-y += traps.o
xen/arch/arm/arm32/head.S +247 -144
496 lines not on this page · raw message
xen/arch/arm/arm32/mode_switch.S deleted +0 -158
158 lines not on this page · raw message
xen/arch/arm/arm64/Makefile +0 -1
@@ -1,7 +1,6 @@ subdir-y += lib obj-y += entry.o -obj-y += mode_switch.o obj-y += traps.o obj-y += domain.o
xen/arch/arm/arm64/head.S +272 -124
504 lines not on this page · raw message
xen/arch/arm/arm64/mode_switch.S deleted +0 -89
89 lines not on this page · raw message
xen/arch/arm/mm.c +116 -81
319 lines not on this page · raw message
xen/arch/arm/setup.c +20 -6
@@ -592,7 +592,7 @@ void __init setup_cache(void)* MPIDR values related to logical cpus * Code base on Linux arch/arm/kernel/devtree.c */ -static void __init init_cpus_maps (void ) +static void __init smp_init_cpus (void ) {register_t mpidr;struct dt_device_node *cpus =dt_find_node_by_path ("/cpus" );
@@ -604,6 +604,14 @@ static void __init init_cpus_maps(void) [0 ... NR_CPUS - 1] = MPIDR_INVALID };bool_t bootcpu_valid =0 ; +int rc; + +if ( (rc =arch_smp_init ()) <0 ) + { +printk (XENLOG_WARNING "SMP init failed (%d)\n" +"Using only 1 CPU\n" , rc); +return ; + } mpidr = boot_cpu_data.mpidr.bits &MPIDR_HWID_MASK ;
@@ -655,6 +663,12 @@ static void __init init_cpus_maps(void) } } +if ( (rc =arch_cpu_init (hwid, cpu)) <0 ) + { +printk ("cpu init failed (hwid %x): %d\n" , hwid, rc); +continue ; + } +/* * Build a stashed array of MPIDR values. Numbering scheme requires * that if detected the boot CPU must be assigned logical id 0. Other
@@ -673,7 +687,8 @@ static void __init init_cpus_maps(void)if ( cpuidx >NR_CPUS ) { -printk (XENLOG_WARNING "DT /cpu %u node greater than max cores %u, capping them\n" , +printk (XENLOG_WARNING +"DT /cpu %u node greater than max cores %u, capping them\n" , cpuidx,NR_CPUS ); cpuidx =NR_CPUS ;break ;
@@ -732,15 +747,14 @@ void __init start_xen(unsigned long boot_phys_offset,processor_id (); -init_cpus_maps (); - cpus =smp_get_max_cpus (); -platform_init (); +smp_init_cpus (); + cpus =smp_get_max_cpus (); +init_xen_time ();gic_init (); -make_cpus_ready (cpus, boot_phys_offset);set_current ((struct vcpu *)0xfffff000 );/* debug sanity */ idle_vcpu[0 ] = current;
xen/arch/arm/smpboot.c +19 -38
103 lines not on this page · raw message
xen/include/asm-arm/mm.h +2 -1
@@ -149,7 +149,8 @@ extern unsigned long total_pages;extern void setup_pagetables (unsigned long boot_phys_offset,paddr_t xen_paddr);/* Remove early mappings */ extern void remove_early_mappings (void ); -/* Allocate and initialise pagetables for a secondary CPU */ +/* Allocate and initialise pagetables for a secondary CPU. Sets init_ttbr to the +* new page table */ extern int __cpuinit init_secondary_pagetables (int cpu);/* Switch secondary CPUS to its own pagetables and finalise MMU setup */ extern void __cpuinit mmu_init_secondary_cpu (void );
xen/include/asm-arm/platforms/exynos5.h +0 -14
@@ -14,20 +14,6 @@#define S5P_PA_SYSRAM 0x02020000 -/* Constants below is only used in assembly because the DTS is not yet parsed */ -#ifdef __ASSEMBLY__ - -/* GIC Base Address */ -#define EXYNOS5_GIC_BASE_ADDRESS 0x10480000 - -/* Timer's frequency */ -#define EXYNOS5_TIMER_FREQUENCY (24 * 1000 * 1000)/* 24 MHz */ - -/* Arndale machine ID */ -#define MACH_TYPE_SMDK5250 3774 - -#endif /* __ASSEMBLY__ */ -#endif /* __ASM_ARM_PLATFORMS_EXYNOS5_H */ /* * Local variables:
xen/include/asm-arm/platforms/vexpress.h +0 -11
@@ -32,17 +32,6 @@int vexpress_syscfg (int write,int function,int device,uint32_t *data);#endif -/* Constants below is only used in assembly because the DTS is not yet parsed */ -#ifdef __ASSEMBLY__ - -/* GIC base address */ -#define V2M_GIC_BASE_ADDRESS 0x2c000000 - -/* Timer's frequency */ -#define V2M_TIMER_FREQUENCY 0x5f5e100/* 100 Mhz */ - -#endif /* __ASSEMBLY__ */ -#endif /* __ASM_ARM_PLATFORMS_VEXPRESS_H */ /* * Local variables:
xen/include/asm-arm/smp.h +0 -6
@@ -17,12 +17,6 @@ DECLARE_PER_CPU(cpumask_var_t, cpu_core_mask);extern void stop_cpu (void ); -/* Bring the non-boot CPUs up to paging and ready to enter C. -* Must be called after Xen is relocated but before the original copy of -* .text gets overwritten. */ -extern void -make_cpus_ready (unsigned int max_cpus,unsigned long boot_phys_offset); -extern int arch_smp_init (void );extern int arch_cpu_init (int cpu,struct dt_device_node *dn);extern int arch_cpu_up (int cpu);
Signature · 1 line
1.7.10.4
PATCH v4 9/11 xen: arm: use symbolic names for MPIDR bits.
In reply to Ian Campbellarm32 already uses MPIDR_HWID_MASK, use it on arm64 too. Add MPIDR_{SMP,UP} (and bitwise equivalents) and use them.
---
v4: Use U not UL, otherwise MPIDR_INVALID can be a 64-bit number, but the
register is 32-bit so assigning it to a u32 etc is valid. e.g tmp_map in init_cpus_map. Avoids -Werror=overflow issues.
v3: Needs to be unsigned, 1<<31 is undefined on arm32 otherwise
--- xen/arch/arm/arm32/head.S | 4 ++-- xen/arch/arm/arm64/head.S | 6 +++--- xen/include/asm-arm/processor.h | 10 ++++++---- 3 files changed, 11 insertions(+), 9 deletions(-)
xen/arch/arm/arm32/head.S +2 -2
@@ -127,9 +127,9 @@ common_start: * find that multiprocessor extensions are * present and the system is SMP */ mrc CP32(r1, MPIDR) - tst r1, #(1<<31) /* Multiprocessor extension supported? */ + tst r1, #MPIDR_SMP /* Multiprocessor extension supported? */ beq 1f - tst r1, #(1<<30) /* Uniprocessor system? */ + tst r1, #MPIDR_UP /* Uniprocessor system? */ bne 1f bic r7, r1, #(~MPIDR_HWID_MASK) /* Mask out flags to get CPU ID */ 1:
xen/arch/arm/arm64/head.S +3 -3
@@ -153,10 +153,10 @@ common_start: * find that multiprocessor extensions are * present and the system is SMP */ mrs x0, mpidr_el1 - tbz x0, 31, 1f /* Multiprocessor extension not supported? */ - tbnz x0, 30, 1f /* Uniprocessor system? */ + tbz x0, _MPIDR_SMP, 1f /* Multiprocessor extension not supported? */ + tbnz x0, _MPIDR_UP, 1f /* Uniprocessor system? */ - mov x13, #(0xff << 24) + mov x13, #(~MPIDR_HWID_MASK) bic x24, x0, x13 /* Mask out flags to get CPU ID */ 1:
xen/include/asm-arm/processor.h +6 -4
@@ -8,11 +8,13 @@#define MIDR_MASK 0xff0ffff0/* MPIDR Multiprocessor Affinity Register */ -#define MPIDR_UP (1 << 30) -#define MPIDR_SMP (1 << 31) +#define _MPIDR_UP (30) +#define MPIDR_UP (_AC(1,U) << _MPIDR_UP) +#define _MPIDR_SMP (31) +#define MPIDR_SMP (_AC(1,U) << _MPIDR_SMP)#define MPIDR_AFF0_SHIFT (0) -#define MPIDR_AFF0_MASK (0xff << MPIDR_AFF0_SHIFT) -#define MPIDR_HWID_MASK 0xffffff +#define MPIDR_AFF0_MASK (_AC(0xff,U) << MPIDR_AFF0_SHIFT) +#define MPIDR_HWID_MASK _AC(0xffffff,U)#define MPIDR_INVALID (~MPIDR_HWID_MASK)/* TTBCR Translation Table Base Control Register */
Signature · 1 line
1.7.10.4
PATCH v4 10/11 xen: arm: configure TCR_EL2 for 40 bit physical address space
In reply to Ian Campbell--- xen/arch/arm/arm64/head.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
xen/arch/arm/arm64/head.S +2 -2
@@ -224,12 +224,12 @@ skip_bss: msr mair_el2, x0 /* Set up the HTCR: - * PASize -- 4G + * PASize -- 40 bits / 1TB * Top byte is used * PT walks use Outer-Shareable accesses, * PT walks are write-back, write-allocate in both cache levels, * Full 64-bit address space goes through this table. */ - ldr x0, =0x80802500 + ldr x0, =0x80822500 msr tcr_el2, x0 /* Set up the SCTLR_EL2:
Signature · 1 line
1.7.10.4
PATCH v4 11/11 xen: arm: split cpu0's domheap mapping PTs out from xen_second
In reply to Ian CampbellNow that bringup has been rewritten we don't need these 4 contiguous pages for the 1:1 map. So split them out and only allocate them for 32 bit
--- xen/arch/arm/mm.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-)
xen/arch/arm/mm.c +17 -18
@@ -94,8 +94,11 @@ static DEFINE_PER_CPU(lpae_t *, xen_pgtable);* the second level pagetables which map the domheap region * DOMHEAP_VIRT_START...DOMHEAP_VIRT_END in 2MB chunks. */ static DEFINE_PER_CPU(lpae_t *, xen_dommap); -/* Root of the trie for cpu0 */ +/* Root of the trie for cpu0, other CPU's PTs are dynamically allocated */ lpae_t cpu0_pgtable[LPAE_ENTRIES] __attribute__((__aligned__(4096))); +/* cpu0's domheap page tables */ +lpae_t cpu0_dommap[LPAE_ENTRIES*DOMHEAP_SECOND_PAGES] + __attribute__((__aligned__(4096*DOMHEAP_SECOND_PAGES)));#endif #ifdef CONFIG_ARM_64
@@ -115,19 +118,8 @@ static __initdata int xenheap_first_first_slot = -1;* The second-level table is 2 contiguous pages long, and covers all * addresses from 0 to 0x7fffffff. Offsets into it are calculated * with second_linear_offset(), not second_table_offset(). -* -* On 32bit addresses 0x80000000 to 0xffffffff are covered by the -* per-cpu xen_domheap mappings described above. We allocate 4 pages -* here for use in the boot page tables and the second two pages -* become the boot CPUs xen_dommap pages. -* -* On 64bit addresses 0x80000000 to 0xffffffff are unused. However we -* allocate 4 pages here for use while relocating Xen, which currently -* expects a second level page to exist for all addresses in the first -* 4GB. We need to keep these extra mappings in place for seconary CPU -* bring up too. For now we just leave them forever. */ -lpae_t xen_second[LPAE_ENTRIES*4] __attribute__((__aligned__(4096*4))); +lpae_t xen_second[LPAE_ENTRIES*2] __attribute__((__aligned__(4096*2)));/* First level page table used for fixmap */ lpae_t xen_fixmap[LPAE_ENTRIES] __attribute__((__aligned__(4096)));/* First level page table used to map Xen itself with the XN bit set
@@ -435,13 +427,22 @@ void __init setup_pagetables(unsigned long boot_phys_offset, paddr_t xen_paddr)#endif /* Initialise first level entries, to point to second level entries */ -for ( i =0 ; i <4 ; i++) +for ( i =0 ; i <2 ; i++) { p[i] =pte_of_xenaddr ((uintptr_t )(xen_second+i*LPAE_ENTRIES )); p[i].pt.table =1 ; p[i].pt.xn =0 ; } +#ifdef CONFIG_ARM_32 +for ( i =0 ; i <DOMHEAP_SECOND_PAGES ; i++ ) + { + p[first_table_offset (DOMHEAP_VIRT_START +i*FIRST_SIZE )] + =pte_of_xenaddr ((uintptr_t )(cpu0_dommap+i*LPAE_ENTRIES )); + p[first_table_offset (DOMHEAP_VIRT_START +i*FIRST_SIZE )].pt.table =1 ; + } +#endif +/* Initialise xen second level entries ... */ /* ... Xen's text etc */
@@ -514,11 +515,9 @@ void __init setup_pagetables(unsigned long boot_phys_offset, paddr_t xen_paddr)#ifdef CONFIG_ARM_32 per_cpu (xen_pgtable,0 ) = cpu0_pgtable; -per_cpu (xen_dommap,0 ) = xen_second + -second_linear_offset (DOMHEAP_VIRT_START ); +per_cpu (xen_dommap,0 ) = cpu0_dommap; -/* Some of these slots may have been used during start of day and/or -* relocation. Make sure they are clear now. */ +/* Make sure it is clear */ memset (this_cpu (xen_dommap),0 ,DOMHEAP_SECOND_PAGES *PAGE_SIZE );flush_xen_dcache_va_range (this_cpu (xen_dommap),DOMHEAP_SECOND_PAGES *PAGE_SIZE );
Signature · 1 line
1.7.10.4
PATCH 1/1 xen: arm: move smp_init_cpus to smpboot.c
In reply to Ian CampbellSeems like a better home.
--- xen/arch/arm/setup.c | 125 -------------------------------------------- xen/arch/arm/smpboot.c | 126 +++++++++++++++++++++++++++++++++++++++++++++ xen/include/asm-arm/smp.h | 1 + 3 files changed, 127 insertions(+), 125 deletions(-)
xen/arch/arm/setup.c +0 -125
@@ -588,131 +588,6 @@ void __init setup_cache(void) cacheline_bytes =1U << (4 + (ccsid &0x7 )); } -/* Parse the device tree and build the logical map array containing -* MPIDR values related to logical cpus -* Code base on Linux arch/arm/kernel/devtree.c -*/ -static void __init smp_init_cpus (void ) -{ -register_t mpidr; -struct dt_device_node *cpus =dt_find_node_by_path ("/cpus" ); -struct dt_device_node *cpu; -unsigned int i, j; -unsigned int cpuidx =1 ; -static u32 tmp_map[NR_CPUS ]__initdata = - { - [0 ...NR_CPUS -1 ] =MPIDR_INVALID - }; -bool_t bootcpu_valid =0 ; -int rc; - -if ( (rc =arch_smp_init ()) <0 ) - { -printk (XENLOG_WARNING "SMP init failed (%d)\n" -"Using only 1 CPU\n" , rc); -return ; - } - - mpidr = boot_cpu_data.mpidr.bits &MPIDR_HWID_MASK ; - -if ( !cpus ) - { -printk (XENLOG_WARNING "WARNING: Can't find /cpus in the device tree.\n" -"Using only 1 CPU\n" ); -return ; - } - -dt_for_each_child_node ( cpus, cpu ) - { -u32 hwid; - -if ( !dt_device_type_is_equal (cpu,"cpu" ) ) -continue ; - -if ( !dt_property_read_u32 (cpu,"reg" , &hwid) ) - { -printk (XENLOG_WARNING "cpu node `%s`: missing reg property\n" , -dt_node_full_name (cpu)); -continue ; - } - -/* -* 8 MSBs must be set to 0 in the DT since the reg property -* defines the MPIDR[23:0] -*/ -if ( hwid & ~MPIDR_HWID_MASK ) - { -printk (XENLOG_WARNING "cpu node `%s`: invalid hwid value (0x%x)\n" , -dt_node_full_name (cpu), hwid); -continue ; - } - -/* -* Duplicate MPIDRs are a recipe for disaster. Scan all initialized -* entries and check for duplicates. If any found just skip the node. -* temp values values are initialized to MPIDR_INVALID to avoid -* matching valid MPIDR[23:0] values. -*/ -for ( j =0 ; j < cpuidx; j++ ) - { -if ( tmp_map[j] == hwid ) - { -printk (XENLOG_WARNING "cpu node `%s`: duplicate /cpu reg properties in the DT\n" , -dt_node_full_name (cpu)); -continue ; - } - } - -/* -* Build a stashed array of MPIDR values. Numbering scheme requires -* that if detected the boot CPU must be assigned logical id 0. Other -* CPUs get sequential indexes starting from 1. If a CPU node -* with a reg property matching the boot CPU MPIDR is detected, -* this is recorded and so that the logical map build from DT is -* validated and can be used to set the map. -*/ -if ( hwid == mpidr ) - { - i =0 ; - bootcpu_valid =1 ; - } -else - i = cpuidx++; - -if ( cpuidx >NR_CPUS ) - { -printk (XENLOG_WARNING -"DT /cpu %u node greater than max cores %u, capping them\n" , - cpuidx,NR_CPUS ); - cpuidx =NR_CPUS ; -break ; - } - -if ( (rc =arch_cpu_init (i, cpu)) <0 ) - { -printk ("cpu%d init failed (hwid %x): %d\n" , i, hwid, rc); - tmp_map[i] =MPIDR_INVALID ; - } -else - tmp_map[i] = hwid; - } - -if ( !bootcpu_valid ) - { -printk (XENLOG_WARNING "DT missing boot CPU MPIDR[23:0]\n" -"Using only 1 CPU\n" ); -return ; - } - -for ( i =0 ; i < cpuidx; i++ ) - { -if ( tmp_map[i] ==MPIDR_INVALID ) -continue ; -cpumask_set_cpu (i, &cpu_possible_map); -cpu_logical_map (i) = tmp_map[i]; - } -} -/* C entry point for boot CPU */ void __init start_xen(unsigned long boot_phys_offset, unsigned long fdt_paddr,
xen/arch/arm/smpboot.c +126 -0
132 lines not on this page · raw message
xen/include/asm-arm/smp.h +1 -0
@@ -24,6 +24,7 @@ extern int arch_cpu_up(int cpu);/* Secondary CPU entry point */ extern void init_secondary (void ); +extern void smp_init_cpus (void );extern void smp_clear_cpu_maps (void );extern int smp_get_max_cpus (void );#endif
Signature · 1 line
1.7.10.4
Re: [PATCH EXTRA] xen: arm: move smp_init_cpus to smpboot.c
Quoted 3 lines · Ian Campbell
Seems like a better home.
Signed-off-by Ian Campbell <[email protected]>
Quoted 292 lines
--- xen/arch/arm/setup.c | 125 -------------------------------------------- xen/arch/arm/smpboot.c | 126 +++++++++++++++++++++++++++++++++++++++++++++ xen/include/asm-arm/smp.h | 1 + 3 files changed, 127 insertions(+), 125 deletions(-)xen/arch/arm/setup.c +0
-125@@ -588,131 +588,6 @@ void __init setup_cache(void) cacheline_bytes =1U << (4 + (ccsid &0x7 )); } -/* Parse the device tree and build the logical map array containing -* MPIDR values related to logical cpus -* Code base on Linux arch/arm/kernel/devtree.c -*/ -static void __init smp_init_cpus (void ) -{ -register_t mpidr; -struct dt_device_node *cpus =dt_find_node_by_path ("/cpus" ); -struct dt_device_node *cpu; -unsigned int i, j; -unsigned int cpuidx =1 ; -static u32 tmp_map[NR_CPUS ]__initdata = - { - [0 ...NR_CPUS -1 ] =MPIDR_INVALID - }; -bool_t bootcpu_valid =0 ; -int rc; - -if ( (rc =arch_smp_init ()) <0 ) - { -printk (XENLOG_WARNING "SMP init failed (%d)\n" -"Using only 1 CPU\n" , rc); -return ; - } - - mpidr = boot_cpu_data.mpidr.bits &MPIDR_HWID_MASK ; - -if ( !cpus ) - { -printk (XENLOG_WARNING "WARNING: Can't find /cpus in the device tree.\n" -"Using only 1 CPU\n" ); -return ; - } - -dt_for_each_child_node ( cpus, cpu ) - { -u32 hwid; - -if ( !dt_device_type_is_equal (cpu,"cpu" ) ) -continue ; - -if ( !dt_property_read_u32 (cpu,"reg" , &hwid) ) - { -printk (XENLOG_WARNING "cpu node `%s`: missing reg property\n" , -dt_node_full_name (cpu)); -continue ; - } - -/* -* 8 MSBs must be set to 0 in the DT since the reg property -* defines the MPIDR[23:0] -*/ -if ( hwid & ~MPIDR_HWID_MASK ) - { -printk (XENLOG_WARNING "cpu node `%s`: invalid hwid value (0x%x)\n" , -dt_node_full_name (cpu), hwid); -continue ; - } - -/* -* Duplicate MPIDRs are a recipe for disaster. Scan all initialized -* entries and check for duplicates. If any found just skip the node. -* temp values values are initialized to MPIDR_INVALID to avoid -* matching valid MPIDR[23:0] values. -*/ -for ( j =0 ; j < cpuidx; j++ ) - { -if ( tmp_map[j] == hwid ) - { -printk (XENLOG_WARNING "cpu node `%s`: duplicate /cpu reg properties in the DT\n" , -dt_node_full_name (cpu)); -continue ; - } - } - -/* -* Build a stashed array of MPIDR values. Numbering scheme requires -* that if detected the boot CPU must be assigned logical id 0. Other -* CPUs get sequential indexes starting from 1. If a CPU node -* with a reg property matching the boot CPU MPIDR is detected, -* this is recorded and so that the logical map build from DT is -* validated and can be used to set the map. -*/ -if ( hwid == mpidr ) - { - i =0 ; - bootcpu_valid =1 ; - } -else - i = cpuidx++; - -if ( cpuidx >NR_CPUS ) - { -printk (XENLOG_WARNING -"DT /cpu %u node greater than max cores %u, capping them\n" , - cpuidx,NR_CPUS ); - cpuidx =NR_CPUS ; -break ; - } - -if ( (rc =arch_cpu_init (i, cpu)) <0 ) - { -printk ("cpu%d init failed (hwid %x): %d\n" , i, hwid, rc); - tmp_map[i] =MPIDR_INVALID ; - } -else - tmp_map[i] = hwid; - } - -if ( !bootcpu_valid ) - { -printk (XENLOG_WARNING "DT missing boot CPU MPIDR[23:0]\n" -"Using only 1 CPU\n" ); -return ; - } - -for ( i =0 ; i < cpuidx; i++ ) - { -if ( tmp_map[i] ==MPIDR_INVALID ) -continue ; -cpumask_set_cpu (i, &cpu_possible_map); -cpu_logical_map (i) = tmp_map[i]; - } -} -/* C entry point for boot CPU */ void __init start_xen(unsigned long boot_phys_offset, unsigned long fdt_paddr,xen/arch/arm/smpboot.c +126
-0@@ -89,6 +89,132 @@ smp_clear_cpu_maps (void)cpu_logical_map (0 ) =READ_SYSREG (MPIDR_EL1 ) &MPIDR_HWID_MASK ; } +/* Parse the device tree and build the logical map array containing +* MPIDR values related to logical cpus +* Code base on Linux arch/arm/kernel/devtree.c +*/ +void __init smp_init_cpus (void ) +{ +register_t mpidr; +struct dt_device_node *cpus =dt_find_node_by_path ("/cpus" ); +struct dt_device_node *cpu; +unsigned int i, j; +unsigned int cpuidx =1 ; +static u32 tmp_map[NR_CPUS ]__initdata = + { + [0 ...NR_CPUS -1 ] =MPIDR_INVALID + }; +bool_t bootcpu_valid =0 ; +int rc; + +if ( (rc =arch_smp_init ()) <0 ) + { +printk (XENLOG_WARNING "SMP init failed (%d)\n" +"Using only 1 CPU\n" , rc); +return ; + } + + mpidr = boot_cpu_data.mpidr.bits &MPIDR_HWID_MASK ; + +if ( !cpus ) + { +printk (XENLOG_WARNING "WARNING: Can't find /cpus in the device tree.\n" +"Using only 1 CPU\n" ); +return ; + } + +dt_for_each_child_node ( cpus, cpu ) + { +u32 hwid; + +if ( !dt_device_type_is_equal (cpu,"cpu" ) ) +continue ; + +if ( !dt_property_read_u32 (cpu,"reg" , &hwid) ) + { +printk (XENLOG_WARNING "cpu node `%s`: missing reg property\n" , +dt_node_full_name (cpu)); +continue ; + } + +/* +* 8 MSBs must be set to 0 in the DT since the reg property +* defines the MPIDR[23:0] +*/ +if ( hwid & ~MPIDR_HWID_MASK ) + { +printk (XENLOG_WARNING "cpu node `%s`: invalid hwid value (0x%x)\n" , +dt_node_full_name (cpu), hwid); +continue ; + } + +/* +* Duplicate MPIDRs are a recipe for disaster. Scan all initialized +* entries and check for duplicates. If any found just skip the node. +* temp values values are initialized to MPIDR_INVALID to avoid +* matching valid MPIDR[23:0] values. +*/ +for ( j =0 ; j < cpuidx; j++ ) + { +if ( tmp_map[j] == hwid ) + { +printk (XENLOG_WARNING +"cpu node `%s`: duplicate /cpu reg properties in the DT\n" , +dt_node_full_name (cpu)); +continue ; + } + } + +/* +* Build a stashed array of MPIDR values. Numbering scheme requires +* that if detected the boot CPU must be assigned logical id 0. Other +* CPUs get sequential indexes starting from 1. If a CPU node +* with a reg property matching the boot CPU MPIDR is detected, +* this is recorded and so that the logical map build from DT is +* validated and can be used to set the map. +*/ +if ( hwid == mpidr ) + { + i =0 ; + bootcpu_valid =1 ; + } +else + i = cpuidx++; + +if ( cpuidx >NR_CPUS ) + { +printk (XENLOG_WARNING +"DT /cpu %u node greater than max cores %u, capping them\n" , + cpuidx,NR_CPUS ); + cpuidx =NR_CPUS ; +break ; + } + +if ( (rc =arch_cpu_init (i, cpu)) <0 ) + { +printk ("cpu%d init failed (hwid %x): %d\n" , i, hwid, rc); + tmp_map[i] =MPIDR_INVALID ; + } +else + tmp_map[i] = hwid; + } + +if ( !bootcpu_valid ) + { +printk (XENLOG_WARNING "DT missing boot CPU MPIDR[23:0]\n" +"Using only 1 CPU\n" ); +return ; + } + +for ( i =0 ; i < cpuidx; i++ ) + { +if ( tmp_map[i] ==MPIDR_INVALID ) +continue ; +cpumask_set_cpu (i, &cpu_possible_map); +cpu_logical_map (i) = tmp_map[i]; + } +} +int __init smp_get_max_cpus (void ) {xen/include/asm-arm/smp.h +1
-0@@ -24,6 +24,7 @@ extern int arch_cpu_up(int cpu);/* Secondary CPU entry point */ extern void init_secondary (void ); +extern void smp_init_cpus (void );extern void smp_clear_cpu_maps (void );extern int smp_get_max_cpus (void );#endif
Signature · 1 line
Julien Grall