|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 3/4] xen/link: Fold .data.read_mostly into .data
.data.read_mostly only needs separating from adjacent data by one cache line
to be effective, and placing it adjacent to .data.page_aligned fulfills this
requirement.
For ARM, .ex_table appears to be a vestigial remnant. Nothing in the
resulting build ever inspects or acts on the contents of the table. The arm32
build does however have some assembly routines which fill .ex_table.
Drop all of ARM's .ex_table infrastructure, to reduce the size of the compiled
binary, and avoid giving the illusion of exception handling working.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
CC: Stefano Stabellini <sstabellini@xxxxxxxxxx>
CC: Julien Grall <julien.grall@xxxxxxx>
Only compile tested on ARM.
---
xen/arch/arm/arm32/lib/assembler.h | 19 ++-----------------
xen/arch/arm/xen.lds.S | 16 +---------------
xen/arch/x86/xen.lds.S | 7 ++-----
3 files changed, 5 insertions(+), 37 deletions(-)
diff --git a/xen/arch/arm/arm32/lib/assembler.h
b/xen/arch/arm/arm32/lib/assembler.h
index 6de2638..42eaabb 100644
--- a/xen/arch/arm/arm32/lib/assembler.h
+++ b/xen/arch/arm/arm32/lib/assembler.h
@@ -160,13 +160,6 @@
restore_irqs_notrace \oldcpsr
.endm
-#define USER(x...) \
-9999: x; \
- .pushsection __ex_table,"a"; \
- .align 3; \
- .long 9999b,9001f; \
- .popsection
-
#ifdef CONFIG_SMP
#define ALT_SMP(instr...) \
9998: instr
@@ -247,7 +240,7 @@
#ifdef CONFIG_THUMB2_KERNEL
.macro usraccoff, instr, reg, ptr, inc, off, cond, abort, t=T()
-9999:
+
.if \inc == 1
\instr\cond\()b\()\t\().w \reg, [\ptr, #\off]
.elseif \inc == 4
@@ -256,10 +249,6 @@
.error "Unsupported inc macro argument"
.endif
- .pushsection __ex_table,"a"
- .align 3
- .long 9999b, \abort
- .popsection
.endm
.macro usracc, instr, reg, ptr, inc, cond, rept, abort
@@ -288,7 +277,7 @@
.macro usracc, instr, reg, ptr, inc, cond, rept, abort, t=T()
.rept \rept
-9999:
+
.if \inc == 1
\instr\cond\()b\()\t \reg, [\ptr], #\inc
.elseif \inc == 4
@@ -297,10 +286,6 @@
.error "Unsupported inc macro argument"
.endif
- .pushsection __ex_table,"a"
- .align 3
- .long 9999b, \abort
- .popsection
.endr
.endm
diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S
index 2b44e5d..3dc5117 100644
--- a/xen/arch/arm/xen.lds.S
+++ b/xen/arch/arm/xen.lds.S
@@ -94,27 +94,13 @@ SECTIONS
_erodata = .; /* End of read-only data */
.data : { /* Data */
+ *(.data.read_mostly)
. = ALIGN(PAGE_SIZE);
*(.data.page_aligned)
*(.data)
*(.data.*)
} :text
- . = ALIGN(SMP_CACHE_BYTES);
- .data.read_mostly : {
- /* Exception table */
- __start___ex_table = .;
- *(.ex_table)
- __stop___ex_table = .;
-
- /* Pre-exception table */
- __start___pre_ex_table = .;
- *(.ex_table.pre)
- __stop___pre_ex_table = .;
-
- *(.data.read_mostly)
- } :text
-
. = ALIGN(8);
.arch.info : {
_splatform = .;
diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S
index 9fa6c99..ef11949 100644
--- a/xen/arch/x86/xen.lds.S
+++ b/xen/arch/x86/xen.lds.S
@@ -264,12 +264,9 @@ SECTIONS
__2M_init_end = .;
__2M_rwdata_start = .; /* Start of 2M superpages, mapped RW. */
- . = ALIGN(SMP_CACHE_BYTES);
- DECL_SECTION(.data.read_mostly) {
- *(.data.read_mostly)
- } :text
-
DECL_SECTION(.data) {
+ *(.data.read_mostly)
+ . = ALIGN(PAGE_SIZE);
*(.data.page_aligned)
*(.data)
*(.data.*)
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |