Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] powerpc: Merge simplified sections.h into asm-powerpc

Here is a new patch that removes all notion of the pmac, prep,
chrp and openfirmware initialization sections, and then unifies
the sections.h files without those __pmac, etc, sections identifiers
cluttering things up.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by

Jon Loeliger and committed by
Paul Mackerras
fbcd54b1 6c45ab99

+20 -62
+20
include/asm-powerpc/sections.h
··· 1 + #ifndef _ASM_POWERPC_SECTIONS_H 2 + #define _ASM_POWERPC_SECTIONS_H 3 + 4 + #include <asm-generic/sections.h> 5 + 6 + #ifdef __powerpc64__ 7 + 8 + extern char _end[]; 9 + 10 + static inline int in_kernel_text(unsigned long addr) 11 + { 12 + if (addr >= (unsigned long)_stext && addr < (unsigned long)__init_end) 13 + return 1; 14 + 15 + return 0; 16 + } 17 + 18 + #endif 19 + 20 + #endif /* _ASM_POWERPC_SECTIONS_H */
-33
include/asm-ppc/sections.h
··· 1 - #ifdef __KERNEL__ 2 - #ifndef _PPC_SECTIONS_H 3 - #define _PPC_SECTIONS_H 4 - 5 - #include <asm-generic/sections.h> 6 - 7 - #define __pmac __attribute__ ((__section__ (".pmac.text"))) 8 - #define __pmacdata __attribute__ ((__section__ (".pmac.data"))) 9 - #define __pmacfunc(__argpmac) \ 10 - __argpmac __pmac; \ 11 - __argpmac 12 - 13 - #define __prep __attribute__ ((__section__ (".prep.text"))) 14 - #define __prepdata __attribute__ ((__section__ (".prep.data"))) 15 - #define __prepfunc(__argprep) \ 16 - __argprep __prep; \ 17 - __argprep 18 - 19 - #define __chrp __attribute__ ((__section__ (".chrp.text"))) 20 - #define __chrpdata __attribute__ ((__section__ (".chrp.data"))) 21 - #define __chrpfunc(__argchrp) \ 22 - __argchrp __chrp; \ 23 - __argchrp 24 - 25 - /* this is actually just common chrp/pmac code, not OF code -- Cort */ 26 - #define __openfirmware __attribute__ ((__section__ (".openfirmware.text"))) 27 - #define __openfirmwaredata __attribute__ ((__section__ (".openfirmware.data"))) 28 - #define __openfirmwarefunc(__argopenfirmware) \ 29 - __argopenfirmware __openfirmware; \ 30 - __argopenfirmware 31 - 32 - #endif /* _PPC_SECTIONS_H */ 33 - #endif /* __KERNEL__ */
-29
include/asm-ppc64/sections.h
··· 1 - #ifndef _PPC64_SECTIONS_H 2 - #define _PPC64_SECTIONS_H 3 - 4 - extern char _end[]; 5 - 6 - #include <asm-generic/sections.h> 7 - 8 - #define __pmac 9 - #define __pmacdata 10 - 11 - #define __prep 12 - #define __prepdata 13 - 14 - #define __chrp 15 - #define __chrpdata 16 - 17 - #define __openfirmware 18 - #define __openfirmwaredata 19 - 20 - 21 - static inline int in_kernel_text(unsigned long addr) 22 - { 23 - if (addr >= (unsigned long)_stext && addr < (unsigned long)__init_end) 24 - return 1; 25 - 26 - return 0; 27 - } 28 - 29 - #endif