Skip to content

Commit

Permalink
[PPC] Fix COMMON symbol warnings
Browse files Browse the repository at this point in the history
We get the following warnings in various ARCH=ppc builds:

WARNING: "ee_restarts" [arch/ppc/kernel/built-in] is COMMON symbol
WARNING: "fee_restarts" [arch/ppc/kernel/built-in] is COMMON symbol
WARNING: "htab_hash_searches" [arch/ppc/mm/built-in] is COMMON symbol
WARNING: "next_slot" [arch/ppc/mm/built-in] is COMMON symbol
WARNING: "mmu_hash_lock" [arch/ppc/mm/built-in] is COMMON symbol
WARNING: "primary_pteg_full" [arch/ppc/mm/built-in] is COMMON symbol
WARNING: "global_dbcr0" [arch/ppc/kernel/built-in] is COMMON symbol

Switch to local symbols for ee_restarts, fee_restarts, and global_dbcr0 and
global symbols for mmu_hash_lock, next_slot, primary_pteg_full, and
htab_hash_searches.

(except mmu_hash_lock which is global) and
space directive instead.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
  • Loading branch information
Kumar Gala committed May 23, 2007
1 parent 5453e77 commit 9c05e63
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 7 deletions.
18 changes: 15 additions & 3 deletions arch/ppc/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,11 @@ fast_exception_return:
mr r12,r4 /* restart at exc_exit_restart */
b 2b

.comm fee_restarts,4
.section .bss
.align 2
fee_restarts:
.space 4
.previous

/* aargh, a nonrecoverable interrupt, panic */
/* aargh, we don't know which trap this is */
Expand Down Expand Up @@ -851,7 +855,11 @@ load_dbcr0:
mtspr SPRN_DBSR,r11 /* clear all pending debug events */
blr

.comm global_dbcr0,8
.section .bss
.align 4
global_dbcr0:
.space 8
.previous
#endif /* !(CONFIG_4xx || CONFIG_BOOKE) */

do_work: /* r10 contains MSR_KERNEL here */
Expand Down Expand Up @@ -926,4 +934,8 @@ END_FTR_SECTION_IFSET(CPU_FTR_601)
/* shouldn't return */
b 4b

.comm ee_restarts,4
.section .bss
.align 2
ee_restarts:
.space 4
.previous
20 changes: 16 additions & 4 deletions arch/ppc/mm/hashtable.S
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
#include <asm/asm-offsets.h>

#ifdef CONFIG_SMP
.comm mmu_hash_lock,4
.section .bss
.align 2
.globl mmu_hash_lock
mmu_hash_lock:
.space 4
#endif /* CONFIG_SMP */

/*
Expand Down Expand Up @@ -461,9 +465,17 @@ found_slot:
sync /* make sure pte updates get to memory */
blr

.comm next_slot,4
.comm primary_pteg_full,4
.comm htab_hash_searches,4
.section .bss
.align 2
next_slot:
.space 4
.globl primary_pteg_full
primary_pteg_full:
.space 4
.globl htab_hash_searches
htab_hash_searches:
.space 4
.previous

/*
* Flush the entry for a particular page from the hash table.
Expand Down

0 comments on commit 9c05e63

Please sign in to comment.