[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH v2 1/5] plat/xen: Align x86 interrupt stack address at compile time
This patch aligns the stack base address at compile time and makes the irqstack variable public. Before this patch, the IRQ stack size was 2 * STACK_SIZE bytes because the aligned address was computed at runtime and the bottom half of the stack was wasted. This patch fixes that and aligns the stack address at build time, therefore avoiding a waste of STACK_SIZE bytes. Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx> --- plat/xen/x86/arch_events.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plat/xen/x86/arch_events.c b/plat/xen/x86/arch_events.c index 1e165c81..7d7289fc 100644 --- a/plat/xen/x86/arch_events.c +++ b/plat/xen/x86/arch_events.c @@ -30,9 +30,10 @@ #include <stdint.h> #include <x86/cpu.h> #include <uk/plat/config.h> +#include <uk/essentials.h> #if defined(__x86_64__) -static char irqstack[2 * STACK_SIZE]; +char irqstack[STACK_SIZE] __align(STACK_SIZE); static struct pda { int irqcount; /* offset 0 (used in x86_64.S) */ @@ -48,8 +49,7 @@ void arch_init_events(void) wrmsrl(0xc0000101, (uint64_t) &cpu0_pda); cpu0_pda.irqcount = -1; cpu0_pda.irqstackptr = - (void *) (((unsigned long)irqstack + 2 * STACK_SIZE) - & STACK_MASK_TOP); + (void *) ((unsigned long) irqstack + STACK_SIZE); #endif } -- 2.11.0 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |