Commit c06078f7 authored by Tom Rini's avatar Tom Rini

PPC32: Remove extra __KERNEL__ checks in some headers, as well

as adding /* __KERNEL__ */ to the #endif of others.
parent 35e8ddd5
...@@ -236,8 +236,6 @@ static __inline__ int ffz(unsigned long x) ...@@ -236,8 +236,6 @@ static __inline__ int ffz(unsigned long x)
return __ilog2(x & -x); return __ilog2(x & -x);
} }
#ifdef __KERNEL__
static inline int __ffs(unsigned long x) static inline int __ffs(unsigned long x)
{ {
return __ilog2(x & -x); return __ilog2(x & -x);
...@@ -274,8 +272,6 @@ static __inline__ int fls(unsigned int x) ...@@ -274,8 +272,6 @@ static __inline__ int fls(unsigned int x)
#define hweight16(x) generic_hweight16(x) #define hweight16(x) generic_hweight16(x)
#define hweight8(x) generic_hweight8(x) #define hweight8(x) generic_hweight8(x)
#endif /* __KERNEL__ */
/* /*
* Find the first bit set in a 140-bit bitmap. * Find the first bit set in a 140-bit bitmap.
* The first 100 bits are unlikely to be set. * The first 100 bits are unlikely to be set.
...@@ -395,8 +391,6 @@ static __inline__ unsigned long find_next_zero_bit(unsigned long * addr, ...@@ -395,8 +391,6 @@ static __inline__ unsigned long find_next_zero_bit(unsigned long * addr,
} }
#ifdef __KERNEL__
#define ext2_set_bit(nr, addr) __test_and_set_bit((nr) ^ 0x18, (unsigned long *)(addr)) #define ext2_set_bit(nr, addr) __test_and_set_bit((nr) ^ 0x18, (unsigned long *)(addr))
#define ext2_clear_bit(nr, addr) __test_and_clear_bit((nr) ^ 0x18, (unsigned long *)(addr)) #define ext2_clear_bit(nr, addr) __test_and_clear_bit((nr) ^ 0x18, (unsigned long *)(addr))
...@@ -460,7 +454,5 @@ static __inline__ unsigned long ext2_find_next_zero_bit(void *addr, ...@@ -460,7 +454,5 @@ static __inline__ unsigned long ext2_find_next_zero_bit(void *addr,
#define minix_test_bit(nr,addr) ext2_test_bit(nr,addr) #define minix_test_bit(nr,addr) ext2_test_bit(nr,addr)
#define minix_find_first_zero_bit(addr,size) ext2_find_first_zero_bit(addr,size) #define minix_find_first_zero_bit(addr,size) ext2_find_first_zero_bit(addr,size)
#endif /* __KERNEL__ */
#endif /* _PPC_BITOPS_H */ #endif /* _PPC_BITOPS_H */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
...@@ -39,12 +39,11 @@ ...@@ -39,12 +39,11 @@
__section__(".data.cacheline_aligned"))) __section__(".data.cacheline_aligned")))
#endif #endif
#if defined(__KERNEL__) && !defined(__ASSEMBLY__) #ifndef __ASSEMBLY__
extern void clean_dcache_range(unsigned long start, unsigned long stop); extern void clean_dcache_range(unsigned long start, unsigned long stop);
extern void flush_dcache_range(unsigned long start, unsigned long stop); extern void flush_dcache_range(unsigned long start, unsigned long stop);
extern void invalidate_dcache_range(unsigned long start, unsigned long stop); extern void invalidate_dcache_range(unsigned long start, unsigned long stop);
extern void flush_dcache_all(void); extern void flush_dcache_all(void);
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
/* prep registers for L2 */ /* prep registers for L2 */
......
...@@ -193,7 +193,6 @@ extern void _outsl_ns(volatile u32 *port, const void *buf, int nl); ...@@ -193,7 +193,6 @@ extern void _outsl_ns(volatile u32 *port, const void *buf, int nl);
#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) #define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c))
#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) #define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c))
#ifdef __KERNEL__
/* /*
* Map in an area of physical address space, for accessing * Map in an area of physical address space, for accessing
* I/O devices etc. * I/O devices etc.
...@@ -265,8 +264,6 @@ extern inline void * phys_to_virt(unsigned long address) ...@@ -265,8 +264,6 @@ extern inline void * phys_to_virt(unsigned long address)
#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
#define page_to_bus(page) (page_to_phys(page) + PCI_DRAM_OFFSET) #define page_to_bus(page) (page_to_phys(page) + PCI_DRAM_OFFSET)
#endif /* __KERNEL__ */
/* /*
* Enforce In-order Execution of I/O: * Enforce In-order Execution of I/O:
* Acts as a barrier to ensure all previous I/O accesses have * Acts as a barrier to ensure all previous I/O accesses have
......
...@@ -31,8 +31,6 @@ enum { ...@@ -31,8 +31,6 @@ enum {
pmac_nvram_NR /* MacOS Name Registry partition */ pmac_nvram_NR /* MacOS Name Registry partition */
}; };
#ifdef __KERNEL__
/* Return partition offset in nvram */ /* Return partition offset in nvram */
extern int pmac_get_partition(int partition); extern int pmac_get_partition(int partition);
...@@ -40,8 +38,6 @@ extern int pmac_get_partition(int partition); ...@@ -40,8 +38,6 @@ extern int pmac_get_partition(int partition);
extern u8 pmac_xpram_read(int xpaddr); extern u8 pmac_xpram_read(int xpaddr);
extern void pmac_xpram_write(int xpaddr, u8 data); extern void pmac_xpram_write(int xpaddr, u8 data);
#endif /* __KERNEL__ */
/* Some offsets in XPRAM */ /* Some offsets in XPRAM */
#define PMAC_XPRAM_MACHINE_LOC 0xe4 #define PMAC_XPRAM_MACHINE_LOC 0xe4
#define PMAC_XPRAM_SOUND_VOLUME 0x08 #define PMAC_XPRAM_SOUND_VOLUME 0x08
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#define HZ 100 /* internal timer frequency */ #define HZ 100 /* internal timer frequency */
#define USER_HZ 100 /* for user interfaces in "ticks" */ #define USER_HZ 100 /* for user interfaces in "ticks" */
#define CLOCKS_PER_SEC (USER_HZ) /* frequency at which times() counts */ #define CLOCKS_PER_SEC (USER_HZ) /* frequency at which times() counts */
#endif #endif /* __KERNEL__ */
#define EXEC_PAGESIZE 4096 #define EXEC_PAGESIZE 4096
......
...@@ -111,7 +111,7 @@ typedef struct { ...@@ -111,7 +111,7 @@ typedef struct {
#define SA_PROBE SA_ONESHOT #define SA_PROBE SA_ONESHOT
#define SA_SAMPLE_RANDOM SA_RESTART #define SA_SAMPLE_RANDOM SA_RESTART
#define SA_SHIRQ 0x04000000 #define SA_SHIRQ 0x04000000
#endif #endif /* __KERNEL__ */
#define SIG_BLOCK 0 /* for blocking signals */ #define SIG_BLOCK 0 /* for blocking signals */
#define SIG_UNBLOCK 1 /* for unblocking signals */ #define SIG_UNBLOCK 1 /* for unblocking signals */
...@@ -150,7 +150,6 @@ typedef struct sigaltstack { ...@@ -150,7 +150,6 @@ typedef struct sigaltstack {
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <asm/sigcontext.h> #include <asm/sigcontext.h>
#endif /* __KERNEL__ */
#endif
#endif #endif
...@@ -65,6 +65,6 @@ ...@@ -65,6 +65,6 @@
/* other similar things on the */ /* other similar things on the */
/* user level. */ /* user level. */
#define SOCK_MAX (SOCK_PACKET+1) #define SOCK_MAX (SOCK_PACKET+1)
#endif #endif /* __KERNEL__ */
#endif /* _ASM_SOCKET_H */ #endif /* _ASM_SOCKET_H */
...@@ -153,7 +153,7 @@ struct termio { ...@@ -153,7 +153,7 @@ struct termio {
#ifdef __KERNEL__ #ifdef __KERNEL__
/* ^C ^\ del ^U ^D 1 0 0 0 0 ^W ^R ^Z ^Q ^S ^V ^U */ /* ^C ^\ del ^U ^D 1 0 0 0 0 ^W ^R ^Z ^Q ^S ^V ^U */
#define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025" #define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025"
#endif #endif /* __KERNEL__ */
/* modem lines */ /* modem lines */
#define TIOCM_LE 0x001 #define TIOCM_LE 0x001
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment