Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145670
b: refs/heads/master
c: 9d16e78
h: refs/heads/master
v: v3
  • Loading branch information
Sam Ravnborg authored and Ingo Molnar committed Apr 29, 2009
1 parent c1f3fa1 commit 92b3e45
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 33 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bf6a57418d5445c98047edbec022c9e54d1526e6
refs/heads/master: 9d16e78318f174fd4b07916a93e41749d5199267
30 changes: 30 additions & 0 deletions trunk/arch/x86/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,36 @@ SECTIONS
}
#endif

#if defined(CONFIG_X86_64) && defined(CONFIG_SMP)
/*
* percpu offsets are zero-based on SMP. PERCPU_VADDR() changes the
* output PHDR, so the next output section - __data_nosave - should
* start another section data.init2. Also, pda should be at the head of
* percpu area. Preallocate it and define the percpu offset symbol
* so that it can be accessed as a percpu variable.
*/
. = ALIGN(PAGE_SIZE);
PERCPU_VADDR(0, :percpu)
#else
PERCPU(PAGE_SIZE)
#endif

. = ALIGN(PAGE_SIZE);
/* freed after init ends here */
__init_end = .;

#ifdef CONFIG_X86_64
.data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
. = ALIGN(PAGE_SIZE);
__nosave_begin = .;
*(.data.nosave)
. = ALIGN(PAGE_SIZE);
__nosave_end = .;
} :data.init2
/* use another section data.init2, see PERCPU_VADDR() above */
#endif


#ifdef CONFIG_X86_32
# include "vmlinux_32.lds.S"
#else
Expand Down
6 changes: 0 additions & 6 deletions trunk/arch/x86/kernel/vmlinux_32.lds.S
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
PERCPU(PAGE_SIZE)

. = ALIGN(PAGE_SIZE);
/* freed after init ends here */

/* BSS */
.bss : AT(ADDR(.bss) - LOAD_OFFSET) {
__init_end = .;
__bss_start = .;
*(.bss.page_aligned)
*(.bss)
Expand Down
26 changes: 0 additions & 26 deletions trunk/arch/x86/kernel/vmlinux_64.lds.S
Original file line number Diff line number Diff line change
@@ -1,29 +1,3 @@
#ifdef CONFIG_SMP
/*
* percpu offsets are zero-based on SMP. PERCPU_VADDR() changes the
* output PHDR, so the next output section - __data_nosave - should
* start another section data.init2. Also, pda should be at the head of
* percpu area. Preallocate it and define the percpu offset symbol
* so that it can be accessed as a percpu variable.
*/
. = ALIGN(PAGE_SIZE);
PERCPU_VADDR(0, :percpu)
#else
PERCPU(PAGE_SIZE)
#endif

. = ALIGN(PAGE_SIZE);
__init_end = .;

.data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
. = ALIGN(PAGE_SIZE);
__nosave_begin = .;
*(.data.nosave)
. = ALIGN(PAGE_SIZE);
__nosave_end = .;
} :data.init2
/* use another section data.init2, see PERCPU_VADDR() above */

.bss : AT(ADDR(.bss) - LOAD_OFFSET) {
. = ALIGN(PAGE_SIZE);
__bss_start = .; /* BSS */
Expand Down

0 comments on commit 92b3e45

Please sign in to comment.