Skip to content

Commit abe1ee3

Browse files
Tim Abbottsravnborg
authored andcommitted
Use macros for .data.page_aligned section.
This patch changes the remaining direct references to .data.page_aligned in C and assembly code to use the macros in include/linux/linkage.h. Signed-off-by: Tim Abbott <tabbott@ksplice.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
1 parent 02b7da3 commit abe1ee3

9 files changed

Lines changed: 16 additions & 11 deletions

File tree

‎arch/avr32/mm/init.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,9 @@
2424
#include <asm/setup.h>
2525
#include <asm/sections.h>
2626

27-
#define __page_aligned __attribute__((section(".data.page_aligned")))
28-
2927
DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
3028

31-
pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned;
29+
pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned_data;
3230

3331
struct page *empty_zero_page;
3432
EXPORT_SYMBOL(empty_zero_page);

‎arch/powerpc/kernel/vdso.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
/*
23
* Copyright (C) 2004 Benjamin Herrenschmidt, IBM Corp.
34
* <benh@kernel.crashing.org>
@@ -74,7 +75,7 @@ static int vdso_ready;
7475
static union {
7576
struct vdso_data data;
7677
u8 page[PAGE_SIZE];
77-
} vdso_data_store __attribute__((__section__(".data.page_aligned")));
78+
} vdso_data_store __page_aligned_data;
7879
struct vdso_data *vdso_data = &vdso_data_store.data;
7980

8081
/* Format of the patch table */

‎arch/powerpc/kernel/vdso32/vdso32_wrapper.S‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#include <linux/init.h>
2+
#include <linux/linkage.h>
23
#include <asm/page.h>
34

4-
.section ".data.page_aligned"
5+
__PAGE_ALIGNED_DATA
56

67
.globl vdso32_start, vdso32_end
78
.balign PAGE_SIZE

‎arch/powerpc/kernel/vdso64/vdso64_wrapper.S‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#include <linux/init.h>
2+
#include <linux/linkage.h>
23
#include <asm/page.h>
34

4-
.section ".data.page_aligned"
5+
__PAGE_ALIGNED_DATA
56

67
.globl vdso64_start, vdso64_end
78
.balign PAGE_SIZE

‎arch/s390/kernel/vdso.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ __setup("vdso=", vdso_setup);
7575
static union {
7676
struct vdso_data data;
7777
u8 page[PAGE_SIZE];
78-
} vdso_data_store __attribute__((__section__(".data.page_aligned")));
78+
} vdso_data_store __page_aligned_data;
7979
struct vdso_data *vdso_data = &vdso_data_store.data;
8080

8181
/*

‎arch/s390/kernel/vdso32/vdso32_wrapper.S‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#include <linux/init.h>
2+
#include <linux/linkage.h>
23
#include <asm/page.h>
34

4-
.section ".data.page_aligned"
5+
__PAGE_ALIGNED_DATA
56

67
.globl vdso32_start, vdso32_end
78
.balign PAGE_SIZE

‎arch/s390/kernel/vdso64/vdso64_wrapper.S‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#include <linux/init.h>
2+
#include <linux/linkage.h>
23
#include <asm/page.h>
34

4-
.section ".data.page_aligned"
5+
__PAGE_ALIGNED_DATA
56

67
.globl vdso64_start, vdso64_end
78
.balign PAGE_SIZE

‎arch/x86/include/asm/cache.h‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#ifndef _ASM_X86_CACHE_H
22
#define _ASM_X86_CACHE_H
33

4+
#include <linux/linkage.h>
5+
46
/* L1 cache line size */
57
#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
68
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
@@ -13,7 +15,7 @@
1315
#ifdef CONFIG_SMP
1416
#define __cacheline_aligned_in_smp \
1517
__attribute__((__aligned__(1 << (INTERNODE_CACHE_SHIFT)))) \
16-
__attribute__((__section__(".data.page_aligned")))
18+
__page_aligned_data
1719
#endif
1820
#endif
1921

‎arch/x86/kernel/head_32.S‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ ENTRY(empty_zero_page)
626626
* This starts the data section.
627627
*/
628628
#ifdef CONFIG_X86_PAE
629-
.section ".data.page_aligned","wa"
629+
__PAGE_ALIGNED_DATA
630630
/* Page-aligned for the benefit of paravirt? */
631631
.align PAGE_SIZE_asm
632632
ENTRY(swapper_pg_dir)

0 commit comments

Comments
 (0)