diff options
-rw-r--r-- | arch/avr32/include/asm/bugs.h | 2 | ||||
-rw-r--r-- | arch/avr32/include/asm/processor.h | 7 | ||||
-rw-r--r-- | arch/avr32/kernel/cpu.c | 48 | ||||
-rw-r--r-- | arch/avr32/mm/cache.c | 1 |
4 files changed, 29 insertions, 29 deletions
diff --git a/arch/avr32/include/asm/bugs.h b/arch/avr32/include/asm/bugs.h index 7635e770622e..278661bbd1b0 100644 --- a/arch/avr32/include/asm/bugs.h +++ b/arch/avr32/include/asm/bugs.h | |||
@@ -9,7 +9,7 @@ | |||
9 | 9 | ||
10 | static void __init check_bugs(void) | 10 | static void __init check_bugs(void) |
11 | { | 11 | { |
12 | cpu_data->loops_per_jiffy = loops_per_jiffy; | 12 | boot_cpu_data.loops_per_jiffy = loops_per_jiffy; |
13 | } | 13 | } |
14 | 14 | ||
15 | #endif /* __ASM_AVR32_BUGS_H */ | 15 | #endif /* __ASM_AVR32_BUGS_H */ |
diff --git a/arch/avr32/include/asm/processor.h b/arch/avr32/include/asm/processor.h index 48d71c5c898a..972adcc1e8f4 100644 --- a/arch/avr32/include/asm/processor.h +++ b/arch/avr32/include/asm/processor.h | |||
@@ -83,13 +83,8 @@ static inline unsigned int avr32_get_chip_revision(struct avr32_cpuinfo *cpu) | |||
83 | 83 | ||
84 | extern struct avr32_cpuinfo boot_cpu_data; | 84 | extern struct avr32_cpuinfo boot_cpu_data; |
85 | 85 | ||
86 | #ifdef CONFIG_SMP | 86 | /* No SMP support so far */ |
87 | extern struct avr32_cpuinfo cpu_data[]; | ||
88 | #define current_cpu_data cpu_data[smp_processor_id()] | ||
89 | #else | ||
90 | #define cpu_data (&boot_cpu_data) | ||
91 | #define current_cpu_data boot_cpu_data | 87 | #define current_cpu_data boot_cpu_data |
92 | #endif | ||
93 | 88 | ||
94 | /* This decides where the kernel will search for a free chunk of vm | 89 | /* This decides where the kernel will search for a free chunk of vm |
95 | * space during mmap's | 90 | * space during mmap's |
diff --git a/arch/avr32/kernel/cpu.c b/arch/avr32/kernel/cpu.c index 2233be71e2e8..0341ae27c9ec 100644 --- a/arch/avr32/kernel/cpu.c +++ b/arch/avr32/kernel/cpu.c | |||
@@ -39,10 +39,12 @@ static ssize_t store_pc0event(struct device *dev, | |||
39 | size_t count) | 39 | size_t count) |
40 | { | 40 | { |
41 | unsigned long val; | 41 | unsigned long val; |
42 | char *endp; | 42 | int ret; |
43 | 43 | ||
44 | val = simple_strtoul(buf, &endp, 0); | 44 | ret = kstrtoul(buf, 0, &val); |
45 | if (endp == buf || val > 0x3f) | 45 | if (ret) |
46 | return ret; | ||
47 | if (val > 0x3f) | ||
46 | return -EINVAL; | 48 | return -EINVAL; |
47 | val = (val << 12) | (sysreg_read(PCCR) & 0xfffc0fff); | 49 | val = (val << 12) | (sysreg_read(PCCR) & 0xfffc0fff); |
48 | sysreg_write(PCCR, val); | 50 | sysreg_write(PCCR, val); |
@@ -61,11 +63,11 @@ static ssize_t store_pc0count(struct device *dev, | |||
61 | const char *buf, size_t count) | 63 | const char *buf, size_t count) |
62 | { | 64 | { |
63 | unsigned long val; | 65 | unsigned long val; |
64 | char *endp; | 66 | int ret; |
65 | 67 | ||
66 | val = simple_strtoul(buf, &endp, 0); | 68 | ret = kstrtoul(buf, 0, &val); |
67 | if (endp == buf) | 69 | if (ret) |
68 | return -EINVAL; | 70 | return ret; |
69 | sysreg_write(PCNT0, val); | 71 | sysreg_write(PCNT0, val); |
70 | 72 | ||
71 | return count; | 73 | return count; |
@@ -84,10 +86,12 @@ static ssize_t store_pc1event(struct device *dev, | |||
84 | size_t count) | 86 | size_t count) |
85 | { | 87 | { |
86 | unsigned long val; | 88 | unsigned long val; |
87 | char *endp; | 89 | int ret; |
88 | 90 | ||
89 | val = simple_strtoul(buf, &endp, 0); | 91 | ret = kstrtoul(buf, 0, &val); |
90 | if (endp == buf || val > 0x3f) | 92 | if (ret) |
93 | return ret; | ||
94 | if (val > 0x3f) | ||
91 | return -EINVAL; | 95 | return -EINVAL; |
92 | val = (val << 18) | (sysreg_read(PCCR) & 0xff03ffff); | 96 | val = (val << 18) | (sysreg_read(PCCR) & 0xff03ffff); |
93 | sysreg_write(PCCR, val); | 97 | sysreg_write(PCCR, val); |
@@ -106,11 +110,11 @@ static ssize_t store_pc1count(struct device *dev, | |||
106 | size_t count) | 110 | size_t count) |
107 | { | 111 | { |
108 | unsigned long val; | 112 | unsigned long val; |
109 | char *endp; | 113 | int ret; |
110 | 114 | ||
111 | val = simple_strtoul(buf, &endp, 0); | 115 | ret = kstrtoul(buf, 0, &val); |
112 | if (endp == buf) | 116 | if (ret) |
113 | return -EINVAL; | 117 | return ret; |
114 | sysreg_write(PCNT1, val); | 118 | sysreg_write(PCNT1, val); |
115 | 119 | ||
116 | return count; | 120 | return count; |
@@ -129,11 +133,11 @@ static ssize_t store_pccycles(struct device *dev, | |||
129 | size_t count) | 133 | size_t count) |
130 | { | 134 | { |
131 | unsigned long val; | 135 | unsigned long val; |
132 | char *endp; | 136 | int ret; |
133 | 137 | ||
134 | val = simple_strtoul(buf, &endp, 0); | 138 | ret = kstrtoul(buf, 0, &val); |
135 | if (endp == buf) | 139 | if (ret) |
136 | return -EINVAL; | 140 | return ret; |
137 | sysreg_write(PCCNT, val); | 141 | sysreg_write(PCCNT, val); |
138 | 142 | ||
139 | return count; | 143 | return count; |
@@ -152,11 +156,11 @@ static ssize_t store_pcenable(struct device *dev, | |||
152 | size_t count) | 156 | size_t count) |
153 | { | 157 | { |
154 | unsigned long pccr, val; | 158 | unsigned long pccr, val; |
155 | char *endp; | 159 | int ret; |
156 | 160 | ||
157 | val = simple_strtoul(buf, &endp, 0); | 161 | ret = kstrtoul(buf, 0, &val); |
158 | if (endp == buf) | 162 | if (ret) |
159 | return -EINVAL; | 163 | return ret; |
160 | if (val) | 164 | if (val) |
161 | val = 1; | 165 | val = 1; |
162 | 166 | ||
diff --git a/arch/avr32/mm/cache.c b/arch/avr32/mm/cache.c index 6a46ecd56cfd..85d635cd7b28 100644 --- a/arch/avr32/mm/cache.c +++ b/arch/avr32/mm/cache.c | |||
@@ -111,6 +111,7 @@ void flush_icache_range(unsigned long start, unsigned long end) | |||
111 | __flush_icache_range(start & ~(linesz - 1), | 111 | __flush_icache_range(start & ~(linesz - 1), |
112 | (end + linesz - 1) & ~(linesz - 1)); | 112 | (end + linesz - 1) & ~(linesz - 1)); |
113 | } | 113 | } |
114 | EXPORT_SYMBOL(flush_icache_range); | ||
114 | 115 | ||
115 | /* | 116 | /* |
116 | * This one is called from __do_fault() and do_swap_page(). | 117 | * This one is called from __do_fault() and do_swap_page(). |