PPC: switch entry point annotations to common model

Use the generic framework in xen/linkage.h. No change in generated code
except of course the converted symbols change to be hidden ones.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Shawn Anastasio <sanastasio@raptorengineering.com>
This commit is contained in:
Jan Beulich committed 2024-01-23 12:02:05 +01:00
1 parent 4900c939cb
commit 2cfdbd5863
5 files changed
+12 -26

No files matched your search

+1
View File
@@ -3,6 +3,7 @@
#define _ASM_PPC_ASM_DEFNS_H
#include <asm/asm-offsets.h>
#include <xen/linkage.h>
/*
* Load a 64-bit immediate value into the specified GPR.
+1 -6
View File
@@ -32,12 +32,7 @@
/* Linkage for PPC */
#ifdef __ASSEMBLY__
#define ALIGN .p2align 2
#define ENTRY(name) \
.globl name; \
ALIGN; \
name:
#define CODE_ALIGN 4
#endif
#define XEN_VIRT_START _AC(0xc000000000000000, UL)
+6 -9
View File
@@ -6,7 +6,7 @@
.section .text.exceptions, "ax", %progbits
/* Helper to dump CPU state to struct cpu_user_regs pointed to by r1. */
ENTRY(exception_common)
FUNC(exception_common)
/*
* Save GPRs 1-31. TODO: The value of %r1 has already been modified by the
* ISR, so the value we save isn't the exact value we had on entry.
@@ -45,11 +45,10 @@ ENTRY(exception_common)
stdu %r0, -STACK_FRAME_OVERHEAD(%r1)
bl exception_handler
.size exception_common, . - exception_common
.type exception_common, %function
END(exception_common)
/* Same as exception_common, but for exceptions that set HSRR{0,1} */
ENTRY(h_exception_common)
FUNC(h_exception_common)
/*
* Save GPRs 1-31. TODO: The value of %r1 has already been modified by the
* ISR, so the value we save isn't the exact value we had on entry.
@@ -89,15 +88,14 @@ ENTRY(h_exception_common)
stdu %r0, -STACK_FRAME_OVERHEAD(%r1)
bl exception_handler
.size h_exception_common, . - h_exception_common
.type h_exception_common, %function
END(h_exception_common)
/*
* Declare an ISR for the provided exception that jumps to the specified handler
*/
.macro ISR name, exc, handler
. = (AIL_VECTOR_BASE - EXCEPTION_VECTORS_START) + \exc
ENTRY(\name)
FUNC(\name)
/* TODO: switch stack */
/* Reserve space for struct cpu_user_regs */
@@ -113,8 +111,7 @@ ENTRY(h_exception_common)
/* Branch to common code */
b \handler
.size \name, . - \name
.type \name, %function
END(\name)
.endm
/*
+4 -8
View File
@@ -6,7 +6,7 @@
.section .text.header, "ax", %progbits
ENTRY(start)
FUNC(start)
/*
* NOTE: argument registers (r3-r9) must be preserved until the C entrypoint
*/
@@ -64,11 +64,9 @@ ENTRY(start)
/* should never return */
trap
END(start)
.size start, . - start
.type start, %function
ENTRY(enable_mmu)
FUNC(enable_mmu)
mflr %r3
mfmsr %r4
@@ -78,6 +76,4 @@ ENTRY(enable_mmu)
mtsrr0 %r3 /* return to caller after MMU enable */
mtsrr1 %r4
rfid
.size enable_mmu, . - enable_mmu
.type enable_mmu, %function
END(enable_mmu)
-3
View File
@@ -1,9 +1,6 @@
#include <xen/lib.h>
#include <xen/xen.lds.h>
#undef ENTRY
#undef ALIGN
OUTPUT_ARCH(powerpc:common64)
ENTRY(start)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.