diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-arm/arch-pxa/pxafb.h | 1 | ||||
-rw-r--r-- | include/asm-arm/arch-s3c2410/io.h | 58 | ||||
-rw-r--r-- | include/linux/acct.h | 4 | ||||
-rw-r--r-- | include/linux/cpumask.h | 12 |
4 files changed, 57 insertions, 18 deletions
diff --git a/include/asm-arm/arch-pxa/pxafb.h b/include/asm-arm/arch-pxa/pxafb.h index 21c0e16dce5f..aba9b30f4249 100644 --- a/include/asm-arm/arch-pxa/pxafb.h +++ b/include/asm-arm/arch-pxa/pxafb.h | |||
@@ -66,4 +66,5 @@ struct pxafb_mach_info { | |||
66 | 66 | ||
67 | }; | 67 | }; |
68 | void set_pxa_fb_info(struct pxafb_mach_info *hard_pxa_fb_info); | 68 | void set_pxa_fb_info(struct pxafb_mach_info *hard_pxa_fb_info); |
69 | void set_pxa_fb_parent(struct device *parent_dev); | ||
69 | unsigned long pxafb_get_hsync_time(struct device *dev); | 70 | unsigned long pxafb_get_hsync_time(struct device *dev); |
diff --git a/include/asm-arm/arch-s3c2410/io.h b/include/asm-arm/arch-s3c2410/io.h index 418233a7ee6f..4bf272ed9add 100644 --- a/include/asm-arm/arch-s3c2410/io.h +++ b/include/asm-arm/arch-s3c2410/io.h | |||
@@ -9,7 +9,7 @@ | |||
9 | * 06-Dec-1997 RMK Created. | 9 | * 06-Dec-1997 RMK Created. |
10 | * 02-Sep-2003 BJD Modified for S3C2410 | 10 | * 02-Sep-2003 BJD Modified for S3C2410 |
11 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | 11 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA |
12 | * | 12 | * 13-Oct-2005 BJD Fixed problems with LDRH/STRH offset range |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #ifndef __ASM_ARM_ARCH_IO_H | 15 | #ifndef __ASM_ARM_ARCH_IO_H |
@@ -97,7 +97,7 @@ DECLARE_IO(int,l,"") | |||
97 | else \ | 97 | else \ |
98 | __asm__ __volatile__( \ | 98 | __asm__ __volatile__( \ |
99 | "strb %0, [%1, #0] @ outbc" \ | 99 | "strb %0, [%1, #0] @ outbc" \ |
100 | : : "r" (value), "r" ((port))); \ | 100 | : : "r" (value), "r" ((port))); \ |
101 | }) | 101 | }) |
102 | 102 | ||
103 | #define __inbc(port) \ | 103 | #define __inbc(port) \ |
@@ -110,35 +110,61 @@ DECLARE_IO(int,l,"") | |||
110 | else \ | 110 | else \ |
111 | __asm__ __volatile__( \ | 111 | __asm__ __volatile__( \ |
112 | "ldrb %0, [%1, #0] @ inbc" \ | 112 | "ldrb %0, [%1, #0] @ inbc" \ |
113 | : "=r" (result) : "r" ((port))); \ | 113 | : "=r" (result) : "r" ((port))); \ |
114 | result; \ | 114 | result; \ |
115 | }) | 115 | }) |
116 | 116 | ||
117 | #define __outwc(value,port) \ | 117 | #define __outwc(value,port) \ |
118 | ({ \ | 118 | ({ \ |
119 | unsigned long v = value; \ | 119 | unsigned long v = value; \ |
120 | if (__PORT_PCIO((port))) \ | 120 | if (__PORT_PCIO((port))) { \ |
121 | __asm__ __volatile__( \ | 121 | if ((port) < 256 && (port) > -256) \ |
122 | "strh %0, [%1, %2] @ outwc" \ | 122 | __asm__ __volatile__( \ |
123 | : : "r" (v), "r" (PCIO_BASE), "Jr" ((port))); \ | 123 | "strh %0, [%1, %2] @ outwc" \ |
124 | else \ | 124 | : : "r" (v), "r" (PCIO_BASE), "Jr" ((port))); \ |
125 | else if ((port) > 0) \ | ||
126 | __asm__ __volatile__( \ | ||
127 | "strh %0, [%1, %2] @ outwc" \ | ||
128 | : : "r" (v), \ | ||
129 | "r" (PCIO_BASE + ((port) & ~0xff)), \ | ||
130 | "Jr" (((port) & 0xff))); \ | ||
131 | else \ | ||
132 | __asm__ __volatile__( \ | ||
133 | "strh %0, [%1, #0] @ outwc" \ | ||
134 | : : "r" (v), \ | ||
135 | "r" (PCIO_BASE + (port))); \ | ||
136 | } else \ | ||
125 | __asm__ __volatile__( \ | 137 | __asm__ __volatile__( \ |
126 | "strh %0, [%1, #0] @ outwc" \ | 138 | "strh %0, [%1, #0] @ outwc" \ |
127 | : : "r" (v), "r" ((port))); \ | 139 | : : "r" (v), "r" ((port))); \ |
128 | }) | 140 | }) |
129 | 141 | ||
130 | #define __inwc(port) \ | 142 | #define __inwc(port) \ |
131 | ({ \ | 143 | ({ \ |
132 | unsigned short result; \ | 144 | unsigned short result; \ |
133 | if (__PORT_PCIO((port))) \ | 145 | if (__PORT_PCIO((port))) { \ |
134 | __asm__ __volatile__( \ | 146 | if ((port) < 256 && (port) > -256 ) \ |
135 | "ldrh %0, [%1, %2] @ inwc" \ | 147 | __asm__ __volatile__( \ |
136 | : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port))); \ | 148 | "ldrh %0, [%1, %2] @ inwc" \ |
137 | else \ | 149 | : "=r" (result) \ |
150 | : "r" (PCIO_BASE), \ | ||
151 | "Jr" ((port))); \ | ||
152 | else if ((port) > 0) \ | ||
153 | __asm__ __volatile__( \ | ||
154 | "ldrh %0, [%1, %2] @ inwc" \ | ||
155 | : "=r" (result) \ | ||
156 | : "r" (PCIO_BASE + ((port) & ~0xff)), \ | ||
157 | "Jr" (((port) & 0xff))); \ | ||
158 | else \ | ||
159 | __asm__ __volatile__( \ | ||
160 | "ldrh %0, [%1, #0] @ inwc" \ | ||
161 | : "=r" (result) \ | ||
162 | : "r" (PCIO_BASE + ((port)))); \ | ||
163 | } else \ | ||
138 | __asm__ __volatile__( \ | 164 | __asm__ __volatile__( \ |
139 | "ldrh %0, [%1, #0] @ inwc" \ | 165 | "ldrh %0, [%1, #0] @ inwc" \ |
140 | : "=r" (result) : "r" ((port))); \ | 166 | : "=r" (result) : "r" ((port))); \ |
141 | result; \ | 167 | result; \ |
142 | }) | 168 | }) |
143 | 169 | ||
144 | #define __outlc(value,port) \ | 170 | #define __outlc(value,port) \ |
diff --git a/include/linux/acct.h b/include/linux/acct.h index 1993a3691768..19f70462b3be 100644 --- a/include/linux/acct.h +++ b/include/linux/acct.h | |||
@@ -162,13 +162,13 @@ typedef struct acct acct_t; | |||
162 | #ifdef __KERNEL__ | 162 | #ifdef __KERNEL__ |
163 | /* | 163 | /* |
164 | * Yet another set of HZ to *HZ helper functions. | 164 | * Yet another set of HZ to *HZ helper functions. |
165 | * See <linux/times.h> for the original. | 165 | * See <linux/jiffies.h> for the original. |
166 | */ | 166 | */ |
167 | 167 | ||
168 | static inline u32 jiffies_to_AHZ(unsigned long x) | 168 | static inline u32 jiffies_to_AHZ(unsigned long x) |
169 | { | 169 | { |
170 | #if (TICK_NSEC % (NSEC_PER_SEC / AHZ)) == 0 | 170 | #if (TICK_NSEC % (NSEC_PER_SEC / AHZ)) == 0 |
171 | return x / (HZ / USER_HZ); | 171 | return x / (HZ / AHZ); |
172 | #else | 172 | #else |
173 | u64 tmp = (u64)x * TICK_NSEC; | 173 | u64 tmp = (u64)x * TICK_NSEC; |
174 | do_div(tmp, (NSEC_PER_SEC / AHZ)); | 174 | do_div(tmp, (NSEC_PER_SEC / AHZ)); |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index b15826f6e3a2..fe9778301d07 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -392,4 +392,16 @@ extern cpumask_t cpu_present_map; | |||
392 | #define for_each_online_cpu(cpu) for_each_cpu_mask((cpu), cpu_online_map) | 392 | #define for_each_online_cpu(cpu) for_each_cpu_mask((cpu), cpu_online_map) |
393 | #define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map) | 393 | #define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map) |
394 | 394 | ||
395 | /* Find the highest possible smp_processor_id() */ | ||
396 | static inline unsigned int highest_possible_processor_id(void) | ||
397 | { | ||
398 | unsigned int cpu, highest = 0; | ||
399 | |||
400 | for_each_cpu_mask(cpu, cpu_possible_map) | ||
401 | highest = cpu; | ||
402 | |||
403 | return highest; | ||
404 | } | ||
405 | |||
406 | |||
395 | #endif /* __LINUX_CPUMASK_H */ | 407 | #endif /* __LINUX_CPUMASK_H */ |