aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-blackfin/processor.h4
-rw-r--r--include/asm-ppc/time.h2
-rw-r--r--include/linux/compiler-gcc.h12
-rw-r--r--include/linux/compiler.h14
4 files changed, 14 insertions, 18 deletions
diff --git a/include/asm-blackfin/processor.h b/include/asm-blackfin/processor.h
index 6bb3e0d4705d..c571e958558c 100644
--- a/include/asm-blackfin/processor.h
+++ b/include/asm-blackfin/processor.h
@@ -104,13 +104,13 @@ unsigned long get_wchan(struct task_struct *p);
104#define cpu_relax() barrier() 104#define cpu_relax() barrier()
105 105
106/* Get the Silicon Revision of the chip */ 106/* Get the Silicon Revision of the chip */
107static inline __attribute_pure__ uint32_t bfin_revid(void) 107static inline uint32_t __pure bfin_revid(void)
108{ 108{
109 /* stored in the upper 4 bits */ 109 /* stored in the upper 4 bits */
110 return bfin_read_CHIPID() >> 28; 110 return bfin_read_CHIPID() >> 28;
111} 111}
112 112
113static inline __attribute_pure__ uint32_t bfin_compiled_revid(void) 113static inline uint32_t __pure bfin_compiled_revid(void)
114{ 114{
115#if defined(CONFIG_BF_REV_0_0) 115#if defined(CONFIG_BF_REV_0_0)
116 return 0; 116 return 0;
diff --git a/include/asm-ppc/time.h b/include/asm-ppc/time.h
index f7eadf6ac806..81dbcd43a501 100644
--- a/include/asm-ppc/time.h
+++ b/include/asm-ppc/time.h
@@ -57,7 +57,7 @@ static __inline__ void set_dec(unsigned int val)
57/* Accessor functions for the timebase (RTC on 601) registers. */ 57/* Accessor functions for the timebase (RTC on 601) registers. */
58/* If one day CONFIG_POWER is added just define __USE_RTC as 1 */ 58/* If one day CONFIG_POWER is added just define __USE_RTC as 1 */
59#ifdef CONFIG_6xx 59#ifdef CONFIG_6xx
60extern __inline__ int __attribute_pure__ __USE_RTC(void) { 60extern __inline__ int __pure __USE_RTC(void) {
61 return (mfspr(SPRN_PVR)>>16) == 1; 61 return (mfspr(SPRN_PVR)>>16) == 1;
62} 62}
63#else 63#else
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index acd583384bd9..fe23792f05c1 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -36,10 +36,20 @@
36#define __weak __attribute__((weak)) 36#define __weak __attribute__((weak))
37#define __naked __attribute__((naked)) 37#define __naked __attribute__((naked))
38#define __noreturn __attribute__((noreturn)) 38#define __noreturn __attribute__((noreturn))
39
40/*
41 * From the GCC manual:
42 *
43 * Many functions have no effects except the return value and their
44 * return value depends only on the parameters and/or global
45 * variables. Such a function can be subject to common subexpression
46 * elimination and loop optimization just as an arithmetic operator
47 * would be.
48 * [...]
49 */
39#define __pure __attribute__((pure)) 50#define __pure __attribute__((pure))
40#define __aligned(x) __attribute__((aligned(x))) 51#define __aligned(x) __attribute__((aligned(x)))
41#define __printf(a,b) __attribute__((format(printf,a,b))) 52#define __printf(a,b) __attribute__((format(printf,a,b)))
42#define noinline __attribute__((noinline)) 53#define noinline __attribute__((noinline))
43#define __attribute_pure__ __attribute__((pure))
44#define __attribute_const__ __attribute__((__const__)) 54#define __attribute_const__ __attribute__((__const__))
45#define __maybe_unused __attribute__((unused)) 55#define __maybe_unused __attribute__((unused))
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 86f9a3a6137d..c811c8b979ac 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -132,20 +132,6 @@ extern void __chk_io_ptr(const volatile void __iomem *);
132# define __maybe_unused /* unimplemented */ 132# define __maybe_unused /* unimplemented */
133#endif 133#endif
134 134
135/*
136 * From the GCC manual:
137 *
138 * Many functions have no effects except the return value and their
139 * return value depends only on the parameters and/or global
140 * variables. Such a function can be subject to common subexpression
141 * elimination and loop optimization just as an arithmetic operator
142 * would be.
143 * [...]
144 */
145#ifndef __attribute_pure__
146# define __attribute_pure__ /* unimplemented */
147#endif
148
149#ifndef noinline 135#ifndef noinline
150#define noinline 136#define noinline
151#endif 137#endif