section name cleanup for avr32
cover section name cleanup for avr32
This patch series cleans up the section names on the avr32 architecture. It requires the architecture-independent macro definitions from this patch series:
<http://www.spinics.net/lists/mips/msg33499.html>
The long-term goal here is to add support for building the kernel with -ffunction-sections -fdata-sections. This requires renaming all the magic section names in the kernel of the form .text.foo, .data.foo, .bss.foo, and .rodata.foo to not have collisions with sections generated for code like:
static int nosave = 0; /* -fdata-sections places in .data.nosave */ static void head(); /* -ffunction-sections places in .text.head */
Note that these patches have not been boot-tested (aside from testing the analogous changes on x86), since I don't have access to the appropriate hardware.
-Tim Abbott
Tim Abbott (3):
avr32: Use standard macros for .data.page_aligned section.
avr32: use new macro for .data.cacheline_aligned section.
avr32: use new macros for .data.init_task.
arch/avr32/kernel/init_task.c | 3 +-- arch/avr32/kernel/vmlinux.lds.S | 8 +++----- arch/avr32/mm/init.c | 4 +--- 3 files changed, 5 insertions(+), 10 deletions(-)
PATCH 1/3 avr32: Use standard macros for .data.page_aligned section.
--- arch/avr32/kernel/vmlinux.lds.S | 3 +-- arch/avr32/mm/init.c | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-)
arch/avr32/kernel/vmlinux.lds.S +1 -2
@@ -98,8 +98,7 @@ SECTIONS *(.data.init_task) /* Then, the page-aligned data */ - . = ALIGN(PAGE_SIZE); - *(.data.page_aligned) + PAGE_ALIGNED_DATA /* Then, the cacheline aligned data */ . = ALIGN(L1_CACHE_BYTES);
arch/avr32/mm/init.c +1 -3
@@ -24,11 +24,9 @@#include <asm/setup.h> #include <asm/sections.h> -#define __page_aligned __attribute__((section(".data.page_aligned"))) - DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); -pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned; +pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned_data;struct page *empty_zero_page;EXPORT_SYMBOL (empty_zero_page);
Signature · 1 line
1.6.2.1
PATCH 2/3 avr32: use new macro for .data.cacheline_aligned section.
--- arch/avr32/kernel/vmlinux.lds.S | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
arch/avr32/kernel/vmlinux.lds.S +1 -2
@@ -101,8 +101,7 @@ SECTIONS PAGE_ALIGNED_DATA /* Then, the cacheline aligned data */ - . = ALIGN(L1_CACHE_BYTES); - *(.data.cacheline_aligned) + CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES) /* And the rest... */ *(.data.rel*)
Signature · 1 line
1.6.2.1
PATCH 3/3 avr32: use new macros for .data.init_task.
--- arch/avr32/kernel/init_task.c | 3 +-- arch/avr32/kernel/vmlinux.lds.S | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-)
arch/avr32/kernel/init_task.c +1 -2
@@ -22,8 +22,7 @@ EXPORT_SYMBOL(init_mm);/* * Initial thread structure. Must be aligned on an 8192-byte boundary. */ -union thread_union init_thread_union - __attribute__((__section__(".data.init_task"))) = +union thread_union init_thread_union __init_task_data = {INIT_THREAD_INFO (init_task) };/*
arch/avr32/kernel/vmlinux.lds.S +1 -1
@@ -95,7 +95,7 @@ SECTIONS /* * First, the init task union, aligned to an 8K boundary. */ - *(.data.init_task) + INIT_TASK_DATA(THREAD_SIZE) /* Then, the page-aligned data */ PAGE_ALIGNED_DATA
Signature · 1 line
1.6.2.1