diff options
Diffstat (limited to 'arch')
384 files changed, 6886 insertions, 1848 deletions
diff --git a/arch/cris/kernel/irq.c b/arch/cris/kernel/irq.c index 30deaf1b728a..b504def3e346 100644 --- a/arch/cris/kernel/irq.c +++ b/arch/cris/kernel/irq.c | |||
@@ -52,9 +52,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
52 | 52 | ||
53 | if (i == 0) { | 53 | if (i == 0) { |
54 | seq_printf(p, " "); | 54 | seq_printf(p, " "); |
55 | for (j=0; j<NR_CPUS; j++) | 55 | for_each_online_cpu(j) |
56 | if (cpu_online(j)) | 56 | seq_printf(p, "CPU%d ",j); |
57 | seq_printf(p, "CPU%d ",j); | ||
58 | seq_putc(p, '\n'); | 57 | seq_putc(p, '\n'); |
59 | } | 58 | } |
60 | 59 | ||
@@ -67,9 +66,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
67 | #ifndef CONFIG_SMP | 66 | #ifndef CONFIG_SMP |
68 | seq_printf(p, "%10u ", kstat_irqs(i)); | 67 | seq_printf(p, "%10u ", kstat_irqs(i)); |
69 | #else | 68 | #else |
70 | for (j = 0; j < NR_CPUS; j++) | 69 | for_each_online_cpu(j) |
71 | if (cpu_online(j)) | 70 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); |
72 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); | ||
73 | #endif | 71 | #endif |
74 | seq_printf(p, " %14s", irq_desc[i].handler->typename); | 72 | seq_printf(p, " %14s", irq_desc[i].handler->typename); |
75 | seq_printf(p, " %s", action->name); | 73 | seq_printf(p, " %s", action->name); |
diff --git a/arch/frv/kernel/irq.c b/arch/frv/kernel/irq.c index 27ab4c30aac6..11fa326a8f62 100644 --- a/arch/frv/kernel/irq.c +++ b/arch/frv/kernel/irq.c | |||
@@ -75,9 +75,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
75 | switch (i) { | 75 | switch (i) { |
76 | case 0: | 76 | case 0: |
77 | seq_printf(p, " "); | 77 | seq_printf(p, " "); |
78 | for (j = 0; j < NR_CPUS; j++) | 78 | for_each_online_cpu(j) |
79 | if (cpu_online(j)) | 79 | seq_printf(p, "CPU%d ",j); |
80 | seq_printf(p, "CPU%d ",j); | ||
81 | 80 | ||
82 | seq_putc(p, '\n'); | 81 | seq_putc(p, '\n'); |
83 | break; | 82 | break; |
@@ -100,9 +99,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
100 | #ifndef CONFIG_SMP | 99 | #ifndef CONFIG_SMP |
101 | seq_printf(p, "%10u ", kstat_irqs(i)); | 100 | seq_printf(p, "%10u ", kstat_irqs(i)); |
102 | #else | 101 | #else |
103 | for (j = 0; j < NR_CPUS; j++) | 102 | for_each_online_cpu(j) |
104 | if (cpu_online(j)) | 103 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i - 1]); |
105 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i - 1]); | ||
106 | #endif | 104 | #endif |
107 | 105 | ||
108 | level = group->sources[ix]->level - frv_irq_levels; | 106 | level = group->sources[ix]->level - frv_irq_levels; |
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index 5b1a7d46d1d9..bfea1bedcbf2 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig | |||
@@ -80,6 +80,7 @@ config X86_VOYAGER | |||
80 | 80 | ||
81 | config X86_NUMAQ | 81 | config X86_NUMAQ |
82 | bool "NUMAQ (IBM/Sequent)" | 82 | bool "NUMAQ (IBM/Sequent)" |
83 | select SMP | ||
83 | select NUMA | 84 | select NUMA |
84 | help | 85 | help |
85 | This option is used for getting Linux to run on a (IBM/Sequent) NUMA | 86 | This option is used for getting Linux to run on a (IBM/Sequent) NUMA |
@@ -400,6 +401,7 @@ choice | |||
400 | 401 | ||
401 | config NOHIGHMEM | 402 | config NOHIGHMEM |
402 | bool "off" | 403 | bool "off" |
404 | depends on !X86_NUMAQ | ||
403 | ---help--- | 405 | ---help--- |
404 | Linux can use up to 64 Gigabytes of physical memory on x86 systems. | 406 | Linux can use up to 64 Gigabytes of physical memory on x86 systems. |
405 | However, the address space of 32-bit x86 processors is only 4 | 407 | However, the address space of 32-bit x86 processors is only 4 |
@@ -436,6 +438,7 @@ config NOHIGHMEM | |||
436 | 438 | ||
437 | config HIGHMEM4G | 439 | config HIGHMEM4G |
438 | bool "4GB" | 440 | bool "4GB" |
441 | depends on !X86_NUMAQ | ||
439 | help | 442 | help |
440 | Select this if you have a 32-bit processor and between 1 and 4 | 443 | Select this if you have a 32-bit processor and between 1 and 4 |
441 | gigabytes of physical RAM. | 444 | gigabytes of physical RAM. |
@@ -503,10 +506,6 @@ config NUMA | |||
503 | default n if X86_PC | 506 | default n if X86_PC |
504 | default y if (X86_NUMAQ || X86_SUMMIT) | 507 | default y if (X86_NUMAQ || X86_SUMMIT) |
505 | 508 | ||
506 | # Need comments to help the hapless user trying to turn on NUMA support | ||
507 | comment "NUMA (NUMA-Q) requires SMP, 64GB highmem support" | ||
508 | depends on X86_NUMAQ && (!HIGHMEM64G || !SMP) | ||
509 | |||
510 | comment "NUMA (Summit) requires SMP, 64GB highmem support, ACPI" | 509 | comment "NUMA (Summit) requires SMP, 64GB highmem support, ACPI" |
511 | depends on X86_SUMMIT && (!HIGHMEM64G || !ACPI) | 510 | depends on X86_SUMMIT && (!HIGHMEM64G || !ACPI) |
512 | 511 | ||
@@ -660,13 +659,18 @@ config BOOT_IOREMAP | |||
660 | default y | 659 | default y |
661 | 660 | ||
662 | config REGPARM | 661 | config REGPARM |
663 | bool "Use register arguments (EXPERIMENTAL)" | 662 | bool "Use register arguments" |
664 | depends on EXPERIMENTAL | 663 | default y |
665 | default n | ||
666 | help | 664 | help |
667 | Compile the kernel with -mregparm=3. This uses a different ABI | 665 | Compile the kernel with -mregparm=3. This instructs gcc to use |
668 | and passes the first three arguments of a function call in registers. | 666 | a more efficient function call ABI which passes the first three |
669 | This will probably break binary only modules. | 667 | arguments of a function call via registers, which results in denser |
668 | and faster code. | ||
669 | |||
670 | If this option is disabled, then the default ABI of passing | ||
671 | arguments via the stack is used. | ||
672 | |||
673 | If unsure, say Y. | ||
670 | 674 | ||
671 | config SECCOMP | 675 | config SECCOMP |
672 | bool "Enable seccomp to safely compute untrusted bytecode" | 676 | bool "Enable seccomp to safely compute untrusted bytecode" |
diff --git a/arch/i386/Kconfig.debug b/arch/i386/Kconfig.debug index bf32ecc9ad04..00108ba9a78d 100644 --- a/arch/i386/Kconfig.debug +++ b/arch/i386/Kconfig.debug | |||
@@ -31,6 +31,15 @@ config DEBUG_STACK_USAGE | |||
31 | 31 | ||
32 | This option will slow down process creation somewhat. | 32 | This option will slow down process creation somewhat. |
33 | 33 | ||
34 | config STACK_BACKTRACE_COLS | ||
35 | int "Stack backtraces per line" if DEBUG_KERNEL | ||
36 | range 1 3 | ||
37 | default 2 | ||
38 | help | ||
39 | Selects how many stack backtrace entries per line to display. | ||
40 | |||
41 | This can save screen space when displaying traces. | ||
42 | |||
34 | comment "Page alloc debug is incompatible with Software Suspend on i386" | 43 | comment "Page alloc debug is incompatible with Software Suspend on i386" |
35 | depends on DEBUG_KERNEL && SOFTWARE_SUSPEND | 44 | depends on DEBUG_KERNEL && SOFTWARE_SUSPEND |
36 | 45 | ||
diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile index 65656c033d70..5b9ed21216cf 100644 --- a/arch/i386/kernel/Makefile +++ b/arch/i386/kernel/Makefile | |||
@@ -7,7 +7,7 @@ extra-y := head.o init_task.o vmlinux.lds | |||
7 | obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o \ | 7 | obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o \ |
8 | ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \ | 8 | ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \ |
9 | pci-dma.o i386_ksyms.o i387.o dmi_scan.o bootflag.o \ | 9 | pci-dma.o i386_ksyms.o i387.o dmi_scan.o bootflag.o \ |
10 | quirks.o i8237.o topology.o | 10 | quirks.o i8237.o topology.o alternative.o |
11 | 11 | ||
12 | obj-y += cpu/ | 12 | obj-y += cpu/ |
13 | obj-y += timers/ | 13 | obj-y += timers/ |
diff --git a/arch/i386/kernel/alternative.c b/arch/i386/kernel/alternative.c new file mode 100644 index 000000000000..5cbd6f99fb2a --- /dev/null +++ b/arch/i386/kernel/alternative.c | |||
@@ -0,0 +1,321 @@ | |||
1 | #include <linux/module.h> | ||
2 | #include <linux/spinlock.h> | ||
3 | #include <linux/list.h> | ||
4 | #include <asm/alternative.h> | ||
5 | #include <asm/sections.h> | ||
6 | |||
7 | #define DEBUG 0 | ||
8 | #if DEBUG | ||
9 | # define DPRINTK(fmt, args...) printk(fmt, args) | ||
10 | #else | ||
11 | # define DPRINTK(fmt, args...) | ||
12 | #endif | ||
13 | |||
14 | /* Use inline assembly to define this because the nops are defined | ||
15 | as inline assembly strings in the include files and we cannot | ||
16 | get them easily into strings. */ | ||
17 | asm("\t.data\nintelnops: " | ||
18 | GENERIC_NOP1 GENERIC_NOP2 GENERIC_NOP3 GENERIC_NOP4 GENERIC_NOP5 GENERIC_NOP6 | ||
19 | GENERIC_NOP7 GENERIC_NOP8); | ||
20 | asm("\t.data\nk8nops: " | ||
21 | K8_NOP1 K8_NOP2 K8_NOP3 K8_NOP4 K8_NOP5 K8_NOP6 | ||
22 | K8_NOP7 K8_NOP8); | ||
23 | asm("\t.data\nk7nops: " | ||
24 | K7_NOP1 K7_NOP2 K7_NOP3 K7_NOP4 K7_NOP5 K7_NOP6 | ||
25 | K7_NOP7 K7_NOP8); | ||
26 | |||
27 | extern unsigned char intelnops[], k8nops[], k7nops[]; | ||
28 | static unsigned char *intel_nops[ASM_NOP_MAX+1] = { | ||
29 | NULL, | ||
30 | intelnops, | ||
31 | intelnops + 1, | ||
32 | intelnops + 1 + 2, | ||
33 | intelnops + 1 + 2 + 3, | ||
34 | intelnops + 1 + 2 + 3 + 4, | ||
35 | intelnops + 1 + 2 + 3 + 4 + 5, | ||
36 | intelnops + 1 + 2 + 3 + 4 + 5 + 6, | ||
37 | intelnops + 1 + 2 + 3 + 4 + 5 + 6 + 7, | ||
38 | }; | ||
39 | static unsigned char *k8_nops[ASM_NOP_MAX+1] = { | ||
40 | NULL, | ||
41 | k8nops, | ||
42 | k8nops + 1, | ||
43 | k8nops + 1 + 2, | ||
44 | k8nops + 1 + 2 + 3, | ||
45 | k8nops + 1 + 2 + 3 + 4, | ||
46 | k8nops + 1 + 2 + 3 + 4 + 5, | ||
47 | k8nops + 1 + 2 + 3 + 4 + 5 + 6, | ||
48 | k8nops + 1 + 2 + 3 + 4 + 5 + 6 + 7, | ||
49 | }; | ||
50 | static unsigned char *k7_nops[ASM_NOP_MAX+1] = { | ||
51 | NULL, | ||
52 | k7nops, | ||
53 | k7nops + 1, | ||
54 | k7nops + 1 + 2, | ||
55 | k7nops + 1 + 2 + 3, | ||
56 | k7nops + 1 + 2 + 3 + 4, | ||
57 | k7nops + 1 + 2 + 3 + 4 + 5, | ||
58 | k7nops + 1 + 2 + 3 + 4 + 5 + 6, | ||
59 | k7nops + 1 + 2 + 3 + 4 + 5 + 6 + 7, | ||
60 | }; | ||
61 | static struct nop { | ||
62 | int cpuid; | ||
63 | unsigned char **noptable; | ||
64 | } noptypes[] = { | ||
65 | { X86_FEATURE_K8, k8_nops }, | ||
66 | { X86_FEATURE_K7, k7_nops }, | ||
67 | { -1, NULL } | ||
68 | }; | ||
69 | |||
70 | |||
71 | extern struct alt_instr __alt_instructions[], __alt_instructions_end[]; | ||
72 | extern struct alt_instr __smp_alt_instructions[], __smp_alt_instructions_end[]; | ||
73 | extern u8 *__smp_locks[], *__smp_locks_end[]; | ||
74 | |||
75 | extern u8 __smp_alt_begin[], __smp_alt_end[]; | ||
76 | |||
77 | |||
78 | static unsigned char** find_nop_table(void) | ||
79 | { | ||
80 | unsigned char **noptable = intel_nops; | ||
81 | int i; | ||
82 | |||
83 | for (i = 0; noptypes[i].cpuid >= 0; i++) { | ||
84 | if (boot_cpu_has(noptypes[i].cpuid)) { | ||
85 | noptable = noptypes[i].noptable; | ||
86 | break; | ||
87 | } | ||
88 | } | ||
89 | return noptable; | ||
90 | } | ||
91 | |||
92 | /* Replace instructions with better alternatives for this CPU type. | ||
93 | This runs before SMP is initialized to avoid SMP problems with | ||
94 | self modifying code. This implies that assymetric systems where | ||
95 | APs have less capabilities than the boot processor are not handled. | ||
96 | Tough. Make sure you disable such features by hand. */ | ||
97 | |||
98 | void apply_alternatives(struct alt_instr *start, struct alt_instr *end) | ||
99 | { | ||
100 | unsigned char **noptable = find_nop_table(); | ||
101 | struct alt_instr *a; | ||
102 | int diff, i, k; | ||
103 | |||
104 | DPRINTK("%s: alt table %p -> %p\n", __FUNCTION__, start, end); | ||
105 | for (a = start; a < end; a++) { | ||
106 | BUG_ON(a->replacementlen > a->instrlen); | ||
107 | if (!boot_cpu_has(a->cpuid)) | ||
108 | continue; | ||
109 | memcpy(a->instr, a->replacement, a->replacementlen); | ||
110 | diff = a->instrlen - a->replacementlen; | ||
111 | /* Pad the rest with nops */ | ||
112 | for (i = a->replacementlen; diff > 0; diff -= k, i += k) { | ||
113 | k = diff; | ||
114 | if (k > ASM_NOP_MAX) | ||
115 | k = ASM_NOP_MAX; | ||
116 | memcpy(a->instr + i, noptable[k], k); | ||
117 | } | ||
118 | } | ||
119 | } | ||
120 | |||
121 | static void alternatives_smp_save(struct alt_instr *start, struct alt_instr *end) | ||
122 | { | ||
123 | struct alt_instr *a; | ||
124 | |||
125 | DPRINTK("%s: alt table %p-%p\n", __FUNCTION__, start, end); | ||
126 | for (a = start; a < end; a++) { | ||
127 | memcpy(a->replacement + a->replacementlen, | ||
128 | a->instr, | ||
129 | a->instrlen); | ||
130 | } | ||
131 | } | ||
132 | |||
133 | static void alternatives_smp_apply(struct alt_instr *start, struct alt_instr *end) | ||
134 | { | ||
135 | struct alt_instr *a; | ||
136 | |||
137 | for (a = start; a < end; a++) { | ||
138 | memcpy(a->instr, | ||
139 | a->replacement + a->replacementlen, | ||
140 | a->instrlen); | ||
141 | } | ||
142 | } | ||
143 | |||
144 | static void alternatives_smp_lock(u8 **start, u8 **end, u8 *text, u8 *text_end) | ||
145 | { | ||
146 | u8 **ptr; | ||
147 | |||
148 | for (ptr = start; ptr < end; ptr++) { | ||
149 | if (*ptr < text) | ||
150 | continue; | ||
151 | if (*ptr > text_end) | ||
152 | continue; | ||
153 | **ptr = 0xf0; /* lock prefix */ | ||
154 | }; | ||
155 | } | ||
156 | |||
157 | static void alternatives_smp_unlock(u8 **start, u8 **end, u8 *text, u8 *text_end) | ||
158 | { | ||
159 | unsigned char **noptable = find_nop_table(); | ||
160 | u8 **ptr; | ||
161 | |||
162 | for (ptr = start; ptr < end; ptr++) { | ||
163 | if (*ptr < text) | ||
164 | continue; | ||
165 | if (*ptr > text_end) | ||
166 | continue; | ||
167 | **ptr = noptable[1][0]; | ||
168 | }; | ||
169 | } | ||
170 | |||
171 | struct smp_alt_module { | ||
172 | /* what is this ??? */ | ||
173 | struct module *mod; | ||
174 | char *name; | ||
175 | |||
176 | /* ptrs to lock prefixes */ | ||
177 | u8 **locks; | ||
178 | u8 **locks_end; | ||
179 | |||
180 | /* .text segment, needed to avoid patching init code ;) */ | ||
181 | u8 *text; | ||
182 | u8 *text_end; | ||
183 | |||
184 | struct list_head next; | ||
185 | }; | ||
186 | static LIST_HEAD(smp_alt_modules); | ||
187 | static DEFINE_SPINLOCK(smp_alt); | ||
188 | |||
189 | static int smp_alt_once = 0; | ||
190 | static int __init bootonly(char *str) | ||
191 | { | ||
192 | smp_alt_once = 1; | ||
193 | return 1; | ||
194 | } | ||
195 | __setup("smp-alt-boot", bootonly); | ||
196 | |||
197 | void alternatives_smp_module_add(struct module *mod, char *name, | ||
198 | void *locks, void *locks_end, | ||
199 | void *text, void *text_end) | ||
200 | { | ||
201 | struct smp_alt_module *smp; | ||
202 | unsigned long flags; | ||
203 | |||
204 | if (smp_alt_once) { | ||
205 | if (boot_cpu_has(X86_FEATURE_UP)) | ||
206 | alternatives_smp_unlock(locks, locks_end, | ||
207 | text, text_end); | ||
208 | return; | ||
209 | } | ||
210 | |||
211 | smp = kzalloc(sizeof(*smp), GFP_KERNEL); | ||
212 | if (NULL == smp) | ||
213 | return; /* we'll run the (safe but slow) SMP code then ... */ | ||
214 | |||
215 | smp->mod = mod; | ||
216 | smp->name = name; | ||
217 | smp->locks = locks; | ||
218 | smp->locks_end = locks_end; | ||
219 | smp->text = text; | ||
220 | smp->text_end = text_end; | ||
221 | DPRINTK("%s: locks %p -> %p, text %p -> %p, name %s\n", | ||
222 | __FUNCTION__, smp->locks, smp->locks_end, | ||
223 | smp->text, smp->text_end, smp->name); | ||
224 | |||
225 | spin_lock_irqsave(&smp_alt, flags); | ||
226 | list_add_tail(&smp->next, &smp_alt_modules); | ||
227 | if (boot_cpu_has(X86_FEATURE_UP)) | ||
228 | alternatives_smp_unlock(smp->locks, smp->locks_end, | ||
229 | smp->text, smp->text_end); | ||
230 | spin_unlock_irqrestore(&smp_alt, flags); | ||
231 | } | ||
232 | |||
233 | void alternatives_smp_module_del(struct module *mod) | ||
234 | { | ||
235 | struct smp_alt_module *item; | ||
236 | unsigned long flags; | ||
237 | |||
238 | if (smp_alt_once) | ||
239 | return; | ||
240 | |||
241 | spin_lock_irqsave(&smp_alt, flags); | ||
242 | list_for_each_entry(item, &smp_alt_modules, next) { | ||
243 | if (mod != item->mod) | ||
244 | continue; | ||
245 | list_del(&item->next); | ||
246 | spin_unlock_irqrestore(&smp_alt, flags); | ||
247 | DPRINTK("%s: %s\n", __FUNCTION__, item->name); | ||
248 | kfree(item); | ||
249 | return; | ||
250 | } | ||
251 | spin_unlock_irqrestore(&smp_alt, flags); | ||
252 | } | ||
253 | |||
254 | void alternatives_smp_switch(int smp) | ||
255 | { | ||
256 | struct smp_alt_module *mod; | ||
257 | unsigned long flags; | ||
258 | |||
259 | if (smp_alt_once) | ||
260 | return; | ||
261 | BUG_ON(!smp && (num_online_cpus() > 1)); | ||
262 | |||
263 | spin_lock_irqsave(&smp_alt, flags); | ||
264 | if (smp) { | ||
265 | printk(KERN_INFO "SMP alternatives: switching to SMP code\n"); | ||
266 | clear_bit(X86_FEATURE_UP, boot_cpu_data.x86_capability); | ||
267 | clear_bit(X86_FEATURE_UP, cpu_data[0].x86_capability); | ||
268 | alternatives_smp_apply(__smp_alt_instructions, | ||
269 | __smp_alt_instructions_end); | ||
270 | list_for_each_entry(mod, &smp_alt_modules, next) | ||
271 | alternatives_smp_lock(mod->locks, mod->locks_end, | ||
272 | mod->text, mod->text_end); | ||
273 | } else { | ||
274 | printk(KERN_INFO "SMP alternatives: switching to UP code\n"); | ||
275 | set_bit(X86_FEATURE_UP, boot_cpu_data.x86_capability); | ||
276 | set_bit(X86_FEATURE_UP, cpu_data[0].x86_capability); | ||
277 | apply_alternatives(__smp_alt_instructions, | ||
278 | __smp_alt_instructions_end); | ||
279 | list_for_each_entry(mod, &smp_alt_modules, next) | ||
280 | alternatives_smp_unlock(mod->locks, mod->locks_end, | ||
281 | mod->text, mod->text_end); | ||
282 | } | ||
283 | spin_unlock_irqrestore(&smp_alt, flags); | ||
284 | } | ||
285 | |||
286 | void __init alternative_instructions(void) | ||
287 | { | ||
288 | apply_alternatives(__alt_instructions, __alt_instructions_end); | ||
289 | |||
290 | /* switch to patch-once-at-boottime-only mode and free the | ||
291 | * tables in case we know the number of CPUs will never ever | ||
292 | * change */ | ||
293 | #ifdef CONFIG_HOTPLUG_CPU | ||
294 | if (num_possible_cpus() < 2) | ||
295 | smp_alt_once = 1; | ||
296 | #else | ||
297 | smp_alt_once = 1; | ||
298 | #endif | ||
299 | |||
300 | if (smp_alt_once) { | ||
301 | if (1 == num_possible_cpus()) { | ||
302 | printk(KERN_INFO "SMP alternatives: switching to UP code\n"); | ||
303 | set_bit(X86_FEATURE_UP, boot_cpu_data.x86_capability); | ||
304 | set_bit(X86_FEATURE_UP, cpu_data[0].x86_capability); | ||
305 | apply_alternatives(__smp_alt_instructions, | ||
306 | __smp_alt_instructions_end); | ||
307 | alternatives_smp_unlock(__smp_locks, __smp_locks_end, | ||
308 | _text, _etext); | ||
309 | } | ||
310 | free_init_pages("SMP alternatives", | ||
311 | (unsigned long)__smp_alt_begin, | ||
312 | (unsigned long)__smp_alt_end); | ||
313 | } else { | ||
314 | alternatives_smp_save(__smp_alt_instructions, | ||
315 | __smp_alt_instructions_end); | ||
316 | alternatives_smp_module_add(NULL, "core kernel", | ||
317 | __smp_locks, __smp_locks_end, | ||
318 | _text, _etext); | ||
319 | alternatives_smp_switch(0); | ||
320 | } | ||
321 | } | ||
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index 776c90989e06..eb5279d23b7f 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <asm/i8253.h> | 38 | #include <asm/i8253.h> |
39 | 39 | ||
40 | #include <mach_apic.h> | 40 | #include <mach_apic.h> |
41 | #include <mach_apicdef.h> | ||
41 | #include <mach_ipi.h> | 42 | #include <mach_ipi.h> |
42 | 43 | ||
43 | #include "io_ports.h" | 44 | #include "io_ports.h" |
diff --git a/arch/i386/kernel/cpu/centaur.c b/arch/i386/kernel/cpu/centaur.c index f52669ecb93f..bd75629dd262 100644 --- a/arch/i386/kernel/cpu/centaur.c +++ b/arch/i386/kernel/cpu/centaur.c | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <asm/processor.h> | 4 | #include <asm/processor.h> |
5 | #include <asm/msr.h> | 5 | #include <asm/msr.h> |
6 | #include <asm/e820.h> | 6 | #include <asm/e820.h> |
7 | #include <asm/mtrr.h> | ||
7 | #include "cpu.h" | 8 | #include "cpu.h" |
8 | 9 | ||
9 | #ifdef CONFIG_X86_OOSTORE | 10 | #ifdef CONFIG_X86_OOSTORE |
diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c index e6bd095ae108..7e3d6b6a4e96 100644 --- a/arch/i386/kernel/cpu/common.c +++ b/arch/i386/kernel/cpu/common.c | |||
@@ -25,9 +25,10 @@ EXPORT_PER_CPU_SYMBOL(cpu_gdt_descr); | |||
25 | DEFINE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); | 25 | DEFINE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); |
26 | EXPORT_PER_CPU_SYMBOL(cpu_16bit_stack); | 26 | EXPORT_PER_CPU_SYMBOL(cpu_16bit_stack); |
27 | 27 | ||
28 | static int cachesize_override __devinitdata = -1; | 28 | static int cachesize_override __cpuinitdata = -1; |
29 | static int disable_x86_fxsr __devinitdata = 0; | 29 | static int disable_x86_fxsr __cpuinitdata; |
30 | static int disable_x86_serial_nr __devinitdata = 1; | 30 | static int disable_x86_serial_nr __cpuinitdata = 1; |
31 | static int disable_x86_sep __cpuinitdata; | ||
31 | 32 | ||
32 | struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {}; | 33 | struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {}; |
33 | 34 | ||
@@ -59,7 +60,7 @@ static int __init cachesize_setup(char *str) | |||
59 | } | 60 | } |
60 | __setup("cachesize=", cachesize_setup); | 61 | __setup("cachesize=", cachesize_setup); |
61 | 62 | ||
62 | int __devinit get_model_name(struct cpuinfo_x86 *c) | 63 | int __cpuinit get_model_name(struct cpuinfo_x86 *c) |
63 | { | 64 | { |
64 | unsigned int *v; | 65 | unsigned int *v; |
65 | char *p, *q; | 66 | char *p, *q; |
@@ -89,7 +90,7 @@ int __devinit get_model_name(struct cpuinfo_x86 *c) | |||
89 | } | 90 | } |
90 | 91 | ||
91 | 92 | ||
92 | void __devinit display_cacheinfo(struct cpuinfo_x86 *c) | 93 | void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c) |
93 | { | 94 | { |
94 | unsigned int n, dummy, ecx, edx, l2size; | 95 | unsigned int n, dummy, ecx, edx, l2size; |
95 | 96 | ||
@@ -130,7 +131,7 @@ void __devinit display_cacheinfo(struct cpuinfo_x86 *c) | |||
130 | /* in particular, if CPUID levels 0x80000002..4 are supported, this isn't used */ | 131 | /* in particular, if CPUID levels 0x80000002..4 are supported, this isn't used */ |
131 | 132 | ||
132 | /* Look up CPU names by table lookup. */ | 133 | /* Look up CPU names by table lookup. */ |
133 | static char __devinit *table_lookup_model(struct cpuinfo_x86 *c) | 134 | static char __cpuinit *table_lookup_model(struct cpuinfo_x86 *c) |
134 | { | 135 | { |
135 | struct cpu_model_info *info; | 136 | struct cpu_model_info *info; |
136 | 137 | ||
@@ -151,7 +152,7 @@ static char __devinit *table_lookup_model(struct cpuinfo_x86 *c) | |||
151 | } | 152 | } |
152 | 153 | ||
153 | 154 | ||
154 | static void __devinit get_cpu_vendor(struct cpuinfo_x86 *c, int early) | 155 | static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c, int early) |
155 | { | 156 | { |
156 | char *v = c->x86_vendor_id; | 157 | char *v = c->x86_vendor_id; |
157 | int i; | 158 | int i; |
@@ -187,6 +188,14 @@ static int __init x86_fxsr_setup(char * s) | |||
187 | __setup("nofxsr", x86_fxsr_setup); | 188 | __setup("nofxsr", x86_fxsr_setup); |
188 | 189 | ||
189 | 190 | ||
191 | static int __init x86_sep_setup(char * s) | ||
192 | { | ||
193 | disable_x86_sep = 1; | ||
194 | return 1; | ||
195 | } | ||
196 | __setup("nosep", x86_sep_setup); | ||
197 | |||
198 | |||
190 | /* Standard macro to see if a specific flag is changeable */ | 199 | /* Standard macro to see if a specific flag is changeable */ |
191 | static inline int flag_is_changeable_p(u32 flag) | 200 | static inline int flag_is_changeable_p(u32 flag) |
192 | { | 201 | { |
@@ -210,7 +219,7 @@ static inline int flag_is_changeable_p(u32 flag) | |||
210 | 219 | ||
211 | 220 | ||
212 | /* Probe for the CPUID instruction */ | 221 | /* Probe for the CPUID instruction */ |
213 | static int __devinit have_cpuid_p(void) | 222 | static int __cpuinit have_cpuid_p(void) |
214 | { | 223 | { |
215 | return flag_is_changeable_p(X86_EFLAGS_ID); | 224 | return flag_is_changeable_p(X86_EFLAGS_ID); |
216 | } | 225 | } |
@@ -254,7 +263,7 @@ static void __init early_cpu_detect(void) | |||
254 | } | 263 | } |
255 | } | 264 | } |
256 | 265 | ||
257 | void __devinit generic_identify(struct cpuinfo_x86 * c) | 266 | void __cpuinit generic_identify(struct cpuinfo_x86 * c) |
258 | { | 267 | { |
259 | u32 tfms, xlvl; | 268 | u32 tfms, xlvl; |
260 | int junk; | 269 | int junk; |
@@ -307,7 +316,7 @@ void __devinit generic_identify(struct cpuinfo_x86 * c) | |||
307 | #endif | 316 | #endif |
308 | } | 317 | } |
309 | 318 | ||
310 | static void __devinit squash_the_stupid_serial_number(struct cpuinfo_x86 *c) | 319 | static void __cpuinit squash_the_stupid_serial_number(struct cpuinfo_x86 *c) |
311 | { | 320 | { |
312 | if (cpu_has(c, X86_FEATURE_PN) && disable_x86_serial_nr ) { | 321 | if (cpu_has(c, X86_FEATURE_PN) && disable_x86_serial_nr ) { |
313 | /* Disable processor serial number */ | 322 | /* Disable processor serial number */ |
@@ -335,7 +344,7 @@ __setup("serialnumber", x86_serial_nr_setup); | |||
335 | /* | 344 | /* |
336 | * This does the hard work of actually picking apart the CPU stuff... | 345 | * This does the hard work of actually picking apart the CPU stuff... |
337 | */ | 346 | */ |
338 | void __devinit identify_cpu(struct cpuinfo_x86 *c) | 347 | void __cpuinit identify_cpu(struct cpuinfo_x86 *c) |
339 | { | 348 | { |
340 | int i; | 349 | int i; |
341 | 350 | ||
@@ -405,6 +414,10 @@ void __devinit identify_cpu(struct cpuinfo_x86 *c) | |||
405 | clear_bit(X86_FEATURE_XMM, c->x86_capability); | 414 | clear_bit(X86_FEATURE_XMM, c->x86_capability); |
406 | } | 415 | } |
407 | 416 | ||
417 | /* SEP disabled? */ | ||
418 | if (disable_x86_sep) | ||
419 | clear_bit(X86_FEATURE_SEP, c->x86_capability); | ||
420 | |||
408 | if (disable_pse) | 421 | if (disable_pse) |
409 | clear_bit(X86_FEATURE_PSE, c->x86_capability); | 422 | clear_bit(X86_FEATURE_PSE, c->x86_capability); |
410 | 423 | ||
@@ -417,7 +430,7 @@ void __devinit identify_cpu(struct cpuinfo_x86 *c) | |||
417 | else | 430 | else |
418 | /* Last resort... */ | 431 | /* Last resort... */ |
419 | sprintf(c->x86_model_id, "%02x/%02x", | 432 | sprintf(c->x86_model_id, "%02x/%02x", |
420 | c->x86_vendor, c->x86_model); | 433 | c->x86, c->x86_model); |
421 | } | 434 | } |
422 | 435 | ||
423 | /* Now the feature flags better reflect actual CPU features! */ | 436 | /* Now the feature flags better reflect actual CPU features! */ |
@@ -453,7 +466,7 @@ void __devinit identify_cpu(struct cpuinfo_x86 *c) | |||
453 | } | 466 | } |
454 | 467 | ||
455 | #ifdef CONFIG_X86_HT | 468 | #ifdef CONFIG_X86_HT |
456 | void __devinit detect_ht(struct cpuinfo_x86 *c) | 469 | void __cpuinit detect_ht(struct cpuinfo_x86 *c) |
457 | { | 470 | { |
458 | u32 eax, ebx, ecx, edx; | 471 | u32 eax, ebx, ecx, edx; |
459 | int index_msb, core_bits; | 472 | int index_msb, core_bits; |
@@ -500,7 +513,7 @@ void __devinit detect_ht(struct cpuinfo_x86 *c) | |||
500 | } | 513 | } |
501 | #endif | 514 | #endif |
502 | 515 | ||
503 | void __devinit print_cpu_info(struct cpuinfo_x86 *c) | 516 | void __cpuinit print_cpu_info(struct cpuinfo_x86 *c) |
504 | { | 517 | { |
505 | char *vendor = NULL; | 518 | char *vendor = NULL; |
506 | 519 | ||
@@ -523,7 +536,7 @@ void __devinit print_cpu_info(struct cpuinfo_x86 *c) | |||
523 | printk("\n"); | 536 | printk("\n"); |
524 | } | 537 | } |
525 | 538 | ||
526 | cpumask_t cpu_initialized __devinitdata = CPU_MASK_NONE; | 539 | cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE; |
527 | 540 | ||
528 | /* This is hacky. :) | 541 | /* This is hacky. :) |
529 | * We're emulating future behavior. | 542 | * We're emulating future behavior. |
@@ -570,7 +583,7 @@ void __init early_cpu_init(void) | |||
570 | * and IDT. We reload them nevertheless, this function acts as a | 583 | * and IDT. We reload them nevertheless, this function acts as a |
571 | * 'CPU state barrier', nothing should get across. | 584 | * 'CPU state barrier', nothing should get across. |
572 | */ | 585 | */ |
573 | void __devinit cpu_init(void) | 586 | void __cpuinit cpu_init(void) |
574 | { | 587 | { |
575 | int cpu = smp_processor_id(); | 588 | int cpu = smp_processor_id(); |
576 | struct tss_struct * t = &per_cpu(init_tss, cpu); | 589 | struct tss_struct * t = &per_cpu(init_tss, cpu); |
@@ -670,7 +683,7 @@ void __devinit cpu_init(void) | |||
670 | } | 683 | } |
671 | 684 | ||
672 | #ifdef CONFIG_HOTPLUG_CPU | 685 | #ifdef CONFIG_HOTPLUG_CPU |
673 | void __devinit cpu_uninit(void) | 686 | void __cpuinit cpu_uninit(void) |
674 | { | 687 | { |
675 | int cpu = raw_smp_processor_id(); | 688 | int cpu = raw_smp_processor_id(); |
676 | cpu_clear(cpu, cpu_initialized); | 689 | cpu_clear(cpu, cpu_initialized); |
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c index e11a09207ec8..3d5110b65cc3 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c | |||
@@ -1145,9 +1145,7 @@ static int __cpuinit powernowk8_init(void) | |||
1145 | { | 1145 | { |
1146 | unsigned int i, supported_cpus = 0; | 1146 | unsigned int i, supported_cpus = 0; |
1147 | 1147 | ||
1148 | for (i=0; i<NR_CPUS; i++) { | 1148 | for_each_cpu(i) { |
1149 | if (!cpu_online(i)) | ||
1150 | continue; | ||
1151 | if (check_supported_cpu(i)) | 1149 | if (check_supported_cpu(i)) |
1152 | supported_cpus++; | 1150 | supported_cpus++; |
1153 | } | 1151 | } |
diff --git a/arch/i386/kernel/cpu/intel.c b/arch/i386/kernel/cpu/intel.c index 8c0120186b9f..5386b29bb5a5 100644 --- a/arch/i386/kernel/cpu/intel.c +++ b/arch/i386/kernel/cpu/intel.c | |||
@@ -29,7 +29,7 @@ extern int trap_init_f00f_bug(void); | |||
29 | struct movsl_mask movsl_mask __read_mostly; | 29 | struct movsl_mask movsl_mask __read_mostly; |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | void __devinit early_intel_workaround(struct cpuinfo_x86 *c) | 32 | void __cpuinit early_intel_workaround(struct cpuinfo_x86 *c) |
33 | { | 33 | { |
34 | if (c->x86_vendor != X86_VENDOR_INTEL) | 34 | if (c->x86_vendor != X86_VENDOR_INTEL) |
35 | return; | 35 | return; |
@@ -44,7 +44,7 @@ void __devinit early_intel_workaround(struct cpuinfo_x86 *c) | |||
44 | * This is called before we do cpu ident work | 44 | * This is called before we do cpu ident work |
45 | */ | 45 | */ |
46 | 46 | ||
47 | int __devinit ppro_with_ram_bug(void) | 47 | int __cpuinit ppro_with_ram_bug(void) |
48 | { | 48 | { |
49 | /* Uses data from early_cpu_detect now */ | 49 | /* Uses data from early_cpu_detect now */ |
50 | if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL && | 50 | if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL && |
@@ -62,7 +62,7 @@ int __devinit ppro_with_ram_bug(void) | |||
62 | * P4 Xeon errata 037 workaround. | 62 | * P4 Xeon errata 037 workaround. |
63 | * Hardware prefetcher may cause stale data to be loaded into the cache. | 63 | * Hardware prefetcher may cause stale data to be loaded into the cache. |
64 | */ | 64 | */ |
65 | static void __devinit Intel_errata_workarounds(struct cpuinfo_x86 *c) | 65 | static void __cpuinit Intel_errata_workarounds(struct cpuinfo_x86 *c) |
66 | { | 66 | { |
67 | unsigned long lo, hi; | 67 | unsigned long lo, hi; |
68 | 68 | ||
@@ -81,7 +81,7 @@ static void __devinit Intel_errata_workarounds(struct cpuinfo_x86 *c) | |||
81 | /* | 81 | /* |
82 | * find out the number of processor cores on the die | 82 | * find out the number of processor cores on the die |
83 | */ | 83 | */ |
84 | static int __devinit num_cpu_cores(struct cpuinfo_x86 *c) | 84 | static int __cpuinit num_cpu_cores(struct cpuinfo_x86 *c) |
85 | { | 85 | { |
86 | unsigned int eax, ebx, ecx, edx; | 86 | unsigned int eax, ebx, ecx, edx; |
87 | 87 | ||
@@ -96,7 +96,7 @@ static int __devinit num_cpu_cores(struct cpuinfo_x86 *c) | |||
96 | return 1; | 96 | return 1; |
97 | } | 97 | } |
98 | 98 | ||
99 | static void __devinit init_intel(struct cpuinfo_x86 *c) | 99 | static void __cpuinit init_intel(struct cpuinfo_x86 *c) |
100 | { | 100 | { |
101 | unsigned int l2 = 0; | 101 | unsigned int l2 = 0; |
102 | char *p = NULL; | 102 | char *p = NULL; |
@@ -205,7 +205,7 @@ static unsigned int intel_size_cache(struct cpuinfo_x86 * c, unsigned int size) | |||
205 | return size; | 205 | return size; |
206 | } | 206 | } |
207 | 207 | ||
208 | static struct cpu_dev intel_cpu_dev __devinitdata = { | 208 | static struct cpu_dev intel_cpu_dev __cpuinitdata = { |
209 | .c_vendor = "Intel", | 209 | .c_vendor = "Intel", |
210 | .c_ident = { "GenuineIntel" }, | 210 | .c_ident = { "GenuineIntel" }, |
211 | .c_models = { | 211 | .c_models = { |
diff --git a/arch/i386/kernel/cpu/intel_cacheinfo.c b/arch/i386/kernel/cpu/intel_cacheinfo.c index ffe58cee0c48..ce61921369e5 100644 --- a/arch/i386/kernel/cpu/intel_cacheinfo.c +++ b/arch/i386/kernel/cpu/intel_cacheinfo.c | |||
@@ -174,7 +174,7 @@ unsigned int __cpuinit init_intel_cacheinfo(struct cpuinfo_x86 *c) | |||
174 | unsigned int new_l1d = 0, new_l1i = 0; /* Cache sizes from cpuid(4) */ | 174 | unsigned int new_l1d = 0, new_l1i = 0; /* Cache sizes from cpuid(4) */ |
175 | unsigned int new_l2 = 0, new_l3 = 0, i; /* Cache sizes from cpuid(4) */ | 175 | unsigned int new_l2 = 0, new_l3 = 0, i; /* Cache sizes from cpuid(4) */ |
176 | 176 | ||
177 | if (c->cpuid_level > 4) { | 177 | if (c->cpuid_level > 3) { |
178 | static int is_initialized; | 178 | static int is_initialized; |
179 | 179 | ||
180 | if (is_initialized == 0) { | 180 | if (is_initialized == 0) { |
@@ -330,7 +330,7 @@ static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) | |||
330 | } | 330 | } |
331 | } | 331 | } |
332 | } | 332 | } |
333 | static void __devinit cache_remove_shared_cpu_map(unsigned int cpu, int index) | 333 | static void __cpuinit cache_remove_shared_cpu_map(unsigned int cpu, int index) |
334 | { | 334 | { |
335 | struct _cpuid4_info *this_leaf, *sibling_leaf; | 335 | struct _cpuid4_info *this_leaf, *sibling_leaf; |
336 | int sibling; | 336 | int sibling; |
diff --git a/arch/i386/kernel/cpu/proc.c b/arch/i386/kernel/cpu/proc.c index 89a85af33d28..5cfbd8011698 100644 --- a/arch/i386/kernel/cpu/proc.c +++ b/arch/i386/kernel/cpu/proc.c | |||
@@ -40,7 +40,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
40 | /* Other (Linux-defined) */ | 40 | /* Other (Linux-defined) */ |
41 | "cxmmx", "k6_mtrr", "cyrix_arr", "centaur_mcr", | 41 | "cxmmx", "k6_mtrr", "cyrix_arr", "centaur_mcr", |
42 | NULL, NULL, NULL, NULL, | 42 | NULL, NULL, NULL, NULL, |
43 | "constant_tsc", NULL, NULL, NULL, NULL, NULL, NULL, NULL, | 43 | "constant_tsc", "up", NULL, NULL, NULL, NULL, NULL, NULL, |
44 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | 44 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
45 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | 45 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
46 | 46 | ||
diff --git a/arch/i386/kernel/crash.c b/arch/i386/kernel/crash.c index d49dbe8dc96b..e3c5fca0aa8a 100644 --- a/arch/i386/kernel/crash.c +++ b/arch/i386/kernel/crash.c | |||
@@ -105,7 +105,7 @@ static int crash_nmi_callback(struct pt_regs *regs, int cpu) | |||
105 | return 1; | 105 | return 1; |
106 | local_irq_disable(); | 106 | local_irq_disable(); |
107 | 107 | ||
108 | if (!user_mode(regs)) { | 108 | if (!user_mode_vm(regs)) { |
109 | crash_fixup_ss_esp(&fixed_regs, regs); | 109 | crash_fixup_ss_esp(&fixed_regs, regs); |
110 | regs = &fixed_regs; | 110 | regs = &fixed_regs; |
111 | } | 111 | } |
diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S index 4d704724b2f5..cfc683f153b9 100644 --- a/arch/i386/kernel/entry.S +++ b/arch/i386/kernel/entry.S | |||
@@ -226,6 +226,10 @@ ENTRY(system_call) | |||
226 | pushl %eax # save orig_eax | 226 | pushl %eax # save orig_eax |
227 | SAVE_ALL | 227 | SAVE_ALL |
228 | GET_THREAD_INFO(%ebp) | 228 | GET_THREAD_INFO(%ebp) |
229 | testl $TF_MASK,EFLAGS(%esp) | ||
230 | jz no_singlestep | ||
231 | orl $_TIF_SINGLESTEP,TI_flags(%ebp) | ||
232 | no_singlestep: | ||
229 | # system call tracing in operation / emulation | 233 | # system call tracing in operation / emulation |
230 | /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */ | 234 | /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */ |
231 | testw $(_TIF_SYSCALL_EMU|_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT),TI_flags(%ebp) | 235 | testw $(_TIF_SYSCALL_EMU|_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT),TI_flags(%ebp) |
diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S index e0b7c632efbc..3debc2e26542 100644 --- a/arch/i386/kernel/head.S +++ b/arch/i386/kernel/head.S | |||
@@ -450,7 +450,6 @@ int_msg: | |||
450 | 450 | ||
451 | .globl boot_gdt_descr | 451 | .globl boot_gdt_descr |
452 | .globl idt_descr | 452 | .globl idt_descr |
453 | .globl cpu_gdt_descr | ||
454 | 453 | ||
455 | ALIGN | 454 | ALIGN |
456 | # early boot GDT descriptor (must use 1:1 address mapping) | 455 | # early boot GDT descriptor (must use 1:1 address mapping) |
@@ -470,8 +469,6 @@ cpu_gdt_descr: | |||
470 | .word GDT_ENTRIES*8-1 | 469 | .word GDT_ENTRIES*8-1 |
471 | .long cpu_gdt_table | 470 | .long cpu_gdt_table |
472 | 471 | ||
473 | .fill NR_CPUS-1,8,0 # space for the other GDT descriptors | ||
474 | |||
475 | /* | 472 | /* |
476 | * The boot_gdt_table must mirror the equivalent in setup.S and is | 473 | * The boot_gdt_table must mirror the equivalent in setup.S and is |
477 | * used only for booting. | 474 | * used only for booting. |
@@ -485,7 +482,7 @@ ENTRY(boot_gdt_table) | |||
485 | /* | 482 | /* |
486 | * The Global Descriptor Table contains 28 quadwords, per-CPU. | 483 | * The Global Descriptor Table contains 28 quadwords, per-CPU. |
487 | */ | 484 | */ |
488 | .align PAGE_SIZE_asm | 485 | .align L1_CACHE_BYTES |
489 | ENTRY(cpu_gdt_table) | 486 | ENTRY(cpu_gdt_table) |
490 | .quad 0x0000000000000000 /* NULL descriptor */ | 487 | .quad 0x0000000000000000 /* NULL descriptor */ |
491 | .quad 0x0000000000000000 /* 0x0b reserved */ | 488 | .quad 0x0000000000000000 /* 0x0b reserved */ |
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index 39d9a5fa907e..311b4e7266f1 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c | |||
@@ -351,8 +351,8 @@ static inline void rotate_irqs_among_cpus(unsigned long useful_load_threshold) | |||
351 | { | 351 | { |
352 | int i, j; | 352 | int i, j; |
353 | Dprintk("Rotating IRQs among CPUs.\n"); | 353 | Dprintk("Rotating IRQs among CPUs.\n"); |
354 | for (i = 0; i < NR_CPUS; i++) { | 354 | for_each_online_cpu(i) { |
355 | for (j = 0; cpu_online(i) && (j < NR_IRQS); j++) { | 355 | for (j = 0; j < NR_IRQS; j++) { |
356 | if (!irq_desc[j].action) | 356 | if (!irq_desc[j].action) |
357 | continue; | 357 | continue; |
358 | /* Is it a significant load ? */ | 358 | /* Is it a significant load ? */ |
@@ -381,7 +381,7 @@ static void do_irq_balance(void) | |||
381 | unsigned long imbalance = 0; | 381 | unsigned long imbalance = 0; |
382 | cpumask_t allowed_mask, target_cpu_mask, tmp; | 382 | cpumask_t allowed_mask, target_cpu_mask, tmp; |
383 | 383 | ||
384 | for (i = 0; i < NR_CPUS; i++) { | 384 | for_each_cpu(i) { |
385 | int package_index; | 385 | int package_index; |
386 | CPU_IRQ(i) = 0; | 386 | CPU_IRQ(i) = 0; |
387 | if (!cpu_online(i)) | 387 | if (!cpu_online(i)) |
@@ -422,9 +422,7 @@ static void do_irq_balance(void) | |||
422 | } | 422 | } |
423 | } | 423 | } |
424 | /* Find the least loaded processor package */ | 424 | /* Find the least loaded processor package */ |
425 | for (i = 0; i < NR_CPUS; i++) { | 425 | for_each_online_cpu(i) { |
426 | if (!cpu_online(i)) | ||
427 | continue; | ||
428 | if (i != CPU_TO_PACKAGEINDEX(i)) | 426 | if (i != CPU_TO_PACKAGEINDEX(i)) |
429 | continue; | 427 | continue; |
430 | if (min_cpu_irq > CPU_IRQ(i)) { | 428 | if (min_cpu_irq > CPU_IRQ(i)) { |
@@ -441,9 +439,7 @@ tryanothercpu: | |||
441 | */ | 439 | */ |
442 | tmp_cpu_irq = 0; | 440 | tmp_cpu_irq = 0; |
443 | tmp_loaded = -1; | 441 | tmp_loaded = -1; |
444 | for (i = 0; i < NR_CPUS; i++) { | 442 | for_each_online_cpu(i) { |
445 | if (!cpu_online(i)) | ||
446 | continue; | ||
447 | if (i != CPU_TO_PACKAGEINDEX(i)) | 443 | if (i != CPU_TO_PACKAGEINDEX(i)) |
448 | continue; | 444 | continue; |
449 | if (max_cpu_irq <= CPU_IRQ(i)) | 445 | if (max_cpu_irq <= CPU_IRQ(i)) |
@@ -619,9 +615,7 @@ static int __init balanced_irq_init(void) | |||
619 | if (smp_num_siblings > 1 && !cpus_empty(tmp)) | 615 | if (smp_num_siblings > 1 && !cpus_empty(tmp)) |
620 | physical_balance = 1; | 616 | physical_balance = 1; |
621 | 617 | ||
622 | for (i = 0; i < NR_CPUS; i++) { | 618 | for_each_online_cpu(i) { |
623 | if (!cpu_online(i)) | ||
624 | continue; | ||
625 | irq_cpu_data[i].irq_delta = kmalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL); | 619 | irq_cpu_data[i].irq_delta = kmalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL); |
626 | irq_cpu_data[i].last_irq = kmalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL); | 620 | irq_cpu_data[i].last_irq = kmalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL); |
627 | if (irq_cpu_data[i].irq_delta == NULL || irq_cpu_data[i].last_irq == NULL) { | 621 | if (irq_cpu_data[i].irq_delta == NULL || irq_cpu_data[i].last_irq == NULL) { |
@@ -638,9 +632,11 @@ static int __init balanced_irq_init(void) | |||
638 | else | 632 | else |
639 | printk(KERN_ERR "balanced_irq_init: failed to spawn balanced_irq"); | 633 | printk(KERN_ERR "balanced_irq_init: failed to spawn balanced_irq"); |
640 | failed: | 634 | failed: |
641 | for (i = 0; i < NR_CPUS; i++) { | 635 | for_each_cpu(i) { |
642 | kfree(irq_cpu_data[i].irq_delta); | 636 | kfree(irq_cpu_data[i].irq_delta); |
637 | irq_cpu_data[i].irq_delta = NULL; | ||
643 | kfree(irq_cpu_data[i].last_irq); | 638 | kfree(irq_cpu_data[i].last_irq); |
639 | irq_cpu_data[i].last_irq = NULL; | ||
644 | } | 640 | } |
645 | return 0; | 641 | return 0; |
646 | } | 642 | } |
@@ -1761,7 +1757,8 @@ static void __init setup_ioapic_ids_from_mpc(void) | |||
1761 | * Don't check I/O APIC IDs for xAPIC systems. They have | 1757 | * Don't check I/O APIC IDs for xAPIC systems. They have |
1762 | * no meaning without the serial APIC bus. | 1758 | * no meaning without the serial APIC bus. |
1763 | */ | 1759 | */ |
1764 | if (!(boot_cpu_data.x86_vendor == X86_VENDOR_INTEL && boot_cpu_data.x86 < 15)) | 1760 | if (!(boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) |
1761 | || APIC_XAPIC(apic_version[boot_cpu_physical_apicid])) | ||
1765 | return; | 1762 | return; |
1766 | /* | 1763 | /* |
1767 | * This is broken; anything with a real cpu count has to | 1764 | * This is broken; anything with a real cpu count has to |
diff --git a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c index 694a13997637..7a59050242a7 100644 --- a/arch/i386/kernel/kprobes.c +++ b/arch/i386/kernel/kprobes.c | |||
@@ -84,9 +84,9 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p) | |||
84 | 84 | ||
85 | void __kprobes arch_remove_kprobe(struct kprobe *p) | 85 | void __kprobes arch_remove_kprobe(struct kprobe *p) |
86 | { | 86 | { |
87 | down(&kprobe_mutex); | 87 | mutex_lock(&kprobe_mutex); |
88 | free_insn_slot(p->ainsn.insn); | 88 | free_insn_slot(p->ainsn.insn); |
89 | up(&kprobe_mutex); | 89 | mutex_unlock(&kprobe_mutex); |
90 | } | 90 | } |
91 | 91 | ||
92 | static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb) | 92 | static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb) |
diff --git a/arch/i386/kernel/module.c b/arch/i386/kernel/module.c index 5149c8a621f0..470cf97e7cd3 100644 --- a/arch/i386/kernel/module.c +++ b/arch/i386/kernel/module.c | |||
@@ -104,26 +104,38 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, | |||
104 | return -ENOEXEC; | 104 | return -ENOEXEC; |
105 | } | 105 | } |
106 | 106 | ||
107 | extern void apply_alternatives(void *start, void *end); | ||
108 | |||
109 | int module_finalize(const Elf_Ehdr *hdr, | 107 | int module_finalize(const Elf_Ehdr *hdr, |
110 | const Elf_Shdr *sechdrs, | 108 | const Elf_Shdr *sechdrs, |
111 | struct module *me) | 109 | struct module *me) |
112 | { | 110 | { |
113 | const Elf_Shdr *s; | 111 | const Elf_Shdr *s, *text = NULL, *alt = NULL, *locks = NULL; |
114 | char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; | 112 | char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; |
115 | 113 | ||
116 | /* look for .altinstructions to patch */ | ||
117 | for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { | 114 | for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { |
118 | void *seg; | 115 | if (!strcmp(".text", secstrings + s->sh_name)) |
119 | if (strcmp(".altinstructions", secstrings + s->sh_name)) | 116 | text = s; |
120 | continue; | 117 | if (!strcmp(".altinstructions", secstrings + s->sh_name)) |
121 | seg = (void *)s->sh_addr; | 118 | alt = s; |
122 | apply_alternatives(seg, seg + s->sh_size); | 119 | if (!strcmp(".smp_locks", secstrings + s->sh_name)) |
123 | } | 120 | locks= s; |
121 | } | ||
122 | |||
123 | if (alt) { | ||
124 | /* patch .altinstructions */ | ||
125 | void *aseg = (void *)alt->sh_addr; | ||
126 | apply_alternatives(aseg, aseg + alt->sh_size); | ||
127 | } | ||
128 | if (locks && text) { | ||
129 | void *lseg = (void *)locks->sh_addr; | ||
130 | void *tseg = (void *)text->sh_addr; | ||
131 | alternatives_smp_module_add(me, me->name, | ||
132 | lseg, lseg + locks->sh_size, | ||
133 | tseg, tseg + text->sh_size); | ||
134 | } | ||
124 | return 0; | 135 | return 0; |
125 | } | 136 | } |
126 | 137 | ||
127 | void module_arch_cleanup(struct module *mod) | 138 | void module_arch_cleanup(struct module *mod) |
128 | { | 139 | { |
140 | alternatives_smp_module_del(mod); | ||
129 | } | 141 | } |
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index e6e2f43db85e..8d8aa9d1796d 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c | |||
@@ -828,6 +828,8 @@ void __init find_smp_config (void) | |||
828 | smp_scan_config(address, 0x400); | 828 | smp_scan_config(address, 0x400); |
829 | } | 829 | } |
830 | 830 | ||
831 | int es7000_plat; | ||
832 | |||
831 | /* -------------------------------------------------------------------------- | 833 | /* -------------------------------------------------------------------------- |
832 | ACPI-based MP Configuration | 834 | ACPI-based MP Configuration |
833 | -------------------------------------------------------------------------- */ | 835 | -------------------------------------------------------------------------- */ |
@@ -935,7 +937,8 @@ void __init mp_register_ioapic ( | |||
935 | mp_ioapics[idx].mpc_apicaddr = address; | 937 | mp_ioapics[idx].mpc_apicaddr = address; |
936 | 938 | ||
937 | set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address); | 939 | set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address); |
938 | if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && (boot_cpu_data.x86 < 15)) | 940 | if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) |
941 | && !APIC_XAPIC(apic_version[boot_cpu_physical_apicid])) | ||
939 | tmpid = io_apic_get_unique_id(idx, id); | 942 | tmpid = io_apic_get_unique_id(idx, id); |
940 | else | 943 | else |
941 | tmpid = id; | 944 | tmpid = id; |
@@ -1011,8 +1014,6 @@ void __init mp_override_legacy_irq ( | |||
1011 | return; | 1014 | return; |
1012 | } | 1015 | } |
1013 | 1016 | ||
1014 | int es7000_plat; | ||
1015 | |||
1016 | void __init mp_config_acpi_legacy_irqs (void) | 1017 | void __init mp_config_acpi_legacy_irqs (void) |
1017 | { | 1018 | { |
1018 | struct mpc_config_intsrc intsrc; | 1019 | struct mpc_config_intsrc intsrc; |
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index be87c5e2ee95..9074818b9473 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c | |||
@@ -143,7 +143,7 @@ static int __init check_nmi_watchdog(void) | |||
143 | local_irq_enable(); | 143 | local_irq_enable(); |
144 | mdelay((10*1000)/nmi_hz); // wait 10 ticks | 144 | mdelay((10*1000)/nmi_hz); // wait 10 ticks |
145 | 145 | ||
146 | for (cpu = 0; cpu < NR_CPUS; cpu++) { | 146 | for_each_cpu(cpu) { |
147 | #ifdef CONFIG_SMP | 147 | #ifdef CONFIG_SMP |
148 | /* Check cpu_callin_map here because that is set | 148 | /* Check cpu_callin_map here because that is set |
149 | after the timer is started. */ | 149 | after the timer is started. */ |
@@ -510,7 +510,7 @@ void touch_nmi_watchdog (void) | |||
510 | * Just reset the alert counters, (other CPUs might be | 510 | * Just reset the alert counters, (other CPUs might be |
511 | * spinning on locks we hold): | 511 | * spinning on locks we hold): |
512 | */ | 512 | */ |
513 | for (i = 0; i < NR_CPUS; i++) | 513 | for_each_cpu(i) |
514 | alert_counter[i] = 0; | 514 | alert_counter[i] = 0; |
515 | 515 | ||
516 | /* | 516 | /* |
@@ -543,7 +543,7 @@ void nmi_watchdog_tick (struct pt_regs * regs) | |||
543 | /* | 543 | /* |
544 | * die_nmi will return ONLY if NOTIFY_STOP happens.. | 544 | * die_nmi will return ONLY if NOTIFY_STOP happens.. |
545 | */ | 545 | */ |
546 | die_nmi(regs, "NMI Watchdog detected LOCKUP"); | 546 | die_nmi(regs, "BUG: NMI Watchdog detected LOCKUP"); |
547 | } else { | 547 | } else { |
548 | last_irq_sums[cpu] = sum; | 548 | last_irq_sums[cpu] = sum; |
549 | alert_counter[cpu] = 0; | 549 | alert_counter[cpu] = 0; |
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index 0480454ebffa..299e61674084 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c | |||
@@ -295,7 +295,7 @@ void show_regs(struct pt_regs * regs) | |||
295 | printk("EIP: %04x:[<%08lx>] CPU: %d\n",0xffff & regs->xcs,regs->eip, smp_processor_id()); | 295 | printk("EIP: %04x:[<%08lx>] CPU: %d\n",0xffff & regs->xcs,regs->eip, smp_processor_id()); |
296 | print_symbol("EIP is at %s\n", regs->eip); | 296 | print_symbol("EIP is at %s\n", regs->eip); |
297 | 297 | ||
298 | if (user_mode(regs)) | 298 | if (user_mode_vm(regs)) |
299 | printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp); | 299 | printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp); |
300 | printk(" EFLAGS: %08lx %s (%s %.*s)\n", | 300 | printk(" EFLAGS: %08lx %s (%s %.*s)\n", |
301 | regs->eflags, print_tainted(), system_utsname.release, | 301 | regs->eflags, print_tainted(), system_utsname.release, |
diff --git a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c index 5c1fb6aada5b..506462ef36a0 100644 --- a/arch/i386/kernel/ptrace.c +++ b/arch/i386/kernel/ptrace.c | |||
@@ -34,10 +34,10 @@ | |||
34 | 34 | ||
35 | /* | 35 | /* |
36 | * Determines which flags the user has access to [1 = access, 0 = no access]. | 36 | * Determines which flags the user has access to [1 = access, 0 = no access]. |
37 | * Prohibits changing ID(21), VIP(20), VIF(19), VM(17), IOPL(12-13), IF(9). | 37 | * Prohibits changing ID(21), VIP(20), VIF(19), VM(17), NT(14), IOPL(12-13), IF(9). |
38 | * Also masks reserved bits (31-22, 15, 5, 3, 1). | 38 | * Also masks reserved bits (31-22, 15, 5, 3, 1). |
39 | */ | 39 | */ |
40 | #define FLAG_MASK 0x00054dd5 | 40 | #define FLAG_MASK 0x00050dd5 |
41 | 41 | ||
42 | /* set's the trap flag. */ | 42 | /* set's the trap flag. */ |
43 | #define TRAP_FLAG 0x100 | 43 | #define TRAP_FLAG 0x100 |
diff --git a/arch/i386/kernel/semaphore.c b/arch/i386/kernel/semaphore.c index 7455ab643943..967dc74df9ee 100644 --- a/arch/i386/kernel/semaphore.c +++ b/arch/i386/kernel/semaphore.c | |||
@@ -110,11 +110,11 @@ asm( | |||
110 | ".align 4\n" | 110 | ".align 4\n" |
111 | ".globl __write_lock_failed\n" | 111 | ".globl __write_lock_failed\n" |
112 | "__write_lock_failed:\n\t" | 112 | "__write_lock_failed:\n\t" |
113 | LOCK "addl $" RW_LOCK_BIAS_STR ",(%eax)\n" | 113 | LOCK_PREFIX "addl $" RW_LOCK_BIAS_STR ",(%eax)\n" |
114 | "1: rep; nop\n\t" | 114 | "1: rep; nop\n\t" |
115 | "cmpl $" RW_LOCK_BIAS_STR ",(%eax)\n\t" | 115 | "cmpl $" RW_LOCK_BIAS_STR ",(%eax)\n\t" |
116 | "jne 1b\n\t" | 116 | "jne 1b\n\t" |
117 | LOCK "subl $" RW_LOCK_BIAS_STR ",(%eax)\n\t" | 117 | LOCK_PREFIX "subl $" RW_LOCK_BIAS_STR ",(%eax)\n\t" |
118 | "jnz __write_lock_failed\n\t" | 118 | "jnz __write_lock_failed\n\t" |
119 | "ret" | 119 | "ret" |
120 | ); | 120 | ); |
@@ -124,11 +124,11 @@ asm( | |||
124 | ".align 4\n" | 124 | ".align 4\n" |
125 | ".globl __read_lock_failed\n" | 125 | ".globl __read_lock_failed\n" |
126 | "__read_lock_failed:\n\t" | 126 | "__read_lock_failed:\n\t" |
127 | LOCK "incl (%eax)\n" | 127 | LOCK_PREFIX "incl (%eax)\n" |
128 | "1: rep; nop\n\t" | 128 | "1: rep; nop\n\t" |
129 | "cmpl $1,(%eax)\n\t" | 129 | "cmpl $1,(%eax)\n\t" |
130 | "js 1b\n\t" | 130 | "js 1b\n\t" |
131 | LOCK "decl (%eax)\n\t" | 131 | LOCK_PREFIX "decl (%eax)\n\t" |
132 | "js __read_lock_failed\n\t" | 132 | "js __read_lock_failed\n\t" |
133 | "ret" | 133 | "ret" |
134 | ); | 134 | ); |
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index ab62a9f4701e..2d8782960f41 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c | |||
@@ -1377,101 +1377,6 @@ static void __init register_memory(void) | |||
1377 | pci_mem_start, gapstart, gapsize); | 1377 | pci_mem_start, gapstart, gapsize); |
1378 | } | 1378 | } |
1379 | 1379 | ||
1380 | /* Use inline assembly to define this because the nops are defined | ||
1381 | as inline assembly strings in the include files and we cannot | ||
1382 | get them easily into strings. */ | ||
1383 | asm("\t.data\nintelnops: " | ||
1384 | GENERIC_NOP1 GENERIC_NOP2 GENERIC_NOP3 GENERIC_NOP4 GENERIC_NOP5 GENERIC_NOP6 | ||
1385 | GENERIC_NOP7 GENERIC_NOP8); | ||
1386 | asm("\t.data\nk8nops: " | ||
1387 | K8_NOP1 K8_NOP2 K8_NOP3 K8_NOP4 K8_NOP5 K8_NOP6 | ||
1388 | K8_NOP7 K8_NOP8); | ||
1389 | asm("\t.data\nk7nops: " | ||
1390 | K7_NOP1 K7_NOP2 K7_NOP3 K7_NOP4 K7_NOP5 K7_NOP6 | ||
1391 | K7_NOP7 K7_NOP8); | ||
1392 | |||
1393 | extern unsigned char intelnops[], k8nops[], k7nops[]; | ||
1394 | static unsigned char *intel_nops[ASM_NOP_MAX+1] = { | ||
1395 | NULL, | ||
1396 | intelnops, | ||
1397 | intelnops + 1, | ||
1398 | intelnops + 1 + 2, | ||
1399 | intelnops + 1 + 2 + 3, | ||
1400 | intelnops + 1 + 2 + 3 + 4, | ||
1401 | intelnops + 1 + 2 + 3 + 4 + 5, | ||
1402 | intelnops + 1 + 2 + 3 + 4 + 5 + 6, | ||
1403 | intelnops + 1 + 2 + 3 + 4 + 5 + 6 + 7, | ||
1404 | }; | ||
1405 | static unsigned char *k8_nops[ASM_NOP_MAX+1] = { | ||
1406 | NULL, | ||
1407 | k8nops, | ||
1408 | k8nops + 1, | ||
1409 | k8nops + 1 + 2, | ||
1410 | k8nops + 1 + 2 + 3, | ||
1411 | k8nops + 1 + 2 + 3 + 4, | ||
1412 | k8nops + 1 + 2 + 3 + 4 + 5, | ||
1413 | k8nops + 1 + 2 + 3 + 4 + 5 + 6, | ||
1414 | k8nops + 1 + 2 + 3 + 4 + 5 + 6 + 7, | ||
1415 | }; | ||
1416 | static unsigned char *k7_nops[ASM_NOP_MAX+1] = { | ||
1417 | NULL, | ||
1418 | k7nops, | ||
1419 | k7nops + 1, | ||
1420 | k7nops + 1 + 2, | ||
1421 | k7nops + 1 + 2 + 3, | ||
1422 | k7nops + 1 + 2 + 3 + 4, | ||
1423 | k7nops + 1 + 2 + 3 + 4 + 5, | ||
1424 | k7nops + 1 + 2 + 3 + 4 + 5 + 6, | ||
1425 | k7nops + 1 + 2 + 3 + 4 + 5 + 6 + 7, | ||
1426 | }; | ||
1427 | static struct nop { | ||
1428 | int cpuid; | ||
1429 | unsigned char **noptable; | ||
1430 | } noptypes[] = { | ||
1431 | { X86_FEATURE_K8, k8_nops }, | ||
1432 | { X86_FEATURE_K7, k7_nops }, | ||
1433 | { -1, NULL } | ||
1434 | }; | ||
1435 | |||
1436 | /* Replace instructions with better alternatives for this CPU type. | ||
1437 | |||
1438 | This runs before SMP is initialized to avoid SMP problems with | ||
1439 | self modifying code. This implies that assymetric systems where | ||
1440 | APs have less capabilities than the boot processor are not handled. | ||
1441 | Tough. Make sure you disable such features by hand. */ | ||
1442 | void apply_alternatives(void *start, void *end) | ||
1443 | { | ||
1444 | struct alt_instr *a; | ||
1445 | int diff, i, k; | ||
1446 | unsigned char **noptable = intel_nops; | ||
1447 | for (i = 0; noptypes[i].cpuid >= 0; i++) { | ||
1448 | if (boot_cpu_has(noptypes[i].cpuid)) { | ||
1449 | noptable = noptypes[i].noptable; | ||
1450 | break; | ||
1451 | } | ||
1452 | } | ||
1453 | for (a = start; (void *)a < end; a++) { | ||
1454 | if (!boot_cpu_has(a->cpuid)) | ||
1455 | continue; | ||
1456 | BUG_ON(a->replacementlen > a->instrlen); | ||
1457 | memcpy(a->instr, a->replacement, a->replacementlen); | ||
1458 | diff = a->instrlen - a->replacementlen; | ||
1459 | /* Pad the rest with nops */ | ||
1460 | for (i = a->replacementlen; diff > 0; diff -= k, i += k) { | ||
1461 | k = diff; | ||
1462 | if (k > ASM_NOP_MAX) | ||
1463 | k = ASM_NOP_MAX; | ||
1464 | memcpy(a->instr + i, noptable[k], k); | ||
1465 | } | ||
1466 | } | ||
1467 | } | ||
1468 | |||
1469 | void __init alternative_instructions(void) | ||
1470 | { | ||
1471 | extern struct alt_instr __alt_instructions[], __alt_instructions_end[]; | ||
1472 | apply_alternatives(__alt_instructions, __alt_instructions_end); | ||
1473 | } | ||
1474 | |||
1475 | static char * __init machine_specific_memory_setup(void); | 1380 | static char * __init machine_specific_memory_setup(void); |
1476 | 1381 | ||
1477 | #ifdef CONFIG_MCA | 1382 | #ifdef CONFIG_MCA |
@@ -1554,6 +1459,16 @@ void __init setup_arch(char **cmdline_p) | |||
1554 | 1459 | ||
1555 | parse_cmdline_early(cmdline_p); | 1460 | parse_cmdline_early(cmdline_p); |
1556 | 1461 | ||
1462 | #ifdef CONFIG_EARLY_PRINTK | ||
1463 | { | ||
1464 | char *s = strstr(*cmdline_p, "earlyprintk="); | ||
1465 | if (s) { | ||
1466 | setup_early_printk(strchr(s, '=') + 1); | ||
1467 | printk("early console enabled\n"); | ||
1468 | } | ||
1469 | } | ||
1470 | #endif | ||
1471 | |||
1557 | max_low_pfn = setup_memory(); | 1472 | max_low_pfn = setup_memory(); |
1558 | 1473 | ||
1559 | /* | 1474 | /* |
@@ -1578,19 +1493,6 @@ void __init setup_arch(char **cmdline_p) | |||
1578 | * NOTE: at this point the bootmem allocator is fully available. | 1493 | * NOTE: at this point the bootmem allocator is fully available. |
1579 | */ | 1494 | */ |
1580 | 1495 | ||
1581 | #ifdef CONFIG_EARLY_PRINTK | ||
1582 | { | ||
1583 | char *s = strstr(*cmdline_p, "earlyprintk="); | ||
1584 | if (s) { | ||
1585 | extern void setup_early_printk(char *); | ||
1586 | |||
1587 | setup_early_printk(strchr(s, '=') + 1); | ||
1588 | printk("early console enabled\n"); | ||
1589 | } | ||
1590 | } | ||
1591 | #endif | ||
1592 | |||
1593 | |||
1594 | dmi_scan_machine(); | 1496 | dmi_scan_machine(); |
1595 | 1497 | ||
1596 | #ifdef CONFIG_X86_GENERICARCH | 1498 | #ifdef CONFIG_X86_GENERICARCH |
diff --git a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c index 963616d364ec..5c352c3a9e7f 100644 --- a/arch/i386/kernel/signal.c +++ b/arch/i386/kernel/signal.c | |||
@@ -123,7 +123,8 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *peax | |||
123 | err |= __get_user(tmp, &sc->seg); \ | 123 | err |= __get_user(tmp, &sc->seg); \ |
124 | loadsegment(seg,tmp); } | 124 | loadsegment(seg,tmp); } |
125 | 125 | ||
126 | #define FIX_EFLAGS (X86_EFLAGS_AC | X86_EFLAGS_OF | X86_EFLAGS_DF | \ | 126 | #define FIX_EFLAGS (X86_EFLAGS_AC | X86_EFLAGS_RF | \ |
127 | X86_EFLAGS_OF | X86_EFLAGS_DF | \ | ||
127 | X86_EFLAGS_TF | X86_EFLAGS_SF | X86_EFLAGS_ZF | \ | 128 | X86_EFLAGS_TF | X86_EFLAGS_SF | X86_EFLAGS_ZF | \ |
128 | X86_EFLAGS_AF | X86_EFLAGS_PF | X86_EFLAGS_CF) | 129 | X86_EFLAGS_AF | X86_EFLAGS_PF | X86_EFLAGS_CF) |
129 | 130 | ||
@@ -582,9 +583,6 @@ static void fastcall do_signal(struct pt_regs *regs) | |||
582 | if (!user_mode(regs)) | 583 | if (!user_mode(regs)) |
583 | return; | 584 | return; |
584 | 585 | ||
585 | if (try_to_freeze()) | ||
586 | goto no_signal; | ||
587 | |||
588 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | 586 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) |
589 | oldset = ¤t->saved_sigmask; | 587 | oldset = ¤t->saved_sigmask; |
590 | else | 588 | else |
@@ -613,7 +611,6 @@ static void fastcall do_signal(struct pt_regs *regs) | |||
613 | return; | 611 | return; |
614 | } | 612 | } |
615 | 613 | ||
616 | no_signal: | ||
617 | /* Did we come from a system call? */ | 614 | /* Did we come from a system call? */ |
618 | if (regs->orig_eax >= 0) { | 615 | if (regs->orig_eax >= 0) { |
619 | /* Restart the system call - no handlers present */ | 616 | /* Restart the system call - no handlers present */ |
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 7007e1783797..4c470e99a742 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -899,6 +899,7 @@ static int __devinit do_boot_cpu(int apicid, int cpu) | |||
899 | unsigned short nmi_high = 0, nmi_low = 0; | 899 | unsigned short nmi_high = 0, nmi_low = 0; |
900 | 900 | ||
901 | ++cpucount; | 901 | ++cpucount; |
902 | alternatives_smp_switch(1); | ||
902 | 903 | ||
903 | /* | 904 | /* |
904 | * We can't use kernel_thread since we must avoid to | 905 | * We can't use kernel_thread since we must avoid to |
@@ -1368,6 +1369,8 @@ void __cpu_die(unsigned int cpu) | |||
1368 | /* They ack this in play_dead by setting CPU_DEAD */ | 1369 | /* They ack this in play_dead by setting CPU_DEAD */ |
1369 | if (per_cpu(cpu_state, cpu) == CPU_DEAD) { | 1370 | if (per_cpu(cpu_state, cpu) == CPU_DEAD) { |
1370 | printk ("CPU %d is now offline\n", cpu); | 1371 | printk ("CPU %d is now offline\n", cpu); |
1372 | if (1 == num_online_cpus()) | ||
1373 | alternatives_smp_switch(0); | ||
1371 | return; | 1374 | return; |
1372 | } | 1375 | } |
1373 | msleep(100); | 1376 | msleep(100); |
diff --git a/arch/i386/kernel/topology.c b/arch/i386/kernel/topology.c index 67a0e1baa28b..296355292c7c 100644 --- a/arch/i386/kernel/topology.c +++ b/arch/i386/kernel/topology.c | |||
@@ -41,6 +41,15 @@ int arch_register_cpu(int num){ | |||
41 | parent = &node_devices[node].node; | 41 | parent = &node_devices[node].node; |
42 | #endif /* CONFIG_NUMA */ | 42 | #endif /* CONFIG_NUMA */ |
43 | 43 | ||
44 | /* | ||
45 | * CPU0 cannot be offlined due to several | ||
46 | * restrictions and assumptions in kernel. This basically | ||
47 | * doesnt add a control file, one cannot attempt to offline | ||
48 | * BSP. | ||
49 | */ | ||
50 | if (!num) | ||
51 | cpu_devices[num].cpu.no_control = 1; | ||
52 | |||
44 | return register_cpu(&cpu_devices[num].cpu, num, parent); | 53 | return register_cpu(&cpu_devices[num].cpu, num, parent); |
45 | } | 54 | } |
46 | 55 | ||
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index b814dbdcc91e..de5386b01d38 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c | |||
@@ -99,6 +99,8 @@ int register_die_notifier(struct notifier_block *nb) | |||
99 | { | 99 | { |
100 | int err = 0; | 100 | int err = 0; |
101 | unsigned long flags; | 101 | unsigned long flags; |
102 | |||
103 | vmalloc_sync_all(); | ||
102 | spin_lock_irqsave(&die_notifier_lock, flags); | 104 | spin_lock_irqsave(&die_notifier_lock, flags); |
103 | err = notifier_chain_register(&i386die_chain, nb); | 105 | err = notifier_chain_register(&i386die_chain, nb); |
104 | spin_unlock_irqrestore(&die_notifier_lock, flags); | 106 | spin_unlock_irqrestore(&die_notifier_lock, flags); |
@@ -112,12 +114,30 @@ static inline int valid_stack_ptr(struct thread_info *tinfo, void *p) | |||
112 | p < (void *)tinfo + THREAD_SIZE - 3; | 114 | p < (void *)tinfo + THREAD_SIZE - 3; |
113 | } | 115 | } |
114 | 116 | ||
115 | static void print_addr_and_symbol(unsigned long addr, char *log_lvl) | 117 | /* |
118 | * Print CONFIG_STACK_BACKTRACE_COLS address/symbol entries per line. | ||
119 | */ | ||
120 | static inline int print_addr_and_symbol(unsigned long addr, char *log_lvl, | ||
121 | int printed) | ||
116 | { | 122 | { |
117 | printk(log_lvl); | 123 | if (!printed) |
124 | printk(log_lvl); | ||
125 | |||
126 | #if CONFIG_STACK_BACKTRACE_COLS == 1 | ||
118 | printk(" [<%08lx>] ", addr); | 127 | printk(" [<%08lx>] ", addr); |
128 | #else | ||
129 | printk(" <%08lx> ", addr); | ||
130 | #endif | ||
119 | print_symbol("%s", addr); | 131 | print_symbol("%s", addr); |
120 | printk("\n"); | 132 | |
133 | printed = (printed + 1) % CONFIG_STACK_BACKTRACE_COLS; | ||
134 | |||
135 | if (printed) | ||
136 | printk(" "); | ||
137 | else | ||
138 | printk("\n"); | ||
139 | |||
140 | return printed; | ||
121 | } | 141 | } |
122 | 142 | ||
123 | static inline unsigned long print_context_stack(struct thread_info *tinfo, | 143 | static inline unsigned long print_context_stack(struct thread_info *tinfo, |
@@ -125,20 +145,24 @@ static inline unsigned long print_context_stack(struct thread_info *tinfo, | |||
125 | char *log_lvl) | 145 | char *log_lvl) |
126 | { | 146 | { |
127 | unsigned long addr; | 147 | unsigned long addr; |
148 | int printed = 0; /* nr of entries already printed on current line */ | ||
128 | 149 | ||
129 | #ifdef CONFIG_FRAME_POINTER | 150 | #ifdef CONFIG_FRAME_POINTER |
130 | while (valid_stack_ptr(tinfo, (void *)ebp)) { | 151 | while (valid_stack_ptr(tinfo, (void *)ebp)) { |
131 | addr = *(unsigned long *)(ebp + 4); | 152 | addr = *(unsigned long *)(ebp + 4); |
132 | print_addr_and_symbol(addr, log_lvl); | 153 | printed = print_addr_and_symbol(addr, log_lvl, printed); |
133 | ebp = *(unsigned long *)ebp; | 154 | ebp = *(unsigned long *)ebp; |
134 | } | 155 | } |
135 | #else | 156 | #else |
136 | while (valid_stack_ptr(tinfo, stack)) { | 157 | while (valid_stack_ptr(tinfo, stack)) { |
137 | addr = *stack++; | 158 | addr = *stack++; |
138 | if (__kernel_text_address(addr)) | 159 | if (__kernel_text_address(addr)) |
139 | print_addr_and_symbol(addr, log_lvl); | 160 | printed = print_addr_and_symbol(addr, log_lvl, printed); |
140 | } | 161 | } |
141 | #endif | 162 | #endif |
163 | if (printed) | ||
164 | printk("\n"); | ||
165 | |||
142 | return ebp; | 166 | return ebp; |
143 | } | 167 | } |
144 | 168 | ||
@@ -166,8 +190,7 @@ static void show_trace_log_lvl(struct task_struct *task, | |||
166 | stack = (unsigned long*)context->previous_esp; | 190 | stack = (unsigned long*)context->previous_esp; |
167 | if (!stack) | 191 | if (!stack) |
168 | break; | 192 | break; |
169 | printk(log_lvl); | 193 | printk("%s =======================\n", log_lvl); |
170 | printk(" =======================\n"); | ||
171 | } | 194 | } |
172 | } | 195 | } |
173 | 196 | ||
@@ -194,21 +217,17 @@ static void show_stack_log_lvl(struct task_struct *task, unsigned long *esp, | |||
194 | for(i = 0; i < kstack_depth_to_print; i++) { | 217 | for(i = 0; i < kstack_depth_to_print; i++) { |
195 | if (kstack_end(stack)) | 218 | if (kstack_end(stack)) |
196 | break; | 219 | break; |
197 | if (i && ((i % 8) == 0)) { | 220 | if (i && ((i % 8) == 0)) |
198 | printk("\n"); | 221 | printk("\n%s ", log_lvl); |
199 | printk(log_lvl); | ||
200 | printk(" "); | ||
201 | } | ||
202 | printk("%08lx ", *stack++); | 222 | printk("%08lx ", *stack++); |
203 | } | 223 | } |
204 | printk("\n"); | 224 | printk("\n%sCall Trace:\n", log_lvl); |
205 | printk(log_lvl); | ||
206 | printk("Call Trace:\n"); | ||
207 | show_trace_log_lvl(task, esp, log_lvl); | 225 | show_trace_log_lvl(task, esp, log_lvl); |
208 | } | 226 | } |
209 | 227 | ||
210 | void show_stack(struct task_struct *task, unsigned long *esp) | 228 | void show_stack(struct task_struct *task, unsigned long *esp) |
211 | { | 229 | { |
230 | printk(" "); | ||
212 | show_stack_log_lvl(task, esp, ""); | 231 | show_stack_log_lvl(task, esp, ""); |
213 | } | 232 | } |
214 | 233 | ||
@@ -233,7 +252,7 @@ void show_registers(struct pt_regs *regs) | |||
233 | 252 | ||
234 | esp = (unsigned long) (®s->esp); | 253 | esp = (unsigned long) (®s->esp); |
235 | savesegment(ss, ss); | 254 | savesegment(ss, ss); |
236 | if (user_mode(regs)) { | 255 | if (user_mode_vm(regs)) { |
237 | in_kernel = 0; | 256 | in_kernel = 0; |
238 | esp = regs->esp; | 257 | esp = regs->esp; |
239 | ss = regs->xss & 0xffff; | 258 | ss = regs->xss & 0xffff; |
@@ -333,6 +352,8 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
333 | static int die_counter; | 352 | static int die_counter; |
334 | unsigned long flags; | 353 | unsigned long flags; |
335 | 354 | ||
355 | oops_enter(); | ||
356 | |||
336 | if (die.lock_owner != raw_smp_processor_id()) { | 357 | if (die.lock_owner != raw_smp_processor_id()) { |
337 | console_verbose(); | 358 | console_verbose(); |
338 | spin_lock_irqsave(&die.lock, flags); | 359 | spin_lock_irqsave(&die.lock, flags); |
@@ -385,6 +406,7 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
385 | ssleep(5); | 406 | ssleep(5); |
386 | panic("Fatal exception"); | 407 | panic("Fatal exception"); |
387 | } | 408 | } |
409 | oops_exit(); | ||
388 | do_exit(SIGSEGV); | 410 | do_exit(SIGSEGV); |
389 | } | 411 | } |
390 | 412 | ||
@@ -623,7 +645,7 @@ void die_nmi (struct pt_regs *regs, const char *msg) | |||
623 | /* If we are in kernel we are probably nested up pretty bad | 645 | /* If we are in kernel we are probably nested up pretty bad |
624 | * and might aswell get out now while we still can. | 646 | * and might aswell get out now while we still can. |
625 | */ | 647 | */ |
626 | if (!user_mode(regs)) { | 648 | if (!user_mode_vm(regs)) { |
627 | current->thread.trap_no = 2; | 649 | current->thread.trap_no = 2; |
628 | crash_kexec(regs); | 650 | crash_kexec(regs); |
629 | } | 651 | } |
@@ -694,6 +716,7 @@ fastcall void do_nmi(struct pt_regs * regs, long error_code) | |||
694 | 716 | ||
695 | void set_nmi_callback(nmi_callback_t callback) | 717 | void set_nmi_callback(nmi_callback_t callback) |
696 | { | 718 | { |
719 | vmalloc_sync_all(); | ||
697 | rcu_assign_pointer(nmi_callback, callback); | 720 | rcu_assign_pointer(nmi_callback, callback); |
698 | } | 721 | } |
699 | EXPORT_SYMBOL_GPL(set_nmi_callback); | 722 | EXPORT_SYMBOL_GPL(set_nmi_callback); |
diff --git a/arch/i386/kernel/vmlinux.lds.S b/arch/i386/kernel/vmlinux.lds.S index 4710195b6b74..3f21c6f6466d 100644 --- a/arch/i386/kernel/vmlinux.lds.S +++ b/arch/i386/kernel/vmlinux.lds.S | |||
@@ -68,6 +68,26 @@ SECTIONS | |||
68 | *(.data.init_task) | 68 | *(.data.init_task) |
69 | } | 69 | } |
70 | 70 | ||
71 | /* might get freed after init */ | ||
72 | . = ALIGN(4096); | ||
73 | __smp_alt_begin = .; | ||
74 | __smp_alt_instructions = .; | ||
75 | .smp_altinstructions : AT(ADDR(.smp_altinstructions) - LOAD_OFFSET) { | ||
76 | *(.smp_altinstructions) | ||
77 | } | ||
78 | __smp_alt_instructions_end = .; | ||
79 | . = ALIGN(4); | ||
80 | __smp_locks = .; | ||
81 | .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { | ||
82 | *(.smp_locks) | ||
83 | } | ||
84 | __smp_locks_end = .; | ||
85 | .smp_altinstr_replacement : AT(ADDR(.smp_altinstr_replacement) - LOAD_OFFSET) { | ||
86 | *(.smp_altinstr_replacement) | ||
87 | } | ||
88 | . = ALIGN(4096); | ||
89 | __smp_alt_end = .; | ||
90 | |||
71 | /* will be freed after init */ | 91 | /* will be freed after init */ |
72 | . = ALIGN(4096); /* Init code and data */ | 92 | . = ALIGN(4096); /* Init code and data */ |
73 | __init_begin = .; | 93 | __init_begin = .; |
diff --git a/arch/i386/kernel/vsyscall-sysenter.S b/arch/i386/kernel/vsyscall-sysenter.S index 76b728159403..3b62baa6a371 100644 --- a/arch/i386/kernel/vsyscall-sysenter.S +++ b/arch/i386/kernel/vsyscall-sysenter.S | |||
@@ -21,6 +21,9 @@ | |||
21 | * instruction clobbers %esp, the user's %esp won't even survive entry | 21 | * instruction clobbers %esp, the user's %esp won't even survive entry |
22 | * into the kernel. We store %esp in %ebp. Code in entry.S must fetch | 22 | * into the kernel. We store %esp in %ebp. Code in entry.S must fetch |
23 | * arg6 from the stack. | 23 | * arg6 from the stack. |
24 | * | ||
25 | * You can not use this vsyscall for the clone() syscall because the | ||
26 | * three dwords on the parent stack do not get copied to the child. | ||
24 | */ | 27 | */ |
25 | .text | 28 | .text |
26 | .globl __kernel_vsyscall | 29 | .globl __kernel_vsyscall |
diff --git a/arch/i386/mach-es7000/es7000.h b/arch/i386/mach-es7000/es7000.h index f1e3204f5dec..80566ca4a80a 100644 --- a/arch/i386/mach-es7000/es7000.h +++ b/arch/i386/mach-es7000/es7000.h | |||
@@ -83,6 +83,7 @@ struct es7000_oem_table { | |||
83 | struct psai psai; | 83 | struct psai psai; |
84 | }; | 84 | }; |
85 | 85 | ||
86 | #ifdef CONFIG_ACPI | ||
86 | struct acpi_table_sdt { | 87 | struct acpi_table_sdt { |
87 | unsigned long pa; | 88 | unsigned long pa; |
88 | unsigned long count; | 89 | unsigned long count; |
@@ -99,6 +100,9 @@ struct oem_table { | |||
99 | u32 OEMTableSize; | 100 | u32 OEMTableSize; |
100 | }; | 101 | }; |
101 | 102 | ||
103 | extern int find_unisys_acpi_oem_table(unsigned long *oem_addr); | ||
104 | #endif | ||
105 | |||
102 | struct mip_reg { | 106 | struct mip_reg { |
103 | unsigned long long off_0; | 107 | unsigned long long off_0; |
104 | unsigned long long off_8; | 108 | unsigned long long off_8; |
@@ -114,7 +118,6 @@ struct mip_reg { | |||
114 | #define MIP_FUNC(VALUE) (VALUE & 0xff) | 118 | #define MIP_FUNC(VALUE) (VALUE & 0xff) |
115 | 119 | ||
116 | extern int parse_unisys_oem (char *oemptr); | 120 | extern int parse_unisys_oem (char *oemptr); |
117 | extern int find_unisys_acpi_oem_table(unsigned long *oem_addr); | ||
118 | extern void setup_unisys(void); | 121 | extern void setup_unisys(void); |
119 | extern int es7000_start_cpu(int cpu, unsigned long eip); | 122 | extern int es7000_start_cpu(int cpu, unsigned long eip); |
120 | extern void es7000_sw_apic(void); | 123 | extern void es7000_sw_apic(void); |
diff --git a/arch/i386/mach-es7000/es7000plat.c b/arch/i386/mach-es7000/es7000plat.c index a9ab0644f403..3d0fc853516d 100644 --- a/arch/i386/mach-es7000/es7000plat.c +++ b/arch/i386/mach-es7000/es7000plat.c | |||
@@ -51,8 +51,6 @@ struct mip_reg *host_reg; | |||
51 | int mip_port; | 51 | int mip_port; |
52 | unsigned long mip_addr, host_addr; | 52 | unsigned long mip_addr, host_addr; |
53 | 53 | ||
54 | #if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI) | ||
55 | |||
56 | /* | 54 | /* |
57 | * GSI override for ES7000 platforms. | 55 | * GSI override for ES7000 platforms. |
58 | */ | 56 | */ |
@@ -76,8 +74,6 @@ es7000_rename_gsi(int ioapic, int gsi) | |||
76 | return gsi; | 74 | return gsi; |
77 | } | 75 | } |
78 | 76 | ||
79 | #endif /* (CONFIG_X86_IO_APIC) && (CONFIG_ACPI) */ | ||
80 | |||
81 | void __init | 77 | void __init |
82 | setup_unisys(void) | 78 | setup_unisys(void) |
83 | { | 79 | { |
@@ -160,6 +156,7 @@ parse_unisys_oem (char *oemptr) | |||
160 | return es7000_plat; | 156 | return es7000_plat; |
161 | } | 157 | } |
162 | 158 | ||
159 | #ifdef CONFIG_ACPI | ||
163 | int __init | 160 | int __init |
164 | find_unisys_acpi_oem_table(unsigned long *oem_addr) | 161 | find_unisys_acpi_oem_table(unsigned long *oem_addr) |
165 | { | 162 | { |
@@ -212,6 +209,7 @@ find_unisys_acpi_oem_table(unsigned long *oem_addr) | |||
212 | } | 209 | } |
213 | return -1; | 210 | return -1; |
214 | } | 211 | } |
212 | #endif | ||
215 | 213 | ||
216 | static void | 214 | static void |
217 | es7000_spin(int n) | 215 | es7000_spin(int n) |
diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c index cf572d9a3b6e..7f0fcf219a26 100644 --- a/arch/i386/mm/fault.c +++ b/arch/i386/mm/fault.c | |||
@@ -214,6 +214,68 @@ static noinline void force_sig_info_fault(int si_signo, int si_code, | |||
214 | 214 | ||
215 | fastcall void do_invalid_op(struct pt_regs *, unsigned long); | 215 | fastcall void do_invalid_op(struct pt_regs *, unsigned long); |
216 | 216 | ||
217 | static inline pmd_t *vmalloc_sync_one(pgd_t *pgd, unsigned long address) | ||
218 | { | ||
219 | unsigned index = pgd_index(address); | ||
220 | pgd_t *pgd_k; | ||
221 | pud_t *pud, *pud_k; | ||
222 | pmd_t *pmd, *pmd_k; | ||
223 | |||
224 | pgd += index; | ||
225 | pgd_k = init_mm.pgd + index; | ||
226 | |||
227 | if (!pgd_present(*pgd_k)) | ||
228 | return NULL; | ||
229 | |||
230 | /* | ||
231 | * set_pgd(pgd, *pgd_k); here would be useless on PAE | ||
232 | * and redundant with the set_pmd() on non-PAE. As would | ||
233 | * set_pud. | ||
234 | */ | ||
235 | |||
236 | pud = pud_offset(pgd, address); | ||
237 | pud_k = pud_offset(pgd_k, address); | ||
238 | if (!pud_present(*pud_k)) | ||
239 | return NULL; | ||
240 | |||
241 | pmd = pmd_offset(pud, address); | ||
242 | pmd_k = pmd_offset(pud_k, address); | ||
243 | if (!pmd_present(*pmd_k)) | ||
244 | return NULL; | ||
245 | if (!pmd_present(*pmd)) | ||
246 | set_pmd(pmd, *pmd_k); | ||
247 | else | ||
248 | BUG_ON(pmd_page(*pmd) != pmd_page(*pmd_k)); | ||
249 | return pmd_k; | ||
250 | } | ||
251 | |||
252 | /* | ||
253 | * Handle a fault on the vmalloc or module mapping area | ||
254 | * | ||
255 | * This assumes no large pages in there. | ||
256 | */ | ||
257 | static inline int vmalloc_fault(unsigned long address) | ||
258 | { | ||
259 | unsigned long pgd_paddr; | ||
260 | pmd_t *pmd_k; | ||
261 | pte_t *pte_k; | ||
262 | /* | ||
263 | * Synchronize this task's top level page-table | ||
264 | * with the 'reference' page table. | ||
265 | * | ||
266 | * Do _not_ use "current" here. We might be inside | ||
267 | * an interrupt in the middle of a task switch.. | ||
268 | */ | ||
269 | pgd_paddr = read_cr3(); | ||
270 | pmd_k = vmalloc_sync_one(__va(pgd_paddr), address); | ||
271 | if (!pmd_k) | ||
272 | return -1; | ||
273 | pte_k = pte_offset_kernel(pmd_k, address); | ||
274 | if (!pte_present(*pte_k)) | ||
275 | return -1; | ||
276 | return 0; | ||
277 | } | ||
278 | |||
217 | /* | 279 | /* |
218 | * This routine handles page faults. It determines the address, | 280 | * This routine handles page faults. It determines the address, |
219 | * and the problem, and then passes it off to one of the appropriate | 281 | * and the problem, and then passes it off to one of the appropriate |
@@ -223,6 +285,8 @@ fastcall void do_invalid_op(struct pt_regs *, unsigned long); | |||
223 | * bit 0 == 0 means no page found, 1 means protection fault | 285 | * bit 0 == 0 means no page found, 1 means protection fault |
224 | * bit 1 == 0 means read, 1 means write | 286 | * bit 1 == 0 means read, 1 means write |
225 | * bit 2 == 0 means kernel, 1 means user-mode | 287 | * bit 2 == 0 means kernel, 1 means user-mode |
288 | * bit 3 == 1 means use of reserved bit detected | ||
289 | * bit 4 == 1 means fault was an instruction fetch | ||
226 | */ | 290 | */ |
227 | fastcall void __kprobes do_page_fault(struct pt_regs *regs, | 291 | fastcall void __kprobes do_page_fault(struct pt_regs *regs, |
228 | unsigned long error_code) | 292 | unsigned long error_code) |
@@ -237,13 +301,6 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs, | |||
237 | /* get the address */ | 301 | /* get the address */ |
238 | address = read_cr2(); | 302 | address = read_cr2(); |
239 | 303 | ||
240 | if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, | ||
241 | SIGSEGV) == NOTIFY_STOP) | ||
242 | return; | ||
243 | /* It's safe to allow irq's after cr2 has been saved */ | ||
244 | if (regs->eflags & (X86_EFLAGS_IF|VM_MASK)) | ||
245 | local_irq_enable(); | ||
246 | |||
247 | tsk = current; | 304 | tsk = current; |
248 | 305 | ||
249 | si_code = SEGV_MAPERR; | 306 | si_code = SEGV_MAPERR; |
@@ -259,17 +316,29 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs, | |||
259 | * | 316 | * |
260 | * This verifies that the fault happens in kernel space | 317 | * This verifies that the fault happens in kernel space |
261 | * (error_code & 4) == 0, and that the fault was not a | 318 | * (error_code & 4) == 0, and that the fault was not a |
262 | * protection error (error_code & 1) == 0. | 319 | * protection error (error_code & 9) == 0. |
263 | */ | 320 | */ |
264 | if (unlikely(address >= TASK_SIZE)) { | 321 | if (unlikely(address >= TASK_SIZE)) { |
265 | if (!(error_code & 5)) | 322 | if (!(error_code & 0x0000000d) && vmalloc_fault(address) >= 0) |
266 | goto vmalloc_fault; | 323 | return; |
267 | /* | 324 | if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, |
325 | SIGSEGV) == NOTIFY_STOP) | ||
326 | return; | ||
327 | /* | ||
268 | * Don't take the mm semaphore here. If we fixup a prefetch | 328 | * Don't take the mm semaphore here. If we fixup a prefetch |
269 | * fault we could otherwise deadlock. | 329 | * fault we could otherwise deadlock. |
270 | */ | 330 | */ |
271 | goto bad_area_nosemaphore; | 331 | goto bad_area_nosemaphore; |
272 | } | 332 | } |
333 | |||
334 | if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, | ||
335 | SIGSEGV) == NOTIFY_STOP) | ||
336 | return; | ||
337 | |||
338 | /* It's safe to allow irq's after cr2 has been saved and the vmalloc | ||
339 | fault has been handled. */ | ||
340 | if (regs->eflags & (X86_EFLAGS_IF|VM_MASK)) | ||
341 | local_irq_enable(); | ||
273 | 342 | ||
274 | mm = tsk->mm; | 343 | mm = tsk->mm; |
275 | 344 | ||
@@ -440,24 +509,31 @@ no_context: | |||
440 | 509 | ||
441 | bust_spinlocks(1); | 510 | bust_spinlocks(1); |
442 | 511 | ||
443 | #ifdef CONFIG_X86_PAE | 512 | if (oops_may_print()) { |
444 | if (error_code & 16) { | 513 | #ifdef CONFIG_X86_PAE |
445 | pte_t *pte = lookup_address(address); | 514 | if (error_code & 16) { |
515 | pte_t *pte = lookup_address(address); | ||
446 | 516 | ||
447 | if (pte && pte_present(*pte) && !pte_exec_kernel(*pte)) | 517 | if (pte && pte_present(*pte) && !pte_exec_kernel(*pte)) |
448 | printk(KERN_CRIT "kernel tried to execute NX-protected page - exploit attempt? (uid: %d)\n", current->uid); | 518 | printk(KERN_CRIT "kernel tried to execute " |
519 | "NX-protected page - exploit attempt? " | ||
520 | "(uid: %d)\n", current->uid); | ||
521 | } | ||
522 | #endif | ||
523 | if (address < PAGE_SIZE) | ||
524 | printk(KERN_ALERT "BUG: unable to handle kernel NULL " | ||
525 | "pointer dereference"); | ||
526 | else | ||
527 | printk(KERN_ALERT "BUG: unable to handle kernel paging" | ||
528 | " request"); | ||
529 | printk(" at virtual address %08lx\n",address); | ||
530 | printk(KERN_ALERT " printing eip:\n"); | ||
531 | printk("%08lx\n", regs->eip); | ||
449 | } | 532 | } |
450 | #endif | ||
451 | if (address < PAGE_SIZE) | ||
452 | printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference"); | ||
453 | else | ||
454 | printk(KERN_ALERT "Unable to handle kernel paging request"); | ||
455 | printk(" at virtual address %08lx\n",address); | ||
456 | printk(KERN_ALERT " printing eip:\n"); | ||
457 | printk("%08lx\n", regs->eip); | ||
458 | page = read_cr3(); | 533 | page = read_cr3(); |
459 | page = ((unsigned long *) __va(page))[address >> 22]; | 534 | page = ((unsigned long *) __va(page))[address >> 22]; |
460 | printk(KERN_ALERT "*pde = %08lx\n", page); | 535 | if (oops_may_print()) |
536 | printk(KERN_ALERT "*pde = %08lx\n", page); | ||
461 | /* | 537 | /* |
462 | * We must not directly access the pte in the highpte | 538 | * We must not directly access the pte in the highpte |
463 | * case, the page table might be allocated in highmem. | 539 | * case, the page table might be allocated in highmem. |
@@ -465,7 +541,7 @@ no_context: | |||
465 | * it's allocated already. | 541 | * it's allocated already. |
466 | */ | 542 | */ |
467 | #ifndef CONFIG_HIGHPTE | 543 | #ifndef CONFIG_HIGHPTE |
468 | if (page & 1) { | 544 | if ((page & 1) && oops_may_print()) { |
469 | page &= PAGE_MASK; | 545 | page &= PAGE_MASK; |
470 | address &= 0x003ff000; | 546 | address &= 0x003ff000; |
471 | page = ((unsigned long *) __va(page))[address >> PAGE_SHIFT]; | 547 | page = ((unsigned long *) __va(page))[address >> PAGE_SHIFT]; |
@@ -510,51 +586,41 @@ do_sigbus: | |||
510 | tsk->thread.error_code = error_code; | 586 | tsk->thread.error_code = error_code; |
511 | tsk->thread.trap_no = 14; | 587 | tsk->thread.trap_no = 14; |
512 | force_sig_info_fault(SIGBUS, BUS_ADRERR, address, tsk); | 588 | force_sig_info_fault(SIGBUS, BUS_ADRERR, address, tsk); |
513 | return; | 589 | } |
514 | |||
515 | vmalloc_fault: | ||
516 | { | ||
517 | /* | ||
518 | * Synchronize this task's top level page-table | ||
519 | * with the 'reference' page table. | ||
520 | * | ||
521 | * Do _not_ use "tsk" here. We might be inside | ||
522 | * an interrupt in the middle of a task switch.. | ||
523 | */ | ||
524 | int index = pgd_index(address); | ||
525 | unsigned long pgd_paddr; | ||
526 | pgd_t *pgd, *pgd_k; | ||
527 | pud_t *pud, *pud_k; | ||
528 | pmd_t *pmd, *pmd_k; | ||
529 | pte_t *pte_k; | ||
530 | |||
531 | pgd_paddr = read_cr3(); | ||
532 | pgd = index + (pgd_t *)__va(pgd_paddr); | ||
533 | pgd_k = init_mm.pgd + index; | ||
534 | |||
535 | if (!pgd_present(*pgd_k)) | ||
536 | goto no_context; | ||
537 | |||
538 | /* | ||
539 | * set_pgd(pgd, *pgd_k); here would be useless on PAE | ||
540 | * and redundant with the set_pmd() on non-PAE. As would | ||
541 | * set_pud. | ||
542 | */ | ||
543 | 590 | ||
544 | pud = pud_offset(pgd, address); | 591 | #ifndef CONFIG_X86_PAE |
545 | pud_k = pud_offset(pgd_k, address); | 592 | void vmalloc_sync_all(void) |
546 | if (!pud_present(*pud_k)) | 593 | { |
547 | goto no_context; | 594 | /* |
548 | 595 | * Note that races in the updates of insync and start aren't | |
549 | pmd = pmd_offset(pud, address); | 596 | * problematic: insync can only get set bits added, and updates to |
550 | pmd_k = pmd_offset(pud_k, address); | 597 | * start are only improving performance (without affecting correctness |
551 | if (!pmd_present(*pmd_k)) | 598 | * if undone). |
552 | goto no_context; | 599 | */ |
553 | set_pmd(pmd, *pmd_k); | 600 | static DECLARE_BITMAP(insync, PTRS_PER_PGD); |
601 | static unsigned long start = TASK_SIZE; | ||
602 | unsigned long address; | ||
554 | 603 | ||
555 | pte_k = pte_offset_kernel(pmd_k, address); | 604 | BUILD_BUG_ON(TASK_SIZE & ~PGDIR_MASK); |
556 | if (!pte_present(*pte_k)) | 605 | for (address = start; address >= TASK_SIZE; address += PGDIR_SIZE) { |
557 | goto no_context; | 606 | if (!test_bit(pgd_index(address), insync)) { |
558 | return; | 607 | unsigned long flags; |
608 | struct page *page; | ||
609 | |||
610 | spin_lock_irqsave(&pgd_lock, flags); | ||
611 | for (page = pgd_list; page; page = | ||
612 | (struct page *)page->index) | ||
613 | if (!vmalloc_sync_one(page_address(page), | ||
614 | address)) { | ||
615 | BUG_ON(page != pgd_list); | ||
616 | break; | ||
617 | } | ||
618 | spin_unlock_irqrestore(&pgd_lock, flags); | ||
619 | if (!page) | ||
620 | set_bit(pgd_index(address), insync); | ||
621 | } | ||
622 | if (address == start && test_bit(pgd_index(address), insync)) | ||
623 | start = address + PGDIR_SIZE; | ||
559 | } | 624 | } |
560 | } | 625 | } |
626 | #endif | ||
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c index 7ba55a6e2dbc..9f66ac582a8b 100644 --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c | |||
@@ -720,21 +720,6 @@ static int noinline do_test_wp_bit(void) | |||
720 | return flag; | 720 | return flag; |
721 | } | 721 | } |
722 | 722 | ||
723 | void free_initmem(void) | ||
724 | { | ||
725 | unsigned long addr; | ||
726 | |||
727 | addr = (unsigned long)(&__init_begin); | ||
728 | for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { | ||
729 | ClearPageReserved(virt_to_page(addr)); | ||
730 | init_page_count(virt_to_page(addr)); | ||
731 | memset((void *)addr, 0xcc, PAGE_SIZE); | ||
732 | free_page(addr); | ||
733 | totalram_pages++; | ||
734 | } | ||
735 | printk (KERN_INFO "Freeing unused kernel memory: %dk freed\n", (__init_end - __init_begin) >> 10); | ||
736 | } | ||
737 | |||
738 | #ifdef CONFIG_DEBUG_RODATA | 723 | #ifdef CONFIG_DEBUG_RODATA |
739 | 724 | ||
740 | extern char __start_rodata, __end_rodata; | 725 | extern char __start_rodata, __end_rodata; |
@@ -758,17 +743,31 @@ void mark_rodata_ro(void) | |||
758 | } | 743 | } |
759 | #endif | 744 | #endif |
760 | 745 | ||
746 | void free_init_pages(char *what, unsigned long begin, unsigned long end) | ||
747 | { | ||
748 | unsigned long addr; | ||
749 | |||
750 | for (addr = begin; addr < end; addr += PAGE_SIZE) { | ||
751 | ClearPageReserved(virt_to_page(addr)); | ||
752 | init_page_count(virt_to_page(addr)); | ||
753 | memset((void *)addr, 0xcc, PAGE_SIZE); | ||
754 | free_page(addr); | ||
755 | totalram_pages++; | ||
756 | } | ||
757 | printk(KERN_INFO "Freeing %s: %ldk freed\n", what, (end - begin) >> 10); | ||
758 | } | ||
759 | |||
760 | void free_initmem(void) | ||
761 | { | ||
762 | free_init_pages("unused kernel memory", | ||
763 | (unsigned long)(&__init_begin), | ||
764 | (unsigned long)(&__init_end)); | ||
765 | } | ||
761 | 766 | ||
762 | #ifdef CONFIG_BLK_DEV_INITRD | 767 | #ifdef CONFIG_BLK_DEV_INITRD |
763 | void free_initrd_mem(unsigned long start, unsigned long end) | 768 | void free_initrd_mem(unsigned long start, unsigned long end) |
764 | { | 769 | { |
765 | if (start < end) | 770 | free_init_pages("initrd memory", start, end); |
766 | printk (KERN_INFO "Freeing initrd memory: %ldk freed\n", (end - start) >> 10); | ||
767 | for (; start < end; start += PAGE_SIZE) { | ||
768 | ClearPageReserved(virt_to_page(start)); | ||
769 | init_page_count(virt_to_page(start)); | ||
770 | free_page(start); | ||
771 | totalram_pages++; | ||
772 | } | ||
773 | } | 771 | } |
774 | #endif | 772 | #endif |
773 | |||
diff --git a/arch/i386/oprofile/nmi_int.c b/arch/i386/oprofile/nmi_int.c index 0493e8b8ec49..1accce50c2c7 100644 --- a/arch/i386/oprofile/nmi_int.c +++ b/arch/i386/oprofile/nmi_int.c | |||
@@ -122,7 +122,7 @@ static void nmi_save_registers(void * dummy) | |||
122 | static void free_msrs(void) | 122 | static void free_msrs(void) |
123 | { | 123 | { |
124 | int i; | 124 | int i; |
125 | for (i = 0; i < NR_CPUS; ++i) { | 125 | for_each_cpu(i) { |
126 | kfree(cpu_msrs[i].counters); | 126 | kfree(cpu_msrs[i].counters); |
127 | cpu_msrs[i].counters = NULL; | 127 | cpu_msrs[i].counters = NULL; |
128 | kfree(cpu_msrs[i].controls); | 128 | kfree(cpu_msrs[i].controls); |
@@ -138,10 +138,7 @@ static int allocate_msrs(void) | |||
138 | size_t counters_size = sizeof(struct op_msr) * model->num_counters; | 138 | size_t counters_size = sizeof(struct op_msr) * model->num_counters; |
139 | 139 | ||
140 | int i; | 140 | int i; |
141 | for (i = 0; i < NR_CPUS; ++i) { | 141 | for_each_online_cpu(i) { |
142 | if (!cpu_online(i)) | ||
143 | continue; | ||
144 | |||
145 | cpu_msrs[i].counters = kmalloc(counters_size, GFP_KERNEL); | 142 | cpu_msrs[i].counters = kmalloc(counters_size, GFP_KERNEL); |
146 | if (!cpu_msrs[i].counters) { | 143 | if (!cpu_msrs[i].counters) { |
147 | success = 0; | 144 | success = 0; |
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c index 626cdc83668b..0e5c6ae50228 100644 --- a/arch/ia64/hp/sim/simserial.c +++ b/arch/ia64/hp/sim/simserial.c | |||
@@ -46,11 +46,6 @@ | |||
46 | #define KEYBOARD_INTR 3 /* must match with simulator! */ | 46 | #define KEYBOARD_INTR 3 /* must match with simulator! */ |
47 | 47 | ||
48 | #define NR_PORTS 1 /* only one port for now */ | 48 | #define NR_PORTS 1 /* only one port for now */ |
49 | #define SERIAL_INLINE 1 | ||
50 | |||
51 | #ifdef SERIAL_INLINE | ||
52 | #define _INLINE_ inline | ||
53 | #endif | ||
54 | 49 | ||
55 | #define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT) | 50 | #define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT) |
56 | 51 | ||
@@ -237,7 +232,7 @@ static void rs_put_char(struct tty_struct *tty, unsigned char ch) | |||
237 | local_irq_restore(flags); | 232 | local_irq_restore(flags); |
238 | } | 233 | } |
239 | 234 | ||
240 | static _INLINE_ void transmit_chars(struct async_struct *info, int *intr_done) | 235 | static void transmit_chars(struct async_struct *info, int *intr_done) |
241 | { | 236 | { |
242 | int count; | 237 | int count; |
243 | unsigned long flags; | 238 | unsigned long flags; |
diff --git a/arch/m32r/kernel/irq.c b/arch/m32r/kernel/irq.c index 1ce63926a3c0..a4634b06f675 100644 --- a/arch/m32r/kernel/irq.c +++ b/arch/m32r/kernel/irq.c | |||
@@ -37,9 +37,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
37 | 37 | ||
38 | if (i == 0) { | 38 | if (i == 0) { |
39 | seq_printf(p, " "); | 39 | seq_printf(p, " "); |
40 | for (j=0; j<NR_CPUS; j++) | 40 | for_each_online_cpu(j) |
41 | if (cpu_online(j)) | 41 | seq_printf(p, "CPU%d ",j); |
42 | seq_printf(p, "CPU%d ",j); | ||
43 | seq_putc(p, '\n'); | 42 | seq_putc(p, '\n'); |
44 | } | 43 | } |
45 | 44 | ||
@@ -52,9 +51,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
52 | #ifndef CONFIG_SMP | 51 | #ifndef CONFIG_SMP |
53 | seq_printf(p, "%10u ", kstat_irqs(i)); | 52 | seq_printf(p, "%10u ", kstat_irqs(i)); |
54 | #else | 53 | #else |
55 | for (j = 0; j < NR_CPUS; j++) | 54 | for_each_online_cpu(j) |
56 | if (cpu_online(j)) | 55 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); |
57 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); | ||
58 | #endif | 56 | #endif |
59 | seq_printf(p, " %14s", irq_desc[i].handler->typename); | 57 | seq_printf(p, " %14s", irq_desc[i].handler->typename); |
60 | seq_printf(p, " %s", action->name); | 58 | seq_printf(p, " %s", action->name); |
diff --git a/arch/m68k/bvme6000/rtc.c b/arch/m68k/bvme6000/rtc.c index 703cbc6dc9cc..15c16b62dff5 100644 --- a/arch/m68k/bvme6000/rtc.c +++ b/arch/m68k/bvme6000/rtc.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/mc146818rtc.h> /* For struct rtc_time and ioctls, etc */ | 19 | #include <linux/mc146818rtc.h> /* For struct rtc_time and ioctls, etc */ |
20 | #include <linux/smp_lock.h> | 20 | #include <linux/smp_lock.h> |
21 | #include <linux/bcd.h> | ||
21 | #include <asm/bvme6000hw.h> | 22 | #include <asm/bvme6000hw.h> |
22 | 23 | ||
23 | #include <asm/io.h> | 24 | #include <asm/io.h> |
@@ -32,9 +33,6 @@ | |||
32 | * ioctls. | 33 | * ioctls. |
33 | */ | 34 | */ |
34 | 35 | ||
35 | #define BCD2BIN(val) (((val)&15) + ((val)>>4)*10) | ||
36 | #define BIN2BCD(val) ((((val)/10)<<4) + (val)%10) | ||
37 | |||
38 | static unsigned char days_in_mo[] = | 36 | static unsigned char days_in_mo[] = |
39 | {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; | 37 | {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; |
40 | 38 | ||
diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c index 7d93992e462c..3dd76b3d2967 100644 --- a/arch/mips/kernel/irq.c +++ b/arch/mips/kernel/irq.c | |||
@@ -68,9 +68,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
68 | 68 | ||
69 | if (i == 0) { | 69 | if (i == 0) { |
70 | seq_printf(p, " "); | 70 | seq_printf(p, " "); |
71 | for (j=0; j<NR_CPUS; j++) | 71 | for_each_online_cpu(j) |
72 | if (cpu_online(j)) | 72 | seq_printf(p, "CPU%d ",j); |
73 | seq_printf(p, "CPU%d ",j); | ||
74 | seq_putc(p, '\n'); | 73 | seq_putc(p, '\n'); |
75 | } | 74 | } |
76 | 75 | ||
@@ -83,9 +82,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
83 | #ifndef CONFIG_SMP | 82 | #ifndef CONFIG_SMP |
84 | seq_printf(p, "%10u ", kstat_irqs(i)); | 83 | seq_printf(p, "%10u ", kstat_irqs(i)); |
85 | #else | 84 | #else |
86 | for (j = 0; j < NR_CPUS; j++) | 85 | for_each_online_cpu(j) |
87 | if (cpu_online(j)) | 86 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); |
88 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); | ||
89 | #endif | 87 | #endif |
90 | seq_printf(p, " %14s", irq_desc[i].handler->typename); | 88 | seq_printf(p, " %14s", irq_desc[i].handler->typename); |
91 | seq_printf(p, " %s", action->name); | 89 | seq_printf(p, " %s", action->name); |
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index 06ed90752424..78d171bfa331 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c | |||
@@ -167,8 +167,8 @@ int smp_call_function (void (*func) (void *info), void *info, int retry, | |||
167 | mb(); | 167 | mb(); |
168 | 168 | ||
169 | /* Send a message to all other CPUs and wait for them to respond */ | 169 | /* Send a message to all other CPUs and wait for them to respond */ |
170 | for (i = 0; i < NR_CPUS; i++) | 170 | for_each_online_cpu(i) |
171 | if (cpu_online(i) && i != cpu) | 171 | if (i != cpu) |
172 | core_send_ipi(i, SMP_CALL_FUNCTION); | 172 | core_send_ipi(i, SMP_CALL_FUNCTION); |
173 | 173 | ||
174 | /* Wait for response */ | 174 | /* Wait for response */ |
diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c index 73e5e52781d8..2854ac4c9be1 100644 --- a/arch/mips/sgi-ip27/ip27-irq.c +++ b/arch/mips/sgi-ip27/ip27-irq.c | |||
@@ -88,12 +88,9 @@ static inline int find_level(cpuid_t *cpunum, int irq) | |||
88 | { | 88 | { |
89 | int cpu, i; | 89 | int cpu, i; |
90 | 90 | ||
91 | for (cpu = 0; cpu <= NR_CPUS; cpu++) { | 91 | for_each_online_cpu(cpu) { |
92 | struct slice_data *si = cpu_data[cpu].data; | 92 | struct slice_data *si = cpu_data[cpu].data; |
93 | 93 | ||
94 | if (!cpu_online(cpu)) | ||
95 | continue; | ||
96 | |||
97 | for (i = BASE_PCI_IRQ; i < LEVELS_PER_SLICE; i++) | 94 | for (i = BASE_PCI_IRQ; i < LEVELS_PER_SLICE; i++) |
98 | if (si->level_to_irq[i] == irq) { | 95 | if (si->level_to_irq[i] == irq) { |
99 | *cpunum = cpu; | 96 | *cpunum = cpu; |
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index 25564b7ca6bb..d6ac1c60a471 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c | |||
@@ -298,8 +298,8 @@ send_IPI_allbutself(enum ipi_message_type op) | |||
298 | { | 298 | { |
299 | int i; | 299 | int i; |
300 | 300 | ||
301 | for (i = 0; i < NR_CPUS; i++) { | 301 | for_each_online_cpu(i) { |
302 | if (cpu_online(i) && i != smp_processor_id()) | 302 | if (i != smp_processor_id()) |
303 | send_IPI_single(i, op); | 303 | send_IPI_single(i, op); |
304 | } | 304 | } |
305 | } | 305 | } |
@@ -643,14 +643,13 @@ int sys_cpus(int argc, char **argv) | |||
643 | if ( argc == 1 ){ | 643 | if ( argc == 1 ){ |
644 | 644 | ||
645 | #ifdef DUMP_MORE_STATE | 645 | #ifdef DUMP_MORE_STATE |
646 | for(i=0; i<NR_CPUS; i++) { | 646 | for_each_online_cpu(i) { |
647 | int cpus_per_line = 4; | 647 | int cpus_per_line = 4; |
648 | if(cpu_online(i)) { | 648 | |
649 | if (j++ % cpus_per_line) | 649 | if (j++ % cpus_per_line) |
650 | printk(" %3d",i); | 650 | printk(" %3d",i); |
651 | else | 651 | else |
652 | printk("\n %3d",i); | 652 | printk("\n %3d",i); |
653 | } | ||
654 | } | 653 | } |
655 | printk("\n"); | 654 | printk("\n"); |
656 | #else | 655 | #else |
@@ -659,9 +658,7 @@ int sys_cpus(int argc, char **argv) | |||
659 | } else if((argc==2) && !(strcmp(argv[1],"-l"))) { | 658 | } else if((argc==2) && !(strcmp(argv[1],"-l"))) { |
660 | printk("\nCPUSTATE TASK CPUNUM CPUID HARDCPU(HPA)\n"); | 659 | printk("\nCPUSTATE TASK CPUNUM CPUID HARDCPU(HPA)\n"); |
661 | #ifdef DUMP_MORE_STATE | 660 | #ifdef DUMP_MORE_STATE |
662 | for(i=0;i<NR_CPUS;i++) { | 661 | for_each_online_cpu(i) { |
663 | if (!cpu_online(i)) | ||
664 | continue; | ||
665 | if (cpu_data[i].cpuid != NO_PROC_ID) { | 662 | if (cpu_data[i].cpuid != NO_PROC_ID) { |
666 | switch(cpu_data[i].state) { | 663 | switch(cpu_data[i].state) { |
667 | case STATE_RENDEZVOUS: | 664 | case STATE_RENDEZVOUS: |
@@ -695,9 +692,7 @@ int sys_cpus(int argc, char **argv) | |||
695 | } else if ((argc==2) && !(strcmp(argv[1],"-s"))) { | 692 | } else if ((argc==2) && !(strcmp(argv[1],"-s"))) { |
696 | #ifdef DUMP_MORE_STATE | 693 | #ifdef DUMP_MORE_STATE |
697 | printk("\nCPUSTATE CPUID\n"); | 694 | printk("\nCPUSTATE CPUID\n"); |
698 | for (i=0;i<NR_CPUS;i++) { | 695 | for_each_online_cpu(i) { |
699 | if (!cpu_online(i)) | ||
700 | continue; | ||
701 | if (cpu_data[i].cpuid != NO_PROC_ID) { | 696 | if (cpu_data[i].cpuid != NO_PROC_ID) { |
702 | switch(cpu_data[i].state) { | 697 | switch(cpu_data[i].state) { |
703 | case STATE_RENDEZVOUS: | 698 | case STATE_RENDEZVOUS: |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index dfba81719dec..fae42da7468d 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -127,6 +127,12 @@ config PPC_83xx | |||
127 | select 83xx | 127 | select 83xx |
128 | select PPC_FPU | 128 | select PPC_FPU |
129 | 129 | ||
130 | config PPC_85xx | ||
131 | bool "Freescale 85xx" | ||
132 | select E500 | ||
133 | select FSL_SOC | ||
134 | select 85xx | ||
135 | |||
130 | config 40x | 136 | config 40x |
131 | bool "AMCC 40x" | 137 | bool "AMCC 40x" |
132 | 138 | ||
@@ -139,8 +145,6 @@ config 8xx | |||
139 | config E200 | 145 | config E200 |
140 | bool "Freescale e200" | 146 | bool "Freescale e200" |
141 | 147 | ||
142 | config E500 | ||
143 | bool "Freescale e500" | ||
144 | endchoice | 148 | endchoice |
145 | 149 | ||
146 | config POWER4_ONLY | 150 | config POWER4_ONLY |
@@ -168,6 +172,13 @@ config 6xx | |||
168 | config 83xx | 172 | config 83xx |
169 | bool | 173 | bool |
170 | 174 | ||
175 | # this is temp to handle compat with arch=ppc | ||
176 | config 85xx | ||
177 | bool | ||
178 | |||
179 | config E500 | ||
180 | bool | ||
181 | |||
171 | config PPC_FPU | 182 | config PPC_FPU |
172 | bool | 183 | bool |
173 | default y if PPC64 | 184 | default y if PPC64 |
@@ -217,6 +228,7 @@ config ALTIVEC | |||
217 | config SPE | 228 | config SPE |
218 | bool "SPE Support" | 229 | bool "SPE Support" |
219 | depends on E200 || E500 | 230 | depends on E200 || E500 |
231 | default y | ||
220 | ---help--- | 232 | ---help--- |
221 | This option enables kernel support for the Signal Processing | 233 | This option enables kernel support for the Signal Processing |
222 | Extensions (SPE) to the PowerPC processor. The kernel currently | 234 | Extensions (SPE) to the PowerPC processor. The kernel currently |
@@ -238,6 +250,21 @@ config PPC_STD_MMU_32 | |||
238 | def_bool y | 250 | def_bool y |
239 | depends on PPC_STD_MMU && PPC32 | 251 | depends on PPC_STD_MMU && PPC32 |
240 | 252 | ||
253 | config VIRT_CPU_ACCOUNTING | ||
254 | bool "Deterministic task and CPU time accounting" | ||
255 | depends on PPC64 | ||
256 | default y | ||
257 | help | ||
258 | Select this option to enable more accurate task and CPU time | ||
259 | accounting. This is done by reading a CPU counter on each | ||
260 | kernel entry and exit and on transitions within the kernel | ||
261 | between system, softirq and hardirq state, so there is a | ||
262 | small performance impact. This also enables accounting of | ||
263 | stolen time on logically-partitioned systems running on | ||
264 | IBM POWER5-based machines. | ||
265 | |||
266 | If in doubt, say Y here. | ||
267 | |||
241 | config SMP | 268 | config SMP |
242 | depends on PPC_STD_MMU | 269 | depends on PPC_STD_MMU |
243 | bool "Symmetric multi-processing support" | 270 | bool "Symmetric multi-processing support" |
@@ -734,13 +761,12 @@ config GENERIC_ISA_DMA | |||
734 | 761 | ||
735 | config PPC_I8259 | 762 | config PPC_I8259 |
736 | bool | 763 | bool |
737 | default y if 85xx | ||
738 | default n | 764 | default n |
739 | 765 | ||
740 | config PPC_INDIRECT_PCI | 766 | config PPC_INDIRECT_PCI |
741 | bool | 767 | bool |
742 | depends on PCI | 768 | depends on PCI |
743 | default y if 40x || 44x || 85xx | 769 | default y if 40x || 44x |
744 | default n | 770 | default n |
745 | 771 | ||
746 | config EISA | 772 | config EISA |
@@ -757,8 +783,8 @@ config MCA | |||
757 | bool | 783 | bool |
758 | 784 | ||
759 | config PCI | 785 | config PCI |
760 | bool "PCI support" if 40x || CPM2 || PPC_83xx || 85xx || PPC_MPC52xx || (EMBEDDED && PPC_ISERIES) | 786 | bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_MPC52xx || (EMBEDDED && PPC_ISERIES) |
761 | default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx && !85xx | 787 | default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx && !PPC_85xx |
762 | default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS | 788 | default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS |
763 | default PCI_QSPAN if !4xx && !CPM2 && 8xx | 789 | default PCI_QSPAN if !4xx && !CPM2 && 8xx |
764 | help | 790 | help |
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 5500ab55d042..a3fc7a23158f 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
@@ -148,7 +148,7 @@ all: $(KBUILD_IMAGE) | |||
148 | 148 | ||
149 | CPPFLAGS_vmlinux.lds := -Upowerpc | 149 | CPPFLAGS_vmlinux.lds := -Upowerpc |
150 | 150 | ||
151 | BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm uImage | 151 | BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm uImage vmlinux.bin |
152 | 152 | ||
153 | .PHONY: $(BOOT_TARGETS) | 153 | .PHONY: $(BOOT_TARGETS) |
154 | 154 | ||
diff --git a/arch/powerpc/boot/install.sh b/arch/powerpc/boot/install.sh index eacce9590816..b002bfd56786 100644 --- a/arch/powerpc/boot/install.sh +++ b/arch/powerpc/boot/install.sh | |||
@@ -1,7 +1,5 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | 2 | # |
3 | # arch/ppc64/boot/install.sh | ||
4 | # | ||
5 | # This file is subject to the terms and conditions of the GNU General Public | 3 | # This file is subject to the terms and conditions of the GNU General Public |
6 | # License. See the file "COPYING" in the main directory of this archive | 4 | # License. See the file "COPYING" in the main directory of this archive |
7 | # for more details. | 5 | # for more details. |
diff --git a/arch/powerpc/boot/main.c b/arch/powerpc/boot/main.c index 55ec59867250..816446f0e497 100644 --- a/arch/powerpc/boot/main.c +++ b/arch/powerpc/boot/main.c | |||
@@ -152,7 +152,7 @@ static int is_elf64(void *hdr) | |||
152 | elf64ph = (Elf64_Phdr *)((unsigned long)elf64 + | 152 | elf64ph = (Elf64_Phdr *)((unsigned long)elf64 + |
153 | (unsigned long)elf64->e_phoff); | 153 | (unsigned long)elf64->e_phoff); |
154 | for (i = 0; i < (unsigned int)elf64->e_phnum; i++, elf64ph++) | 154 | for (i = 0; i < (unsigned int)elf64->e_phnum; i++, elf64ph++) |
155 | if (elf64ph->p_type == PT_LOAD && elf64ph->p_offset != 0) | 155 | if (elf64ph->p_type == PT_LOAD) |
156 | break; | 156 | break; |
157 | if (i >= (unsigned int)elf64->e_phnum) | 157 | if (i >= (unsigned int)elf64->e_phnum) |
158 | return 0; | 158 | return 0; |
@@ -193,7 +193,7 @@ static int is_elf32(void *hdr) | |||
193 | elf32 = (Elf32_Ehdr *)elfheader; | 193 | elf32 = (Elf32_Ehdr *)elfheader; |
194 | elf32ph = (Elf32_Phdr *) ((unsigned long)elf32 + elf32->e_phoff); | 194 | elf32ph = (Elf32_Phdr *) ((unsigned long)elf32 + elf32->e_phoff); |
195 | for (i = 0; i < elf32->e_phnum; i++, elf32ph++) | 195 | for (i = 0; i < elf32->e_phnum; i++, elf32ph++) |
196 | if (elf32ph->p_type == PT_LOAD && elf32ph->p_offset != 0) | 196 | if (elf32ph->p_type == PT_LOAD) |
197 | break; | 197 | break; |
198 | if (i >= elf32->e_phnum) | 198 | if (i >= elf32->e_phnum) |
199 | return 0; | 199 | return 0; |
diff --git a/arch/powerpc/configs/mpc8540_ads_defconfig b/arch/powerpc/configs/mpc8540_ads_defconfig new file mode 100644 index 000000000000..2a8290ee15c6 --- /dev/null +++ b/arch/powerpc/configs/mpc8540_ads_defconfig | |||
@@ -0,0 +1,721 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: | ||
4 | # Sat Jan 14 15:57:54 2006 | ||
5 | # | ||
6 | # CONFIG_PPC64 is not set | ||
7 | CONFIG_PPC32=y | ||
8 | CONFIG_PPC_MERGE=y | ||
9 | CONFIG_MMU=y | ||
10 | CONFIG_GENERIC_HARDIRQS=y | ||
11 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
12 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
13 | CONFIG_PPC=y | ||
14 | CONFIG_EARLY_PRINTK=y | ||
15 | CONFIG_GENERIC_NVRAM=y | ||
16 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
17 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
18 | CONFIG_PPC_OF=y | ||
19 | CONFIG_PPC_UDBG_16550=y | ||
20 | # CONFIG_GENERIC_TBSYNC is not set | ||
21 | |||
22 | # | ||
23 | # Processor support | ||
24 | # | ||
25 | # CONFIG_CLASSIC32 is not set | ||
26 | # CONFIG_PPC_52xx is not set | ||
27 | # CONFIG_PPC_82xx is not set | ||
28 | # CONFIG_PPC_83xx is not set | ||
29 | CONFIG_PPC_85xx=y | ||
30 | # CONFIG_40x is not set | ||
31 | # CONFIG_44x is not set | ||
32 | # CONFIG_8xx is not set | ||
33 | # CONFIG_E200 is not set | ||
34 | CONFIG_85xx=y | ||
35 | CONFIG_E500=y | ||
36 | CONFIG_BOOKE=y | ||
37 | CONFIG_FSL_BOOKE=y | ||
38 | # CONFIG_PHYS_64BIT is not set | ||
39 | CONFIG_SPE=y | ||
40 | |||
41 | # | ||
42 | # Code maturity level options | ||
43 | # | ||
44 | CONFIG_EXPERIMENTAL=y | ||
45 | CONFIG_CLEAN_COMPILE=y | ||
46 | CONFIG_BROKEN_ON_SMP=y | ||
47 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
48 | |||
49 | # | ||
50 | # General setup | ||
51 | # | ||
52 | CONFIG_LOCALVERSION="" | ||
53 | CONFIG_LOCALVERSION_AUTO=y | ||
54 | CONFIG_SWAP=y | ||
55 | CONFIG_SYSVIPC=y | ||
56 | # CONFIG_POSIX_MQUEUE is not set | ||
57 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
58 | CONFIG_SYSCTL=y | ||
59 | # CONFIG_AUDIT is not set | ||
60 | # CONFIG_IKCONFIG is not set | ||
61 | CONFIG_INITRAMFS_SOURCE="" | ||
62 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
63 | CONFIG_EMBEDDED=y | ||
64 | CONFIG_KALLSYMS=y | ||
65 | # CONFIG_KALLSYMS_ALL is not set | ||
66 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
67 | CONFIG_HOTPLUG=y | ||
68 | CONFIG_PRINTK=y | ||
69 | CONFIG_BUG=y | ||
70 | CONFIG_ELF_CORE=y | ||
71 | CONFIG_BASE_FULL=y | ||
72 | CONFIG_FUTEX=y | ||
73 | CONFIG_EPOLL=y | ||
74 | CONFIG_SHMEM=y | ||
75 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
76 | CONFIG_CC_ALIGN_LABELS=0 | ||
77 | CONFIG_CC_ALIGN_LOOPS=0 | ||
78 | CONFIG_CC_ALIGN_JUMPS=0 | ||
79 | CONFIG_SLAB=y | ||
80 | # CONFIG_TINY_SHMEM is not set | ||
81 | CONFIG_BASE_SMALL=0 | ||
82 | # CONFIG_SLOB is not set | ||
83 | |||
84 | # | ||
85 | # Loadable module support | ||
86 | # | ||
87 | # CONFIG_MODULES is not set | ||
88 | |||
89 | # | ||
90 | # Block layer | ||
91 | # | ||
92 | # CONFIG_LBD is not set | ||
93 | |||
94 | # | ||
95 | # IO Schedulers | ||
96 | # | ||
97 | CONFIG_IOSCHED_NOOP=y | ||
98 | CONFIG_IOSCHED_AS=y | ||
99 | CONFIG_IOSCHED_DEADLINE=y | ||
100 | CONFIG_IOSCHED_CFQ=y | ||
101 | CONFIG_DEFAULT_AS=y | ||
102 | # CONFIG_DEFAULT_DEADLINE is not set | ||
103 | # CONFIG_DEFAULT_CFQ is not set | ||
104 | # CONFIG_DEFAULT_NOOP is not set | ||
105 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
106 | CONFIG_MPIC=y | ||
107 | # CONFIG_WANT_EARLY_SERIAL is not set | ||
108 | |||
109 | # | ||
110 | # Platform support | ||
111 | # | ||
112 | CONFIG_MPC8540_ADS=y | ||
113 | CONFIG_MPC8540=y | ||
114 | CONFIG_PPC_INDIRECT_PCI_BE=y | ||
115 | |||
116 | # | ||
117 | # Kernel options | ||
118 | # | ||
119 | # CONFIG_HIGHMEM is not set | ||
120 | # CONFIG_HZ_100 is not set | ||
121 | CONFIG_HZ_250=y | ||
122 | # CONFIG_HZ_1000 is not set | ||
123 | CONFIG_HZ=250 | ||
124 | CONFIG_PREEMPT_NONE=y | ||
125 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
126 | # CONFIG_PREEMPT is not set | ||
127 | CONFIG_BINFMT_ELF=y | ||
128 | CONFIG_BINFMT_MISC=y | ||
129 | CONFIG_MATH_EMULATION=y | ||
130 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
131 | CONFIG_SELECT_MEMORY_MODEL=y | ||
132 | CONFIG_FLATMEM_MANUAL=y | ||
133 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
134 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
135 | CONFIG_FLATMEM=y | ||
136 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
137 | # CONFIG_SPARSEMEM_STATIC is not set | ||
138 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
139 | CONFIG_PROC_DEVICETREE=y | ||
140 | # CONFIG_CMDLINE_BOOL is not set | ||
141 | # CONFIG_PM is not set | ||
142 | # CONFIG_SOFTWARE_SUSPEND is not set | ||
143 | # CONFIG_SECCOMP is not set | ||
144 | CONFIG_ISA_DMA_API=y | ||
145 | |||
146 | # | ||
147 | # Bus options | ||
148 | # | ||
149 | # CONFIG_PPC_I8259 is not set | ||
150 | CONFIG_PPC_INDIRECT_PCI=y | ||
151 | CONFIG_FSL_SOC=y | ||
152 | # CONFIG_PCI is not set | ||
153 | # CONFIG_PCI_DOMAINS is not set | ||
154 | |||
155 | # | ||
156 | # PCCARD (PCMCIA/CardBus) support | ||
157 | # | ||
158 | # CONFIG_PCCARD is not set | ||
159 | |||
160 | # | ||
161 | # PCI Hotplug Support | ||
162 | # | ||
163 | |||
164 | # | ||
165 | # Advanced setup | ||
166 | # | ||
167 | # CONFIG_ADVANCED_OPTIONS is not set | ||
168 | |||
169 | # | ||
170 | # Default settings for advanced configuration options are used | ||
171 | # | ||
172 | CONFIG_HIGHMEM_START=0xfe000000 | ||
173 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
174 | CONFIG_KERNEL_START=0xc0000000 | ||
175 | CONFIG_TASK_SIZE=0x80000000 | ||
176 | CONFIG_BOOT_LOAD=0x00800000 | ||
177 | |||
178 | # | ||
179 | # Networking | ||
180 | # | ||
181 | CONFIG_NET=y | ||
182 | |||
183 | # | ||
184 | # Networking options | ||
185 | # | ||
186 | CONFIG_PACKET=y | ||
187 | # CONFIG_PACKET_MMAP is not set | ||
188 | CONFIG_UNIX=y | ||
189 | # CONFIG_NET_KEY is not set | ||
190 | CONFIG_INET=y | ||
191 | CONFIG_IP_MULTICAST=y | ||
192 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
193 | CONFIG_IP_FIB_HASH=y | ||
194 | CONFIG_IP_PNP=y | ||
195 | CONFIG_IP_PNP_DHCP=y | ||
196 | CONFIG_IP_PNP_BOOTP=y | ||
197 | # CONFIG_IP_PNP_RARP is not set | ||
198 | # CONFIG_NET_IPIP is not set | ||
199 | # CONFIG_NET_IPGRE is not set | ||
200 | # CONFIG_IP_MROUTE is not set | ||
201 | # CONFIG_ARPD is not set | ||
202 | CONFIG_SYN_COOKIES=y | ||
203 | # CONFIG_INET_AH is not set | ||
204 | # CONFIG_INET_ESP is not set | ||
205 | # CONFIG_INET_IPCOMP is not set | ||
206 | # CONFIG_INET_TUNNEL is not set | ||
207 | CONFIG_INET_DIAG=y | ||
208 | CONFIG_INET_TCP_DIAG=y | ||
209 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
210 | CONFIG_TCP_CONG_BIC=y | ||
211 | # CONFIG_IPV6 is not set | ||
212 | # CONFIG_NETFILTER is not set | ||
213 | |||
214 | # | ||
215 | # DCCP Configuration (EXPERIMENTAL) | ||
216 | # | ||
217 | # CONFIG_IP_DCCP is not set | ||
218 | |||
219 | # | ||
220 | # SCTP Configuration (EXPERIMENTAL) | ||
221 | # | ||
222 | # CONFIG_IP_SCTP is not set | ||
223 | # CONFIG_ATM is not set | ||
224 | # CONFIG_BRIDGE is not set | ||
225 | # CONFIG_VLAN_8021Q is not set | ||
226 | # CONFIG_DECNET is not set | ||
227 | # CONFIG_LLC2 is not set | ||
228 | # CONFIG_IPX is not set | ||
229 | # CONFIG_ATALK is not set | ||
230 | # CONFIG_X25 is not set | ||
231 | # CONFIG_LAPB is not set | ||
232 | |||
233 | # | ||
234 | # TIPC Configuration (EXPERIMENTAL) | ||
235 | # | ||
236 | # CONFIG_TIPC is not set | ||
237 | # CONFIG_NET_DIVERT is not set | ||
238 | # CONFIG_ECONET is not set | ||
239 | # CONFIG_WAN_ROUTER is not set | ||
240 | |||
241 | # | ||
242 | # QoS and/or fair queueing | ||
243 | # | ||
244 | # CONFIG_NET_SCHED is not set | ||
245 | |||
246 | # | ||
247 | # Network testing | ||
248 | # | ||
249 | # CONFIG_NET_PKTGEN is not set | ||
250 | # CONFIG_HAMRADIO is not set | ||
251 | # CONFIG_IRDA is not set | ||
252 | # CONFIG_BT is not set | ||
253 | # CONFIG_IEEE80211 is not set | ||
254 | |||
255 | # | ||
256 | # Device Drivers | ||
257 | # | ||
258 | |||
259 | # | ||
260 | # Generic Driver Options | ||
261 | # | ||
262 | CONFIG_STANDALONE=y | ||
263 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
264 | # CONFIG_FW_LOADER is not set | ||
265 | # CONFIG_DEBUG_DRIVER is not set | ||
266 | |||
267 | # | ||
268 | # Connector - unified userspace <-> kernelspace linker | ||
269 | # | ||
270 | # CONFIG_CONNECTOR is not set | ||
271 | |||
272 | # | ||
273 | # Memory Technology Devices (MTD) | ||
274 | # | ||
275 | # CONFIG_MTD is not set | ||
276 | |||
277 | # | ||
278 | # Parallel port support | ||
279 | # | ||
280 | # CONFIG_PARPORT is not set | ||
281 | |||
282 | # | ||
283 | # Plug and Play support | ||
284 | # | ||
285 | |||
286 | # | ||
287 | # Block devices | ||
288 | # | ||
289 | # CONFIG_BLK_DEV_FD is not set | ||
290 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
291 | CONFIG_BLK_DEV_LOOP=y | ||
292 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
293 | # CONFIG_BLK_DEV_NBD is not set | ||
294 | CONFIG_BLK_DEV_RAM=y | ||
295 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
296 | CONFIG_BLK_DEV_RAM_SIZE=32768 | ||
297 | CONFIG_BLK_DEV_INITRD=y | ||
298 | # CONFIG_CDROM_PKTCDVD is not set | ||
299 | # CONFIG_ATA_OVER_ETH is not set | ||
300 | |||
301 | # | ||
302 | # ATA/ATAPI/MFM/RLL support | ||
303 | # | ||
304 | # CONFIG_IDE is not set | ||
305 | |||
306 | # | ||
307 | # SCSI device support | ||
308 | # | ||
309 | # CONFIG_RAID_ATTRS is not set | ||
310 | # CONFIG_SCSI is not set | ||
311 | |||
312 | # | ||
313 | # Multi-device support (RAID and LVM) | ||
314 | # | ||
315 | # CONFIG_MD is not set | ||
316 | |||
317 | # | ||
318 | # Fusion MPT device support | ||
319 | # | ||
320 | # CONFIG_FUSION is not set | ||
321 | |||
322 | # | ||
323 | # IEEE 1394 (FireWire) support | ||
324 | # | ||
325 | |||
326 | # | ||
327 | # I2O device support | ||
328 | # | ||
329 | |||
330 | # | ||
331 | # Macintosh device drivers | ||
332 | # | ||
333 | # CONFIG_WINDFARM is not set | ||
334 | |||
335 | # | ||
336 | # Network device support | ||
337 | # | ||
338 | CONFIG_NETDEVICES=y | ||
339 | # CONFIG_DUMMY is not set | ||
340 | # CONFIG_BONDING is not set | ||
341 | # CONFIG_EQUALIZER is not set | ||
342 | # CONFIG_TUN is not set | ||
343 | |||
344 | # | ||
345 | # PHY device support | ||
346 | # | ||
347 | CONFIG_PHYLIB=y | ||
348 | |||
349 | # | ||
350 | # MII PHY device drivers | ||
351 | # | ||
352 | # CONFIG_MARVELL_PHY is not set | ||
353 | # CONFIG_DAVICOM_PHY is not set | ||
354 | # CONFIG_QSEMI_PHY is not set | ||
355 | # CONFIG_LXT_PHY is not set | ||
356 | # CONFIG_CICADA_PHY is not set | ||
357 | |||
358 | # | ||
359 | # Ethernet (10 or 100Mbit) | ||
360 | # | ||
361 | CONFIG_NET_ETHERNET=y | ||
362 | CONFIG_MII=y | ||
363 | |||
364 | # | ||
365 | # Ethernet (1000 Mbit) | ||
366 | # | ||
367 | CONFIG_GIANFAR=y | ||
368 | CONFIG_GFAR_NAPI=y | ||
369 | |||
370 | # | ||
371 | # Ethernet (10000 Mbit) | ||
372 | # | ||
373 | |||
374 | # | ||
375 | # Token Ring devices | ||
376 | # | ||
377 | |||
378 | # | ||
379 | # Wireless LAN (non-hamradio) | ||
380 | # | ||
381 | # CONFIG_NET_RADIO is not set | ||
382 | |||
383 | # | ||
384 | # Wan interfaces | ||
385 | # | ||
386 | # CONFIG_WAN is not set | ||
387 | # CONFIG_PPP is not set | ||
388 | # CONFIG_SLIP is not set | ||
389 | # CONFIG_SHAPER is not set | ||
390 | # CONFIG_NETCONSOLE is not set | ||
391 | # CONFIG_NETPOLL is not set | ||
392 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
393 | |||
394 | # | ||
395 | # ISDN subsystem | ||
396 | # | ||
397 | # CONFIG_ISDN is not set | ||
398 | |||
399 | # | ||
400 | # Telephony Support | ||
401 | # | ||
402 | # CONFIG_PHONE is not set | ||
403 | |||
404 | # | ||
405 | # Input device support | ||
406 | # | ||
407 | CONFIG_INPUT=y | ||
408 | |||
409 | # | ||
410 | # Userland interfaces | ||
411 | # | ||
412 | # CONFIG_INPUT_MOUSEDEV is not set | ||
413 | # CONFIG_INPUT_JOYDEV is not set | ||
414 | # CONFIG_INPUT_TSDEV is not set | ||
415 | # CONFIG_INPUT_EVDEV is not set | ||
416 | # CONFIG_INPUT_EVBUG is not set | ||
417 | |||
418 | # | ||
419 | # Input Device Drivers | ||
420 | # | ||
421 | # CONFIG_INPUT_KEYBOARD is not set | ||
422 | # CONFIG_INPUT_MOUSE is not set | ||
423 | # CONFIG_INPUT_JOYSTICK is not set | ||
424 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
425 | # CONFIG_INPUT_MISC is not set | ||
426 | |||
427 | # | ||
428 | # Hardware I/O ports | ||
429 | # | ||
430 | # CONFIG_SERIO is not set | ||
431 | # CONFIG_GAMEPORT is not set | ||
432 | |||
433 | # | ||
434 | # Character devices | ||
435 | # | ||
436 | # CONFIG_VT is not set | ||
437 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
438 | |||
439 | # | ||
440 | # Serial drivers | ||
441 | # | ||
442 | CONFIG_SERIAL_8250=y | ||
443 | CONFIG_SERIAL_8250_CONSOLE=y | ||
444 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
445 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
446 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
447 | |||
448 | # | ||
449 | # Non-8250 serial port support | ||
450 | # | ||
451 | CONFIG_SERIAL_CORE=y | ||
452 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
453 | CONFIG_UNIX98_PTYS=y | ||
454 | CONFIG_LEGACY_PTYS=y | ||
455 | CONFIG_LEGACY_PTY_COUNT=256 | ||
456 | |||
457 | # | ||
458 | # IPMI | ||
459 | # | ||
460 | # CONFIG_IPMI_HANDLER is not set | ||
461 | |||
462 | # | ||
463 | # Watchdog Cards | ||
464 | # | ||
465 | # CONFIG_WATCHDOG is not set | ||
466 | # CONFIG_NVRAM is not set | ||
467 | CONFIG_GEN_RTC=y | ||
468 | # CONFIG_GEN_RTC_X is not set | ||
469 | # CONFIG_DTLK is not set | ||
470 | # CONFIG_R3964 is not set | ||
471 | |||
472 | # | ||
473 | # Ftape, the floppy tape device driver | ||
474 | # | ||
475 | # CONFIG_AGP is not set | ||
476 | # CONFIG_RAW_DRIVER is not set | ||
477 | |||
478 | # | ||
479 | # TPM devices | ||
480 | # | ||
481 | # CONFIG_TCG_TPM is not set | ||
482 | # CONFIG_TELCLOCK is not set | ||
483 | |||
484 | # | ||
485 | # I2C support | ||
486 | # | ||
487 | # CONFIG_I2C is not set | ||
488 | |||
489 | # | ||
490 | # Dallas's 1-wire bus | ||
491 | # | ||
492 | # CONFIG_W1 is not set | ||
493 | |||
494 | # | ||
495 | # Hardware Monitoring support | ||
496 | # | ||
497 | CONFIG_HWMON=y | ||
498 | # CONFIG_HWMON_VID is not set | ||
499 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
500 | |||
501 | # | ||
502 | # Misc devices | ||
503 | # | ||
504 | |||
505 | # | ||
506 | # Multimedia Capabilities Port drivers | ||
507 | # | ||
508 | |||
509 | # | ||
510 | # Multimedia devices | ||
511 | # | ||
512 | # CONFIG_VIDEO_DEV is not set | ||
513 | |||
514 | # | ||
515 | # Digital Video Broadcasting Devices | ||
516 | # | ||
517 | # CONFIG_DVB is not set | ||
518 | |||
519 | # | ||
520 | # Graphics support | ||
521 | # | ||
522 | # CONFIG_FB is not set | ||
523 | |||
524 | # | ||
525 | # Sound | ||
526 | # | ||
527 | # CONFIG_SOUND is not set | ||
528 | |||
529 | # | ||
530 | # USB support | ||
531 | # | ||
532 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
533 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
534 | |||
535 | # | ||
536 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
537 | # | ||
538 | |||
539 | # | ||
540 | # USB Gadget Support | ||
541 | # | ||
542 | # CONFIG_USB_GADGET is not set | ||
543 | |||
544 | # | ||
545 | # MMC/SD Card support | ||
546 | # | ||
547 | # CONFIG_MMC is not set | ||
548 | |||
549 | # | ||
550 | # InfiniBand support | ||
551 | # | ||
552 | |||
553 | # | ||
554 | # SN Devices | ||
555 | # | ||
556 | |||
557 | # | ||
558 | # File systems | ||
559 | # | ||
560 | CONFIG_EXT2_FS=y | ||
561 | # CONFIG_EXT2_FS_XATTR is not set | ||
562 | # CONFIG_EXT2_FS_XIP is not set | ||
563 | CONFIG_EXT3_FS=y | ||
564 | CONFIG_EXT3_FS_XATTR=y | ||
565 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
566 | # CONFIG_EXT3_FS_SECURITY is not set | ||
567 | CONFIG_JBD=y | ||
568 | # CONFIG_JBD_DEBUG is not set | ||
569 | CONFIG_FS_MBCACHE=y | ||
570 | # CONFIG_REISERFS_FS is not set | ||
571 | # CONFIG_JFS_FS is not set | ||
572 | # CONFIG_FS_POSIX_ACL is not set | ||
573 | # CONFIG_XFS_FS is not set | ||
574 | # CONFIG_OCFS2_FS is not set | ||
575 | # CONFIG_MINIX_FS is not set | ||
576 | # CONFIG_ROMFS_FS is not set | ||
577 | CONFIG_INOTIFY=y | ||
578 | # CONFIG_QUOTA is not set | ||
579 | CONFIG_DNOTIFY=y | ||
580 | # CONFIG_AUTOFS_FS is not set | ||
581 | # CONFIG_AUTOFS4_FS is not set | ||
582 | # CONFIG_FUSE_FS is not set | ||
583 | |||
584 | # | ||
585 | # CD-ROM/DVD Filesystems | ||
586 | # | ||
587 | # CONFIG_ISO9660_FS is not set | ||
588 | # CONFIG_UDF_FS is not set | ||
589 | |||
590 | # | ||
591 | # DOS/FAT/NT Filesystems | ||
592 | # | ||
593 | # CONFIG_MSDOS_FS is not set | ||
594 | # CONFIG_VFAT_FS is not set | ||
595 | # CONFIG_NTFS_FS is not set | ||
596 | |||
597 | # | ||
598 | # Pseudo filesystems | ||
599 | # | ||
600 | CONFIG_PROC_FS=y | ||
601 | CONFIG_PROC_KCORE=y | ||
602 | CONFIG_SYSFS=y | ||
603 | CONFIG_TMPFS=y | ||
604 | # CONFIG_HUGETLB_PAGE is not set | ||
605 | CONFIG_RAMFS=y | ||
606 | # CONFIG_RELAYFS_FS is not set | ||
607 | # CONFIG_CONFIGFS_FS is not set | ||
608 | |||
609 | # | ||
610 | # Miscellaneous filesystems | ||
611 | # | ||
612 | # CONFIG_ADFS_FS is not set | ||
613 | # CONFIG_AFFS_FS is not set | ||
614 | # CONFIG_HFS_FS is not set | ||
615 | # CONFIG_HFSPLUS_FS is not set | ||
616 | # CONFIG_BEFS_FS is not set | ||
617 | # CONFIG_BFS_FS is not set | ||
618 | # CONFIG_EFS_FS is not set | ||
619 | # CONFIG_CRAMFS is not set | ||
620 | # CONFIG_VXFS_FS is not set | ||
621 | # CONFIG_HPFS_FS is not set | ||
622 | # CONFIG_QNX4FS_FS is not set | ||
623 | # CONFIG_SYSV_FS is not set | ||
624 | # CONFIG_UFS_FS is not set | ||
625 | |||
626 | # | ||
627 | # Network File Systems | ||
628 | # | ||
629 | CONFIG_NFS_FS=y | ||
630 | # CONFIG_NFS_V3 is not set | ||
631 | # CONFIG_NFS_V4 is not set | ||
632 | # CONFIG_NFS_DIRECTIO is not set | ||
633 | # CONFIG_NFSD is not set | ||
634 | CONFIG_ROOT_NFS=y | ||
635 | CONFIG_LOCKD=y | ||
636 | CONFIG_NFS_COMMON=y | ||
637 | CONFIG_SUNRPC=y | ||
638 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
639 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
640 | # CONFIG_SMB_FS is not set | ||
641 | # CONFIG_CIFS is not set | ||
642 | # CONFIG_NCP_FS is not set | ||
643 | # CONFIG_CODA_FS is not set | ||
644 | # CONFIG_AFS_FS is not set | ||
645 | # CONFIG_9P_FS is not set | ||
646 | |||
647 | # | ||
648 | # Partition Types | ||
649 | # | ||
650 | CONFIG_PARTITION_ADVANCED=y | ||
651 | # CONFIG_ACORN_PARTITION is not set | ||
652 | # CONFIG_OSF_PARTITION is not set | ||
653 | # CONFIG_AMIGA_PARTITION is not set | ||
654 | # CONFIG_ATARI_PARTITION is not set | ||
655 | # CONFIG_MAC_PARTITION is not set | ||
656 | # CONFIG_MSDOS_PARTITION is not set | ||
657 | # CONFIG_LDM_PARTITION is not set | ||
658 | # CONFIG_SGI_PARTITION is not set | ||
659 | # CONFIG_ULTRIX_PARTITION is not set | ||
660 | # CONFIG_SUN_PARTITION is not set | ||
661 | # CONFIG_EFI_PARTITION is not set | ||
662 | |||
663 | # | ||
664 | # Native Language Support | ||
665 | # | ||
666 | # CONFIG_NLS is not set | ||
667 | |||
668 | # | ||
669 | # Library routines | ||
670 | # | ||
671 | # CONFIG_CRC_CCITT is not set | ||
672 | # CONFIG_CRC16 is not set | ||
673 | CONFIG_CRC32=y | ||
674 | # CONFIG_LIBCRC32C is not set | ||
675 | |||
676 | # | ||
677 | # Instrumentation Support | ||
678 | # | ||
679 | # CONFIG_PROFILING is not set | ||
680 | |||
681 | # | ||
682 | # Kernel hacking | ||
683 | # | ||
684 | # CONFIG_PRINTK_TIME is not set | ||
685 | # CONFIG_MAGIC_SYSRQ is not set | ||
686 | CONFIG_DEBUG_KERNEL=y | ||
687 | CONFIG_LOG_BUF_SHIFT=14 | ||
688 | CONFIG_DETECT_SOFTLOCKUP=y | ||
689 | # CONFIG_SCHEDSTATS is not set | ||
690 | # CONFIG_DEBUG_SLAB is not set | ||
691 | CONFIG_DEBUG_MUTEXES=y | ||
692 | # CONFIG_DEBUG_SPINLOCK is not set | ||
693 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
694 | # CONFIG_DEBUG_KOBJECT is not set | ||
695 | # CONFIG_DEBUG_INFO is not set | ||
696 | # CONFIG_DEBUG_FS is not set | ||
697 | # CONFIG_DEBUG_VM is not set | ||
698 | # CONFIG_RCU_TORTURE_TEST is not set | ||
699 | # CONFIG_DEBUGGER is not set | ||
700 | # CONFIG_BDI_SWITCH is not set | ||
701 | # CONFIG_BOOTX_TEXT is not set | ||
702 | # CONFIG_PPC_EARLY_DEBUG_LPAR is not set | ||
703 | # CONFIG_PPC_EARLY_DEBUG_G5 is not set | ||
704 | # CONFIG_PPC_EARLY_DEBUG_RTAS is not set | ||
705 | # CONFIG_PPC_EARLY_DEBUG_MAPLE is not set | ||
706 | # CONFIG_PPC_EARLY_DEBUG_ISERIES is not set | ||
707 | |||
708 | # | ||
709 | # Security options | ||
710 | # | ||
711 | # CONFIG_KEYS is not set | ||
712 | # CONFIG_SECURITY is not set | ||
713 | |||
714 | # | ||
715 | # Cryptographic options | ||
716 | # | ||
717 | # CONFIG_CRYPTO is not set | ||
718 | |||
719 | # | ||
720 | # Hardware crypto devices | ||
721 | # | ||
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index c9a660e4c2db..882889b15926 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -136,6 +136,9 @@ int main(void) | |||
136 | DEFINE(PACAEMERGSP, offsetof(struct paca_struct, emergency_sp)); | 136 | DEFINE(PACAEMERGSP, offsetof(struct paca_struct, emergency_sp)); |
137 | DEFINE(PACALPPACAPTR, offsetof(struct paca_struct, lppaca_ptr)); | 137 | DEFINE(PACALPPACAPTR, offsetof(struct paca_struct, lppaca_ptr)); |
138 | DEFINE(PACAHWCPUID, offsetof(struct paca_struct, hw_cpu_id)); | 138 | DEFINE(PACAHWCPUID, offsetof(struct paca_struct, hw_cpu_id)); |
139 | DEFINE(PACA_STARTPURR, offsetof(struct paca_struct, startpurr)); | ||
140 | DEFINE(PACA_USER_TIME, offsetof(struct paca_struct, user_time)); | ||
141 | DEFINE(PACA_SYSTEM_TIME, offsetof(struct paca_struct, system_time)); | ||
139 | 142 | ||
140 | DEFINE(LPPACASRR0, offsetof(struct lppaca, saved_srr0)); | 143 | DEFINE(LPPACASRR0, offsetof(struct lppaca, saved_srr0)); |
141 | DEFINE(LPPACASRR1, offsetof(struct lppaca, saved_srr1)); | 144 | DEFINE(LPPACASRR1, offsetof(struct lppaca, saved_srr1)); |
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index e4e81374cb9a..39e348a3ade2 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -894,7 +894,7 @@ struct cpu_spec cpu_specs[] = { | |||
894 | .platform = "ppc405", | 894 | .platform = "ppc405", |
895 | }, | 895 | }, |
896 | { /* Xilinx Virtex-II Pro */ | 896 | { /* Xilinx Virtex-II Pro */ |
897 | .pvr_mask = 0xffff0000, | 897 | .pvr_mask = 0xfffff000, |
898 | .pvr_value = 0x20010000, | 898 | .pvr_value = 0x20010000, |
899 | .cpu_name = "Virtex-II Pro", | 899 | .cpu_name = "Virtex-II Pro", |
900 | .cpu_features = CPU_FTRS_40X, | 900 | .cpu_features = CPU_FTRS_40X, |
@@ -904,6 +904,16 @@ struct cpu_spec cpu_specs[] = { | |||
904 | .dcache_bsize = 32, | 904 | .dcache_bsize = 32, |
905 | .platform = "ppc405", | 905 | .platform = "ppc405", |
906 | }, | 906 | }, |
907 | { /* Xilinx Virtex-4 FX */ | ||
908 | .pvr_mask = 0xfffff000, | ||
909 | .pvr_value = 0x20011000, | ||
910 | .cpu_name = "Virtex-4 FX", | ||
911 | .cpu_features = CPU_FTRS_40X, | ||
912 | .cpu_user_features = PPC_FEATURE_32 | | ||
913 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | ||
914 | .icache_bsize = 32, | ||
915 | .dcache_bsize = 32, | ||
916 | }, | ||
907 | { /* 405EP */ | 917 | { /* 405EP */ |
908 | .pvr_mask = 0xffff0000, | 918 | .pvr_mask = 0xffff0000, |
909 | .pvr_value = 0x51210000, | 919 | .pvr_value = 0x51210000, |
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 24be0cf86d7f..1060155d84c3 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/entry.S | ||
3 | * | ||
4 | * PowerPC version | 2 | * PowerPC version |
5 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 3 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
6 | * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP | 4 | * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP |
@@ -63,6 +61,7 @@ system_call_common: | |||
63 | std r12,_MSR(r1) | 61 | std r12,_MSR(r1) |
64 | std r0,GPR0(r1) | 62 | std r0,GPR0(r1) |
65 | std r10,GPR1(r1) | 63 | std r10,GPR1(r1) |
64 | ACCOUNT_CPU_USER_ENTRY(r10, r11) | ||
66 | std r2,GPR2(r1) | 65 | std r2,GPR2(r1) |
67 | std r3,GPR3(r1) | 66 | std r3,GPR3(r1) |
68 | std r4,GPR4(r1) | 67 | std r4,GPR4(r1) |
@@ -170,8 +169,9 @@ syscall_error_cont: | |||
170 | stdcx. r0,0,r1 /* to clear the reservation */ | 169 | stdcx. r0,0,r1 /* to clear the reservation */ |
171 | andi. r6,r8,MSR_PR | 170 | andi. r6,r8,MSR_PR |
172 | ld r4,_LINK(r1) | 171 | ld r4,_LINK(r1) |
173 | beq- 1f /* only restore r13 if */ | 172 | beq- 1f |
174 | ld r13,GPR13(r1) /* returning to usermode */ | 173 | ACCOUNT_CPU_USER_EXIT(r11, r12) |
174 | ld r13,GPR13(r1) /* only restore r13 if returning to usermode */ | ||
175 | 1: ld r2,GPR2(r1) | 175 | 1: ld r2,GPR2(r1) |
176 | li r12,MSR_RI | 176 | li r12,MSR_RI |
177 | andc r11,r10,r12 | 177 | andc r11,r10,r12 |
@@ -322,7 +322,7 @@ _GLOBAL(ret_from_fork) | |||
322 | * the fork code also. | 322 | * the fork code also. |
323 | * | 323 | * |
324 | * The code which creates the new task context is in 'copy_thread' | 324 | * The code which creates the new task context is in 'copy_thread' |
325 | * in arch/ppc64/kernel/process.c | 325 | * in arch/powerpc/kernel/process.c |
326 | */ | 326 | */ |
327 | .align 7 | 327 | .align 7 |
328 | _GLOBAL(_switch) | 328 | _GLOBAL(_switch) |
@@ -486,6 +486,7 @@ restore: | |||
486 | * userspace | 486 | * userspace |
487 | */ | 487 | */ |
488 | beq 1f | 488 | beq 1f |
489 | ACCOUNT_CPU_USER_EXIT(r3, r4) | ||
489 | REST_GPR(13, r1) | 490 | REST_GPR(13, r1) |
490 | 1: | 491 | 1: |
491 | ld r3,_CTR(r1) | 492 | ld r3,_CTR(r1) |
diff --git a/arch/powerpc/kernel/firmware.c b/arch/powerpc/kernel/firmware.c index 65eae752a527..4d37a3cb80f6 100644 --- a/arch/powerpc/kernel/firmware.c +++ b/arch/powerpc/kernel/firmware.c | |||
@@ -18,28 +18,3 @@ | |||
18 | #include <asm/firmware.h> | 18 | #include <asm/firmware.h> |
19 | 19 | ||
20 | unsigned long ppc64_firmware_features; | 20 | unsigned long ppc64_firmware_features; |
21 | |||
22 | #ifdef CONFIG_PPC_PSERIES | ||
23 | firmware_feature_t firmware_features_table[FIRMWARE_MAX_FEATURES] = { | ||
24 | {FW_FEATURE_PFT, "hcall-pft"}, | ||
25 | {FW_FEATURE_TCE, "hcall-tce"}, | ||
26 | {FW_FEATURE_SPRG0, "hcall-sprg0"}, | ||
27 | {FW_FEATURE_DABR, "hcall-dabr"}, | ||
28 | {FW_FEATURE_COPY, "hcall-copy"}, | ||
29 | {FW_FEATURE_ASR, "hcall-asr"}, | ||
30 | {FW_FEATURE_DEBUG, "hcall-debug"}, | ||
31 | {FW_FEATURE_PERF, "hcall-perf"}, | ||
32 | {FW_FEATURE_DUMP, "hcall-dump"}, | ||
33 | {FW_FEATURE_INTERRUPT, "hcall-interrupt"}, | ||
34 | {FW_FEATURE_MIGRATE, "hcall-migrate"}, | ||
35 | {FW_FEATURE_PERFMON, "hcall-perfmon"}, | ||
36 | {FW_FEATURE_CRQ, "hcall-crq"}, | ||
37 | {FW_FEATURE_VIO, "hcall-vio"}, | ||
38 | {FW_FEATURE_RDMA, "hcall-rdma"}, | ||
39 | {FW_FEATURE_LLAN, "hcall-lLAN"}, | ||
40 | {FW_FEATURE_BULK, "hcall-bulk"}, | ||
41 | {FW_FEATURE_XDABR, "hcall-xdabr"}, | ||
42 | {FW_FEATURE_MULTITCE, "hcall-multi-tce"}, | ||
43 | {FW_FEATURE_SPLPAR, "hcall-splpar"}, | ||
44 | }; | ||
45 | #endif | ||
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S index 8b49679fad54..47c7fa148c9a 100644 --- a/arch/powerpc/kernel/head_44x.S +++ b/arch/powerpc/kernel/head_44x.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/head_44x.S | ||
3 | * | ||
4 | * Kernel execution entry point code. | 2 | * Kernel execution entry point code. |
5 | * | 3 | * |
6 | * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> | 4 | * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> |
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 9b65029dd2a3..35084f3a841b 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/head.S | ||
3 | * | ||
4 | * PowerPC version | 2 | * PowerPC version |
5 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 3 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
6 | * | 4 | * |
@@ -279,6 +277,7 @@ exception_marker: | |||
279 | std r10,0(r1); /* make stack chain pointer */ \ | 277 | std r10,0(r1); /* make stack chain pointer */ \ |
280 | std r0,GPR0(r1); /* save r0 in stackframe */ \ | 278 | std r0,GPR0(r1); /* save r0 in stackframe */ \ |
281 | std r10,GPR1(r1); /* save r1 in stackframe */ \ | 279 | std r10,GPR1(r1); /* save r1 in stackframe */ \ |
280 | ACCOUNT_CPU_USER_ENTRY(r9, r10); \ | ||
282 | std r2,GPR2(r1); /* save r2 in stackframe */ \ | 281 | std r2,GPR2(r1); /* save r2 in stackframe */ \ |
283 | SAVE_4GPRS(3, r1); /* save r3 - r6 in stackframe */ \ | 282 | SAVE_4GPRS(3, r1); /* save r3 - r6 in stackframe */ \ |
284 | SAVE_2GPRS(7, r1); /* save r7, r8 in stackframe */ \ | 283 | SAVE_2GPRS(7, r1); /* save r7, r8 in stackframe */ \ |
@@ -846,6 +845,14 @@ fast_exception_return: | |||
846 | ld r11,_NIP(r1) | 845 | ld r11,_NIP(r1) |
847 | andi. r3,r12,MSR_RI /* check if RI is set */ | 846 | andi. r3,r12,MSR_RI /* check if RI is set */ |
848 | beq- unrecov_fer | 847 | beq- unrecov_fer |
848 | |||
849 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
850 | andi. r3,r12,MSR_PR | ||
851 | beq 2f | ||
852 | ACCOUNT_CPU_USER_EXIT(r3, r4) | ||
853 | 2: | ||
854 | #endif | ||
855 | |||
849 | ld r3,_CCR(r1) | 856 | ld r3,_CCR(r1) |
850 | ld r4,_LINK(r1) | 857 | ld r4,_LINK(r1) |
851 | ld r5,_CTR(r1) | 858 | ld r5,_CTR(r1) |
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index bc6d1ac55235..28941f5ce673 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/except_8xx.S | ||
3 | * | ||
4 | * PowerPC version | 2 | * PowerPC version |
5 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 3 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
6 | * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP | 4 | * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP |
diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h new file mode 100644 index 000000000000..8536e7676160 --- /dev/null +++ b/arch/powerpc/kernel/head_booke.h | |||
@@ -0,0 +1,363 @@ | |||
1 | #ifndef __HEAD_BOOKE_H__ | ||
2 | #define __HEAD_BOOKE_H__ | ||
3 | |||
4 | /* | ||
5 | * Macros used for common Book-e exception handling | ||
6 | */ | ||
7 | |||
8 | #define SET_IVOR(vector_number, vector_label) \ | ||
9 | li r26,vector_label@l; \ | ||
10 | mtspr SPRN_IVOR##vector_number,r26; \ | ||
11 | sync | ||
12 | |||
13 | #define NORMAL_EXCEPTION_PROLOG \ | ||
14 | mtspr SPRN_SPRG0,r10; /* save two registers to work with */\ | ||
15 | mtspr SPRN_SPRG1,r11; \ | ||
16 | mtspr SPRN_SPRG4W,r1; \ | ||
17 | mfcr r10; /* save CR in r10 for now */\ | ||
18 | mfspr r11,SPRN_SRR1; /* check whether user or kernel */\ | ||
19 | andi. r11,r11,MSR_PR; \ | ||
20 | beq 1f; \ | ||
21 | mfspr r1,SPRN_SPRG3; /* if from user, start at top of */\ | ||
22 | lwz r1,THREAD_INFO-THREAD(r1); /* this thread's kernel stack */\ | ||
23 | addi r1,r1,THREAD_SIZE; \ | ||
24 | 1: subi r1,r1,INT_FRAME_SIZE; /* Allocate an exception frame */\ | ||
25 | mr r11,r1; \ | ||
26 | stw r10,_CCR(r11); /* save various registers */\ | ||
27 | stw r12,GPR12(r11); \ | ||
28 | stw r9,GPR9(r11); \ | ||
29 | mfspr r10,SPRN_SPRG0; \ | ||
30 | stw r10,GPR10(r11); \ | ||
31 | mfspr r12,SPRN_SPRG1; \ | ||
32 | stw r12,GPR11(r11); \ | ||
33 | mflr r10; \ | ||
34 | stw r10,_LINK(r11); \ | ||
35 | mfspr r10,SPRN_SPRG4R; \ | ||
36 | mfspr r12,SPRN_SRR0; \ | ||
37 | stw r10,GPR1(r11); \ | ||
38 | mfspr r9,SPRN_SRR1; \ | ||
39 | stw r10,0(r11); \ | ||
40 | rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\ | ||
41 | stw r0,GPR0(r11); \ | ||
42 | SAVE_4GPRS(3, r11); \ | ||
43 | SAVE_2GPRS(7, r11) | ||
44 | |||
45 | /* To handle the additional exception priority levels on 40x and Book-E | ||
46 | * processors we allocate a 4k stack per additional priority level. The various | ||
47 | * head_xxx.S files allocate space (exception_stack_top) for each priority's | ||
48 | * stack times the number of CPUs | ||
49 | * | ||
50 | * On 40x critical is the only additional level | ||
51 | * On 44x/e500 we have critical and machine check | ||
52 | * On e200 we have critical and debug (machine check occurs via critical) | ||
53 | * | ||
54 | * Additionally we reserve a SPRG for each priority level so we can free up a | ||
55 | * GPR to use as the base for indirect access to the exception stacks. This | ||
56 | * is necessary since the MMU is always on, for Book-E parts, and the stacks | ||
57 | * are offset from KERNELBASE. | ||
58 | * | ||
59 | */ | ||
60 | #define BOOKE_EXCEPTION_STACK_SIZE (8192) | ||
61 | |||
62 | /* CRIT_SPRG only used in critical exception handling */ | ||
63 | #define CRIT_SPRG SPRN_SPRG2 | ||
64 | /* MCHECK_SPRG only used in machine check exception handling */ | ||
65 | #define MCHECK_SPRG SPRN_SPRG6W | ||
66 | |||
67 | #define MCHECK_STACK_TOP (exception_stack_top - 4096) | ||
68 | #define CRIT_STACK_TOP (exception_stack_top) | ||
69 | |||
70 | /* only on e200 for now */ | ||
71 | #define DEBUG_STACK_TOP (exception_stack_top - 4096) | ||
72 | #define DEBUG_SPRG SPRN_SPRG6W | ||
73 | |||
74 | #ifdef CONFIG_SMP | ||
75 | #define BOOKE_LOAD_EXC_LEVEL_STACK(level) \ | ||
76 | mfspr r8,SPRN_PIR; \ | ||
77 | mulli r8,r8,BOOKE_EXCEPTION_STACK_SIZE; \ | ||
78 | neg r8,r8; \ | ||
79 | addis r8,r8,level##_STACK_TOP@ha; \ | ||
80 | addi r8,r8,level##_STACK_TOP@l | ||
81 | #else | ||
82 | #define BOOKE_LOAD_EXC_LEVEL_STACK(level) \ | ||
83 | lis r8,level##_STACK_TOP@h; \ | ||
84 | ori r8,r8,level##_STACK_TOP@l | ||
85 | #endif | ||
86 | |||
87 | /* | ||
88 | * Exception prolog for critical/machine check exceptions. This is a | ||
89 | * little different from the normal exception prolog above since a | ||
90 | * critical/machine check exception can potentially occur at any point | ||
91 | * during normal exception processing. Thus we cannot use the same SPRG | ||
92 | * registers as the normal prolog above. Instead we use a portion of the | ||
93 | * critical/machine check exception stack at low physical addresses. | ||
94 | */ | ||
95 | #define EXC_LEVEL_EXCEPTION_PROLOG(exc_level, exc_level_srr0, exc_level_srr1) \ | ||
96 | mtspr exc_level##_SPRG,r8; \ | ||
97 | BOOKE_LOAD_EXC_LEVEL_STACK(exc_level);/* r8 points to the exc_level stack*/ \ | ||
98 | stw r10,GPR10-INT_FRAME_SIZE(r8); \ | ||
99 | stw r11,GPR11-INT_FRAME_SIZE(r8); \ | ||
100 | mfcr r10; /* save CR in r10 for now */\ | ||
101 | mfspr r11,exc_level_srr1; /* check whether user or kernel */\ | ||
102 | andi. r11,r11,MSR_PR; \ | ||
103 | mr r11,r8; \ | ||
104 | mfspr r8,exc_level##_SPRG; \ | ||
105 | beq 1f; \ | ||
106 | /* COMING FROM USER MODE */ \ | ||
107 | mfspr r11,SPRN_SPRG3; /* if from user, start at top of */\ | ||
108 | lwz r11,THREAD_INFO-THREAD(r11); /* this thread's kernel stack */\ | ||
109 | addi r11,r11,THREAD_SIZE; \ | ||
110 | 1: subi r11,r11,INT_FRAME_SIZE; /* Allocate an exception frame */\ | ||
111 | stw r10,_CCR(r11); /* save various registers */\ | ||
112 | stw r12,GPR12(r11); \ | ||
113 | stw r9,GPR9(r11); \ | ||
114 | mflr r10; \ | ||
115 | stw r10,_LINK(r11); \ | ||
116 | mfspr r12,SPRN_DEAR; /* save DEAR and ESR in the frame */\ | ||
117 | stw r12,_DEAR(r11); /* since they may have had stuff */\ | ||
118 | mfspr r9,SPRN_ESR; /* in them at the point where the */\ | ||
119 | stw r9,_ESR(r11); /* exception was taken */\ | ||
120 | mfspr r12,exc_level_srr0; \ | ||
121 | stw r1,GPR1(r11); \ | ||
122 | mfspr r9,exc_level_srr1; \ | ||
123 | stw r1,0(r11); \ | ||
124 | mr r1,r11; \ | ||
125 | rlwinm r9,r9,0,14,12; /* clear MSR_WE (necessary?) */\ | ||
126 | stw r0,GPR0(r11); \ | ||
127 | SAVE_4GPRS(3, r11); \ | ||
128 | SAVE_2GPRS(7, r11) | ||
129 | |||
130 | #define CRITICAL_EXCEPTION_PROLOG \ | ||
131 | EXC_LEVEL_EXCEPTION_PROLOG(CRIT, SPRN_CSRR0, SPRN_CSRR1) | ||
132 | #define DEBUG_EXCEPTION_PROLOG \ | ||
133 | EXC_LEVEL_EXCEPTION_PROLOG(DEBUG, SPRN_DSRR0, SPRN_DSRR1) | ||
134 | #define MCHECK_EXCEPTION_PROLOG \ | ||
135 | EXC_LEVEL_EXCEPTION_PROLOG(MCHECK, SPRN_MCSRR0, SPRN_MCSRR1) | ||
136 | |||
137 | /* | ||
138 | * Exception vectors. | ||
139 | */ | ||
140 | #define START_EXCEPTION(label) \ | ||
141 | .align 5; \ | ||
142 | label: | ||
143 | |||
144 | #define FINISH_EXCEPTION(func) \ | ||
145 | bl transfer_to_handler_full; \ | ||
146 | .long func; \ | ||
147 | .long ret_from_except_full | ||
148 | |||
149 | #define EXCEPTION(n, label, hdlr, xfer) \ | ||
150 | START_EXCEPTION(label); \ | ||
151 | NORMAL_EXCEPTION_PROLOG; \ | ||
152 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
153 | xfer(n, hdlr) | ||
154 | |||
155 | #define CRITICAL_EXCEPTION(n, label, hdlr) \ | ||
156 | START_EXCEPTION(label); \ | ||
157 | CRITICAL_EXCEPTION_PROLOG; \ | ||
158 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
159 | EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \ | ||
160 | NOCOPY, crit_transfer_to_handler, \ | ||
161 | ret_from_crit_exc) | ||
162 | |||
163 | #define MCHECK_EXCEPTION(n, label, hdlr) \ | ||
164 | START_EXCEPTION(label); \ | ||
165 | MCHECK_EXCEPTION_PROLOG; \ | ||
166 | mfspr r5,SPRN_ESR; \ | ||
167 | stw r5,_ESR(r11); \ | ||
168 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
169 | EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \ | ||
170 | NOCOPY, mcheck_transfer_to_handler, \ | ||
171 | ret_from_mcheck_exc) | ||
172 | |||
173 | #define EXC_XFER_TEMPLATE(hdlr, trap, msr, copyee, tfer, ret) \ | ||
174 | li r10,trap; \ | ||
175 | stw r10,_TRAP(r11); \ | ||
176 | lis r10,msr@h; \ | ||
177 | ori r10,r10,msr@l; \ | ||
178 | copyee(r10, r9); \ | ||
179 | bl tfer; \ | ||
180 | .long hdlr; \ | ||
181 | .long ret | ||
182 | |||
183 | #define COPY_EE(d, s) rlwimi d,s,0,16,16 | ||
184 | #define NOCOPY(d, s) | ||
185 | |||
186 | #define EXC_XFER_STD(n, hdlr) \ | ||
187 | EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, NOCOPY, transfer_to_handler_full, \ | ||
188 | ret_from_except_full) | ||
189 | |||
190 | #define EXC_XFER_LITE(n, hdlr) \ | ||
191 | EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, NOCOPY, transfer_to_handler, \ | ||
192 | ret_from_except) | ||
193 | |||
194 | #define EXC_XFER_EE(n, hdlr) \ | ||
195 | EXC_XFER_TEMPLATE(hdlr, n, MSR_KERNEL, COPY_EE, transfer_to_handler_full, \ | ||
196 | ret_from_except_full) | ||
197 | |||
198 | #define EXC_XFER_EE_LITE(n, hdlr) \ | ||
199 | EXC_XFER_TEMPLATE(hdlr, n+1, MSR_KERNEL, COPY_EE, transfer_to_handler, \ | ||
200 | ret_from_except) | ||
201 | |||
202 | /* Check for a single step debug exception while in an exception | ||
203 | * handler before state has been saved. This is to catch the case | ||
204 | * where an instruction that we are trying to single step causes | ||
205 | * an exception (eg ITLB/DTLB miss) and thus the first instruction of | ||
206 | * the exception handler generates a single step debug exception. | ||
207 | * | ||
208 | * If we get a debug trap on the first instruction of an exception handler, | ||
209 | * we reset the MSR_DE in the _exception handler's_ MSR (the debug trap is | ||
210 | * a critical exception, so we are using SPRN_CSRR1 to manipulate the MSR). | ||
211 | * The exception handler was handling a non-critical interrupt, so it will | ||
212 | * save (and later restore) the MSR via SPRN_CSRR1, which will still have | ||
213 | * the MSR_DE bit set. | ||
214 | */ | ||
215 | #ifdef CONFIG_E200 | ||
216 | #define DEBUG_EXCEPTION \ | ||
217 | START_EXCEPTION(Debug); \ | ||
218 | DEBUG_EXCEPTION_PROLOG; \ | ||
219 | \ | ||
220 | /* \ | ||
221 | * If there is a single step or branch-taken exception in an \ | ||
222 | * exception entry sequence, it was probably meant to apply to \ | ||
223 | * the code where the exception occurred (since exception entry \ | ||
224 | * doesn't turn off DE automatically). We simulate the effect \ | ||
225 | * of turning off DE on entry to an exception handler by turning \ | ||
226 | * off DE in the CSRR1 value and clearing the debug status. \ | ||
227 | */ \ | ||
228 | mfspr r10,SPRN_DBSR; /* check single-step/branch taken */ \ | ||
229 | andis. r10,r10,DBSR_IC@h; \ | ||
230 | beq+ 2f; \ | ||
231 | \ | ||
232 | lis r10,KERNELBASE@h; /* check if exception in vectors */ \ | ||
233 | ori r10,r10,KERNELBASE@l; \ | ||
234 | cmplw r12,r10; \ | ||
235 | blt+ 2f; /* addr below exception vectors */ \ | ||
236 | \ | ||
237 | lis r10,Debug@h; \ | ||
238 | ori r10,r10,Debug@l; \ | ||
239 | cmplw r12,r10; \ | ||
240 | bgt+ 2f; /* addr above exception vectors */ \ | ||
241 | \ | ||
242 | /* here it looks like we got an inappropriate debug exception. */ \ | ||
243 | 1: rlwinm r9,r9,0,~MSR_DE; /* clear DE in the CDRR1 value */ \ | ||
244 | lis r10,DBSR_IC@h; /* clear the IC event */ \ | ||
245 | mtspr SPRN_DBSR,r10; \ | ||
246 | /* restore state and get out */ \ | ||
247 | lwz r10,_CCR(r11); \ | ||
248 | lwz r0,GPR0(r11); \ | ||
249 | lwz r1,GPR1(r11); \ | ||
250 | mtcrf 0x80,r10; \ | ||
251 | mtspr SPRN_DSRR0,r12; \ | ||
252 | mtspr SPRN_DSRR1,r9; \ | ||
253 | lwz r9,GPR9(r11); \ | ||
254 | lwz r12,GPR12(r11); \ | ||
255 | mtspr DEBUG_SPRG,r8; \ | ||
256 | BOOKE_LOAD_EXC_LEVEL_STACK(DEBUG); /* r8 points to the debug stack */ \ | ||
257 | lwz r10,GPR10-INT_FRAME_SIZE(r8); \ | ||
258 | lwz r11,GPR11-INT_FRAME_SIZE(r8); \ | ||
259 | mfspr r8,DEBUG_SPRG; \ | ||
260 | \ | ||
261 | RFDI; \ | ||
262 | b .; \ | ||
263 | \ | ||
264 | /* continue normal handling for a critical exception... */ \ | ||
265 | 2: mfspr r4,SPRN_DBSR; \ | ||
266 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
267 | EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, debug_transfer_to_handler, ret_from_debug_exc) | ||
268 | #else | ||
269 | #define DEBUG_EXCEPTION \ | ||
270 | START_EXCEPTION(Debug); \ | ||
271 | CRITICAL_EXCEPTION_PROLOG; \ | ||
272 | \ | ||
273 | /* \ | ||
274 | * If there is a single step or branch-taken exception in an \ | ||
275 | * exception entry sequence, it was probably meant to apply to \ | ||
276 | * the code where the exception occurred (since exception entry \ | ||
277 | * doesn't turn off DE automatically). We simulate the effect \ | ||
278 | * of turning off DE on entry to an exception handler by turning \ | ||
279 | * off DE in the CSRR1 value and clearing the debug status. \ | ||
280 | */ \ | ||
281 | mfspr r10,SPRN_DBSR; /* check single-step/branch taken */ \ | ||
282 | andis. r10,r10,DBSR_IC@h; \ | ||
283 | beq+ 2f; \ | ||
284 | \ | ||
285 | lis r10,KERNELBASE@h; /* check if exception in vectors */ \ | ||
286 | ori r10,r10,KERNELBASE@l; \ | ||
287 | cmplw r12,r10; \ | ||
288 | blt+ 2f; /* addr below exception vectors */ \ | ||
289 | \ | ||
290 | lis r10,Debug@h; \ | ||
291 | ori r10,r10,Debug@l; \ | ||
292 | cmplw r12,r10; \ | ||
293 | bgt+ 2f; /* addr above exception vectors */ \ | ||
294 | \ | ||
295 | /* here it looks like we got an inappropriate debug exception. */ \ | ||
296 | 1: rlwinm r9,r9,0,~MSR_DE; /* clear DE in the CSRR1 value */ \ | ||
297 | lis r10,DBSR_IC@h; /* clear the IC event */ \ | ||
298 | mtspr SPRN_DBSR,r10; \ | ||
299 | /* restore state and get out */ \ | ||
300 | lwz r10,_CCR(r11); \ | ||
301 | lwz r0,GPR0(r11); \ | ||
302 | lwz r1,GPR1(r11); \ | ||
303 | mtcrf 0x80,r10; \ | ||
304 | mtspr SPRN_CSRR0,r12; \ | ||
305 | mtspr SPRN_CSRR1,r9; \ | ||
306 | lwz r9,GPR9(r11); \ | ||
307 | lwz r12,GPR12(r11); \ | ||
308 | mtspr CRIT_SPRG,r8; \ | ||
309 | BOOKE_LOAD_EXC_LEVEL_STACK(CRIT); /* r8 points to the debug stack */ \ | ||
310 | lwz r10,GPR10-INT_FRAME_SIZE(r8); \ | ||
311 | lwz r11,GPR11-INT_FRAME_SIZE(r8); \ | ||
312 | mfspr r8,CRIT_SPRG; \ | ||
313 | \ | ||
314 | rfci; \ | ||
315 | b .; \ | ||
316 | \ | ||
317 | /* continue normal handling for a critical exception... */ \ | ||
318 | 2: mfspr r4,SPRN_DBSR; \ | ||
319 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
320 | EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, crit_transfer_to_handler, ret_from_crit_exc) | ||
321 | #endif | ||
322 | |||
323 | #define INSTRUCTION_STORAGE_EXCEPTION \ | ||
324 | START_EXCEPTION(InstructionStorage) \ | ||
325 | NORMAL_EXCEPTION_PROLOG; \ | ||
326 | mfspr r5,SPRN_ESR; /* Grab the ESR and save it */ \ | ||
327 | stw r5,_ESR(r11); \ | ||
328 | mr r4,r12; /* Pass SRR0 as arg2 */ \ | ||
329 | li r5,0; /* Pass zero as arg3 */ \ | ||
330 | EXC_XFER_EE_LITE(0x0400, handle_page_fault) | ||
331 | |||
332 | #define ALIGNMENT_EXCEPTION \ | ||
333 | START_EXCEPTION(Alignment) \ | ||
334 | NORMAL_EXCEPTION_PROLOG; \ | ||
335 | mfspr r4,SPRN_DEAR; /* Grab the DEAR and save it */ \ | ||
336 | stw r4,_DEAR(r11); \ | ||
337 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
338 | EXC_XFER_EE(0x0600, alignment_exception) | ||
339 | |||
340 | #define PROGRAM_EXCEPTION \ | ||
341 | START_EXCEPTION(Program) \ | ||
342 | NORMAL_EXCEPTION_PROLOG; \ | ||
343 | mfspr r4,SPRN_ESR; /* Grab the ESR and save it */ \ | ||
344 | stw r4,_ESR(r11); \ | ||
345 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
346 | EXC_XFER_STD(0x0700, program_check_exception) | ||
347 | |||
348 | #define DECREMENTER_EXCEPTION \ | ||
349 | START_EXCEPTION(Decrementer) \ | ||
350 | NORMAL_EXCEPTION_PROLOG; \ | ||
351 | lis r0,TSR_DIS@h; /* Setup the DEC interrupt mask */ \ | ||
352 | mtspr SPRN_TSR,r0; /* Clear the DEC interrupt */ \ | ||
353 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
354 | EXC_XFER_LITE(0x0900, timer_interrupt) | ||
355 | |||
356 | #define FP_UNAVAILABLE_EXCEPTION \ | ||
357 | START_EXCEPTION(FloatingPointUnavailable) \ | ||
358 | NORMAL_EXCEPTION_PROLOG; \ | ||
359 | bne load_up_fpu; /* if from user, just load it up */ \ | ||
360 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
361 | EXC_XFER_EE_LITE(0x800, kernel_fp_unavailable_exception) | ||
362 | |||
363 | #endif /* __HEAD_BOOKE_H__ */ | ||
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S index 8d60fa99fc4b..dd86bbed7627 100644 --- a/arch/powerpc/kernel/head_fsl_booke.S +++ b/arch/powerpc/kernel/head_fsl_booke.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/head_fsl_booke.S | ||
3 | * | ||
4 | * Kernel execution entry point code. | 2 | * Kernel execution entry point code. |
5 | * | 3 | * |
6 | * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> | 4 | * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> |
@@ -316,6 +314,7 @@ skpinv: addi r6,r6,1 /* Increment */ | |||
316 | */ | 314 | */ |
317 | lis r2,DBCR0_IDM@h | 315 | lis r2,DBCR0_IDM@h |
318 | mtspr SPRN_DBCR0,r2 | 316 | mtspr SPRN_DBCR0,r2 |
317 | isync | ||
319 | /* clear any residual debug events */ | 318 | /* clear any residual debug events */ |
320 | li r2,-1 | 319 | li r2,-1 |
321 | mtspr SPRN_DBSR,r2 | 320 | mtspr SPRN_DBSR,r2 |
@@ -1002,12 +1001,15 @@ _GLOBAL(giveup_fpu) | |||
1002 | _GLOBAL(abort) | 1001 | _GLOBAL(abort) |
1003 | li r13,0 | 1002 | li r13,0 |
1004 | mtspr SPRN_DBCR0,r13 /* disable all debug events */ | 1003 | mtspr SPRN_DBCR0,r13 /* disable all debug events */ |
1004 | isync | ||
1005 | mfmsr r13 | 1005 | mfmsr r13 |
1006 | ori r13,r13,MSR_DE@l /* Enable Debug Events */ | 1006 | ori r13,r13,MSR_DE@l /* Enable Debug Events */ |
1007 | mtmsr r13 | 1007 | mtmsr r13 |
1008 | isync | ||
1008 | mfspr r13,SPRN_DBCR0 | 1009 | mfspr r13,SPRN_DBCR0 |
1009 | lis r13,(DBCR0_IDM|DBCR0_RST_CHIP)@h | 1010 | lis r13,(DBCR0_IDM|DBCR0_RST_CHIP)@h |
1010 | mtspr SPRN_DBCR0,r13 | 1011 | mtspr SPRN_DBCR0,r13 |
1012 | isync | ||
1011 | 1013 | ||
1012 | _GLOBAL(set_context) | 1014 | _GLOBAL(set_context) |
1013 | 1015 | ||
diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/iomap.c index 6160c8dbb7c5..fd8214caedee 100644 --- a/arch/powerpc/kernel/iomap.c +++ b/arch/powerpc/kernel/iomap.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/iomap.c | ||
3 | * | ||
4 | * ppc64 "iomap" interface implementation. | 2 | * ppc64 "iomap" interface implementation. |
5 | * | 3 | * |
6 | * (C) Copyright 2004 Linus Torvalds | 4 | * (C) Copyright 2004 Linus Torvalds |
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index 946f3219fd29..d9a7fdef59b9 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/iommu.c | ||
3 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation | 2 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation |
4 | * | 3 | * |
5 | * Rewrite, cleanup, new allocation schemes, virtual merging: | 4 | * Rewrite, cleanup, new allocation schemes, virtual merging: |
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index d1fffce86df9..771a59cbd213 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/irq.c | ||
3 | * | ||
4 | * Derived from arch/i386/kernel/irq.c | 2 | * Derived from arch/i386/kernel/irq.c |
5 | * Copyright (C) 1992 Linus Torvalds | 3 | * Copyright (C) 1992 Linus Torvalds |
6 | * Adapted from arch/i386 by Gary Thomas | 4 | * Adapted from arch/i386 by Gary Thomas |
@@ -137,9 +135,8 @@ skip: | |||
137 | #ifdef CONFIG_TAU_INT | 135 | #ifdef CONFIG_TAU_INT |
138 | if (tau_initialized){ | 136 | if (tau_initialized){ |
139 | seq_puts(p, "TAU: "); | 137 | seq_puts(p, "TAU: "); |
140 | for (j = 0; j < NR_CPUS; j++) | 138 | for_each_online_cpu(j) |
141 | if (cpu_online(j)) | 139 | seq_printf(p, "%10u ", tau_interrupts(j)); |
142 | seq_printf(p, "%10u ", tau_interrupts(j)); | ||
143 | seq_puts(p, " PowerPC Thermal Assist (cpu temp)\n"); | 140 | seq_puts(p, " PowerPC Thermal Assist (cpu temp)\n"); |
144 | } | 141 | } |
145 | #endif | 142 | #endif |
@@ -371,6 +368,7 @@ unsigned int real_irq_to_virt_slowpath(unsigned int real_irq) | |||
371 | return NO_IRQ; | 368 | return NO_IRQ; |
372 | 369 | ||
373 | } | 370 | } |
371 | #endif /* CONFIG_PPC64 */ | ||
374 | 372 | ||
375 | #ifdef CONFIG_IRQSTACKS | 373 | #ifdef CONFIG_IRQSTACKS |
376 | struct thread_info *softirq_ctx[NR_CPUS]; | 374 | struct thread_info *softirq_ctx[NR_CPUS]; |
@@ -394,10 +392,24 @@ void irq_ctx_init(void) | |||
394 | } | 392 | } |
395 | } | 393 | } |
396 | 394 | ||
395 | static inline void do_softirq_onstack(void) | ||
396 | { | ||
397 | struct thread_info *curtp, *irqtp; | ||
398 | |||
399 | curtp = current_thread_info(); | ||
400 | irqtp = softirq_ctx[smp_processor_id()]; | ||
401 | irqtp->task = curtp->task; | ||
402 | call_do_softirq(irqtp); | ||
403 | irqtp->task = NULL; | ||
404 | } | ||
405 | |||
406 | #else | ||
407 | #define do_softirq_onstack() __do_softirq() | ||
408 | #endif /* CONFIG_IRQSTACKS */ | ||
409 | |||
397 | void do_softirq(void) | 410 | void do_softirq(void) |
398 | { | 411 | { |
399 | unsigned long flags; | 412 | unsigned long flags; |
400 | struct thread_info *curtp, *irqtp; | ||
401 | 413 | ||
402 | if (in_interrupt()) | 414 | if (in_interrupt()) |
403 | return; | 415 | return; |
@@ -405,19 +417,18 @@ void do_softirq(void) | |||
405 | local_irq_save(flags); | 417 | local_irq_save(flags); |
406 | 418 | ||
407 | if (local_softirq_pending()) { | 419 | if (local_softirq_pending()) { |
408 | curtp = current_thread_info(); | 420 | account_system_vtime(current); |
409 | irqtp = softirq_ctx[smp_processor_id()]; | 421 | local_bh_disable(); |
410 | irqtp->task = curtp->task; | 422 | do_softirq_onstack(); |
411 | call_do_softirq(irqtp); | 423 | account_system_vtime(current); |
412 | irqtp->task = NULL; | 424 | __local_bh_enable(); |
413 | } | 425 | } |
414 | 426 | ||
415 | local_irq_restore(flags); | 427 | local_irq_restore(flags); |
416 | } | 428 | } |
417 | EXPORT_SYMBOL(do_softirq); | 429 | EXPORT_SYMBOL(do_softirq); |
418 | 430 | ||
419 | #endif /* CONFIG_IRQSTACKS */ | 431 | #ifdef CONFIG_PPC64 |
420 | |||
421 | static int __init setup_noirqdistrib(char *str) | 432 | static int __init setup_noirqdistrib(char *str) |
422 | { | 433 | { |
423 | distribute_irqs = 0; | 434 | distribute_irqs = 0; |
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index cfab48566db1..cb1fe5878e8b 100644 --- a/arch/powerpc/kernel/kprobes.c +++ b/arch/powerpc/kernel/kprobes.c | |||
@@ -1,6 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Kernel Probes (KProbes) | 2 | * Kernel Probes (KProbes) |
3 | * arch/ppc64/kernel/kprobes.c | ||
4 | * | 3 | * |
5 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
@@ -82,9 +81,9 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p) | |||
82 | 81 | ||
83 | void __kprobes arch_remove_kprobe(struct kprobe *p) | 82 | void __kprobes arch_remove_kprobe(struct kprobe *p) |
84 | { | 83 | { |
85 | down(&kprobe_mutex); | 84 | mutex_lock(&kprobe_mutex); |
86 | free_insn_slot(p->ainsn.insn); | 85 | free_insn_slot(p->ainsn.insn); |
87 | up(&kprobe_mutex); | 86 | mutex_unlock(&kprobe_mutex); |
88 | } | 87 | } |
89 | 88 | ||
90 | static inline void prepare_singlestep(struct kprobe *p, struct pt_regs *regs) | 89 | static inline void prepare_singlestep(struct kprobe *p, struct pt_regs *regs) |
diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c index 22d83d4d1af5..9feeeef5a875 100644 --- a/arch/powerpc/kernel/of_device.c +++ b/arch/powerpc/kernel/of_device.c | |||
@@ -147,15 +147,12 @@ postcore_initcall(of_bus_driver_init); | |||
147 | 147 | ||
148 | int of_register_driver(struct of_platform_driver *drv) | 148 | int of_register_driver(struct of_platform_driver *drv) |
149 | { | 149 | { |
150 | int count = 0; | ||
151 | |||
152 | /* initialize common driver fields */ | 150 | /* initialize common driver fields */ |
153 | drv->driver.name = drv->name; | 151 | drv->driver.name = drv->name; |
154 | drv->driver.bus = &of_platform_bus_type; | 152 | drv->driver.bus = &of_platform_bus_type; |
155 | 153 | ||
156 | /* register with core */ | 154 | /* register with core */ |
157 | count = driver_register(&drv->driver); | 155 | return driver_register(&drv->driver); |
158 | return count ? count : 1; | ||
159 | } | 156 | } |
160 | 157 | ||
161 | void of_unregister_driver(struct of_platform_driver *drv) | 158 | void of_unregister_driver(struct of_platform_driver *drv) |
diff --git a/arch/powerpc/kernel/pci_iommu.c b/arch/powerpc/kernel/pci_iommu.c index bdf15dbbf4f0..c336f3e31cff 100644 --- a/arch/powerpc/kernel/pci_iommu.c +++ b/arch/powerpc/kernel/pci_iommu.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/pci_iommu.c | ||
3 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation | 2 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation |
4 | * | 3 | * |
5 | * Rewrite, cleanup, new allocation schemes: | 4 | * Rewrite, cleanup, new allocation schemes: |
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c index 63ecbec05202..dfa5398ab3c8 100644 --- a/arch/powerpc/kernel/ppc_ksyms.c +++ b/arch/powerpc/kernel/ppc_ksyms.c | |||
@@ -57,7 +57,6 @@ extern void machine_check_exception(struct pt_regs *regs); | |||
57 | extern void alignment_exception(struct pt_regs *regs); | 57 | extern void alignment_exception(struct pt_regs *regs); |
58 | extern void program_check_exception(struct pt_regs *regs); | 58 | extern void program_check_exception(struct pt_regs *regs); |
59 | extern void single_step_exception(struct pt_regs *regs); | 59 | extern void single_step_exception(struct pt_regs *regs); |
60 | extern int pmac_newworld; | ||
61 | extern int sys_sigreturn(struct pt_regs *regs); | 60 | extern int sys_sigreturn(struct pt_regs *regs); |
62 | 61 | ||
63 | EXPORT_SYMBOL(clear_pages); | 62 | EXPORT_SYMBOL(clear_pages); |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index c225cf154bfe..1770a066c217 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/process.c | ||
3 | * | ||
4 | * Derived from "arch/i386/kernel/process.c" | 2 | * Derived from "arch/i386/kernel/process.c" |
5 | * Copyright (C) 1995 Linus Torvalds | 3 | * Copyright (C) 1995 Linus Torvalds |
6 | * | 4 | * |
@@ -47,9 +45,9 @@ | |||
47 | #include <asm/mmu.h> | 45 | #include <asm/mmu.h> |
48 | #include <asm/prom.h> | 46 | #include <asm/prom.h> |
49 | #include <asm/machdep.h> | 47 | #include <asm/machdep.h> |
48 | #include <asm/time.h> | ||
50 | #ifdef CONFIG_PPC64 | 49 | #ifdef CONFIG_PPC64 |
51 | #include <asm/firmware.h> | 50 | #include <asm/firmware.h> |
52 | #include <asm/time.h> | ||
53 | #endif | 51 | #endif |
54 | 52 | ||
55 | extern unsigned long _get_SP(void); | 53 | extern unsigned long _get_SP(void); |
@@ -330,6 +328,11 @@ struct task_struct *__switch_to(struct task_struct *prev, | |||
330 | #endif | 328 | #endif |
331 | 329 | ||
332 | local_irq_save(flags); | 330 | local_irq_save(flags); |
331 | |||
332 | account_system_vtime(current); | ||
333 | account_process_vtime(current); | ||
334 | calculate_steal_time(); | ||
335 | |||
333 | last = _switch(old_thread, new_thread); | 336 | last = _switch(old_thread, new_thread); |
334 | 337 | ||
335 | local_irq_restore(flags); | 338 | local_irq_restore(flags); |
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 6dbd21726770..d63cd562d9d5 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -829,10 +829,6 @@ void __init unflatten_device_tree(void) | |||
829 | 829 | ||
830 | /* Allocate memory for the expanded device tree */ | 830 | /* Allocate memory for the expanded device tree */ |
831 | mem = lmb_alloc(size + 4, __alignof__(struct device_node)); | 831 | mem = lmb_alloc(size + 4, __alignof__(struct device_node)); |
832 | if (!mem) { | ||
833 | DBG("Couldn't allocate memory with lmb_alloc()!\n"); | ||
834 | panic("Couldn't allocate memory with lmb_alloc()!\n"); | ||
835 | } | ||
836 | mem = (unsigned long) __va(mem); | 832 | mem = (unsigned long) __va(mem); |
837 | 833 | ||
838 | ((u32 *)mem)[size / 4] = 0xdeadbeef; | 834 | ((u32 *)mem)[size / 4] = 0xdeadbeef; |
diff --git a/arch/powerpc/kernel/ptrace-common.h b/arch/powerpc/kernel/ptrace-common.h index 5ccbdbe0d5c9..c42a860c8d25 100644 --- a/arch/powerpc/kernel/ptrace-common.h +++ b/arch/powerpc/kernel/ptrace-common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/ppc64/kernel/ptrace-common.h | ||
3 | * | ||
4 | * Copyright (c) 2002 Stephen Rothwell, IBM Coproration | 2 | * Copyright (c) 2002 Stephen Rothwell, IBM Coproration |
5 | * Extracted from ptrace.c and ptrace32.c | 3 | * Extracted from ptrace.c and ptrace32.c |
6 | * | 4 | * |
diff --git a/arch/powerpc/kernel/rtas-proc.c b/arch/powerpc/kernel/rtas-proc.c index 7a95b8a28354..1f03fb28cc0a 100644 --- a/arch/powerpc/kernel/rtas-proc.c +++ b/arch/powerpc/kernel/rtas-proc.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/rtas-proc.c | ||
3 | * Copyright (C) 2000 Tilmann Bitterberg | 2 | * Copyright (C) 2000 Tilmann Bitterberg |
4 | * (tilmann@bitterberg.de) | 3 | * (tilmann@bitterberg.de) |
5 | * | 4 | * |
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c index 7442775ef2a1..57b539a03fa9 100644 --- a/arch/powerpc/kernel/rtas_pci.c +++ b/arch/powerpc/kernel/rtas_pci.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/rtas_pci.c | ||
3 | * | ||
4 | * Copyright (C) 2001 Dave Engebretsen, IBM Corporation | 2 | * Copyright (C) 2001 Dave Engebretsen, IBM Corporation |
5 | * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM | 3 | * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM |
6 | * | 4 | * |
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index be12041c0fc5..c1d62bf11f29 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
@@ -162,9 +162,8 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
162 | #if defined(CONFIG_SMP) && defined(CONFIG_PPC32) | 162 | #if defined(CONFIG_SMP) && defined(CONFIG_PPC32) |
163 | unsigned long bogosum = 0; | 163 | unsigned long bogosum = 0; |
164 | int i; | 164 | int i; |
165 | for (i = 0; i < NR_CPUS; ++i) | 165 | for_each_online_cpu(i) |
166 | if (cpu_online(i)) | 166 | bogosum += loops_per_jiffy; |
167 | bogosum += loops_per_jiffy; | ||
168 | seq_printf(m, "total bogomips\t: %lu.%02lu\n", | 167 | seq_printf(m, "total bogomips\t: %lu.%02lu\n", |
169 | bogosum/(500000/HZ), bogosum/(5000/HZ) % 100); | 168 | bogosum/(500000/HZ), bogosum/(5000/HZ) % 100); |
170 | #endif /* CONFIG_SMP && CONFIG_PPC32 */ | 169 | #endif /* CONFIG_SMP && CONFIG_PPC32 */ |
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index db72a92943bf..dc2770df25b3 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -272,9 +272,8 @@ int __init ppc_init(void) | |||
272 | if ( ppc_md.progress ) ppc_md.progress(" ", 0xffff); | 272 | if ( ppc_md.progress ) ppc_md.progress(" ", 0xffff); |
273 | 273 | ||
274 | /* register CPU devices */ | 274 | /* register CPU devices */ |
275 | for (i = 0; i < NR_CPUS; i++) | 275 | for_each_cpu(i) |
276 | if (cpu_possible(i)) | 276 | register_cpu(&cpu_devices[i], i, NULL); |
277 | register_cpu(&cpu_devices[i], i, NULL); | ||
278 | 277 | ||
279 | /* call platform init */ | 278 | /* call platform init */ |
280 | if (ppc_md.init != NULL) { | 279 | if (ppc_md.init != NULL) { |
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index f96c49b03ba0..2f3fdad35594 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -497,8 +497,6 @@ void __init setup_system(void) | |||
497 | #endif | 497 | #endif |
498 | printk("-----------------------------------------------------\n"); | 498 | printk("-----------------------------------------------------\n"); |
499 | 499 | ||
500 | mm_init_ppc64(); | ||
501 | |||
502 | DBG(" <- setup_system()\n"); | 500 | DBG(" <- setup_system()\n"); |
503 | } | 501 | } |
504 | 502 | ||
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c index 4324f8a8ba24..47f910380a6a 100644 --- a/arch/powerpc/kernel/signal_64.c +++ b/arch/powerpc/kernel/signal_64.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/ppc64/kernel/signal.c | ||
3 | * | ||
4 | * PowerPC version | 2 | * PowerPC version |
5 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 3 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
6 | * | 4 | * |
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 13595a64f013..805eaedbc308 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -541,7 +541,7 @@ int __devinit start_secondary(void *unused) | |||
541 | smp_ops->take_timebase(); | 541 | smp_ops->take_timebase(); |
542 | 542 | ||
543 | if (system_state > SYSTEM_BOOTING) | 543 | if (system_state > SYSTEM_BOOTING) |
544 | per_cpu(last_jiffy, cpu) = get_tb(); | 544 | snapshot_timebase(); |
545 | 545 | ||
546 | spin_lock(&call_lock); | 546 | spin_lock(&call_lock); |
547 | cpu_set(cpu, cpu_online_map); | 547 | cpu_set(cpu, cpu_online_map); |
@@ -573,6 +573,8 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
573 | 573 | ||
574 | set_cpus_allowed(current, old_mask); | 574 | set_cpus_allowed(current, old_mask); |
575 | 575 | ||
576 | snapshot_timebases(); | ||
577 | |||
576 | dump_numa_cpu_topology(); | 578 | dump_numa_cpu_topology(); |
577 | } | 579 | } |
578 | 580 | ||
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 86f7e3d154d8..4a27218a086c 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <linux/percpu.h> | 51 | #include <linux/percpu.h> |
52 | #include <linux/rtc.h> | 52 | #include <linux/rtc.h> |
53 | #include <linux/jiffies.h> | 53 | #include <linux/jiffies.h> |
54 | #include <linux/posix-timers.h> | ||
54 | 55 | ||
55 | #include <asm/io.h> | 56 | #include <asm/io.h> |
56 | #include <asm/processor.h> | 57 | #include <asm/processor.h> |
@@ -98,6 +99,7 @@ unsigned long tb_ticks_per_jiffy; | |||
98 | unsigned long tb_ticks_per_usec = 100; /* sane default */ | 99 | unsigned long tb_ticks_per_usec = 100; /* sane default */ |
99 | EXPORT_SYMBOL(tb_ticks_per_usec); | 100 | EXPORT_SYMBOL(tb_ticks_per_usec); |
100 | unsigned long tb_ticks_per_sec; | 101 | unsigned long tb_ticks_per_sec; |
102 | EXPORT_SYMBOL(tb_ticks_per_sec); /* for cputime_t conversions */ | ||
101 | u64 tb_to_xs; | 103 | u64 tb_to_xs; |
102 | unsigned tb_to_us; | 104 | unsigned tb_to_us; |
103 | 105 | ||
@@ -135,6 +137,224 @@ unsigned long tb_last_stamp; | |||
135 | */ | 137 | */ |
136 | DEFINE_PER_CPU(unsigned long, last_jiffy); | 138 | DEFINE_PER_CPU(unsigned long, last_jiffy); |
137 | 139 | ||
140 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
141 | /* | ||
142 | * Factors for converting from cputime_t (timebase ticks) to | ||
143 | * jiffies, milliseconds, seconds, and clock_t (1/USER_HZ seconds). | ||
144 | * These are all stored as 0.64 fixed-point binary fractions. | ||
145 | */ | ||
146 | u64 __cputime_jiffies_factor; | ||
147 | EXPORT_SYMBOL(__cputime_jiffies_factor); | ||
148 | u64 __cputime_msec_factor; | ||
149 | EXPORT_SYMBOL(__cputime_msec_factor); | ||
150 | u64 __cputime_sec_factor; | ||
151 | EXPORT_SYMBOL(__cputime_sec_factor); | ||
152 | u64 __cputime_clockt_factor; | ||
153 | EXPORT_SYMBOL(__cputime_clockt_factor); | ||
154 | |||
155 | static void calc_cputime_factors(void) | ||
156 | { | ||
157 | struct div_result res; | ||
158 | |||
159 | div128_by_32(HZ, 0, tb_ticks_per_sec, &res); | ||
160 | __cputime_jiffies_factor = res.result_low; | ||
161 | div128_by_32(1000, 0, tb_ticks_per_sec, &res); | ||
162 | __cputime_msec_factor = res.result_low; | ||
163 | div128_by_32(1, 0, tb_ticks_per_sec, &res); | ||
164 | __cputime_sec_factor = res.result_low; | ||
165 | div128_by_32(USER_HZ, 0, tb_ticks_per_sec, &res); | ||
166 | __cputime_clockt_factor = res.result_low; | ||
167 | } | ||
168 | |||
169 | /* | ||
170 | * Read the PURR on systems that have it, otherwise the timebase. | ||
171 | */ | ||
172 | static u64 read_purr(void) | ||
173 | { | ||
174 | if (cpu_has_feature(CPU_FTR_PURR)) | ||
175 | return mfspr(SPRN_PURR); | ||
176 | return mftb(); | ||
177 | } | ||
178 | |||
179 | /* | ||
180 | * Account time for a transition between system, hard irq | ||
181 | * or soft irq state. | ||
182 | */ | ||
183 | void account_system_vtime(struct task_struct *tsk) | ||
184 | { | ||
185 | u64 now, delta; | ||
186 | unsigned long flags; | ||
187 | |||
188 | local_irq_save(flags); | ||
189 | now = read_purr(); | ||
190 | delta = now - get_paca()->startpurr; | ||
191 | get_paca()->startpurr = now; | ||
192 | if (!in_interrupt()) { | ||
193 | delta += get_paca()->system_time; | ||
194 | get_paca()->system_time = 0; | ||
195 | } | ||
196 | account_system_time(tsk, 0, delta); | ||
197 | local_irq_restore(flags); | ||
198 | } | ||
199 | |||
200 | /* | ||
201 | * Transfer the user and system times accumulated in the paca | ||
202 | * by the exception entry and exit code to the generic process | ||
203 | * user and system time records. | ||
204 | * Must be called with interrupts disabled. | ||
205 | */ | ||
206 | void account_process_vtime(struct task_struct *tsk) | ||
207 | { | ||
208 | cputime_t utime; | ||
209 | |||
210 | utime = get_paca()->user_time; | ||
211 | get_paca()->user_time = 0; | ||
212 | account_user_time(tsk, utime); | ||
213 | } | ||
214 | |||
215 | static void account_process_time(struct pt_regs *regs) | ||
216 | { | ||
217 | int cpu = smp_processor_id(); | ||
218 | |||
219 | account_process_vtime(current); | ||
220 | run_local_timers(); | ||
221 | if (rcu_pending(cpu)) | ||
222 | rcu_check_callbacks(cpu, user_mode(regs)); | ||
223 | scheduler_tick(); | ||
224 | run_posix_cpu_timers(current); | ||
225 | } | ||
226 | |||
227 | #ifdef CONFIG_PPC_SPLPAR | ||
228 | /* | ||
229 | * Stuff for accounting stolen time. | ||
230 | */ | ||
231 | struct cpu_purr_data { | ||
232 | int initialized; /* thread is running */ | ||
233 | u64 tb0; /* timebase at origin time */ | ||
234 | u64 purr0; /* PURR at origin time */ | ||
235 | u64 tb; /* last TB value read */ | ||
236 | u64 purr; /* last PURR value read */ | ||
237 | u64 stolen; /* stolen time so far */ | ||
238 | spinlock_t lock; | ||
239 | }; | ||
240 | |||
241 | static DEFINE_PER_CPU(struct cpu_purr_data, cpu_purr_data); | ||
242 | |||
243 | static void snapshot_tb_and_purr(void *data) | ||
244 | { | ||
245 | struct cpu_purr_data *p = &__get_cpu_var(cpu_purr_data); | ||
246 | |||
247 | p->tb0 = mftb(); | ||
248 | p->purr0 = mfspr(SPRN_PURR); | ||
249 | p->tb = p->tb0; | ||
250 | p->purr = 0; | ||
251 | wmb(); | ||
252 | p->initialized = 1; | ||
253 | } | ||
254 | |||
255 | /* | ||
256 | * Called during boot when all cpus have come up. | ||
257 | */ | ||
258 | void snapshot_timebases(void) | ||
259 | { | ||
260 | int cpu; | ||
261 | |||
262 | if (!cpu_has_feature(CPU_FTR_PURR)) | ||
263 | return; | ||
264 | for_each_cpu(cpu) | ||
265 | spin_lock_init(&per_cpu(cpu_purr_data, cpu).lock); | ||
266 | on_each_cpu(snapshot_tb_and_purr, NULL, 0, 1); | ||
267 | } | ||
268 | |||
269 | void calculate_steal_time(void) | ||
270 | { | ||
271 | u64 tb, purr, t0; | ||
272 | s64 stolen; | ||
273 | struct cpu_purr_data *p0, *pme, *phim; | ||
274 | int cpu; | ||
275 | |||
276 | if (!cpu_has_feature(CPU_FTR_PURR)) | ||
277 | return; | ||
278 | cpu = smp_processor_id(); | ||
279 | pme = &per_cpu(cpu_purr_data, cpu); | ||
280 | if (!pme->initialized) | ||
281 | return; /* this can happen in early boot */ | ||
282 | p0 = &per_cpu(cpu_purr_data, cpu & ~1); | ||
283 | phim = &per_cpu(cpu_purr_data, cpu ^ 1); | ||
284 | spin_lock(&p0->lock); | ||
285 | tb = mftb(); | ||
286 | purr = mfspr(SPRN_PURR) - pme->purr0; | ||
287 | if (!phim->initialized || !cpu_online(cpu ^ 1)) { | ||
288 | stolen = (tb - pme->tb) - (purr - pme->purr); | ||
289 | } else { | ||
290 | t0 = pme->tb0; | ||
291 | if (phim->tb0 < t0) | ||
292 | t0 = phim->tb0; | ||
293 | stolen = phim->tb - t0 - phim->purr - purr - p0->stolen; | ||
294 | } | ||
295 | if (stolen > 0) { | ||
296 | account_steal_time(current, stolen); | ||
297 | p0->stolen += stolen; | ||
298 | } | ||
299 | pme->tb = tb; | ||
300 | pme->purr = purr; | ||
301 | spin_unlock(&p0->lock); | ||
302 | } | ||
303 | |||
304 | /* | ||
305 | * Must be called before the cpu is added to the online map when | ||
306 | * a cpu is being brought up at runtime. | ||
307 | */ | ||
308 | static void snapshot_purr(void) | ||
309 | { | ||
310 | int cpu; | ||
311 | u64 purr; | ||
312 | struct cpu_purr_data *p0, *pme, *phim; | ||
313 | unsigned long flags; | ||
314 | |||
315 | if (!cpu_has_feature(CPU_FTR_PURR)) | ||
316 | return; | ||
317 | cpu = smp_processor_id(); | ||
318 | pme = &per_cpu(cpu_purr_data, cpu); | ||
319 | p0 = &per_cpu(cpu_purr_data, cpu & ~1); | ||
320 | phim = &per_cpu(cpu_purr_data, cpu ^ 1); | ||
321 | spin_lock_irqsave(&p0->lock, flags); | ||
322 | pme->tb = pme->tb0 = mftb(); | ||
323 | purr = mfspr(SPRN_PURR); | ||
324 | if (!phim->initialized) { | ||
325 | pme->purr = 0; | ||
326 | pme->purr0 = purr; | ||
327 | } else { | ||
328 | /* set p->purr and p->purr0 for no change in p0->stolen */ | ||
329 | pme->purr = phim->tb - phim->tb0 - phim->purr - p0->stolen; | ||
330 | pme->purr0 = purr - pme->purr; | ||
331 | } | ||
332 | pme->initialized = 1; | ||
333 | spin_unlock_irqrestore(&p0->lock, flags); | ||
334 | } | ||
335 | |||
336 | #endif /* CONFIG_PPC_SPLPAR */ | ||
337 | |||
338 | #else /* ! CONFIG_VIRT_CPU_ACCOUNTING */ | ||
339 | #define calc_cputime_factors() | ||
340 | #define account_process_time(regs) update_process_times(user_mode(regs)) | ||
341 | #define calculate_steal_time() do { } while (0) | ||
342 | #endif | ||
343 | |||
344 | #if !(defined(CONFIG_VIRT_CPU_ACCOUNTING) && defined(CONFIG_PPC_SPLPAR)) | ||
345 | #define snapshot_purr() do { } while (0) | ||
346 | #endif | ||
347 | |||
348 | /* | ||
349 | * Called when a cpu comes up after the system has finished booting, | ||
350 | * i.e. as a result of a hotplug cpu action. | ||
351 | */ | ||
352 | void snapshot_timebase(void) | ||
353 | { | ||
354 | __get_cpu_var(last_jiffy) = get_tb(); | ||
355 | snapshot_purr(); | ||
356 | } | ||
357 | |||
138 | void __delay(unsigned long loops) | 358 | void __delay(unsigned long loops) |
139 | { | 359 | { |
140 | unsigned long start; | 360 | unsigned long start; |
@@ -392,6 +612,7 @@ static void iSeries_tb_recal(void) | |||
392 | new_tb_ticks_per_jiffy, sign, tick_diff ); | 612 | new_tb_ticks_per_jiffy, sign, tick_diff ); |
393 | tb_ticks_per_jiffy = new_tb_ticks_per_jiffy; | 613 | tb_ticks_per_jiffy = new_tb_ticks_per_jiffy; |
394 | tb_ticks_per_sec = new_tb_ticks_per_sec; | 614 | tb_ticks_per_sec = new_tb_ticks_per_sec; |
615 | calc_cputime_factors(); | ||
395 | div128_by_32( XSEC_PER_SEC, 0, tb_ticks_per_sec, &divres ); | 616 | div128_by_32( XSEC_PER_SEC, 0, tb_ticks_per_sec, &divres ); |
396 | do_gtod.tb_ticks_per_sec = tb_ticks_per_sec; | 617 | do_gtod.tb_ticks_per_sec = tb_ticks_per_sec; |
397 | tb_to_xs = divres.result_low; | 618 | tb_to_xs = divres.result_low; |
@@ -440,6 +661,7 @@ void timer_interrupt(struct pt_regs * regs) | |||
440 | irq_enter(); | 661 | irq_enter(); |
441 | 662 | ||
442 | profile_tick(CPU_PROFILING, regs); | 663 | profile_tick(CPU_PROFILING, regs); |
664 | calculate_steal_time(); | ||
443 | 665 | ||
444 | #ifdef CONFIG_PPC_ISERIES | 666 | #ifdef CONFIG_PPC_ISERIES |
445 | get_lppaca()->int_dword.fields.decr_int = 0; | 667 | get_lppaca()->int_dword.fields.decr_int = 0; |
@@ -461,7 +683,7 @@ void timer_interrupt(struct pt_regs * regs) | |||
461 | * is the case. | 683 | * is the case. |
462 | */ | 684 | */ |
463 | if (!cpu_is_offline(cpu)) | 685 | if (!cpu_is_offline(cpu)) |
464 | update_process_times(user_mode(regs)); | 686 | account_process_time(regs); |
465 | 687 | ||
466 | /* | 688 | /* |
467 | * No need to check whether cpu is offline here; boot_cpuid | 689 | * No need to check whether cpu is offline here; boot_cpuid |
@@ -518,13 +740,27 @@ void wakeup_decrementer(void) | |||
518 | void __init smp_space_timers(unsigned int max_cpus) | 740 | void __init smp_space_timers(unsigned int max_cpus) |
519 | { | 741 | { |
520 | int i; | 742 | int i; |
743 | unsigned long half = tb_ticks_per_jiffy / 2; | ||
521 | unsigned long offset = tb_ticks_per_jiffy / max_cpus; | 744 | unsigned long offset = tb_ticks_per_jiffy / max_cpus; |
522 | unsigned long previous_tb = per_cpu(last_jiffy, boot_cpuid); | 745 | unsigned long previous_tb = per_cpu(last_jiffy, boot_cpuid); |
523 | 746 | ||
524 | /* make sure tb > per_cpu(last_jiffy, cpu) for all cpus always */ | 747 | /* make sure tb > per_cpu(last_jiffy, cpu) for all cpus always */ |
525 | previous_tb -= tb_ticks_per_jiffy; | 748 | previous_tb -= tb_ticks_per_jiffy; |
749 | /* | ||
750 | * The stolen time calculation for POWER5 shared-processor LPAR | ||
751 | * systems works better if the two threads' timebase interrupts | ||
752 | * are staggered by half a jiffy with respect to each other. | ||
753 | */ | ||
526 | for_each_cpu(i) { | 754 | for_each_cpu(i) { |
527 | if (i != boot_cpuid) { | 755 | if (i == boot_cpuid) |
756 | continue; | ||
757 | if (i == (boot_cpuid ^ 1)) | ||
758 | per_cpu(last_jiffy, i) = | ||
759 | per_cpu(last_jiffy, boot_cpuid) - half; | ||
760 | else if (i & 1) | ||
761 | per_cpu(last_jiffy, i) = | ||
762 | per_cpu(last_jiffy, i ^ 1) + half; | ||
763 | else { | ||
528 | previous_tb += offset; | 764 | previous_tb += offset; |
529 | per_cpu(last_jiffy, i) = previous_tb; | 765 | per_cpu(last_jiffy, i) = previous_tb; |
530 | } | 766 | } |
@@ -720,6 +956,7 @@ void __init time_init(void) | |||
720 | tb_ticks_per_sec = ppc_tb_freq; | 956 | tb_ticks_per_sec = ppc_tb_freq; |
721 | tb_ticks_per_usec = ppc_tb_freq / 1000000; | 957 | tb_ticks_per_usec = ppc_tb_freq / 1000000; |
722 | tb_to_us = mulhwu_scale_factor(ppc_tb_freq, 1000000); | 958 | tb_to_us = mulhwu_scale_factor(ppc_tb_freq, 1000000); |
959 | calc_cputime_factors(); | ||
723 | 960 | ||
724 | /* | 961 | /* |
725 | * Calculate the length of each tick in ns. It will not be | 962 | * Calculate the length of each tick in ns. It will not be |
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c index 04f7df39ffbb..ec8370368423 100644 --- a/arch/powerpc/kernel/vdso.c +++ b/arch/powerpc/kernel/vdso.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/ppc64/kernel/vdso.c | ||
3 | * | ||
4 | * Copyright (C) 2004 Benjamin Herrenschmidt, IBM Corp. | 2 | * Copyright (C) 2004 Benjamin Herrenschmidt, IBM Corp. |
5 | * <benh@kernel.crashing.org> | 3 | * <benh@kernel.crashing.org> |
6 | * | 4 | * |
diff --git a/arch/powerpc/lib/copypage_64.S b/arch/powerpc/lib/copypage_64.S index 40523b140109..f9837f44ac0b 100644 --- a/arch/powerpc/lib/copypage_64.S +++ b/arch/powerpc/lib/copypage_64.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/lib/copypage.S | ||
3 | * | ||
4 | * Copyright (C) 2002 Paul Mackerras, IBM Corp. | 2 | * Copyright (C) 2002 Paul Mackerras, IBM Corp. |
5 | * | 3 | * |
6 | * This program is free software; you can redistribute it and/or | 4 | * This program is free software; you can redistribute it and/or |
diff --git a/arch/powerpc/lib/copyuser_64.S b/arch/powerpc/lib/copyuser_64.S index 6d69ef39b7df..a6b54cb97c49 100644 --- a/arch/powerpc/lib/copyuser_64.S +++ b/arch/powerpc/lib/copyuser_64.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/lib/copyuser.S | ||
3 | * | ||
4 | * Copyright (C) 2002 Paul Mackerras, IBM Corp. | 2 | * Copyright (C) 2002 Paul Mackerras, IBM Corp. |
5 | * | 3 | * |
6 | * This program is free software; you can redistribute it and/or | 4 | * This program is free software; you can redistribute it and/or |
diff --git a/arch/powerpc/lib/e2a.c b/arch/powerpc/lib/e2a.c index d2b834887920..4b72ed8fd50e 100644 --- a/arch/powerpc/lib/e2a.c +++ b/arch/powerpc/lib/e2a.c | |||
@@ -1,9 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/lib/e2a.c | ||
3 | * | ||
4 | * EBCDIC to ASCII conversion | 2 | * EBCDIC to ASCII conversion |
5 | * | 3 | * |
6 | * This function moved here from arch/ppc64/kernel/viopath.c | 4 | * This function moved here from arch/powerpc/platforms/iseries/viopath.c |
7 | * | 5 | * |
8 | * (C) Copyright 2000-2004 IBM Corporation | 6 | * (C) Copyright 2000-2004 IBM Corporation |
9 | * | 7 | * |
@@ -105,4 +103,14 @@ unsigned char e2a(unsigned char x) | |||
105 | } | 103 | } |
106 | EXPORT_SYMBOL(e2a); | 104 | EXPORT_SYMBOL(e2a); |
107 | 105 | ||
106 | unsigned char* strne2a(unsigned char *dest, const unsigned char *src, size_t n) | ||
107 | { | ||
108 | int i; | ||
109 | |||
110 | n = strnlen(src, n); | ||
108 | 111 | ||
112 | for (i = 0; i < n; i++) | ||
113 | dest[i] = e2a(src[i]); | ||
114 | |||
115 | return dest; | ||
116 | } | ||
diff --git a/arch/powerpc/lib/memcpy_64.S b/arch/powerpc/lib/memcpy_64.S index 9ccacdf5bcb9..fd66acfd3e3e 100644 --- a/arch/powerpc/lib/memcpy_64.S +++ b/arch/powerpc/lib/memcpy_64.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/lib/memcpy.S | ||
3 | * | ||
4 | * Copyright (C) 2002 Paul Mackerras, IBM Corp. | 2 | * Copyright (C) 2002 Paul Mackerras, IBM Corp. |
5 | * | 3 | * |
6 | * This program is free software; you can redistribute it and/or | 4 | * This program is free software; you can redistribute it and/or |
diff --git a/arch/powerpc/lib/rheap.c b/arch/powerpc/lib/rheap.c index 42c5de2c898f..31e511856dc5 100644 --- a/arch/powerpc/lib/rheap.c +++ b/arch/powerpc/lib/rheap.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/rheap.c | ||
3 | * | ||
4 | * A Remote Heap. Remote means that we don't touch the memory that the | 2 | * A Remote Heap. Remote means that we don't touch the memory that the |
5 | * heap points to. Normal heap implementations use the memory they manage | 3 | * heap points to. Normal heap implementations use the memory they manage |
6 | * to place their list. We cannot do that because the memory we manage may | 4 | * to place their list. We cannot do that because the memory we manage may |
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index a4815d316722..ec4adcb4bc28 100644 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/mm/fault.c | ||
3 | * | ||
4 | * PowerPC version | 2 | * PowerPC version |
5 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 3 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
6 | * | 4 | * |
diff --git a/arch/powerpc/mm/hash_low_32.S b/arch/powerpc/mm/hash_low_32.S index 12ccd7155bac..ea469eefa146 100644 --- a/arch/powerpc/mm/hash_low_32.S +++ b/arch/powerpc/mm/hash_low_32.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/hashtable.S | ||
3 | * | ||
4 | * $Id: hashtable.S,v 1.6 1999/10/08 01:56:15 paulus Exp $ | 2 | * $Id: hashtable.S,v 1.6 1999/10/08 01:56:15 paulus Exp $ |
5 | * | 3 | * |
6 | * PowerPC version | 4 | * PowerPC version |
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index e9d589eefc14..89b35c181314 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -169,7 +169,7 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend, | |||
169 | #ifdef CONFIG_PPC_ISERIES | 169 | #ifdef CONFIG_PPC_ISERIES |
170 | if (_machine == PLATFORM_ISERIES_LPAR) | 170 | if (_machine == PLATFORM_ISERIES_LPAR) |
171 | ret = iSeries_hpte_insert(hpteg, va, | 171 | ret = iSeries_hpte_insert(hpteg, va, |
172 | __pa(vaddr), | 172 | paddr, |
173 | tmp_mode, | 173 | tmp_mode, |
174 | HPTE_V_BOLTED, | 174 | HPTE_V_BOLTED, |
175 | psize); | 175 | psize); |
@@ -178,7 +178,7 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend, | |||
178 | #ifdef CONFIG_PPC_PSERIES | 178 | #ifdef CONFIG_PPC_PSERIES |
179 | if (_machine & PLATFORM_LPAR) | 179 | if (_machine & PLATFORM_LPAR) |
180 | ret = pSeries_lpar_hpte_insert(hpteg, va, | 180 | ret = pSeries_lpar_hpte_insert(hpteg, va, |
181 | virt_to_abs(paddr), | 181 | paddr, |
182 | tmp_mode, | 182 | tmp_mode, |
183 | HPTE_V_BOLTED, | 183 | HPTE_V_BOLTED, |
184 | psize); | 184 | psize); |
@@ -186,7 +186,7 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend, | |||
186 | #endif | 186 | #endif |
187 | #ifdef CONFIG_PPC_MULTIPLATFORM | 187 | #ifdef CONFIG_PPC_MULTIPLATFORM |
188 | ret = native_hpte_insert(hpteg, va, | 188 | ret = native_hpte_insert(hpteg, va, |
189 | virt_to_abs(paddr), | 189 | paddr, |
190 | tmp_mode, HPTE_V_BOLTED, | 190 | tmp_mode, HPTE_V_BOLTED, |
191 | psize); | 191 | psize); |
192 | #endif | 192 | #endif |
@@ -392,7 +392,7 @@ static unsigned long __init htab_get_table_size(void) | |||
392 | #ifdef CONFIG_MEMORY_HOTPLUG | 392 | #ifdef CONFIG_MEMORY_HOTPLUG |
393 | void create_section_mapping(unsigned long start, unsigned long end) | 393 | void create_section_mapping(unsigned long start, unsigned long end) |
394 | { | 394 | { |
395 | BUG_ON(htab_bolt_mapping(start, end, start, | 395 | BUG_ON(htab_bolt_mapping(start, end, __pa(start), |
396 | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX, | 396 | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX, |
397 | mmu_linear_psize)); | 397 | mmu_linear_psize)); |
398 | } | 398 | } |
@@ -422,7 +422,7 @@ void __init htab_initialize(void) | |||
422 | 422 | ||
423 | htab_hash_mask = pteg_count - 1; | 423 | htab_hash_mask = pteg_count - 1; |
424 | 424 | ||
425 | if (platform_is_lpar()) { | 425 | if (firmware_has_feature(FW_FEATURE_LPAR)) { |
426 | /* Using a hypervisor which owns the htab */ | 426 | /* Using a hypervisor which owns the htab */ |
427 | htab_address = NULL; | 427 | htab_address = NULL; |
428 | _SDR1 = 0; | 428 | _SDR1 = 0; |
@@ -431,7 +431,6 @@ void __init htab_initialize(void) | |||
431 | * the absolute address space. | 431 | * the absolute address space. |
432 | */ | 432 | */ |
433 | table = lmb_alloc(htab_size_bytes, htab_size_bytes); | 433 | table = lmb_alloc(htab_size_bytes, htab_size_bytes); |
434 | BUG_ON(table == 0); | ||
435 | 434 | ||
436 | DBG("Hash table allocated at %lx, size: %lx\n", table, | 435 | DBG("Hash table allocated at %lx, size: %lx\n", table, |
437 | htab_size_bytes); | 436 | htab_size_bytes); |
@@ -474,21 +473,22 @@ void __init htab_initialize(void) | |||
474 | 473 | ||
475 | if (dart_tablebase != 0 && dart_tablebase >= base | 474 | if (dart_tablebase != 0 && dart_tablebase >= base |
476 | && dart_tablebase < (base + size)) { | 475 | && dart_tablebase < (base + size)) { |
476 | unsigned long dart_table_end = dart_tablebase + 16 * MB; | ||
477 | if (base != dart_tablebase) | 477 | if (base != dart_tablebase) |
478 | BUG_ON(htab_bolt_mapping(base, dart_tablebase, | 478 | BUG_ON(htab_bolt_mapping(base, dart_tablebase, |
479 | base, mode_rw, | 479 | __pa(base), mode_rw, |
480 | mmu_linear_psize)); | 480 | mmu_linear_psize)); |
481 | if ((base + size) > (dart_tablebase + 16*MB)) | 481 | if ((base + size) > dart_table_end) |
482 | BUG_ON(htab_bolt_mapping(dart_tablebase+16*MB, | 482 | BUG_ON(htab_bolt_mapping(dart_tablebase+16*MB, |
483 | base + size, | 483 | base + size, |
484 | dart_tablebase+16*MB, | 484 | __pa(dart_table_end), |
485 | mode_rw, | 485 | mode_rw, |
486 | mmu_linear_psize)); | 486 | mmu_linear_psize)); |
487 | continue; | 487 | continue; |
488 | } | 488 | } |
489 | #endif /* CONFIG_U3_DART */ | 489 | #endif /* CONFIG_U3_DART */ |
490 | BUG_ON(htab_bolt_mapping(base, base + size, base, | 490 | BUG_ON(htab_bolt_mapping(base, base + size, __pa(base), |
491 | mode_rw, mmu_linear_psize)); | 491 | mode_rw, mmu_linear_psize)); |
492 | } | 492 | } |
493 | 493 | ||
494 | /* | 494 | /* |
@@ -505,8 +505,8 @@ void __init htab_initialize(void) | |||
505 | if (base + size >= tce_alloc_start) | 505 | if (base + size >= tce_alloc_start) |
506 | tce_alloc_start = base + size + 1; | 506 | tce_alloc_start = base + size + 1; |
507 | 507 | ||
508 | BUG_ON(htab_bolt_mapping(tce_alloc_start, tce_alloc_end, | 508 | BUG_ON(htab_bolt_mapping(tce_alloc_start, tce_alloc_end, |
509 | tce_alloc_start, mode_rw, | 509 | __pa(tce_alloc_start), mode_rw, |
510 | mmu_linear_psize)); | 510 | mmu_linear_psize)); |
511 | } | 511 | } |
512 | 512 | ||
@@ -517,7 +517,7 @@ void __init htab_initialize(void) | |||
517 | 517 | ||
518 | void htab_initialize_secondary(void) | 518 | void htab_initialize_secondary(void) |
519 | { | 519 | { |
520 | if (!platform_is_lpar()) | 520 | if (!firmware_has_feature(FW_FEATURE_LPAR)) |
521 | mtspr(SPRN_SDR1, _SDR1); | 521 | mtspr(SPRN_SDR1, _SDR1); |
522 | } | 522 | } |
523 | 523 | ||
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index bacb71c89811..babebd15bdc4 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c | |||
@@ -84,54 +84,6 @@ | |||
84 | /* max amount of RAM to use */ | 84 | /* max amount of RAM to use */ |
85 | unsigned long __max_memory; | 85 | unsigned long __max_memory; |
86 | 86 | ||
87 | /* info on what we think the IO hole is */ | ||
88 | unsigned long io_hole_start; | ||
89 | unsigned long io_hole_size; | ||
90 | |||
91 | /* | ||
92 | * Do very early mm setup. | ||
93 | */ | ||
94 | void __init mm_init_ppc64(void) | ||
95 | { | ||
96 | #ifndef CONFIG_PPC_ISERIES | ||
97 | unsigned long i; | ||
98 | #endif | ||
99 | |||
100 | ppc64_boot_msg(0x100, "MM Init"); | ||
101 | |||
102 | /* This is the story of the IO hole... please, keep seated, | ||
103 | * unfortunately, we are out of oxygen masks at the moment. | ||
104 | * So we need some rough way to tell where your big IO hole | ||
105 | * is. On pmac, it's between 2G and 4G, on POWER3, it's around | ||
106 | * that area as well, on POWER4 we don't have one, etc... | ||
107 | * We need that as a "hint" when sizing the TCE table on POWER3 | ||
108 | * So far, the simplest way that seem work well enough for us it | ||
109 | * to just assume that the first discontinuity in our physical | ||
110 | * RAM layout is the IO hole. That may not be correct in the future | ||
111 | * (and isn't on iSeries but then we don't care ;) | ||
112 | */ | ||
113 | |||
114 | #ifndef CONFIG_PPC_ISERIES | ||
115 | for (i = 1; i < lmb.memory.cnt; i++) { | ||
116 | unsigned long base, prevbase, prevsize; | ||
117 | |||
118 | prevbase = lmb.memory.region[i-1].base; | ||
119 | prevsize = lmb.memory.region[i-1].size; | ||
120 | base = lmb.memory.region[i].base; | ||
121 | if (base > (prevbase + prevsize)) { | ||
122 | io_hole_start = prevbase + prevsize; | ||
123 | io_hole_size = base - (prevbase + prevsize); | ||
124 | break; | ||
125 | } | ||
126 | } | ||
127 | #endif /* CONFIG_PPC_ISERIES */ | ||
128 | if (io_hole_start) | ||
129 | printk("IO Hole assumed to be %lx -> %lx\n", | ||
130 | io_hole_start, io_hole_start + io_hole_size - 1); | ||
131 | |||
132 | ppc64_boot_msg(0x100, "MM Init Done"); | ||
133 | } | ||
134 | |||
135 | void free_initmem(void) | 87 | void free_initmem(void) |
136 | { | 88 | { |
137 | unsigned long addr; | 89 | unsigned long addr; |
diff --git a/arch/powerpc/mm/lmb.c b/arch/powerpc/mm/lmb.c index bbe3eac918e8..417d58518558 100644 --- a/arch/powerpc/mm/lmb.c +++ b/arch/powerpc/mm/lmb.c | |||
@@ -31,6 +31,8 @@ | |||
31 | #define DBG(fmt...) | 31 | #define DBG(fmt...) |
32 | #endif | 32 | #endif |
33 | 33 | ||
34 | #define LMB_ALLOC_ANYWHERE 0 | ||
35 | |||
34 | struct lmb lmb; | 36 | struct lmb lmb; |
35 | 37 | ||
36 | void lmb_dump_all(void) | 38 | void lmb_dump_all(void) |
@@ -226,6 +228,20 @@ unsigned long __init lmb_alloc(unsigned long size, unsigned long align) | |||
226 | unsigned long __init lmb_alloc_base(unsigned long size, unsigned long align, | 228 | unsigned long __init lmb_alloc_base(unsigned long size, unsigned long align, |
227 | unsigned long max_addr) | 229 | unsigned long max_addr) |
228 | { | 230 | { |
231 | unsigned long alloc; | ||
232 | |||
233 | alloc = __lmb_alloc_base(size, align, max_addr); | ||
234 | |||
235 | if (alloc == 0) | ||
236 | panic("ERROR: Failed to allocate 0x%lx bytes below 0x%lx.\n", | ||
237 | size, max_addr); | ||
238 | |||
239 | return alloc; | ||
240 | } | ||
241 | |||
242 | unsigned long __init __lmb_alloc_base(unsigned long size, unsigned long align, | ||
243 | unsigned long max_addr) | ||
244 | { | ||
229 | long i, j; | 245 | long i, j; |
230 | unsigned long base = 0; | 246 | unsigned long base = 0; |
231 | 247 | ||
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 454cac01d8cc..badac10d700c 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -125,7 +125,7 @@ int __devinit add_memory(u64 start, u64 size) | |||
125 | nid = hot_add_scn_to_nid(start); | 125 | nid = hot_add_scn_to_nid(start); |
126 | pgdata = NODE_DATA(nid); | 126 | pgdata = NODE_DATA(nid); |
127 | 127 | ||
128 | start = __va(start); | 128 | start = (unsigned long)__va(start); |
129 | create_section_mapping(start, start + size); | 129 | create_section_mapping(start, start + size); |
130 | 130 | ||
131 | /* this should work for most non-highmem platforms */ | 131 | /* this should work for most non-highmem platforms */ |
@@ -249,7 +249,6 @@ void __init do_init_bootmem(void) | |||
249 | bootmap_pages = bootmem_bootmap_pages(total_pages); | 249 | bootmap_pages = bootmem_bootmap_pages(total_pages); |
250 | 250 | ||
251 | start = lmb_alloc(bootmap_pages << PAGE_SHIFT, PAGE_SIZE); | 251 | start = lmb_alloc(bootmap_pages << PAGE_SHIFT, PAGE_SIZE); |
252 | BUG_ON(!start); | ||
253 | 252 | ||
254 | boot_mapsize = init_bootmem(start >> PAGE_SHIFT, total_pages); | 253 | boot_mapsize = init_bootmem(start >> PAGE_SHIFT, total_pages); |
255 | 254 | ||
diff --git a/arch/powerpc/mm/mmap.c b/arch/powerpc/mm/mmap.c index fe65f522aff3..972a8e884b9a 100644 --- a/arch/powerpc/mm/mmap.c +++ b/arch/powerpc/mm/mmap.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/ppc64/mm/mmap.c | ||
3 | * | ||
4 | * flexible mmap layout support | 2 | * flexible mmap layout support |
5 | * | 3 | * |
6 | * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina. | 4 | * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina. |
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 2863a912bcd0..e89b22aa539e 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -129,10 +129,12 @@ void __init get_region(unsigned int nid, unsigned long *start_pfn, | |||
129 | *start_pfn = 0; | 129 | *start_pfn = 0; |
130 | } | 130 | } |
131 | 131 | ||
132 | static inline void map_cpu_to_node(int cpu, int node) | 132 | static void __cpuinit map_cpu_to_node(int cpu, int node) |
133 | { | 133 | { |
134 | numa_cpu_lookup_table[cpu] = node; | 134 | numa_cpu_lookup_table[cpu] = node; |
135 | 135 | ||
136 | dbg("adding cpu %d to node %d\n", cpu, node); | ||
137 | |||
136 | if (!(cpu_isset(cpu, numa_cpumask_lookup_table[node]))) | 138 | if (!(cpu_isset(cpu, numa_cpumask_lookup_table[node]))) |
137 | cpu_set(cpu, numa_cpumask_lookup_table[node]); | 139 | cpu_set(cpu, numa_cpumask_lookup_table[node]); |
138 | } | 140 | } |
@@ -153,7 +155,7 @@ static void unmap_cpu_from_node(unsigned long cpu) | |||
153 | } | 155 | } |
154 | #endif /* CONFIG_HOTPLUG_CPU */ | 156 | #endif /* CONFIG_HOTPLUG_CPU */ |
155 | 157 | ||
156 | static struct device_node *find_cpu_node(unsigned int cpu) | 158 | static struct device_node * __cpuinit find_cpu_node(unsigned int cpu) |
157 | { | 159 | { |
158 | unsigned int hw_cpuid = get_hard_smp_processor_id(cpu); | 160 | unsigned int hw_cpuid = get_hard_smp_processor_id(cpu); |
159 | struct device_node *cpu_node = NULL; | 161 | struct device_node *cpu_node = NULL; |
@@ -189,23 +191,29 @@ static int *of_get_associativity(struct device_node *dev) | |||
189 | return (unsigned int *)get_property(dev, "ibm,associativity", NULL); | 191 | return (unsigned int *)get_property(dev, "ibm,associativity", NULL); |
190 | } | 192 | } |
191 | 193 | ||
192 | static int of_node_numa_domain(struct device_node *device) | 194 | /* Returns nid in the range [0..MAX_NUMNODES-1], or -1 if no useful numa |
195 | * info is found. | ||
196 | */ | ||
197 | static int of_node_to_nid(struct device_node *device) | ||
193 | { | 198 | { |
194 | int numa_domain; | 199 | int nid = -1; |
195 | unsigned int *tmp; | 200 | unsigned int *tmp; |
196 | 201 | ||
197 | if (min_common_depth == -1) | 202 | if (min_common_depth == -1) |
198 | return 0; | 203 | goto out; |
199 | 204 | ||
200 | tmp = of_get_associativity(device); | 205 | tmp = of_get_associativity(device); |
201 | if (tmp && (tmp[0] >= min_common_depth)) { | 206 | if (!tmp) |
202 | numa_domain = tmp[min_common_depth]; | 207 | goto out; |
203 | } else { | 208 | |
204 | dbg("WARNING: no NUMA information for %s\n", | 209 | if (tmp[0] >= min_common_depth) |
205 | device->full_name); | 210 | nid = tmp[min_common_depth]; |
206 | numa_domain = 0; | 211 | |
207 | } | 212 | /* POWER4 LPAR uses 0xffff as invalid node */ |
208 | return numa_domain; | 213 | if (nid == 0xffff || nid >= MAX_NUMNODES) |
214 | nid = -1; | ||
215 | out: | ||
216 | return nid; | ||
209 | } | 217 | } |
210 | 218 | ||
211 | /* | 219 | /* |
@@ -246,8 +254,7 @@ static int __init find_min_common_depth(void) | |||
246 | if ((len >= 1) && ref_points) { | 254 | if ((len >= 1) && ref_points) { |
247 | depth = ref_points[1]; | 255 | depth = ref_points[1]; |
248 | } else { | 256 | } else { |
249 | dbg("WARNING: could not find NUMA " | 257 | dbg("NUMA: ibm,associativity-reference-points not found.\n"); |
250 | "associativity reference point\n"); | ||
251 | depth = -1; | 258 | depth = -1; |
252 | } | 259 | } |
253 | of_node_put(rtas_root); | 260 | of_node_put(rtas_root); |
@@ -283,9 +290,9 @@ static unsigned long __devinit read_n_cells(int n, unsigned int **buf) | |||
283 | * Figure out to which domain a cpu belongs and stick it there. | 290 | * Figure out to which domain a cpu belongs and stick it there. |
284 | * Return the id of the domain used. | 291 | * Return the id of the domain used. |
285 | */ | 292 | */ |
286 | static int numa_setup_cpu(unsigned long lcpu) | 293 | static int __cpuinit numa_setup_cpu(unsigned long lcpu) |
287 | { | 294 | { |
288 | int numa_domain = 0; | 295 | int nid = 0; |
289 | struct device_node *cpu = find_cpu_node(lcpu); | 296 | struct device_node *cpu = find_cpu_node(lcpu); |
290 | 297 | ||
291 | if (!cpu) { | 298 | if (!cpu) { |
@@ -293,27 +300,16 @@ static int numa_setup_cpu(unsigned long lcpu) | |||
293 | goto out; | 300 | goto out; |
294 | } | 301 | } |
295 | 302 | ||
296 | numa_domain = of_node_numa_domain(cpu); | 303 | nid = of_node_to_nid(cpu); |
297 | 304 | ||
298 | if (numa_domain >= num_online_nodes()) { | 305 | if (nid < 0 || !node_online(nid)) |
299 | /* | 306 | nid = any_online_node(NODE_MASK_ALL); |
300 | * POWER4 LPAR uses 0xffff as invalid node, | ||
301 | * dont warn in this case. | ||
302 | */ | ||
303 | if (numa_domain != 0xffff) | ||
304 | printk(KERN_ERR "WARNING: cpu %ld " | ||
305 | "maps to invalid NUMA node %d\n", | ||
306 | lcpu, numa_domain); | ||
307 | numa_domain = 0; | ||
308 | } | ||
309 | out: | 307 | out: |
310 | node_set_online(numa_domain); | 308 | map_cpu_to_node(lcpu, nid); |
311 | |||
312 | map_cpu_to_node(lcpu, numa_domain); | ||
313 | 309 | ||
314 | of_node_put(cpu); | 310 | of_node_put(cpu); |
315 | 311 | ||
316 | return numa_domain; | 312 | return nid; |
317 | } | 313 | } |
318 | 314 | ||
319 | static int cpu_numa_callback(struct notifier_block *nfb, | 315 | static int cpu_numa_callback(struct notifier_block *nfb, |
@@ -325,10 +321,7 @@ static int cpu_numa_callback(struct notifier_block *nfb, | |||
325 | 321 | ||
326 | switch (action) { | 322 | switch (action) { |
327 | case CPU_UP_PREPARE: | 323 | case CPU_UP_PREPARE: |
328 | if (min_common_depth == -1 || !numa_enabled) | 324 | numa_setup_cpu(lcpu); |
329 | map_cpu_to_node(lcpu, 0); | ||
330 | else | ||
331 | numa_setup_cpu(lcpu); | ||
332 | ret = NOTIFY_OK; | 325 | ret = NOTIFY_OK; |
333 | break; | 326 | break; |
334 | #ifdef CONFIG_HOTPLUG_CPU | 327 | #ifdef CONFIG_HOTPLUG_CPU |
@@ -375,7 +368,7 @@ static int __init parse_numa_properties(void) | |||
375 | { | 368 | { |
376 | struct device_node *cpu = NULL; | 369 | struct device_node *cpu = NULL; |
377 | struct device_node *memory = NULL; | 370 | struct device_node *memory = NULL; |
378 | int max_domain; | 371 | int default_nid = 0; |
379 | unsigned long i; | 372 | unsigned long i; |
380 | 373 | ||
381 | if (numa_enabled == 0) { | 374 | if (numa_enabled == 0) { |
@@ -385,32 +378,32 @@ static int __init parse_numa_properties(void) | |||
385 | 378 | ||
386 | min_common_depth = find_min_common_depth(); | 379 | min_common_depth = find_min_common_depth(); |
387 | 380 | ||
388 | dbg("NUMA associativity depth for CPU/Memory: %d\n", min_common_depth); | ||
389 | if (min_common_depth < 0) | 381 | if (min_common_depth < 0) |
390 | return min_common_depth; | 382 | return min_common_depth; |
391 | 383 | ||
392 | max_domain = numa_setup_cpu(boot_cpuid); | 384 | dbg("NUMA associativity depth for CPU/Memory: %d\n", min_common_depth); |
393 | 385 | ||
394 | /* | 386 | /* |
395 | * Even though we connect cpus to numa domains later in SMP init, | 387 | * Even though we connect cpus to numa domains later in SMP |
396 | * we need to know the maximum node id now. This is because each | 388 | * init, we need to know the node ids now. This is because |
397 | * node id must have NODE_DATA etc backing it. | 389 | * each node to be onlined must have NODE_DATA etc backing it. |
398 | * As a result of hotplug we could still have cpus appear later on | ||
399 | * with larger node ids. In that case we force the cpu into node 0. | ||
400 | */ | 390 | */ |
401 | for_each_cpu(i) { | 391 | for_each_present_cpu(i) { |
402 | int numa_domain; | 392 | int nid; |
403 | 393 | ||
404 | cpu = find_cpu_node(i); | 394 | cpu = find_cpu_node(i); |
395 | BUG_ON(!cpu); | ||
396 | nid = of_node_to_nid(cpu); | ||
397 | of_node_put(cpu); | ||
405 | 398 | ||
406 | if (cpu) { | 399 | /* |
407 | numa_domain = of_node_numa_domain(cpu); | 400 | * Don't fall back to default_nid yet -- we will plug |
408 | of_node_put(cpu); | 401 | * cpus into nodes once the memory scan has discovered |
409 | 402 | * the topology. | |
410 | if (numa_domain < MAX_NUMNODES && | 403 | */ |
411 | max_domain < numa_domain) | 404 | if (nid < 0) |
412 | max_domain = numa_domain; | 405 | continue; |
413 | } | 406 | node_set_online(nid); |
414 | } | 407 | } |
415 | 408 | ||
416 | get_n_mem_cells(&n_mem_addr_cells, &n_mem_size_cells); | 409 | get_n_mem_cells(&n_mem_addr_cells, &n_mem_size_cells); |
@@ -418,7 +411,7 @@ static int __init parse_numa_properties(void) | |||
418 | while ((memory = of_find_node_by_type(memory, "memory")) != NULL) { | 411 | while ((memory = of_find_node_by_type(memory, "memory")) != NULL) { |
419 | unsigned long start; | 412 | unsigned long start; |
420 | unsigned long size; | 413 | unsigned long size; |
421 | int numa_domain; | 414 | int nid; |
422 | int ranges; | 415 | int ranges; |
423 | unsigned int *memcell_buf; | 416 | unsigned int *memcell_buf; |
424 | unsigned int len; | 417 | unsigned int len; |
@@ -439,18 +432,15 @@ new_range: | |||
439 | start = read_n_cells(n_mem_addr_cells, &memcell_buf); | 432 | start = read_n_cells(n_mem_addr_cells, &memcell_buf); |
440 | size = read_n_cells(n_mem_size_cells, &memcell_buf); | 433 | size = read_n_cells(n_mem_size_cells, &memcell_buf); |
441 | 434 | ||
442 | numa_domain = of_node_numa_domain(memory); | 435 | /* |
443 | 436 | * Assumption: either all memory nodes or none will | |
444 | if (numa_domain >= MAX_NUMNODES) { | 437 | * have associativity properties. If none, then |
445 | if (numa_domain != 0xffff) | 438 | * everything goes to default_nid. |
446 | printk(KERN_ERR "WARNING: memory at %lx maps " | 439 | */ |
447 | "to invalid NUMA node %d\n", start, | 440 | nid = of_node_to_nid(memory); |
448 | numa_domain); | 441 | if (nid < 0) |
449 | numa_domain = 0; | 442 | nid = default_nid; |
450 | } | 443 | node_set_online(nid); |
451 | |||
452 | if (max_domain < numa_domain) | ||
453 | max_domain = numa_domain; | ||
454 | 444 | ||
455 | if (!(size = numa_enforce_memory_limit(start, size))) { | 445 | if (!(size = numa_enforce_memory_limit(start, size))) { |
456 | if (--ranges) | 446 | if (--ranges) |
@@ -459,16 +449,13 @@ new_range: | |||
459 | continue; | 449 | continue; |
460 | } | 450 | } |
461 | 451 | ||
462 | add_region(numa_domain, start >> PAGE_SHIFT, | 452 | add_region(nid, start >> PAGE_SHIFT, |
463 | size >> PAGE_SHIFT); | 453 | size >> PAGE_SHIFT); |
464 | 454 | ||
465 | if (--ranges) | 455 | if (--ranges) |
466 | goto new_range; | 456 | goto new_range; |
467 | } | 457 | } |
468 | 458 | ||
469 | for (i = 0; i <= max_domain; i++) | ||
470 | node_set_online(i); | ||
471 | |||
472 | return 0; | 459 | return 0; |
473 | } | 460 | } |
474 | 461 | ||
@@ -483,7 +470,6 @@ static void __init setup_nonnuma(void) | |||
483 | printk(KERN_INFO "Memory hole size: %ldMB\n", | 470 | printk(KERN_INFO "Memory hole size: %ldMB\n", |
484 | (top_of_ram - total_ram) >> 20); | 471 | (top_of_ram - total_ram) >> 20); |
485 | 472 | ||
486 | map_cpu_to_node(boot_cpuid, 0); | ||
487 | for (i = 0; i < lmb.memory.cnt; ++i) | 473 | for (i = 0; i < lmb.memory.cnt; ++i) |
488 | add_region(0, lmb.memory.region[i].base >> PAGE_SHIFT, | 474 | add_region(0, lmb.memory.region[i].base >> PAGE_SHIFT, |
489 | lmb_size_pages(&lmb.memory, i)); | 475 | lmb_size_pages(&lmb.memory, i)); |
@@ -570,11 +556,11 @@ static void __init *careful_allocation(int nid, unsigned long size, | |||
570 | unsigned long end_pfn) | 556 | unsigned long end_pfn) |
571 | { | 557 | { |
572 | int new_nid; | 558 | int new_nid; |
573 | unsigned long ret = lmb_alloc_base(size, align, end_pfn << PAGE_SHIFT); | 559 | unsigned long ret = __lmb_alloc_base(size, align, end_pfn << PAGE_SHIFT); |
574 | 560 | ||
575 | /* retry over all memory */ | 561 | /* retry over all memory */ |
576 | if (!ret) | 562 | if (!ret) |
577 | ret = lmb_alloc_base(size, align, lmb_end_of_DRAM()); | 563 | ret = __lmb_alloc_base(size, align, lmb_end_of_DRAM()); |
578 | 564 | ||
579 | if (!ret) | 565 | if (!ret) |
580 | panic("numa.c: cannot allocate %lu bytes on node %d", | 566 | panic("numa.c: cannot allocate %lu bytes on node %d", |
@@ -620,6 +606,8 @@ void __init do_init_bootmem(void) | |||
620 | dump_numa_memory_topology(); | 606 | dump_numa_memory_topology(); |
621 | 607 | ||
622 | register_cpu_notifier(&ppc64_numa_nb); | 608 | register_cpu_notifier(&ppc64_numa_nb); |
609 | cpu_numa_callback(&ppc64_numa_nb, CPU_UP_PREPARE, | ||
610 | (void *)(unsigned long)boot_cpuid); | ||
623 | 611 | ||
624 | for_each_online_node(nid) { | 612 | for_each_online_node(nid) { |
625 | unsigned long start_pfn, end_pfn, pages_present; | 613 | unsigned long start_pfn, end_pfn, pages_present; |
@@ -767,10 +755,10 @@ int hot_add_scn_to_nid(unsigned long scn_addr) | |||
767 | { | 755 | { |
768 | struct device_node *memory = NULL; | 756 | struct device_node *memory = NULL; |
769 | nodemask_t nodes; | 757 | nodemask_t nodes; |
770 | int numa_domain = 0; | 758 | int default_nid = any_online_node(NODE_MASK_ALL); |
771 | 759 | ||
772 | if (!numa_enabled || (min_common_depth < 0)) | 760 | if (!numa_enabled || (min_common_depth < 0)) |
773 | return numa_domain; | 761 | return default_nid; |
774 | 762 | ||
775 | while ((memory = of_find_node_by_type(memory, "memory")) != NULL) { | 763 | while ((memory = of_find_node_by_type(memory, "memory")) != NULL) { |
776 | unsigned long start, size; | 764 | unsigned long start, size; |
@@ -787,15 +775,15 @@ int hot_add_scn_to_nid(unsigned long scn_addr) | |||
787 | ha_new_range: | 775 | ha_new_range: |
788 | start = read_n_cells(n_mem_addr_cells, &memcell_buf); | 776 | start = read_n_cells(n_mem_addr_cells, &memcell_buf); |
789 | size = read_n_cells(n_mem_size_cells, &memcell_buf); | 777 | size = read_n_cells(n_mem_size_cells, &memcell_buf); |
790 | numa_domain = of_node_numa_domain(memory); | 778 | nid = of_node_to_nid(memory); |
791 | 779 | ||
792 | /* Domains not present at boot default to 0 */ | 780 | /* Domains not present at boot default to 0 */ |
793 | if (!node_online(numa_domain)) | 781 | if (nid < 0 || !node_online(nid)) |
794 | numa_domain = any_online_node(NODE_MASK_ALL); | 782 | nid = default_nid; |
795 | 783 | ||
796 | if ((scn_addr >= start) && (scn_addr < (start + size))) { | 784 | if ((scn_addr >= start) && (scn_addr < (start + size))) { |
797 | of_node_put(memory); | 785 | of_node_put(memory); |
798 | goto got_numa_domain; | 786 | goto got_nid; |
799 | } | 787 | } |
800 | 788 | ||
801 | if (--ranges) /* process all ranges in cell */ | 789 | if (--ranges) /* process all ranges in cell */ |
@@ -804,12 +792,12 @@ ha_new_range: | |||
804 | BUG(); /* section address should be found above */ | 792 | BUG(); /* section address should be found above */ |
805 | 793 | ||
806 | /* Temporary code to ensure that returned node is not empty */ | 794 | /* Temporary code to ensure that returned node is not empty */ |
807 | got_numa_domain: | 795 | got_nid: |
808 | nodes_setall(nodes); | 796 | nodes_setall(nodes); |
809 | while (NODE_DATA(numa_domain)->node_spanned_pages == 0) { | 797 | while (NODE_DATA(nid)->node_spanned_pages == 0) { |
810 | node_clear(numa_domain, nodes); | 798 | node_clear(nid, nodes); |
811 | numa_domain = any_online_node(nodes); | 799 | nid = any_online_node(nodes); |
812 | } | 800 | } |
813 | return numa_domain; | 801 | return nid; |
814 | } | 802 | } |
815 | #endif /* CONFIG_MEMORY_HOTPLUG */ | 803 | #endif /* CONFIG_MEMORY_HOTPLUG */ |
diff --git a/arch/powerpc/mm/slb_low.S b/arch/powerpc/mm/slb_low.S index d1acee38f163..abfaabf667bf 100644 --- a/arch/powerpc/mm/slb_low.S +++ b/arch/powerpc/mm/slb_low.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/mm/slb_low.S | ||
3 | * | ||
4 | * Low-level SLB routines | 2 | * Low-level SLB routines |
5 | * | 3 | * |
6 | * Copyright (C) 2004 David Gibson <dwg@au.ibm.com>, IBM | 4 | * Copyright (C) 2004 David Gibson <dwg@au.ibm.com>, IBM |
diff --git a/arch/powerpc/mm/stab.c b/arch/powerpc/mm/stab.c index 82e4951826bc..91d25fb27f89 100644 --- a/arch/powerpc/mm/stab.c +++ b/arch/powerpc/mm/stab.c | |||
@@ -247,10 +247,6 @@ void stabs_alloc(void) | |||
247 | 247 | ||
248 | newstab = lmb_alloc_base(HW_PAGE_SIZE, HW_PAGE_SIZE, | 248 | newstab = lmb_alloc_base(HW_PAGE_SIZE, HW_PAGE_SIZE, |
249 | 1<<SID_SHIFT); | 249 | 1<<SID_SHIFT); |
250 | if (! newstab) | ||
251 | panic("Unable to allocate segment table for CPU %d.\n", | ||
252 | cpu); | ||
253 | |||
254 | newstab = (unsigned long)__va(newstab); | 250 | newstab = (unsigned long)__va(newstab); |
255 | 251 | ||
256 | memset((void *)newstab, 0, HW_PAGE_SIZE); | 252 | memset((void *)newstab, 0, HW_PAGE_SIZE); |
diff --git a/arch/powerpc/mm/tlb_64.c b/arch/powerpc/mm/tlb_64.c index bb3afb6e6317..f734b11566c2 100644 --- a/arch/powerpc/mm/tlb_64.c +++ b/arch/powerpc/mm/tlb_64.c | |||
@@ -36,7 +36,7 @@ | |||
36 | DEFINE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch); | 36 | DEFINE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch); |
37 | 37 | ||
38 | /* This is declared as we are using the more or less generic | 38 | /* This is declared as we are using the more or less generic |
39 | * include/asm-ppc64/tlb.h file -- tgall | 39 | * include/asm-powerpc/tlb.h file -- tgall |
40 | */ | 40 | */ |
41 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | 41 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); |
42 | DEFINE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur); | 42 | DEFINE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur); |
diff --git a/arch/powerpc/oprofile/op_model_power4.c b/arch/powerpc/oprofile/op_model_power4.c index 659a021da0c7..4b06e53eb9b4 100644 --- a/arch/powerpc/oprofile/op_model_power4.c +++ b/arch/powerpc/oprofile/op_model_power4.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/oprofile.h> | 10 | #include <linux/oprofile.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/smp.h> | 12 | #include <linux/smp.h> |
13 | #include <asm/firmware.h> | ||
13 | #include <asm/ptrace.h> | 14 | #include <asm/ptrace.h> |
14 | #include <asm/system.h> | 15 | #include <asm/system.h> |
15 | #include <asm/processor.h> | 16 | #include <asm/processor.h> |
@@ -232,7 +233,7 @@ static unsigned long get_pc(struct pt_regs *regs) | |||
232 | mmcra = mfspr(SPRN_MMCRA); | 233 | mmcra = mfspr(SPRN_MMCRA); |
233 | 234 | ||
234 | /* Were we in the hypervisor? */ | 235 | /* Were we in the hypervisor? */ |
235 | if (platform_is_lpar() && (mmcra & MMCRA_SIHV)) | 236 | if (firmware_has_feature(FW_FEATURE_LPAR) && (mmcra & MMCRA_SIHV)) |
236 | /* function descriptor madness */ | 237 | /* function descriptor madness */ |
237 | return *((unsigned long *)hypervisor_bucket); | 238 | return *((unsigned long *)hypervisor_bucket); |
238 | 239 | ||
diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile index 9d8b28ef3343..5c72367441a8 100644 --- a/arch/powerpc/platforms/83xx/Makefile +++ b/arch/powerpc/platforms/83xx/Makefile | |||
@@ -1,4 +1,6 @@ | |||
1 | # | 1 | # |
2 | # Makefile for the PowerPC 83xx linux kernel. | 2 | # Makefile for the PowerPC 83xx linux kernel. |
3 | # | 3 | # |
4 | obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o pci.o | 4 | obj-y := misc.o |
5 | obj-$(CONFIG_PCI) += pci.o | ||
6 | obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o | ||
diff --git a/arch/powerpc/platforms/83xx/misc.c b/arch/powerpc/platforms/83xx/misc.c new file mode 100644 index 000000000000..1455bcef4892 --- /dev/null +++ b/arch/powerpc/platforms/83xx/misc.c | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * misc setup functions for MPC83xx | ||
3 | * | ||
4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <linux/config.h> | ||
13 | #include <linux/stddef.h> | ||
14 | #include <linux/kernel.h> | ||
15 | |||
16 | #include <asm/io.h> | ||
17 | #include <asm/hw_irq.h> | ||
18 | #include <sysdev/fsl_soc.h> | ||
19 | |||
20 | #include "mpc83xx.h" | ||
21 | |||
22 | void mpc83xx_restart(char *cmd) | ||
23 | { | ||
24 | #define RST_OFFSET 0x00000900 | ||
25 | #define RST_PROT_REG 0x00000018 | ||
26 | #define RST_CTRL_REG 0x0000001c | ||
27 | __be32 __iomem *reg; | ||
28 | |||
29 | /* map reset register space */ | ||
30 | reg = ioremap(get_immrbase() + 0x900, 0xff); | ||
31 | |||
32 | local_irq_disable(); | ||
33 | |||
34 | /* enable software reset "RSTE" */ | ||
35 | out_be32(reg + (RST_PROT_REG >> 2), 0x52535445); | ||
36 | |||
37 | /* set software hard reset */ | ||
38 | out_be32(reg + (RST_CTRL_REG >> 2), 0x2); | ||
39 | for (;;) ; | ||
40 | } | ||
41 | |||
42 | long __init mpc83xx_time_init(void) | ||
43 | { | ||
44 | #define SPCR_OFFSET 0x00000110 | ||
45 | #define SPCR_TBEN 0x00400000 | ||
46 | __be32 __iomem *spcr = ioremap(get_immrbase() + SPCR_OFFSET, 4); | ||
47 | __be32 tmp; | ||
48 | |||
49 | tmp = in_be32(spcr); | ||
50 | out_be32(spcr, tmp | SPCR_TBEN); | ||
51 | |||
52 | iounmap(spcr); | ||
53 | |||
54 | return 0; | ||
55 | } | ||
diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.c b/arch/powerpc/platforms/83xx/mpc834x_sys.c index 2098dd05a773..7c18b4cd5db4 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_sys.c +++ b/arch/powerpc/platforms/83xx/mpc834x_sys.c | |||
@@ -24,22 +24,15 @@ | |||
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/seq_file.h> | 25 | #include <linux/seq_file.h> |
26 | #include <linux/root_dev.h> | 26 | #include <linux/root_dev.h> |
27 | #include <linux/module.h> | ||
28 | #include <linux/fsl_devices.h> | ||
29 | 27 | ||
30 | #include <asm/system.h> | 28 | #include <asm/system.h> |
31 | #include <asm/pgtable.h> | ||
32 | #include <asm/page.h> | ||
33 | #include <asm/atomic.h> | 29 | #include <asm/atomic.h> |
34 | #include <asm/time.h> | 30 | #include <asm/time.h> |
35 | #include <asm/io.h> | 31 | #include <asm/io.h> |
36 | #include <asm/machdep.h> | 32 | #include <asm/machdep.h> |
37 | #include <asm/ipic.h> | 33 | #include <asm/ipic.h> |
38 | #include <asm/bootinfo.h> | 34 | #include <asm/bootinfo.h> |
39 | #include <asm/pci-bridge.h> | ||
40 | #include <asm/mpc83xx.h> | ||
41 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
42 | #include <mm/mmu_decl.h> | ||
43 | #include <asm/prom.h> | 36 | #include <asm/prom.h> |
44 | #include <asm/udbg.h> | 37 | #include <asm/udbg.h> |
45 | #include <sysdev/fsl_soc.h> | 38 | #include <sysdev/fsl_soc.h> |
@@ -52,8 +45,6 @@ unsigned long isa_mem_base = 0; | |||
52 | #endif | 45 | #endif |
53 | 46 | ||
54 | #ifdef CONFIG_PCI | 47 | #ifdef CONFIG_PCI |
55 | extern int mpc83xx_pci2_busno; | ||
56 | |||
57 | static int | 48 | static int |
58 | mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | 49 | mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) |
59 | { | 50 | { |
@@ -78,26 +69,14 @@ mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | |||
78 | const long min_idsel = 0x11, max_idsel = 0x20, irqs_per_slot = 4; | 69 | const long min_idsel = 0x11, max_idsel = 0x20, irqs_per_slot = 4; |
79 | return PCI_IRQ_TABLE_LOOKUP; | 70 | return PCI_IRQ_TABLE_LOOKUP; |
80 | } | 71 | } |
81 | 72 | #endif /* CONFIG_PCI */ | |
82 | static int | ||
83 | mpc83xx_exclude_device(u_char bus, u_char devfn) | ||
84 | { | ||
85 | if (bus == 0 && PCI_SLOT(devfn) == 0) | ||
86 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
87 | if (mpc83xx_pci2_busno) | ||
88 | if (bus == (mpc83xx_pci2_busno) && PCI_SLOT(devfn) == 0) | ||
89 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
90 | return PCIBIOS_SUCCESSFUL; | ||
91 | } | ||
92 | #endif /* CONFIG_PCI */ | ||
93 | 73 | ||
94 | /* ************************************************************************ | 74 | /* ************************************************************************ |
95 | * | 75 | * |
96 | * Setup the architecture | 76 | * Setup the architecture |
97 | * | 77 | * |
98 | */ | 78 | */ |
99 | static void __init | 79 | static void __init mpc834x_sys_setup_arch(void) |
100 | mpc834x_sys_setup_arch(void) | ||
101 | { | 80 | { |
102 | struct device_node *np; | 81 | struct device_node *np; |
103 | 82 | ||
@@ -106,14 +85,14 @@ mpc834x_sys_setup_arch(void) | |||
106 | 85 | ||
107 | np = of_find_node_by_type(NULL, "cpu"); | 86 | np = of_find_node_by_type(NULL, "cpu"); |
108 | if (np != 0) { | 87 | if (np != 0) { |
109 | unsigned int *fp = (int *) get_property(np, "clock-frequency", NULL); | 88 | unsigned int *fp = |
89 | (int *)get_property(np, "clock-frequency", NULL); | ||
110 | if (fp != 0) | 90 | if (fp != 0) |
111 | loops_per_jiffy = *fp / HZ; | 91 | loops_per_jiffy = *fp / HZ; |
112 | else | 92 | else |
113 | loops_per_jiffy = 50000000 / HZ; | 93 | loops_per_jiffy = 50000000 / HZ; |
114 | of_node_put(np); | 94 | of_node_put(np); |
115 | } | 95 | } |
116 | |||
117 | #ifdef CONFIG_PCI | 96 | #ifdef CONFIG_PCI |
118 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | 97 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) |
119 | add_bridge(np); | 98 | add_bridge(np); |
@@ -124,14 +103,13 @@ mpc834x_sys_setup_arch(void) | |||
124 | #endif | 103 | #endif |
125 | 104 | ||
126 | #ifdef CONFIG_ROOT_NFS | 105 | #ifdef CONFIG_ROOT_NFS |
127 | ROOT_DEV = Root_NFS; | 106 | ROOT_DEV = Root_NFS; |
128 | #else | 107 | #else |
129 | ROOT_DEV = Root_HDA1; | 108 | ROOT_DEV = Root_HDA1; |
130 | #endif | 109 | #endif |
131 | } | 110 | } |
132 | 111 | ||
133 | void __init | 112 | void __init mpc834x_sys_init_IRQ(void) |
134 | mpc834x_sys_init_IRQ(void) | ||
135 | { | 113 | { |
136 | u8 senses[8] = { | 114 | u8 senses[8] = { |
137 | 0, /* EXT 0 */ | 115 | 0, /* EXT 0 */ |
@@ -160,64 +138,27 @@ mpc834x_sys_init_IRQ(void) | |||
160 | } | 138 | } |
161 | 139 | ||
162 | #if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374) | 140 | #if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374) |
163 | extern ulong ds1374_get_rtc_time(void); | 141 | extern ulong ds1374_get_rtc_time(void); |
164 | extern int ds1374_set_rtc_time(ulong); | 142 | extern int ds1374_set_rtc_time(ulong); |
165 | 143 | ||
166 | static int __init | 144 | static int __init mpc834x_rtc_hookup(void) |
167 | mpc834x_rtc_hookup(void) | ||
168 | { | 145 | { |
169 | struct timespec tv; | 146 | struct timespec tv; |
170 | 147 | ||
171 | ppc_md.get_rtc_time = ds1374_get_rtc_time; | 148 | ppc_md.get_rtc_time = ds1374_get_rtc_time; |
172 | ppc_md.set_rtc_time = ds1374_set_rtc_time; | 149 | ppc_md.set_rtc_time = ds1374_set_rtc_time; |
173 | 150 | ||
174 | tv.tv_nsec = 0; | 151 | tv.tv_nsec = 0; |
175 | tv.tv_sec = (ppc_md.get_rtc_time)(); | 152 | tv.tv_sec = (ppc_md.get_rtc_time) (); |
176 | do_settimeofday(&tv); | 153 | do_settimeofday(&tv); |
177 | 154 | ||
178 | return 0; | 155 | return 0; |
179 | } | 156 | } |
157 | |||
180 | late_initcall(mpc834x_rtc_hookup); | 158 | late_initcall(mpc834x_rtc_hookup); |
181 | #endif | 159 | #endif |
182 | 160 | ||
183 | static void | 161 | void __init platform_init(void) |
184 | mpc83xx_restart(char *cmd) | ||
185 | { | ||
186 | #define RST_OFFSET 0x00000900 | ||
187 | #define RST_PROT_REG 0x00000018 | ||
188 | #define RST_CTRL_REG 0x0000001c | ||
189 | __be32 __iomem *reg; | ||
190 | |||
191 | // map reset register space | ||
192 | reg = ioremap(get_immrbase() + 0x900, 0xff); | ||
193 | |||
194 | local_irq_disable(); | ||
195 | |||
196 | /* enable software reset "RSTE" */ | ||
197 | out_be32(reg + (RST_PROT_REG >> 2), 0x52535445); | ||
198 | |||
199 | /* set software hard reset */ | ||
200 | out_be32(reg + (RST_CTRL_REG >> 2), 0x52535445); | ||
201 | for(;;); | ||
202 | } | ||
203 | |||
204 | static long __init | ||
205 | mpc83xx_time_init(void) | ||
206 | { | ||
207 | #define SPCR_OFFSET 0x00000110 | ||
208 | #define SPCR_TBEN 0x00400000 | ||
209 | __be32 __iomem *spcr = ioremap(get_immrbase() + SPCR_OFFSET, 4); | ||
210 | __be32 tmp; | ||
211 | |||
212 | tmp = in_be32(spcr); | ||
213 | out_be32(spcr, tmp|SPCR_TBEN); | ||
214 | |||
215 | iounmap(spcr); | ||
216 | |||
217 | return 0; | ||
218 | } | ||
219 | void __init | ||
220 | platform_init(void) | ||
221 | { | 162 | { |
222 | /* setup the PowerPC module struct */ | 163 | /* setup the PowerPC module struct */ |
223 | ppc_md.setup_arch = mpc834x_sys_setup_arch; | 164 | ppc_md.setup_arch = mpc834x_sys_setup_arch; |
@@ -239,5 +180,3 @@ platform_init(void) | |||
239 | 180 | ||
240 | return; | 181 | return; |
241 | } | 182 | } |
242 | |||
243 | |||
diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.h b/arch/powerpc/platforms/83xx/mpc834x_sys.h index e4ca39f6a862..fedecb73f7ff 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_sys.h +++ b/arch/powerpc/platforms/83xx/mpc834x_sys.h | |||
@@ -20,4 +20,4 @@ | |||
20 | #define PIRQC MPC83xx_IRQ_EXT6 | 20 | #define PIRQC MPC83xx_IRQ_EXT6 |
21 | #define PIRQD MPC83xx_IRQ_EXT7 | 21 | #define PIRQD MPC83xx_IRQ_EXT7 |
22 | 22 | ||
23 | #endif /* __MACH_MPC83XX_SYS_H__ */ | 23 | #endif /* __MACH_MPC83XX_SYS_H__ */ |
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h index ce9e66abef24..01cae106912b 100644 --- a/arch/powerpc/platforms/83xx/mpc83xx.h +++ b/arch/powerpc/platforms/83xx/mpc83xx.h | |||
@@ -10,5 +10,8 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | extern int add_bridge(struct device_node *dev); | 12 | extern int add_bridge(struct device_node *dev); |
13 | extern int mpc83xx_exclude_device(u_char bus, u_char devfn); | ||
14 | extern void mpc83xx_restart(char *cmd); | ||
15 | extern long mpc83xx_time_init(void); | ||
13 | 16 | ||
14 | #endif /* __MPC83XX_H__ */ | 17 | #endif /* __MPC83XX_H__ */ |
diff --git a/arch/powerpc/platforms/83xx/pci.c b/arch/powerpc/platforms/83xx/pci.c index 469cdacc5bd4..16f7d3b30e1d 100644 --- a/arch/powerpc/platforms/83xx/pci.c +++ b/arch/powerpc/platforms/83xx/pci.c | |||
@@ -36,7 +36,16 @@ | |||
36 | 36 | ||
37 | int mpc83xx_pci2_busno; | 37 | int mpc83xx_pci2_busno; |
38 | 38 | ||
39 | #ifdef CONFIG_PCI | 39 | int mpc83xx_exclude_device(u_char bus, u_char devfn) |
40 | { | ||
41 | if (bus == 0 && PCI_SLOT(devfn) == 0) | ||
42 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
43 | if (mpc83xx_pci2_busno) | ||
44 | if (bus == (mpc83xx_pci2_busno) && PCI_SLOT(devfn) == 0) | ||
45 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
46 | return PCIBIOS_SUCCESSFUL; | ||
47 | } | ||
48 | |||
40 | int __init add_bridge(struct device_node *dev) | 49 | int __init add_bridge(struct device_node *dev) |
41 | { | 50 | { |
42 | int len; | 51 | int len; |
@@ -52,7 +61,7 @@ int __init add_bridge(struct device_node *dev) | |||
52 | has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); | 61 | has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); |
53 | 62 | ||
54 | /* Get bus range if any */ | 63 | /* Get bus range if any */ |
55 | bus_range = (int *) get_property(dev, "bus-range", &len); | 64 | bus_range = (int *)get_property(dev, "bus-range", &len); |
56 | if (bus_range == NULL || len < 2 * sizeof(int)) { | 65 | if (bus_range == NULL || len < 2 * sizeof(int)) { |
57 | printk(KERN_WARNING "Can't get bus-range for %s, assume" | 66 | printk(KERN_WARNING "Can't get bus-range for %s, assume" |
58 | " bus 0\n", dev->full_name); | 67 | " bus 0\n", dev->full_name); |
@@ -74,7 +83,7 @@ int __init add_bridge(struct device_node *dev) | |||
74 | if ((rsrc.start & 0xfffff) == 0x8500) { | 83 | if ((rsrc.start & 0xfffff) == 0x8500) { |
75 | setup_indirect_pci(hose, immr + 0x8300, immr + 0x8304); | 84 | setup_indirect_pci(hose, immr + 0x8300, immr + 0x8304); |
76 | } | 85 | } |
77 | /* PCI 2*/ | 86 | /* PCI 2 */ |
78 | if ((rsrc.start & 0xfffff) == 0x8600) { | 87 | if ((rsrc.start & 0xfffff) == 0x8600) { |
79 | setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384); | 88 | setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384); |
80 | primary = 0; | 89 | primary = 0; |
@@ -84,10 +93,10 @@ int __init add_bridge(struct device_node *dev) | |||
84 | 93 | ||
85 | printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%08lx. " | 94 | printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%08lx. " |
86 | "Firmware bus number: %d->%d\n", | 95 | "Firmware bus number: %d->%d\n", |
87 | rsrc.start, hose->first_busno, hose->last_busno); | 96 | rsrc.start, hose->first_busno, hose->last_busno); |
88 | 97 | ||
89 | DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", | 98 | DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", |
90 | hose, hose->cfg_addr, hose->cfg_data); | 99 | hose, hose->cfg_addr, hose->cfg_data); |
91 | 100 | ||
92 | /* Interpret the "ranges" property */ | 101 | /* Interpret the "ranges" property */ |
93 | /* This also maps the I/O region and sets isa_io/mem_base */ | 102 | /* This also maps the I/O region and sets isa_io/mem_base */ |
@@ -95,5 +104,3 @@ int __init add_bridge(struct device_node *dev) | |||
95 | 104 | ||
96 | return 0; | 105 | return 0; |
97 | } | 106 | } |
98 | |||
99 | #endif | ||
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig index c5bc2821d991..d3d0ff745e84 100644 --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig | |||
@@ -1,86 +1,30 @@ | |||
1 | config 85xx | 1 | menu "Platform support" |
2 | bool | 2 | depends on PPC_85xx |
3 | depends on E500 | ||
4 | default y | ||
5 | |||
6 | config PPC_INDIRECT_PCI_BE | ||
7 | bool | ||
8 | depends on 85xx | ||
9 | default y | ||
10 | |||
11 | menu "Freescale 85xx options" | ||
12 | depends on E500 | ||
13 | 3 | ||
14 | choice | 4 | choice |
15 | prompt "Machine Type" | 5 | prompt "Machine Type" |
16 | depends on 85xx | ||
17 | default MPC8540_ADS | 6 | default MPC8540_ADS |
18 | 7 | ||
19 | config MPC8540_ADS | 8 | config MPC8540_ADS |
20 | bool "Freescale MPC8540 ADS" | 9 | bool "Freescale MPC8540 ADS" |
21 | help | 10 | help |
22 | This option enables support for the MPC 8540 ADS evaluation board. | 11 | This option enables support for the MPC 8540 ADS board |
23 | |||
24 | config MPC8548_CDS | ||
25 | bool "Freescale MPC8548 CDS" | ||
26 | help | ||
27 | This option enablese support for the MPC8548 CDS evaluation board. | ||
28 | |||
29 | config MPC8555_CDS | ||
30 | bool "Freescale MPC8555 CDS" | ||
31 | help | ||
32 | This option enablese support for the MPC8555 CDS evaluation board. | ||
33 | |||
34 | config MPC8560_ADS | ||
35 | bool "Freescale MPC8560 ADS" | ||
36 | help | ||
37 | This option enables support for the MPC 8560 ADS evaluation board. | ||
38 | |||
39 | config SBC8560 | ||
40 | bool "WindRiver PowerQUICC III SBC8560" | ||
41 | help | ||
42 | This option enables support for the WindRiver PowerQUICC III | ||
43 | SBC8560 board. | ||
44 | |||
45 | config STX_GP3 | ||
46 | bool "Silicon Turnkey Express GP3" | ||
47 | help | ||
48 | This option enables support for the Silicon Turnkey Express GP3 | ||
49 | board. | ||
50 | 12 | ||
51 | endchoice | 13 | endchoice |
52 | 14 | ||
53 | # It's often necessary to know the specific 85xx processor type. | ||
54 | # Fortunately, it is implied (so far) from the board type, so we | ||
55 | # don't need to ask more redundant questions. | ||
56 | config MPC8540 | 15 | config MPC8540 |
57 | bool | 16 | bool |
58 | depends on MPC8540_ADS | 17 | select PPC_UDBG_16550 |
59 | default y | 18 | select PPC_INDIRECT_PCI |
60 | 19 | default y if MPC8540_ADS | |
61 | config MPC8548 | ||
62 | bool | ||
63 | depends on MPC8548_CDS | ||
64 | default y | ||
65 | 20 | ||
66 | config MPC8555 | 21 | config PPC_INDIRECT_PCI_BE |
67 | bool | ||
68 | depends on MPC8555_CDS | ||
69 | default y | ||
70 | |||
71 | config MPC8560 | ||
72 | bool | 22 | bool |
73 | depends on SBC8560 || MPC8560_ADS || STX_GP3 | 23 | depends on PPC_85xx |
74 | default y | ||
75 | |||
76 | config 85xx_PCI2 | ||
77 | bool "Supprt for 2nd PCI host controller" | ||
78 | depends on MPC8555_CDS | ||
79 | default y | 24 | default y |
80 | 25 | ||
81 | config PPC_GEN550 | 26 | config MPIC |
82 | bool | 27 | bool |
83 | depends on MPC8540 || SBC8560 || MPC8555 | ||
84 | default y | 28 | default y |
85 | 29 | ||
86 | endmenu | 30 | endmenu |
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile index 6407197ffd89..ffc4139cb214 100644 --- a/arch/powerpc/platforms/85xx/Makefile +++ b/arch/powerpc/platforms/85xx/Makefile | |||
@@ -1 +1,5 @@ | |||
1 | # empty makefile so make clean works | 1 | # |
2 | # Makefile for the PowerPC 85xx linux kernel. | ||
3 | # | ||
4 | obj-$(CONFIG_PPC_85xx) += misc.o pci.o | ||
5 | obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o | ||
diff --git a/arch/powerpc/platforms/85xx/misc.c b/arch/powerpc/platforms/85xx/misc.c new file mode 100644 index 000000000000..26c5e822c7c8 --- /dev/null +++ b/arch/powerpc/platforms/85xx/misc.c | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * MPC85xx generic code. | ||
3 | * | ||
4 | * Maintained by Kumar Gala (see MAINTAINERS for contact information) | ||
5 | * | ||
6 | * Copyright 2005 Freescale Semiconductor Inc. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | */ | ||
13 | #include <linux/irq.h> | ||
14 | #include <linux/module.h> | ||
15 | #include <asm/irq.h> | ||
16 | |||
17 | extern void abort(void); | ||
18 | |||
19 | void mpc85xx_restart(char *cmd) | ||
20 | { | ||
21 | local_irq_disable(); | ||
22 | abort(); | ||
23 | } | ||
24 | |||
25 | /* For now this is a pass through */ | ||
26 | phys_addr_t fixup_bigphys_addr(phys_addr_t addr, phys_addr_t size) | ||
27 | { | ||
28 | return addr; | ||
29 | }; | ||
30 | |||
31 | EXPORT_SYMBOL(fixup_bigphys_addr); | ||
diff --git a/arch/powerpc/platforms/85xx/mpc8540_ads.h b/arch/powerpc/platforms/85xx/mpc8540_ads.h new file mode 100644 index 000000000000..f770cadb2080 --- /dev/null +++ b/arch/powerpc/platforms/85xx/mpc8540_ads.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/85xx/mpc8540_ads.h | ||
3 | * | ||
4 | * MPC8540ADS board definitions | ||
5 | * | ||
6 | * Maintainer: Kumar Gala <kumar.gala@freescale.com> | ||
7 | * | ||
8 | * Copyright 2004 Freescale Semiconductor Inc. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License as published by the | ||
12 | * Free Software Foundation; either version 2 of the License, or (at your | ||
13 | * option) any later version. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #ifndef __MACH_MPC8540ADS_H__ | ||
18 | #define __MACH_MPC8540ADS_H__ | ||
19 | |||
20 | #include <linux/config.h> | ||
21 | #include <linux/initrd.h> | ||
22 | |||
23 | #define BOARD_CCSRBAR ((uint)0xe0000000) | ||
24 | #define BCSR_ADDR ((uint)0xf8000000) | ||
25 | #define BCSR_SIZE ((uint)(32 * 1024)) | ||
26 | |||
27 | /* PCI interrupt controller */ | ||
28 | #define PIRQA MPC85xx_IRQ_EXT1 | ||
29 | #define PIRQB MPC85xx_IRQ_EXT2 | ||
30 | #define PIRQC MPC85xx_IRQ_EXT3 | ||
31 | #define PIRQD MPC85xx_IRQ_EXT4 | ||
32 | |||
33 | /* Offset of CPM register space */ | ||
34 | #define CPM_MAP_ADDR (CCSRBAR + MPC85xx_CPM_OFFSET) | ||
35 | |||
36 | #endif /* __MACH_MPC8540ADS_H__ */ | ||
diff --git a/arch/powerpc/platforms/85xx/mpc85xx.h b/arch/powerpc/platforms/85xx/mpc85xx.h new file mode 100644 index 000000000000..b44db6268f3d --- /dev/null +++ b/arch/powerpc/platforms/85xx/mpc85xx.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/85xx/mpc85xx.h | ||
3 | * | ||
4 | * MPC85xx soc definitions/function decls | ||
5 | * | ||
6 | * Maintainer: Kumar Gala <kumar.gala@freescale.com> | ||
7 | * | ||
8 | * Copyright 2005 Freescale Semiconductor Inc. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License as published by the | ||
12 | * Free Software Foundation; either version 2 of the License, or (at your | ||
13 | * option) any later version. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | extern void mpc85xx_restart(char *); | ||
18 | extern int add_bridge(struct device_node *dev); | ||
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c new file mode 100644 index 000000000000..b7821dbae00d --- /dev/null +++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c | |||
@@ -0,0 +1,244 @@ | |||
1 | /* | ||
2 | * MPC85xx setup and early boot code plus other random bits. | ||
3 | * | ||
4 | * Maintained by Kumar Gala (see MAINTAINERS for contact information) | ||
5 | * | ||
6 | * Copyright 2005 Freescale Semiconductor Inc. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | */ | ||
13 | |||
14 | #include <linux/config.h> | ||
15 | #include <linux/stddef.h> | ||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/pci.h> | ||
18 | #include <linux/kdev_t.h> | ||
19 | #include <linux/delay.h> | ||
20 | #include <linux/seq_file.h> | ||
21 | #include <linux/root_dev.h> | ||
22 | |||
23 | #include <asm/system.h> | ||
24 | #include <asm/time.h> | ||
25 | #include <asm/machdep.h> | ||
26 | #include <asm/pci-bridge.h> | ||
27 | #include <asm/mpc85xx.h> | ||
28 | #include <asm/prom.h> | ||
29 | #include <asm/mpic.h> | ||
30 | #include <mm/mmu_decl.h> | ||
31 | #include <asm/udbg.h> | ||
32 | |||
33 | #include <sysdev/fsl_soc.h> | ||
34 | #include "mpc85xx.h" | ||
35 | |||
36 | #ifndef CONFIG_PCI | ||
37 | unsigned long isa_io_base = 0; | ||
38 | unsigned long isa_mem_base = 0; | ||
39 | #endif | ||
40 | |||
41 | /* | ||
42 | * Internal interrupts are all Level Sensitive, and Positive Polarity | ||
43 | * | ||
44 | * Note: Likely, this table and the following function should be | ||
45 | * obtained and derived from the OF Device Tree. | ||
46 | */ | ||
47 | static u_char mpc85xx_ads_openpic_initsenses[] __initdata = { | ||
48 | MPC85XX_INTERNAL_IRQ_SENSES, | ||
49 | 0x0, /* External 0: */ | ||
50 | #if defined(CONFIG_PCI) | ||
51 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext 1: PCI slot 0 */ | ||
52 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext 2: PCI slot 1 */ | ||
53 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext 3: PCI slot 2 */ | ||
54 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext 4: PCI slot 3 */ | ||
55 | #else | ||
56 | 0x0, /* External 1: */ | ||
57 | 0x0, /* External 2: */ | ||
58 | 0x0, /* External 3: */ | ||
59 | 0x0, /* External 4: */ | ||
60 | #endif | ||
61 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 5: PHY */ | ||
62 | 0x0, /* External 6: */ | ||
63 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 7: PHY */ | ||
64 | 0x0, /* External 8: */ | ||
65 | 0x0, /* External 9: */ | ||
66 | 0x0, /* External 10: */ | ||
67 | 0x0, /* External 11: */ | ||
68 | }; | ||
69 | |||
70 | #ifdef CONFIG_PCI | ||
71 | /* | ||
72 | * interrupt routing | ||
73 | */ | ||
74 | |||
75 | int | ||
76 | mpc85xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | ||
77 | { | ||
78 | static char pci_irq_table[][4] = | ||
79 | /* | ||
80 | * This is little evil, but works around the fact | ||
81 | * that revA boards have IDSEL starting at 18 | ||
82 | * and others boards (older) start at 12 | ||
83 | * | ||
84 | * PCI IDSEL/INTPIN->INTLINE | ||
85 | * A B C D | ||
86 | */ | ||
87 | { | ||
88 | {PIRQA, PIRQB, PIRQC, PIRQD}, /* IDSEL 2 */ | ||
89 | {PIRQD, PIRQA, PIRQB, PIRQC}, | ||
90 | {PIRQC, PIRQD, PIRQA, PIRQB}, | ||
91 | {PIRQB, PIRQC, PIRQD, PIRQA}, /* IDSEL 5 */ | ||
92 | {0, 0, 0, 0}, /* -- */ | ||
93 | {0, 0, 0, 0}, /* -- */ | ||
94 | {0, 0, 0, 0}, /* -- */ | ||
95 | {0, 0, 0, 0}, /* -- */ | ||
96 | {0, 0, 0, 0}, /* -- */ | ||
97 | {0, 0, 0, 0}, /* -- */ | ||
98 | {PIRQA, PIRQB, PIRQC, PIRQD}, /* IDSEL 12 */ | ||
99 | {PIRQD, PIRQA, PIRQB, PIRQC}, | ||
100 | {PIRQC, PIRQD, PIRQA, PIRQB}, | ||
101 | {PIRQB, PIRQC, PIRQD, PIRQA}, /* IDSEL 15 */ | ||
102 | {0, 0, 0, 0}, /* -- */ | ||
103 | {0, 0, 0, 0}, /* -- */ | ||
104 | {PIRQA, PIRQB, PIRQC, PIRQD}, /* IDSEL 18 */ | ||
105 | {PIRQD, PIRQA, PIRQB, PIRQC}, | ||
106 | {PIRQC, PIRQD, PIRQA, PIRQB}, | ||
107 | {PIRQB, PIRQC, PIRQD, PIRQA}, /* IDSEL 21 */ | ||
108 | }; | ||
109 | |||
110 | const long min_idsel = 2, max_idsel = 21, irqs_per_slot = 4; | ||
111 | return PCI_IRQ_TABLE_LOOKUP; | ||
112 | } | ||
113 | |||
114 | int | ||
115 | mpc85xx_exclude_device(u_char bus, u_char devfn) | ||
116 | { | ||
117 | if (bus == 0 && PCI_SLOT(devfn) == 0) | ||
118 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
119 | else | ||
120 | return PCIBIOS_SUCCESSFUL; | ||
121 | } | ||
122 | |||
123 | #endif /* CONFIG_PCI */ | ||
124 | |||
125 | |||
126 | void __init mpc85xx_ads_pic_init(void) | ||
127 | { | ||
128 | struct mpic *mpic1; | ||
129 | phys_addr_t OpenPIC_PAddr; | ||
130 | |||
131 | /* Determine the Physical Address of the OpenPIC regs */ | ||
132 | OpenPIC_PAddr = get_immrbase() + MPC85xx_OPENPIC_OFFSET; | ||
133 | |||
134 | mpic1 = mpic_alloc(OpenPIC_PAddr, | ||
135 | MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, | ||
136 | 4, MPC85xx_OPENPIC_IRQ_OFFSET, 0, 250, | ||
137 | mpc85xx_ads_openpic_initsenses, | ||
138 | sizeof(mpc85xx_ads_openpic_initsenses), | ||
139 | " OpenPIC "); | ||
140 | BUG_ON(mpic1 == NULL); | ||
141 | mpic_assign_isu(mpic1, 0, OpenPIC_PAddr + 0x10200); | ||
142 | mpic_assign_isu(mpic1, 1, OpenPIC_PAddr + 0x10280); | ||
143 | mpic_assign_isu(mpic1, 2, OpenPIC_PAddr + 0x10300); | ||
144 | mpic_assign_isu(mpic1, 3, OpenPIC_PAddr + 0x10380); | ||
145 | mpic_assign_isu(mpic1, 4, OpenPIC_PAddr + 0x10400); | ||
146 | mpic_assign_isu(mpic1, 5, OpenPIC_PAddr + 0x10480); | ||
147 | mpic_assign_isu(mpic1, 6, OpenPIC_PAddr + 0x10500); | ||
148 | mpic_assign_isu(mpic1, 7, OpenPIC_PAddr + 0x10580); | ||
149 | |||
150 | /* dummy mappings to get to 48 */ | ||
151 | mpic_assign_isu(mpic1, 8, OpenPIC_PAddr + 0x10600); | ||
152 | mpic_assign_isu(mpic1, 9, OpenPIC_PAddr + 0x10680); | ||
153 | mpic_assign_isu(mpic1, 10, OpenPIC_PAddr + 0x10700); | ||
154 | mpic_assign_isu(mpic1, 11, OpenPIC_PAddr + 0x10780); | ||
155 | |||
156 | /* External ints */ | ||
157 | mpic_assign_isu(mpic1, 12, OpenPIC_PAddr + 0x10000); | ||
158 | mpic_assign_isu(mpic1, 13, OpenPIC_PAddr + 0x10080); | ||
159 | mpic_assign_isu(mpic1, 14, OpenPIC_PAddr + 0x10100); | ||
160 | mpic_init(mpic1); | ||
161 | } | ||
162 | |||
163 | /* | ||
164 | * Setup the architecture | ||
165 | */ | ||
166 | static void __init mpc85xx_ads_setup_arch(void) | ||
167 | { | ||
168 | struct device_node *cpu; | ||
169 | struct device_node *np; | ||
170 | |||
171 | if (ppc_md.progress) | ||
172 | ppc_md.progress("mpc85xx_ads_setup_arch()", 0); | ||
173 | |||
174 | cpu = of_find_node_by_type(NULL, "cpu"); | ||
175 | if (cpu != 0) { | ||
176 | unsigned int *fp; | ||
177 | |||
178 | fp = (int *)get_property(cpu, "clock-frequency", NULL); | ||
179 | if (fp != 0) | ||
180 | loops_per_jiffy = *fp / HZ; | ||
181 | else | ||
182 | loops_per_jiffy = 50000000 / HZ; | ||
183 | of_node_put(cpu); | ||
184 | } | ||
185 | |||
186 | #ifdef CONFIG_PCI | ||
187 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | ||
188 | add_bridge(np); | ||
189 | |||
190 | ppc_md.pci_swizzle = common_swizzle; | ||
191 | ppc_md.pci_map_irq = mpc85xx_map_irq; | ||
192 | ppc_md.pci_exclude_device = mpc85xx_exclude_device; | ||
193 | #endif | ||
194 | |||
195 | #ifdef CONFIG_ROOT_NFS | ||
196 | ROOT_DEV = Root_NFS; | ||
197 | #else | ||
198 | ROOT_DEV = Root_HDA1; | ||
199 | #endif | ||
200 | } | ||
201 | |||
202 | void mpc85xx_ads_show_cpuinfo(struct seq_file *m) | ||
203 | { | ||
204 | uint pvid, svid, phid1; | ||
205 | uint memsize = total_memory; | ||
206 | |||
207 | pvid = mfspr(SPRN_PVR); | ||
208 | svid = mfspr(SPRN_SVR); | ||
209 | |||
210 | seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n"); | ||
211 | seq_printf(m, "Machine\t\t: mpc85xx\n"); | ||
212 | seq_printf(m, "PVR\t\t: 0x%x\n", pvid); | ||
213 | seq_printf(m, "SVR\t\t: 0x%x\n", svid); | ||
214 | |||
215 | /* Display cpu Pll setting */ | ||
216 | phid1 = mfspr(SPRN_HID1); | ||
217 | seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); | ||
218 | |||
219 | /* Display the amount of memory */ | ||
220 | seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); | ||
221 | } | ||
222 | |||
223 | void __init platform_init(void) | ||
224 | { | ||
225 | ppc_md.setup_arch = mpc85xx_ads_setup_arch; | ||
226 | ppc_md.show_cpuinfo = mpc85xx_ads_show_cpuinfo; | ||
227 | |||
228 | ppc_md.init_IRQ = mpc85xx_ads_pic_init; | ||
229 | ppc_md.get_irq = mpic_get_irq; | ||
230 | |||
231 | ppc_md.restart = mpc85xx_restart; | ||
232 | ppc_md.power_off = NULL; | ||
233 | ppc_md.halt = NULL; | ||
234 | |||
235 | ppc_md.time_init = NULL; | ||
236 | ppc_md.set_rtc_time = NULL; | ||
237 | ppc_md.get_rtc_time = NULL; | ||
238 | ppc_md.calibrate_decr = generic_calibrate_decr; | ||
239 | |||
240 | ppc_md.progress = udbg_progress; | ||
241 | |||
242 | if (ppc_md.progress) | ||
243 | ppc_md.progress("mpc85xx_ads platform_init(): exit", 0); | ||
244 | } | ||
diff --git a/arch/powerpc/platforms/85xx/pci.c b/arch/powerpc/platforms/85xx/pci.c new file mode 100644 index 000000000000..bad290110ed1 --- /dev/null +++ b/arch/powerpc/platforms/85xx/pci.c | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | * FSL SoC setup code | ||
3 | * | ||
4 | * Maintained by Kumar Gala (see MAINTAINERS for contact information) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <linux/config.h> | ||
13 | #include <linux/stddef.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/errno.h> | ||
17 | #include <linux/pci.h> | ||
18 | #include <linux/delay.h> | ||
19 | #include <linux/irq.h> | ||
20 | #include <linux/module.h> | ||
21 | |||
22 | #include <asm/system.h> | ||
23 | #include <asm/atomic.h> | ||
24 | #include <asm/io.h> | ||
25 | #include <asm/pci-bridge.h> | ||
26 | #include <asm/prom.h> | ||
27 | #include <sysdev/fsl_soc.h> | ||
28 | |||
29 | #undef DEBUG | ||
30 | |||
31 | #ifdef DEBUG | ||
32 | #define DBG(x...) printk(x) | ||
33 | #else | ||
34 | #define DBG(x...) | ||
35 | #endif | ||
36 | |||
37 | int mpc85xx_pci2_busno = 0; | ||
38 | |||
39 | #ifdef CONFIG_PCI | ||
40 | int __init add_bridge(struct device_node *dev) | ||
41 | { | ||
42 | int len; | ||
43 | struct pci_controller *hose; | ||
44 | struct resource rsrc; | ||
45 | int *bus_range; | ||
46 | int primary = 1, has_address = 0; | ||
47 | phys_addr_t immr = get_immrbase(); | ||
48 | |||
49 | DBG("Adding PCI host bridge %s\n", dev->full_name); | ||
50 | |||
51 | /* Fetch host bridge registers address */ | ||
52 | has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); | ||
53 | |||
54 | /* Get bus range if any */ | ||
55 | bus_range = (int *) get_property(dev, "bus-range", &len); | ||
56 | if (bus_range == NULL || len < 2 * sizeof(int)) { | ||
57 | printk(KERN_WARNING "Can't get bus-range for %s, assume" | ||
58 | " bus 0\n", dev->full_name); | ||
59 | } | ||
60 | |||
61 | hose = pcibios_alloc_controller(); | ||
62 | if (!hose) | ||
63 | return -ENOMEM; | ||
64 | hose->arch_data = dev; | ||
65 | hose->set_cfg_type = 1; | ||
66 | |||
67 | hose->first_busno = bus_range ? bus_range[0] : 0; | ||
68 | hose->last_busno = bus_range ? bus_range[1] : 0xff; | ||
69 | |||
70 | /* PCI 1 */ | ||
71 | if ((rsrc.start & 0xfffff) == 0x8000) { | ||
72 | setup_indirect_pci(hose, immr + 0x8000, immr + 0x8004); | ||
73 | } | ||
74 | /* PCI 2 */ | ||
75 | if ((rsrc.start & 0xfffff) == 0x9000) { | ||
76 | setup_indirect_pci(hose, immr + 0x9000, immr + 0x9004); | ||
77 | primary = 0; | ||
78 | hose->bus_offset = hose->first_busno; | ||
79 | mpc85xx_pci2_busno = hose->first_busno; | ||
80 | } | ||
81 | |||
82 | printk(KERN_INFO "Found MPC85xx PCI host bridge at 0x%08lx. " | ||
83 | "Firmware bus number: %d->%d\n", | ||
84 | rsrc.start, hose->first_busno, hose->last_busno); | ||
85 | |||
86 | DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", | ||
87 | hose, hose->cfg_addr, hose->cfg_data); | ||
88 | |||
89 | /* Interpret the "ranges" property */ | ||
90 | /* This also maps the I/O region and sets isa_io/mem_base */ | ||
91 | pci_process_bridge_OF_ranges(hose, dev, primary); | ||
92 | |||
93 | return 0; | ||
94 | } | ||
95 | |||
96 | #endif | ||
diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile index 04073fd987ec..c4f6b0d2d140 100644 --- a/arch/powerpc/platforms/Makefile +++ b/arch/powerpc/platforms/Makefile | |||
@@ -8,7 +8,7 @@ endif | |||
8 | obj-$(CONFIG_PPC_CHRP) += chrp/ | 8 | obj-$(CONFIG_PPC_CHRP) += chrp/ |
9 | obj-$(CONFIG_4xx) += 4xx/ | 9 | obj-$(CONFIG_4xx) += 4xx/ |
10 | obj-$(CONFIG_PPC_83xx) += 83xx/ | 10 | obj-$(CONFIG_PPC_83xx) += 83xx/ |
11 | obj-$(CONFIG_85xx) += 85xx/ | 11 | obj-$(CONFIG_PPC_85xx) += 85xx/ |
12 | obj-$(CONFIG_PPC_PSERIES) += pseries/ | 12 | obj-$(CONFIG_PPC_PSERIES) += pseries/ |
13 | obj-$(CONFIG_PPC_ISERIES) += iseries/ | 13 | obj-$(CONFIG_PPC_ISERIES) += iseries/ |
14 | obj-$(CONFIG_PPC_MAPLE) += maple/ | 14 | obj-$(CONFIG_PPC_MAPLE) += maple/ |
diff --git a/arch/powerpc/platforms/chrp/pegasos_eth.c b/arch/powerpc/platforms/chrp/pegasos_eth.c index 29c86781c493..6ad4b1a72c96 100644 --- a/arch/powerpc/platforms/chrp/pegasos_eth.c +++ b/arch/powerpc/platforms/chrp/pegasos_eth.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/chrp_pegasos_eth.c | ||
3 | * | ||
4 | * Copyright (C) 2005 Sven Luther <sl@bplan-gmbh.de> | 2 | * Copyright (C) 2005 Sven Luther <sl@bplan-gmbh.de> |
5 | * Thanks to : | 3 | * Thanks to : |
6 | * Dale Farnsworth <dale@farnsworth.org> | 4 | * Dale Farnsworth <dale@farnsworth.org> |
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c index e1fadbf49150..8bf4307e323d 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/setup.c | ||
3 | * | ||
4 | * Copyright (C) 1995 Linus Torvalds | 2 | * Copyright (C) 1995 Linus Torvalds |
5 | * Adapted from 'alpha' version by Gary Thomas | 3 | * Adapted from 'alpha' version by Gary Thomas |
6 | * Modified by Cort Dougan (cort@cs.nmt.edu) | 4 | * Modified by Cort Dougan (cort@cs.nmt.edu) |
diff --git a/arch/powerpc/platforms/chrp/time.c b/arch/powerpc/platforms/chrp/time.c index 78df2e7ca88a..12c6f689b1aa 100644 --- a/arch/powerpc/platforms/chrp/time.c +++ b/arch/powerpc/platforms/chrp/time.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/chrp_time.c | ||
3 | * | ||
4 | * Copyright (C) 1991, 1992, 1995 Linus Torvalds | 2 | * Copyright (C) 1991, 1992, 1995 Linus Torvalds |
5 | * | 3 | * |
6 | * Adapted for PowerPC (PReP) by Gary Thomas | 4 | * Adapted for PowerPC (PReP) by Gary Thomas |
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c index a41d8b78c0cd..d771b8ee857d 100644 --- a/arch/powerpc/platforms/iseries/mf.c +++ b/arch/powerpc/platforms/iseries/mf.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include "setup.h" | 46 | #include "setup.h" |
47 | 47 | ||
48 | extern int piranha_simulator; | 48 | extern int piranha_simulator; |
49 | static int mf_initialized; | ||
49 | 50 | ||
50 | /* | 51 | /* |
51 | * This is the structure layout for the Machine Facilites LPAR event | 52 | * This is the structure layout for the Machine Facilites LPAR event |
@@ -143,7 +144,8 @@ static spinlock_t pending_event_spinlock; | |||
143 | static struct pending_event *pending_event_head; | 144 | static struct pending_event *pending_event_head; |
144 | static struct pending_event *pending_event_tail; | 145 | static struct pending_event *pending_event_tail; |
145 | static struct pending_event *pending_event_avail; | 146 | static struct pending_event *pending_event_avail; |
146 | static struct pending_event pending_event_prealloc[16]; | 147 | #define PENDING_EVENT_PREALLOC_LEN 16 |
148 | static struct pending_event pending_event_prealloc[PENDING_EVENT_PREALLOC_LEN]; | ||
147 | 149 | ||
148 | /* | 150 | /* |
149 | * Put a pending event onto the available queue, so it can get reused. | 151 | * Put a pending event onto the available queue, so it can get reused. |
@@ -597,7 +599,7 @@ void mf_power_off(void) | |||
597 | * Global kernel interface to tell the VSP object in the primary | 599 | * Global kernel interface to tell the VSP object in the primary |
598 | * partition to reboot this partition. | 600 | * partition to reboot this partition. |
599 | */ | 601 | */ |
600 | void mf_reboot(void) | 602 | void mf_reboot(char *cmd) |
601 | { | 603 | { |
602 | printk(KERN_INFO "mf.c: Preparing to bounce...\n"); | 604 | printk(KERN_INFO "mf.c: Preparing to bounce...\n"); |
603 | signal_ce_msg_simple(0x4e, NULL); | 605 | signal_ce_msg_simple(0x4e, NULL); |
@@ -625,7 +627,7 @@ void mf_display_src(u32 word) | |||
625 | /* | 627 | /* |
626 | * Display a single word SRC of the form "PROGXXXX" on the VSP control panel. | 628 | * Display a single word SRC of the form "PROGXXXX" on the VSP control panel. |
627 | */ | 629 | */ |
628 | void mf_display_progress(u16 value) | 630 | static __init void mf_display_progress_src(u16 value) |
629 | { | 631 | { |
630 | u8 ce[12]; | 632 | u8 ce[12]; |
631 | u8 src[72]; | 633 | u8 src[72]; |
@@ -649,30 +651,42 @@ void mf_display_progress(u16 value) | |||
649 | * Clear the VSP control panel. Used to "erase" an SRC that was | 651 | * Clear the VSP control panel. Used to "erase" an SRC that was |
650 | * previously displayed. | 652 | * previously displayed. |
651 | */ | 653 | */ |
652 | void mf_clear_src(void) | 654 | static void mf_clear_src(void) |
653 | { | 655 | { |
654 | signal_ce_msg_simple(0x4b, NULL); | 656 | signal_ce_msg_simple(0x4b, NULL); |
655 | } | 657 | } |
656 | 658 | ||
659 | void __init mf_display_progress(u16 value) | ||
660 | { | ||
661 | if (piranha_simulator || !mf_initialized) | ||
662 | return; | ||
663 | |||
664 | if (0xFFFF == value) | ||
665 | mf_clear_src(); | ||
666 | else | ||
667 | mf_display_progress_src(value); | ||
668 | } | ||
669 | |||
657 | /* | 670 | /* |
658 | * Initialization code here. | 671 | * Initialization code here. |
659 | */ | 672 | */ |
660 | void mf_init(void) | 673 | void __init mf_init(void) |
661 | { | 674 | { |
662 | int i; | 675 | int i; |
663 | 676 | ||
664 | /* initialize */ | ||
665 | spin_lock_init(&pending_event_spinlock); | 677 | spin_lock_init(&pending_event_spinlock); |
666 | for (i = 0; | 678 | |
667 | i < sizeof(pending_event_prealloc) / sizeof(*pending_event_prealloc); | 679 | for (i = 0; i < PENDING_EVENT_PREALLOC_LEN; i++) |
668 | ++i) | ||
669 | free_pending_event(&pending_event_prealloc[i]); | 680 | free_pending_event(&pending_event_prealloc[i]); |
681 | |||
670 | HvLpEvent_registerHandler(HvLpEvent_Type_MachineFac, &hv_handler); | 682 | HvLpEvent_registerHandler(HvLpEvent_Type_MachineFac, &hv_handler); |
671 | 683 | ||
672 | /* virtual continue ack */ | 684 | /* virtual continue ack */ |
673 | signal_ce_msg_simple(0x57, NULL); | 685 | signal_ce_msg_simple(0x57, NULL); |
674 | 686 | ||
675 | /* initialization complete */ | 687 | mf_initialized = 1; |
688 | mb(); | ||
689 | |||
676 | printk(KERN_NOTICE "mf.c: iSeries Linux LPAR Machine Facilities " | 690 | printk(KERN_NOTICE "mf.c: iSeries Linux LPAR Machine Facilities " |
677 | "initialized\n"); | 691 | "initialized\n"); |
678 | } | 692 | } |
@@ -692,6 +706,43 @@ static void get_rtc_time_complete(void *token, struct ce_msg_data *ce_msg) | |||
692 | complete(&rtc->com); | 706 | complete(&rtc->com); |
693 | } | 707 | } |
694 | 708 | ||
709 | static int mf_set_rtc(struct rtc_time *tm) | ||
710 | { | ||
711 | char ce_time[12]; | ||
712 | u8 day, mon, hour, min, sec, y1, y2; | ||
713 | unsigned year; | ||
714 | |||
715 | year = 1900 + tm->tm_year; | ||
716 | y1 = year / 100; | ||
717 | y2 = year % 100; | ||
718 | |||
719 | sec = tm->tm_sec; | ||
720 | min = tm->tm_min; | ||
721 | hour = tm->tm_hour; | ||
722 | day = tm->tm_mday; | ||
723 | mon = tm->tm_mon + 1; | ||
724 | |||
725 | BIN_TO_BCD(sec); | ||
726 | BIN_TO_BCD(min); | ||
727 | BIN_TO_BCD(hour); | ||
728 | BIN_TO_BCD(mon); | ||
729 | BIN_TO_BCD(day); | ||
730 | BIN_TO_BCD(y1); | ||
731 | BIN_TO_BCD(y2); | ||
732 | |||
733 | memset(ce_time, 0, sizeof(ce_time)); | ||
734 | ce_time[3] = 0x41; | ||
735 | ce_time[4] = y1; | ||
736 | ce_time[5] = y2; | ||
737 | ce_time[6] = sec; | ||
738 | ce_time[7] = min; | ||
739 | ce_time[8] = hour; | ||
740 | ce_time[10] = day; | ||
741 | ce_time[11] = mon; | ||
742 | |||
743 | return signal_ce_msg(ce_time, NULL); | ||
744 | } | ||
745 | |||
695 | static int rtc_set_tm(int rc, u8 *ce_msg, struct rtc_time *tm) | 746 | static int rtc_set_tm(int rc, u8 *ce_msg, struct rtc_time *tm) |
696 | { | 747 | { |
697 | tm->tm_wday = 0; | 748 | tm->tm_wday = 0; |
@@ -747,7 +798,7 @@ static int rtc_set_tm(int rc, u8 *ce_msg, struct rtc_time *tm) | |||
747 | return 0; | 798 | return 0; |
748 | } | 799 | } |
749 | 800 | ||
750 | int mf_get_rtc(struct rtc_time *tm) | 801 | static int mf_get_rtc(struct rtc_time *tm) |
751 | { | 802 | { |
752 | struct ce_msg_comp_data ce_complete; | 803 | struct ce_msg_comp_data ce_complete; |
753 | struct rtc_time_data rtc_data; | 804 | struct rtc_time_data rtc_data; |
@@ -780,7 +831,7 @@ static void get_boot_rtc_time_complete(void *token, struct ce_msg_data *ce_msg) | |||
780 | rtc->busy = 0; | 831 | rtc->busy = 0; |
781 | } | 832 | } |
782 | 833 | ||
783 | int mf_get_boot_rtc(struct rtc_time *tm) | 834 | static int mf_get_boot_rtc(struct rtc_time *tm) |
784 | { | 835 | { |
785 | struct ce_msg_comp_data ce_complete; | 836 | struct ce_msg_comp_data ce_complete; |
786 | struct boot_rtc_time_data rtc_data; | 837 | struct boot_rtc_time_data rtc_data; |
@@ -802,43 +853,6 @@ int mf_get_boot_rtc(struct rtc_time *tm) | |||
802 | return rtc_set_tm(rtc_data.rc, rtc_data.ce_msg.ce_msg, tm); | 853 | return rtc_set_tm(rtc_data.rc, rtc_data.ce_msg.ce_msg, tm); |
803 | } | 854 | } |
804 | 855 | ||
805 | int mf_set_rtc(struct rtc_time *tm) | ||
806 | { | ||
807 | char ce_time[12]; | ||
808 | u8 day, mon, hour, min, sec, y1, y2; | ||
809 | unsigned year; | ||
810 | |||
811 | year = 1900 + tm->tm_year; | ||
812 | y1 = year / 100; | ||
813 | y2 = year % 100; | ||
814 | |||
815 | sec = tm->tm_sec; | ||
816 | min = tm->tm_min; | ||
817 | hour = tm->tm_hour; | ||
818 | day = tm->tm_mday; | ||
819 | mon = tm->tm_mon + 1; | ||
820 | |||
821 | BIN_TO_BCD(sec); | ||
822 | BIN_TO_BCD(min); | ||
823 | BIN_TO_BCD(hour); | ||
824 | BIN_TO_BCD(mon); | ||
825 | BIN_TO_BCD(day); | ||
826 | BIN_TO_BCD(y1); | ||
827 | BIN_TO_BCD(y2); | ||
828 | |||
829 | memset(ce_time, 0, sizeof(ce_time)); | ||
830 | ce_time[3] = 0x41; | ||
831 | ce_time[4] = y1; | ||
832 | ce_time[5] = y2; | ||
833 | ce_time[6] = sec; | ||
834 | ce_time[7] = min; | ||
835 | ce_time[8] = hour; | ||
836 | ce_time[10] = day; | ||
837 | ce_time[11] = mon; | ||
838 | |||
839 | return signal_ce_msg(ce_time, NULL); | ||
840 | } | ||
841 | |||
842 | #ifdef CONFIG_PROC_FS | 856 | #ifdef CONFIG_PROC_FS |
843 | 857 | ||
844 | static int proc_mf_dump_cmdline(char *page, char **start, off_t off, | 858 | static int proc_mf_dump_cmdline(char *page, char **start, off_t off, |
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index 3ecc4a652d82..fa4550611c11 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <asm/iseries/hv_call_xm.h> | 50 | #include <asm/iseries/hv_call_xm.h> |
51 | #include <asm/iseries/it_lp_queue.h> | 51 | #include <asm/iseries/it_lp_queue.h> |
52 | #include <asm/iseries/mf.h> | 52 | #include <asm/iseries/mf.h> |
53 | #include <asm/iseries/it_exp_vpd_panel.h> | ||
53 | #include <asm/iseries/hv_lp_event.h> | 54 | #include <asm/iseries/hv_lp_event.h> |
54 | #include <asm/iseries/lpar_map.h> | 55 | #include <asm/iseries/lpar_map.h> |
55 | #include <asm/udbg.h> | 56 | #include <asm/udbg.h> |
@@ -89,8 +90,6 @@ extern unsigned long embedded_sysmap_end; | |||
89 | extern unsigned long iSeries_recal_tb; | 90 | extern unsigned long iSeries_recal_tb; |
90 | extern unsigned long iSeries_recal_titan; | 91 | extern unsigned long iSeries_recal_titan; |
91 | 92 | ||
92 | static int mf_initialized; | ||
93 | |||
94 | static unsigned long cmd_mem_limit; | 93 | static unsigned long cmd_mem_limit; |
95 | 94 | ||
96 | struct MemoryBlock { | 95 | struct MemoryBlock { |
@@ -303,8 +302,6 @@ static void __init iSeries_init_early(void) | |||
303 | { | 302 | { |
304 | DBG(" -> iSeries_init_early()\n"); | 303 | DBG(" -> iSeries_init_early()\n"); |
305 | 304 | ||
306 | ppc64_firmware_features = FW_FEATURE_ISERIES; | ||
307 | |||
308 | ppc64_interrupt_controller = IC_ISERIES; | 305 | ppc64_interrupt_controller = IC_ISERIES; |
309 | 306 | ||
310 | #if defined(CONFIG_BLK_DEV_INITRD) | 307 | #if defined(CONFIG_BLK_DEV_INITRD) |
@@ -349,8 +346,6 @@ static void __init iSeries_init_early(void) | |||
349 | HvCallEvent_setLpEventQueueInterruptProc(0, 0); | 346 | HvCallEvent_setLpEventQueueInterruptProc(0, 0); |
350 | 347 | ||
351 | mf_init(); | 348 | mf_init(); |
352 | mf_initialized = 1; | ||
353 | mb(); | ||
354 | 349 | ||
355 | /* If we were passed an initrd, set the ROOT_DEV properly if the values | 350 | /* If we were passed an initrd, set the ROOT_DEV properly if the values |
356 | * look sensible. If not, clear initrd reference. | 351 | * look sensible. If not, clear initrd reference. |
@@ -560,39 +555,10 @@ static void iSeries_show_cpuinfo(struct seq_file *m) | |||
560 | seq_printf(m, "machine\t\t: 64-bit iSeries Logical Partition\n"); | 555 | seq_printf(m, "machine\t\t: 64-bit iSeries Logical Partition\n"); |
561 | } | 556 | } |
562 | 557 | ||
563 | /* | ||
564 | * Document me. | ||
565 | */ | ||
566 | static void iSeries_restart(char *cmd) | ||
567 | { | ||
568 | mf_reboot(); | ||
569 | } | ||
570 | |||
571 | /* | ||
572 | * Document me. | ||
573 | */ | ||
574 | static void iSeries_power_off(void) | ||
575 | { | ||
576 | mf_power_off(); | ||
577 | } | ||
578 | |||
579 | /* | ||
580 | * Document me. | ||
581 | */ | ||
582 | static void iSeries_halt(void) | ||
583 | { | ||
584 | mf_power_off(); | ||
585 | } | ||
586 | |||
587 | static void __init iSeries_progress(char * st, unsigned short code) | 558 | static void __init iSeries_progress(char * st, unsigned short code) |
588 | { | 559 | { |
589 | printk("Progress: [%04x] - %s\n", (unsigned)code, st); | 560 | printk("Progress: [%04x] - %s\n", (unsigned)code, st); |
590 | if (!piranha_simulator && mf_initialized) { | 561 | mf_display_progress(code); |
591 | if (code != 0xffff) | ||
592 | mf_display_progress(code); | ||
593 | else | ||
594 | mf_clear_src(); | ||
595 | } | ||
596 | } | 562 | } |
597 | 563 | ||
598 | static void __init iSeries_fixup_klimit(void) | 564 | static void __init iSeries_fixup_klimit(void) |
@@ -711,7 +677,13 @@ void __init iSeries_init_IRQ(void) { } | |||
711 | 677 | ||
712 | static int __init iseries_probe(int platform) | 678 | static int __init iseries_probe(int platform) |
713 | { | 679 | { |
714 | return PLATFORM_ISERIES_LPAR == platform; | 680 | if (PLATFORM_ISERIES_LPAR != platform) |
681 | return 0; | ||
682 | |||
683 | ppc64_firmware_features |= FW_FEATURE_ISERIES; | ||
684 | ppc64_firmware_features |= FW_FEATURE_LPAR; | ||
685 | |||
686 | return 1; | ||
715 | } | 687 | } |
716 | 688 | ||
717 | struct machdep_calls __initdata iseries_md = { | 689 | struct machdep_calls __initdata iseries_md = { |
@@ -721,9 +693,9 @@ struct machdep_calls __initdata iseries_md = { | |||
721 | .get_irq = iSeries_get_irq, | 693 | .get_irq = iSeries_get_irq, |
722 | .init_early = iSeries_init_early, | 694 | .init_early = iSeries_init_early, |
723 | .pcibios_fixup = iSeries_pci_final_fixup, | 695 | .pcibios_fixup = iSeries_pci_final_fixup, |
724 | .restart = iSeries_restart, | 696 | .restart = mf_reboot, |
725 | .power_off = iSeries_power_off, | 697 | .power_off = mf_power_off, |
726 | .halt = iSeries_halt, | 698 | .halt = mf_power_off, |
727 | .get_boot_time = iSeries_get_boot_time, | 699 | .get_boot_time = iSeries_get_boot_time, |
728 | .set_rtc_time = iSeries_set_rtc_time, | 700 | .set_rtc_time = iSeries_set_rtc_time, |
729 | .get_rtc_time = iSeries_get_rtc_time, | 701 | .get_rtc_time = iSeries_get_rtc_time, |
@@ -917,6 +889,24 @@ void dt_cpus(struct iseries_flat_dt *dt) | |||
917 | dt_end_node(dt); | 889 | dt_end_node(dt); |
918 | } | 890 | } |
919 | 891 | ||
892 | void dt_model(struct iseries_flat_dt *dt) | ||
893 | { | ||
894 | char buf[16] = "IBM,"; | ||
895 | |||
896 | /* "IBM," + mfgId[2:3] + systemSerial[1:5] */ | ||
897 | strne2a(buf + 4, xItExtVpdPanel.mfgID + 2, 2); | ||
898 | strne2a(buf + 6, xItExtVpdPanel.systemSerial + 1, 5); | ||
899 | buf[11] = '\0'; | ||
900 | dt_prop_str(dt, "system-id", buf); | ||
901 | |||
902 | /* "IBM," + machineType[0:4] */ | ||
903 | strne2a(buf + 4, xItExtVpdPanel.machineType, 4); | ||
904 | buf[8] = '\0'; | ||
905 | dt_prop_str(dt, "model", buf); | ||
906 | |||
907 | dt_prop_str(dt, "compatible", "IBM,iSeries"); | ||
908 | } | ||
909 | |||
920 | void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size) | 910 | void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size) |
921 | { | 911 | { |
922 | u64 tmp[2]; | 912 | u64 tmp[2]; |
@@ -927,6 +917,7 @@ void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size) | |||
927 | 917 | ||
928 | dt_prop_u32(dt, "#address-cells", 2); | 918 | dt_prop_u32(dt, "#address-cells", 2); |
929 | dt_prop_u32(dt, "#size-cells", 2); | 919 | dt_prop_u32(dt, "#size-cells", 2); |
920 | dt_model(dt); | ||
930 | 921 | ||
931 | /* /memory */ | 922 | /* /memory */ |
932 | dt_start_node(dt, "memory@0"); | 923 | dt_start_node(dt, "memory@0"); |
@@ -940,6 +931,7 @@ void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size) | |||
940 | /* /chosen */ | 931 | /* /chosen */ |
941 | dt_start_node(dt, "chosen"); | 932 | dt_start_node(dt, "chosen"); |
942 | dt_prop_u32(dt, "linux,platform", PLATFORM_ISERIES_LPAR); | 933 | dt_prop_u32(dt, "linux,platform", PLATFORM_ISERIES_LPAR); |
934 | dt_prop_str(dt, "bootargs", cmd_line); | ||
943 | if (cmd_mem_limit) | 935 | if (cmd_mem_limit) |
944 | dt_prop_u64(dt, "linux,memory-limit", cmd_mem_limit); | 936 | dt_prop_u64(dt, "linux,memory-limit", cmd_mem_limit); |
945 | dt_end_node(dt); | 937 | dt_end_node(dt); |
diff --git a/arch/powerpc/platforms/maple/time.c b/arch/powerpc/platforms/maple/time.c index 50bc4eb85353..5e6981d17379 100644 --- a/arch/powerpc/platforms/maple/time.c +++ b/arch/powerpc/platforms/maple/time.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/maple_time.c | ||
3 | * | ||
4 | * (c) Copyright 2004 Benjamin Herrenschmidt (benh@kernel.crashing.org), | 2 | * (c) Copyright 2004 Benjamin Herrenschmidt (benh@kernel.crashing.org), |
5 | * IBM Corp. | 3 | * IBM Corp. |
6 | * | 4 | * |
diff --git a/arch/powerpc/platforms/powermac/cpufreq_32.c b/arch/powerpc/platforms/powermac/cpufreq_32.c index 56fd4e05fede..cfd6527a0d7e 100644 --- a/arch/powerpc/platforms/powermac/cpufreq_32.c +++ b/arch/powerpc/platforms/powermac/cpufreq_32.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pmac_cpufreq.c | ||
3 | * | ||
4 | * Copyright (C) 2002 - 2005 Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2 | * Copyright (C) 2002 - 2005 Benjamin Herrenschmidt <benh@kernel.crashing.org> |
5 | * Copyright (C) 2004 John Steele Scott <toojays@toojays.net> | 3 | * Copyright (C) 2004 John Steele Scott <toojays@toojays.net> |
6 | * | 4 | * |
diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c index bbe794891a20..e49eddd5042d 100644 --- a/arch/powerpc/platforms/powermac/feature.c +++ b/arch/powerpc/platforms/powermac/feature.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pmac_feature.c | ||
3 | * | ||
4 | * Copyright (C) 1996-2001 Paul Mackerras (paulus@cs.anu.edu.au) | 2 | * Copyright (C) 1996-2001 Paul Mackerras (paulus@cs.anu.edu.au) |
5 | * Ben. Herrenschmidt (benh@kernel.crashing.org) | 3 | * Ben. Herrenschmidt (benh@kernel.crashing.org) |
6 | * | 4 | * |
diff --git a/arch/powerpc/platforms/powermac/nvram.c b/arch/powerpc/platforms/powermac/nvram.c index 3ebd045a3350..5fd28995c74c 100644 --- a/arch/powerpc/platforms/powermac/nvram.c +++ b/arch/powerpc/platforms/powermac/nvram.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pmac_nvram.c | ||
3 | * | ||
4 | * Copyright (C) 2002 Benjamin Herrenschmidt (benh@kernel.crashing.org) | 2 | * Copyright (C) 2002 Benjamin Herrenschmidt (benh@kernel.crashing.org) |
5 | * | 3 | * |
6 | * This program is free software; you can redistribute it and/or | 4 | * This program is free software; you can redistribute it and/or |
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 29c2946f1c77..385aab90c4d2 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -86,11 +86,10 @@ int ppc_override_l2cr = 0; | |||
86 | int ppc_override_l2cr_value; | 86 | int ppc_override_l2cr_value; |
87 | int has_l2cache = 0; | 87 | int has_l2cache = 0; |
88 | 88 | ||
89 | int pmac_newworld = 1; | 89 | int pmac_newworld; |
90 | 90 | ||
91 | static int current_root_goodness = -1; | 91 | static int current_root_goodness = -1; |
92 | 92 | ||
93 | extern int pmac_newworld; | ||
94 | extern struct machdep_calls pmac_md; | 93 | extern struct machdep_calls pmac_md; |
95 | 94 | ||
96 | #define DEFAULT_ROOT_DEVICE Root_SDA1 /* sda1 - slightly silly choice */ | 95 | #define DEFAULT_ROOT_DEVICE Root_SDA1 /* sda1 - slightly silly choice */ |
@@ -308,9 +307,10 @@ static void __init pmac_setup_arch(void) | |||
308 | for (ic = NULL; (ic = of_find_all_nodes(ic)) != NULL; ) | 307 | for (ic = NULL; (ic = of_find_all_nodes(ic)) != NULL; ) |
309 | if (get_property(ic, "interrupt-controller", NULL)) | 308 | if (get_property(ic, "interrupt-controller", NULL)) |
310 | break; | 309 | break; |
311 | pmac_newworld = (ic != NULL); | 310 | if (ic) { |
312 | if (ic) | 311 | pmac_newworld = 1; |
313 | of_node_put(ic); | 312 | of_node_put(ic); |
313 | } | ||
314 | 314 | ||
315 | /* Lookup PCI hosts */ | 315 | /* Lookup PCI hosts */ |
316 | pmac_pci_init(); | 316 | pmac_pci_init(); |
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c index 6d64a9bf3474..1065d87fc279 100644 --- a/arch/powerpc/platforms/powermac/smp.c +++ b/arch/powerpc/platforms/powermac/smp.c | |||
@@ -191,9 +191,7 @@ static void smp_psurge_message_pass(int target, int msg) | |||
191 | if (num_online_cpus() < 2) | 191 | if (num_online_cpus() < 2) |
192 | return; | 192 | return; |
193 | 193 | ||
194 | for (i = 0; i < NR_CPUS; i++) { | 194 | for_each_online_cpu(i) { |
195 | if (!cpu_online(i)) | ||
196 | continue; | ||
197 | if (target == MSG_ALL | 195 | if (target == MSG_ALL |
198 | || (target == MSG_ALL_BUT_SELF && i != smp_processor_id()) | 196 | || (target == MSG_ALL_BUT_SELF && i != smp_processor_id()) |
199 | || target == i) { | 197 | || target == i) { |
diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile index 61616d144072..930898635c9f 100644 --- a/arch/powerpc/platforms/pseries/Makefile +++ b/arch/powerpc/platforms/pseries/Makefile | |||
@@ -1,5 +1,6 @@ | |||
1 | obj-y := pci.o lpar.o hvCall.o nvram.o reconfig.o \ | 1 | obj-y := pci.o lpar.o hvCall.o nvram.o reconfig.o \ |
2 | setup.o iommu.o ras.o rtasd.o pci_dlpar.o | 2 | setup.o iommu.o ras.o rtasd.o pci_dlpar.o \ |
3 | firmware.o | ||
3 | obj-$(CONFIG_SMP) += smp.o | 4 | obj-$(CONFIG_SMP) += smp.o |
4 | obj-$(CONFIG_IBMVIO) += vio.o | 5 | obj-$(CONFIG_IBMVIO) += vio.o |
5 | obj-$(CONFIG_XICS) += xics.o | 6 | obj-$(CONFIG_XICS) += xics.o |
diff --git a/arch/powerpc/platforms/pseries/firmware.c b/arch/powerpc/platforms/pseries/firmware.c new file mode 100644 index 000000000000..989f4bc136cb --- /dev/null +++ b/arch/powerpc/platforms/pseries/firmware.c | |||
@@ -0,0 +1,103 @@ | |||
1 | /* | ||
2 | * pSeries firmware setup code. | ||
3 | * | ||
4 | * Portions from arch/powerpc/platforms/pseries/setup.c: | ||
5 | * Copyright (C) 1995 Linus Torvalds | ||
6 | * Adapted from 'alpha' version by Gary Thomas | ||
7 | * Modified by Cort Dougan (cort@cs.nmt.edu) | ||
8 | * Modified by PPC64 Team, IBM Corp | ||
9 | * | ||
10 | * Portions from arch/powerpc/kernel/firmware.c | ||
11 | * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org) | ||
12 | * Modifications for ppc64: | ||
13 | * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com> | ||
14 | * Copyright (C) 2005 Stephen Rothwell, IBM Corporation | ||
15 | * | ||
16 | * Copyright 2006 IBM Corporation. | ||
17 | * | ||
18 | * This program is free software; you can redistribute it and/or | ||
19 | * modify it under the terms of the GNU General Public License | ||
20 | * as published by the Free Software Foundation; either version | ||
21 | * 2 of the License, or (at your option) any later version. | ||
22 | */ | ||
23 | |||
24 | #undef DEBUG | ||
25 | |||
26 | #include <asm/firmware.h> | ||
27 | #include <asm/prom.h> | ||
28 | |||
29 | #ifdef DEBUG | ||
30 | #define DBG(fmt...) udbg_printf(fmt) | ||
31 | #else | ||
32 | #define DBG(fmt...) | ||
33 | #endif | ||
34 | |||
35 | typedef struct { | ||
36 | unsigned long val; | ||
37 | char * name; | ||
38 | } firmware_feature_t; | ||
39 | |||
40 | static __initdata firmware_feature_t | ||
41 | firmware_features_table[FIRMWARE_MAX_FEATURES] = { | ||
42 | {FW_FEATURE_PFT, "hcall-pft"}, | ||
43 | {FW_FEATURE_TCE, "hcall-tce"}, | ||
44 | {FW_FEATURE_SPRG0, "hcall-sprg0"}, | ||
45 | {FW_FEATURE_DABR, "hcall-dabr"}, | ||
46 | {FW_FEATURE_COPY, "hcall-copy"}, | ||
47 | {FW_FEATURE_ASR, "hcall-asr"}, | ||
48 | {FW_FEATURE_DEBUG, "hcall-debug"}, | ||
49 | {FW_FEATURE_PERF, "hcall-perf"}, | ||
50 | {FW_FEATURE_DUMP, "hcall-dump"}, | ||
51 | {FW_FEATURE_INTERRUPT, "hcall-interrupt"}, | ||
52 | {FW_FEATURE_MIGRATE, "hcall-migrate"}, | ||
53 | {FW_FEATURE_PERFMON, "hcall-perfmon"}, | ||
54 | {FW_FEATURE_CRQ, "hcall-crq"}, | ||
55 | {FW_FEATURE_VIO, "hcall-vio"}, | ||
56 | {FW_FEATURE_RDMA, "hcall-rdma"}, | ||
57 | {FW_FEATURE_LLAN, "hcall-lLAN"}, | ||
58 | {FW_FEATURE_BULK, "hcall-bulk"}, | ||
59 | {FW_FEATURE_XDABR, "hcall-xdabr"}, | ||
60 | {FW_FEATURE_MULTITCE, "hcall-multi-tce"}, | ||
61 | {FW_FEATURE_SPLPAR, "hcall-splpar"}, | ||
62 | }; | ||
63 | |||
64 | /* Build up the firmware features bitmask using the contents of | ||
65 | * device-tree/ibm,hypertas-functions. Ultimately this functionality may | ||
66 | * be moved into prom.c prom_init(). | ||
67 | */ | ||
68 | void __init fw_feature_init(void) | ||
69 | { | ||
70 | struct device_node *dn; | ||
71 | char *hypertas, *s; | ||
72 | int len, i; | ||
73 | |||
74 | DBG(" -> fw_feature_init()\n"); | ||
75 | |||
76 | dn = of_find_node_by_path("/rtas"); | ||
77 | if (dn == NULL) { | ||
78 | printk(KERN_ERR "WARNING! Cannot find RTAS in device-tree!\n"); | ||
79 | goto out; | ||
80 | } | ||
81 | |||
82 | hypertas = get_property(dn, "ibm,hypertas-functions", &len); | ||
83 | if (hypertas == NULL) | ||
84 | goto out; | ||
85 | |||
86 | for (s = hypertas; s < hypertas + len; s += strlen(s) + 1) { | ||
87 | for (i = 0; i < FIRMWARE_MAX_FEATURES; i++) { | ||
88 | /* check value against table of strings */ | ||
89 | if (!firmware_features_table[i].name || | ||
90 | strcmp(firmware_features_table[i].name, s)) | ||
91 | continue; | ||
92 | |||
93 | /* we have a match */ | ||
94 | ppc64_firmware_features |= | ||
95 | firmware_features_table[i].val; | ||
96 | break; | ||
97 | } | ||
98 | } | ||
99 | |||
100 | out: | ||
101 | of_node_put(dn); | ||
102 | DBG(" <- fw_feature_init()\n"); | ||
103 | } | ||
diff --git a/arch/powerpc/platforms/pseries/firmware.h b/arch/powerpc/platforms/pseries/firmware.h new file mode 100644 index 000000000000..714f56f55362 --- /dev/null +++ b/arch/powerpc/platforms/pseries/firmware.h | |||
@@ -0,0 +1,17 @@ | |||
1 | /* | ||
2 | * Copyright 2006 IBM Corporation. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version | ||
7 | * 2 of the License, or (at your option) any later version. | ||
8 | */ | ||
9 | |||
10 | #ifndef _PSERIES_FIRMWARE_H | ||
11 | #define _PSERIES_FIRMWARE_H | ||
12 | |||
13 | #include <asm/firmware.h> | ||
14 | |||
15 | extern void __init fw_feature_init(void); | ||
16 | |||
17 | #endif /* _PSERIES_FIRMWARE_H */ | ||
diff --git a/arch/powerpc/platforms/pseries/hvCall.S b/arch/powerpc/platforms/pseries/hvCall.S index 176e8da76466..db7c19fe9297 100644 --- a/arch/powerpc/platforms/pseries/hvCall.S +++ b/arch/powerpc/platforms/pseries/hvCall.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/pSeries_hvCall.S | ||
3 | * | ||
4 | * This file contains the generic code to perform a call to the | 2 | * This file contains the generic code to perform a call to the |
5 | * pSeries LPAR hypervisor. | 3 | * pSeries LPAR hypervisor. |
6 | * NOTE: this file will go away when we move to inline this work. | 4 | * NOTE: this file will go away when we move to inline this work. |
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 48cfbfc43f99..2643078433f0 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/pSeries_iommu.c | ||
3 | * | ||
4 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation | 2 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation |
5 | * | 3 | * |
6 | * Rewrite, cleanup: | 4 | * Rewrite, cleanup: |
@@ -582,7 +580,7 @@ void iommu_init_early_pSeries(void) | |||
582 | return; | 580 | return; |
583 | } | 581 | } |
584 | 582 | ||
585 | if (platform_is_lpar()) { | 583 | if (firmware_has_feature(FW_FEATURE_LPAR)) { |
586 | if (firmware_has_feature(FW_FEATURE_MULTITCE)) { | 584 | if (firmware_has_feature(FW_FEATURE_MULTITCE)) { |
587 | ppc_md.tce_build = tce_buildmulti_pSeriesLP; | 585 | ppc_md.tce_build = tce_buildmulti_pSeriesLP; |
588 | ppc_md.tce_free = tce_freemulti_pSeriesLP; | 586 | ppc_md.tce_free = tce_freemulti_pSeriesLP; |
diff --git a/arch/powerpc/platforms/pseries/pci.c b/arch/powerpc/platforms/pseries/pci.c index 999a9620b5ce..946ad59e3352 100644 --- a/arch/powerpc/platforms/pseries/pci.c +++ b/arch/powerpc/platforms/pseries/pci.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc64/kernel/pSeries_pci.c | ||
3 | * | ||
4 | * Copyright (C) 2001 Dave Engebretsen, IBM Corporation | 2 | * Copyright (C) 2001 Dave Engebretsen, IBM Corporation |
5 | * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM | 3 | * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM |
6 | * | 4 | * |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 9edeca83f434..44d5c7fdcd97 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -60,7 +60,6 @@ | |||
60 | #include <asm/time.h> | 60 | #include <asm/time.h> |
61 | #include <asm/nvram.h> | 61 | #include <asm/nvram.h> |
62 | #include "xics.h" | 62 | #include "xics.h" |
63 | #include <asm/firmware.h> | ||
64 | #include <asm/pmc.h> | 63 | #include <asm/pmc.h> |
65 | #include <asm/mpic.h> | 64 | #include <asm/mpic.h> |
66 | #include <asm/ppc-pci.h> | 65 | #include <asm/ppc-pci.h> |
@@ -70,6 +69,7 @@ | |||
70 | 69 | ||
71 | #include "plpar_wrappers.h" | 70 | #include "plpar_wrappers.h" |
72 | #include "ras.h" | 71 | #include "ras.h" |
72 | #include "firmware.h" | ||
73 | 73 | ||
74 | #ifdef DEBUG | 74 | #ifdef DEBUG |
75 | #define DBG(fmt...) udbg_printf(fmt) | 75 | #define DBG(fmt...) udbg_printf(fmt) |
@@ -246,7 +246,7 @@ static void __init pSeries_setup_arch(void) | |||
246 | ppc_md.idle_loop = default_idle; | 246 | ppc_md.idle_loop = default_idle; |
247 | } | 247 | } |
248 | 248 | ||
249 | if (platform_is_lpar()) | 249 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
250 | ppc_md.enable_pmcs = pseries_lpar_enable_pmcs; | 250 | ppc_md.enable_pmcs = pseries_lpar_enable_pmcs; |
251 | else | 251 | else |
252 | ppc_md.enable_pmcs = power4_enable_pmcs; | 252 | ppc_md.enable_pmcs = power4_enable_pmcs; |
@@ -262,53 +262,6 @@ static int __init pSeries_init_panel(void) | |||
262 | } | 262 | } |
263 | arch_initcall(pSeries_init_panel); | 263 | arch_initcall(pSeries_init_panel); |
264 | 264 | ||
265 | |||
266 | /* Build up the ppc64_firmware_features bitmask field | ||
267 | * using contents of device-tree/ibm,hypertas-functions. | ||
268 | * Ultimately this functionality may be moved into prom.c prom_init(). | ||
269 | */ | ||
270 | static void __init fw_feature_init(void) | ||
271 | { | ||
272 | struct device_node * dn; | ||
273 | char * hypertas; | ||
274 | unsigned int len; | ||
275 | |||
276 | DBG(" -> fw_feature_init()\n"); | ||
277 | |||
278 | ppc64_firmware_features = 0; | ||
279 | dn = of_find_node_by_path("/rtas"); | ||
280 | if (dn == NULL) { | ||
281 | printk(KERN_ERR "WARNING ! Cannot find RTAS in device-tree !\n"); | ||
282 | goto no_rtas; | ||
283 | } | ||
284 | |||
285 | hypertas = get_property(dn, "ibm,hypertas-functions", &len); | ||
286 | if (hypertas) { | ||
287 | while (len > 0){ | ||
288 | int i, hypertas_len; | ||
289 | /* check value against table of strings */ | ||
290 | for(i=0; i < FIRMWARE_MAX_FEATURES ;i++) { | ||
291 | if ((firmware_features_table[i].name) && | ||
292 | (strcmp(firmware_features_table[i].name,hypertas))==0) { | ||
293 | /* we have a match */ | ||
294 | ppc64_firmware_features |= | ||
295 | (firmware_features_table[i].val); | ||
296 | break; | ||
297 | } | ||
298 | } | ||
299 | hypertas_len = strlen(hypertas); | ||
300 | len -= hypertas_len +1; | ||
301 | hypertas+= hypertas_len +1; | ||
302 | } | ||
303 | } | ||
304 | |||
305 | of_node_put(dn); | ||
306 | no_rtas: | ||
307 | |||
308 | DBG(" <- fw_feature_init()\n"); | ||
309 | } | ||
310 | |||
311 | |||
312 | static void __init pSeries_discover_pic(void) | 265 | static void __init pSeries_discover_pic(void) |
313 | { | 266 | { |
314 | struct device_node *np; | 267 | struct device_node *np; |
@@ -367,21 +320,16 @@ static int pseries_set_xdabr(unsigned long dabr) | |||
367 | */ | 320 | */ |
368 | static void __init pSeries_init_early(void) | 321 | static void __init pSeries_init_early(void) |
369 | { | 322 | { |
370 | int iommu_off = 0; | ||
371 | |||
372 | DBG(" -> pSeries_init_early()\n"); | 323 | DBG(" -> pSeries_init_early()\n"); |
373 | 324 | ||
374 | fw_feature_init(); | 325 | fw_feature_init(); |
375 | 326 | ||
376 | if (platform_is_lpar()) | 327 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
377 | hpte_init_lpar(); | 328 | hpte_init_lpar(); |
378 | else { | 329 | else |
379 | hpte_init_native(); | 330 | hpte_init_native(); |
380 | iommu_off = (of_chosen && | ||
381 | get_property(of_chosen, "linux,iommu-off", NULL)); | ||
382 | } | ||
383 | 331 | ||
384 | if (platform_is_lpar()) | 332 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
385 | find_udbg_vterm(); | 333 | find_udbg_vterm(); |
386 | 334 | ||
387 | if (firmware_has_feature(FW_FEATURE_DABR)) | 335 | if (firmware_has_feature(FW_FEATURE_DABR)) |
@@ -437,6 +385,9 @@ static int __init pSeries_probe(int platform) | |||
437 | * it here ... | 385 | * it here ... |
438 | */ | 386 | */ |
439 | 387 | ||
388 | if (platform == PLATFORM_PSERIES_LPAR) | ||
389 | ppc64_firmware_features |= FW_FEATURE_LPAR; | ||
390 | |||
440 | return 1; | 391 | return 1; |
441 | } | 392 | } |
442 | 393 | ||
@@ -576,7 +527,7 @@ static void pseries_shared_idle(void) | |||
576 | 527 | ||
577 | static int pSeries_pci_probe_mode(struct pci_bus *bus) | 528 | static int pSeries_pci_probe_mode(struct pci_bus *bus) |
578 | { | 529 | { |
579 | if (platform_is_lpar()) | 530 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
580 | return PCI_PROBE_DEVTREE; | 531 | return PCI_PROBE_DEVTREE; |
581 | return PCI_PROBE_NORMAL; | 532 | return PCI_PROBE_NORMAL; |
582 | } | 533 | } |
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c index 8d710af50756..3cf78a6cd27c 100644 --- a/arch/powerpc/platforms/pseries/smp.c +++ b/arch/powerpc/platforms/pseries/smp.c | |||
@@ -443,7 +443,7 @@ void __init smp_init_pSeries(void) | |||
443 | smp_ops->cpu_die = pSeries_cpu_die; | 443 | smp_ops->cpu_die = pSeries_cpu_die; |
444 | 444 | ||
445 | /* Processors can be added/removed only on LPAR */ | 445 | /* Processors can be added/removed only on LPAR */ |
446 | if (platform_is_lpar()) | 446 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
447 | pSeries_reconfig_notifier_register(&pSeries_smp_nb); | 447 | pSeries_reconfig_notifier_register(&pSeries_smp_nb); |
448 | #endif | 448 | #endif |
449 | 449 | ||
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c index fd823c7c9ac8..eb86cdb9b802 100644 --- a/arch/powerpc/platforms/pseries/xics.c +++ b/arch/powerpc/platforms/pseries/xics.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/gfp.h> | 20 | #include <linux/gfp.h> |
21 | #include <linux/radix-tree.h> | 21 | #include <linux/radix-tree.h> |
22 | #include <linux/cpu.h> | 22 | #include <linux/cpu.h> |
23 | #include <asm/firmware.h> | ||
23 | #include <asm/prom.h> | 24 | #include <asm/prom.h> |
24 | #include <asm/io.h> | 25 | #include <asm/io.h> |
25 | #include <asm/pgtable.h> | 26 | #include <asm/pgtable.h> |
@@ -536,7 +537,7 @@ nextnode: | |||
536 | of_node_put(np); | 537 | of_node_put(np); |
537 | } | 538 | } |
538 | 539 | ||
539 | if (platform_is_lpar()) | 540 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
540 | ops = &pSeriesLP_ops; | 541 | ops = &pSeriesLP_ops; |
541 | else { | 542 | else { |
542 | #ifdef CONFIG_SMP | 543 | #ifdef CONFIG_SMP |
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c index 6298264efe36..61d317428610 100644 --- a/arch/powerpc/sysdev/dart_iommu.c +++ b/arch/powerpc/sysdev/dart_iommu.c | |||
@@ -194,8 +194,6 @@ static int dart_init(struct device_node *dart_node) | |||
194 | * prefetching into invalid pages and corrupting data | 194 | * prefetching into invalid pages and corrupting data |
195 | */ | 195 | */ |
196 | tmp = lmb_alloc(DART_PAGE_SIZE, DART_PAGE_SIZE); | 196 | tmp = lmb_alloc(DART_PAGE_SIZE, DART_PAGE_SIZE); |
197 | if (!tmp) | ||
198 | panic("DART: Cannot allocate spare page!"); | ||
199 | dart_emptyval = DARTMAP_VALID | ((tmp >> DART_PAGE_SHIFT) & | 197 | dart_emptyval = DARTMAP_VALID | ((tmp >> DART_PAGE_SHIFT) & |
200 | DARTMAP_RPNMASK); | 198 | DARTMAP_RPNMASK); |
201 | 199 | ||
diff --git a/arch/powerpc/sysdev/dcr.S b/arch/powerpc/sysdev/dcr.S index 895f10243a43..2078f39e2f17 100644 --- a/arch/powerpc/sysdev/dcr.S +++ b/arch/powerpc/sysdev/dcr.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/dcr.S | ||
3 | * | ||
4 | * "Indirect" DCR access | 2 | * "Indirect" DCR access |
5 | * | 3 | * |
6 | * Copyright (c) 2004 Eugene Surovegin <ebs@ebshome.net> | 4 | * Copyright (c) 2004 Eugene Surovegin <ebs@ebshome.net> |
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index 064c9de47732..ceb584682fa3 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c | |||
@@ -40,7 +40,7 @@ phys_addr_t get_immrbase(void) | |||
40 | return immrbase; | 40 | return immrbase; |
41 | 41 | ||
42 | soc = of_find_node_by_type(NULL, "soc"); | 42 | soc = of_find_node_by_type(NULL, "soc"); |
43 | if (soc != 0) { | 43 | if (soc) { |
44 | unsigned int size; | 44 | unsigned int size; |
45 | void *prop = get_property(soc, "reg", &size); | 45 | void *prop = get_property(soc, "reg", &size); |
46 | immrbase = of_translate_address(soc, prop); | 46 | immrbase = of_translate_address(soc, prop); |
@@ -49,21 +49,20 @@ phys_addr_t get_immrbase(void) | |||
49 | 49 | ||
50 | return immrbase; | 50 | return immrbase; |
51 | } | 51 | } |
52 | EXPORT_SYMBOL(get_immrbase); | ||
53 | 52 | ||
54 | static const char * gfar_tx_intr = "tx"; | 53 | EXPORT_SYMBOL(get_immrbase); |
55 | static const char * gfar_rx_intr = "rx"; | ||
56 | static const char * gfar_err_intr = "error"; | ||
57 | 54 | ||
58 | static int __init gfar_of_init(void) | 55 | static int __init gfar_mdio_of_init(void) |
59 | { | 56 | { |
60 | struct device_node *np; | 57 | struct device_node *np; |
61 | unsigned int i; | 58 | unsigned int i; |
62 | struct platform_device *mdio_dev, *gfar_dev; | 59 | struct platform_device *mdio_dev; |
63 | struct resource res; | 60 | struct resource res; |
64 | int ret; | 61 | int ret; |
65 | 62 | ||
66 | for (np = NULL, i = 0; (np = of_find_compatible_node(np, "mdio", "gianfar")) != NULL; i++) { | 63 | for (np = NULL, i = 0; |
64 | (np = of_find_compatible_node(np, "mdio", "gianfar")) != NULL; | ||
65 | i++) { | ||
67 | int k; | 66 | int k; |
68 | struct device_node *child = NULL; | 67 | struct device_node *child = NULL; |
69 | struct gianfar_mdio_data mdio_data; | 68 | struct gianfar_mdio_data mdio_data; |
@@ -73,12 +72,14 @@ static int __init gfar_of_init(void) | |||
73 | 72 | ||
74 | ret = of_address_to_resource(np, 0, &res); | 73 | ret = of_address_to_resource(np, 0, &res); |
75 | if (ret) | 74 | if (ret) |
76 | goto mdio_err; | 75 | goto err; |
77 | 76 | ||
78 | mdio_dev = platform_device_register_simple("fsl-gianfar_mdio", res.start, &res, 1); | 77 | mdio_dev = |
78 | platform_device_register_simple("fsl-gianfar_mdio", | ||
79 | res.start, &res, 1); | ||
79 | if (IS_ERR(mdio_dev)) { | 80 | if (IS_ERR(mdio_dev)) { |
80 | ret = PTR_ERR(mdio_dev); | 81 | ret = PTR_ERR(mdio_dev); |
81 | goto mdio_err; | 82 | goto err; |
82 | } | 83 | } |
83 | 84 | ||
84 | for (k = 0; k < 32; k++) | 85 | for (k = 0; k < 32; k++) |
@@ -86,17 +87,44 @@ static int __init gfar_of_init(void) | |||
86 | 87 | ||
87 | while ((child = of_get_next_child(np, child)) != NULL) { | 88 | while ((child = of_get_next_child(np, child)) != NULL) { |
88 | if (child->n_intrs) { | 89 | if (child->n_intrs) { |
89 | u32 *id = (u32 *) get_property(child, "reg", NULL); | 90 | u32 *id = |
91 | (u32 *) get_property(child, "reg", NULL); | ||
90 | mdio_data.irq[*id] = child->intrs[0].line; | 92 | mdio_data.irq[*id] = child->intrs[0].line; |
91 | } | 93 | } |
92 | } | 94 | } |
93 | 95 | ||
94 | ret = platform_device_add_data(mdio_dev, &mdio_data, sizeof(struct gianfar_mdio_data)); | 96 | ret = |
97 | platform_device_add_data(mdio_dev, &mdio_data, | ||
98 | sizeof(struct gianfar_mdio_data)); | ||
95 | if (ret) | 99 | if (ret) |
96 | goto mdio_unreg; | 100 | goto unreg; |
97 | } | 101 | } |
98 | 102 | ||
99 | for (np = NULL, i = 0; (np = of_find_compatible_node(np, "network", "gianfar")) != NULL; i++) { | 103 | return 0; |
104 | |||
105 | unreg: | ||
106 | platform_device_unregister(mdio_dev); | ||
107 | err: | ||
108 | return ret; | ||
109 | } | ||
110 | |||
111 | arch_initcall(gfar_mdio_of_init); | ||
112 | |||
113 | static const char *gfar_tx_intr = "tx"; | ||
114 | static const char *gfar_rx_intr = "rx"; | ||
115 | static const char *gfar_err_intr = "error"; | ||
116 | |||
117 | static int __init gfar_of_init(void) | ||
118 | { | ||
119 | struct device_node *np; | ||
120 | unsigned int i; | ||
121 | struct platform_device *gfar_dev; | ||
122 | struct resource res; | ||
123 | int ret; | ||
124 | |||
125 | for (np = NULL, i = 0; | ||
126 | (np = of_find_compatible_node(np, "network", "gianfar")) != NULL; | ||
127 | i++) { | ||
100 | struct resource r[4]; | 128 | struct resource r[4]; |
101 | struct device_node *phy, *mdio; | 129 | struct device_node *phy, *mdio; |
102 | struct gianfar_platform_data gfar_data; | 130 | struct gianfar_platform_data gfar_data; |
@@ -110,7 +138,7 @@ static int __init gfar_of_init(void) | |||
110 | 138 | ||
111 | ret = of_address_to_resource(np, 0, &r[0]); | 139 | ret = of_address_to_resource(np, 0, &r[0]); |
112 | if (ret) | 140 | if (ret) |
113 | goto gfar_err; | 141 | goto err; |
114 | 142 | ||
115 | r[1].start = np->intrs[0].line; | 143 | r[1].start = np->intrs[0].line; |
116 | r[1].end = np->intrs[0].line; | 144 | r[1].end = np->intrs[0].line; |
@@ -133,11 +161,13 @@ static int __init gfar_of_init(void) | |||
133 | r[3].flags = IORESOURCE_IRQ; | 161 | r[3].flags = IORESOURCE_IRQ; |
134 | } | 162 | } |
135 | 163 | ||
136 | gfar_dev = platform_device_register_simple("fsl-gianfar", i, &r[0], np->n_intrs + 1); | 164 | gfar_dev = |
165 | platform_device_register_simple("fsl-gianfar", i, &r[0], | ||
166 | np->n_intrs + 1); | ||
137 | 167 | ||
138 | if (IS_ERR(gfar_dev)) { | 168 | if (IS_ERR(gfar_dev)) { |
139 | ret = PTR_ERR(gfar_dev); | 169 | ret = PTR_ERR(gfar_dev); |
140 | goto gfar_err; | 170 | goto err; |
141 | } | 171 | } |
142 | 172 | ||
143 | mac_addr = get_property(np, "address", NULL); | 173 | mac_addr = get_property(np, "address", NULL); |
@@ -145,26 +175,26 @@ static int __init gfar_of_init(void) | |||
145 | 175 | ||
146 | if (model && !strcasecmp(model, "TSEC")) | 176 | if (model && !strcasecmp(model, "TSEC")) |
147 | gfar_data.device_flags = | 177 | gfar_data.device_flags = |
148 | FSL_GIANFAR_DEV_HAS_GIGABIT | | 178 | FSL_GIANFAR_DEV_HAS_GIGABIT | |
149 | FSL_GIANFAR_DEV_HAS_COALESCE | | 179 | FSL_GIANFAR_DEV_HAS_COALESCE | |
150 | FSL_GIANFAR_DEV_HAS_RMON | | 180 | FSL_GIANFAR_DEV_HAS_RMON | |
151 | FSL_GIANFAR_DEV_HAS_MULTI_INTR; | 181 | FSL_GIANFAR_DEV_HAS_MULTI_INTR; |
152 | if (model && !strcasecmp(model, "eTSEC")) | 182 | if (model && !strcasecmp(model, "eTSEC")) |
153 | gfar_data.device_flags = | 183 | gfar_data.device_flags = |
154 | FSL_GIANFAR_DEV_HAS_GIGABIT | | 184 | FSL_GIANFAR_DEV_HAS_GIGABIT | |
155 | FSL_GIANFAR_DEV_HAS_COALESCE | | 185 | FSL_GIANFAR_DEV_HAS_COALESCE | |
156 | FSL_GIANFAR_DEV_HAS_RMON | | 186 | FSL_GIANFAR_DEV_HAS_RMON | |
157 | FSL_GIANFAR_DEV_HAS_MULTI_INTR | | 187 | FSL_GIANFAR_DEV_HAS_MULTI_INTR | |
158 | FSL_GIANFAR_DEV_HAS_CSUM | | 188 | FSL_GIANFAR_DEV_HAS_CSUM | |
159 | FSL_GIANFAR_DEV_HAS_VLAN | | 189 | FSL_GIANFAR_DEV_HAS_VLAN | |
160 | FSL_GIANFAR_DEV_HAS_EXTENDED_HASH; | 190 | FSL_GIANFAR_DEV_HAS_EXTENDED_HASH; |
161 | 191 | ||
162 | ph = (phandle *) get_property(np, "phy-handle", NULL); | 192 | ph = (phandle *) get_property(np, "phy-handle", NULL); |
163 | phy = of_find_node_by_phandle(*ph); | 193 | phy = of_find_node_by_phandle(*ph); |
164 | 194 | ||
165 | if (phy == NULL) { | 195 | if (phy == NULL) { |
166 | ret = -ENODEV; | 196 | ret = -ENODEV; |
167 | goto gfar_unreg; | 197 | goto unreg; |
168 | } | 198 | } |
169 | 199 | ||
170 | mdio = of_get_parent(phy); | 200 | mdio = of_get_parent(phy); |
@@ -174,7 +204,7 @@ static int __init gfar_of_init(void) | |||
174 | if (ret) { | 204 | if (ret) { |
175 | of_node_put(phy); | 205 | of_node_put(phy); |
176 | of_node_put(mdio); | 206 | of_node_put(mdio); |
177 | goto gfar_unreg; | 207 | goto unreg; |
178 | } | 208 | } |
179 | 209 | ||
180 | gfar_data.phy_id = *id; | 210 | gfar_data.phy_id = *id; |
@@ -183,23 +213,22 @@ static int __init gfar_of_init(void) | |||
183 | of_node_put(phy); | 213 | of_node_put(phy); |
184 | of_node_put(mdio); | 214 | of_node_put(mdio); |
185 | 215 | ||
186 | ret = platform_device_add_data(gfar_dev, &gfar_data, sizeof(struct gianfar_platform_data)); | 216 | ret = |
217 | platform_device_add_data(gfar_dev, &gfar_data, | ||
218 | sizeof(struct | ||
219 | gianfar_platform_data)); | ||
187 | if (ret) | 220 | if (ret) |
188 | goto gfar_unreg; | 221 | goto unreg; |
189 | } | 222 | } |
190 | 223 | ||
191 | return 0; | 224 | return 0; |
192 | 225 | ||
193 | mdio_unreg: | 226 | unreg: |
194 | platform_device_unregister(mdio_dev); | ||
195 | mdio_err: | ||
196 | return ret; | ||
197 | |||
198 | gfar_unreg: | ||
199 | platform_device_unregister(gfar_dev); | 227 | platform_device_unregister(gfar_dev); |
200 | gfar_err: | 228 | err: |
201 | return ret; | 229 | return ret; |
202 | } | 230 | } |
231 | |||
203 | arch_initcall(gfar_of_init); | 232 | arch_initcall(gfar_of_init); |
204 | 233 | ||
205 | static int __init fsl_i2c_of_init(void) | 234 | static int __init fsl_i2c_of_init(void) |
@@ -209,17 +238,19 @@ static int __init fsl_i2c_of_init(void) | |||
209 | struct platform_device *i2c_dev; | 238 | struct platform_device *i2c_dev; |
210 | int ret; | 239 | int ret; |
211 | 240 | ||
212 | for (np = NULL, i = 0; (np = of_find_compatible_node(np, "i2c", "fsl-i2c")) != NULL; i++) { | 241 | for (np = NULL, i = 0; |
242 | (np = of_find_compatible_node(np, "i2c", "fsl-i2c")) != NULL; | ||
243 | i++) { | ||
213 | struct resource r[2]; | 244 | struct resource r[2]; |
214 | struct fsl_i2c_platform_data i2c_data; | 245 | struct fsl_i2c_platform_data i2c_data; |
215 | unsigned char * flags = NULL; | 246 | unsigned char *flags = NULL; |
216 | 247 | ||
217 | memset(&r, 0, sizeof(r)); | 248 | memset(&r, 0, sizeof(r)); |
218 | memset(&i2c_data, 0, sizeof(i2c_data)); | 249 | memset(&i2c_data, 0, sizeof(i2c_data)); |
219 | 250 | ||
220 | ret = of_address_to_resource(np, 0, &r[0]); | 251 | ret = of_address_to_resource(np, 0, &r[0]); |
221 | if (ret) | 252 | if (ret) |
222 | goto i2c_err; | 253 | goto err; |
223 | 254 | ||
224 | r[1].start = np->intrs[0].line; | 255 | r[1].start = np->intrs[0].line; |
225 | r[1].end = np->intrs[0].line; | 256 | r[1].end = np->intrs[0].line; |
@@ -228,7 +259,7 @@ static int __init fsl_i2c_of_init(void) | |||
228 | i2c_dev = platform_device_register_simple("fsl-i2c", i, r, 2); | 259 | i2c_dev = platform_device_register_simple("fsl-i2c", i, r, 2); |
229 | if (IS_ERR(i2c_dev)) { | 260 | if (IS_ERR(i2c_dev)) { |
230 | ret = PTR_ERR(i2c_dev); | 261 | ret = PTR_ERR(i2c_dev); |
231 | goto i2c_err; | 262 | goto err; |
232 | } | 263 | } |
233 | 264 | ||
234 | i2c_data.device_flags = 0; | 265 | i2c_data.device_flags = 0; |
@@ -240,18 +271,22 @@ static int __init fsl_i2c_of_init(void) | |||
240 | if (flags) | 271 | if (flags) |
241 | i2c_data.device_flags |= FSL_I2C_DEV_CLOCK_5200; | 272 | i2c_data.device_flags |= FSL_I2C_DEV_CLOCK_5200; |
242 | 273 | ||
243 | ret = platform_device_add_data(i2c_dev, &i2c_data, sizeof(struct fsl_i2c_platform_data)); | 274 | ret = |
275 | platform_device_add_data(i2c_dev, &i2c_data, | ||
276 | sizeof(struct | ||
277 | fsl_i2c_platform_data)); | ||
244 | if (ret) | 278 | if (ret) |
245 | goto i2c_unreg; | 279 | goto unreg; |
246 | } | 280 | } |
247 | 281 | ||
248 | return 0; | 282 | return 0; |
249 | 283 | ||
250 | i2c_unreg: | 284 | unreg: |
251 | platform_device_unregister(i2c_dev); | 285 | platform_device_unregister(i2c_dev); |
252 | i2c_err: | 286 | err: |
253 | return ret; | 287 | return ret; |
254 | } | 288 | } |
289 | |||
255 | arch_initcall(fsl_i2c_of_init); | 290 | arch_initcall(fsl_i2c_of_init); |
256 | 291 | ||
257 | #ifdef CONFIG_PPC_83xx | 292 | #ifdef CONFIG_PPC_83xx |
@@ -267,51 +302,192 @@ static int __init mpc83xx_wdt_init(void) | |||
267 | 302 | ||
268 | if (!np) { | 303 | if (!np) { |
269 | ret = -ENODEV; | 304 | ret = -ENODEV; |
270 | goto mpc83xx_wdt_nodev; | 305 | goto nodev; |
271 | } | 306 | } |
272 | 307 | ||
273 | soc = of_find_node_by_type(NULL, "soc"); | 308 | soc = of_find_node_by_type(NULL, "soc"); |
274 | 309 | ||
275 | if (!soc) { | 310 | if (!soc) { |
276 | ret = -ENODEV; | 311 | ret = -ENODEV; |
277 | goto mpc83xx_wdt_nosoc; | 312 | goto nosoc; |
278 | } | 313 | } |
279 | 314 | ||
280 | freq = (unsigned int *)get_property(soc, "bus-frequency", NULL); | 315 | freq = (unsigned int *)get_property(soc, "bus-frequency", NULL); |
281 | if (!freq) { | 316 | if (!freq) { |
282 | ret = -ENODEV; | 317 | ret = -ENODEV; |
283 | goto mpc83xx_wdt_err; | 318 | goto err; |
284 | } | 319 | } |
285 | 320 | ||
286 | memset(&r, 0, sizeof(r)); | 321 | memset(&r, 0, sizeof(r)); |
287 | 322 | ||
288 | ret = of_address_to_resource(np, 0, &r); | 323 | ret = of_address_to_resource(np, 0, &r); |
289 | if (ret) | 324 | if (ret) |
290 | goto mpc83xx_wdt_err; | 325 | goto err; |
291 | 326 | ||
292 | dev = platform_device_register_simple("mpc83xx_wdt", 0, &r, 1); | 327 | dev = platform_device_register_simple("mpc83xx_wdt", 0, &r, 1); |
293 | if (IS_ERR(dev)) { | 328 | if (IS_ERR(dev)) { |
294 | ret = PTR_ERR(dev); | 329 | ret = PTR_ERR(dev); |
295 | goto mpc83xx_wdt_err; | 330 | goto err; |
296 | } | 331 | } |
297 | 332 | ||
298 | ret = platform_device_add_data(dev, freq, sizeof(int)); | 333 | ret = platform_device_add_data(dev, freq, sizeof(int)); |
299 | if (ret) | 334 | if (ret) |
300 | goto mpc83xx_wdt_unreg; | 335 | goto unreg; |
301 | 336 | ||
302 | of_node_put(soc); | 337 | of_node_put(soc); |
303 | of_node_put(np); | 338 | of_node_put(np); |
304 | 339 | ||
305 | return 0; | 340 | return 0; |
306 | 341 | ||
307 | mpc83xx_wdt_unreg: | 342 | unreg: |
308 | platform_device_unregister(dev); | 343 | platform_device_unregister(dev); |
309 | mpc83xx_wdt_err: | 344 | err: |
310 | of_node_put(soc); | 345 | of_node_put(soc); |
311 | mpc83xx_wdt_nosoc: | 346 | nosoc: |
312 | of_node_put(np); | 347 | of_node_put(np); |
313 | mpc83xx_wdt_nodev: | 348 | nodev: |
314 | return ret; | 349 | return ret; |
315 | } | 350 | } |
351 | |||
316 | arch_initcall(mpc83xx_wdt_init); | 352 | arch_initcall(mpc83xx_wdt_init); |
317 | #endif | 353 | #endif |
354 | |||
355 | static enum fsl_usb2_phy_modes determine_usb_phy(char * phy_type) | ||
356 | { | ||
357 | if (!phy_type) | ||
358 | return FSL_USB2_PHY_NONE; | ||
359 | if (!strcasecmp(phy_type, "ulpi")) | ||
360 | return FSL_USB2_PHY_ULPI; | ||
361 | if (!strcasecmp(phy_type, "utmi")) | ||
362 | return FSL_USB2_PHY_UTMI; | ||
363 | if (!strcasecmp(phy_type, "utmi_wide")) | ||
364 | return FSL_USB2_PHY_UTMI_WIDE; | ||
365 | if (!strcasecmp(phy_type, "serial")) | ||
366 | return FSL_USB2_PHY_SERIAL; | ||
367 | |||
368 | return FSL_USB2_PHY_NONE; | ||
369 | } | ||
370 | |||
371 | static int __init fsl_usb_of_init(void) | ||
372 | { | ||
373 | struct device_node *np; | ||
374 | unsigned int i; | ||
375 | struct platform_device *usb_dev; | ||
376 | int ret; | ||
377 | |||
378 | for (np = NULL, i = 0; | ||
379 | (np = of_find_compatible_node(np, "usb", "fsl-usb2-mph")) != NULL; | ||
380 | i++) { | ||
381 | struct resource r[2]; | ||
382 | struct fsl_usb2_platform_data usb_data; | ||
383 | unsigned char *prop = NULL; | ||
384 | |||
385 | memset(&r, 0, sizeof(r)); | ||
386 | memset(&usb_data, 0, sizeof(usb_data)); | ||
387 | |||
388 | ret = of_address_to_resource(np, 0, &r[0]); | ||
389 | if (ret) | ||
390 | goto err; | ||
391 | |||
392 | r[1].start = np->intrs[0].line; | ||
393 | r[1].end = np->intrs[0].line; | ||
394 | r[1].flags = IORESOURCE_IRQ; | ||
395 | |||
396 | usb_dev = | ||
397 | platform_device_register_simple("fsl-usb2-mph", i, r, 2); | ||
398 | if (IS_ERR(usb_dev)) { | ||
399 | ret = PTR_ERR(usb_dev); | ||
400 | goto err; | ||
401 | } | ||
402 | |||
403 | usb_dev->dev.coherent_dma_mask = 0xffffffffUL; | ||
404 | usb_dev->dev.dma_mask = &usb_dev->dev.coherent_dma_mask; | ||
405 | |||
406 | usb_data.operating_mode = FSL_USB2_MPH_HOST; | ||
407 | |||
408 | prop = get_property(np, "port0", NULL); | ||
409 | if (prop) | ||
410 | usb_data.port_enables |= FSL_USB2_PORT0_ENABLED; | ||
411 | |||
412 | prop = get_property(np, "port1", NULL); | ||
413 | if (prop) | ||
414 | usb_data.port_enables |= FSL_USB2_PORT1_ENABLED; | ||
415 | |||
416 | prop = get_property(np, "phy_type", NULL); | ||
417 | usb_data.phy_mode = determine_usb_phy(prop); | ||
418 | |||
419 | ret = | ||
420 | platform_device_add_data(usb_dev, &usb_data, | ||
421 | sizeof(struct | ||
422 | fsl_usb2_platform_data)); | ||
423 | if (ret) | ||
424 | goto unreg; | ||
425 | } | ||
426 | |||
427 | return 0; | ||
428 | |||
429 | unreg: | ||
430 | platform_device_unregister(usb_dev); | ||
431 | err: | ||
432 | return ret; | ||
433 | } | ||
434 | |||
435 | arch_initcall(fsl_usb_of_init); | ||
436 | |||
437 | static int __init fsl_usb_dr_of_init(void) | ||
438 | { | ||
439 | struct device_node *np; | ||
440 | unsigned int i; | ||
441 | struct platform_device *usb_dev; | ||
442 | int ret; | ||
443 | |||
444 | for (np = NULL, i = 0; | ||
445 | (np = of_find_compatible_node(np, "usb", "fsl-usb2-dr")) != NULL; | ||
446 | i++) { | ||
447 | struct resource r[2]; | ||
448 | struct fsl_usb2_platform_data usb_data; | ||
449 | unsigned char *prop = NULL; | ||
450 | |||
451 | memset(&r, 0, sizeof(r)); | ||
452 | memset(&usb_data, 0, sizeof(usb_data)); | ||
453 | |||
454 | ret = of_address_to_resource(np, 0, &r[0]); | ||
455 | if (ret) | ||
456 | goto err; | ||
457 | |||
458 | r[1].start = np->intrs[0].line; | ||
459 | r[1].end = np->intrs[0].line; | ||
460 | r[1].flags = IORESOURCE_IRQ; | ||
461 | |||
462 | usb_dev = | ||
463 | platform_device_register_simple("fsl-usb2-dr", i, r, 2); | ||
464 | if (IS_ERR(usb_dev)) { | ||
465 | ret = PTR_ERR(usb_dev); | ||
466 | goto err; | ||
467 | } | ||
468 | |||
469 | usb_dev->dev.coherent_dma_mask = 0xffffffffUL; | ||
470 | usb_dev->dev.dma_mask = &usb_dev->dev.coherent_dma_mask; | ||
471 | |||
472 | usb_data.operating_mode = FSL_USB2_DR_HOST; | ||
473 | |||
474 | prop = get_property(np, "phy_type", NULL); | ||
475 | usb_data.phy_mode = determine_usb_phy(prop); | ||
476 | |||
477 | ret = | ||
478 | platform_device_add_data(usb_dev, &usb_data, | ||
479 | sizeof(struct | ||
480 | fsl_usb2_platform_data)); | ||
481 | if (ret) | ||
482 | goto unreg; | ||
483 | } | ||
484 | |||
485 | return 0; | ||
486 | |||
487 | unreg: | ||
488 | platform_device_unregister(usb_dev); | ||
489 | err: | ||
490 | return ret; | ||
491 | } | ||
492 | |||
493 | arch_initcall(fsl_usb_dr_of_init); | ||
diff --git a/arch/powerpc/sysdev/ipic.h b/arch/powerpc/sysdev/ipic.h index a7ce7da8785c..a60c9d18bb7f 100644 --- a/arch/powerpc/sysdev/ipic.h +++ b/arch/powerpc/sysdev/ipic.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ipic.h | ||
3 | * | ||
4 | * IPIC private definitions and structure. | 2 | * IPIC private definitions and structure. |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 7d02fa2a8990..4735b41c113c 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c | |||
@@ -191,6 +191,7 @@ Commands:\n\ | |||
191 | di dump instructions\n\ | 191 | di dump instructions\n\ |
192 | df dump float values\n\ | 192 | df dump float values\n\ |
193 | dd dump double values\n\ | 193 | dd dump double values\n\ |
194 | dr dump stream of raw bytes\n\ | ||
194 | e print exception information\n\ | 195 | e print exception information\n\ |
195 | f flush cache\n\ | 196 | f flush cache\n\ |
196 | la lookup symbol+offset of specified address\n\ | 197 | la lookup symbol+offset of specified address\n\ |
@@ -1938,6 +1939,28 @@ bsesc(void) | |||
1938 | return c; | 1939 | return c; |
1939 | } | 1940 | } |
1940 | 1941 | ||
1942 | static void xmon_rawdump (unsigned long adrs, long ndump) | ||
1943 | { | ||
1944 | long n, m, r, nr; | ||
1945 | unsigned char temp[16]; | ||
1946 | |||
1947 | for (n = ndump; n > 0;) { | ||
1948 | r = n < 16? n: 16; | ||
1949 | nr = mread(adrs, temp, r); | ||
1950 | adrs += nr; | ||
1951 | for (m = 0; m < r; ++m) { | ||
1952 | if (m < nr) | ||
1953 | printf("%.2x", temp[m]); | ||
1954 | else | ||
1955 | printf("%s", fault_chars[fault_type]); | ||
1956 | } | ||
1957 | n -= r; | ||
1958 | if (nr < r) | ||
1959 | break; | ||
1960 | } | ||
1961 | printf("\n"); | ||
1962 | } | ||
1963 | |||
1941 | #define isxdigit(c) (('0' <= (c) && (c) <= '9') \ | 1964 | #define isxdigit(c) (('0' <= (c) && (c) <= '9') \ |
1942 | || ('a' <= (c) && (c) <= 'f') \ | 1965 | || ('a' <= (c) && (c) <= 'f') \ |
1943 | || ('A' <= (c) && (c) <= 'F')) | 1966 | || ('A' <= (c) && (c) <= 'F')) |
@@ -1960,6 +1983,13 @@ dump(void) | |||
1960 | nidump = MAX_DUMP; | 1983 | nidump = MAX_DUMP; |
1961 | adrs += ppc_inst_dump(adrs, nidump, 1); | 1984 | adrs += ppc_inst_dump(adrs, nidump, 1); |
1962 | last_cmd = "di\n"; | 1985 | last_cmd = "di\n"; |
1986 | } else if (c == 'r') { | ||
1987 | scanhex(&ndump); | ||
1988 | if (ndump == 0) | ||
1989 | ndump = 64; | ||
1990 | xmon_rawdump(adrs, ndump); | ||
1991 | adrs += ndump; | ||
1992 | last_cmd = "dr\n"; | ||
1963 | } else { | 1993 | } else { |
1964 | scanhex(&ndump); | 1994 | scanhex(&ndump); |
1965 | if (ndump == 0) | 1995 | if (ndump == 0) |
diff --git a/arch/ppc/4xx_io/serial_sicc.c b/arch/ppc/4xx_io/serial_sicc.c index 8ace2a1f3b48..98b25fa0049a 100644 --- a/arch/ppc/4xx_io/serial_sicc.c +++ b/arch/ppc/4xx_io/serial_sicc.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/4xx_io/serial_sicc.c | ||
3 | * | ||
4 | * Driver for IBM STB3xxx SICC serial port | 2 | * Driver for IBM STB3xxx SICC serial port |
5 | * | 3 | * |
6 | * Based on drivers/char/serial_amba.c, by ARM Ltd. | 4 | * Based on drivers/char/serial_amba.c, by ARM Ltd. |
@@ -1639,9 +1637,8 @@ static struct SICC_info *siccuart_get(int line) | |||
1639 | state->count++; | 1637 | state->count++; |
1640 | if (state->info) | 1638 | if (state->info) |
1641 | return state->info; | 1639 | return state->info; |
1642 | info = kmalloc(sizeof(struct SICC_info), GFP_KERNEL); | 1640 | info = kzalloc(sizeof(struct SICC_info), GFP_KERNEL); |
1643 | if (info) { | 1641 | if (info) { |
1644 | memset(info, 0, sizeof(struct SICC_info)); | ||
1645 | init_waitqueue_head(&info->open_wait); | 1642 | init_waitqueue_head(&info->open_wait); |
1646 | init_waitqueue_head(&info->close_wait); | 1643 | init_waitqueue_head(&info->close_wait); |
1647 | init_waitqueue_head(&info->delta_msr_wait); | 1644 | init_waitqueue_head(&info->delta_msr_wait); |
diff --git a/arch/ppc/8xx_io/commproc.c b/arch/ppc/8xx_io/commproc.c index 579cd40258b9..12b84ca51327 100644 --- a/arch/ppc/8xx_io/commproc.c +++ b/arch/ppc/8xx_io/commproc.c | |||
@@ -73,7 +73,7 @@ cpm_mask_irq(unsigned int irq) | |||
73 | { | 73 | { |
74 | int cpm_vec = irq - CPM_IRQ_OFFSET; | 74 | int cpm_vec = irq - CPM_IRQ_OFFSET; |
75 | 75 | ||
76 | out_be32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr, in_be32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr) & ~(1 << cpm_vec)); | 76 | clrbits32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr, (1 << cpm_vec)); |
77 | } | 77 | } |
78 | 78 | ||
79 | static void | 79 | static void |
@@ -81,7 +81,7 @@ cpm_unmask_irq(unsigned int irq) | |||
81 | { | 81 | { |
82 | int cpm_vec = irq - CPM_IRQ_OFFSET; | 82 | int cpm_vec = irq - CPM_IRQ_OFFSET; |
83 | 83 | ||
84 | out_be32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr, in_be32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr) | (1 << cpm_vec)); | 84 | setbits32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cimr, (1 << cpm_vec)); |
85 | } | 85 | } |
86 | 86 | ||
87 | static void | 87 | static void |
@@ -198,7 +198,7 @@ cpm_interrupt_init(void) | |||
198 | if (setup_irq(CPM_IRQ_OFFSET + CPMVEC_ERROR, &cpm_error_irqaction)) | 198 | if (setup_irq(CPM_IRQ_OFFSET + CPMVEC_ERROR, &cpm_error_irqaction)) |
199 | panic("Could not allocate CPM error IRQ!"); | 199 | panic("Could not allocate CPM error IRQ!"); |
200 | 200 | ||
201 | out_be32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cicr, in_be32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cicr) | CICR_IEN); | 201 | setbits32(&((immap_t *)IMAP_ADDR)->im_cpic.cpic_cicr, CICR_IEN); |
202 | } | 202 | } |
203 | 203 | ||
204 | /* | 204 | /* |
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index 11899f06bf06..54a0a9bb12dd 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig | |||
@@ -481,6 +481,53 @@ config WINCEPT | |||
481 | 481 | ||
482 | endchoice | 482 | endchoice |
483 | 483 | ||
484 | menu "Freescale Ethernet driver platform-specific options" | ||
485 | depends on FS_ENET | ||
486 | |||
487 | config MPC8xx_SECOND_ETH | ||
488 | bool "Second Ethernet channel" | ||
489 | depends on (MPC885ADS || MPC86XADS) | ||
490 | default y | ||
491 | help | ||
492 | This enables support for second Ethernet on MPC885ADS and MPC86xADS boards. | ||
493 | The latter will use SCC1, for 885ADS you can select it below. | ||
494 | |||
495 | choice | ||
496 | prompt "Second Ethernet channel" | ||
497 | depends on MPC8xx_SECOND_ETH | ||
498 | default MPC8xx_SECOND_ETH_FEC2 | ||
499 | |||
500 | config MPC8xx_SECOND_ETH_FEC2 | ||
501 | bool "FEC2" | ||
502 | depends on MPC885ADS | ||
503 | help | ||
504 | Enable FEC2 to serve as 2-nd Ethernet channel. Note that SMC2 | ||
505 | (often 2-nd UART) will not work if this is enabled. | ||
506 | |||
507 | config MPC8xx_SECOND_ETH_SCC1 | ||
508 | bool "SCC1" | ||
509 | depends on MPC86XADS | ||
510 | select MPC8xx_SCC_ENET_FIXED | ||
511 | help | ||
512 | Enable SCC1 to serve as 2-nd Ethernet channel. Note that SMC1 | ||
513 | (often 1-nd UART) will not work if this is enabled. | ||
514 | |||
515 | config MPC8xx_SECOND_ETH_SCC3 | ||
516 | bool "SCC3" | ||
517 | depends on MPC885ADS | ||
518 | help | ||
519 | Enable SCC3 to serve as 2-nd Ethernet channel. Note that SMC1 | ||
520 | (often 1-nd UART) will not work if this is enabled. | ||
521 | |||
522 | endchoice | ||
523 | |||
524 | config MPC8xx_SCC_ENET_FIXED | ||
525 | depends on MPC8xx_SECOND_ETH_SCC | ||
526 | default n | ||
527 | bool "Use fixed MII-less mode for SCC Ethernet" | ||
528 | |||
529 | endmenu | ||
530 | |||
484 | choice | 531 | choice |
485 | prompt "Machine Type" | 532 | prompt "Machine Type" |
486 | depends on 6xx || POWER3 | 533 | depends on 6xx || POWER3 |
diff --git a/arch/ppc/Kconfig.debug b/arch/ppc/Kconfig.debug index 61653cb60c4e..8cc75abf3d83 100644 --- a/arch/ppc/Kconfig.debug +++ b/arch/ppc/Kconfig.debug | |||
@@ -67,7 +67,7 @@ config SERIAL_TEXT_DEBUG | |||
67 | 67 | ||
68 | config PPC_OCP | 68 | config PPC_OCP |
69 | bool | 69 | bool |
70 | depends on IBM_OCP || XILINX_OCP | 70 | depends on IBM_OCP |
71 | default y | 71 | default y |
72 | 72 | ||
73 | endmenu | 73 | endmenu |
diff --git a/arch/ppc/amiga/amiints.c b/arch/ppc/amiga/amiints.c index 5f35cf3986f7..b2bba052ab93 100644 --- a/arch/ppc/amiga/amiints.c +++ b/arch/ppc/amiga/amiints.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/amiga/amiints.c -- Amiga Linux interrupt handling code | 2 | * Amiga Linux interrupt handling code |
3 | * | 3 | * |
4 | * This file is subject to the terms and conditions of the GNU General Public | 4 | * This file is subject to the terms and conditions of the GNU General Public |
5 | * License. See the file COPYING in the main directory of this archive | 5 | * License. See the file COPYING in the main directory of this archive |
diff --git a/arch/ppc/amiga/bootinfo.c b/arch/ppc/amiga/bootinfo.c index e2e965661d03..efd869a3ed9b 100644 --- a/arch/ppc/amiga/bootinfo.c +++ b/arch/ppc/amiga/bootinfo.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/amiga/bootinfo.c | ||
3 | * | ||
4 | * Extracted from arch/m68k/kernel/setup.c. | 2 | * Extracted from arch/m68k/kernel/setup.c. |
5 | * Should be properly generalized and put somewhere else. | 3 | * Should be properly generalized and put somewhere else. |
6 | * Jesper | 4 | * Jesper |
diff --git a/arch/ppc/amiga/cia.c b/arch/ppc/amiga/cia.c index 4431c58f611a..9558f2f40e64 100644 --- a/arch/ppc/amiga/cia.c +++ b/arch/ppc/amiga/cia.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/amiga/cia.c - CIA support | ||
3 | * | ||
4 | * Copyright (C) 1996 Roman Zippel | 2 | * Copyright (C) 1996 Roman Zippel |
5 | * | 3 | * |
6 | * The concept of some functions bases on the original Amiga OS function | 4 | * The concept of some functions bases on the original Amiga OS function |
diff --git a/arch/ppc/amiga/config.c b/arch/ppc/amiga/config.c index 60e2da1c92c0..bbe47c9bd707 100644 --- a/arch/ppc/amiga/config.c +++ b/arch/ppc/amiga/config.c | |||
@@ -1,8 +1,6 @@ | |||
1 | #define m68k_debug_device debug_device | 1 | #define m68k_debug_device debug_device |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * arch/ppc/amiga/config.c | ||
5 | * | ||
6 | * Copyright (C) 1993 Hamish Macdonald | 4 | * Copyright (C) 1993 Hamish Macdonald |
7 | * | 5 | * |
8 | * This file is subject to the terms and conditions of the GNU General Public | 6 | * This file is subject to the terms and conditions of the GNU General Public |
diff --git a/arch/ppc/amiga/ints.c b/arch/ppc/amiga/ints.c index 5d318e498f06..083a17462190 100644 --- a/arch/ppc/amiga/ints.c +++ b/arch/ppc/amiga/ints.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/amiga/ints.c | ||
3 | * | ||
4 | * Linux/m68k general interrupt handling code from arch/m68k/kernel/ints.c | 2 | * Linux/m68k general interrupt handling code from arch/m68k/kernel/ints.c |
5 | * Needed to drive the m68k emulating IRQ hardware on the PowerUp boards. | 3 | * Needed to drive the m68k emulating IRQ hardware on the PowerUp boards. |
6 | */ | 4 | */ |
diff --git a/arch/ppc/boot/Makefile b/arch/ppc/boot/Makefile index efd8ce515d5f..f565699a9fe0 100644 --- a/arch/ppc/boot/Makefile +++ b/arch/ppc/boot/Makefile | |||
@@ -1,6 +1,3 @@ | |||
1 | # | ||
2 | # arch/ppc/boot/Makefile | ||
3 | # | ||
4 | # This file is subject to the terms and conditions of the GNU General Public | 1 | # This file is subject to the terms and conditions of the GNU General Public |
5 | # License. See the file "COPYING" in the main directory of this archive | 2 | # License. See the file "COPYING" in the main directory of this archive |
6 | # for more details. | 3 | # for more details. |
diff --git a/arch/ppc/boot/common/Makefile b/arch/ppc/boot/common/Makefile index f88d647d5dd4..a2e85e3beb88 100644 --- a/arch/ppc/boot/common/Makefile +++ b/arch/ppc/boot/common/Makefile | |||
@@ -1,6 +1,3 @@ | |||
1 | # | ||
2 | # arch/ppc/boot/common/Makefile | ||
3 | # | ||
4 | # This file is subject to the terms and conditions of the GNU General Public | 1 | # This file is subject to the terms and conditions of the GNU General Public |
5 | # License. See the file "COPYING" in the main directory of this archive | 2 | # License. See the file "COPYING" in the main directory of this archive |
6 | # for more details. | 3 | # for more details. |
diff --git a/arch/ppc/boot/common/bootinfo.c b/arch/ppc/boot/common/bootinfo.c index 9c6e528940e9..f4dc9b9fab9c 100644 --- a/arch/ppc/boot/common/bootinfo.c +++ b/arch/ppc/boot/common/bootinfo.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/common/bootinfo.c | ||
3 | * | ||
4 | * General bootinfo record utilities | 2 | * General bootinfo record utilities |
5 | * Author: Randy Vinson <rvinson@mvista.com> | 3 | * Author: Randy Vinson <rvinson@mvista.com> |
6 | * | 4 | * |
diff --git a/arch/ppc/boot/common/misc-common.c b/arch/ppc/boot/common/misc-common.c index e79e6b3f276e..073830a8559a 100644 --- a/arch/ppc/boot/common/misc-common.c +++ b/arch/ppc/boot/common/misc-common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/common/misc-common.c | ||
3 | * | ||
4 | * Misc. bootloader code (almost) all platforms can use | 2 | * Misc. bootloader code (almost) all platforms can use |
5 | * | 3 | * |
6 | * Author: Johnnie Peters <jpeters@mvista.com> | 4 | * Author: Johnnie Peters <jpeters@mvista.com> |
diff --git a/arch/ppc/boot/common/ns16550.c b/arch/ppc/boot/common/ns16550.c index 26818bbb6cff..4f00c93ac870 100644 --- a/arch/ppc/boot/common/ns16550.c +++ b/arch/ppc/boot/common/ns16550.c | |||
@@ -8,6 +8,9 @@ | |||
8 | #include <linux/serial_reg.h> | 8 | #include <linux/serial_reg.h> |
9 | #include <asm/serial.h> | 9 | #include <asm/serial.h> |
10 | 10 | ||
11 | #if defined(CONFIG_XILINX_VIRTEX) | ||
12 | #include <platforms/4xx/xparameters/xparameters.h> | ||
13 | #endif | ||
11 | #include "nonstdio.h" | 14 | #include "nonstdio.h" |
12 | #include "serial.h" | 15 | #include "serial.h" |
13 | 16 | ||
diff --git a/arch/ppc/boot/common/serial_stub.c b/arch/ppc/boot/common/serial_stub.c index 03dfaa01fa63..5cc9ae66a8ba 100644 --- a/arch/ppc/boot/common/serial_stub.c +++ b/arch/ppc/boot/common/serial_stub.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/common/serial_stub.c | ||
3 | * | ||
4 | * This is a few stub routines to make the boot code cleaner looking when | 2 | * This is a few stub routines to make the boot code cleaner looking when |
5 | * there is no serial port support doesn't need to be closed, for example. | 3 | * there is no serial port support doesn't need to be closed, for example. |
6 | * | 4 | * |
diff --git a/arch/ppc/boot/common/util.S b/arch/ppc/boot/common/util.S index 368ec035e6cd..0c5e43c4ae06 100644 --- a/arch/ppc/boot/common/util.S +++ b/arch/ppc/boot/common/util.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/common/util.S | ||
3 | * | ||
4 | * Useful bootup functions, which are more easily done in asm than C. | 2 | * Useful bootup functions, which are more easily done in asm than C. |
5 | * | 3 | * |
6 | * NOTE: Be very very careful about the registers you use here. | 4 | * NOTE: Be very very careful about the registers you use here. |
diff --git a/arch/ppc/boot/include/mpc10x.h b/arch/ppc/boot/include/mpc10x.h index 6cd40ecabc74..6e5d540d8d3e 100644 --- a/arch/ppc/boot/include/mpc10x.h +++ b/arch/ppc/boot/include/mpc10x.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/include/mpc10.h | ||
3 | * | ||
4 | * Common defines for the Motorola SPS MPC106/8240/107 Host bridge/Mem | 2 | * Common defines for the Motorola SPS MPC106/8240/107 Host bridge/Mem |
5 | * ctrl/EPIC/etc. | 3 | * ctrl/EPIC/etc. |
6 | * | 4 | * |
diff --git a/arch/ppc/boot/simple/Makefile b/arch/ppc/boot/simple/Makefile index 9533f8de238f..28be01b99c44 100644 --- a/arch/ppc/boot/simple/Makefile +++ b/arch/ppc/boot/simple/Makefile | |||
@@ -192,6 +192,7 @@ boot-$(CONFIG_8xx) += embed_config.o | |||
192 | boot-$(CONFIG_8260) += embed_config.o | 192 | boot-$(CONFIG_8260) += embed_config.o |
193 | boot-$(CONFIG_EP405) += embed_config.o | 193 | boot-$(CONFIG_EP405) += embed_config.o |
194 | boot-$(CONFIG_XILINX_ML300) += embed_config.o | 194 | boot-$(CONFIG_XILINX_ML300) += embed_config.o |
195 | boot-$(CONFIG_XILINX_ML403) += embed_config.o | ||
195 | boot-$(CONFIG_BSEIP) += iic.o | 196 | boot-$(CONFIG_BSEIP) += iic.o |
196 | boot-$(CONFIG_MBX) += iic.o pci.o qspan_pci.o | 197 | boot-$(CONFIG_MBX) += iic.o pci.o qspan_pci.o |
197 | boot-$(CONFIG_MV64X60) += misc-mv64x60.o | 198 | boot-$(CONFIG_MV64X60) += misc-mv64x60.o |
diff --git a/arch/ppc/boot/simple/cpc700_memory.c b/arch/ppc/boot/simple/cpc700_memory.c index 8c75cf6c2383..d75420a45a59 100644 --- a/arch/ppc/boot/simple/cpc700_memory.c +++ b/arch/ppc/boot/simple/cpc700_memory.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/common/cpc700_memory.c | ||
3 | * | ||
4 | * Find memory based upon settings in the CPC700 bridge | 2 | * Find memory based upon settings in the CPC700 bridge |
5 | * | 3 | * |
6 | * Author: Dan Cox | 4 | * Author: Dan Cox |
diff --git a/arch/ppc/boot/simple/embed_config.c b/arch/ppc/boot/simple/embed_config.c index 491a691d10cc..3a51b1062940 100644 --- a/arch/ppc/boot/simple/embed_config.c +++ b/arch/ppc/boot/simple/embed_config.c | |||
@@ -21,6 +21,9 @@ | |||
21 | #ifdef CONFIG_40x | 21 | #ifdef CONFIG_40x |
22 | #include <asm/io.h> | 22 | #include <asm/io.h> |
23 | #endif | 23 | #endif |
24 | #ifdef CONFIG_XILINX_VIRTEX | ||
25 | #include <platforms/4xx/xparameters/xparameters.h> | ||
26 | #endif | ||
24 | extern unsigned long timebase_period_ns; | 27 | extern unsigned long timebase_period_ns; |
25 | 28 | ||
26 | /* For those boards that don't provide one. | 29 | /* For those boards that don't provide one. |
@@ -742,7 +745,7 @@ embed_config(bd_t **bdp) | |||
742 | } | 745 | } |
743 | #endif /* WILLOW */ | 746 | #endif /* WILLOW */ |
744 | 747 | ||
745 | #ifdef CONFIG_XILINX_ML300 | 748 | #if defined(CONFIG_XILINX_ML300) || defined(CONFIG_XILINX_ML403) |
746 | void | 749 | void |
747 | embed_config(bd_t ** bdp) | 750 | embed_config(bd_t ** bdp) |
748 | { | 751 | { |
@@ -779,7 +782,7 @@ embed_config(bd_t ** bdp) | |||
779 | timebase_period_ns = 1000000000 / bd->bi_tbfreq; | 782 | timebase_period_ns = 1000000000 / bd->bi_tbfreq; |
780 | /* see bi_tbfreq definition in arch/ppc/platforms/4xx/xilinx_ml300.h */ | 783 | /* see bi_tbfreq definition in arch/ppc/platforms/4xx/xilinx_ml300.h */ |
781 | } | 784 | } |
782 | #endif /* CONFIG_XILINX_ML300 */ | 785 | #endif /* CONFIG_XILINX_ML300 || CONFIG_XILINX_ML403 */ |
783 | 786 | ||
784 | #ifdef CONFIG_IBM_OPENBIOS | 787 | #ifdef CONFIG_IBM_OPENBIOS |
785 | /* This could possibly work for all treeboot roms. | 788 | /* This could possibly work for all treeboot roms. |
diff --git a/arch/ppc/boot/simple/head.S b/arch/ppc/boot/simple/head.S index 5e4adc298bf9..160da1006ff8 100644 --- a/arch/ppc/boot/simple/head.S +++ b/arch/ppc/boot/simple/head.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/head.S | ||
3 | * | ||
4 | * Initial board bringup code for many different boards. | 2 | * Initial board bringup code for many different boards. |
5 | * | 3 | * |
6 | * Author: Tom Rini | 4 | * Author: Tom Rini |
@@ -65,6 +63,13 @@ start_: | |||
65 | */ | 63 | */ |
66 | #endif | 64 | #endif |
67 | 65 | ||
66 | #if defined(CONFIG_XILINX_VIRTEX_4_FX) | ||
67 | /* PPC errata 213: only for Virtex-4 FX */ | ||
68 | mfccr0 0 | ||
69 | oris 0,0,0x50000000@h | ||
70 | mtccr0 0 | ||
71 | #endif | ||
72 | |||
68 | mflr r3 /* Save our actual starting address. */ | 73 | mflr r3 /* Save our actual starting address. */ |
69 | 74 | ||
70 | /* The following functions we call must not modify r3 or r4..... | 75 | /* The following functions we call must not modify r3 or r4..... |
diff --git a/arch/ppc/boot/simple/misc-chestnut.c b/arch/ppc/boot/simple/misc-chestnut.c index 0dce7f3557e4..b94e142ad892 100644 --- a/arch/ppc/boot/simple/misc-chestnut.c +++ b/arch/ppc/boot/simple/misc-chestnut.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/misc-chestnut.c | ||
3 | * | ||
4 | * Setup for the IBM Chestnut (ibm-750fxgx_eval) | 2 | * Setup for the IBM Chestnut (ibm-750fxgx_eval) |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <mgreer@mvista.com> | 4 | * Author: Mark A. Greer <mgreer@mvista.com> |
diff --git a/arch/ppc/boot/simple/misc-cpci690.c b/arch/ppc/boot/simple/misc-cpci690.c index 26860300fa09..8a8614d11a32 100644 --- a/arch/ppc/boot/simple/misc-cpci690.c +++ b/arch/ppc/boot/simple/misc-cpci690.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/misc-cpci690.c | ||
3 | * | ||
4 | * Add birec data for Force CPCI690 board. | 2 | * Add birec data for Force CPCI690 board. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <source@mvista.com> | 4 | * Author: Mark A. Greer <source@mvista.com> |
diff --git a/arch/ppc/boot/simple/misc-ev64260.c b/arch/ppc/boot/simple/misc-ev64260.c index 52ece6937a7a..2678c224af22 100644 --- a/arch/ppc/boot/simple/misc-ev64260.c +++ b/arch/ppc/boot/simple/misc-ev64260.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/misc-ev64260.c | ||
3 | * | ||
4 | * Host bridge init code for the Marvell/Galileo EV-64260-BP evaluation board | 2 | * Host bridge init code for the Marvell/Galileo EV-64260-BP evaluation board |
5 | * with a GT64260 onboard. | 3 | * with a GT64260 onboard. |
6 | * | 4 | * |
diff --git a/arch/ppc/boot/simple/misc-ev64360.c b/arch/ppc/boot/simple/misc-ev64360.c index cd1ccf2a1582..a212b5b988cb 100644 --- a/arch/ppc/boot/simple/misc-ev64360.c +++ b/arch/ppc/boot/simple/misc-ev64360.c | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/misc-ev64360.c | ||
3 | * Copyright (C) 2005 Lee Nicks <allinux@gmail.com> | 2 | * Copyright (C) 2005 Lee Nicks <allinux@gmail.com> |
4 | * | 3 | * |
5 | * Based on arch/ppc/boot/simple/misc-katana.c from: | 4 | * Based on arch/ppc/boot/simple/misc-katana.c from: |
diff --git a/arch/ppc/boot/simple/misc-katana.c b/arch/ppc/boot/simple/misc-katana.c index ec94a11bacac..d97f2ee6f04e 100644 --- a/arch/ppc/boot/simple/misc-katana.c +++ b/arch/ppc/boot/simple/misc-katana.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/misc-katana.c | ||
3 | * | ||
4 | * Set up MPSC values to bootwrapper can prompt user. | 2 | * Set up MPSC values to bootwrapper can prompt user. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <source@mvista.com> | 4 | * Author: Mark A. Greer <source@mvista.com> |
diff --git a/arch/ppc/boot/simple/misc-mv64x60.c b/arch/ppc/boot/simple/misc-mv64x60.c index 258d4599fadc..71ff20fd494a 100644 --- a/arch/ppc/boot/simple/misc-mv64x60.c +++ b/arch/ppc/boot/simple/misc-mv64x60.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/misc-mv64x60.c | ||
3 | * | ||
4 | * Relocate bridge's register base and call board specific routine. | 2 | * Relocate bridge's register base and call board specific routine. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <source@mvista.com> | 4 | * Author: Mark A. Greer <source@mvista.com> |
diff --git a/arch/ppc/boot/simple/misc-prep.c b/arch/ppc/boot/simple/misc-prep.c index 75380ac41669..63def9d13d70 100644 --- a/arch/ppc/boot/simple/misc-prep.c +++ b/arch/ppc/boot/simple/misc-prep.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/misc-prep.c | ||
3 | * | ||
4 | * Maintainer: Tom Rini <trini@kernel.crashing.org> | 2 | * Maintainer: Tom Rini <trini@kernel.crashing.org> |
5 | * | 3 | * |
6 | * In the past: Gary Thomas, Cort Dougan <cort@cs.nmt.edu> | 4 | * In the past: Gary Thomas, Cort Dougan <cort@cs.nmt.edu> |
diff --git a/arch/ppc/boot/simple/misc-radstone_ppc7d.c b/arch/ppc/boot/simple/misc-radstone_ppc7d.c index 569e0d4feeaf..0f302ea9c3d1 100644 --- a/arch/ppc/boot/simple/misc-radstone_ppc7d.c +++ b/arch/ppc/boot/simple/misc-radstone_ppc7d.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/misc-radstone_ppc7d.c | ||
3 | * | ||
4 | * Misc data for Radstone PPC7D board. | 2 | * Misc data for Radstone PPC7D board. |
5 | * | 3 | * |
6 | * Author: James Chapman <jchapman@katalix.com> | 4 | * Author: James Chapman <jchapman@katalix.com> |
diff --git a/arch/ppc/boot/simple/misc-spruce.c b/arch/ppc/boot/simple/misc-spruce.c index d012c39278fd..0cad2f557a1e 100644 --- a/arch/ppc/boot/simple/misc-spruce.c +++ b/arch/ppc/boot/simple/misc-spruce.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/spruce/misc.c | ||
3 | * | ||
4 | * Misc. bootloader code for IBM Spruce reference platform | 2 | * Misc. bootloader code for IBM Spruce reference platform |
5 | * | 3 | * |
6 | * Authors: Johnnie Peters <jpeters@mvista.com> | 4 | * Authors: Johnnie Peters <jpeters@mvista.com> |
diff --git a/arch/ppc/boot/simple/misc.c b/arch/ppc/boot/simple/misc.c index f415d6c62362..3d78571ad945 100644 --- a/arch/ppc/boot/simple/misc.c +++ b/arch/ppc/boot/simple/misc.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/simple/misc.c | ||
3 | * | ||
4 | * Misc. bootloader code for many machines. This assumes you have are using | 2 | * Misc. bootloader code for many machines. This assumes you have are using |
5 | * a 6xx/7xx/74xx CPU in your machine. This assumes the chunk of memory | 3 | * a 6xx/7xx/74xx CPU in your machine. This assumes the chunk of memory |
6 | * below 8MB is free. Finally, it assumes you have a NS16550-style uart for | 4 | * below 8MB is free. Finally, it assumes you have a NS16550-style uart for |
diff --git a/arch/ppc/boot/simple/mpc10x_memory.c b/arch/ppc/boot/simple/mpc10x_memory.c index 20d92a34ceb8..c24290823f7f 100644 --- a/arch/ppc/boot/simple/mpc10x_memory.c +++ b/arch/ppc/boot/simple/mpc10x_memory.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/common/mpc10x_common.c | ||
3 | * | ||
4 | * A routine to find out how much memory the machine has. | 2 | * A routine to find out how much memory the machine has. |
5 | * | 3 | * |
6 | * Based on: | 4 | * Based on: |
diff --git a/arch/ppc/boot/simple/mpc52xx_tty.c b/arch/ppc/boot/simple/mpc52xx_tty.c index 3acc6b7c0727..1964493cf3bd 100644 --- a/arch/ppc/boot/simple/mpc52xx_tty.c +++ b/arch/ppc/boot/simple/mpc52xx_tty.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/mpc52xx_tty.c | ||
3 | * | ||
4 | * Minimal serial functions needed to send messages out a MPC52xx | 2 | * Minimal serial functions needed to send messages out a MPC52xx |
5 | * Programmable Serial Controller (PSC). | 3 | * Programmable Serial Controller (PSC). |
6 | * | 4 | * |
diff --git a/arch/ppc/boot/simple/mv64x60_tty.c b/arch/ppc/boot/simple/mv64x60_tty.c index b9c24d4c738b..0c52f5c784a2 100644 --- a/arch/ppc/boot/simple/mv64x60_tty.c +++ b/arch/ppc/boot/simple/mv64x60_tty.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/mv64x60_tty.c | ||
3 | * | ||
4 | * Bootloader version of the embedded MPSC/UART driver for the Marvell 64x60. | 2 | * Bootloader version of the embedded MPSC/UART driver for the Marvell 64x60. |
5 | * Note: Due to a GT64260A erratum, DMA will be used for UART input (via SDMA). | 3 | * Note: Due to a GT64260A erratum, DMA will be used for UART input (via SDMA). |
6 | * | 4 | * |
diff --git a/arch/ppc/boot/simple/openbios.c b/arch/ppc/boot/simple/openbios.c index 81f11d8b30a7..3f2ed53f793a 100644 --- a/arch/ppc/boot/simple/openbios.c +++ b/arch/ppc/boot/simple/openbios.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/openbios.c | ||
3 | * | ||
4 | * Copyright (c) 2005 DENX Software Engineering | 2 | * Copyright (c) 2005 DENX Software Engineering |
5 | * Stefan Roese <sr@denx.de> | 3 | * Stefan Roese <sr@denx.de> |
6 | * | 4 | * |
diff --git a/arch/ppc/boot/simple/relocate.S b/arch/ppc/boot/simple/relocate.S index 555a216ccc49..7efddc507564 100644 --- a/arch/ppc/boot/simple/relocate.S +++ b/arch/ppc/boot/simple/relocate.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/simple/relocate.S | ||
3 | * | ||
4 | * This is the common part of the loader relocation and initialization | 2 | * This is the common part of the loader relocation and initialization |
5 | * process. All of the board/processor specific initialization is | 3 | * process. All of the board/processor specific initialization is |
6 | * done before we get here. | 4 | * done before we get here. |
diff --git a/arch/ppc/boot/utils/mkbugboot.c b/arch/ppc/boot/utils/mkbugboot.c index 886122283f39..29115e01f60a 100644 --- a/arch/ppc/boot/utils/mkbugboot.c +++ b/arch/ppc/boot/utils/mkbugboot.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/boot/utils/mkbugboot.c | ||
3 | * | ||
4 | * Makes a Motorola PPCBUG ROM bootable image which can be flashed | 2 | * Makes a Motorola PPCBUG ROM bootable image which can be flashed |
5 | * into one of the FLASH banks on a Motorola PowerPlus board. | 3 | * into one of the FLASH banks on a Motorola PowerPlus board. |
6 | * | 4 | * |
diff --git a/arch/ppc/configs/ml300_defconfig b/arch/ppc/configs/ml300_defconfig new file mode 100644 index 000000000000..4a33aca948cc --- /dev/null +++ b/arch/ppc/configs/ml300_defconfig | |||
@@ -0,0 +1,739 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.16-rc1 | ||
4 | # Wed Jan 18 00:49:20 2006 | ||
5 | # | ||
6 | CONFIG_MMU=y | ||
7 | CONFIG_GENERIC_HARDIRQS=y | ||
8 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
9 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
10 | CONFIG_PPC=y | ||
11 | CONFIG_PPC32=y | ||
12 | CONFIG_GENERIC_NVRAM=y | ||
13 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
14 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
15 | |||
16 | # | ||
17 | # Code maturity level options | ||
18 | # | ||
19 | CONFIG_EXPERIMENTAL=y | ||
20 | CONFIG_CLEAN_COMPILE=y | ||
21 | CONFIG_BROKEN_ON_SMP=y | ||
22 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
23 | |||
24 | # | ||
25 | # General setup | ||
26 | # | ||
27 | CONFIG_LOCALVERSION="" | ||
28 | CONFIG_LOCALVERSION_AUTO=y | ||
29 | # CONFIG_SWAP is not set | ||
30 | CONFIG_SYSVIPC=y | ||
31 | # CONFIG_POSIX_MQUEUE is not set | ||
32 | CONFIG_BSD_PROCESS_ACCT=y | ||
33 | CONFIG_BSD_PROCESS_ACCT_V3=y | ||
34 | CONFIG_SYSCTL=y | ||
35 | # CONFIG_AUDIT is not set | ||
36 | # CONFIG_IKCONFIG is not set | ||
37 | CONFIG_INITRAMFS_SOURCE="" | ||
38 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
39 | # CONFIG_EMBEDDED is not set | ||
40 | CONFIG_KALLSYMS=y | ||
41 | # CONFIG_KALLSYMS_ALL is not set | ||
42 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
43 | CONFIG_HOTPLUG=y | ||
44 | CONFIG_PRINTK=y | ||
45 | CONFIG_BUG=y | ||
46 | CONFIG_ELF_CORE=y | ||
47 | CONFIG_BASE_FULL=y | ||
48 | CONFIG_FUTEX=y | ||
49 | CONFIG_EPOLL=y | ||
50 | CONFIG_SHMEM=y | ||
51 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
52 | CONFIG_CC_ALIGN_LABELS=0 | ||
53 | CONFIG_CC_ALIGN_LOOPS=0 | ||
54 | CONFIG_CC_ALIGN_JUMPS=0 | ||
55 | CONFIG_SLAB=y | ||
56 | # CONFIG_TINY_SHMEM is not set | ||
57 | CONFIG_BASE_SMALL=0 | ||
58 | # CONFIG_SLOB is not set | ||
59 | |||
60 | # | ||
61 | # Loadable module support | ||
62 | # | ||
63 | CONFIG_MODULES=y | ||
64 | CONFIG_MODULE_UNLOAD=y | ||
65 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
66 | CONFIG_OBSOLETE_MODPARM=y | ||
67 | CONFIG_MODVERSIONS=y | ||
68 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
69 | CONFIG_KMOD=y | ||
70 | |||
71 | # | ||
72 | # Block layer | ||
73 | # | ||
74 | CONFIG_LBD=y | ||
75 | |||
76 | # | ||
77 | # IO Schedulers | ||
78 | # | ||
79 | CONFIG_IOSCHED_NOOP=y | ||
80 | CONFIG_IOSCHED_AS=y | ||
81 | CONFIG_IOSCHED_DEADLINE=y | ||
82 | CONFIG_IOSCHED_CFQ=y | ||
83 | CONFIG_DEFAULT_AS=y | ||
84 | # CONFIG_DEFAULT_DEADLINE is not set | ||
85 | # CONFIG_DEFAULT_CFQ is not set | ||
86 | # CONFIG_DEFAULT_NOOP is not set | ||
87 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
88 | |||
89 | # | ||
90 | # Processor | ||
91 | # | ||
92 | # CONFIG_6xx is not set | ||
93 | CONFIG_40x=y | ||
94 | # CONFIG_44x is not set | ||
95 | # CONFIG_POWER3 is not set | ||
96 | # CONFIG_8xx is not set | ||
97 | # CONFIG_E200 is not set | ||
98 | # CONFIG_E500 is not set | ||
99 | # CONFIG_MATH_EMULATION is not set | ||
100 | # CONFIG_KEXEC is not set | ||
101 | # CONFIG_CPU_FREQ is not set | ||
102 | CONFIG_4xx=y | ||
103 | # CONFIG_WANT_EARLY_SERIAL is not set | ||
104 | |||
105 | # | ||
106 | # IBM 4xx options | ||
107 | # | ||
108 | # CONFIG_BUBINGA is not set | ||
109 | # CONFIG_CPCI405 is not set | ||
110 | # CONFIG_EP405 is not set | ||
111 | # CONFIG_REDWOOD_5 is not set | ||
112 | # CONFIG_REDWOOD_6 is not set | ||
113 | # CONFIG_SYCAMORE is not set | ||
114 | # CONFIG_WALNUT is not set | ||
115 | CONFIG_XILINX_ML300=y | ||
116 | CONFIG_IBM405_ERR77=y | ||
117 | CONFIG_IBM405_ERR51=y | ||
118 | CONFIG_XILINX_VIRTEX=y | ||
119 | CONFIG_EMBEDDEDBOOT=y | ||
120 | # CONFIG_PPC4xx_DMA is not set | ||
121 | CONFIG_PPC_GEN550=y | ||
122 | CONFIG_UART0_TTYS0=y | ||
123 | # CONFIG_UART0_TTYS1 is not set | ||
124 | CONFIG_NOT_COHERENT_CACHE=y | ||
125 | |||
126 | # | ||
127 | # Platform options | ||
128 | # | ||
129 | # CONFIG_PC_KEYBOARD is not set | ||
130 | # CONFIG_HIGHMEM is not set | ||
131 | # CONFIG_HZ_100 is not set | ||
132 | CONFIG_HZ_250=y | ||
133 | # CONFIG_HZ_1000 is not set | ||
134 | CONFIG_HZ=250 | ||
135 | CONFIG_PREEMPT_NONE=y | ||
136 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
137 | # CONFIG_PREEMPT is not set | ||
138 | CONFIG_SELECT_MEMORY_MODEL=y | ||
139 | CONFIG_FLATMEM_MANUAL=y | ||
140 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
141 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
142 | CONFIG_FLATMEM=y | ||
143 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
144 | # CONFIG_SPARSEMEM_STATIC is not set | ||
145 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
146 | CONFIG_BINFMT_ELF=y | ||
147 | # CONFIG_BINFMT_MISC is not set | ||
148 | CONFIG_CMDLINE_BOOL=y | ||
149 | CONFIG_CMDLINE="console=ttyS0,9600" | ||
150 | # CONFIG_PM is not set | ||
151 | # CONFIG_SOFTWARE_SUSPEND is not set | ||
152 | CONFIG_SECCOMP=y | ||
153 | CONFIG_ISA_DMA_API=y | ||
154 | |||
155 | # | ||
156 | # Bus options | ||
157 | # | ||
158 | # CONFIG_PPC_I8259 is not set | ||
159 | # CONFIG_PCI is not set | ||
160 | # CONFIG_PCI_DOMAINS is not set | ||
161 | |||
162 | # | ||
163 | # PCCARD (PCMCIA/CardBus) support | ||
164 | # | ||
165 | # CONFIG_PCCARD is not set | ||
166 | |||
167 | # | ||
168 | # Advanced setup | ||
169 | # | ||
170 | # CONFIG_ADVANCED_OPTIONS is not set | ||
171 | |||
172 | # | ||
173 | # Default settings for advanced configuration options are used | ||
174 | # | ||
175 | CONFIG_HIGHMEM_START=0xfe000000 | ||
176 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
177 | CONFIG_KERNEL_START=0xc0000000 | ||
178 | CONFIG_TASK_SIZE=0x80000000 | ||
179 | CONFIG_CONSISTENT_START=0xff100000 | ||
180 | CONFIG_CONSISTENT_SIZE=0x00200000 | ||
181 | CONFIG_BOOT_LOAD=0x00400000 | ||
182 | |||
183 | # | ||
184 | # Networking | ||
185 | # | ||
186 | CONFIG_NET=y | ||
187 | |||
188 | # | ||
189 | # Networking options | ||
190 | # | ||
191 | CONFIG_PACKET=y | ||
192 | CONFIG_PACKET_MMAP=y | ||
193 | CONFIG_UNIX=y | ||
194 | # CONFIG_NET_KEY is not set | ||
195 | CONFIG_INET=y | ||
196 | # CONFIG_IP_MULTICAST is not set | ||
197 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
198 | CONFIG_IP_FIB_HASH=y | ||
199 | CONFIG_IP_PNP=y | ||
200 | CONFIG_IP_PNP_DHCP=y | ||
201 | # CONFIG_IP_PNP_BOOTP is not set | ||
202 | # CONFIG_IP_PNP_RARP is not set | ||
203 | # CONFIG_NET_IPIP is not set | ||
204 | # CONFIG_NET_IPGRE is not set | ||
205 | # CONFIG_ARPD is not set | ||
206 | # CONFIG_SYN_COOKIES is not set | ||
207 | # CONFIG_INET_AH is not set | ||
208 | # CONFIG_INET_ESP is not set | ||
209 | # CONFIG_INET_IPCOMP is not set | ||
210 | # CONFIG_INET_TUNNEL is not set | ||
211 | CONFIG_INET_DIAG=y | ||
212 | CONFIG_INET_TCP_DIAG=y | ||
213 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
214 | CONFIG_TCP_CONG_BIC=y | ||
215 | # CONFIG_IPV6 is not set | ||
216 | # CONFIG_NETFILTER is not set | ||
217 | |||
218 | # | ||
219 | # DCCP Configuration (EXPERIMENTAL) | ||
220 | # | ||
221 | # CONFIG_IP_DCCP is not set | ||
222 | |||
223 | # | ||
224 | # SCTP Configuration (EXPERIMENTAL) | ||
225 | # | ||
226 | # CONFIG_IP_SCTP is not set | ||
227 | # CONFIG_ATM is not set | ||
228 | # CONFIG_BRIDGE is not set | ||
229 | # CONFIG_VLAN_8021Q is not set | ||
230 | # CONFIG_DECNET is not set | ||
231 | # CONFIG_LLC2 is not set | ||
232 | # CONFIG_IPX is not set | ||
233 | # CONFIG_ATALK is not set | ||
234 | # CONFIG_X25 is not set | ||
235 | # CONFIG_LAPB is not set | ||
236 | |||
237 | # | ||
238 | # TIPC Configuration (EXPERIMENTAL) | ||
239 | # | ||
240 | # CONFIG_TIPC is not set | ||
241 | # CONFIG_NET_DIVERT is not set | ||
242 | # CONFIG_ECONET is not set | ||
243 | # CONFIG_WAN_ROUTER is not set | ||
244 | |||
245 | # | ||
246 | # QoS and/or fair queueing | ||
247 | # | ||
248 | # CONFIG_NET_SCHED is not set | ||
249 | |||
250 | # | ||
251 | # Network testing | ||
252 | # | ||
253 | # CONFIG_NET_PKTGEN is not set | ||
254 | # CONFIG_HAMRADIO is not set | ||
255 | # CONFIG_IRDA is not set | ||
256 | # CONFIG_BT is not set | ||
257 | # CONFIG_IEEE80211 is not set | ||
258 | |||
259 | # | ||
260 | # Device Drivers | ||
261 | # | ||
262 | |||
263 | # | ||
264 | # Generic Driver Options | ||
265 | # | ||
266 | CONFIG_STANDALONE=y | ||
267 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
268 | # CONFIG_FW_LOADER is not set | ||
269 | # CONFIG_DEBUG_DRIVER is not set | ||
270 | |||
271 | # | ||
272 | # Connector - unified userspace <-> kernelspace linker | ||
273 | # | ||
274 | # CONFIG_CONNECTOR is not set | ||
275 | |||
276 | # | ||
277 | # Memory Technology Devices (MTD) | ||
278 | # | ||
279 | # CONFIG_MTD is not set | ||
280 | |||
281 | # | ||
282 | # Parallel port support | ||
283 | # | ||
284 | # CONFIG_PARPORT is not set | ||
285 | |||
286 | # | ||
287 | # Plug and Play support | ||
288 | # | ||
289 | |||
290 | # | ||
291 | # Block devices | ||
292 | # | ||
293 | # CONFIG_BLK_DEV_FD is not set | ||
294 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
295 | # CONFIG_BLK_DEV_LOOP is not set | ||
296 | # CONFIG_BLK_DEV_NBD is not set | ||
297 | CONFIG_BLK_DEV_RAM=y | ||
298 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
299 | CONFIG_BLK_DEV_RAM_SIZE=65536 | ||
300 | CONFIG_BLK_DEV_INITRD=y | ||
301 | # CONFIG_CDROM_PKTCDVD is not set | ||
302 | # CONFIG_ATA_OVER_ETH is not set | ||
303 | |||
304 | # | ||
305 | # ATA/ATAPI/MFM/RLL support | ||
306 | # | ||
307 | # CONFIG_IDE is not set | ||
308 | |||
309 | # | ||
310 | # SCSI device support | ||
311 | # | ||
312 | # CONFIG_RAID_ATTRS is not set | ||
313 | # CONFIG_SCSI is not set | ||
314 | |||
315 | # | ||
316 | # Multi-device support (RAID and LVM) | ||
317 | # | ||
318 | # CONFIG_MD is not set | ||
319 | |||
320 | # | ||
321 | # Fusion MPT device support | ||
322 | # | ||
323 | # CONFIG_FUSION is not set | ||
324 | |||
325 | # | ||
326 | # IEEE 1394 (FireWire) support | ||
327 | # | ||
328 | |||
329 | # | ||
330 | # I2O device support | ||
331 | # | ||
332 | |||
333 | # | ||
334 | # Macintosh device drivers | ||
335 | # | ||
336 | # CONFIG_WINDFARM is not set | ||
337 | |||
338 | # | ||
339 | # Network device support | ||
340 | # | ||
341 | CONFIG_NETDEVICES=y | ||
342 | # CONFIG_DUMMY is not set | ||
343 | # CONFIG_BONDING is not set | ||
344 | # CONFIG_EQUALIZER is not set | ||
345 | CONFIG_TUN=y | ||
346 | |||
347 | # | ||
348 | # PHY device support | ||
349 | # | ||
350 | |||
351 | # | ||
352 | # Ethernet (10 or 100Mbit) | ||
353 | # | ||
354 | # CONFIG_NET_ETHERNET is not set | ||
355 | # CONFIG_IBM_EMAC is not set | ||
356 | |||
357 | # | ||
358 | # Ethernet (1000 Mbit) | ||
359 | # | ||
360 | |||
361 | # | ||
362 | # Ethernet (10000 Mbit) | ||
363 | # | ||
364 | |||
365 | # | ||
366 | # Token Ring devices | ||
367 | # | ||
368 | |||
369 | # | ||
370 | # Wireless LAN (non-hamradio) | ||
371 | # | ||
372 | # CONFIG_NET_RADIO is not set | ||
373 | |||
374 | # | ||
375 | # Wan interfaces | ||
376 | # | ||
377 | # CONFIG_WAN is not set | ||
378 | # CONFIG_PPP is not set | ||
379 | # CONFIG_SLIP is not set | ||
380 | # CONFIG_SHAPER is not set | ||
381 | # CONFIG_NETCONSOLE is not set | ||
382 | # CONFIG_NETPOLL is not set | ||
383 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
384 | |||
385 | # | ||
386 | # ISDN subsystem | ||
387 | # | ||
388 | # CONFIG_ISDN is not set | ||
389 | |||
390 | # | ||
391 | # Telephony Support | ||
392 | # | ||
393 | # CONFIG_PHONE is not set | ||
394 | |||
395 | # | ||
396 | # Input device support | ||
397 | # | ||
398 | CONFIG_INPUT=y | ||
399 | |||
400 | # | ||
401 | # Userland interfaces | ||
402 | # | ||
403 | CONFIG_INPUT_MOUSEDEV=y | ||
404 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
405 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
406 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
407 | # CONFIG_INPUT_JOYDEV is not set | ||
408 | # CONFIG_INPUT_TSDEV is not set | ||
409 | # CONFIG_INPUT_EVDEV is not set | ||
410 | # CONFIG_INPUT_EVBUG is not set | ||
411 | |||
412 | # | ||
413 | # Input Device Drivers | ||
414 | # | ||
415 | # CONFIG_INPUT_KEYBOARD is not set | ||
416 | # CONFIG_INPUT_MOUSE is not set | ||
417 | # CONFIG_INPUT_JOYSTICK is not set | ||
418 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
419 | # CONFIG_INPUT_MISC is not set | ||
420 | |||
421 | # | ||
422 | # Hardware I/O ports | ||
423 | # | ||
424 | # CONFIG_SERIO is not set | ||
425 | # CONFIG_GAMEPORT is not set | ||
426 | |||
427 | # | ||
428 | # Character devices | ||
429 | # | ||
430 | CONFIG_VT=y | ||
431 | CONFIG_VT_CONSOLE=y | ||
432 | CONFIG_HW_CONSOLE=y | ||
433 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
434 | |||
435 | # | ||
436 | # Serial drivers | ||
437 | # | ||
438 | CONFIG_SERIAL_8250=y | ||
439 | CONFIG_SERIAL_8250_CONSOLE=y | ||
440 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
441 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
442 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
443 | |||
444 | # | ||
445 | # Non-8250 serial port support | ||
446 | # | ||
447 | CONFIG_SERIAL_CORE=y | ||
448 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
449 | CONFIG_UNIX98_PTYS=y | ||
450 | # CONFIG_LEGACY_PTYS is not set | ||
451 | |||
452 | # | ||
453 | # IPMI | ||
454 | # | ||
455 | # CONFIG_IPMI_HANDLER is not set | ||
456 | |||
457 | # | ||
458 | # Watchdog Cards | ||
459 | # | ||
460 | # CONFIG_WATCHDOG is not set | ||
461 | # CONFIG_NVRAM is not set | ||
462 | # CONFIG_GEN_RTC is not set | ||
463 | # CONFIG_DTLK is not set | ||
464 | # CONFIG_R3964 is not set | ||
465 | |||
466 | # | ||
467 | # Ftape, the floppy tape device driver | ||
468 | # | ||
469 | # CONFIG_AGP is not set | ||
470 | # CONFIG_RAW_DRIVER is not set | ||
471 | |||
472 | # | ||
473 | # TPM devices | ||
474 | # | ||
475 | # CONFIG_TCG_TPM is not set | ||
476 | # CONFIG_TELCLOCK is not set | ||
477 | |||
478 | # | ||
479 | # I2C support | ||
480 | # | ||
481 | # CONFIG_I2C is not set | ||
482 | |||
483 | # | ||
484 | # SPI support | ||
485 | # | ||
486 | # CONFIG_SPI is not set | ||
487 | # CONFIG_SPI_MASTER is not set | ||
488 | |||
489 | # | ||
490 | # Dallas's 1-wire bus | ||
491 | # | ||
492 | # CONFIG_W1 is not set | ||
493 | |||
494 | # | ||
495 | # Hardware Monitoring support | ||
496 | # | ||
497 | # CONFIG_HWMON is not set | ||
498 | # CONFIG_HWMON_VID is not set | ||
499 | |||
500 | # | ||
501 | # Misc devices | ||
502 | # | ||
503 | |||
504 | # | ||
505 | # Multimedia Capabilities Port drivers | ||
506 | # | ||
507 | |||
508 | # | ||
509 | # Multimedia devices | ||
510 | # | ||
511 | # CONFIG_VIDEO_DEV is not set | ||
512 | |||
513 | # | ||
514 | # Digital Video Broadcasting Devices | ||
515 | # | ||
516 | # CONFIG_DVB is not set | ||
517 | |||
518 | # | ||
519 | # Graphics support | ||
520 | # | ||
521 | # CONFIG_FB is not set | ||
522 | |||
523 | # | ||
524 | # Console display driver support | ||
525 | # | ||
526 | CONFIG_DUMMY_CONSOLE=y | ||
527 | |||
528 | # | ||
529 | # Sound | ||
530 | # | ||
531 | # CONFIG_SOUND is not set | ||
532 | |||
533 | # | ||
534 | # USB support | ||
535 | # | ||
536 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
537 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
538 | |||
539 | # | ||
540 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
541 | # | ||
542 | |||
543 | # | ||
544 | # USB Gadget Support | ||
545 | # | ||
546 | # CONFIG_USB_GADGET is not set | ||
547 | |||
548 | # | ||
549 | # MMC/SD Card support | ||
550 | # | ||
551 | # CONFIG_MMC is not set | ||
552 | |||
553 | # | ||
554 | # InfiniBand support | ||
555 | # | ||
556 | |||
557 | # | ||
558 | # SN Devices | ||
559 | # | ||
560 | |||
561 | # | ||
562 | # File systems | ||
563 | # | ||
564 | CONFIG_EXT2_FS=y | ||
565 | # CONFIG_EXT2_FS_XATTR is not set | ||
566 | # CONFIG_EXT2_FS_XIP is not set | ||
567 | # CONFIG_EXT3_FS is not set | ||
568 | # CONFIG_REISERFS_FS is not set | ||
569 | # CONFIG_JFS_FS is not set | ||
570 | # CONFIG_FS_POSIX_ACL is not set | ||
571 | # CONFIG_XFS_FS is not set | ||
572 | # CONFIG_OCFS2_FS is not set | ||
573 | # CONFIG_MINIX_FS is not set | ||
574 | # CONFIG_ROMFS_FS is not set | ||
575 | CONFIG_INOTIFY=y | ||
576 | # CONFIG_QUOTA is not set | ||
577 | CONFIG_DNOTIFY=y | ||
578 | # CONFIG_AUTOFS_FS is not set | ||
579 | # CONFIG_AUTOFS4_FS is not set | ||
580 | # CONFIG_FUSE_FS is not set | ||
581 | |||
582 | # | ||
583 | # CD-ROM/DVD Filesystems | ||
584 | # | ||
585 | # CONFIG_ISO9660_FS is not set | ||
586 | # CONFIG_UDF_FS is not set | ||
587 | |||
588 | # | ||
589 | # DOS/FAT/NT Filesystems | ||
590 | # | ||
591 | CONFIG_FAT_FS=y | ||
592 | CONFIG_MSDOS_FS=y | ||
593 | CONFIG_VFAT_FS=y | ||
594 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
595 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
596 | # CONFIG_NTFS_FS is not set | ||
597 | |||
598 | # | ||
599 | # Pseudo filesystems | ||
600 | # | ||
601 | CONFIG_PROC_FS=y | ||
602 | CONFIG_PROC_KCORE=y | ||
603 | CONFIG_SYSFS=y | ||
604 | CONFIG_TMPFS=y | ||
605 | # CONFIG_HUGETLB_PAGE is not set | ||
606 | CONFIG_RAMFS=y | ||
607 | # CONFIG_RELAYFS_FS is not set | ||
608 | # CONFIG_CONFIGFS_FS is not set | ||
609 | |||
610 | # | ||
611 | # Miscellaneous filesystems | ||
612 | # | ||
613 | # CONFIG_ADFS_FS is not set | ||
614 | # CONFIG_AFFS_FS is not set | ||
615 | # CONFIG_HFS_FS is not set | ||
616 | # CONFIG_HFSPLUS_FS is not set | ||
617 | # CONFIG_BEFS_FS is not set | ||
618 | # CONFIG_BFS_FS is not set | ||
619 | # CONFIG_EFS_FS is not set | ||
620 | # CONFIG_CRAMFS is not set | ||
621 | # CONFIG_VXFS_FS is not set | ||
622 | # CONFIG_HPFS_FS is not set | ||
623 | # CONFIG_QNX4FS_FS is not set | ||
624 | # CONFIG_SYSV_FS is not set | ||
625 | # CONFIG_UFS_FS is not set | ||
626 | |||
627 | # | ||
628 | # Network File Systems | ||
629 | # | ||
630 | # CONFIG_NFS_FS is not set | ||
631 | # CONFIG_NFSD is not set | ||
632 | # CONFIG_SMB_FS is not set | ||
633 | # CONFIG_CIFS is not set | ||
634 | # CONFIG_NCP_FS is not set | ||
635 | # CONFIG_CODA_FS is not set | ||
636 | # CONFIG_AFS_FS is not set | ||
637 | # CONFIG_9P_FS is not set | ||
638 | |||
639 | # | ||
640 | # Partition Types | ||
641 | # | ||
642 | # CONFIG_PARTITION_ADVANCED is not set | ||
643 | CONFIG_MSDOS_PARTITION=y | ||
644 | |||
645 | # | ||
646 | # Native Language Support | ||
647 | # | ||
648 | CONFIG_NLS=y | ||
649 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
650 | CONFIG_NLS_CODEPAGE_437=y | ||
651 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
652 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
653 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
654 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
655 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
656 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
657 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
658 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
659 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
660 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
661 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
662 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
663 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
664 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
665 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
666 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
667 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
668 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
669 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
670 | # CONFIG_NLS_ISO8859_8 is not set | ||
671 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
672 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
673 | CONFIG_NLS_ASCII=y | ||
674 | CONFIG_NLS_ISO8859_1=y | ||
675 | # CONFIG_NLS_ISO8859_2 is not set | ||
676 | # CONFIG_NLS_ISO8859_3 is not set | ||
677 | # CONFIG_NLS_ISO8859_4 is not set | ||
678 | # CONFIG_NLS_ISO8859_5 is not set | ||
679 | # CONFIG_NLS_ISO8859_6 is not set | ||
680 | # CONFIG_NLS_ISO8859_7 is not set | ||
681 | # CONFIG_NLS_ISO8859_9 is not set | ||
682 | # CONFIG_NLS_ISO8859_13 is not set | ||
683 | # CONFIG_NLS_ISO8859_14 is not set | ||
684 | # CONFIG_NLS_ISO8859_15 is not set | ||
685 | # CONFIG_NLS_KOI8_R is not set | ||
686 | # CONFIG_NLS_KOI8_U is not set | ||
687 | CONFIG_NLS_UTF8=y | ||
688 | |||
689 | # | ||
690 | # IBM 40x options | ||
691 | # | ||
692 | |||
693 | # | ||
694 | # Library routines | ||
695 | # | ||
696 | # CONFIG_CRC_CCITT is not set | ||
697 | # CONFIG_CRC16 is not set | ||
698 | CONFIG_CRC32=y | ||
699 | # CONFIG_LIBCRC32C is not set | ||
700 | # CONFIG_PROFILING is not set | ||
701 | |||
702 | # | ||
703 | # Kernel hacking | ||
704 | # | ||
705 | CONFIG_PRINTK_TIME=y | ||
706 | CONFIG_MAGIC_SYSRQ=y | ||
707 | CONFIG_DEBUG_KERNEL=y | ||
708 | CONFIG_LOG_BUF_SHIFT=14 | ||
709 | CONFIG_DETECT_SOFTLOCKUP=y | ||
710 | # CONFIG_SCHEDSTATS is not set | ||
711 | # CONFIG_DEBUG_SLAB is not set | ||
712 | CONFIG_DEBUG_MUTEXES=y | ||
713 | # CONFIG_DEBUG_SPINLOCK is not set | ||
714 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
715 | # CONFIG_DEBUG_KOBJECT is not set | ||
716 | CONFIG_DEBUG_INFO=y | ||
717 | # CONFIG_DEBUG_FS is not set | ||
718 | # CONFIG_DEBUG_VM is not set | ||
719 | CONFIG_FORCED_INLINING=y | ||
720 | # CONFIG_RCU_TORTURE_TEST is not set | ||
721 | # CONFIG_KGDB is not set | ||
722 | CONFIG_XMON=y | ||
723 | # CONFIG_BDI_SWITCH is not set | ||
724 | # CONFIG_SERIAL_TEXT_DEBUG is not set | ||
725 | |||
726 | # | ||
727 | # Security options | ||
728 | # | ||
729 | # CONFIG_KEYS is not set | ||
730 | # CONFIG_SECURITY is not set | ||
731 | |||
732 | # | ||
733 | # Cryptographic options | ||
734 | # | ||
735 | # CONFIG_CRYPTO is not set | ||
736 | |||
737 | # | ||
738 | # Hardware crypto devices | ||
739 | # | ||
diff --git a/arch/ppc/configs/ml403_defconfig b/arch/ppc/configs/ml403_defconfig new file mode 100644 index 000000000000..fafd2516fa51 --- /dev/null +++ b/arch/ppc/configs/ml403_defconfig | |||
@@ -0,0 +1,740 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.16-rc1 | ||
4 | # Wed Jan 18 01:11:41 2006 | ||
5 | # | ||
6 | CONFIG_MMU=y | ||
7 | CONFIG_GENERIC_HARDIRQS=y | ||
8 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
9 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
10 | CONFIG_PPC=y | ||
11 | CONFIG_PPC32=y | ||
12 | CONFIG_GENERIC_NVRAM=y | ||
13 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
14 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
15 | |||
16 | # | ||
17 | # Code maturity level options | ||
18 | # | ||
19 | CONFIG_EXPERIMENTAL=y | ||
20 | CONFIG_CLEAN_COMPILE=y | ||
21 | CONFIG_BROKEN_ON_SMP=y | ||
22 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
23 | |||
24 | # | ||
25 | # General setup | ||
26 | # | ||
27 | CONFIG_LOCALVERSION="" | ||
28 | CONFIG_LOCALVERSION_AUTO=y | ||
29 | # CONFIG_SWAP is not set | ||
30 | CONFIG_SYSVIPC=y | ||
31 | # CONFIG_POSIX_MQUEUE is not set | ||
32 | CONFIG_BSD_PROCESS_ACCT=y | ||
33 | CONFIG_BSD_PROCESS_ACCT_V3=y | ||
34 | CONFIG_SYSCTL=y | ||
35 | # CONFIG_AUDIT is not set | ||
36 | # CONFIG_IKCONFIG is not set | ||
37 | CONFIG_INITRAMFS_SOURCE="" | ||
38 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
39 | # CONFIG_EMBEDDED is not set | ||
40 | CONFIG_KALLSYMS=y | ||
41 | # CONFIG_KALLSYMS_ALL is not set | ||
42 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
43 | CONFIG_HOTPLUG=y | ||
44 | CONFIG_PRINTK=y | ||
45 | CONFIG_BUG=y | ||
46 | CONFIG_ELF_CORE=y | ||
47 | CONFIG_BASE_FULL=y | ||
48 | CONFIG_FUTEX=y | ||
49 | CONFIG_EPOLL=y | ||
50 | CONFIG_SHMEM=y | ||
51 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
52 | CONFIG_CC_ALIGN_LABELS=0 | ||
53 | CONFIG_CC_ALIGN_LOOPS=0 | ||
54 | CONFIG_CC_ALIGN_JUMPS=0 | ||
55 | CONFIG_SLAB=y | ||
56 | # CONFIG_TINY_SHMEM is not set | ||
57 | CONFIG_BASE_SMALL=0 | ||
58 | # CONFIG_SLOB is not set | ||
59 | |||
60 | # | ||
61 | # Loadable module support | ||
62 | # | ||
63 | CONFIG_MODULES=y | ||
64 | CONFIG_MODULE_UNLOAD=y | ||
65 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
66 | CONFIG_OBSOLETE_MODPARM=y | ||
67 | CONFIG_MODVERSIONS=y | ||
68 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
69 | CONFIG_KMOD=y | ||
70 | |||
71 | # | ||
72 | # Block layer | ||
73 | # | ||
74 | CONFIG_LBD=y | ||
75 | |||
76 | # | ||
77 | # IO Schedulers | ||
78 | # | ||
79 | CONFIG_IOSCHED_NOOP=y | ||
80 | CONFIG_IOSCHED_AS=y | ||
81 | CONFIG_IOSCHED_DEADLINE=y | ||
82 | CONFIG_IOSCHED_CFQ=y | ||
83 | CONFIG_DEFAULT_AS=y | ||
84 | # CONFIG_DEFAULT_DEADLINE is not set | ||
85 | # CONFIG_DEFAULT_CFQ is not set | ||
86 | # CONFIG_DEFAULT_NOOP is not set | ||
87 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
88 | |||
89 | # | ||
90 | # Processor | ||
91 | # | ||
92 | # CONFIG_6xx is not set | ||
93 | CONFIG_40x=y | ||
94 | # CONFIG_44x is not set | ||
95 | # CONFIG_POWER3 is not set | ||
96 | # CONFIG_8xx is not set | ||
97 | # CONFIG_E200 is not set | ||
98 | # CONFIG_E500 is not set | ||
99 | # CONFIG_MATH_EMULATION is not set | ||
100 | # CONFIG_KEXEC is not set | ||
101 | # CONFIG_CPU_FREQ is not set | ||
102 | CONFIG_4xx=y | ||
103 | # CONFIG_WANT_EARLY_SERIAL is not set | ||
104 | |||
105 | # | ||
106 | # IBM 4xx options | ||
107 | # | ||
108 | # CONFIG_BUBINGA is not set | ||
109 | # CONFIG_CPCI405 is not set | ||
110 | # CONFIG_EP405 is not set | ||
111 | # CONFIG_REDWOOD_5 is not set | ||
112 | # CONFIG_REDWOOD_6 is not set | ||
113 | # CONFIG_SYCAMORE is not set | ||
114 | # CONFIG_WALNUT is not set | ||
115 | # CONFIG_XILINX_ML300 is not set | ||
116 | CONFIG_XILINX_ML403=y | ||
117 | CONFIG_IBM405_ERR77=y | ||
118 | CONFIG_IBM405_ERR51=y | ||
119 | CONFIG_XILINX_VIRTEX=y | ||
120 | CONFIG_EMBEDDEDBOOT=y | ||
121 | # CONFIG_PPC4xx_DMA is not set | ||
122 | CONFIG_PPC_GEN550=y | ||
123 | CONFIG_UART0_TTYS0=y | ||
124 | # CONFIG_UART0_TTYS1 is not set | ||
125 | CONFIG_NOT_COHERENT_CACHE=y | ||
126 | |||
127 | # | ||
128 | # Platform options | ||
129 | # | ||
130 | # CONFIG_PC_KEYBOARD is not set | ||
131 | # CONFIG_HIGHMEM is not set | ||
132 | # CONFIG_HZ_100 is not set | ||
133 | CONFIG_HZ_250=y | ||
134 | # CONFIG_HZ_1000 is not set | ||
135 | CONFIG_HZ=250 | ||
136 | CONFIG_PREEMPT_NONE=y | ||
137 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
138 | # CONFIG_PREEMPT is not set | ||
139 | CONFIG_SELECT_MEMORY_MODEL=y | ||
140 | CONFIG_FLATMEM_MANUAL=y | ||
141 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
142 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
143 | CONFIG_FLATMEM=y | ||
144 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
145 | # CONFIG_SPARSEMEM_STATIC is not set | ||
146 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
147 | CONFIG_BINFMT_ELF=y | ||
148 | # CONFIG_BINFMT_MISC is not set | ||
149 | CONFIG_CMDLINE_BOOL=y | ||
150 | CONFIG_CMDLINE="console=ttyS0,9600" | ||
151 | # CONFIG_PM is not set | ||
152 | # CONFIG_SOFTWARE_SUSPEND is not set | ||
153 | CONFIG_SECCOMP=y | ||
154 | CONFIG_ISA_DMA_API=y | ||
155 | |||
156 | # | ||
157 | # Bus options | ||
158 | # | ||
159 | # CONFIG_PPC_I8259 is not set | ||
160 | # CONFIG_PCI is not set | ||
161 | # CONFIG_PCI_DOMAINS is not set | ||
162 | |||
163 | # | ||
164 | # PCCARD (PCMCIA/CardBus) support | ||
165 | # | ||
166 | # CONFIG_PCCARD is not set | ||
167 | |||
168 | # | ||
169 | # Advanced setup | ||
170 | # | ||
171 | # CONFIG_ADVANCED_OPTIONS is not set | ||
172 | |||
173 | # | ||
174 | # Default settings for advanced configuration options are used | ||
175 | # | ||
176 | CONFIG_HIGHMEM_START=0xfe000000 | ||
177 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
178 | CONFIG_KERNEL_START=0xc0000000 | ||
179 | CONFIG_TASK_SIZE=0x80000000 | ||
180 | CONFIG_CONSISTENT_START=0xff100000 | ||
181 | CONFIG_CONSISTENT_SIZE=0x00200000 | ||
182 | CONFIG_BOOT_LOAD=0x00400000 | ||
183 | |||
184 | # | ||
185 | # Networking | ||
186 | # | ||
187 | CONFIG_NET=y | ||
188 | |||
189 | # | ||
190 | # Networking options | ||
191 | # | ||
192 | CONFIG_PACKET=y | ||
193 | CONFIG_PACKET_MMAP=y | ||
194 | CONFIG_UNIX=y | ||
195 | # CONFIG_NET_KEY is not set | ||
196 | CONFIG_INET=y | ||
197 | # CONFIG_IP_MULTICAST is not set | ||
198 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
199 | CONFIG_IP_FIB_HASH=y | ||
200 | CONFIG_IP_PNP=y | ||
201 | CONFIG_IP_PNP_DHCP=y | ||
202 | # CONFIG_IP_PNP_BOOTP is not set | ||
203 | # CONFIG_IP_PNP_RARP is not set | ||
204 | # CONFIG_NET_IPIP is not set | ||
205 | # CONFIG_NET_IPGRE is not set | ||
206 | # CONFIG_ARPD is not set | ||
207 | # CONFIG_SYN_COOKIES is not set | ||
208 | # CONFIG_INET_AH is not set | ||
209 | # CONFIG_INET_ESP is not set | ||
210 | # CONFIG_INET_IPCOMP is not set | ||
211 | # CONFIG_INET_TUNNEL is not set | ||
212 | CONFIG_INET_DIAG=y | ||
213 | CONFIG_INET_TCP_DIAG=y | ||
214 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
215 | CONFIG_TCP_CONG_BIC=y | ||
216 | # CONFIG_IPV6 is not set | ||
217 | # CONFIG_NETFILTER is not set | ||
218 | |||
219 | # | ||
220 | # DCCP Configuration (EXPERIMENTAL) | ||
221 | # | ||
222 | # CONFIG_IP_DCCP is not set | ||
223 | |||
224 | # | ||
225 | # SCTP Configuration (EXPERIMENTAL) | ||
226 | # | ||
227 | # CONFIG_IP_SCTP is not set | ||
228 | # CONFIG_ATM is not set | ||
229 | # CONFIG_BRIDGE is not set | ||
230 | # CONFIG_VLAN_8021Q is not set | ||
231 | # CONFIG_DECNET is not set | ||
232 | # CONFIG_LLC2 is not set | ||
233 | # CONFIG_IPX is not set | ||
234 | # CONFIG_ATALK is not set | ||
235 | # CONFIG_X25 is not set | ||
236 | # CONFIG_LAPB is not set | ||
237 | |||
238 | # | ||
239 | # TIPC Configuration (EXPERIMENTAL) | ||
240 | # | ||
241 | # CONFIG_TIPC is not set | ||
242 | # CONFIG_NET_DIVERT is not set | ||
243 | # CONFIG_ECONET is not set | ||
244 | # CONFIG_WAN_ROUTER is not set | ||
245 | |||
246 | # | ||
247 | # QoS and/or fair queueing | ||
248 | # | ||
249 | # CONFIG_NET_SCHED is not set | ||
250 | |||
251 | # | ||
252 | # Network testing | ||
253 | # | ||
254 | # CONFIG_NET_PKTGEN is not set | ||
255 | # CONFIG_HAMRADIO is not set | ||
256 | # CONFIG_IRDA is not set | ||
257 | # CONFIG_BT is not set | ||
258 | # CONFIG_IEEE80211 is not set | ||
259 | |||
260 | # | ||
261 | # Device Drivers | ||
262 | # | ||
263 | |||
264 | # | ||
265 | # Generic Driver Options | ||
266 | # | ||
267 | CONFIG_STANDALONE=y | ||
268 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
269 | # CONFIG_FW_LOADER is not set | ||
270 | # CONFIG_DEBUG_DRIVER is not set | ||
271 | |||
272 | # | ||
273 | # Connector - unified userspace <-> kernelspace linker | ||
274 | # | ||
275 | # CONFIG_CONNECTOR is not set | ||
276 | |||
277 | # | ||
278 | # Memory Technology Devices (MTD) | ||
279 | # | ||
280 | # CONFIG_MTD is not set | ||
281 | |||
282 | # | ||
283 | # Parallel port support | ||
284 | # | ||
285 | # CONFIG_PARPORT is not set | ||
286 | |||
287 | # | ||
288 | # Plug and Play support | ||
289 | # | ||
290 | |||
291 | # | ||
292 | # Block devices | ||
293 | # | ||
294 | # CONFIG_BLK_DEV_FD is not set | ||
295 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
296 | # CONFIG_BLK_DEV_LOOP is not set | ||
297 | # CONFIG_BLK_DEV_NBD is not set | ||
298 | CONFIG_BLK_DEV_RAM=y | ||
299 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
300 | CONFIG_BLK_DEV_RAM_SIZE=65536 | ||
301 | CONFIG_BLK_DEV_INITRD=y | ||
302 | # CONFIG_CDROM_PKTCDVD is not set | ||
303 | # CONFIG_ATA_OVER_ETH is not set | ||
304 | |||
305 | # | ||
306 | # ATA/ATAPI/MFM/RLL support | ||
307 | # | ||
308 | # CONFIG_IDE is not set | ||
309 | |||
310 | # | ||
311 | # SCSI device support | ||
312 | # | ||
313 | # CONFIG_RAID_ATTRS is not set | ||
314 | # CONFIG_SCSI is not set | ||
315 | |||
316 | # | ||
317 | # Multi-device support (RAID and LVM) | ||
318 | # | ||
319 | # CONFIG_MD is not set | ||
320 | |||
321 | # | ||
322 | # Fusion MPT device support | ||
323 | # | ||
324 | # CONFIG_FUSION is not set | ||
325 | |||
326 | # | ||
327 | # IEEE 1394 (FireWire) support | ||
328 | # | ||
329 | |||
330 | # | ||
331 | # I2O device support | ||
332 | # | ||
333 | |||
334 | # | ||
335 | # Macintosh device drivers | ||
336 | # | ||
337 | # CONFIG_WINDFARM is not set | ||
338 | |||
339 | # | ||
340 | # Network device support | ||
341 | # | ||
342 | CONFIG_NETDEVICES=y | ||
343 | # CONFIG_DUMMY is not set | ||
344 | # CONFIG_BONDING is not set | ||
345 | # CONFIG_EQUALIZER is not set | ||
346 | CONFIG_TUN=y | ||
347 | |||
348 | # | ||
349 | # PHY device support | ||
350 | # | ||
351 | |||
352 | # | ||
353 | # Ethernet (10 or 100Mbit) | ||
354 | # | ||
355 | # CONFIG_NET_ETHERNET is not set | ||
356 | # CONFIG_IBM_EMAC is not set | ||
357 | |||
358 | # | ||
359 | # Ethernet (1000 Mbit) | ||
360 | # | ||
361 | |||
362 | # | ||
363 | # Ethernet (10000 Mbit) | ||
364 | # | ||
365 | |||
366 | # | ||
367 | # Token Ring devices | ||
368 | # | ||
369 | |||
370 | # | ||
371 | # Wireless LAN (non-hamradio) | ||
372 | # | ||
373 | # CONFIG_NET_RADIO is not set | ||
374 | |||
375 | # | ||
376 | # Wan interfaces | ||
377 | # | ||
378 | # CONFIG_WAN is not set | ||
379 | # CONFIG_PPP is not set | ||
380 | # CONFIG_SLIP is not set | ||
381 | # CONFIG_SHAPER is not set | ||
382 | # CONFIG_NETCONSOLE is not set | ||
383 | # CONFIG_NETPOLL is not set | ||
384 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
385 | |||
386 | # | ||
387 | # ISDN subsystem | ||
388 | # | ||
389 | # CONFIG_ISDN is not set | ||
390 | |||
391 | # | ||
392 | # Telephony Support | ||
393 | # | ||
394 | # CONFIG_PHONE is not set | ||
395 | |||
396 | # | ||
397 | # Input device support | ||
398 | # | ||
399 | CONFIG_INPUT=y | ||
400 | |||
401 | # | ||
402 | # Userland interfaces | ||
403 | # | ||
404 | CONFIG_INPUT_MOUSEDEV=y | ||
405 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
406 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
407 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
408 | # CONFIG_INPUT_JOYDEV is not set | ||
409 | # CONFIG_INPUT_TSDEV is not set | ||
410 | # CONFIG_INPUT_EVDEV is not set | ||
411 | # CONFIG_INPUT_EVBUG is not set | ||
412 | |||
413 | # | ||
414 | # Input Device Drivers | ||
415 | # | ||
416 | # CONFIG_INPUT_KEYBOARD is not set | ||
417 | # CONFIG_INPUT_MOUSE is not set | ||
418 | # CONFIG_INPUT_JOYSTICK is not set | ||
419 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
420 | # CONFIG_INPUT_MISC is not set | ||
421 | |||
422 | # | ||
423 | # Hardware I/O ports | ||
424 | # | ||
425 | # CONFIG_SERIO is not set | ||
426 | # CONFIG_GAMEPORT is not set | ||
427 | |||
428 | # | ||
429 | # Character devices | ||
430 | # | ||
431 | CONFIG_VT=y | ||
432 | CONFIG_VT_CONSOLE=y | ||
433 | CONFIG_HW_CONSOLE=y | ||
434 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
435 | |||
436 | # | ||
437 | # Serial drivers | ||
438 | # | ||
439 | CONFIG_SERIAL_8250=y | ||
440 | CONFIG_SERIAL_8250_CONSOLE=y | ||
441 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
442 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
443 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
444 | |||
445 | # | ||
446 | # Non-8250 serial port support | ||
447 | # | ||
448 | CONFIG_SERIAL_CORE=y | ||
449 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
450 | CONFIG_UNIX98_PTYS=y | ||
451 | # CONFIG_LEGACY_PTYS is not set | ||
452 | |||
453 | # | ||
454 | # IPMI | ||
455 | # | ||
456 | # CONFIG_IPMI_HANDLER is not set | ||
457 | |||
458 | # | ||
459 | # Watchdog Cards | ||
460 | # | ||
461 | # CONFIG_WATCHDOG is not set | ||
462 | # CONFIG_NVRAM is not set | ||
463 | # CONFIG_GEN_RTC is not set | ||
464 | # CONFIG_DTLK is not set | ||
465 | # CONFIG_R3964 is not set | ||
466 | |||
467 | # | ||
468 | # Ftape, the floppy tape device driver | ||
469 | # | ||
470 | # CONFIG_AGP is not set | ||
471 | # CONFIG_RAW_DRIVER is not set | ||
472 | |||
473 | # | ||
474 | # TPM devices | ||
475 | # | ||
476 | # CONFIG_TCG_TPM is not set | ||
477 | # CONFIG_TELCLOCK is not set | ||
478 | |||
479 | # | ||
480 | # I2C support | ||
481 | # | ||
482 | # CONFIG_I2C is not set | ||
483 | |||
484 | # | ||
485 | # SPI support | ||
486 | # | ||
487 | # CONFIG_SPI is not set | ||
488 | # CONFIG_SPI_MASTER is not set | ||
489 | |||
490 | # | ||
491 | # Dallas's 1-wire bus | ||
492 | # | ||
493 | # CONFIG_W1 is not set | ||
494 | |||
495 | # | ||
496 | # Hardware Monitoring support | ||
497 | # | ||
498 | # CONFIG_HWMON is not set | ||
499 | # CONFIG_HWMON_VID is not set | ||
500 | |||
501 | # | ||
502 | # Misc devices | ||
503 | # | ||
504 | |||
505 | # | ||
506 | # Multimedia Capabilities Port drivers | ||
507 | # | ||
508 | |||
509 | # | ||
510 | # Multimedia devices | ||
511 | # | ||
512 | # CONFIG_VIDEO_DEV is not set | ||
513 | |||
514 | # | ||
515 | # Digital Video Broadcasting Devices | ||
516 | # | ||
517 | # CONFIG_DVB is not set | ||
518 | |||
519 | # | ||
520 | # Graphics support | ||
521 | # | ||
522 | # CONFIG_FB is not set | ||
523 | |||
524 | # | ||
525 | # Console display driver support | ||
526 | # | ||
527 | CONFIG_DUMMY_CONSOLE=y | ||
528 | |||
529 | # | ||
530 | # Sound | ||
531 | # | ||
532 | # CONFIG_SOUND is not set | ||
533 | |||
534 | # | ||
535 | # USB support | ||
536 | # | ||
537 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
538 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
539 | |||
540 | # | ||
541 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
542 | # | ||
543 | |||
544 | # | ||
545 | # USB Gadget Support | ||
546 | # | ||
547 | # CONFIG_USB_GADGET is not set | ||
548 | |||
549 | # | ||
550 | # MMC/SD Card support | ||
551 | # | ||
552 | # CONFIG_MMC is not set | ||
553 | |||
554 | # | ||
555 | # InfiniBand support | ||
556 | # | ||
557 | |||
558 | # | ||
559 | # SN Devices | ||
560 | # | ||
561 | |||
562 | # | ||
563 | # File systems | ||
564 | # | ||
565 | CONFIG_EXT2_FS=y | ||
566 | # CONFIG_EXT2_FS_XATTR is not set | ||
567 | # CONFIG_EXT2_FS_XIP is not set | ||
568 | # CONFIG_EXT3_FS is not set | ||
569 | # CONFIG_REISERFS_FS is not set | ||
570 | # CONFIG_JFS_FS is not set | ||
571 | # CONFIG_FS_POSIX_ACL is not set | ||
572 | # CONFIG_XFS_FS is not set | ||
573 | # CONFIG_OCFS2_FS is not set | ||
574 | # CONFIG_MINIX_FS is not set | ||
575 | # CONFIG_ROMFS_FS is not set | ||
576 | CONFIG_INOTIFY=y | ||
577 | # CONFIG_QUOTA is not set | ||
578 | CONFIG_DNOTIFY=y | ||
579 | # CONFIG_AUTOFS_FS is not set | ||
580 | # CONFIG_AUTOFS4_FS is not set | ||
581 | # CONFIG_FUSE_FS is not set | ||
582 | |||
583 | # | ||
584 | # CD-ROM/DVD Filesystems | ||
585 | # | ||
586 | # CONFIG_ISO9660_FS is not set | ||
587 | # CONFIG_UDF_FS is not set | ||
588 | |||
589 | # | ||
590 | # DOS/FAT/NT Filesystems | ||
591 | # | ||
592 | CONFIG_FAT_FS=y | ||
593 | CONFIG_MSDOS_FS=y | ||
594 | CONFIG_VFAT_FS=y | ||
595 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
596 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
597 | # CONFIG_NTFS_FS is not set | ||
598 | |||
599 | # | ||
600 | # Pseudo filesystems | ||
601 | # | ||
602 | CONFIG_PROC_FS=y | ||
603 | CONFIG_PROC_KCORE=y | ||
604 | CONFIG_SYSFS=y | ||
605 | CONFIG_TMPFS=y | ||
606 | # CONFIG_HUGETLB_PAGE is not set | ||
607 | CONFIG_RAMFS=y | ||
608 | # CONFIG_RELAYFS_FS is not set | ||
609 | # CONFIG_CONFIGFS_FS is not set | ||
610 | |||
611 | # | ||
612 | # Miscellaneous filesystems | ||
613 | # | ||
614 | # CONFIG_ADFS_FS is not set | ||
615 | # CONFIG_AFFS_FS is not set | ||
616 | # CONFIG_HFS_FS is not set | ||
617 | # CONFIG_HFSPLUS_FS is not set | ||
618 | # CONFIG_BEFS_FS is not set | ||
619 | # CONFIG_BFS_FS is not set | ||
620 | # CONFIG_EFS_FS is not set | ||
621 | # CONFIG_CRAMFS is not set | ||
622 | # CONFIG_VXFS_FS is not set | ||
623 | # CONFIG_HPFS_FS is not set | ||
624 | # CONFIG_QNX4FS_FS is not set | ||
625 | # CONFIG_SYSV_FS is not set | ||
626 | # CONFIG_UFS_FS is not set | ||
627 | |||
628 | # | ||
629 | # Network File Systems | ||
630 | # | ||
631 | # CONFIG_NFS_FS is not set | ||
632 | # CONFIG_NFSD is not set | ||
633 | # CONFIG_SMB_FS is not set | ||
634 | # CONFIG_CIFS is not set | ||
635 | # CONFIG_NCP_FS is not set | ||
636 | # CONFIG_CODA_FS is not set | ||
637 | # CONFIG_AFS_FS is not set | ||
638 | # CONFIG_9P_FS is not set | ||
639 | |||
640 | # | ||
641 | # Partition Types | ||
642 | # | ||
643 | # CONFIG_PARTITION_ADVANCED is not set | ||
644 | CONFIG_MSDOS_PARTITION=y | ||
645 | |||
646 | # | ||
647 | # Native Language Support | ||
648 | # | ||
649 | CONFIG_NLS=y | ||
650 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
651 | CONFIG_NLS_CODEPAGE_437=y | ||
652 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
653 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
654 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
655 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
656 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
657 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
658 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
659 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
660 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
661 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
662 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
663 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
664 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
665 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
666 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
667 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
668 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
669 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
670 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
671 | # CONFIG_NLS_ISO8859_8 is not set | ||
672 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
673 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
674 | CONFIG_NLS_ASCII=y | ||
675 | CONFIG_NLS_ISO8859_1=y | ||
676 | # CONFIG_NLS_ISO8859_2 is not set | ||
677 | # CONFIG_NLS_ISO8859_3 is not set | ||
678 | # CONFIG_NLS_ISO8859_4 is not set | ||
679 | # CONFIG_NLS_ISO8859_5 is not set | ||
680 | # CONFIG_NLS_ISO8859_6 is not set | ||
681 | # CONFIG_NLS_ISO8859_7 is not set | ||
682 | # CONFIG_NLS_ISO8859_9 is not set | ||
683 | # CONFIG_NLS_ISO8859_13 is not set | ||
684 | # CONFIG_NLS_ISO8859_14 is not set | ||
685 | # CONFIG_NLS_ISO8859_15 is not set | ||
686 | # CONFIG_NLS_KOI8_R is not set | ||
687 | # CONFIG_NLS_KOI8_U is not set | ||
688 | CONFIG_NLS_UTF8=y | ||
689 | |||
690 | # | ||
691 | # IBM 40x options | ||
692 | # | ||
693 | |||
694 | # | ||
695 | # Library routines | ||
696 | # | ||
697 | # CONFIG_CRC_CCITT is not set | ||
698 | # CONFIG_CRC16 is not set | ||
699 | CONFIG_CRC32=y | ||
700 | # CONFIG_LIBCRC32C is not set | ||
701 | # CONFIG_PROFILING is not set | ||
702 | |||
703 | # | ||
704 | # Kernel hacking | ||
705 | # | ||
706 | CONFIG_PRINTK_TIME=y | ||
707 | CONFIG_MAGIC_SYSRQ=y | ||
708 | CONFIG_DEBUG_KERNEL=y | ||
709 | CONFIG_LOG_BUF_SHIFT=14 | ||
710 | CONFIG_DETECT_SOFTLOCKUP=y | ||
711 | # CONFIG_SCHEDSTATS is not set | ||
712 | # CONFIG_DEBUG_SLAB is not set | ||
713 | CONFIG_DEBUG_MUTEXES=y | ||
714 | # CONFIG_DEBUG_SPINLOCK is not set | ||
715 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
716 | # CONFIG_DEBUG_KOBJECT is not set | ||
717 | CONFIG_DEBUG_INFO=y | ||
718 | # CONFIG_DEBUG_FS is not set | ||
719 | # CONFIG_DEBUG_VM is not set | ||
720 | CONFIG_FORCED_INLINING=y | ||
721 | # CONFIG_RCU_TORTURE_TEST is not set | ||
722 | # CONFIG_KGDB is not set | ||
723 | CONFIG_XMON=y | ||
724 | # CONFIG_BDI_SWITCH is not set | ||
725 | # CONFIG_SERIAL_TEXT_DEBUG is not set | ||
726 | |||
727 | # | ||
728 | # Security options | ||
729 | # | ||
730 | # CONFIG_KEYS is not set | ||
731 | # CONFIG_SECURITY is not set | ||
732 | |||
733 | # | ||
734 | # Cryptographic options | ||
735 | # | ||
736 | # CONFIG_CRYPTO is not set | ||
737 | |||
738 | # | ||
739 | # Hardware crypto devices | ||
740 | # | ||
diff --git a/arch/ppc/kernel/head_44x.S b/arch/ppc/kernel/head_44x.S index 677c571aa276..0d8b88219d38 100644 --- a/arch/ppc/kernel/head_44x.S +++ b/arch/ppc/kernel/head_44x.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/head_44x.S | ||
3 | * | ||
4 | * Kernel execution entry point code. | 2 | * Kernel execution entry point code. |
5 | * | 3 | * |
6 | * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> | 4 | * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> |
diff --git a/arch/ppc/kernel/head_8xx.S b/arch/ppc/kernel/head_8xx.S index c1e89ad0684d..ec53c7d65f2b 100644 --- a/arch/ppc/kernel/head_8xx.S +++ b/arch/ppc/kernel/head_8xx.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/except_8xx.S | ||
3 | * | ||
4 | * PowerPC version | 2 | * PowerPC version |
5 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 3 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
6 | * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP | 4 | * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP |
diff --git a/arch/ppc/kernel/head_fsl_booke.S b/arch/ppc/kernel/head_fsl_booke.S index 8d60fa99fc4b..dd86bbed7627 100644 --- a/arch/ppc/kernel/head_fsl_booke.S +++ b/arch/ppc/kernel/head_fsl_booke.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/head_fsl_booke.S | ||
3 | * | ||
4 | * Kernel execution entry point code. | 2 | * Kernel execution entry point code. |
5 | * | 3 | * |
6 | * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> | 4 | * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org> |
@@ -316,6 +314,7 @@ skpinv: addi r6,r6,1 /* Increment */ | |||
316 | */ | 314 | */ |
317 | lis r2,DBCR0_IDM@h | 315 | lis r2,DBCR0_IDM@h |
318 | mtspr SPRN_DBCR0,r2 | 316 | mtspr SPRN_DBCR0,r2 |
317 | isync | ||
319 | /* clear any residual debug events */ | 318 | /* clear any residual debug events */ |
320 | li r2,-1 | 319 | li r2,-1 |
321 | mtspr SPRN_DBSR,r2 | 320 | mtspr SPRN_DBSR,r2 |
@@ -1002,12 +1001,15 @@ _GLOBAL(giveup_fpu) | |||
1002 | _GLOBAL(abort) | 1001 | _GLOBAL(abort) |
1003 | li r13,0 | 1002 | li r13,0 |
1004 | mtspr SPRN_DBCR0,r13 /* disable all debug events */ | 1003 | mtspr SPRN_DBCR0,r13 /* disable all debug events */ |
1004 | isync | ||
1005 | mfmsr r13 | 1005 | mfmsr r13 |
1006 | ori r13,r13,MSR_DE@l /* Enable Debug Events */ | 1006 | ori r13,r13,MSR_DE@l /* Enable Debug Events */ |
1007 | mtmsr r13 | 1007 | mtmsr r13 |
1008 | isync | ||
1008 | mfspr r13,SPRN_DBCR0 | 1009 | mfspr r13,SPRN_DBCR0 |
1009 | lis r13,(DBCR0_IDM|DBCR0_RST_CHIP)@h | 1010 | lis r13,(DBCR0_IDM|DBCR0_RST_CHIP)@h |
1010 | mtspr SPRN_DBCR0,r13 | 1011 | mtspr SPRN_DBCR0,r13 |
1012 | isync | ||
1011 | 1013 | ||
1012 | _GLOBAL(set_context) | 1014 | _GLOBAL(set_context) |
1013 | 1015 | ||
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c index c08ab432e958..53e9deacee82 100644 --- a/arch/ppc/kernel/setup.c +++ b/arch/ppc/kernel/setup.c | |||
@@ -168,9 +168,8 @@ int show_cpuinfo(struct seq_file *m, void *v) | |||
168 | /* Show summary information */ | 168 | /* Show summary information */ |
169 | #ifdef CONFIG_SMP | 169 | #ifdef CONFIG_SMP |
170 | unsigned long bogosum = 0; | 170 | unsigned long bogosum = 0; |
171 | for (i = 0; i < NR_CPUS; ++i) | 171 | for_each_online_cpu(i) |
172 | if (cpu_online(i)) | 172 | bogosum += cpu_data[i].loops_per_jiffy; |
173 | bogosum += cpu_data[i].loops_per_jiffy; | ||
174 | seq_printf(m, "total bogomips\t: %lu.%02lu\n", | 173 | seq_printf(m, "total bogomips\t: %lu.%02lu\n", |
175 | bogosum/(500000/HZ), bogosum/(5000/HZ) % 100); | 174 | bogosum/(500000/HZ), bogosum/(5000/HZ) % 100); |
176 | #endif /* CONFIG_SMP */ | 175 | #endif /* CONFIG_SMP */ |
@@ -712,9 +711,8 @@ int __init ppc_init(void) | |||
712 | if ( ppc_md.progress ) ppc_md.progress(" ", 0xffff); | 711 | if ( ppc_md.progress ) ppc_md.progress(" ", 0xffff); |
713 | 712 | ||
714 | /* register CPU devices */ | 713 | /* register CPU devices */ |
715 | for (i = 0; i < NR_CPUS; i++) | 714 | for_each_cpu(i) |
716 | if (cpu_possible(i)) | 715 | register_cpu(&cpu_devices[i], i, NULL); |
717 | register_cpu(&cpu_devices[i], i, NULL); | ||
718 | 716 | ||
719 | /* call platform init */ | 717 | /* call platform init */ |
720 | if (ppc_md.init != NULL) { | 718 | if (ppc_md.init != NULL) { |
diff --git a/arch/ppc/kernel/smp-tbsync.c b/arch/ppc/kernel/smp-tbsync.c index 2c9cd95bcea6..6a5694fcc711 100644 --- a/arch/ppc/kernel/smp-tbsync.c +++ b/arch/ppc/kernel/smp-tbsync.c | |||
@@ -126,8 +126,7 @@ smp_generic_give_timebase( void ) | |||
126 | printk("Synchronizing timebase\n"); | 126 | printk("Synchronizing timebase\n"); |
127 | 127 | ||
128 | /* if this fails then this kernel won't work anyway... */ | 128 | /* if this fails then this kernel won't work anyway... */ |
129 | tbsync = kmalloc( sizeof(*tbsync), GFP_KERNEL ); | 129 | tbsync = kzalloc( sizeof(*tbsync), GFP_KERNEL ); |
130 | memset( tbsync, 0, sizeof(*tbsync) ); | ||
131 | mb(); | 130 | mb(); |
132 | running = 1; | 131 | running = 1; |
133 | 132 | ||
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c index 6d0a1838d94c..1c0d68026abd 100644 --- a/arch/ppc/kernel/traps.c +++ b/arch/ppc/kernel/traps.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/traps.c | ||
3 | * | ||
4 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 2 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
5 | * | 3 | * |
6 | * This program is free software; you can redistribute it and/or | 4 | * This program is free software; you can redistribute it and/or |
diff --git a/arch/ppc/lib/rheap.c b/arch/ppc/lib/rheap.c index 42c5de2c898f..31e511856dc5 100644 --- a/arch/ppc/lib/rheap.c +++ b/arch/ppc/lib/rheap.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/rheap.c | ||
3 | * | ||
4 | * A Remote Heap. Remote means that we don't touch the memory that the | 2 | * A Remote Heap. Remote means that we don't touch the memory that the |
5 | * heap points to. Normal heap implementations use the memory they manage | 3 | * heap points to. Normal heap implementations use the memory they manage |
6 | * to place their list. We cannot do that because the memory we manage may | 4 | * to place their list. We cannot do that because the memory we manage may |
diff --git a/arch/ppc/math-emu/math.c b/arch/ppc/math-emu/math.c index b7dff53a7103..589153472761 100644 --- a/arch/ppc/math-emu/math.c +++ b/arch/ppc/math-emu/math.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/math-emu/math.c | ||
3 | * | ||
4 | * Copyright (C) 1999 Eddie C. Dost (ecd@atecom.com) | 2 | * Copyright (C) 1999 Eddie C. Dost (ecd@atecom.com) |
5 | */ | 3 | */ |
6 | 4 | ||
diff --git a/arch/ppc/mm/44x_mmu.c b/arch/ppc/mm/44x_mmu.c index 3d79ce281b67..e0152a9b26e6 100644 --- a/arch/ppc/mm/44x_mmu.c +++ b/arch/ppc/mm/44x_mmu.c | |||
@@ -104,7 +104,7 @@ unsigned long __init mmu_mapin_ram(void) | |||
104 | 104 | ||
105 | /* Determine number of entries necessary to cover lowmem */ | 105 | /* Determine number of entries necessary to cover lowmem */ |
106 | pinned_tlbs = (unsigned int) | 106 | pinned_tlbs = (unsigned int) |
107 | (_ALIGN(total_lowmem, PPC44x_PIN_SIZE) >> PPC44x_PIN_SHIFT); | 107 | (_ALIGN(total_lowmem, PPC_PIN_SIZE) >> PPC44x_PIN_SHIFT); |
108 | 108 | ||
109 | /* Write upper watermark to save location */ | 109 | /* Write upper watermark to save location */ |
110 | tlb_44x_hwater = PPC44x_LOW_SLOT - pinned_tlbs; | 110 | tlb_44x_hwater = PPC44x_LOW_SLOT - pinned_tlbs; |
@@ -112,7 +112,7 @@ unsigned long __init mmu_mapin_ram(void) | |||
112 | /* If necessary, set additional pinned TLBs */ | 112 | /* If necessary, set additional pinned TLBs */ |
113 | if (pinned_tlbs > 1) | 113 | if (pinned_tlbs > 1) |
114 | for (i = (PPC44x_LOW_SLOT-(pinned_tlbs-1)); i < PPC44x_LOW_SLOT; i++) { | 114 | for (i = (PPC44x_LOW_SLOT-(pinned_tlbs-1)); i < PPC44x_LOW_SLOT; i++) { |
115 | unsigned int phys_addr = (PPC44x_LOW_SLOT-i) * PPC44x_PIN_SIZE; | 115 | unsigned int phys_addr = (PPC44x_LOW_SLOT-i) * PPC_PIN_SIZE; |
116 | ppc44x_pin_tlb(i, phys_addr+PAGE_OFFSET, phys_addr); | 116 | ppc44x_pin_tlb(i, phys_addr+PAGE_OFFSET, phys_addr); |
117 | } | 117 | } |
118 | 118 | ||
diff --git a/arch/ppc/mm/fault.c b/arch/ppc/mm/fault.c index ee5e9f25baf9..0217188ef465 100644 --- a/arch/ppc/mm/fault.c +++ b/arch/ppc/mm/fault.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/mm/fault.c | ||
3 | * | ||
4 | * PowerPC version | 2 | * PowerPC version |
5 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 3 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
6 | * | 4 | * |
diff --git a/arch/ppc/mm/hashtable.S b/arch/ppc/mm/hashtable.S index 3ec87c91343e..f09fa88db35a 100644 --- a/arch/ppc/mm/hashtable.S +++ b/arch/ppc/mm/hashtable.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/hashtable.S | ||
3 | * | ||
4 | * $Id: hashtable.S,v 1.6 1999/10/08 01:56:15 paulus Exp $ | 2 | * $Id: hashtable.S,v 1.6 1999/10/08 01:56:15 paulus Exp $ |
5 | * | 3 | * |
6 | * PowerPC version | 4 | * PowerPC version |
diff --git a/arch/ppc/platforms/4xx/Kconfig b/arch/ppc/platforms/4xx/Kconfig index d8837911bbc6..174ddbc9758b 100644 --- a/arch/ppc/platforms/4xx/Kconfig +++ b/arch/ppc/platforms/4xx/Kconfig | |||
@@ -57,6 +57,10 @@ config XILINX_ML300 | |||
57 | help | 57 | help |
58 | This option enables support for the Xilinx ML300 evaluation board. | 58 | This option enables support for the Xilinx ML300 evaluation board. |
59 | 59 | ||
60 | config XILINX_ML403 | ||
61 | bool "Xilinx-ML403" | ||
62 | help | ||
63 | This option enables support for the Xilinx ML403 evaluation board. | ||
60 | endchoice | 64 | endchoice |
61 | 65 | ||
62 | choice | 66 | choice |
@@ -172,11 +176,6 @@ config IBM_OCP | |||
172 | depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || YUCCA || OCOTEA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT | 176 | depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || YUCCA || OCOTEA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT |
173 | default y | 177 | default y |
174 | 178 | ||
175 | config XILINX_OCP | ||
176 | bool | ||
177 | depends on XILINX_ML300 | ||
178 | default y | ||
179 | |||
180 | config IBM_EMAC4 | 179 | config IBM_EMAC4 |
181 | bool | 180 | bool |
182 | depends on 440GX || 440SP || 440SPE | 181 | depends on 440GX || 440SP || 440SPE |
@@ -208,11 +207,21 @@ config 405GPR | |||
208 | depends on SYCAMORE | 207 | depends on SYCAMORE |
209 | default y | 208 | default y |
210 | 209 | ||
211 | config VIRTEX_II_PRO | 210 | config XILINX_VIRTEX_II_PRO |
212 | bool | 211 | bool |
213 | depends on XILINX_ML300 | 212 | depends on XILINX_ML300 |
214 | default y | 213 | default y |
215 | 214 | ||
215 | config XILINX_VIRTEX_4_FX | ||
216 | bool | ||
217 | depends on XILINX_ML403 | ||
218 | default y | ||
219 | |||
220 | config XILINX_VIRTEX | ||
221 | bool | ||
222 | depends on XILINX_VIRTEX_II_PRO || XILINX_VIRTEX_4_FX | ||
223 | default y | ||
224 | |||
216 | config STB03xxx | 225 | config STB03xxx |
217 | bool | 226 | bool |
218 | depends on REDWOOD_5 || REDWOOD_6 | 227 | depends on REDWOOD_5 || REDWOOD_6 |
@@ -220,7 +229,7 @@ config STB03xxx | |||
220 | 229 | ||
221 | config EMBEDDEDBOOT | 230 | config EMBEDDEDBOOT |
222 | bool | 231 | bool |
223 | depends on EP405 || XILINX_ML300 | 232 | depends on EP405 || XILINX_ML300 || XILINX_ML403 |
224 | default y | 233 | default y |
225 | 234 | ||
226 | config IBM_OPENBIOS | 235 | config IBM_OPENBIOS |
diff --git a/arch/ppc/platforms/4xx/Makefile b/arch/ppc/platforms/4xx/Makefile index c9bb61170954..a04a0d0a0f5c 100644 --- a/arch/ppc/platforms/4xx/Makefile +++ b/arch/ppc/platforms/4xx/Makefile | |||
@@ -14,6 +14,7 @@ obj-$(CONFIG_REDWOOD_6) += redwood6.o | |||
14 | obj-$(CONFIG_SYCAMORE) += sycamore.o | 14 | obj-$(CONFIG_SYCAMORE) += sycamore.o |
15 | obj-$(CONFIG_WALNUT) += walnut.o | 15 | obj-$(CONFIG_WALNUT) += walnut.o |
16 | obj-$(CONFIG_XILINX_ML300) += xilinx_ml300.o | 16 | obj-$(CONFIG_XILINX_ML300) += xilinx_ml300.o |
17 | obj-$(CONFIG_XILINX_ML403) += xilinx_ml403.o | ||
17 | 18 | ||
18 | obj-$(CONFIG_405GP) += ibm405gp.o | 19 | obj-$(CONFIG_405GP) += ibm405gp.o |
19 | obj-$(CONFIG_REDWOOD_5) += ibmstb4.o | 20 | obj-$(CONFIG_REDWOOD_5) += ibmstb4.o |
@@ -26,4 +27,5 @@ obj-$(CONFIG_440SP) += ibm440sp.o | |||
26 | obj-$(CONFIG_440SPE) += ppc440spe.o | 27 | obj-$(CONFIG_440SPE) += ppc440spe.o |
27 | obj-$(CONFIG_405EP) += ibm405ep.o | 28 | obj-$(CONFIG_405EP) += ibm405ep.o |
28 | obj-$(CONFIG_405GPR) += ibm405gpr.o | 29 | obj-$(CONFIG_405GPR) += ibm405gpr.o |
29 | obj-$(CONFIG_VIRTEX_II_PRO) += virtex-ii_pro.o | 30 | obj-$(CONFIG_XILINX_VIRTEX) += virtex.o |
31 | |||
diff --git a/arch/ppc/platforms/4xx/bamboo.c b/arch/ppc/platforms/4xx/bamboo.c index 0ec53f049338..b940cfd646c2 100644 --- a/arch/ppc/platforms/4xx/bamboo.c +++ b/arch/ppc/platforms/4xx/bamboo.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/bamboo.c | ||
3 | * | ||
4 | * Bamboo board specific routines | 2 | * Bamboo board specific routines |
5 | * | 3 | * |
6 | * Wade Farnsworth <wfarnsworth@mvista.com> | 4 | * Wade Farnsworth <wfarnsworth@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/bamboo.h b/arch/ppc/platforms/4xx/bamboo.h index 5c0192826494..31c0dd6a26cb 100644 --- a/arch/ppc/platforms/4xx/bamboo.h +++ b/arch/ppc/platforms/4xx/bamboo.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/bamboo.h | ||
3 | * | ||
4 | * Bamboo board definitions | 2 | * Bamboo board definitions |
5 | * | 3 | * |
6 | * Wade Farnsworth <wfarnsworth@mvista.com> | 4 | * Wade Farnsworth <wfarnsworth@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/bubinga.h b/arch/ppc/platforms/4xx/bubinga.h index b5380cfaf5c0..606aa9fa5caa 100644 --- a/arch/ppc/platforms/4xx/bubinga.h +++ b/arch/ppc/platforms/4xx/bubinga.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/bubinga.h | ||
3 | * | ||
4 | * Bubinga board definitions | 2 | * Bubinga board definitions |
5 | * | 3 | * |
6 | * Copyright (c) 2005 DENX Software Engineering | 4 | * Copyright (c) 2005 DENX Software Engineering |
diff --git a/arch/ppc/platforms/4xx/cpci405.c b/arch/ppc/platforms/4xx/cpci405.c index ff966773a0bf..6571e39fbe48 100644 --- a/arch/ppc/platforms/4xx/cpci405.c +++ b/arch/ppc/platforms/4xx/cpci405.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/cpci405.c | ||
3 | * | ||
4 | * Board setup routines for the esd CPCI-405 cPCI Board. | 2 | * Board setup routines for the esd CPCI-405 cPCI Board. |
5 | * | 3 | * |
6 | * Author: Stefan Roese | 4 | * Author: Stefan Roese |
diff --git a/arch/ppc/platforms/4xx/ebony.c b/arch/ppc/platforms/4xx/ebony.c index 9a828b623417..b4ecb9c79854 100644 --- a/arch/ppc/platforms/4xx/ebony.c +++ b/arch/ppc/platforms/4xx/ebony.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ebony.c | ||
3 | * | ||
4 | * Ebony board specific routines | 2 | * Ebony board specific routines |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/4xx/ebony.h b/arch/ppc/platforms/4xx/ebony.h index b91ad4272dfe..27b2e77c7c83 100644 --- a/arch/ppc/platforms/4xx/ebony.h +++ b/arch/ppc/platforms/4xx/ebony.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/ebony.h | ||
3 | * | ||
4 | * Ebony board definitions | 2 | * Ebony board definitions |
5 | * | 3 | * |
6 | * Matt Porter <mporter@mvista.com> | 4 | * Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/ep405.c b/arch/ppc/platforms/4xx/ep405.c index 26a07cdb30ec..6efa91ff9c07 100644 --- a/arch/ppc/platforms/4xx/ep405.c +++ b/arch/ppc/platforms/4xx/ep405.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ep405.c | ||
3 | * | ||
4 | * Embedded Planet 405GP board | 2 | * Embedded Planet 405GP board |
5 | * http://www.embeddedplanet.com | 3 | * http://www.embeddedplanet.com |
6 | * | 4 | * |
diff --git a/arch/ppc/platforms/4xx/ep405.h b/arch/ppc/platforms/4xx/ep405.h index ea3eb21338fb..9814fc431725 100644 --- a/arch/ppc/platforms/4xx/ep405.h +++ b/arch/ppc/platforms/4xx/ep405.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ep405.h | ||
3 | * | ||
4 | * Embedded Planet 405GP board | 2 | * Embedded Planet 405GP board |
5 | * http://www.embeddedplanet.com | 3 | * http://www.embeddedplanet.com |
6 | * | 4 | * |
diff --git a/arch/ppc/platforms/4xx/ibm405ep.c b/arch/ppc/platforms/4xx/ibm405ep.c index 093b28d27a41..55af769a6e70 100644 --- a/arch/ppc/platforms/4xx/ibm405ep.c +++ b/arch/ppc/platforms/4xx/ibm405ep.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/ibm405ep.c | ||
3 | * | ||
4 | * Support for IBM PPC 405EP processors. | 2 | * Support for IBM PPC 405EP processors. |
5 | * | 3 | * |
6 | * Author: SAW (IBM), derived from ibmnp405l.c. | 4 | * Author: SAW (IBM), derived from ibmnp405l.c. |
diff --git a/arch/ppc/platforms/4xx/ibm405ep.h b/arch/ppc/platforms/4xx/ibm405ep.h index e051e3fe8c63..fe46640de152 100644 --- a/arch/ppc/platforms/4xx/ibm405ep.h +++ b/arch/ppc/platforms/4xx/ibm405ep.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm405ep.h | ||
3 | * | ||
4 | * IBM PPC 405EP processor defines. | 2 | * IBM PPC 405EP processor defines. |
5 | * | 3 | * |
6 | * Author: SAW (IBM), derived from ibm405gp.h. | 4 | * Author: SAW (IBM), derived from ibm405gp.h. |
diff --git a/arch/ppc/platforms/4xx/ibm405gp.h b/arch/ppc/platforms/4xx/ibm405gp.h index b2b642e81af7..eaf0ef57028d 100644 --- a/arch/ppc/platforms/4xx/ibm405gp.h +++ b/arch/ppc/platforms/4xx/ibm405gp.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm405gp.h | ||
3 | * | ||
4 | * Author: Armin Kuster akuster@mvista.com | 2 | * Author: Armin Kuster akuster@mvista.com |
5 | * | 3 | * |
6 | * 2001 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2001 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/ibm405gpr.c b/arch/ppc/platforms/4xx/ibm405gpr.c index cd0d00d8e8ee..49da61f6854a 100644 --- a/arch/ppc/platforms/4xx/ibm405gpr.c +++ b/arch/ppc/platforms/4xx/ibm405gpr.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm405gpr.c | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/ibm405gpr.h b/arch/ppc/platforms/4xx/ibm405gpr.h index 45412fb4368f..e90c5dde01d3 100644 --- a/arch/ppc/platforms/4xx/ibm405gpr.h +++ b/arch/ppc/platforms/4xx/ibm405gpr.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm405gpr.h | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/ibm440ep.c b/arch/ppc/platforms/4xx/ibm440ep.c index 65ac0b9c2d05..1fed6638c81f 100644 --- a/arch/ppc/platforms/4xx/ibm440ep.c +++ b/arch/ppc/platforms/4xx/ibm440ep.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm440ep.c | ||
3 | * | ||
4 | * PPC440EP I/O descriptions | 2 | * PPC440EP I/O descriptions |
5 | * | 3 | * |
6 | * Wade Farnsworth <wfarnsworth@mvista.com> | 4 | * Wade Farnsworth <wfarnsworth@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/ibm440ep.h b/arch/ppc/platforms/4xx/ibm440ep.h index 97c80b8e3e10..61717e8a799e 100644 --- a/arch/ppc/platforms/4xx/ibm440ep.h +++ b/arch/ppc/platforms/4xx/ibm440ep.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm440ep.h | ||
3 | * | ||
4 | * PPC440EP definitions | 2 | * PPC440EP definitions |
5 | * | 3 | * |
6 | * Wade Farnsworth <wfarnsworth@mvista.com> | 4 | * Wade Farnsworth <wfarnsworth@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/ibm440gp.c b/arch/ppc/platforms/4xx/ibm440gp.c index d926245e8b3e..b67a72e5c6fe 100644 --- a/arch/ppc/platforms/4xx/ibm440gp.c +++ b/arch/ppc/platforms/4xx/ibm440gp.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm440gp.c | ||
3 | * | ||
4 | * PPC440GP I/O descriptions | 2 | * PPC440GP I/O descriptions |
5 | * | 3 | * |
6 | * Matt Porter <mporter@mvista.com> | 4 | * Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/ibm440gp.h b/arch/ppc/platforms/4xx/ibm440gp.h index ae1efc03b295..7b2763b6024f 100644 --- a/arch/ppc/platforms/4xx/ibm440gp.h +++ b/arch/ppc/platforms/4xx/ibm440gp.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm440gp.h | ||
3 | * | ||
4 | * PPC440GP definitions | 2 | * PPC440GP definitions |
5 | * | 3 | * |
6 | * Roland Dreier <roland@digitalvampire.org> | 4 | * Roland Dreier <roland@digitalvampire.org> |
diff --git a/arch/ppc/platforms/4xx/ibm440gx.c b/arch/ppc/platforms/4xx/ibm440gx.c index d24c09ee7b18..685abffcb6ce 100644 --- a/arch/ppc/platforms/4xx/ibm440gx.c +++ b/arch/ppc/platforms/4xx/ibm440gx.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm440gx.c | ||
3 | * | ||
4 | * PPC440GX I/O descriptions | 2 | * PPC440GX I/O descriptions |
5 | * | 3 | * |
6 | * Matt Porter <mporter@mvista.com> | 4 | * Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/ibm440gx.h b/arch/ppc/platforms/4xx/ibm440gx.h index 0b59d8dcd03c..070a34efe1c7 100644 --- a/arch/ppc/platforms/4xx/ibm440gx.h +++ b/arch/ppc/platforms/4xx/ibm440gx.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/ibm440gx.h | ||
3 | * | ||
4 | * PPC440GX definitions | 2 | * PPC440GX definitions |
5 | * | 3 | * |
6 | * Matt Porter <mporter@mvista.com> | 4 | * Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/ibm440sp.c b/arch/ppc/platforms/4xx/ibm440sp.c index 71a0117d3597..de8f7ac5623c 100644 --- a/arch/ppc/platforms/4xx/ibm440sp.c +++ b/arch/ppc/platforms/4xx/ibm440sp.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm440sp.c | ||
3 | * | ||
4 | * PPC440SP I/O descriptions | 2 | * PPC440SP I/O descriptions |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/4xx/ibm440sp.h b/arch/ppc/platforms/4xx/ibm440sp.h index c71e46a18b9e..77e8bb22c527 100644 --- a/arch/ppc/platforms/4xx/ibm440sp.h +++ b/arch/ppc/platforms/4xx/ibm440sp.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm440sp.h | ||
3 | * | ||
4 | * PPC440SP definitions | 2 | * PPC440SP definitions |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/4xx/ibmnp405h.c b/arch/ppc/platforms/4xx/ibmnp405h.c index a477a78f4902..f1dcb0ac15b7 100644 --- a/arch/ppc/platforms/4xx/ibmnp405h.c +++ b/arch/ppc/platforms/4xx/ibmnp405h.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibmnp405h.c | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2000-2002 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2000-2002 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/ibmnp405h.h b/arch/ppc/platforms/4xx/ibmnp405h.h index e2c2b06128c8..2c683f6aaa66 100644 --- a/arch/ppc/platforms/4xx/ibmnp405h.h +++ b/arch/ppc/platforms/4xx/ibmnp405h.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibmnp405h.h | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/ibmstb4.c b/arch/ppc/platforms/4xx/ibmstb4.c index 7e33bb635443..799a2eccccc3 100644 --- a/arch/ppc/platforms/4xx/ibmstb4.c +++ b/arch/ppc/platforms/4xx/ibmstb4.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibmstb4.c | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2000-2001 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2000-2001 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/ibmstb4.h b/arch/ppc/platforms/4xx/ibmstb4.h index 9f21d4c88a3d..9de426597351 100644 --- a/arch/ppc/platforms/4xx/ibmstb4.h +++ b/arch/ppc/platforms/4xx/ibmstb4.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibmstb4.h | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2001 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2001 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/ibmstbx25.c b/arch/ppc/platforms/4xx/ibmstbx25.c index b895b9cca57d..090ddcbecc5e 100644 --- a/arch/ppc/platforms/4xx/ibmstbx25.c +++ b/arch/ppc/platforms/4xx/ibmstbx25.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibmstbx25.c | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2000-2002 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2000-2002 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/ibmstbx25.h b/arch/ppc/platforms/4xx/ibmstbx25.h index 9a2efc366e9c..6884a49d3482 100644 --- a/arch/ppc/platforms/4xx/ibmstbx25.h +++ b/arch/ppc/platforms/4xx/ibmstbx25.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibmstbx25.h | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/luan.c b/arch/ppc/platforms/4xx/luan.c index 21d29132aebd..5c37de28e135 100644 --- a/arch/ppc/platforms/4xx/luan.c +++ b/arch/ppc/platforms/4xx/luan.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/luan.c | ||
3 | * | ||
4 | * Luan board specific routines | 2 | * Luan board specific routines |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/4xx/luan.h b/arch/ppc/platforms/4xx/luan.h index bbe7d0766db8..e0db6a810feb 100644 --- a/arch/ppc/platforms/4xx/luan.h +++ b/arch/ppc/platforms/4xx/luan.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/luan.h | ||
3 | * | ||
4 | * Luan board definitions | 2 | * Luan board definitions |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/4xx/ocotea.c b/arch/ppc/platforms/4xx/ocotea.c index 4f355b6acab2..f841972f1fa9 100644 --- a/arch/ppc/platforms/4xx/ocotea.c +++ b/arch/ppc/platforms/4xx/ocotea.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ocotea.c | ||
3 | * | ||
4 | * Ocotea board specific routines | 2 | * Ocotea board specific routines |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/4xx/ocotea.h b/arch/ppc/platforms/4xx/ocotea.h index 33251153ac5f..7c799a9ff82b 100644 --- a/arch/ppc/platforms/4xx/ocotea.h +++ b/arch/ppc/platforms/4xx/ocotea.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/ocotea.h | ||
3 | * | ||
4 | * Ocotea board definitions | 2 | * Ocotea board definitions |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/4xx/ppc440spe.c b/arch/ppc/platforms/4xx/ppc440spe.c index 6139a0b3393e..1be5d1c8e266 100644 --- a/arch/ppc/platforms/4xx/ppc440spe.c +++ b/arch/ppc/platforms/4xx/ppc440spe.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ppc440spe.c | ||
3 | * | ||
4 | * PPC440SPe I/O descriptions | 2 | * PPC440SPe I/O descriptions |
5 | * | 3 | * |
6 | * Roland Dreier <rolandd@cisco.com> | 4 | * Roland Dreier <rolandd@cisco.com> |
diff --git a/arch/ppc/platforms/4xx/ppc440spe.h b/arch/ppc/platforms/4xx/ppc440spe.h index 2216846973b8..d3a620ddcdee 100644 --- a/arch/ppc/platforms/4xx/ppc440spe.h +++ b/arch/ppc/platforms/4xx/ppc440spe.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/ibm440spe.h | ||
3 | * | ||
4 | * PPC440SPe definitions | 2 | * PPC440SPe definitions |
5 | * | 3 | * |
6 | * Roland Dreier <rolandd@cisco.com> | 4 | * Roland Dreier <rolandd@cisco.com> |
diff --git a/arch/ppc/platforms/4xx/redwood5.c b/arch/ppc/platforms/4xx/redwood5.c index 611ac861804d..53da2b4f7c24 100644 --- a/arch/ppc/platforms/4xx/redwood5.c +++ b/arch/ppc/platforms/4xx/redwood5.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/redwood5.c | ||
3 | * | ||
4 | * Support for the IBM redwood5 eval board file | 2 | * Support for the IBM redwood5 eval board file |
5 | * | 3 | * |
6 | * Author: Armin Kuster <akuster@mvista.com> | 4 | * Author: Armin Kuster <akuster@mvista.com> |
diff --git a/arch/ppc/platforms/4xx/redwood5.h b/arch/ppc/platforms/4xx/redwood5.h index 264e34fb3fbd..49edd4818970 100644 --- a/arch/ppc/platforms/4xx/redwood5.h +++ b/arch/ppc/platforms/4xx/redwood5.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/redwood5.h | ||
3 | * | ||
4 | * Macros, definitions, and data structures specific to the IBM PowerPC | 2 | * Macros, definitions, and data structures specific to the IBM PowerPC |
5 | * STB03xxx "Redwood" evaluation board. | 3 | * STB03xxx "Redwood" evaluation board. |
6 | * | 4 | * |
diff --git a/arch/ppc/platforms/4xx/redwood6.c b/arch/ppc/platforms/4xx/redwood6.c index b13116691289..41b27d106fa3 100644 --- a/arch/ppc/platforms/4xx/redwood6.c +++ b/arch/ppc/platforms/4xx/redwood6.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/redwood6.c | ||
3 | * | ||
4 | * Author: Armin Kuster <akuster@mvista.com> | 2 | * Author: Armin Kuster <akuster@mvista.com> |
5 | * | 3 | * |
6 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/4xx/redwood6.h b/arch/ppc/platforms/4xx/redwood6.h index 1814b9f5fc3a..1edcbe5c51c7 100644 --- a/arch/ppc/platforms/4xx/redwood6.h +++ b/arch/ppc/platforms/4xx/redwood6.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/redwood6.h | ||
3 | * | ||
4 | * Macros, definitions, and data structures specific to the IBM PowerPC | 2 | * Macros, definitions, and data structures specific to the IBM PowerPC |
5 | * STBx25xx "Redwood6" evaluation board. | 3 | * STBx25xx "Redwood6" evaluation board. |
6 | * | 4 | * |
diff --git a/arch/ppc/platforms/4xx/sycamore.c b/arch/ppc/platforms/4xx/sycamore.c index 281b4a2ffb96..bab31eb30687 100644 --- a/arch/ppc/platforms/4xx/sycamore.c +++ b/arch/ppc/platforms/4xx/sycamore.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/sycamore.c | ||
3 | * | ||
4 | * Architecture- / platform-specific boot-time initialization code for | 2 | * Architecture- / platform-specific boot-time initialization code for |
5 | * IBM PowerPC 4xx based boards. | 3 | * IBM PowerPC 4xx based boards. |
6 | * | 4 | * |
diff --git a/arch/ppc/platforms/4xx/sycamore.h b/arch/ppc/platforms/4xx/sycamore.h index 1cd6c824fd62..dae01620227d 100644 --- a/arch/ppc/platforms/4xx/sycamore.h +++ b/arch/ppc/platforms/4xx/sycamore.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/sycamore.h | ||
3 | * | ||
4 | * Sycamore board definitions | 2 | * Sycamore board definitions |
5 | * | 3 | * |
6 | * Copyright (c) 2005 DENX Software Engineering | 4 | * Copyright (c) 2005 DENX Software Engineering |
diff --git a/arch/ppc/platforms/4xx/virtex-ii_pro.c b/arch/ppc/platforms/4xx/virtex-ii_pro.c deleted file mode 100644 index 097cc9d5aca0..000000000000 --- a/arch/ppc/platforms/4xx/virtex-ii_pro.c +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/virtex-ii_pro.c | ||
3 | * | ||
4 | * Author: MontaVista Software, Inc. | ||
5 | * source@mvista.com | ||
6 | * | ||
7 | * 2002-2004 (c) MontaVista Software, Inc. This file is licensed under the | ||
8 | * terms of the GNU General Public License version 2. This program is licensed | ||
9 | * "as is" without any warranty of any kind, whether express or implied. | ||
10 | */ | ||
11 | |||
12 | #include <linux/config.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <asm/ocp.h> | ||
15 | #include "virtex-ii_pro.h" | ||
16 | |||
17 | /* Have OCP take care of the serial ports. */ | ||
18 | struct ocp_def core_ocp[] = { | ||
19 | #ifdef XPAR_UARTNS550_0_BASEADDR | ||
20 | { .vendor = OCP_VENDOR_XILINX, | ||
21 | .function = OCP_FUNC_16550, | ||
22 | .index = 0, | ||
23 | .paddr = XPAR_UARTNS550_0_BASEADDR, | ||
24 | .irq = XPAR_INTC_0_UARTNS550_0_VEC_ID, | ||
25 | .pm = OCP_CPM_NA | ||
26 | }, | ||
27 | #ifdef XPAR_UARTNS550_1_BASEADDR | ||
28 | { .vendor = OCP_VENDOR_XILINX, | ||
29 | .function = OCP_FUNC_16550, | ||
30 | .index = 1, | ||
31 | .paddr = XPAR_UARTNS550_1_BASEADDR, | ||
32 | .irq = XPAR_INTC_0_UARTNS550_1_VEC_ID, | ||
33 | .pm = OCP_CPM_NA | ||
34 | }, | ||
35 | #ifdef XPAR_UARTNS550_2_BASEADDR | ||
36 | { .vendor = OCP_VENDOR_XILINX, | ||
37 | .function = OCP_FUNC_16550, | ||
38 | .index = 2, | ||
39 | .paddr = XPAR_UARTNS550_2_BASEADDR, | ||
40 | .irq = XPAR_INTC_0_UARTNS550_2_VEC_ID, | ||
41 | .pm = OCP_CPM_NA | ||
42 | }, | ||
43 | #ifdef XPAR_UARTNS550_3_BASEADDR | ||
44 | { .vendor = OCP_VENDOR_XILINX, | ||
45 | .function = OCP_FUNC_16550, | ||
46 | .index = 3, | ||
47 | .paddr = XPAR_UARTNS550_3_BASEADDR, | ||
48 | .irq = XPAR_INTC_0_UARTNS550_3_VEC_ID, | ||
49 | .pm = OCP_CPM_NA | ||
50 | }, | ||
51 | #ifdef XPAR_UARTNS550_4_BASEADDR | ||
52 | #error Edit this file to add more devices. | ||
53 | #endif /* 4 */ | ||
54 | #endif /* 3 */ | ||
55 | #endif /* 2 */ | ||
56 | #endif /* 1 */ | ||
57 | #endif /* 0 */ | ||
58 | { .vendor = OCP_VENDOR_INVALID | ||
59 | } | ||
60 | }; | ||
diff --git a/arch/ppc/platforms/4xx/virtex-ii_pro.h b/arch/ppc/platforms/4xx/virtex-ii_pro.h deleted file mode 100644 index 9014c4887339..000000000000 --- a/arch/ppc/platforms/4xx/virtex-ii_pro.h +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/virtex-ii_pro.h | ||
3 | * | ||
4 | * Include file that defines the Xilinx Virtex-II Pro processor | ||
5 | * | ||
6 | * Author: MontaVista Software, Inc. | ||
7 | * source@mvista.com | ||
8 | * | ||
9 | * 2002-2004 (c) MontaVista Software, Inc. This file is licensed under the | ||
10 | * terms of the GNU General Public License version 2. This program is licensed | ||
11 | * "as is" without any warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifdef __KERNEL__ | ||
15 | #ifndef __ASM_VIRTEXIIPRO_H__ | ||
16 | #define __ASM_VIRTEXIIPRO_H__ | ||
17 | |||
18 | #include <linux/config.h> | ||
19 | #include <asm/xparameters.h> | ||
20 | |||
21 | /* serial defines */ | ||
22 | |||
23 | #define RS_TABLE_SIZE 4 /* change this and add more devices below | ||
24 | if you have more then 4 16x50 UARTs */ | ||
25 | |||
26 | #define BASE_BAUD (XPAR_UARTNS550_0_CLOCK_FREQ_HZ/16) | ||
27 | |||
28 | /* The serial ports in the Virtex-II Pro have each I/O byte in the | ||
29 | * LSByte of a word. This means that iomem_reg_shift needs to be 2 to | ||
30 | * change the byte offsets into word offsets. In addition the base | ||
31 | * addresses need to have 3 added to them to get to the LSByte. | ||
32 | */ | ||
33 | #define STD_UART_OP(num) \ | ||
34 | { 0, BASE_BAUD, 0, XPAR_INTC_0_UARTNS550_##num##_VEC_ID, \ | ||
35 | ASYNC_BOOT_AUTOCONF, \ | ||
36 | .iomem_base = (u8 *)XPAR_UARTNS550_##num##_BASEADDR + 3, \ | ||
37 | .iomem_reg_shift = 2, \ | ||
38 | .io_type = SERIAL_IO_MEM}, | ||
39 | |||
40 | #if defined(XPAR_INTC_0_UARTNS550_0_VEC_ID) | ||
41 | #define ML300_UART0 STD_UART_OP(0) | ||
42 | #else | ||
43 | #define ML300_UART0 | ||
44 | #endif | ||
45 | |||
46 | #if defined(XPAR_INTC_0_UARTNS550_1_VEC_ID) | ||
47 | #define ML300_UART1 STD_UART_OP(1) | ||
48 | #else | ||
49 | #define ML300_UART1 | ||
50 | #endif | ||
51 | |||
52 | #if defined(XPAR_INTC_0_UARTNS550_2_VEC_ID) | ||
53 | #define ML300_UART2 STD_UART_OP(2) | ||
54 | #else | ||
55 | #define ML300_UART2 | ||
56 | #endif | ||
57 | |||
58 | #if defined(XPAR_INTC_0_UARTNS550_3_VEC_ID) | ||
59 | #define ML300_UART3 STD_UART_OP(3) | ||
60 | #else | ||
61 | #define ML300_UART3 | ||
62 | #endif | ||
63 | |||
64 | #if defined(XPAR_INTC_0_UARTNS550_4_VEC_ID) | ||
65 | #error Edit this file to add more devices. | ||
66 | #elif defined(XPAR_INTC_0_UARTNS550_3_VEC_ID) | ||
67 | #define NR_SER_PORTS 4 | ||
68 | #elif defined(XPAR_INTC_0_UARTNS550_2_VEC_ID) | ||
69 | #define NR_SER_PORTS 3 | ||
70 | #elif defined(XPAR_INTC_0_UARTNS550_1_VEC_ID) | ||
71 | #define NR_SER_PORTS 2 | ||
72 | #elif defined(XPAR_INTC_0_UARTNS550_0_VEC_ID) | ||
73 | #define NR_SER_PORTS 1 | ||
74 | #else | ||
75 | #define NR_SER_PORTS 0 | ||
76 | #endif | ||
77 | |||
78 | #if defined(CONFIG_UART0_TTYS0) | ||
79 | #define SERIAL_PORT_DFNS \ | ||
80 | ML300_UART0 \ | ||
81 | ML300_UART1 \ | ||
82 | ML300_UART2 \ | ||
83 | ML300_UART3 | ||
84 | #endif | ||
85 | |||
86 | #if defined(CONFIG_UART0_TTYS1) | ||
87 | #define SERIAL_PORT_DFNS \ | ||
88 | ML300_UART1 \ | ||
89 | ML300_UART0 \ | ||
90 | ML300_UART2 \ | ||
91 | ML300_UART3 | ||
92 | #endif | ||
93 | |||
94 | #define DCRN_CPMFR_BASE 0 | ||
95 | |||
96 | #include <asm/ibm405.h> | ||
97 | |||
98 | #endif /* __ASM_VIRTEXIIPRO_H__ */ | ||
99 | #endif /* __KERNEL__ */ | ||
diff --git a/arch/ppc/platforms/4xx/virtex.c b/arch/ppc/platforms/4xx/virtex.c new file mode 100644 index 000000000000..133a83147199 --- /dev/null +++ b/arch/ppc/platforms/4xx/virtex.c | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | * Virtex-II Pro & Virtex-4 FX common infrastructure | ||
3 | * | ||
4 | * Maintainer: Grant Likely <grant.likely@secretlab.ca> | ||
5 | * | ||
6 | * Copyright 2005 Secret Lab Technologies Ltd. | ||
7 | * Copyright 2005 General Dynamics Canada Ltd. | ||
8 | * Copyright 2005 Freescale Semiconductor Inc. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License as published by the | ||
12 | * Free Software Foundation; either version 2 of the License, or (at your | ||
13 | * option) any later version. | ||
14 | */ | ||
15 | |||
16 | #include <linux/init.h> | ||
17 | #include <linux/module.h> | ||
18 | #include <linux/device.h> | ||
19 | #include <linux/serial_8250.h> | ||
20 | #include <asm/ppc_sys.h> | ||
21 | #include <platforms/4xx/virtex.h> | ||
22 | #include <platforms/4xx/xparameters/xparameters.h> | ||
23 | |||
24 | #define XPAR_UART(num) { \ | ||
25 | .mapbase = XPAR_UARTNS550_##num##_BASEADDR + 3, \ | ||
26 | .irq = XPAR_INTC_0_UARTNS550_##num##_VEC_ID, \ | ||
27 | .iotype = UPIO_MEM, \ | ||
28 | .uartclk = XPAR_UARTNS550_##num##_CLOCK_FREQ_HZ, \ | ||
29 | .flags = UPF_BOOT_AUTOCONF, \ | ||
30 | .regshift = 2, \ | ||
31 | } | ||
32 | |||
33 | struct plat_serial8250_port serial_platform_data[] = { | ||
34 | #ifdef XPAR_UARTNS550_0_BASEADDR | ||
35 | XPAR_UART(0), | ||
36 | #endif | ||
37 | #ifdef XPAR_UARTNS550_1_BASEADDR | ||
38 | XPAR_UART(1), | ||
39 | #endif | ||
40 | #ifdef XPAR_UARTNS550_2_BASEADDR | ||
41 | XPAR_UART(2), | ||
42 | #endif | ||
43 | #ifdef XPAR_UARTNS550_3_BASEADDR | ||
44 | XPAR_UART(3), | ||
45 | #endif | ||
46 | { }, /* terminated by empty record */ | ||
47 | }; | ||
48 | |||
49 | struct platform_device ppc_sys_platform_devices[] = { | ||
50 | [VIRTEX_UART] = { | ||
51 | .name = "serial8250", | ||
52 | .id = 0, | ||
53 | .dev.platform_data = serial_platform_data, | ||
54 | }, | ||
55 | }; | ||
56 | |||
diff --git a/arch/ppc/platforms/4xx/virtex.h b/arch/ppc/platforms/4xx/virtex.h new file mode 100644 index 000000000000..c14325dfd7b1 --- /dev/null +++ b/arch/ppc/platforms/4xx/virtex.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/virtex.h | ||
3 | * | ||
4 | * Include file that defines the Xilinx Virtex-II Pro processor | ||
5 | * | ||
6 | * Author: MontaVista Software, Inc. | ||
7 | * source@mvista.com | ||
8 | * | ||
9 | * 2002-2004 (c) MontaVista Software, Inc. This file is licensed under the | ||
10 | * terms of the GNU General Public License version 2. This program is licensed | ||
11 | * "as is" without any warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifdef __KERNEL__ | ||
15 | #ifndef __ASM_VIRTEX_H__ | ||
16 | #define __ASM_VIRTEX_H__ | ||
17 | |||
18 | /* serial defines */ | ||
19 | |||
20 | #include <asm/ibm405.h> | ||
21 | |||
22 | /* Ugly, ugly, ugly! BASE_BAUD defined here to keep 8250.c happy. */ | ||
23 | #if !defined(BASE_BAUD) | ||
24 | #define BASE_BAUD (0) /* dummy value; not used */ | ||
25 | #endif | ||
26 | |||
27 | /* Device type enumeration for platform bus definitions */ | ||
28 | #ifndef __ASSEMBLY__ | ||
29 | enum ppc_sys_devices { | ||
30 | VIRTEX_UART, NUM_PPC_SYS_DEVS, | ||
31 | }; | ||
32 | #endif | ||
33 | |||
34 | #endif /* __ASM_VIRTEX_H__ */ | ||
35 | #endif /* __KERNEL__ */ | ||
diff --git a/arch/ppc/platforms/4xx/walnut.c b/arch/ppc/platforms/4xx/walnut.c index 74cb33182d9f..6bd77902b9a4 100644 --- a/arch/ppc/platforms/4xx/walnut.c +++ b/arch/ppc/platforms/4xx/walnut.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/walnut.c | ||
3 | * | ||
4 | * Architecture- / platform-specific boot-time initialization code for | 2 | * Architecture- / platform-specific boot-time initialization code for |
5 | * IBM PowerPC 4xx based boards. Adapted from original | 3 | * IBM PowerPC 4xx based boards. Adapted from original |
6 | * code by Gary Thomas, Cort Dougan <cort@fsmlabs.com>, and Dan Malek | 4 | * code by Gary Thomas, Cort Dougan <cort@fsmlabs.com>, and Dan Malek |
diff --git a/arch/ppc/platforms/4xx/walnut.h b/arch/ppc/platforms/4xx/walnut.h index dcf2691698c0..f13a577f0a41 100644 --- a/arch/ppc/platforms/4xx/walnut.h +++ b/arch/ppc/platforms/4xx/walnut.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/walnut.h | ||
3 | * | ||
4 | * Walnut board definitions | 2 | * Walnut board definitions |
5 | * | 3 | * |
6 | * Copyright (c) 2005 DENX Software Engineering | 4 | * Copyright (c) 2005 DENX Software Engineering |
diff --git a/arch/ppc/platforms/4xx/xilinx_ml300.c b/arch/ppc/platforms/4xx/xilinx_ml300.c index e90d97f64f76..d97a7f269f97 100644 --- a/arch/ppc/platforms/4xx/xilinx_ml300.c +++ b/arch/ppc/platforms/4xx/xilinx_ml300.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/xilinx_ml300.c | ||
3 | * | ||
4 | * Xilinx ML300 evaluation board initialization | 2 | * Xilinx ML300 evaluation board initialization |
5 | * | 3 | * |
6 | * Author: MontaVista Software, Inc. | 4 | * Author: MontaVista Software, Inc. |
@@ -17,12 +15,14 @@ | |||
17 | #include <linux/tty.h> | 15 | #include <linux/tty.h> |
18 | #include <linux/serial.h> | 16 | #include <linux/serial.h> |
19 | #include <linux/serial_core.h> | 17 | #include <linux/serial_core.h> |
18 | #include <linux/serial_8250.h> | ||
20 | #include <linux/serialP.h> | 19 | #include <linux/serialP.h> |
21 | #include <asm/io.h> | 20 | #include <asm/io.h> |
22 | #include <asm/machdep.h> | 21 | #include <asm/machdep.h> |
23 | #include <asm/ocp.h> | 22 | #include <asm/ppc_sys.h> |
24 | 23 | ||
25 | #include <platforms/4xx/virtex-ii_pro.h> /* for NR_SER_PORTS */ | 24 | #include <syslib/gen550.h> |
25 | #include <platforms/4xx/xparameters/xparameters.h> | ||
26 | 26 | ||
27 | /* | 27 | /* |
28 | * As an overview of how the following functions (platform_init, | 28 | * As an overview of how the following functions (platform_init, |
@@ -54,6 +54,22 @@ | |||
54 | * ppc4xx_pic_init arch/ppc/syslib/xilinx_pic.c | 54 | * ppc4xx_pic_init arch/ppc/syslib/xilinx_pic.c |
55 | */ | 55 | */ |
56 | 56 | ||
57 | /* Board specifications structures */ | ||
58 | struct ppc_sys_spec *cur_ppc_sys_spec; | ||
59 | struct ppc_sys_spec ppc_sys_specs[] = { | ||
60 | { | ||
61 | /* Only one entry, always assume the same design */ | ||
62 | .ppc_sys_name = "Xilinx ML300 Reference Design", | ||
63 | .mask = 0x00000000, | ||
64 | .value = 0x00000000, | ||
65 | .num_devices = 1, | ||
66 | .device_list = (enum ppc_sys_devices[]) | ||
67 | { | ||
68 | VIRTEX_UART, | ||
69 | }, | ||
70 | }, | ||
71 | }; | ||
72 | |||
57 | #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR) | 73 | #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR) |
58 | 74 | ||
59 | static volatile unsigned *powerdown_base = | 75 | static volatile unsigned *powerdown_base = |
@@ -80,28 +96,39 @@ ml300_map_io(void) | |||
80 | #endif | 96 | #endif |
81 | } | 97 | } |
82 | 98 | ||
99 | /* Early serial support functions */ | ||
83 | static void __init | 100 | static void __init |
101 | ml300_early_serial_init(int num, struct plat_serial8250_port *pdata) | ||
102 | { | ||
103 | #if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) | ||
104 | struct uart_port serial_req; | ||
105 | |||
106 | memset(&serial_req, 0, sizeof(serial_req)); | ||
107 | serial_req.mapbase = pdata->mapbase; | ||
108 | serial_req.membase = pdata->membase; | ||
109 | serial_req.irq = pdata->irq; | ||
110 | serial_req.uartclk = pdata->uartclk; | ||
111 | serial_req.regshift = pdata->regshift; | ||
112 | serial_req.iotype = pdata->iotype; | ||
113 | serial_req.flags = pdata->flags; | ||
114 | gen550_init(num, &serial_req); | ||
115 | #endif | ||
116 | } | ||
117 | |||
118 | void __init | ||
84 | ml300_early_serial_map(void) | 119 | ml300_early_serial_map(void) |
85 | { | 120 | { |
86 | #ifdef CONFIG_SERIAL_8250 | 121 | #ifdef CONFIG_SERIAL_8250 |
87 | struct serial_state old_ports[] = { SERIAL_PORT_DFNS }; | 122 | struct plat_serial8250_port *pdata; |
88 | struct uart_port port; | 123 | int i = 0; |
89 | int i; | 124 | |
90 | 125 | pdata = (struct plat_serial8250_port *) ppc_sys_get_pdata(VIRTEX_UART); | |
91 | /* Setup ioremapped serial port access */ | 126 | while(pdata && pdata->flags) |
92 | for (i = 0; i < ARRAY_SIZE(old_ports); i++ ) { | 127 | { |
93 | memset(&port, 0, sizeof(port)); | 128 | pdata->membase = ioremap(pdata->mapbase, 0x100); |
94 | port.membase = ioremap((phys_addr_t)(old_ports[i].iomem_base), 16); | 129 | ml300_early_serial_init(i, pdata); |
95 | port.irq = old_ports[i].irq; | 130 | pdata++; |
96 | port.uartclk = old_ports[i].baud_base * 16; | 131 | i++; |
97 | port.regshift = old_ports[i].iomem_reg_shift; | ||
98 | port.iotype = UPIO_MEM; | ||
99 | port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; | ||
100 | port.line = i; | ||
101 | |||
102 | if (early_serial_setup(&port) != 0) { | ||
103 | printk("Early serial init of port %d failed\n", i); | ||
104 | } | ||
105 | } | 132 | } |
106 | #endif /* CONFIG_SERIAL_8250 */ | 133 | #endif /* CONFIG_SERIAL_8250 */ |
107 | } | 134 | } |
@@ -109,9 +136,8 @@ ml300_early_serial_map(void) | |||
109 | void __init | 136 | void __init |
110 | ml300_setup_arch(void) | 137 | ml300_setup_arch(void) |
111 | { | 138 | { |
112 | ppc4xx_setup_arch(); /* calls ppc4xx_find_bridges() */ | ||
113 | |||
114 | ml300_early_serial_map(); | 139 | ml300_early_serial_map(); |
140 | ppc4xx_setup_arch(); /* calls ppc4xx_find_bridges() */ | ||
115 | 141 | ||
116 | /* Identify the system */ | 142 | /* Identify the system */ |
117 | printk(KERN_INFO "Xilinx Virtex-II Pro port\n"); | 143 | printk(KERN_INFO "Xilinx Virtex-II Pro port\n"); |
@@ -131,6 +157,8 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
131 | { | 157 | { |
132 | ppc4xx_init(r3, r4, r5, r6, r7); | 158 | ppc4xx_init(r3, r4, r5, r6, r7); |
133 | 159 | ||
160 | identify_ppc_sys_by_id(mfspr(SPRN_PVR)); | ||
161 | |||
134 | ppc_md.setup_arch = ml300_setup_arch; | 162 | ppc_md.setup_arch = ml300_setup_arch; |
135 | ppc_md.setup_io_mappings = ml300_map_io; | 163 | ppc_md.setup_io_mappings = ml300_map_io; |
136 | ppc_md.init_IRQ = ml300_init_irq; | 164 | ppc_md.init_IRQ = ml300_init_irq; |
diff --git a/arch/ppc/platforms/4xx/xilinx_ml300.h b/arch/ppc/platforms/4xx/xilinx_ml300.h index f8c588412336..3d57332ba820 100644 --- a/arch/ppc/platforms/4xx/xilinx_ml300.h +++ b/arch/ppc/platforms/4xx/xilinx_ml300.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/xilinx_ml300.h | ||
3 | * | ||
4 | * Include file that defines the Xilinx ML300 evaluation board | 2 | * Include file that defines the Xilinx ML300 evaluation board |
5 | * | 3 | * |
6 | * Author: MontaVista Software, Inc. | 4 | * Author: MontaVista Software, Inc. |
@@ -16,7 +14,7 @@ | |||
16 | #define __ASM_XILINX_ML300_H__ | 14 | #define __ASM_XILINX_ML300_H__ |
17 | 15 | ||
18 | /* ML300 has a Xilinx Virtex-II Pro processor */ | 16 | /* ML300 has a Xilinx Virtex-II Pro processor */ |
19 | #include <platforms/4xx/virtex-ii_pro.h> | 17 | #include <platforms/4xx/virtex.h> |
20 | 18 | ||
21 | #ifndef __ASSEMBLY__ | 19 | #ifndef __ASSEMBLY__ |
22 | 20 | ||
@@ -41,7 +39,7 @@ typedef struct board_info { | |||
41 | #define PPC4xx_ONB_IO_VADDR 0u | 39 | #define PPC4xx_ONB_IO_VADDR 0u |
42 | #define PPC4xx_ONB_IO_SIZE 0u | 40 | #define PPC4xx_ONB_IO_SIZE 0u |
43 | 41 | ||
44 | #define PPC4xx_MACHINE_NAME "Xilinx ML300" | 42 | #define PPC4xx_MACHINE_NAME "Xilinx ML300 Reference System" |
45 | 43 | ||
46 | #endif /* __ASM_XILINX_ML300_H__ */ | 44 | #endif /* __ASM_XILINX_ML300_H__ */ |
47 | #endif /* __KERNEL__ */ | 45 | #endif /* __KERNEL__ */ |
diff --git a/arch/ppc/platforms/4xx/xilinx_ml403.c b/arch/ppc/platforms/4xx/xilinx_ml403.c new file mode 100644 index 000000000000..4c0c7e4c1114 --- /dev/null +++ b/arch/ppc/platforms/4xx/xilinx_ml403.c | |||
@@ -0,0 +1,177 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/xilinx_ml403.c | ||
3 | * | ||
4 | * Xilinx ML403 evaluation board initialization | ||
5 | * | ||
6 | * Author: Grant Likely <grant.likely@secretlab.ca> | ||
7 | * | ||
8 | * 2005 (c) Secret Lab Technologies Ltd. | ||
9 | * 2002-2004 (c) MontaVista Software, Inc. | ||
10 | * | ||
11 | * This file is licensed under the terms of the GNU General Public License | ||
12 | * version 2. This program is licensed "as is" without any warranty of any | ||
13 | * kind, whether express or implied. | ||
14 | */ | ||
15 | |||
16 | #include <linux/config.h> | ||
17 | #include <linux/init.h> | ||
18 | #include <linux/irq.h> | ||
19 | #include <linux/tty.h> | ||
20 | #include <linux/serial.h> | ||
21 | #include <linux/serial_core.h> | ||
22 | #include <linux/serial_8250.h> | ||
23 | #include <linux/serialP.h> | ||
24 | #include <asm/io.h> | ||
25 | #include <asm/machdep.h> | ||
26 | #include <asm/ppc_sys.h> | ||
27 | |||
28 | #include <syslib/gen550.h> | ||
29 | #include <platforms/4xx/xparameters/xparameters.h> | ||
30 | |||
31 | /* | ||
32 | * As an overview of how the following functions (platform_init, | ||
33 | * ml403_map_io, ml403_setup_arch and ml403_init_IRQ) fit into the | ||
34 | * kernel startup procedure, here's a call tree: | ||
35 | * | ||
36 | * start_here arch/ppc/kernel/head_4xx.S | ||
37 | * early_init arch/ppc/kernel/setup.c | ||
38 | * machine_init arch/ppc/kernel/setup.c | ||
39 | * platform_init this file | ||
40 | * ppc4xx_init arch/ppc/syslib/ppc4xx_setup.c | ||
41 | * parse_bootinfo | ||
42 | * find_bootinfo | ||
43 | * "setup some default ppc_md pointers" | ||
44 | * MMU_init arch/ppc/mm/init.c | ||
45 | * *ppc_md.setup_io_mappings == ml403_map_io this file | ||
46 | * ppc4xx_map_io arch/ppc/syslib/ppc4xx_setup.c | ||
47 | * start_kernel init/main.c | ||
48 | * setup_arch arch/ppc/kernel/setup.c | ||
49 | * #if defined(CONFIG_KGDB) | ||
50 | * *ppc_md.kgdb_map_scc() == gen550_kgdb_map_scc | ||
51 | * #endif | ||
52 | * *ppc_md.setup_arch == ml403_setup_arch this file | ||
53 | * ppc4xx_setup_arch arch/ppc/syslib/ppc4xx_setup.c | ||
54 | * ppc4xx_find_bridges arch/ppc/syslib/ppc405_pci.c | ||
55 | * init_IRQ arch/ppc/kernel/irq.c | ||
56 | * *ppc_md.init_IRQ == ml403_init_IRQ this file | ||
57 | * ppc4xx_init_IRQ arch/ppc/syslib/ppc4xx_setup.c | ||
58 | * ppc4xx_pic_init arch/ppc/syslib/xilinx_pic.c | ||
59 | */ | ||
60 | |||
61 | /* Board specifications structures */ | ||
62 | struct ppc_sys_spec *cur_ppc_sys_spec; | ||
63 | struct ppc_sys_spec ppc_sys_specs[] = { | ||
64 | { | ||
65 | /* Only one entry, always assume the same design */ | ||
66 | .ppc_sys_name = "Xilinx ML403 Reference Design", | ||
67 | .mask = 0x00000000, | ||
68 | .value = 0x00000000, | ||
69 | .num_devices = 1, | ||
70 | .device_list = (enum ppc_sys_devices[]) | ||
71 | { | ||
72 | VIRTEX_UART, | ||
73 | }, | ||
74 | }, | ||
75 | }; | ||
76 | |||
77 | #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR) | ||
78 | |||
79 | static volatile unsigned *powerdown_base = | ||
80 | (volatile unsigned *) XPAR_POWER_0_POWERDOWN_BASEADDR; | ||
81 | |||
82 | static void | ||
83 | xilinx_power_off(void) | ||
84 | { | ||
85 | local_irq_disable(); | ||
86 | out_be32(powerdown_base, XPAR_POWER_0_POWERDOWN_VALUE); | ||
87 | while (1) ; | ||
88 | } | ||
89 | #endif | ||
90 | |||
91 | void __init | ||
92 | ml403_map_io(void) | ||
93 | { | ||
94 | ppc4xx_map_io(); | ||
95 | |||
96 | #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR) | ||
97 | powerdown_base = ioremap((unsigned long) powerdown_base, | ||
98 | XPAR_POWER_0_POWERDOWN_HIGHADDR - | ||
99 | XPAR_POWER_0_POWERDOWN_BASEADDR + 1); | ||
100 | #endif | ||
101 | } | ||
102 | |||
103 | /* Early serial support functions */ | ||
104 | static void __init | ||
105 | ml403_early_serial_init(int num, struct plat_serial8250_port *pdata) | ||
106 | { | ||
107 | #if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) | ||
108 | struct uart_port serial_req; | ||
109 | |||
110 | memset(&serial_req, 0, sizeof(serial_req)); | ||
111 | serial_req.mapbase = pdata->mapbase; | ||
112 | serial_req.membase = pdata->membase; | ||
113 | serial_req.irq = pdata->irq; | ||
114 | serial_req.uartclk = pdata->uartclk; | ||
115 | serial_req.regshift = pdata->regshift; | ||
116 | serial_req.iotype = pdata->iotype; | ||
117 | serial_req.flags = pdata->flags; | ||
118 | gen550_init(num, &serial_req); | ||
119 | #endif | ||
120 | } | ||
121 | |||
122 | void __init | ||
123 | ml403_early_serial_map(void) | ||
124 | { | ||
125 | #ifdef CONFIG_SERIAL_8250 | ||
126 | struct plat_serial8250_port *pdata; | ||
127 | int i = 0; | ||
128 | |||
129 | pdata = (struct plat_serial8250_port *) ppc_sys_get_pdata(VIRTEX_UART); | ||
130 | while(pdata && pdata->flags) | ||
131 | { | ||
132 | pdata->membase = ioremap(pdata->mapbase, 0x100); | ||
133 | ml403_early_serial_init(i, pdata); | ||
134 | pdata++; | ||
135 | i++; | ||
136 | } | ||
137 | #endif /* CONFIG_SERIAL_8250 */ | ||
138 | } | ||
139 | |||
140 | void __init | ||
141 | ml403_setup_arch(void) | ||
142 | { | ||
143 | ml403_early_serial_map(); | ||
144 | ppc4xx_setup_arch(); /* calls ppc4xx_find_bridges() */ | ||
145 | |||
146 | /* Identify the system */ | ||
147 | printk(KERN_INFO "Xilinx ML403 Reference System (Virtex-4 FX)\n"); | ||
148 | } | ||
149 | |||
150 | /* Called after board_setup_irq from ppc4xx_init_IRQ(). */ | ||
151 | void __init | ||
152 | ml403_init_irq(void) | ||
153 | { | ||
154 | ppc4xx_init_IRQ(); | ||
155 | } | ||
156 | |||
157 | void __init | ||
158 | platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
159 | unsigned long r6, unsigned long r7) | ||
160 | { | ||
161 | ppc4xx_init(r3, r4, r5, r6, r7); | ||
162 | |||
163 | identify_ppc_sys_by_id(mfspr(SPRN_PVR)); | ||
164 | |||
165 | ppc_md.setup_arch = ml403_setup_arch; | ||
166 | ppc_md.setup_io_mappings = ml403_map_io; | ||
167 | ppc_md.init_IRQ = ml403_init_irq; | ||
168 | |||
169 | #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR) | ||
170 | ppc_md.power_off = xilinx_power_off; | ||
171 | #endif | ||
172 | |||
173 | #ifdef CONFIG_KGDB | ||
174 | ppc_md.early_serial_map = ml403_early_serial_map; | ||
175 | #endif | ||
176 | } | ||
177 | |||
diff --git a/arch/ppc/platforms/4xx/xilinx_ml403.h b/arch/ppc/platforms/4xx/xilinx_ml403.h new file mode 100644 index 000000000000..473596959902 --- /dev/null +++ b/arch/ppc/platforms/4xx/xilinx_ml403.h | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/xilinx_ml403.h | ||
3 | * | ||
4 | * Include file that defines the Xilinx ML403 reference design | ||
5 | * | ||
6 | * Author: Grant Likely <grant.likely@secretlab.ca> | ||
7 | * | ||
8 | * 2005 (c) Secret Lab Technologies Ltd. | ||
9 | * 2002-2004 (c) MontaVista Software, Inc. | ||
10 | * | ||
11 | * This file is licensed under the terms of the GNU General Public License | ||
12 | * version 2. This program is licensed "as is" without any warranty of any | ||
13 | * kind, whether express or implied. | ||
14 | */ | ||
15 | |||
16 | #ifdef __KERNEL__ | ||
17 | #ifndef __ASM_XILINX_ML403_H__ | ||
18 | #define __ASM_XILINX_ML403_H__ | ||
19 | |||
20 | /* ML403 has a Xilinx Virtex-4 FPGA with a PPC405 hard core */ | ||
21 | #include <platforms/4xx/virtex.h> | ||
22 | |||
23 | #ifndef __ASSEMBLY__ | ||
24 | |||
25 | #include <linux/types.h> | ||
26 | |||
27 | typedef struct board_info { | ||
28 | unsigned int bi_memsize; /* DRAM installed, in bytes */ | ||
29 | unsigned char bi_enetaddr[6]; /* Local Ethernet MAC address */ | ||
30 | unsigned int bi_intfreq; /* Processor speed, in Hz */ | ||
31 | unsigned int bi_busfreq; /* PLB Bus speed, in Hz */ | ||
32 | unsigned int bi_pci_busfreq; /* PCI Bus speed, in Hz */ | ||
33 | } bd_t; | ||
34 | |||
35 | /* Some 4xx parts use a different timebase frequency from the internal clock. | ||
36 | */ | ||
37 | #define bi_tbfreq bi_intfreq | ||
38 | |||
39 | #endif /* !__ASSEMBLY__ */ | ||
40 | |||
41 | /* We don't need anything mapped. Size of zero will accomplish that. */ | ||
42 | #define PPC4xx_ONB_IO_PADDR 0u | ||
43 | #define PPC4xx_ONB_IO_VADDR 0u | ||
44 | #define PPC4xx_ONB_IO_SIZE 0u | ||
45 | |||
46 | #define PPC4xx_MACHINE_NAME "Xilinx ML403 Reference Design" | ||
47 | |||
48 | #endif /* __ASM_XILINX_ML403_H__ */ | ||
49 | #endif /* __KERNEL__ */ | ||
diff --git a/arch/ppc/platforms/4xx/xparameters/xparameters.h b/arch/ppc/platforms/4xx/xparameters/xparameters.h new file mode 100644 index 000000000000..4cf21f256356 --- /dev/null +++ b/arch/ppc/platforms/4xx/xparameters/xparameters.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * include/asm-ppc/xparameters.h | ||
3 | * | ||
4 | * This file includes the correct xparameters.h for the CONFIG'ed board plus | ||
5 | * fixups to translate board specific XPAR values to a common set of names | ||
6 | * | ||
7 | * Author: MontaVista Software, Inc. | ||
8 | * source@mvista.com | ||
9 | * | ||
10 | * 2004 (c) MontaVista Software, Inc. This file is licensed under the terms | ||
11 | * of the GNU General Public License version 2. This program is licensed | ||
12 | * "as is" without any warranty of any kind, whether express or implied. | ||
13 | */ | ||
14 | |||
15 | #include <linux/config.h> | ||
16 | |||
17 | #if defined(CONFIG_XILINX_ML300) | ||
18 | #include "xparameters_ml300.h" | ||
19 | #elif defined(CONFIG_XILINX_ML403) | ||
20 | #include "xparameters_ml403.h" | ||
21 | #else | ||
22 | /* Add other board xparameter includes here before the #else */ | ||
23 | #error No xparameters_*.h file included | ||
24 | #endif | ||
25 | |||
26 | #ifndef SERIAL_PORT_DFNS | ||
27 | /* zImage serial port definitions */ | ||
28 | #define RS_TABLE_SIZE 1 | ||
29 | #define SERIAL_PORT_DFNS { \ | ||
30 | .baud_base = XPAR_UARTNS550_0_CLOCK_FREQ_HZ/16, \ | ||
31 | .irq = XPAR_INTC_0_UARTNS550_0_VEC_ID, \ | ||
32 | .flags = ASYNC_BOOT_AUTOCONF, \ | ||
33 | .iomem_base = (u8 *)XPAR_UARTNS550_0_BASEADDR + 3, \ | ||
34 | .iomem_reg_shift = 2, \ | ||
35 | .io_type = SERIAL_IO_MEM, \ | ||
36 | }, | ||
37 | #endif | ||
diff --git a/arch/ppc/platforms/4xx/xparameters/xparameters_ml403.h b/arch/ppc/platforms/4xx/xparameters/xparameters_ml403.h new file mode 100644 index 000000000000..5cacdcb3964d --- /dev/null +++ b/arch/ppc/platforms/4xx/xparameters/xparameters_ml403.h | |||
@@ -0,0 +1,243 @@ | |||
1 | |||
2 | /******************************************************************* | ||
3 | * | ||
4 | * CAUTION: This file is automatically generated by libgen. | ||
5 | * Version: Xilinx EDK 7.1.2 EDK_H.12.5.1 | ||
6 | * DO NOT EDIT. | ||
7 | * | ||
8 | * Copyright (c) 2005 Xilinx, Inc. All rights reserved. | ||
9 | * | ||
10 | * Description: Driver parameters | ||
11 | * | ||
12 | *******************************************************************/ | ||
13 | |||
14 | #define XPAR_PLB_BRAM_IF_CNTLR_0_BASEADDR 0xFFFF0000 | ||
15 | #define XPAR_PLB_BRAM_IF_CNTLR_0_HIGHADDR 0xFFFFFFFF | ||
16 | |||
17 | /******************************************************************/ | ||
18 | |||
19 | #define XPAR_OPB_EMC_0_MEM0_BASEADDR 0x20000000 | ||
20 | #define XPAR_OPB_EMC_0_MEM0_HIGHADDR 0x200FFFFF | ||
21 | #define XPAR_OPB_EMC_0_MEM1_BASEADDR 0x28000000 | ||
22 | #define XPAR_OPB_EMC_0_MEM1_HIGHADDR 0x287FFFFF | ||
23 | #define XPAR_OPB_AC97_CONTROLLER_REF_0_BASEADDR 0xA6000000 | ||
24 | #define XPAR_OPB_AC97_CONTROLLER_REF_0_HIGHADDR 0xA60000FF | ||
25 | #define XPAR_OPB_EMC_USB_0_MEM0_BASEADDR 0xA5000000 | ||
26 | #define XPAR_OPB_EMC_USB_0_MEM0_HIGHADDR 0xA50000FF | ||
27 | #define XPAR_PLB_DDR_0_MEM0_BASEADDR 0x00000000 | ||
28 | #define XPAR_PLB_DDR_0_MEM0_HIGHADDR 0x0FFFFFFF | ||
29 | |||
30 | /******************************************************************/ | ||
31 | |||
32 | #define XPAR_XEMAC_NUM_INSTANCES 1 | ||
33 | #define XPAR_OPB_ETHERNET_0_BASEADDR 0x60000000 | ||
34 | #define XPAR_OPB_ETHERNET_0_HIGHADDR 0x60003FFF | ||
35 | #define XPAR_OPB_ETHERNET_0_DEVICE_ID 0 | ||
36 | #define XPAR_OPB_ETHERNET_0_ERR_COUNT_EXIST 1 | ||
37 | #define XPAR_OPB_ETHERNET_0_DMA_PRESENT 1 | ||
38 | #define XPAR_OPB_ETHERNET_0_MII_EXIST 1 | ||
39 | |||
40 | /******************************************************************/ | ||
41 | |||
42 | #define XPAR_XUARTNS550_NUM_INSTANCES 1 | ||
43 | #define XPAR_XUARTNS550_CLOCK_HZ 100000000 | ||
44 | #define XPAR_OPB_UART16550_0_BASEADDR 0xA0000000 | ||
45 | #define XPAR_OPB_UART16550_0_HIGHADDR 0xA0001FFF | ||
46 | #define XPAR_OPB_UART16550_0_DEVICE_ID 0 | ||
47 | |||
48 | /******************************************************************/ | ||
49 | |||
50 | #define XPAR_XGPIO_NUM_INSTANCES 3 | ||
51 | #define XPAR_OPB_GPIO_0_BASEADDR 0x90000000 | ||
52 | #define XPAR_OPB_GPIO_0_HIGHADDR 0x900001FF | ||
53 | #define XPAR_OPB_GPIO_0_DEVICE_ID 0 | ||
54 | #define XPAR_OPB_GPIO_0_INTERRUPT_PRESENT 0 | ||
55 | #define XPAR_OPB_GPIO_0_IS_DUAL 1 | ||
56 | #define XPAR_OPB_GPIO_EXP_HDR_0_BASEADDR 0x90001000 | ||
57 | #define XPAR_OPB_GPIO_EXP_HDR_0_HIGHADDR 0x900011FF | ||
58 | #define XPAR_OPB_GPIO_EXP_HDR_0_DEVICE_ID 1 | ||
59 | #define XPAR_OPB_GPIO_EXP_HDR_0_INTERRUPT_PRESENT 0 | ||
60 | #define XPAR_OPB_GPIO_EXP_HDR_0_IS_DUAL 1 | ||
61 | #define XPAR_OPB_GPIO_CHAR_LCD_0_BASEADDR 0x90002000 | ||
62 | #define XPAR_OPB_GPIO_CHAR_LCD_0_HIGHADDR 0x900021FF | ||
63 | #define XPAR_OPB_GPIO_CHAR_LCD_0_DEVICE_ID 2 | ||
64 | #define XPAR_OPB_GPIO_CHAR_LCD_0_INTERRUPT_PRESENT 0 | ||
65 | #define XPAR_OPB_GPIO_CHAR_LCD_0_IS_DUAL 0 | ||
66 | |||
67 | /******************************************************************/ | ||
68 | |||
69 | #define XPAR_XPS2_NUM_INSTANCES 2 | ||
70 | #define XPAR_OPB_PS2_DUAL_REF_0_DEVICE_ID_0 0 | ||
71 | #define XPAR_OPB_PS2_DUAL_REF_0_BASEADDR_0 0xA9000000 | ||
72 | #define XPAR_OPB_PS2_DUAL_REF_0_HIGHADDR_0 (0xA9000000+0x3F) | ||
73 | #define XPAR_OPB_PS2_DUAL_REF_0_DEVICE_ID_1 1 | ||
74 | #define XPAR_OPB_PS2_DUAL_REF_0_BASEADDR_1 (0xA9000000+0x1000) | ||
75 | #define XPAR_OPB_PS2_DUAL_REF_0_HIGHADDR_1 (0xA9000000+0x103F) | ||
76 | |||
77 | /******************************************************************/ | ||
78 | |||
79 | #define XPAR_XIIC_NUM_INSTANCES 1 | ||
80 | #define XPAR_OPB_IIC_0_BASEADDR 0xA8000000 | ||
81 | #define XPAR_OPB_IIC_0_HIGHADDR 0xA80001FF | ||
82 | #define XPAR_OPB_IIC_0_DEVICE_ID 0 | ||
83 | #define XPAR_OPB_IIC_0_TEN_BIT_ADR 0 | ||
84 | #define XPAR_OPB_IIC_0_GPO_WIDTH 1 | ||
85 | |||
86 | /******************************************************************/ | ||
87 | |||
88 | #define XPAR_INTC_MAX_NUM_INTR_INPUTS 10 | ||
89 | #define XPAR_XINTC_HAS_IPR 1 | ||
90 | #define XPAR_XINTC_USE_DCR 0 | ||
91 | #define XPAR_XINTC_NUM_INSTANCES 1 | ||
92 | #define XPAR_OPB_INTC_0_BASEADDR 0xD1000FC0 | ||
93 | #define XPAR_OPB_INTC_0_HIGHADDR 0xD1000FDF | ||
94 | #define XPAR_OPB_INTC_0_DEVICE_ID 0 | ||
95 | #define XPAR_OPB_INTC_0_KIND_OF_INTR 0x00000000 | ||
96 | |||
97 | /******************************************************************/ | ||
98 | |||
99 | #define XPAR_INTC_SINGLE_BASEADDR 0xD1000FC0 | ||
100 | #define XPAR_INTC_SINGLE_HIGHADDR 0xD1000FDF | ||
101 | #define XPAR_INTC_SINGLE_DEVICE_ID XPAR_OPB_INTC_0_DEVICE_ID | ||
102 | #define XPAR_OPB_ETHERNET_0_IP2INTC_IRPT_MASK 0X000001 | ||
103 | #define XPAR_OPB_INTC_0_OPB_ETHERNET_0_IP2INTC_IRPT_INTR 0 | ||
104 | #define XPAR_SYSTEM_USB_HPI_INT_MASK 0X000002 | ||
105 | #define XPAR_OPB_INTC_0_SYSTEM_USB_HPI_INT_INTR 1 | ||
106 | #define XPAR_MISC_LOGIC_0_PHY_MII_INT_MASK 0X000004 | ||
107 | #define XPAR_OPB_INTC_0_MISC_LOGIC_0_PHY_MII_INT_INTR 2 | ||
108 | #define XPAR_OPB_SYSACE_0_SYSACE_IRQ_MASK 0X000008 | ||
109 | #define XPAR_OPB_INTC_0_OPB_SYSACE_0_SYSACE_IRQ_INTR 3 | ||
110 | #define XPAR_OPB_AC97_CONTROLLER_REF_0_RECORD_INTERRUPT_MASK 0X000010 | ||
111 | #define XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_0_RECORD_INTERRUPT_INTR 4 | ||
112 | #define XPAR_OPB_AC97_CONTROLLER_REF_0_PLAYBACK_INTERRUPT_MASK 0X000020 | ||
113 | #define XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_0_PLAYBACK_INTERRUPT_INTR 5 | ||
114 | #define XPAR_OPB_IIC_0_IP2INTC_IRPT_MASK 0X000040 | ||
115 | #define XPAR_OPB_INTC_0_OPB_IIC_0_IP2INTC_IRPT_INTR 6 | ||
116 | #define XPAR_OPB_PS2_DUAL_REF_0_SYS_INTR2_MASK 0X000080 | ||
117 | #define XPAR_OPB_INTC_0_OPB_PS2_DUAL_REF_0_SYS_INTR2_INTR 7 | ||
118 | #define XPAR_OPB_PS2_DUAL_REF_0_SYS_INTR1_MASK 0X000100 | ||
119 | #define XPAR_OPB_INTC_0_OPB_PS2_DUAL_REF_0_SYS_INTR1_INTR 8 | ||
120 | #define XPAR_OPB_UART16550_0_IP2INTC_IRPT_MASK 0X000200 | ||
121 | #define XPAR_OPB_INTC_0_OPB_UART16550_0_IP2INTC_IRPT_INTR 9 | ||
122 | |||
123 | /******************************************************************/ | ||
124 | |||
125 | #define XPAR_XTFT_NUM_INSTANCES 1 | ||
126 | #define XPAR_PLB_TFT_CNTLR_REF_0_DCR_BASEADDR 0xD0000200 | ||
127 | #define XPAR_PLB_TFT_CNTLR_REF_0_DCR_HIGHADDR 0xD0000207 | ||
128 | #define XPAR_PLB_TFT_CNTLR_REF_0_DEVICE_ID 0 | ||
129 | |||
130 | /******************************************************************/ | ||
131 | |||
132 | #define XPAR_XSYSACE_MEM_WIDTH 16 | ||
133 | #define XPAR_XSYSACE_NUM_INSTANCES 1 | ||
134 | #define XPAR_OPB_SYSACE_0_BASEADDR 0xCF000000 | ||
135 | #define XPAR_OPB_SYSACE_0_HIGHADDR 0xCF0001FF | ||
136 | #define XPAR_OPB_SYSACE_0_DEVICE_ID 0 | ||
137 | #define XPAR_OPB_SYSACE_0_MEM_WIDTH 16 | ||
138 | |||
139 | /******************************************************************/ | ||
140 | |||
141 | #define XPAR_CPU_PPC405_CORE_CLOCK_FREQ_HZ 300000000 | ||
142 | |||
143 | /******************************************************************/ | ||
144 | |||
145 | |||
146 | /******************************************************************/ | ||
147 | |||
148 | /* Linux Redefines */ | ||
149 | |||
150 | /******************************************************************/ | ||
151 | |||
152 | #define XPAR_UARTNS550_0_BASEADDR (XPAR_OPB_UART16550_0_BASEADDR+0x1000) | ||
153 | #define XPAR_UARTNS550_0_HIGHADDR XPAR_OPB_UART16550_0_HIGHADDR | ||
154 | #define XPAR_UARTNS550_0_CLOCK_FREQ_HZ XPAR_XUARTNS550_CLOCK_HZ | ||
155 | #define XPAR_UARTNS550_0_DEVICE_ID XPAR_OPB_UART16550_0_DEVICE_ID | ||
156 | |||
157 | /******************************************************************/ | ||
158 | |||
159 | #define XPAR_INTC_0_BASEADDR XPAR_OPB_INTC_0_BASEADDR | ||
160 | #define XPAR_INTC_0_HIGHADDR XPAR_OPB_INTC_0_HIGHADDR | ||
161 | #define XPAR_INTC_0_KIND_OF_INTR XPAR_OPB_INTC_0_KIND_OF_INTR | ||
162 | #define XPAR_INTC_0_DEVICE_ID XPAR_OPB_INTC_0_DEVICE_ID | ||
163 | |||
164 | /******************************************************************/ | ||
165 | |||
166 | #define XPAR_INTC_0_EMAC_0_VEC_ID XPAR_OPB_INTC_0_OPB_ETHERNET_0_IP2INTC_IRPT_INTR | ||
167 | #define XPAR_INTC_0_SYSACE_0_VEC_ID XPAR_OPB_INTC_0_OPB_SYSACE_0_SYSACE_IRQ_INTR | ||
168 | #define XPAR_INTC_0_IIC_0_VEC_ID XPAR_OPB_INTC_0_OPB_IIC_0_IP2INTC_IRPT_INTR | ||
169 | #define XPAR_INTC_0_PS2_1_VEC_ID XPAR_OPB_INTC_0_OPB_PS2_DUAL_REF_0_SYS_INTR2_INTR | ||
170 | #define XPAR_INTC_0_PS2_0_VEC_ID XPAR_OPB_INTC_0_OPB_PS2_DUAL_REF_0_SYS_INTR1_INTR | ||
171 | #define XPAR_INTC_0_UARTNS550_0_VEC_ID XPAR_OPB_INTC_0_OPB_UART16550_0_IP2INTC_IRPT_INTR | ||
172 | |||
173 | /******************************************************************/ | ||
174 | |||
175 | #define XPAR_TFT_0_BASEADDR XPAR_PLB_TFT_CNTLR_REF_0_DCR_BASEADDR | ||
176 | |||
177 | /******************************************************************/ | ||
178 | |||
179 | #define XPAR_EMAC_0_BASEADDR XPAR_OPB_ETHERNET_0_BASEADDR | ||
180 | #define XPAR_EMAC_0_HIGHADDR XPAR_OPB_ETHERNET_0_HIGHADDR | ||
181 | #define XPAR_EMAC_0_DMA_PRESENT XPAR_OPB_ETHERNET_0_DMA_PRESENT | ||
182 | #define XPAR_EMAC_0_MII_EXIST XPAR_OPB_ETHERNET_0_MII_EXIST | ||
183 | #define XPAR_EMAC_0_ERR_COUNT_EXIST XPAR_OPB_ETHERNET_0_ERR_COUNT_EXIST | ||
184 | #define XPAR_EMAC_0_DEVICE_ID XPAR_OPB_ETHERNET_0_DEVICE_ID | ||
185 | |||
186 | /******************************************************************/ | ||
187 | |||
188 | #define XPAR_GPIO_0_BASEADDR XPAR_OPB_GPIO_0_BASEADDR_0 | ||
189 | #define XPAR_GPIO_0_HIGHADDR XPAR_OPB_GPIO_0_HIGHADDR_0 | ||
190 | #define XPAR_GPIO_0_DEVICE_ID XPAR_OPB_GPIO_0_DEVICE_ID_0 | ||
191 | #define XPAR_GPIO_1_BASEADDR XPAR_OPB_GPIO_0_BASEADDR_1 | ||
192 | #define XPAR_GPIO_1_HIGHADDR XPAR_OPB_GPIO_0_HIGHADDR_1 | ||
193 | #define XPAR_GPIO_1_DEVICE_ID XPAR_OPB_GPIO_0_DEVICE_ID_1 | ||
194 | #define XPAR_GPIO_2_BASEADDR XPAR_OPB_GPIO_EXP_HDR_0_BASEADDR_0 | ||
195 | #define XPAR_GPIO_2_HIGHADDR XPAR_OPB_GPIO_EXP_HDR_0_HIGHADDR_0 | ||
196 | #define XPAR_GPIO_2_DEVICE_ID XPAR_OPB_GPIO_EXP_HDR_0_DEVICE_ID_0 | ||
197 | #define XPAR_GPIO_3_BASEADDR XPAR_OPB_GPIO_EXP_HDR_0_BASEADDR_1 | ||
198 | #define XPAR_GPIO_3_HIGHADDR XPAR_OPB_GPIO_EXP_HDR_0_HIGHADDR_1 | ||
199 | #define XPAR_GPIO_3_DEVICE_ID XPAR_OPB_GPIO_EXP_HDR_0_DEVICE_ID_1 | ||
200 | #define XPAR_GPIO_4_BASEADDR XPAR_OPB_GPIO_CHAR_LCD_0_BASEADDR | ||
201 | #define XPAR_GPIO_4_HIGHADDR XPAR_OPB_GPIO_CHAR_LCD_0_HIGHADDR | ||
202 | #define XPAR_GPIO_4_DEVICE_ID XPAR_OPB_GPIO_CHAR_LCD_0_DEVICE_ID | ||
203 | |||
204 | /******************************************************************/ | ||
205 | |||
206 | #define XPAR_PS2_0_BASEADDR XPAR_OPB_PS2_DUAL_REF_0_BASEADDR_0 | ||
207 | #define XPAR_PS2_0_HIGHADDR XPAR_OPB_PS2_DUAL_REF_0_HIGHADDR_0 | ||
208 | #define XPAR_PS2_0_DEVICE_ID XPAR_OPB_PS2_DUAL_REF_0_DEVICE_ID_0 | ||
209 | #define XPAR_PS2_1_BASEADDR XPAR_OPB_PS2_DUAL_REF_0_BASEADDR_1 | ||
210 | #define XPAR_PS2_1_HIGHADDR XPAR_OPB_PS2_DUAL_REF_0_HIGHADDR_1 | ||
211 | #define XPAR_PS2_1_DEVICE_ID XPAR_OPB_PS2_DUAL_REF_0_DEVICE_ID_1 | ||
212 | |||
213 | /******************************************************************/ | ||
214 | |||
215 | #define XPAR_SYSACE_0_BASEADDR XPAR_OPB_SYSACE_0_BASEADDR | ||
216 | #define XPAR_SYSACE_0_HIGHADDR XPAR_OPB_SYSACE_0_HIGHADDR | ||
217 | #define XPAR_SYSACE_0_DEVICE_ID XPAR_OPB_SYSACE_0_DEVICE_ID | ||
218 | |||
219 | /******************************************************************/ | ||
220 | |||
221 | #define XPAR_IIC_0_BASEADDR XPAR_OPB_IIC_0_BASEADDR | ||
222 | #define XPAR_IIC_0_HIGHADDR XPAR_OPB_IIC_0_HIGHADDR | ||
223 | #define XPAR_IIC_0_TEN_BIT_ADR XPAR_OPB_IIC_0_TEN_BIT_ADR | ||
224 | #define XPAR_IIC_0_DEVICE_ID XPAR_OPB_IIC_0_DEVICE_ID | ||
225 | |||
226 | /******************************************************************/ | ||
227 | |||
228 | #define XPAR_PLB_CLOCK_FREQ_HZ 100000000 | ||
229 | #define XPAR_CORE_CLOCK_FREQ_HZ XPAR_CPU_PPC405_CORE_CLOCK_FREQ_HZ | ||
230 | #define XPAR_DDR_0_SIZE 0x4000000 | ||
231 | |||
232 | /******************************************************************/ | ||
233 | |||
234 | #define XPAR_PERSISTENT_0_IIC_0_BASEADDR 0x00000400 | ||
235 | #define XPAR_PERSISTENT_0_IIC_0_HIGHADDR 0x000007FF | ||
236 | #define XPAR_PERSISTENT_0_IIC_0_EEPROMADDR 0xA0 | ||
237 | |||
238 | /******************************************************************/ | ||
239 | |||
240 | #define XPAR_PCI_0_CLOCK_FREQ_HZ 0 | ||
241 | |||
242 | /******************************************************************/ | ||
243 | |||
diff --git a/arch/ppc/platforms/4xx/yucca.c b/arch/ppc/platforms/4xx/yucca.c index b065b8babcd3..f287dcdbffce 100644 --- a/arch/ppc/platforms/4xx/yucca.c +++ b/arch/ppc/platforms/4xx/yucca.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/yucca.c | ||
3 | * | ||
4 | * Yucca board specific routines | 2 | * Yucca board specific routines |
5 | * | 3 | * |
6 | * Roland Dreier <rolandd@cisco.com> (based on luan.c by Matt Porter) | 4 | * Roland Dreier <rolandd@cisco.com> (based on luan.c by Matt Porter) |
diff --git a/arch/ppc/platforms/4xx/yucca.h b/arch/ppc/platforms/4xx/yucca.h index 01a4afea1514..7ae23012237a 100644 --- a/arch/ppc/platforms/4xx/yucca.h +++ b/arch/ppc/platforms/4xx/yucca.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/yucca.h | ||
3 | * | ||
4 | * Yucca board definitions | 2 | * Yucca board definitions |
5 | * | 3 | * |
6 | * Roland Dreier <rolandd@cisco.com> (based on luan.h by Matt Porter) | 4 | * Roland Dreier <rolandd@cisco.com> (based on luan.h by Matt Porter) |
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.c b/arch/ppc/platforms/83xx/mpc834x_sys.c index 1a659bbc1860..11626dd9090f 100644 --- a/arch/ppc/platforms/83xx/mpc834x_sys.c +++ b/arch/ppc/platforms/83xx/mpc834x_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/83xx/mpc834x_sys.c | ||
3 | * | ||
4 | * MPC834x SYS board specific routines | 2 | * MPC834x SYS board specific routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.h b/arch/ppc/platforms/83xx/mpc834x_sys.h index 2e514d316fb8..6727bbdc36ec 100644 --- a/arch/ppc/platforms/83xx/mpc834x_sys.h +++ b/arch/ppc/platforms/83xx/mpc834x_sys.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/83xx/mpc834x_sys.h | ||
3 | * | ||
4 | * MPC834X SYS common board definitions | 2 | * MPC834X SYS common board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
@@ -25,7 +23,7 @@ | |||
25 | #define VIRT_IMMRBAR ((uint)0xfe000000) | 23 | #define VIRT_IMMRBAR ((uint)0xfe000000) |
26 | 24 | ||
27 | #define BCSR_PHYS_ADDR ((uint)0xf8000000) | 25 | #define BCSR_PHYS_ADDR ((uint)0xf8000000) |
28 | #define BCSR_SIZE ((uint)(128 * 1024)) | 26 | #define BCSR_SIZE ((uint)(32 * 1024)) |
29 | 27 | ||
30 | #define BCSR_MISC_REG2_OFF 0x07 | 28 | #define BCSR_MISC_REG2_OFF 0x07 |
31 | #define BCSR_MISC_REG2_PORESET 0x01 | 29 | #define BCSR_MISC_REG2_PORESET 0x01 |
diff --git a/arch/ppc/platforms/85xx/mpc8540_ads.c b/arch/ppc/platforms/85xx/mpc8540_ads.c index 408d64f18e1a..9b014df516b9 100644 --- a/arch/ppc/platforms/85xx/mpc8540_ads.c +++ b/arch/ppc/platforms/85xx/mpc8540_ads.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc8540_ads.c | ||
3 | * | ||
4 | * MPC8540ADS board specific routines | 2 | * MPC8540ADS board specific routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/mpc8540_ads.h b/arch/ppc/platforms/85xx/mpc8540_ads.h index e48ca3a97397..0b5e7ff856f5 100644 --- a/arch/ppc/platforms/85xx/mpc8540_ads.h +++ b/arch/ppc/platforms/85xx/mpc8540_ads.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc8540_ads.h | ||
3 | * | ||
4 | * MPC8540ADS board definitions | 2 | * MPC8540ADS board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/mpc8555_cds.h b/arch/ppc/platforms/85xx/mpc8555_cds.h index 1a8e6c67355d..9754dbd5d18c 100644 --- a/arch/ppc/platforms/85xx/mpc8555_cds.h +++ b/arch/ppc/platforms/85xx/mpc8555_cds.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/mpc8555_cds.h | ||
3 | * | ||
4 | * MPC8555CDS board definitions | 2 | * MPC8555CDS board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/mpc8560_ads.c b/arch/ppc/platforms/85xx/mpc8560_ads.c index 442c7ff195d3..0cb2e86470e2 100644 --- a/arch/ppc/platforms/85xx/mpc8560_ads.c +++ b/arch/ppc/platforms/85xx/mpc8560_ads.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc8560_ads.c | ||
3 | * | ||
4 | * MPC8560ADS board specific routines | 2 | * MPC8560ADS board specific routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/mpc8560_ads.h b/arch/ppc/platforms/85xx/mpc8560_ads.h index 143ae7eefa7c..c2247c21fc53 100644 --- a/arch/ppc/platforms/85xx/mpc8560_ads.h +++ b/arch/ppc/platforms/85xx/mpc8560_ads.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/mpc8560_ads.h | ||
3 | * | ||
4 | * MPC8540ADS board definitions | 2 | * MPC8540ADS board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c b/arch/ppc/platforms/85xx/mpc85xx_ads_common.c index 17ce48fe3503..8fd9d763f58d 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c +++ b/arch/ppc/platforms/85xx/mpc85xx_ads_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc85xx_ads_common.c | ||
3 | * | ||
4 | * MPC85xx ADS board common routines | 2 | * MPC85xx ADS board common routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/mpc85xx_ads_common.h b/arch/ppc/platforms/85xx/mpc85xx_ads_common.h index 198a6a02cde8..de8d41aafe11 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_ads_common.h +++ b/arch/ppc/platforms/85xx/mpc85xx_ads_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc85xx_ads_common.h | ||
3 | * | ||
4 | * MPC85XX ADS common board definitions | 2 | * MPC85XX ADS common board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c index 1801ab392e22..c9e0aeeca3d8 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platform/85xx/mpc85xx_cds_common.c | ||
3 | * | ||
4 | * MPC85xx CDS board specific routines | 2 | * MPC85xx CDS board specific routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.h b/arch/ppc/platforms/85xx/mpc85xx_cds_common.h index 5b588cfd0e41..62df54f61ae3 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.h +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc85xx_cds_common.h | ||
3 | * | ||
4 | * MPC85xx CDS board definitions | 2 | * MPC85xx CDS board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/85xx/sbc8560.c b/arch/ppc/platforms/85xx/sbc8560.c index 8a72221f816c..b73778ecf827 100644 --- a/arch/ppc/platforms/85xx/sbc8560.c +++ b/arch/ppc/platforms/85xx/sbc8560.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/sbc8560.c | ||
3 | * | ||
4 | * Wind River SBC8560 board specific routines | 2 | * Wind River SBC8560 board specific routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala | 4 | * Maintainer: Kumar Gala |
diff --git a/arch/ppc/platforms/85xx/sbc8560.h b/arch/ppc/platforms/85xx/sbc8560.h index 5e1b00c77da5..44ffaa2d2c87 100644 --- a/arch/ppc/platforms/85xx/sbc8560.h +++ b/arch/ppc/platforms/85xx/sbc8560.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/sbc8560.h | ||
3 | * | ||
4 | * Wind River SBC8560 board definitions | 2 | * Wind River SBC8560 board definitions |
5 | * | 3 | * |
6 | * Copyright 2003 Motorola Inc. | 4 | * Copyright 2003 Motorola Inc. |
diff --git a/arch/ppc/platforms/85xx/sbc85xx.c b/arch/ppc/platforms/85xx/sbc85xx.c index c02f110219f5..d3ff280510ff 100644 --- a/arch/ppc/platforms/85xx/sbc85xx.c +++ b/arch/ppc/platforms/85xx/sbc85xx.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platform/85xx/sbc85xx.c | ||
3 | * | ||
4 | * WindRiver PowerQUICC III SBC85xx board common routines | 2 | * WindRiver PowerQUICC III SBC85xx board common routines |
5 | * | 3 | * |
6 | * Copyright 2002, 2003 Motorola Inc. | 4 | * Copyright 2002, 2003 Motorola Inc. |
diff --git a/arch/ppc/platforms/85xx/sbc85xx.h b/arch/ppc/platforms/85xx/sbc85xx.h index 7af93c691a6b..5dd8b6a98c9b 100644 --- a/arch/ppc/platforms/85xx/sbc85xx.h +++ b/arch/ppc/platforms/85xx/sbc85xx.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/sbc85xx.h | ||
3 | * | ||
4 | * WindRiver PowerQUICC III SBC85xx common board definitions | 2 | * WindRiver PowerQUICC III SBC85xx common board definitions |
5 | * | 3 | * |
6 | * Copyright 2003 Motorola Inc. | 4 | * Copyright 2003 Motorola Inc. |
diff --git a/arch/ppc/platforms/85xx/stx_gp3.c b/arch/ppc/platforms/85xx/stx_gp3.c index 061bb7cf2d9a..8d7baa9a397a 100644 --- a/arch/ppc/platforms/85xx/stx_gp3.c +++ b/arch/ppc/platforms/85xx/stx_gp3.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/stx_gp3.c | ||
3 | * | ||
4 | * STx GP3 board specific routines | 2 | * STx GP3 board specific routines |
5 | * | 3 | * |
6 | * Dan Malek <dan@embeddededge.com> | 4 | * Dan Malek <dan@embeddededge.com> |
diff --git a/arch/ppc/platforms/85xx/stx_gp3.h b/arch/ppc/platforms/85xx/stx_gp3.h index 2f25b5195152..3f71f8f59370 100644 --- a/arch/ppc/platforms/85xx/stx_gp3.h +++ b/arch/ppc/platforms/85xx/stx_gp3.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/stx8560_gp3.h | ||
3 | * | ||
4 | * STx GP3 board definitions | 2 | * STx GP3 board definitions |
5 | * | 3 | * |
6 | * Dan Malek (dan@embeddededge.com) | 4 | * Dan Malek (dan@embeddededge.com) |
diff --git a/arch/ppc/platforms/85xx/tqm85xx.c b/arch/ppc/platforms/85xx/tqm85xx.c index a5e38ba62732..00af132262b3 100644 --- a/arch/ppc/platforms/85xx/tqm85xx.c +++ b/arch/ppc/platforms/85xx/tqm85xx.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/tqm85xx.c | ||
3 | * | ||
4 | * TQM85xx (40/41/55/60) board specific routines | 2 | * TQM85xx (40/41/55/60) board specific routines |
5 | * | 3 | * |
6 | * Copyright (c) 2005 DENX Software Engineering | 4 | * Copyright (c) 2005 DENX Software Engineering |
diff --git a/arch/ppc/platforms/85xx/tqm85xx.h b/arch/ppc/platforms/85xx/tqm85xx.h index 3775eb363fde..612d80504f9b 100644 --- a/arch/ppc/platforms/85xx/tqm85xx.h +++ b/arch/ppc/platforms/85xx/tqm85xx.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/tqm85xx.h | ||
3 | * | ||
4 | * TQM85xx (40/41/55/60) board definitions | 2 | * TQM85xx (40/41/55/60) board definitions |
5 | * | 3 | * |
6 | * Copyright (c) 2005 DENX Software Engineering | 4 | * Copyright (c) 2005 DENX Software Engineering |
diff --git a/arch/ppc/platforms/Makefile b/arch/ppc/platforms/Makefile index 51430e294b32..e8b91a33ce91 100644 --- a/arch/ppc/platforms/Makefile +++ b/arch/ppc/platforms/Makefile | |||
@@ -37,6 +37,9 @@ obj-$(CONFIG_SBC82xx) += sbc82xx.o | |||
37 | obj-$(CONFIG_SPRUCE) += spruce.o | 37 | obj-$(CONFIG_SPRUCE) += spruce.o |
38 | obj-$(CONFIG_LITE5200) += lite5200.o | 38 | obj-$(CONFIG_LITE5200) += lite5200.o |
39 | obj-$(CONFIG_EV64360) += ev64360.o | 39 | obj-$(CONFIG_EV64360) += ev64360.o |
40 | obj-$(CONFIG_MPC86XADS) += mpc866ads_setup.o | ||
41 | obj-$(CONFIG_MPC885ADS) += mpc885ads_setup.o | ||
42 | obj-$(CONFIG_ADS8272) += mpc8272ads_setup.o | ||
40 | 43 | ||
41 | ifeq ($(CONFIG_SMP),y) | 44 | ifeq ($(CONFIG_SMP),y) |
42 | obj-$(CONFIG_PPC_CHRP) += chrp_smp.o | 45 | obj-$(CONFIG_PPC_CHRP) += chrp_smp.o |
diff --git a/arch/ppc/platforms/apus_setup.c b/arch/ppc/platforms/apus_setup.c index c42c50073da5..fe0cdc04d436 100644 --- a/arch/ppc/platforms/apus_setup.c +++ b/arch/ppc/platforms/apus_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/apus_setup.c | ||
3 | * | ||
4 | * Copyright (C) 1998, 1999 Jesper Skov | 2 | * Copyright (C) 1998, 1999 Jesper Skov |
5 | * | 3 | * |
6 | * Basically what is needed to replace functionality found in | 4 | * Basically what is needed to replace functionality found in |
diff --git a/arch/ppc/platforms/chestnut.c b/arch/ppc/platforms/chestnut.c index aefcc0e7be57..f324f757cae1 100644 --- a/arch/ppc/platforms/chestnut.c +++ b/arch/ppc/platforms/chestnut.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/chestnut.c | ||
3 | * | ||
4 | * Board setup routines for IBM Chestnut | 2 | * Board setup routines for IBM Chestnut |
5 | * | 3 | * |
6 | * Author: <source@mvista.com> | 4 | * Author: <source@mvista.com> |
diff --git a/arch/ppc/platforms/chestnut.h b/arch/ppc/platforms/chestnut.h index 0400b2be40ab..e00fd9f8bbd0 100644 --- a/arch/ppc/platforms/chestnut.h +++ b/arch/ppc/platforms/chestnut.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/chestnut.h | ||
3 | * | ||
4 | * Definitions for IBM 750FXGX Eval (Chestnut) | 2 | * Definitions for IBM 750FXGX Eval (Chestnut) |
5 | * | 3 | * |
6 | * Author: <source@mvista.com> | 4 | * Author: <source@mvista.com> |
diff --git a/arch/ppc/platforms/chrp_pegasos_eth.c b/arch/ppc/platforms/chrp_pegasos_eth.c index 108a6e265185..9305c8aa1373 100644 --- a/arch/ppc/platforms/chrp_pegasos_eth.c +++ b/arch/ppc/platforms/chrp_pegasos_eth.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/chrp_pegasos_eth.c | ||
3 | * | ||
4 | * Copyright (C) 2005 Sven Luther <sl@bplan-gmbh.de> | 2 | * Copyright (C) 2005 Sven Luther <sl@bplan-gmbh.de> |
5 | * Thanks to : | 3 | * Thanks to : |
6 | * Dale Farnsworth <dale@farnsworth.org> | 4 | * Dale Farnsworth <dale@farnsworth.org> |
diff --git a/arch/ppc/platforms/chrp_setup.c b/arch/ppc/platforms/chrp_setup.c index 48996b787378..f9fd3f4f8e2e 100644 --- a/arch/ppc/platforms/chrp_setup.c +++ b/arch/ppc/platforms/chrp_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/setup.c | ||
3 | * | ||
4 | * Copyright (C) 1995 Linus Torvalds | 2 | * Copyright (C) 1995 Linus Torvalds |
5 | * Adapted from 'alpha' version by Gary Thomas | 3 | * Adapted from 'alpha' version by Gary Thomas |
6 | * Modified by Cort Dougan (cort@cs.nmt.edu) | 4 | * Modified by Cort Dougan (cort@cs.nmt.edu) |
diff --git a/arch/ppc/platforms/chrp_time.c b/arch/ppc/platforms/chrp_time.c index 57753a55b580..c8627770af13 100644 --- a/arch/ppc/platforms/chrp_time.c +++ b/arch/ppc/platforms/chrp_time.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/chrp_time.c | ||
3 | * | ||
4 | * Copyright (C) 1991, 1992, 1995 Linus Torvalds | 2 | * Copyright (C) 1991, 1992, 1995 Linus Torvalds |
5 | * | 3 | * |
6 | * Adapted for PowerPC (PReP) by Gary Thomas | 4 | * Adapted for PowerPC (PReP) by Gary Thomas |
diff --git a/arch/ppc/platforms/cpci690.c b/arch/ppc/platforms/cpci690.c index 6ca7bcac9474..790475c22fd7 100644 --- a/arch/ppc/platforms/cpci690.c +++ b/arch/ppc/platforms/cpci690.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/cpci690.c | ||
3 | * | ||
4 | * Board setup routines for the Force CPCI690 board. | 2 | * Board setup routines for the Force CPCI690 board. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <mgreer@mvista.com> | 4 | * Author: Mark A. Greer <mgreer@mvista.com> |
@@ -290,7 +288,7 @@ cpci690_fixup_mpsc_pdata(struct platform_device *pdev) | |||
290 | pdata->brg_clk_freq = cpci690_get_bus_freq(); | 288 | pdata->brg_clk_freq = cpci690_get_bus_freq(); |
291 | } | 289 | } |
292 | 290 | ||
293 | static int __init | 291 | static int |
294 | cpci690_platform_notify(struct device *dev) | 292 | cpci690_platform_notify(struct device *dev) |
295 | { | 293 | { |
296 | static struct { | 294 | static struct { |
diff --git a/arch/ppc/platforms/cpci690.h b/arch/ppc/platforms/cpci690.h index 49584c9cedf3..0fa5a4c31b67 100644 --- a/arch/ppc/platforms/cpci690.h +++ b/arch/ppc/platforms/cpci690.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/cpci690.h | ||
3 | * | ||
4 | * Definitions for Force CPCI690 | 2 | * Definitions for Force CPCI690 |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <mgreer@mvista.com> | 4 | * Author: Mark A. Greer <mgreer@mvista.com> |
diff --git a/arch/ppc/platforms/ev64260.c b/arch/ppc/platforms/ev64260.c index ffde8f6f6302..31e8e21e1d5c 100644 --- a/arch/ppc/platforms/ev64260.c +++ b/arch/ppc/platforms/ev64260.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/ev64260.c | ||
3 | * | ||
4 | * Board setup routines for the Marvell/Galileo EV-64260-BP Evaluation Board. | 2 | * Board setup routines for the Marvell/Galileo EV-64260-BP Evaluation Board. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <mgreer@mvista.com> | 4 | * Author: Mark A. Greer <mgreer@mvista.com> |
@@ -416,7 +414,7 @@ ev64260_fixup_mpsc_pdata(struct platform_device *pdev) | |||
416 | return; | 414 | return; |
417 | } | 415 | } |
418 | 416 | ||
419 | static int __init | 417 | static int |
420 | ev64260_platform_notify(struct device *dev) | 418 | ev64260_platform_notify(struct device *dev) |
421 | { | 419 | { |
422 | static struct { | 420 | static struct { |
diff --git a/arch/ppc/platforms/ev64260.h b/arch/ppc/platforms/ev64260.h index bedffced3a02..44d90d56745a 100644 --- a/arch/ppc/platforms/ev64260.h +++ b/arch/ppc/platforms/ev64260.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/ev64260.h | ||
3 | * | ||
4 | * Definitions for Marvell/Galileo EV-64260-BP Evaluation Board. | 2 | * Definitions for Marvell/Galileo EV-64260-BP Evaluation Board. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <mgreer@mvista.com> | 4 | * Author: Mark A. Greer <mgreer@mvista.com> |
diff --git a/arch/ppc/platforms/ev64360.c b/arch/ppc/platforms/ev64360.c index b9d844f88c2b..104ac9b16e8b 100644 --- a/arch/ppc/platforms/ev64360.c +++ b/arch/ppc/platforms/ev64360.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/ev64360.c | ||
3 | * | ||
4 | * Board setup routines for the Marvell EV-64360-BP Evaluation Board. | 2 | * Board setup routines for the Marvell EV-64360-BP Evaluation Board. |
5 | * | 3 | * |
6 | * Author: Lee Nicks <allinux@gmail.com> | 4 | * Author: Lee Nicks <allinux@gmail.com> |
@@ -300,7 +298,7 @@ ev64360_fixup_eth_pdata(struct platform_device *pdev) | |||
300 | } | 298 | } |
301 | #endif | 299 | #endif |
302 | 300 | ||
303 | static int __init | 301 | static int |
304 | ev64360_platform_notify(struct device *dev) | 302 | ev64360_platform_notify(struct device *dev) |
305 | { | 303 | { |
306 | static struct { | 304 | static struct { |
diff --git a/arch/ppc/platforms/ev64360.h b/arch/ppc/platforms/ev64360.h index 68eabe490397..b30f4722690a 100644 --- a/arch/ppc/platforms/ev64360.h +++ b/arch/ppc/platforms/ev64360.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/ev64360.h | ||
3 | * | ||
4 | * Definitions for Marvell EV-64360-BP Evaluation Board. | 2 | * Definitions for Marvell EV-64360-BP Evaluation Board. |
5 | * | 3 | * |
6 | * Author: Lee Nicks <allinux@gmail.com> | 4 | * Author: Lee Nicks <allinux@gmail.com> |
diff --git a/arch/ppc/platforms/fads.h b/arch/ppc/platforms/fads.h index a48fb8d723e4..e1c0b1b6dcb3 100644 --- a/arch/ppc/platforms/fads.h +++ b/arch/ppc/platforms/fads.h | |||
@@ -112,7 +112,7 @@ | |||
112 | 112 | ||
113 | /* CPM Ethernet through SCC1 or SCC2 */ | 113 | /* CPM Ethernet through SCC1 or SCC2 */ |
114 | 114 | ||
115 | #ifdef CONFIG_SCC1_ENET /* Probably 860 variant */ | 115 | #if defined(CONFIG_SCC1_ENET) || defined(CONFIG_MPC8xx_SECOND_ETH_SCC1) /* Probably 860 variant */ |
116 | /* Bits in parallel I/O port registers that have to be set/cleared | 116 | /* Bits in parallel I/O port registers that have to be set/cleared |
117 | * to configure the pins for SCC1 use. | 117 | * to configure the pins for SCC1 use. |
118 | * TCLK - CLK1, RCLK - CLK2. | 118 | * TCLK - CLK1, RCLK - CLK2. |
diff --git a/arch/ppc/platforms/gemini.h b/arch/ppc/platforms/gemini.h index 06de59248918..5528fd0a1216 100644 --- a/arch/ppc/platforms/gemini.h +++ b/arch/ppc/platforms/gemini.h | |||
@@ -1,7 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/gemini.h | ||
3 | * | ||
4 | * | ||
5 | * Onboard registers and descriptions for Synergy Microsystems' | 2 | * Onboard registers and descriptions for Synergy Microsystems' |
6 | * "Gemini" boards. | 3 | * "Gemini" boards. |
7 | * | 4 | * |
diff --git a/arch/ppc/platforms/gemini_prom.S b/arch/ppc/platforms/gemini_prom.S index 8c5065d56505..b181f2108001 100644 --- a/arch/ppc/platforms/gemini_prom.S +++ b/arch/ppc/platforms/gemini_prom.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/gemini_prom.S | ||
3 | * | ||
4 | * Not really prom support code (yet), but sort of anti-prom code. The current | 2 | * Not really prom support code (yet), but sort of anti-prom code. The current |
5 | * bootloader does a number of things it shouldn't and doesn't do things that it | 3 | * bootloader does a number of things it shouldn't and doesn't do things that it |
6 | * should. The stuff in here is mainly a hodge-podge collection of setup code | 4 | * should. The stuff in here is mainly a hodge-podge collection of setup code |
diff --git a/arch/ppc/platforms/gemini_setup.c b/arch/ppc/platforms/gemini_setup.c index 729897c59033..0090ff154608 100644 --- a/arch/ppc/platforms/gemini_setup.c +++ b/arch/ppc/platforms/gemini_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/gemini_setup.c | ||
3 | * | ||
4 | * Copyright (C) 1995 Linus Torvalds | 2 | * Copyright (C) 1995 Linus Torvalds |
5 | * Adapted from 'alpha' version by Gary Thomas | 3 | * Adapted from 'alpha' version by Gary Thomas |
6 | * Modified by Cort Dougan (cort@cs.nmt.edu) | 4 | * Modified by Cort Dougan (cort@cs.nmt.edu) |
diff --git a/arch/ppc/platforms/hdpu.c b/arch/ppc/platforms/hdpu.c index f945416960e9..75dc2ee87d2f 100644 --- a/arch/ppc/platforms/hdpu.c +++ b/arch/ppc/platforms/hdpu.c | |||
@@ -1,7 +1,4 @@ | |||
1 | |||
2 | /* | 1 | /* |
3 | * arch/ppc/platforms/hdpu_setup.c | ||
4 | * | ||
5 | * Board setup routines for the Sky Computers HDPU Compute Blade. | 2 | * Board setup routines for the Sky Computers HDPU Compute Blade. |
6 | * | 3 | * |
7 | * Written by Brian Waite <waite@skycomputers.com> | 4 | * Written by Brian Waite <waite@skycomputers.com> |
@@ -353,7 +350,7 @@ static void __init hdpu_fixup_cpustate_pdata(struct platform_device *pd) | |||
353 | } | 350 | } |
354 | #endif | 351 | #endif |
355 | 352 | ||
356 | static int __init hdpu_platform_notify(struct device *dev) | 353 | static int hdpu_platform_notify(struct device *dev) |
357 | { | 354 | { |
358 | static struct { | 355 | static struct { |
359 | char *bus_id; | 356 | char *bus_id; |
diff --git a/arch/ppc/platforms/hdpu.h b/arch/ppc/platforms/hdpu.h index 07c3cffb5c7b..f9e020b6970c 100644 --- a/arch/ppc/platforms/hdpu.h +++ b/arch/ppc/platforms/hdpu.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/hdpu.h | ||
3 | * | ||
4 | * Definitions for Sky Computers HDPU board. | 2 | * Definitions for Sky Computers HDPU board. |
5 | * | 3 | * |
6 | * Brian Waite <waite@skycomputers.com> | 4 | * Brian Waite <waite@skycomputers.com> |
diff --git a/arch/ppc/platforms/katana.c b/arch/ppc/platforms/katana.c index 6e58e30ceed1..ad21280e8920 100644 --- a/arch/ppc/platforms/katana.c +++ b/arch/ppc/platforms/katana.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/katana.c | ||
3 | * | ||
4 | * Board setup routines for the Artesyn Katana cPCI boards. | 2 | * Board setup routines for the Artesyn Katana cPCI boards. |
5 | * | 3 | * |
6 | * Author: Tim Montgomery <timm@artesyncp.com> | 4 | * Author: Tim Montgomery <timm@artesyncp.com> |
@@ -598,7 +596,7 @@ katana_fixup_mv64xxx_pdata(struct platform_device *pdev) | |||
598 | } | 596 | } |
599 | #endif | 597 | #endif |
600 | 598 | ||
601 | static int __init | 599 | static int |
602 | katana_platform_notify(struct device *dev) | 600 | katana_platform_notify(struct device *dev) |
603 | { | 601 | { |
604 | static struct { | 602 | static struct { |
@@ -664,12 +662,11 @@ katana_setup_mtd(void) | |||
664 | 662 | ||
665 | ptbl_entries = (size >= (64*MB)) ? 6 : 4; | 663 | ptbl_entries = (size >= (64*MB)) ? 6 : 4; |
666 | 664 | ||
667 | if ((ptbl = kmalloc(ptbl_entries * sizeof(struct mtd_partition), | 665 | if ((ptbl = kcalloc(ptbl_entries, sizeof(struct mtd_partition), |
668 | GFP_KERNEL)) == NULL) { | 666 | GFP_KERNEL)) == NULL) { |
669 | printk(KERN_WARNING "Can't alloc MTD partition table\n"); | 667 | printk(KERN_WARNING "Can't alloc MTD partition table\n"); |
670 | return -ENOMEM; | 668 | return -ENOMEM; |
671 | } | 669 | } |
672 | memset(ptbl, 0, ptbl_entries * sizeof(struct mtd_partition)); | ||
673 | 670 | ||
674 | ptbl[0].name = "Monitor"; | 671 | ptbl[0].name = "Monitor"; |
675 | ptbl[0].size = KATANA_MTD_MONITOR_SIZE; | 672 | ptbl[0].size = KATANA_MTD_MONITOR_SIZE; |
diff --git a/arch/ppc/platforms/katana.h b/arch/ppc/platforms/katana.h index 597257eff2ec..0a9b036526b1 100644 --- a/arch/ppc/platforms/katana.h +++ b/arch/ppc/platforms/katana.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/katana.h | ||
3 | * | ||
4 | * Definitions for Artesyn Katana750i/3750 board. | 2 | * Definitions for Artesyn Katana750i/3750 board. |
5 | * | 3 | * |
6 | * Author: Tim Montgomery <timm@artesyncp.com> | 4 | * Author: Tim Montgomery <timm@artesyncp.com> |
diff --git a/arch/ppc/platforms/lite5200.c b/arch/ppc/platforms/lite5200.c index 7ed52dc340c9..5171b53bccb5 100644 --- a/arch/ppc/platforms/lite5200.c +++ b/arch/ppc/platforms/lite5200.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/lite5200.c | ||
3 | * | ||
4 | * Platform support file for the Freescale LITE5200 based on MPC52xx. | 2 | * Platform support file for the Freescale LITE5200 based on MPC52xx. |
5 | * A maximum of this file should be moved to syslib/mpc52xx_????? | 3 | * A maximum of this file should be moved to syslib/mpc52xx_????? |
6 | * so that new platform based on MPC52xx need a minimal platform file | 4 | * so that new platform based on MPC52xx need a minimal platform file |
diff --git a/arch/ppc/platforms/lite5200.h b/arch/ppc/platforms/lite5200.h index c1de2aa47175..852a18e24d0b 100644 --- a/arch/ppc/platforms/lite5200.h +++ b/arch/ppc/platforms/lite5200.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/lite5200.h | ||
3 | * | ||
4 | * Definitions for Freescale LITE5200 : MPC52xx Standard Development | 2 | * Definitions for Freescale LITE5200 : MPC52xx Standard Development |
5 | * Platform board support | 3 | * Platform board support |
6 | * | 4 | * |
diff --git a/arch/ppc/platforms/lopec.c b/arch/ppc/platforms/lopec.c index 06d247c23b82..c6445a727ca3 100644 --- a/arch/ppc/platforms/lopec.c +++ b/arch/ppc/platforms/lopec.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/lopec.c | ||
3 | * | ||
4 | * Setup routines for the Motorola LoPEC. | 2 | * Setup routines for the Motorola LoPEC. |
5 | * | 3 | * |
6 | * Author: Dan Cox | 4 | * Author: Dan Cox |
diff --git a/arch/ppc/platforms/mpc8272ads_setup.c b/arch/ppc/platforms/mpc8272ads_setup.c new file mode 100644 index 000000000000..bc9b94f77e39 --- /dev/null +++ b/arch/ppc/platforms/mpc8272ads_setup.c | |||
@@ -0,0 +1,236 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/82xx/pq2ads_pd.c | ||
3 | * | ||
4 | * MPC82xx Board-specific PlatformDevice descriptions | ||
5 | * | ||
6 | * 2005 (c) MontaVista Software, Inc. | ||
7 | * Vitaly Bordug <vbordug@ru.mvista.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public License | ||
10 | * version 2. This program is licensed "as is" without any warranty of any | ||
11 | * kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | |||
15 | #include <linux/init.h> | ||
16 | #include <linux/module.h> | ||
17 | #include <linux/device.h> | ||
18 | #include <linux/ioport.h> | ||
19 | #include <linux/fs_enet_pd.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | |||
22 | #include <asm/io.h> | ||
23 | #include <asm/mpc8260.h> | ||
24 | #include <asm/cpm2.h> | ||
25 | #include <asm/immap_cpm2.h> | ||
26 | #include <asm/irq.h> | ||
27 | #include <asm/ppc_sys.h> | ||
28 | #include <asm/ppcboot.h> | ||
29 | |||
30 | #include "pq2ads_pd.h" | ||
31 | |||
32 | static void init_fcc1_ioports(void); | ||
33 | static void init_fcc2_ioports(void); | ||
34 | |||
35 | static struct fs_mii_bus_info mii_bus_info = { | ||
36 | .method = fsmii_bitbang, | ||
37 | .id = 0, | ||
38 | .i.bitbang = { | ||
39 | .mdio_port = fsiop_portc, | ||
40 | .mdio_bit = 18, | ||
41 | .mdc_port = fsiop_portc, | ||
42 | .mdc_bit = 19, | ||
43 | .delay = 1, | ||
44 | }, | ||
45 | }; | ||
46 | |||
47 | static struct fs_platform_info mpc82xx_fcc1_pdata = { | ||
48 | .fs_no = fsid_fcc1, | ||
49 | .cp_page = CPM_CR_FCC1_PAGE, | ||
50 | .cp_block = CPM_CR_FCC1_SBLOCK, | ||
51 | .clk_trx = (PC_F1RXCLK | PC_F1TXCLK), | ||
52 | .clk_route = CMX1_CLK_ROUTE, | ||
53 | .clk_mask = CMX1_CLK_MASK, | ||
54 | .init_ioports = init_fcc1_ioports, | ||
55 | |||
56 | .phy_addr = 0, | ||
57 | #ifdef PHY_INTERRUPT | ||
58 | .phy_irq = PHY_INTERRUPT, | ||
59 | #else | ||
60 | .phy_irq = -1; | ||
61 | #endif | ||
62 | .mem_offset = FCC1_MEM_OFFSET, | ||
63 | .bus_info = &mii_bus_info, | ||
64 | .rx_ring = 32, | ||
65 | .tx_ring = 32, | ||
66 | .rx_copybreak = 240, | ||
67 | .use_napi = 0, | ||
68 | .napi_weight = 17, | ||
69 | }; | ||
70 | |||
71 | static struct fs_platform_info mpc82xx_fcc2_pdata = { | ||
72 | .fs_no = fsid_fcc2, | ||
73 | .cp_page = CPM_CR_FCC2_PAGE, | ||
74 | .cp_block = CPM_CR_FCC2_SBLOCK, | ||
75 | .clk_trx = (PC_F2RXCLK | PC_F2TXCLK), | ||
76 | .clk_route = CMX2_CLK_ROUTE, | ||
77 | .clk_mask = CMX2_CLK_MASK, | ||
78 | .init_ioports = init_fcc2_ioports, | ||
79 | |||
80 | .phy_addr = 3, | ||
81 | #ifdef PHY_INTERRUPT | ||
82 | .phy_irq = PHY_INTERRUPT, | ||
83 | #else | ||
84 | .phy_irq = -1; | ||
85 | #endif | ||
86 | .mem_offset = FCC2_MEM_OFFSET, | ||
87 | .bus_info = &mii_bus_info, | ||
88 | .rx_ring = 32, | ||
89 | .tx_ring = 32, | ||
90 | .rx_copybreak = 240, | ||
91 | .use_napi = 0, | ||
92 | .napi_weight = 17, | ||
93 | }; | ||
94 | |||
95 | static void init_fcc1_ioports(void) | ||
96 | { | ||
97 | struct io_port *io; | ||
98 | u32 tempval; | ||
99 | cpm2_map_t* immap = ioremap(CPM_MAP_ADDR, sizeof(cpm2_map_t)); | ||
100 | u32 *bcsr = ioremap(BCSR_ADDR+4, sizeof(u32)); | ||
101 | |||
102 | io = &immap->im_ioport; | ||
103 | |||
104 | /* Enable the PHY */ | ||
105 | clrbits32(bcsr, BCSR1_FETHIEN); | ||
106 | setbits32(bcsr, BCSR1_FETH_RST); | ||
107 | |||
108 | /* FCC1 pins are on port A/C. */ | ||
109 | /* Configure port A and C pins for FCC1 Ethernet. */ | ||
110 | |||
111 | tempval = in_be32(&io->iop_pdira); | ||
112 | tempval &= ~PA1_DIRA0; | ||
113 | tempval |= PA1_DIRA1; | ||
114 | out_be32(&io->iop_pdira, tempval); | ||
115 | |||
116 | tempval = in_be32(&io->iop_psora); | ||
117 | tempval &= ~PA1_PSORA0; | ||
118 | tempval |= PA1_PSORA1; | ||
119 | out_be32(&io->iop_psora, tempval); | ||
120 | |||
121 | setbits32(&io->iop_ppara,PA1_DIRA0 | PA1_DIRA1); | ||
122 | |||
123 | /* Alter clocks */ | ||
124 | tempval = PC_F1TXCLK|PC_F1RXCLK; | ||
125 | |||
126 | clrbits32(&io->iop_psorc, tempval); | ||
127 | clrbits32(&io->iop_pdirc, tempval); | ||
128 | setbits32(&io->iop_pparc, tempval); | ||
129 | |||
130 | clrbits32(&immap->im_cpmux.cmx_fcr, CMX1_CLK_MASK); | ||
131 | setbits32(&immap->im_cpmux.cmx_fcr, CMX1_CLK_ROUTE); | ||
132 | iounmap(bcsr); | ||
133 | iounmap(immap); | ||
134 | } | ||
135 | |||
136 | static void init_fcc2_ioports(void) | ||
137 | { | ||
138 | cpm2_map_t* immap = ioremap(CPM_MAP_ADDR, sizeof(cpm2_map_t)); | ||
139 | u32 *bcsr = ioremap(BCSR_ADDR+12, sizeof(u32)); | ||
140 | |||
141 | struct io_port *io; | ||
142 | u32 tempval; | ||
143 | |||
144 | immap = cpm2_immr; | ||
145 | |||
146 | io = &immap->im_ioport; | ||
147 | |||
148 | /* Enable the PHY */ | ||
149 | clrbits32(bcsr, BCSR3_FETHIEN2); | ||
150 | setbits32(bcsr, BCSR3_FETH2_RST); | ||
151 | |||
152 | /* FCC2 are port B/C. */ | ||
153 | /* Configure port A and C pins for FCC2 Ethernet. */ | ||
154 | |||
155 | tempval = in_be32(&io->iop_pdirb); | ||
156 | tempval &= ~PB2_DIRB0; | ||
157 | tempval |= PB2_DIRB1; | ||
158 | out_be32(&io->iop_pdirb, tempval); | ||
159 | |||
160 | tempval = in_be32(&io->iop_psorb); | ||
161 | tempval &= ~PB2_PSORB0; | ||
162 | tempval |= PB2_PSORB1; | ||
163 | out_be32(&io->iop_psorb, tempval); | ||
164 | |||
165 | setbits32(&io->iop_pparb,PB2_DIRB0 | PB2_DIRB1); | ||
166 | |||
167 | tempval = PC_F2RXCLK|PC_F2TXCLK; | ||
168 | |||
169 | /* Alter clocks */ | ||
170 | clrbits32(&io->iop_psorc,tempval); | ||
171 | clrbits32(&io->iop_pdirc,tempval); | ||
172 | setbits32(&io->iop_pparc,tempval); | ||
173 | |||
174 | clrbits32(&immap->im_cpmux.cmx_fcr, CMX2_CLK_MASK); | ||
175 | setbits32(&immap->im_cpmux.cmx_fcr, CMX2_CLK_ROUTE); | ||
176 | |||
177 | iounmap(bcsr); | ||
178 | iounmap(immap); | ||
179 | } | ||
180 | |||
181 | |||
182 | static void __init mpc8272ads_fixup_enet_pdata(struct platform_device *pdev, | ||
183 | int idx) | ||
184 | { | ||
185 | bd_t* bi = (void*)__res; | ||
186 | int fs_no = fsid_fcc1+pdev->id-1; | ||
187 | |||
188 | mpc82xx_fcc1_pdata.dpram_offset = mpc82xx_fcc2_pdata.dpram_offset = (u32)cpm2_immr->im_dprambase; | ||
189 | mpc82xx_fcc1_pdata.fcc_regs_c = mpc82xx_fcc2_pdata.fcc_regs_c = (u32)cpm2_immr->im_fcc_c; | ||
190 | |||
191 | switch(fs_no) { | ||
192 | case fsid_fcc1: | ||
193 | memcpy(&mpc82xx_fcc1_pdata.macaddr,bi->bi_enetaddr,6); | ||
194 | pdev->dev.platform_data = &mpc82xx_fcc1_pdata; | ||
195 | break; | ||
196 | case fsid_fcc2: | ||
197 | memcpy(&mpc82xx_fcc2_pdata.macaddr,bi->bi_enetaddr,6); | ||
198 | mpc82xx_fcc2_pdata.macaddr[5] ^= 1; | ||
199 | pdev->dev.platform_data = &mpc82xx_fcc2_pdata; | ||
200 | break; | ||
201 | } | ||
202 | } | ||
203 | |||
204 | static int mpc8272ads_platform_notify(struct device *dev) | ||
205 | { | ||
206 | static const struct platform_notify_dev_map dev_map[] = { | ||
207 | { | ||
208 | .bus_id = "fsl-cpm-fcc", | ||
209 | .rtn = mpc8272ads_fixup_enet_pdata | ||
210 | }, | ||
211 | { | ||
212 | .bus_id = NULL | ||
213 | } | ||
214 | }; | ||
215 | platform_notify_map(dev_map,dev); | ||
216 | |||
217 | return 0; | ||
218 | |||
219 | } | ||
220 | |||
221 | int __init mpc8272ads_init(void) | ||
222 | { | ||
223 | printk(KERN_NOTICE "mpc8272ads: Init\n"); | ||
224 | |||
225 | platform_notify = mpc8272ads_platform_notify; | ||
226 | |||
227 | ppc_sys_device_initfunc(); | ||
228 | |||
229 | ppc_sys_device_disable_all(); | ||
230 | ppc_sys_device_enable(MPC82xx_CPM_FCC1); | ||
231 | ppc_sys_device_enable(MPC82xx_CPM_FCC2); | ||
232 | |||
233 | return 0; | ||
234 | } | ||
235 | |||
236 | arch_initcall(mpc8272ads_init); | ||
diff --git a/arch/ppc/platforms/mpc866ads_setup.c b/arch/ppc/platforms/mpc866ads_setup.c new file mode 100644 index 000000000000..ac8fcc68afeb --- /dev/null +++ b/arch/ppc/platforms/mpc866ads_setup.c | |||
@@ -0,0 +1,273 @@ | |||
1 | /*arch/ppc/platforms/mpc885ads-setup.c | ||
2 | * | ||
3 | * Platform setup for the Freescale mpc885ads board | ||
4 | * | ||
5 | * Vitaly Bordug <vbordug@ru.mvista.com> | ||
6 | * | ||
7 | * Copyright 2005 MontaVista Software Inc. | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public License | ||
10 | * version 2. This program is licensed "as is" without any warranty of any | ||
11 | * kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/config.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/module.h> | ||
17 | #include <linux/param.h> | ||
18 | #include <linux/string.h> | ||
19 | #include <linux/ioport.h> | ||
20 | #include <linux/device.h> | ||
21 | |||
22 | #include <linux/fs_enet_pd.h> | ||
23 | #include <linux/mii.h> | ||
24 | |||
25 | #include <asm/delay.h> | ||
26 | #include <asm/io.h> | ||
27 | #include <asm/machdep.h> | ||
28 | #include <asm/page.h> | ||
29 | #include <asm/processor.h> | ||
30 | #include <asm/system.h> | ||
31 | #include <asm/time.h> | ||
32 | #include <asm/ppcboot.h> | ||
33 | #include <asm/8xx_immap.h> | ||
34 | #include <asm/commproc.h> | ||
35 | #include <asm/ppc_sys.h> | ||
36 | #include <asm/mpc8xx.h> | ||
37 | |||
38 | extern unsigned char __res[]; | ||
39 | |||
40 | static struct fs_mii_bus_info fec_mii_bus_info = { | ||
41 | .method = fsmii_fec, | ||
42 | .id = 0, | ||
43 | }; | ||
44 | |||
45 | static struct fs_mii_bus_info scc_mii_bus_info = { | ||
46 | .method = fsmii_fixed, | ||
47 | .id = 0, | ||
48 | .i.fixed.speed = 10, | ||
49 | .i.fixed.duplex = 0, | ||
50 | }; | ||
51 | |||
52 | static struct fs_platform_info mpc8xx_fec_pdata[] = { | ||
53 | { | ||
54 | .rx_ring = 128, | ||
55 | .tx_ring = 16, | ||
56 | .rx_copybreak = 240, | ||
57 | |||
58 | .use_napi = 1, | ||
59 | .napi_weight = 17, | ||
60 | |||
61 | .phy_addr = 15, | ||
62 | .phy_irq = -1, | ||
63 | |||
64 | .use_rmii = 0, | ||
65 | |||
66 | .bus_info = &fec_mii_bus_info, | ||
67 | } | ||
68 | }; | ||
69 | |||
70 | static struct fs_platform_info mpc8xx_scc_pdata = { | ||
71 | .rx_ring = 64, | ||
72 | .tx_ring = 8, | ||
73 | .rx_copybreak = 240, | ||
74 | |||
75 | .use_napi = 1, | ||
76 | .napi_weight = 17, | ||
77 | |||
78 | .phy_addr = -1, | ||
79 | .phy_irq = -1, | ||
80 | |||
81 | .bus_info = &scc_mii_bus_info, | ||
82 | }; | ||
83 | |||
84 | void __init board_init(void) | ||
85 | { | ||
86 | volatile cpm8xx_t *cp = cpmp; | ||
87 | unsigned *bcsr_io; | ||
88 | |||
89 | bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); | ||
90 | |||
91 | if (bcsr_io == NULL) { | ||
92 | printk(KERN_CRIT "Could not remap BCSR1\n"); | ||
93 | return; | ||
94 | } | ||
95 | #ifdef CONFIG_SERIAL_CPM_SMC1 | ||
96 | cp->cp_simode &= ~(0xe0000000 >> 17); /* brg1 */ | ||
97 | clrbits32(bcsr_io,(0x80000000 >> 7)); | ||
98 | #else | ||
99 | setbits32(bcsr_io,(0x80000000 >> 7)); | ||
100 | |||
101 | cp->cp_pbpar &= ~(0x000000c0); | ||
102 | cp->cp_pbdir |= 0x000000c0; | ||
103 | cp->cp_smc[0].smc_smcmr = 0; | ||
104 | cp->cp_smc[0].smc_smce = 0; | ||
105 | #endif | ||
106 | |||
107 | #ifdef CONFIG_SERIAL_CPM_SMC2 | ||
108 | cp->cp_simode &= ~(0xe0000000 >> 1); | ||
109 | cp->cp_simode |= (0x20000000 >> 1); /* brg2 */ | ||
110 | clrbits32(bcsr_io,(0x80000000 >> 13)); | ||
111 | #else | ||
112 | clrbits32(bcsr_io,(0x80000000 >> 13)); | ||
113 | cp->cp_pbpar &= ~(0x00000c00); | ||
114 | cp->cp_pbdir |= 0x00000c00; | ||
115 | cp->cp_smc[1].smc_smcmr = 0; | ||
116 | cp->cp_smc[1].smc_smce = 0; | ||
117 | #endif | ||
118 | iounmap(bcsr_io); | ||
119 | } | ||
120 | |||
121 | static void setup_fec1_ioports(void) | ||
122 | { | ||
123 | immap_t *immap = (immap_t *) IMAP_ADDR; | ||
124 | |||
125 | setbits16(&immap->im_ioport.iop_pdpar, 0x1fff); | ||
126 | setbits16(&immap->im_ioport.iop_pddir, 0x1fff); | ||
127 | } | ||
128 | |||
129 | static void setup_scc1_ioports(void) | ||
130 | { | ||
131 | immap_t *immap = (immap_t *) IMAP_ADDR; | ||
132 | unsigned *bcsr_io; | ||
133 | |||
134 | bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); | ||
135 | |||
136 | if (bcsr_io == NULL) { | ||
137 | printk(KERN_CRIT "Could not remap BCSR1\n"); | ||
138 | return; | ||
139 | } | ||
140 | |||
141 | /* Enable the PHY. | ||
142 | */ | ||
143 | clrbits32(bcsr_io,BCSR1_ETHEN); | ||
144 | |||
145 | /* Configure port A pins for Txd and Rxd. | ||
146 | */ | ||
147 | /* Disable receive and transmit in case EPPC-Bug started it. | ||
148 | */ | ||
149 | setbits16(&immap->im_ioport.iop_papar, PA_ENET_RXD | PA_ENET_TXD); | ||
150 | clrbits16(&immap->im_ioport.iop_padir, PA_ENET_RXD | PA_ENET_TXD); | ||
151 | clrbits16(&immap->im_ioport.iop_paodr, PA_ENET_TXD); | ||
152 | |||
153 | /* Configure port C pins to enable CLSN and RENA. | ||
154 | */ | ||
155 | clrbits16(&immap->im_ioport.iop_pcpar, PC_ENET_CLSN | PC_ENET_RENA); | ||
156 | clrbits16(&immap->im_ioport.iop_pcdir, PC_ENET_CLSN | PC_ENET_RENA); | ||
157 | setbits16(&immap->im_ioport.iop_pcso, PC_ENET_CLSN | PC_ENET_RENA); | ||
158 | /* Configure port A for TCLK and RCLK. | ||
159 | */ | ||
160 | setbits16(&immap->im_ioport.iop_papar, PA_ENET_TCLK | PA_ENET_RCLK); | ||
161 | clrbits16(&immap->im_ioport.iop_padir, PA_ENET_TCLK | PA_ENET_RCLK); | ||
162 | clrbits32(&immap->im_cpm.cp_pbpar, PB_ENET_TENA); | ||
163 | clrbits32(&immap->im_cpm.cp_pbdir, PB_ENET_TENA); | ||
164 | |||
165 | /* Configure Serial Interface clock routing. | ||
166 | * First, clear all SCC bits to zero, then set the ones we want. | ||
167 | */ | ||
168 | clrbits32(&immap->im_cpm.cp_sicr, SICR_ENET_MASK); | ||
169 | setbits32(&immap->im_cpm.cp_sicr, SICR_ENET_CLKRT); | ||
170 | |||
171 | /* In the original SCC enet driver the following code is placed at | ||
172 | the end of the initialization */ | ||
173 | setbits32(&immap->im_cpm.cp_pbpar, PB_ENET_TENA); | ||
174 | setbits32(&immap->im_cpm.cp_pbdir, PB_ENET_TENA); | ||
175 | |||
176 | } | ||
177 | |||
178 | static void mpc866ads_fixup_enet_pdata(struct platform_device *pdev, int fs_no) | ||
179 | { | ||
180 | struct fs_platform_info *fpi = pdev->dev.platform_data; | ||
181 | |||
182 | volatile cpm8xx_t *cp; | ||
183 | bd_t *bd = (bd_t *) __res; | ||
184 | char *e; | ||
185 | int i; | ||
186 | |||
187 | /* Get pointer to Communication Processor */ | ||
188 | cp = cpmp; | ||
189 | switch (fs_no) { | ||
190 | case fsid_fec1: | ||
191 | fpi = &mpc8xx_fec_pdata[0]; | ||
192 | fpi->init_ioports = &setup_fec1_ioports; | ||
193 | |||
194 | break; | ||
195 | case fsid_scc1: | ||
196 | fpi = &mpc8xx_scc_pdata; | ||
197 | fpi->init_ioports = &setup_scc1_ioports; | ||
198 | |||
199 | break; | ||
200 | default: | ||
201 | printk(KERN_WARNING"Device %s is not supported!\n", pdev->name); | ||
202 | return; | ||
203 | } | ||
204 | |||
205 | pdev->dev.platform_data = fpi; | ||
206 | fpi->fs_no = fs_no; | ||
207 | |||
208 | e = (unsigned char *)&bd->bi_enetaddr; | ||
209 | for (i = 0; i < 6; i++) | ||
210 | fpi->macaddr[i] = *e++; | ||
211 | |||
212 | fpi->macaddr[5 - pdev->id]++; | ||
213 | |||
214 | } | ||
215 | |||
216 | static void mpc866ads_fixup_fec_enet_pdata(struct platform_device *pdev, | ||
217 | int idx) | ||
218 | { | ||
219 | /* This is for FEC devices only */ | ||
220 | if (!pdev || !pdev->name || (!strstr(pdev->name, "fsl-cpm-fec"))) | ||
221 | return; | ||
222 | mpc866ads_fixup_enet_pdata(pdev, fsid_fec1 + pdev->id - 1); | ||
223 | } | ||
224 | |||
225 | static void mpc866ads_fixup_scc_enet_pdata(struct platform_device *pdev, | ||
226 | int idx) | ||
227 | { | ||
228 | /* This is for SCC devices only */ | ||
229 | if (!pdev || !pdev->name || (!strstr(pdev->name, "fsl-cpm-scc"))) | ||
230 | return; | ||
231 | |||
232 | mpc866ads_fixup_enet_pdata(pdev, fsid_scc1 + pdev->id - 1); | ||
233 | } | ||
234 | |||
235 | static int mpc866ads_platform_notify(struct device *dev) | ||
236 | { | ||
237 | static const struct platform_notify_dev_map dev_map[] = { | ||
238 | { | ||
239 | .bus_id = "fsl-cpm-fec", | ||
240 | .rtn = mpc866ads_fixup_fec_enet_pdata, | ||
241 | }, | ||
242 | { | ||
243 | .bus_id = "fsl-cpm-scc", | ||
244 | .rtn = mpc866ads_fixup_scc_enet_pdata, | ||
245 | }, | ||
246 | { | ||
247 | .bus_id = NULL | ||
248 | } | ||
249 | }; | ||
250 | |||
251 | platform_notify_map(dev_map,dev); | ||
252 | |||
253 | return 0; | ||
254 | } | ||
255 | |||
256 | int __init mpc866ads_init(void) | ||
257 | { | ||
258 | printk(KERN_NOTICE "mpc866ads: Init\n"); | ||
259 | |||
260 | platform_notify = mpc866ads_platform_notify; | ||
261 | |||
262 | ppc_sys_device_initfunc(); | ||
263 | ppc_sys_device_disable_all(); | ||
264 | |||
265 | #ifdef MPC8xx_SECOND_ETH_SCC1 | ||
266 | ppc_sys_device_enable(MPC8xx_CPM_SCC1); | ||
267 | #endif | ||
268 | ppc_sys_device_enable(MPC8xx_CPM_FEC1); | ||
269 | |||
270 | return 0; | ||
271 | } | ||
272 | |||
273 | arch_initcall(mpc866ads_init); | ||
diff --git a/arch/ppc/platforms/mpc885ads_setup.c b/arch/ppc/platforms/mpc885ads_setup.c new file mode 100644 index 000000000000..50a99e5f7c68 --- /dev/null +++ b/arch/ppc/platforms/mpc885ads_setup.c | |||
@@ -0,0 +1,389 @@ | |||
1 | /*arch/ppc/platforms/mpc885ads-setup.c | ||
2 | * | ||
3 | * Platform setup for the Freescale mpc885ads board | ||
4 | * | ||
5 | * Vitaly Bordug <vbordug@ru.mvista.com> | ||
6 | * | ||
7 | * Copyright 2005 MontaVista Software Inc. | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public License | ||
10 | * version 2. This program is licensed "as is" without any warranty of any | ||
11 | * kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/config.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/module.h> | ||
17 | #include <linux/param.h> | ||
18 | #include <linux/string.h> | ||
19 | #include <linux/ioport.h> | ||
20 | #include <linux/device.h> | ||
21 | |||
22 | #include <linux/fs_enet_pd.h> | ||
23 | #include <linux/mii.h> | ||
24 | |||
25 | #include <asm/delay.h> | ||
26 | #include <asm/io.h> | ||
27 | #include <asm/machdep.h> | ||
28 | #include <asm/page.h> | ||
29 | #include <asm/processor.h> | ||
30 | #include <asm/system.h> | ||
31 | #include <asm/time.h> | ||
32 | #include <asm/ppcboot.h> | ||
33 | #include <asm/8xx_immap.h> | ||
34 | #include <asm/commproc.h> | ||
35 | #include <asm/ppc_sys.h> | ||
36 | |||
37 | extern unsigned char __res[]; | ||
38 | |||
39 | static void __init mpc885ads_scc_phy_init(char); | ||
40 | |||
41 | static struct fs_mii_bus_info fec_mii_bus_info = { | ||
42 | .method = fsmii_fec, | ||
43 | .id = 0, | ||
44 | }; | ||
45 | |||
46 | static struct fs_mii_bus_info scc_mii_bus_info = { | ||
47 | #ifdef CONFIG_SCC_ENET_8xx_FIXED | ||
48 | .method = fsmii_fixed, | ||
49 | #else | ||
50 | .method = fsmii_fec, | ||
51 | #endif | ||
52 | |||
53 | .id = 0, | ||
54 | }; | ||
55 | |||
56 | static struct fs_platform_info mpc8xx_fec_pdata[] = { | ||
57 | { | ||
58 | .rx_ring = 128, | ||
59 | .tx_ring = 16, | ||
60 | .rx_copybreak = 240, | ||
61 | |||
62 | .use_napi = 1, | ||
63 | .napi_weight = 17, | ||
64 | |||
65 | .phy_addr = 0, | ||
66 | .phy_irq = SIU_IRQ7, | ||
67 | |||
68 | .bus_info = &fec_mii_bus_info, | ||
69 | }, { | ||
70 | .rx_ring = 128, | ||
71 | .tx_ring = 16, | ||
72 | .rx_copybreak = 240, | ||
73 | |||
74 | .use_napi = 1, | ||
75 | .napi_weight = 17, | ||
76 | |||
77 | .phy_addr = 1, | ||
78 | .phy_irq = SIU_IRQ7, | ||
79 | |||
80 | .bus_info = &fec_mii_bus_info, | ||
81 | } | ||
82 | }; | ||
83 | |||
84 | static struct fs_platform_info mpc8xx_scc_pdata = { | ||
85 | .rx_ring = 64, | ||
86 | .tx_ring = 8, | ||
87 | .rx_copybreak = 240, | ||
88 | |||
89 | .use_napi = 1, | ||
90 | .napi_weight = 17, | ||
91 | |||
92 | .phy_addr = 2, | ||
93 | #ifdef CONFIG_MPC8xx_SCC_ENET_FIXED | ||
94 | .phy_irq = -1, | ||
95 | #else | ||
96 | .phy_irq = SIU_IRQ7, | ||
97 | #endif | ||
98 | |||
99 | .bus_info = &scc_mii_bus_info, | ||
100 | }; | ||
101 | |||
102 | void __init board_init(void) | ||
103 | { | ||
104 | volatile cpm8xx_t *cp = cpmp; | ||
105 | unsigned int *bcsr_io; | ||
106 | |||
107 | #ifdef CONFIG_FS_ENET | ||
108 | immap_t *immap = (immap_t *) IMAP_ADDR; | ||
109 | #endif | ||
110 | bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); | ||
111 | |||
112 | if (bcsr_io == NULL) { | ||
113 | printk(KERN_CRIT "Could not remap BCSR\n"); | ||
114 | return; | ||
115 | } | ||
116 | #ifdef CONFIG_SERIAL_CPM_SMC1 | ||
117 | cp->cp_simode &= ~(0xe0000000 >> 17); /* brg1 */ | ||
118 | clrbits32(bcsr_io, BCSR1_RS232EN_1); | ||
119 | #else | ||
120 | setbits32(bcsr_io,BCSR1_RS232EN_1); | ||
121 | cp->cp_smc[0].smc_smcmr = 0; | ||
122 | cp->cp_smc[0].smc_smce = 0; | ||
123 | #endif | ||
124 | |||
125 | #ifdef CONFIG_SERIAL_CPM_SMC2 | ||
126 | cp->cp_simode &= ~(0xe0000000 >> 1); | ||
127 | cp->cp_simode |= (0x20000000 >> 1); /* brg2 */ | ||
128 | clrbits32(bcsr_io,BCSR1_RS232EN_2); | ||
129 | #else | ||
130 | setbits32(bcsr_io,BCSR1_RS232EN_2); | ||
131 | cp->cp_smc[1].smc_smcmr = 0; | ||
132 | cp->cp_smc[1].smc_smce = 0; | ||
133 | #endif | ||
134 | iounmap(bcsr_io); | ||
135 | |||
136 | #ifdef CONFIG_FS_ENET | ||
137 | /* use MDC for MII (common) */ | ||
138 | setbits16(&immap->im_ioport.iop_pdpar, 0x0080); | ||
139 | clrbits16(&immap->im_ioport.iop_pddir, 0x0080); | ||
140 | #endif | ||
141 | } | ||
142 | |||
143 | static void setup_fec1_ioports(void) | ||
144 | { | ||
145 | immap_t *immap = (immap_t *) IMAP_ADDR; | ||
146 | |||
147 | /* configure FEC1 pins */ | ||
148 | setbits16(&immap->im_ioport.iop_papar, 0xf830); | ||
149 | setbits16(&immap->im_ioport.iop_padir, 0x0830); | ||
150 | clrbits16(&immap->im_ioport.iop_padir, 0xf000); | ||
151 | setbits32(&immap->im_cpm.cp_pbpar, 0x00001001); | ||
152 | |||
153 | clrbits32(&immap->im_cpm.cp_pbdir, 0x00001001); | ||
154 | setbits16(&immap->im_ioport.iop_pcpar, 0x000c); | ||
155 | clrbits16(&immap->im_ioport.iop_pcdir, 0x000c); | ||
156 | setbits32(&immap->im_cpm.cp_pepar, 0x00000003); | ||
157 | |||
158 | setbits32(&immap->im_cpm.cp_pedir, 0x00000003); | ||
159 | clrbits32(&immap->im_cpm.cp_peso, 0x00000003); | ||
160 | clrbits32(&immap->im_cpm.cp_cptr, 0x00000100); | ||
161 | } | ||
162 | |||
163 | static void setup_fec2_ioports(void) | ||
164 | { | ||
165 | immap_t *immap = (immap_t *) IMAP_ADDR; | ||
166 | |||
167 | /* configure FEC2 pins */ | ||
168 | setbits32(&immap->im_cpm.cp_pepar, 0x0003fffc); | ||
169 | setbits32(&immap->im_cpm.cp_pedir, 0x0003fffc); | ||
170 | setbits32(&immap->im_cpm.cp_peso, 0x00037800); | ||
171 | clrbits32(&immap->im_cpm.cp_peso, 0x000087fc); | ||
172 | clrbits32(&immap->im_cpm.cp_cptr, 0x00000080); | ||
173 | } | ||
174 | |||
175 | static void setup_scc3_ioports(void) | ||
176 | { | ||
177 | immap_t *immap = (immap_t *) IMAP_ADDR; | ||
178 | unsigned *bcsr_io; | ||
179 | |||
180 | bcsr_io = ioremap(BCSR_ADDR, BCSR_SIZE); | ||
181 | |||
182 | if (bcsr_io == NULL) { | ||
183 | printk(KERN_CRIT "Could not remap BCSR\n"); | ||
184 | return; | ||
185 | } | ||
186 | |||
187 | /* Enable the PHY. | ||
188 | */ | ||
189 | setbits32(bcsr_io+4, BCSR4_ETH10_RST); | ||
190 | /* Configure port A pins for Txd and Rxd. | ||
191 | */ | ||
192 | setbits16(&immap->im_ioport.iop_papar, PA_ENET_RXD | PA_ENET_TXD); | ||
193 | clrbits16(&immap->im_ioport.iop_padir, PA_ENET_RXD | PA_ENET_TXD); | ||
194 | |||
195 | /* Configure port C pins to enable CLSN and RENA. | ||
196 | */ | ||
197 | clrbits16(&immap->im_ioport.iop_pcpar, PC_ENET_CLSN | PC_ENET_RENA); | ||
198 | clrbits16(&immap->im_ioport.iop_pcdir, PC_ENET_CLSN | PC_ENET_RENA); | ||
199 | setbits16(&immap->im_ioport.iop_pcso, PC_ENET_CLSN | PC_ENET_RENA); | ||
200 | |||
201 | /* Configure port E for TCLK and RCLK. | ||
202 | */ | ||
203 | setbits32(&immap->im_cpm.cp_pepar, PE_ENET_TCLK | PE_ENET_RCLK); | ||
204 | clrbits32(&immap->im_cpm.cp_pepar, PE_ENET_TENA); | ||
205 | clrbits32(&immap->im_cpm.cp_pedir, | ||
206 | PE_ENET_TCLK | PE_ENET_RCLK | PE_ENET_TENA); | ||
207 | clrbits32(&immap->im_cpm.cp_peso, PE_ENET_TCLK | PE_ENET_RCLK); | ||
208 | setbits32(&immap->im_cpm.cp_peso, PE_ENET_TENA); | ||
209 | |||
210 | /* Configure Serial Interface clock routing. | ||
211 | * First, clear all SCC bits to zero, then set the ones we want. | ||
212 | */ | ||
213 | clrbits32(&immap->im_cpm.cp_sicr, SICR_ENET_MASK); | ||
214 | setbits32(&immap->im_cpm.cp_sicr, SICR_ENET_CLKRT); | ||
215 | |||
216 | /* Disable Rx and Tx. SMC1 sshould be stopped if SCC3 eternet are used. | ||
217 | */ | ||
218 | immap->im_cpm.cp_smc[0].smc_smcmr &= ~(SMCMR_REN | SMCMR_TEN); | ||
219 | /* On the MPC885ADS SCC ethernet PHY is initialized in the full duplex mode | ||
220 | * by H/W setting after reset. SCC ethernet controller support only half duplex. | ||
221 | * This discrepancy of modes causes a lot of carrier lost errors. | ||
222 | */ | ||
223 | |||
224 | /* In the original SCC enet driver the following code is placed at | ||
225 | the end of the initialization */ | ||
226 | setbits32(&immap->im_cpm.cp_pepar, PE_ENET_TENA); | ||
227 | clrbits32(&immap->im_cpm.cp_pedir, PE_ENET_TENA); | ||
228 | setbits32(&immap->im_cpm.cp_peso, PE_ENET_TENA); | ||
229 | |||
230 | setbits32(bcsr_io+1, BCSR1_ETHEN); | ||
231 | iounmap(bcsr_io); | ||
232 | } | ||
233 | |||
234 | static void mpc885ads_fixup_enet_pdata(struct platform_device *pdev, int fs_no) | ||
235 | { | ||
236 | struct fs_platform_info *fpi = pdev->dev.platform_data; | ||
237 | |||
238 | volatile cpm8xx_t *cp; | ||
239 | bd_t *bd = (bd_t *) __res; | ||
240 | char *e; | ||
241 | int i; | ||
242 | |||
243 | /* Get pointer to Communication Processor */ | ||
244 | cp = cpmp; | ||
245 | switch (fs_no) { | ||
246 | case fsid_fec1: | ||
247 | fpi = &mpc8xx_fec_pdata[0]; | ||
248 | fpi->init_ioports = &setup_fec1_ioports; | ||
249 | break; | ||
250 | case fsid_fec2: | ||
251 | fpi = &mpc8xx_fec_pdata[1]; | ||
252 | fpi->init_ioports = &setup_fec2_ioports; | ||
253 | break; | ||
254 | case fsid_scc3: | ||
255 | fpi = &mpc8xx_scc_pdata; | ||
256 | fpi->init_ioports = &setup_scc3_ioports; | ||
257 | mpc885ads_scc_phy_init(fpi->phy_addr); | ||
258 | break; | ||
259 | default: | ||
260 | printk(KERN_WARNING"Device %s is not supported!\n", pdev->name); | ||
261 | return; | ||
262 | } | ||
263 | |||
264 | pdev->dev.platform_data = fpi; | ||
265 | fpi->fs_no = fs_no; | ||
266 | |||
267 | e = (unsigned char *)&bd->bi_enetaddr; | ||
268 | for (i = 0; i < 6; i++) | ||
269 | fpi->macaddr[i] = *e++; | ||
270 | |||
271 | fpi->macaddr[5 - pdev->id]++; | ||
272 | |||
273 | } | ||
274 | |||
275 | static void mpc885ads_fixup_fec_enet_pdata(struct platform_device *pdev, | ||
276 | int idx) | ||
277 | { | ||
278 | /* This is for FEC devices only */ | ||
279 | if (!pdev || !pdev->name || (!strstr(pdev->name, "fsl-cpm-fec"))) | ||
280 | return; | ||
281 | mpc885ads_fixup_enet_pdata(pdev, fsid_fec1 + pdev->id - 1); | ||
282 | } | ||
283 | |||
284 | static void __init mpc885ads_fixup_scc_enet_pdata(struct platform_device *pdev, | ||
285 | int idx) | ||
286 | { | ||
287 | /* This is for SCC devices only */ | ||
288 | if (!pdev || !pdev->name || (!strstr(pdev->name, "fsl-cpm-scc"))) | ||
289 | return; | ||
290 | |||
291 | mpc885ads_fixup_enet_pdata(pdev, fsid_scc1 + pdev->id - 1); | ||
292 | } | ||
293 | |||
294 | /* SCC ethernet controller does not have MII management channel. FEC1 MII | ||
295 | * channel is used to communicate with the 10Mbit PHY. | ||
296 | */ | ||
297 | |||
298 | #define MII_ECNTRL_PINMUX 0x4 | ||
299 | #define FEC_ECNTRL_PINMUX 0x00000004 | ||
300 | #define FEC_RCNTRL_MII_MODE 0x00000004 | ||
301 | |||
302 | /* Make MII read/write commands. | ||
303 | */ | ||
304 | #define mk_mii_write(REG, VAL, PHY_ADDR) (0x50020000 | (((REG) & 0x1f) << 18) | \ | ||
305 | ((VAL) & 0xffff) | ((PHY_ADDR) << 23)) | ||
306 | |||
307 | static void mpc885ads_scc_phy_init(char phy_addr) | ||
308 | { | ||
309 | volatile immap_t *immap; | ||
310 | volatile fec_t *fecp; | ||
311 | bd_t *bd; | ||
312 | |||
313 | bd = (bd_t *) __res; | ||
314 | immap = (immap_t *) IMAP_ADDR; /* pointer to internal registers */ | ||
315 | fecp = &(immap->im_cpm.cp_fec); | ||
316 | |||
317 | /* Enable MII pins of the FEC1 | ||
318 | */ | ||
319 | setbits16(&immap->im_ioport.iop_pdpar, 0x0080); | ||
320 | clrbits16(&immap->im_ioport.iop_pddir, 0x0080); | ||
321 | /* Set MII speed to 2.5 MHz | ||
322 | */ | ||
323 | out_be32(&fecp->fec_mii_speed, | ||
324 | ((((bd->bi_intfreq + 4999999) / 2500000) / 2) & 0x3F) << 1); | ||
325 | |||
326 | /* Enable FEC pin MUX | ||
327 | */ | ||
328 | setbits32(&fecp->fec_ecntrl, MII_ECNTRL_PINMUX); | ||
329 | setbits32(&fecp->fec_r_cntrl, FEC_RCNTRL_MII_MODE); | ||
330 | |||
331 | out_be32(&fecp->fec_mii_data, | ||
332 | mk_mii_write(MII_BMCR, BMCR_ISOLATE, phy_addr)); | ||
333 | udelay(100); | ||
334 | out_be32(&fecp->fec_mii_data, | ||
335 | mk_mii_write(MII_ADVERTISE, | ||
336 | ADVERTISE_10HALF | ADVERTISE_CSMA, phy_addr)); | ||
337 | udelay(100); | ||
338 | |||
339 | /* Disable FEC MII settings | ||
340 | */ | ||
341 | clrbits32(&fecp->fec_ecntrl, MII_ECNTRL_PINMUX); | ||
342 | clrbits32(&fecp->fec_r_cntrl, FEC_RCNTRL_MII_MODE); | ||
343 | out_be32(&fecp->fec_mii_speed, 0); | ||
344 | } | ||
345 | |||
346 | static int mpc885ads_platform_notify(struct device *dev) | ||
347 | { | ||
348 | |||
349 | static const struct platform_notify_dev_map dev_map[] = { | ||
350 | { | ||
351 | .bus_id = "fsl-cpm-fec", | ||
352 | .rtn = mpc885ads_fixup_fec_enet_pdata, | ||
353 | }, | ||
354 | { | ||
355 | .bus_id = "fsl-cpm-scc", | ||
356 | .rtn = mpc885ads_fixup_scc_enet_pdata, | ||
357 | }, | ||
358 | { | ||
359 | .bus_id = NULL | ||
360 | } | ||
361 | }; | ||
362 | |||
363 | platform_notify_map(dev_map,dev); | ||
364 | |||
365 | } | ||
366 | |||
367 | int __init mpc885ads_init(void) | ||
368 | { | ||
369 | printk(KERN_NOTICE "mpc885ads: Init\n"); | ||
370 | |||
371 | platform_notify = mpc885ads_platform_notify; | ||
372 | |||
373 | ppc_sys_device_initfunc(); | ||
374 | ppc_sys_device_disable_all(); | ||
375 | |||
376 | ppc_sys_device_enable(MPC8xx_CPM_FEC1); | ||
377 | |||
378 | #ifdef CONFIG_MPC8xx_SECOND_ETH_SCC3 | ||
379 | ppc_sys_device_enable(MPC8xx_CPM_SCC1); | ||
380 | |||
381 | #endif | ||
382 | #ifdef CONFIG_MPC8xx_SECOND_ETH_FEC2 | ||
383 | ppc_sys_device_enable(MPC8xx_CPM_FEC2); | ||
384 | #endif | ||
385 | |||
386 | return 0; | ||
387 | } | ||
388 | |||
389 | arch_initcall(mpc885ads_init); | ||
diff --git a/arch/ppc/platforms/mvme5100.c b/arch/ppc/platforms/mvme5100.c index 108eb182dddc..c717cd92c028 100644 --- a/arch/ppc/platforms/mvme5100.c +++ b/arch/ppc/platforms/mvme5100.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/mvme5100.c | ||
3 | * | ||
4 | * Board setup routines for the Motorola MVME5100. | 2 | * Board setup routines for the Motorola MVME5100. |
5 | * | 3 | * |
6 | * Author: Matt Porter <mporter@mvista.com> | 4 | * Author: Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/platforms/pal4.h b/arch/ppc/platforms/pal4.h index 641a11a31657..8569c423d887 100644 --- a/arch/ppc/platforms/pal4.h +++ b/arch/ppc/platforms/pal4.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pal4.h | ||
3 | * | ||
4 | * Definitions for SBS Palomar IV board | 2 | * Definitions for SBS Palomar IV board |
5 | * | 3 | * |
6 | * Author: Dan Cox | 4 | * Author: Dan Cox |
diff --git a/arch/ppc/platforms/pal4_pci.c b/arch/ppc/platforms/pal4_pci.c index c3b1b757a48b..d81ae1c7e1cf 100644 --- a/arch/ppc/platforms/pal4_pci.c +++ b/arch/ppc/platforms/pal4_pci.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pal4_pci.c | ||
3 | * | ||
4 | * PCI support for SBS Palomar IV | 2 | * PCI support for SBS Palomar IV |
5 | * | 3 | * |
6 | * Author: Dan Cox | 4 | * Author: Dan Cox |
diff --git a/arch/ppc/platforms/pal4_serial.h b/arch/ppc/platforms/pal4_serial.h index a715c66e1adf..a75343224cfd 100644 --- a/arch/ppc/platforms/pal4_serial.h +++ b/arch/ppc/platforms/pal4_serial.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pal4_serial.h | ||
3 | * | ||
4 | * Definitions for SBS PalomarIV serial support | 2 | * Definitions for SBS PalomarIV serial support |
5 | * | 3 | * |
6 | * Author: Dan Cox | 4 | * Author: Dan Cox |
diff --git a/arch/ppc/platforms/pal4_setup.c b/arch/ppc/platforms/pal4_setup.c index f93a3f871932..3c3d881df00d 100644 --- a/arch/ppc/platforms/pal4_setup.c +++ b/arch/ppc/platforms/pal4_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pal4_setup.c | ||
3 | * | ||
4 | * Board setup routines for the SBS PalomarIV. | 2 | * Board setup routines for the SBS PalomarIV. |
5 | * | 3 | * |
6 | * Author: Dan Cox | 4 | * Author: Dan Cox |
diff --git a/arch/ppc/platforms/powerpmc250.c b/arch/ppc/platforms/powerpmc250.c index e6b520e6e13f..c3a86be11fb7 100644 --- a/arch/ppc/platforms/powerpmc250.c +++ b/arch/ppc/platforms/powerpmc250.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/powerpmc250.c | ||
3 | * | ||
4 | * Board setup routines for Force PowerPMC-250 Processor PMC | 2 | * Board setup routines for Force PowerPMC-250 Processor PMC |
5 | * | 3 | * |
6 | * Author: Troy Benjegerdes <tbenjegerdes@mvista.com> | 4 | * Author: Troy Benjegerdes <tbenjegerdes@mvista.com> |
diff --git a/arch/ppc/platforms/pplus.c b/arch/ppc/platforms/pplus.c index 22bd40cfb092..de2761ebe0d9 100644 --- a/arch/ppc/platforms/pplus.c +++ b/arch/ppc/platforms/pplus.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pplus.c | ||
3 | * | ||
4 | * Board and PCI setup routines for MCG PowerPlus | 2 | * Board and PCI setup routines for MCG PowerPlus |
5 | * | 3 | * |
6 | * Author: Randy Vinson <rvinson@mvista.com> | 4 | * Author: Randy Vinson <rvinson@mvista.com> |
diff --git a/arch/ppc/platforms/pplus.h b/arch/ppc/platforms/pplus.h index 90f0cb2d409f..a07cbbdd72c6 100644 --- a/arch/ppc/platforms/pplus.h +++ b/arch/ppc/platforms/pplus.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pplus.h | ||
3 | * | ||
4 | * Definitions for Motorola MCG Falcon/Raven & HAWK North Bridge & Memory ctlr. | 2 | * Definitions for Motorola MCG Falcon/Raven & HAWK North Bridge & Memory ctlr. |
5 | * | 3 | * |
6 | * Author: Mark A. Greerinclude/asm-ppc/hawk.h | 4 | * Author: Mark A. Greerinclude/asm-ppc/hawk.h |
diff --git a/arch/ppc/platforms/pq2ads.c b/arch/ppc/platforms/pq2ads.c index 71c9fca1fe9b..3365fd788a7a 100644 --- a/arch/ppc/platforms/pq2ads.c +++ b/arch/ppc/platforms/pq2ads.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/pq2ads.c | ||
3 | * | ||
4 | * PQ2ADS platform support | 2 | * PQ2ADS platform support |
5 | * | 3 | * |
6 | * Author: Kumar Gala <galak@kernel.crashing.org> | 4 | * Author: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/platforms/pq2ads.h b/arch/ppc/platforms/pq2ads.h index 067d9a5aebc1..6b26dd36c640 100644 --- a/arch/ppc/platforms/pq2ads.h +++ b/arch/ppc/platforms/pq2ads.h | |||
@@ -13,6 +13,10 @@ | |||
13 | 13 | ||
14 | #include <asm/ppcboot.h> | 14 | #include <asm/ppcboot.h> |
15 | 15 | ||
16 | #if defined(CONFIG_ADS8272) | ||
17 | #define BOARD_CHIP_NAME "8272" | ||
18 | #endif | ||
19 | |||
16 | /* Memory map is configured by the PROM startup. | 20 | /* Memory map is configured by the PROM startup. |
17 | * We just map a few things we need. The CSR is actually 4 byte-wide | 21 | * We just map a few things we need. The CSR is actually 4 byte-wide |
18 | * registers that can be accessed as 8-, 16-, or 32-bit values. | 22 | * registers that can be accessed as 8-, 16-, or 32-bit values. |
diff --git a/arch/ppc/platforms/pq2ads_pd.h b/arch/ppc/platforms/pq2ads_pd.h new file mode 100644 index 000000000000..8f14a43eafec --- /dev/null +++ b/arch/ppc/platforms/pq2ads_pd.h | |||
@@ -0,0 +1,114 @@ | |||
1 | #ifndef __PQ2ADS_PD_H | ||
2 | #define __PQ2ADS_PD_H | ||
3 | /* | ||
4 | * arch/ppc/platforms/82xx/pq2ads_pd.h | ||
5 | * | ||
6 | * Some defines for MPC82xx board-specific PlatformDevice descriptions | ||
7 | * | ||
8 | * 2005 (c) MontaVista Software, Inc. | ||
9 | * Vitaly Bordug <vbordug@ru.mvista.com> | ||
10 | * | ||
11 | * This file is licensed under the terms of the GNU General Public License | ||
12 | * version 2. This program is licensed "as is" without any warranty of any | ||
13 | * kind, whether express or implied. | ||
14 | */ | ||
15 | |||
16 | /* FCC1 Clock Source Configuration. These can be redefined in the board specific file. | ||
17 | Can only choose from CLK9-12 */ | ||
18 | |||
19 | #define F1_RXCLK 11 | ||
20 | #define F1_TXCLK 10 | ||
21 | |||
22 | /* FCC2 Clock Source Configuration. These can be redefined in the board specific file. | ||
23 | Can only choose from CLK13-16 */ | ||
24 | #define F2_RXCLK 15 | ||
25 | #define F2_TXCLK 16 | ||
26 | |||
27 | /* FCC3 Clock Source Configuration. These can be redefined in the board specific file. | ||
28 | Can only choose from CLK13-16 */ | ||
29 | #define F3_RXCLK 13 | ||
30 | #define F3_TXCLK 14 | ||
31 | |||
32 | /* Automatically generates register configurations */ | ||
33 | #define PC_CLK(x) ((uint)(1<<(x-1))) /* FCC CLK I/O ports */ | ||
34 | |||
35 | #define CMXFCR_RF1CS(x) ((uint)((x-5)<<27)) /* FCC1 Receive Clock Source */ | ||
36 | #define CMXFCR_TF1CS(x) ((uint)((x-5)<<24)) /* FCC1 Transmit Clock Source */ | ||
37 | #define CMXFCR_RF2CS(x) ((uint)((x-9)<<19)) /* FCC2 Receive Clock Source */ | ||
38 | #define CMXFCR_TF2CS(x) ((uint)((x-9)<<16)) /* FCC2 Transmit Clock Source */ | ||
39 | #define CMXFCR_RF3CS(x) ((uint)((x-9)<<11)) /* FCC3 Receive Clock Source */ | ||
40 | #define CMXFCR_TF3CS(x) ((uint)((x-9)<<8)) /* FCC3 Transmit Clock Source */ | ||
41 | |||
42 | #define PC_F1RXCLK PC_CLK(F1_RXCLK) | ||
43 | #define PC_F1TXCLK PC_CLK(F1_TXCLK) | ||
44 | #define CMX1_CLK_ROUTE (CMXFCR_RF1CS(F1_RXCLK) | CMXFCR_TF1CS(F1_TXCLK)) | ||
45 | #define CMX1_CLK_MASK ((uint)0xff000000) | ||
46 | |||
47 | #define PC_F2RXCLK PC_CLK(F2_RXCLK) | ||
48 | #define PC_F2TXCLK PC_CLK(F2_TXCLK) | ||
49 | #define CMX2_CLK_ROUTE (CMXFCR_RF2CS(F2_RXCLK) | CMXFCR_TF2CS(F2_TXCLK)) | ||
50 | #define CMX2_CLK_MASK ((uint)0x00ff0000) | ||
51 | |||
52 | #define PC_F3RXCLK PC_CLK(F3_RXCLK) | ||
53 | #define PC_F3TXCLK PC_CLK(F3_TXCLK) | ||
54 | #define CMX3_CLK_ROUTE (CMXFCR_RF3CS(F3_RXCLK) | CMXFCR_TF3CS(F3_TXCLK)) | ||
55 | #define CMX3_CLK_MASK ((uint)0x0000ff00) | ||
56 | |||
57 | /* I/O Pin assignment for FCC1. I don't yet know the best way to do this, | ||
58 | * but there is little variation among the choices. | ||
59 | */ | ||
60 | #define PA1_COL 0x00000001U | ||
61 | #define PA1_CRS 0x00000002U | ||
62 | #define PA1_TXER 0x00000004U | ||
63 | #define PA1_TXEN 0x00000008U | ||
64 | #define PA1_RXDV 0x00000010U | ||
65 | #define PA1_RXER 0x00000020U | ||
66 | #define PA1_TXDAT 0x00003c00U | ||
67 | #define PA1_RXDAT 0x0003c000U | ||
68 | #define PA1_PSORA0 (PA1_RXDAT | PA1_TXDAT) | ||
69 | #define PA1_PSORA1 (PA1_COL | PA1_CRS | PA1_TXER | PA1_TXEN | \ | ||
70 | PA1_RXDV | PA1_RXER) | ||
71 | #define PA1_DIRA0 (PA1_RXDAT | PA1_CRS | PA1_COL | PA1_RXER | PA1_RXDV) | ||
72 | #define PA1_DIRA1 (PA1_TXDAT | PA1_TXEN | PA1_TXER) | ||
73 | |||
74 | |||
75 | /* I/O Pin assignment for FCC2. I don't yet know the best way to do this, | ||
76 | * but there is little variation among the choices. | ||
77 | */ | ||
78 | #define PB2_TXER 0x00000001U | ||
79 | #define PB2_RXDV 0x00000002U | ||
80 | #define PB2_TXEN 0x00000004U | ||
81 | #define PB2_RXER 0x00000008U | ||
82 | #define PB2_COL 0x00000010U | ||
83 | #define PB2_CRS 0x00000020U | ||
84 | #define PB2_TXDAT 0x000003c0U | ||
85 | #define PB2_RXDAT 0x00003c00U | ||
86 | #define PB2_PSORB0 (PB2_RXDAT | PB2_TXDAT | PB2_CRS | PB2_COL | \ | ||
87 | PB2_RXER | PB2_RXDV | PB2_TXER) | ||
88 | #define PB2_PSORB1 (PB2_TXEN) | ||
89 | #define PB2_DIRB0 (PB2_RXDAT | PB2_CRS | PB2_COL | PB2_RXER | PB2_RXDV) | ||
90 | #define PB2_DIRB1 (PB2_TXDAT | PB2_TXEN | PB2_TXER) | ||
91 | |||
92 | |||
93 | /* I/O Pin assignment for FCC3. I don't yet know the best way to do this, | ||
94 | * but there is little variation among the choices. | ||
95 | */ | ||
96 | #define PB3_RXDV 0x00004000U | ||
97 | #define PB3_RXER 0x00008000U | ||
98 | #define PB3_TXER 0x00010000U | ||
99 | #define PB3_TXEN 0x00020000U | ||
100 | #define PB3_COL 0x00040000U | ||
101 | #define PB3_CRS 0x00080000U | ||
102 | #define PB3_TXDAT 0x0f000000U | ||
103 | #define PB3_RXDAT 0x00f00000U | ||
104 | #define PB3_PSORB0 (PB3_RXDAT | PB3_TXDAT | PB3_CRS | PB3_COL | \ | ||
105 | PB3_RXER | PB3_RXDV | PB3_TXER | PB3_TXEN) | ||
106 | #define PB3_PSORB1 0 | ||
107 | #define PB3_DIRB0 (PB3_RXDAT | PB3_CRS | PB3_COL | PB3_RXER | PB3_RXDV) | ||
108 | #define PB3_DIRB1 (PB3_TXDAT | PB3_TXEN | PB3_TXER) | ||
109 | |||
110 | #define FCC_MEM_OFFSET(x) (CPM_FCC_SPECIAL_BASE + (x*128)) | ||
111 | #define FCC1_MEM_OFFSET FCC_MEM_OFFSET(0) | ||
112 | #define FCC2_MEM_OFFSET FCC_MEM_OFFSET(1) | ||
113 | |||
114 | #endif | ||
diff --git a/arch/ppc/platforms/prep_setup.c b/arch/ppc/platforms/prep_setup.c index d06535802003..a0fc628ffb1e 100644 --- a/arch/ppc/platforms/prep_setup.c +++ b/arch/ppc/platforms/prep_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/setup.c | ||
3 | * | ||
4 | * Copyright (C) 1995 Linus Torvalds | 2 | * Copyright (C) 1995 Linus Torvalds |
5 | * Adapted from 'alpha' version by Gary Thomas | 3 | * Adapted from 'alpha' version by Gary Thomas |
6 | * Modified by Cort Dougan (cort@cs.nmt.edu) | 4 | * Modified by Cort Dougan (cort@cs.nmt.edu) |
diff --git a/arch/ppc/platforms/prpmc750.c b/arch/ppc/platforms/prpmc750.c index 0bb14a5e824c..cdd9cfb13ee9 100644 --- a/arch/ppc/platforms/prpmc750.c +++ b/arch/ppc/platforms/prpmc750.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/prpmc750_setup.c | ||
3 | * | ||
4 | * Board setup routines for Motorola PrPMC750 | 2 | * Board setup routines for Motorola PrPMC750 |
5 | * | 3 | * |
6 | * Author: Matt Porter <mporter@mvista.com> | 4 | * Author: Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/platforms/prpmc800.c b/arch/ppc/platforms/prpmc800.c index de7baefacd3a..e459a199fb1d 100644 --- a/arch/ppc/platforms/prpmc800.c +++ b/arch/ppc/platforms/prpmc800.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/prpmc800.c | ||
3 | * | ||
4 | * Author: Dale Farnsworth <dale.farnsworth@mvista.com> | 2 | * Author: Dale Farnsworth <dale.farnsworth@mvista.com> |
5 | * | 3 | * |
6 | * 2001-2004 (c) MontaVista, Software, Inc. This file is licensed under | 4 | * 2001-2004 (c) MontaVista, Software, Inc. This file is licensed under |
diff --git a/arch/ppc/platforms/radstone_ppc7d.c b/arch/ppc/platforms/radstone_ppc7d.c index 872c0a3ba3c7..bc26b6d71c1d 100644 --- a/arch/ppc/platforms/radstone_ppc7d.c +++ b/arch/ppc/platforms/radstone_ppc7d.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/radstone_ppc7d.c | ||
3 | * | ||
4 | * Board setup routines for the Radstone PPC7D boards. | 2 | * Board setup routines for the Radstone PPC7D boards. |
5 | * | 3 | * |
6 | * Author: James Chapman <jchapman@katalix.com> | 4 | * Author: James Chapman <jchapman@katalix.com> |
@@ -685,11 +683,10 @@ ppc7d_fixup_i2c_pdata(struct platform_device *pdev) | |||
685 | 683 | ||
686 | pdata = pdev->dev.platform_data; | 684 | pdata = pdev->dev.platform_data; |
687 | if (pdata == NULL) { | 685 | if (pdata == NULL) { |
688 | pdata = kmalloc(sizeof(*pdata), GFP_KERNEL); | 686 | pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); |
689 | if (pdata == NULL) | 687 | if (pdata == NULL) |
690 | return; | 688 | return; |
691 | 689 | ||
692 | memset(pdata, 0, sizeof(*pdata)); | ||
693 | pdev->dev.platform_data = pdata; | 690 | pdev->dev.platform_data = pdata; |
694 | } | 691 | } |
695 | 692 | ||
@@ -712,7 +709,7 @@ ppc7d_fixup_i2c_pdata(struct platform_device *pdev) | |||
712 | } | 709 | } |
713 | #endif | 710 | #endif |
714 | 711 | ||
715 | static int __init ppc7d_platform_notify(struct device *dev) | 712 | static int ppc7d_platform_notify(struct device *dev) |
716 | { | 713 | { |
717 | static struct { | 714 | static struct { |
718 | char *bus_id; | 715 | char *bus_id; |
diff --git a/arch/ppc/platforms/radstone_ppc7d.h b/arch/ppc/platforms/radstone_ppc7d.h index 938375510be4..2bb093a0c03e 100644 --- a/arch/ppc/platforms/radstone_ppc7d.h +++ b/arch/ppc/platforms/radstone_ppc7d.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/radstone_ppc7d.h | ||
3 | * | ||
4 | * Board definitions for the Radstone PPC7D boards. | 2 | * Board definitions for the Radstone PPC7D boards. |
5 | * | 3 | * |
6 | * Author: James Chapman <jchapman@katalix.com> | 4 | * Author: James Chapman <jchapman@katalix.com> |
diff --git a/arch/ppc/platforms/sandpoint.c b/arch/ppc/platforms/sandpoint.c index 9eeed3572309..6dc459decb2d 100644 --- a/arch/ppc/platforms/sandpoint.c +++ b/arch/ppc/platforms/sandpoint.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/sandpoint_setup.c | ||
3 | * | ||
4 | * Board setup routines for the Motorola SPS Sandpoint Test Platform. | 2 | * Board setup routines for the Motorola SPS Sandpoint Test Platform. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer | 4 | * Author: Mark A. Greer |
diff --git a/arch/ppc/platforms/sandpoint.h b/arch/ppc/platforms/sandpoint.h index f4e982cb69df..3b64e6418489 100644 --- a/arch/ppc/platforms/sandpoint.h +++ b/arch/ppc/platforms/sandpoint.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/sandpoint.h | ||
3 | * | ||
4 | * Definitions for Motorola SPS Sandpoint Test Platform | 2 | * Definitions for Motorola SPS Sandpoint Test Platform |
5 | * | 3 | * |
6 | * Author: Mark A. Greer | 4 | * Author: Mark A. Greer |
diff --git a/arch/ppc/platforms/sbc82xx.c b/arch/ppc/platforms/sbc82xx.c index 74c9ff72c3dd..866807b4ad0b 100644 --- a/arch/ppc/platforms/sbc82xx.c +++ b/arch/ppc/platforms/sbc82xx.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/sbc82xx.c | ||
3 | * | ||
4 | * SBC82XX platform support | 2 | * SBC82XX platform support |
5 | * | 3 | * |
6 | * Author: Guy Streeter <streeter@redhat.com> | 4 | * Author: Guy Streeter <streeter@redhat.com> |
diff --git a/arch/ppc/platforms/spruce.c b/arch/ppc/platforms/spruce.c index 69e1de7971f2..3783deccd9b2 100644 --- a/arch/ppc/platforms/spruce.c +++ b/arch/ppc/platforms/spruce.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/spruce.c | ||
3 | * | ||
4 | * Board and PCI setup routines for IBM Spruce | 2 | * Board and PCI setup routines for IBM Spruce |
5 | * | 3 | * |
6 | * Author: MontaVista Software <source@mvista.com> | 4 | * Author: MontaVista Software <source@mvista.com> |
diff --git a/arch/ppc/platforms/tqm8260_setup.c b/arch/ppc/platforms/tqm8260_setup.c index 3409139330b1..b766339f44ac 100644 --- a/arch/ppc/platforms/tqm8260_setup.c +++ b/arch/ppc/platforms/tqm8260_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/tqm8260_setup.c | ||
3 | * | ||
4 | * TQM8260 platform support | 2 | * TQM8260 platform support |
5 | * | 3 | * |
6 | * Author: Allen Curtis <acurtis@onz.com> | 4 | * Author: Allen Curtis <acurtis@onz.com> |
diff --git a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile index 159dcd92a6d1..5cb62c6a51c8 100644 --- a/arch/ppc/syslib/Makefile +++ b/arch/ppc/syslib/Makefile | |||
@@ -17,8 +17,8 @@ obj-$(CONFIG_440GX) += ibm440gx_common.o | |||
17 | obj-$(CONFIG_440SP) += ibm440gx_common.o ibm440sp_common.o | 17 | obj-$(CONFIG_440SP) += ibm440gx_common.o ibm440sp_common.o |
18 | obj-$(CONFIG_440SPE) += ibm440gx_common.o ibm440sp_common.o ppc440spe_pcie.o | 18 | obj-$(CONFIG_440SPE) += ibm440gx_common.o ibm440sp_common.o ppc440spe_pcie.o |
19 | ifeq ($(CONFIG_4xx),y) | 19 | ifeq ($(CONFIG_4xx),y) |
20 | ifeq ($(CONFIG_VIRTEX_II_PRO),y) | 20 | ifeq ($(CONFIG_XILINX_VIRTEX),y) |
21 | obj-$(CONFIG_40x) += xilinx_pic.o | 21 | obj-$(CONFIG_40x) += xilinx_pic.o ppc_sys.o |
22 | else | 22 | else |
23 | ifeq ($(CONFIG_403),y) | 23 | ifeq ($(CONFIG_403),y) |
24 | obj-$(CONFIG_40x) += ppc403_pic.o | 24 | obj-$(CONFIG_40x) += ppc403_pic.o |
diff --git a/arch/ppc/syslib/cpc700.h b/arch/ppc/syslib/cpc700.h index f2c002531019..0a8a5d84390f 100644 --- a/arch/ppc/syslib/cpc700.h +++ b/arch/ppc/syslib/cpc700.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/cpc700.h | ||
3 | * | ||
4 | * Header file for IBM CPC700 Host Bridge, et. al. | 2 | * Header file for IBM CPC700 Host Bridge, et. al. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer | 4 | * Author: Mark A. Greer |
diff --git a/arch/ppc/syslib/cpc700_pic.c b/arch/ppc/syslib/cpc700_pic.c index 75fe8eb10693..5add0a919ef6 100644 --- a/arch/ppc/syslib/cpc700_pic.c +++ b/arch/ppc/syslib/cpc700_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/cpc700_pic.c | ||
3 | * | ||
4 | * Interrupt controller support for IBM Spruce | 2 | * Interrupt controller support for IBM Spruce |
5 | * | 3 | * |
6 | * Authors: Mark Greer, Matt Porter, and Johnnie Peters | 4 | * Authors: Mark Greer, Matt Porter, and Johnnie Peters |
diff --git a/arch/ppc/syslib/cpc710.h b/arch/ppc/syslib/cpc710.h index cc0afd804029..5299bf8b5d01 100644 --- a/arch/ppc/syslib/cpc710.h +++ b/arch/ppc/syslib/cpc710.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/cpc710.h | ||
3 | * | ||
4 | * Definitions for the IBM CPC710 PCI Host Bridge | 2 | * Definitions for the IBM CPC710 PCI Host Bridge |
5 | * | 3 | * |
6 | * Author: Matt Porter <mporter@mvista.com> | 4 | * Author: Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/syslib/gen550.h b/arch/ppc/syslib/gen550.h index 039d249e19a8..5254d3cdbca6 100644 --- a/arch/ppc/syslib/gen550.h +++ b/arch/ppc/syslib/gen550.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/gen550.h | ||
3 | * | ||
4 | * gen550 prototypes | 2 | * gen550 prototypes |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/gen550_dbg.c b/arch/ppc/syslib/gen550_dbg.c index 9ef0113c83d1..9fcff74bfdd0 100644 --- a/arch/ppc/syslib/gen550_dbg.c +++ b/arch/ppc/syslib/gen550_dbg.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/gen550_dbg.c | ||
3 | * | ||
4 | * A library of polled 16550 serial routines. These are intended to | 2 | * A library of polled 16550 serial routines. These are intended to |
5 | * be used to support progress messages, xmon, kgdb, etc. on a | 3 | * be used to support progress messages, xmon, kgdb, etc. on a |
6 | * variety of platforms. | 4 | * variety of platforms. |
diff --git a/arch/ppc/syslib/gen550_kgdb.c b/arch/ppc/syslib/gen550_kgdb.c index 7239d5d7ddcd..874078a7664d 100644 --- a/arch/ppc/syslib/gen550_kgdb.c +++ b/arch/ppc/syslib/gen550_kgdb.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/gen550_kgdb.c | ||
3 | * | ||
4 | * Generic 16550 kgdb support intended to be useful on a variety | 2 | * Generic 16550 kgdb support intended to be useful on a variety |
5 | * of platforms. To enable this support, it is necessary to set | 3 | * of platforms. To enable this support, it is necessary to set |
6 | * the CONFIG_GEN550 option. Any virtual mapping of the serial | 4 | * the CONFIG_GEN550 option. Any virtual mapping of the serial |
diff --git a/arch/ppc/syslib/gt64260_pic.c b/arch/ppc/syslib/gt64260_pic.c index f97b3a9abd1e..dc3bd9ecbbf6 100644 --- a/arch/ppc/syslib/gt64260_pic.c +++ b/arch/ppc/syslib/gt64260_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/gt64260_pic.c | ||
3 | * | ||
4 | * Interrupt controller support for Galileo's GT64260. | 2 | * Interrupt controller support for Galileo's GT64260. |
5 | * | 3 | * |
6 | * Author: Chris Zankel <source@mvista.com> | 4 | * Author: Chris Zankel <source@mvista.com> |
diff --git a/arch/ppc/syslib/harrier.c b/arch/ppc/syslib/harrier.c index a6b3f8645793..c1583f488325 100644 --- a/arch/ppc/syslib/harrier.c +++ b/arch/ppc/syslib/harrier.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/harrier.c | ||
3 | * | ||
4 | * Motorola MCG Harrier northbridge/memory controller support | 2 | * Motorola MCG Harrier northbridge/memory controller support |
5 | * | 3 | * |
6 | * Author: Dale Farnsworth | 4 | * Author: Dale Farnsworth |
diff --git a/arch/ppc/syslib/hawk_common.c b/arch/ppc/syslib/hawk_common.c index a9911dc3a82f..c5bf16b0d6a1 100644 --- a/arch/ppc/syslib/hawk_common.c +++ b/arch/ppc/syslib/hawk_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/hawk_common.c | ||
3 | * | ||
4 | * Common Motorola PowerPlus Platform--really Falcon/Raven or HAWK. | 2 | * Common Motorola PowerPlus Platform--really Falcon/Raven or HAWK. |
5 | * | 3 | * |
6 | * Author: Mark A. Greer | 4 | * Author: Mark A. Greer |
diff --git a/arch/ppc/syslib/ibm440gp_common.c b/arch/ppc/syslib/ibm440gp_common.c index 0d6be2d6dd67..fbaae5f6d834 100644 --- a/arch/ppc/syslib/ibm440gp_common.c +++ b/arch/ppc/syslib/ibm440gp_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ibm440gp_common.c | ||
3 | * | ||
4 | * PPC440GP system library | 2 | * PPC440GP system library |
5 | * | 3 | * |
6 | * Matt Porter <mporter@mvista.com> | 4 | * Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/syslib/ibm440gp_common.h b/arch/ppc/syslib/ibm440gp_common.h index a054d83cb1ac..f48529f3c23d 100644 --- a/arch/ppc/syslib/ibm440gp_common.h +++ b/arch/ppc/syslib/ibm440gp_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ibm440gp_common.h | ||
3 | * | ||
4 | * PPC440GP system library | 2 | * PPC440GP system library |
5 | * | 3 | * |
6 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | 4 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> |
diff --git a/arch/ppc/syslib/ibm440gx_common.c b/arch/ppc/syslib/ibm440gx_common.c index c36db279b43d..a7dd55f1c63e 100644 --- a/arch/ppc/syslib/ibm440gx_common.c +++ b/arch/ppc/syslib/ibm440gx_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ibm440gx_common.c | ||
3 | * | ||
4 | * PPC440GX system library | 2 | * PPC440GX system library |
5 | * | 3 | * |
6 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | 4 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> |
diff --git a/arch/ppc/syslib/ibm440gx_common.h b/arch/ppc/syslib/ibm440gx_common.h index e73aa0411d35..a2ab9fab8e34 100644 --- a/arch/ppc/syslib/ibm440gx_common.h +++ b/arch/ppc/syslib/ibm440gx_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ibm440gx_common.h | ||
3 | * | ||
4 | * PPC440GX system library | 2 | * PPC440GX system library |
5 | * | 3 | * |
6 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | 4 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> |
diff --git a/arch/ppc/syslib/ibm440sp_common.c b/arch/ppc/syslib/ibm440sp_common.c index cdafda127d81..293e4138d172 100644 --- a/arch/ppc/syslib/ibm440sp_common.c +++ b/arch/ppc/syslib/ibm440sp_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ibm440sp_common.c | ||
3 | * | ||
4 | * PPC440SP/PPC440SPe system library | 2 | * PPC440SP/PPC440SPe system library |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ibm440sp_common.h b/arch/ppc/syslib/ibm440sp_common.h index a21a9906dcc9..8077bf8ed118 100644 --- a/arch/ppc/syslib/ibm440sp_common.h +++ b/arch/ppc/syslib/ibm440sp_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ibm440sp_common.h | ||
3 | * | ||
4 | * PPC440SP system library | 2 | * PPC440SP system library |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ibm44x_common.c b/arch/ppc/syslib/ibm44x_common.c index 71db11d22158..14a981a5cea7 100644 --- a/arch/ppc/syslib/ibm44x_common.c +++ b/arch/ppc/syslib/ibm44x_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ibm44x_common.c | ||
3 | * | ||
4 | * PPC44x system library | 2 | * PPC44x system library |
5 | * | 3 | * |
6 | * Matt Porter <mporter@kernel.crashing.org> | 4 | * Matt Porter <mporter@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ibm44x_common.h b/arch/ppc/syslib/ibm44x_common.h index b25a8995e4e9..f179db8634e0 100644 --- a/arch/ppc/syslib/ibm44x_common.h +++ b/arch/ppc/syslib/ibm44x_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ibm44x_common.h | ||
3 | * | ||
4 | * PPC44x system library | 2 | * PPC44x system library |
5 | * | 3 | * |
6 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | 4 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> |
diff --git a/arch/ppc/syslib/m8260_pci_erratum9.c b/arch/ppc/syslib/m8260_pci_erratum9.c index 1dc7e4e1d491..99e4bc0e42af 100644 --- a/arch/ppc/syslib/m8260_pci_erratum9.c +++ b/arch/ppc/syslib/m8260_pci_erratum9.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/mpc8260_pci9.c | ||
3 | * | ||
4 | * Workaround for device erratum PCI 9. | 2 | * Workaround for device erratum PCI 9. |
5 | * See Motorola's "XPC826xA Family Device Errata Reference." | 3 | * See Motorola's "XPC826xA Family Device Errata Reference." |
6 | * The erratum applies to all 8260 family Hip4 processors. It is scheduled | 4 | * The erratum applies to all 8260 family Hip4 processors. It is scheduled |
diff --git a/arch/ppc/syslib/m8260_setup.c b/arch/ppc/syslib/m8260_setup.c index 76a2aa4ce65e..b7a6cb2d8d52 100644 --- a/arch/ppc/syslib/m8260_setup.c +++ b/arch/ppc/syslib/m8260_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/m8260_setup.c | ||
3 | * | ||
4 | * Copyright (C) 1995 Linus Torvalds | 2 | * Copyright (C) 1995 Linus Torvalds |
5 | * Adapted from 'alpha' version by Gary Thomas | 3 | * Adapted from 'alpha' version by Gary Thomas |
6 | * Modified by Cort Dougan (cort@cs.nmt.edu) | 4 | * Modified by Cort Dougan (cort@cs.nmt.edu) |
diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c index 688616de3cde..dae9af78bde1 100644 --- a/arch/ppc/syslib/m8xx_setup.c +++ b/arch/ppc/syslib/m8xx_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/setup.c | ||
3 | * | ||
4 | * Copyright (C) 1995 Linus Torvalds | 2 | * Copyright (C) 1995 Linus Torvalds |
5 | * Adapted from 'alpha' version by Gary Thomas | 3 | * Adapted from 'alpha' version by Gary Thomas |
6 | * Modified by Cort Dougan (cort@cs.nmt.edu) | 4 | * Modified by Cort Dougan (cort@cs.nmt.edu) |
@@ -34,6 +32,13 @@ | |||
34 | #include <linux/seq_file.h> | 32 | #include <linux/seq_file.h> |
35 | #include <linux/root_dev.h> | 33 | #include <linux/root_dev.h> |
36 | 34 | ||
35 | #if defined(CONFIG_MTD) && defined(CONFIG_MTD_PHYSMAP) | ||
36 | #include <linux/mtd/partitions.h> | ||
37 | #include <linux/mtd/physmap.h> | ||
38 | #include <linux/mtd/mtd.h> | ||
39 | #include <linux/mtd/map.h> | ||
40 | #endif | ||
41 | |||
37 | #include <asm/mmu.h> | 42 | #include <asm/mmu.h> |
38 | #include <asm/reg.h> | 43 | #include <asm/reg.h> |
39 | #include <asm/residual.h> | 44 | #include <asm/residual.h> |
@@ -49,6 +54,34 @@ | |||
49 | 54 | ||
50 | #include "ppc8xx_pic.h" | 55 | #include "ppc8xx_pic.h" |
51 | 56 | ||
57 | #ifdef CONFIG_MTD_PHYSMAP | ||
58 | #define MPC8xxADS_BANK_WIDTH 4 | ||
59 | #endif | ||
60 | |||
61 | #define MPC8xxADS_U_BOOT_SIZE 0x80000 | ||
62 | #define MPC8xxADS_FREE_AREA_OFFSET MPC8xxADS_U_BOOT_SIZE | ||
63 | |||
64 | #if defined(CONFIG_MTD_PARTITIONS) | ||
65 | /* | ||
66 | NOTE: bank width and interleave relative to the installed flash | ||
67 | should have been chosen within MTD_CFI_GEOMETRY options. | ||
68 | */ | ||
69 | static struct mtd_partition mpc8xxads_partitions[] = { | ||
70 | { | ||
71 | .name = "bootloader", | ||
72 | .size = MPC8xxADS_U_BOOT_SIZE, | ||
73 | .offset = 0, | ||
74 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
75 | }, { | ||
76 | .name = "User FS", | ||
77 | .offset = MPC8xxADS_FREE_AREA_OFFSET | ||
78 | } | ||
79 | }; | ||
80 | |||
81 | #define mpc8xxads_part_num (sizeof (mpc8xxads_partitions) / sizeof (mpc8xxads_partitions[0])) | ||
82 | |||
83 | #endif | ||
84 | |||
52 | static int m8xx_set_rtc_time(unsigned long time); | 85 | static int m8xx_set_rtc_time(unsigned long time); |
53 | static unsigned long m8xx_get_rtc_time(void); | 86 | static unsigned long m8xx_get_rtc_time(void); |
54 | void m8xx_calibrate_decr(void); | 87 | void m8xx_calibrate_decr(void); |
@@ -71,6 +104,10 @@ board_init(void) | |||
71 | void __init | 104 | void __init |
72 | m8xx_setup_arch(void) | 105 | m8xx_setup_arch(void) |
73 | { | 106 | { |
107 | #if defined(CONFIG_MTD) && defined(CONFIG_MTD_PHYSMAP) | ||
108 | bd_t *binfo = (bd_t *)__res; | ||
109 | #endif | ||
110 | |||
74 | /* Reset the Communication Processor Module. | 111 | /* Reset the Communication Processor Module. |
75 | */ | 112 | */ |
76 | m8xx_cpm_reset(); | 113 | m8xx_cpm_reset(); |
@@ -106,6 +143,17 @@ m8xx_setup_arch(void) | |||
106 | } | 143 | } |
107 | #endif | 144 | #endif |
108 | #endif | 145 | #endif |
146 | |||
147 | #if defined (CONFIG_MPC86XADS) || defined (CONFIG_MPC885ADS) | ||
148 | #if defined(CONFIG_MTD_PHYSMAP) | ||
149 | physmap_configure(binfo->bi_flashstart, binfo->bi_flashsize, | ||
150 | MPC8xxADS_BANK_WIDTH, NULL); | ||
151 | #ifdef CONFIG_MTD_PARTITIONS | ||
152 | physmap_set_partitions(mpc8xxads_partitions, mpc8xxads_part_num); | ||
153 | #endif /* CONFIG_MTD_PARTITIONS */ | ||
154 | #endif /* CONFIG_MTD_PHYSMAP */ | ||
155 | #endif | ||
156 | |||
109 | board_init(); | 157 | board_init(); |
110 | } | 158 | } |
111 | 159 | ||
@@ -140,9 +188,11 @@ void __init __attribute__ ((weak)) | |||
140 | init_internal_rtc(void) | 188 | init_internal_rtc(void) |
141 | { | 189 | { |
142 | /* Disable the RTC one second and alarm interrupts. */ | 190 | /* Disable the RTC one second and alarm interrupts. */ |
143 | out_be16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc, in_be16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc) & ~(RTCSC_SIE | RTCSC_ALE)); | 191 | clrbits16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc, (RTCSC_SIE | RTCSC_ALE)); |
192 | |||
144 | /* Enable the RTC */ | 193 | /* Enable the RTC */ |
145 | out_be16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc, in_be16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc) | (RTCSC_RTF | RTCSC_RTE)); | 194 | setbits16(&((immap_t *)IMAP_ADDR)->im_sit.sit_rtcsc, (RTCSC_RTF | RTCSC_RTE)); |
195 | |||
146 | } | 196 | } |
147 | 197 | ||
148 | /* The decrementer counts at the system (internal) clock frequency divided by | 198 | /* The decrementer counts at the system (internal) clock frequency divided by |
@@ -159,8 +209,7 @@ void __init m8xx_calibrate_decr(void) | |||
159 | out_be32(&((immap_t *)IMAP_ADDR)->im_clkrstk.cark_sccrk, KAPWR_KEY); | 209 | out_be32(&((immap_t *)IMAP_ADDR)->im_clkrstk.cark_sccrk, KAPWR_KEY); |
160 | 210 | ||
161 | /* Force all 8xx processors to use divide by 16 processor clock. */ | 211 | /* Force all 8xx processors to use divide by 16 processor clock. */ |
162 | out_be32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_sccr, | 212 | setbits32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_sccr, 0x02000000); |
163 | in_be32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_sccr)|0x02000000); | ||
164 | /* Processor frequency is MHz. | 213 | /* Processor frequency is MHz. |
165 | * The value 'fp' is the number of decrementer ticks per second. | 214 | * The value 'fp' is the number of decrementer ticks per second. |
166 | */ | 215 | */ |
@@ -239,8 +288,8 @@ m8xx_restart(char *cmd) | |||
239 | __volatile__ unsigned char dummy; | 288 | __volatile__ unsigned char dummy; |
240 | 289 | ||
241 | local_irq_disable(); | 290 | local_irq_disable(); |
242 | out_be32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_plprcr, in_be32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_plprcr) | 0x00000080); | ||
243 | 291 | ||
292 | setbits32(&((immap_t *)IMAP_ADDR)->im_clkrst.car_plprcr, 0x00000080); | ||
244 | /* Clear the ME bit in MSR to cause checkstop on machine check | 293 | /* Clear the ME bit in MSR to cause checkstop on machine check |
245 | */ | 294 | */ |
246 | mtmsr(mfmsr() & ~0x1000); | 295 | mtmsr(mfmsr() & ~0x1000); |
@@ -310,8 +359,8 @@ m8xx_init_IRQ(void) | |||
310 | i8259_init(0); | 359 | i8259_init(0); |
311 | 360 | ||
312 | /* The i8259 cascade interrupt must be level sensitive. */ | 361 | /* The i8259 cascade interrupt must be level sensitive. */ |
313 | out_be32(&((immap_t *)IMAP_ADDR)->im_siu_conf.sc_siel, in_be32(&((immap_t *)IMAP_ADDR)->im_siu_conf.sc_siel & ~(0x80000000 >> ISA_BRIDGE_INT))); | ||
314 | 362 | ||
363 | clrbits32(&((immap_t *)IMAP_ADDR)->im_siu_conf.sc_siel, (0x80000000 >> ISA_BRIDGE_INT)); | ||
315 | if (setup_irq(ISA_BRIDGE_INT, &mbx_i8259_irqaction)) | 364 | if (setup_irq(ISA_BRIDGE_INT, &mbx_i8259_irqaction)) |
316 | enable_irq(ISA_BRIDGE_INT); | 365 | enable_irq(ISA_BRIDGE_INT); |
317 | #endif /* CONFIG_PCI */ | 366 | #endif /* CONFIG_PCI */ |
diff --git a/arch/ppc/syslib/m8xx_wdt.c b/arch/ppc/syslib/m8xx_wdt.c index df6c9557b86a..ac11d7bab443 100644 --- a/arch/ppc/syslib/m8xx_wdt.c +++ b/arch/ppc/syslib/m8xx_wdt.c | |||
@@ -41,8 +41,7 @@ static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev, struct pt_regs *regs) | |||
41 | 41 | ||
42 | m8xx_wdt_reset(); | 42 | m8xx_wdt_reset(); |
43 | 43 | ||
44 | out_be16(&imap->im_sit.sit_piscr, in_be16(&imap->im_sit.sit_piscr) | PISCR_PS); /* clear irq */ | 44 | setbits16(&imap->im_sit.sit_piscr, PISCR_PS); |
45 | |||
46 | return IRQ_HANDLED; | 45 | return IRQ_HANDLED; |
47 | } | 46 | } |
48 | 47 | ||
diff --git a/arch/ppc/syslib/mpc10x_common.c b/arch/ppc/syslib/mpc10x_common.c index 3e039706bdbc..2fc7c4150a18 100644 --- a/arch/ppc/syslib/mpc10x_common.c +++ b/arch/ppc/syslib/mpc10x_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc10x_common.c | ||
3 | * | ||
4 | * Common routines for the Motorola SPS MPC106, MPC107 and MPC8240 Host bridge, | 2 | * Common routines for the Motorola SPS MPC106, MPC107 and MPC8240 Host bridge, |
5 | * Mem ctlr, EPIC, etc. | 3 | * Mem ctlr, EPIC, etc. |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc52xx_devices.c b/arch/ppc/syslib/mpc52xx_devices.c index da3c74bfdc92..7487539a4e92 100644 --- a/arch/ppc/syslib/mpc52xx_devices.c +++ b/arch/ppc/syslib/mpc52xx_devices.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc52xx_devices.c | ||
3 | * | ||
4 | * Freescale MPC52xx device descriptions | 2 | * Freescale MPC52xx device descriptions |
5 | * | 3 | * |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc52xx_pci.c b/arch/ppc/syslib/mpc52xx_pci.c index 313c96ec7eb1..9ec525f9fe98 100644 --- a/arch/ppc/syslib/mpc52xx_pci.c +++ b/arch/ppc/syslib/mpc52xx_pci.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc52xx_pci.c | ||
3 | * | ||
4 | * PCI code for the Freescale MPC52xx embedded CPU. | 2 | * PCI code for the Freescale MPC52xx embedded CPU. |
5 | * | 3 | * |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc52xx_pci.h b/arch/ppc/syslib/mpc52xx_pci.h index 04b509a02530..77d47dbba85e 100644 --- a/arch/ppc/syslib/mpc52xx_pci.h +++ b/arch/ppc/syslib/mpc52xx_pci.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc52xx_pci.h | ||
3 | * | ||
4 | * PCI Include file the Freescale MPC52xx embedded cpu chips | 2 | * PCI Include file the Freescale MPC52xx embedded cpu chips |
5 | * | 3 | * |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc52xx_pic.c b/arch/ppc/syslib/mpc52xx_pic.c index 4c4497e62517..c4406f9dc6a3 100644 --- a/arch/ppc/syslib/mpc52xx_pic.c +++ b/arch/ppc/syslib/mpc52xx_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc52xx_pic.c | ||
3 | * | ||
4 | * Programmable Interrupt Controller functions for the Freescale MPC52xx | 2 | * Programmable Interrupt Controller functions for the Freescale MPC52xx |
5 | * embedded CPU. | 3 | * embedded CPU. |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc52xx_setup.c b/arch/ppc/syslib/mpc52xx_setup.c index a4a4b02227df..2ee48ce0a517 100644 --- a/arch/ppc/syslib/mpc52xx_setup.c +++ b/arch/ppc/syslib/mpc52xx_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc52xx_setup.c | ||
3 | * | ||
4 | * Common code for the boards based on Freescale MPC52xx embedded CPU. | 2 | * Common code for the boards based on Freescale MPC52xx embedded CPU. |
5 | * | 3 | * |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc52xx_sys.c b/arch/ppc/syslib/mpc52xx_sys.c index 9a0f90aa8aac..b4e6f978f057 100644 --- a/arch/ppc/syslib/mpc52xx_sys.c +++ b/arch/ppc/syslib/mpc52xx_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc52xx_sys.c | ||
3 | * | ||
4 | * Freescale MPC52xx system descriptions | 2 | * Freescale MPC52xx system descriptions |
5 | * | 3 | * |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mpc83xx_devices.c b/arch/ppc/syslib/mpc83xx_devices.c index f9b95de70e23..1af2c000fcfa 100644 --- a/arch/ppc/syslib/mpc83xx_devices.c +++ b/arch/ppc/syslib/mpc83xx_devices.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/83xx/mpc83xx_devices.c | ||
3 | * | ||
4 | * MPC83xx Device descriptions | 2 | * MPC83xx Device descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/mpc83xx_sys.c b/arch/ppc/syslib/mpc83xx_sys.c index 82cf3ab77f4a..0498ae7e01e3 100644 --- a/arch/ppc/syslib/mpc83xx_sys.c +++ b/arch/ppc/syslib/mpc83xx_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/83xx/mpc83xx_sys.c | ||
3 | * | ||
4 | * MPC83xx System descriptions | 2 | * MPC83xx System descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/mpc85xx_devices.c b/arch/ppc/syslib/mpc85xx_devices.c index 00e9b6ff2f6e..7735336f5b8f 100644 --- a/arch/ppc/syslib/mpc85xx_devices.c +++ b/arch/ppc/syslib/mpc85xx_devices.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc85xx_devices.c | ||
3 | * | ||
4 | * MPC85xx Device descriptions | 2 | * MPC85xx Device descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/mpc85xx_sys.c b/arch/ppc/syslib/mpc85xx_sys.c index 397cfbcce5ea..d96a93dbcb5a 100644 --- a/arch/ppc/syslib/mpc85xx_sys.c +++ b/arch/ppc/syslib/mpc85xx_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/85xx/mpc85xx_sys.c | ||
3 | * | ||
4 | * MPC85xx System descriptions | 2 | * MPC85xx System descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/mpc8xx_devices.c b/arch/ppc/syslib/mpc8xx_devices.c index 92dc98b36bde..bd41ed83beb3 100644 --- a/arch/ppc/syslib/mpc8xx_devices.c +++ b/arch/ppc/syslib/mpc8xx_devices.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mpc8xx_devices.c | ||
3 | * | ||
4 | * MPC8xx Device descriptions | 2 | * MPC8xx Device descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/mpc8xx_sys.c b/arch/ppc/syslib/mpc8xx_sys.c index d3c617521603..eee213284855 100644 --- a/arch/ppc/syslib/mpc8xx_sys.c +++ b/arch/ppc/syslib/mpc8xx_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/mpc8xx_sys.c | ||
3 | * | ||
4 | * MPC8xx System descriptions | 2 | * MPC8xx System descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/mv64360_pic.c b/arch/ppc/syslib/mv64360_pic.c index 58b0aa813e85..5a19697060f0 100644 --- a/arch/ppc/syslib/mv64360_pic.c +++ b/arch/ppc/syslib/mv64360_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/mv64360_pic.c | ||
3 | * | ||
4 | * Interrupt controller support for Marvell's MV64360. | 2 | * Interrupt controller support for Marvell's MV64360. |
5 | * | 3 | * |
6 | * Author: Rabeeh Khoury <rabeeh@galileo.co.il> | 4 | * Author: Rabeeh Khoury <rabeeh@galileo.co.il> |
diff --git a/arch/ppc/syslib/mv64x60.c b/arch/ppc/syslib/mv64x60.c index 1f01b7e2376b..3b039c30a439 100644 --- a/arch/ppc/syslib/mv64x60.c +++ b/arch/ppc/syslib/mv64x60.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mv64x60.c | ||
3 | * | ||
4 | * Common routines for the Marvell/Galileo Discovery line of host bridges | 2 | * Common routines for the Marvell/Galileo Discovery line of host bridges |
5 | * (gt64260, mv64360, mv64460, ...). | 3 | * (gt64260, mv64360, mv64460, ...). |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/mv64x60_dbg.c b/arch/ppc/syslib/mv64x60_dbg.c index fa5b2e45e0ca..9cf18764a1a1 100644 --- a/arch/ppc/syslib/mv64x60_dbg.c +++ b/arch/ppc/syslib/mv64x60_dbg.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mv64x60_dbg.c | ||
3 | * | ||
4 | * KGDB and progress routines for the Marvell/Galileo MV64x60 (Discovery). | 2 | * KGDB and progress routines for the Marvell/Galileo MV64x60 (Discovery). |
5 | * | 3 | * |
6 | * Author: Mark A. Greer <mgreer@mvista.com> | 4 | * Author: Mark A. Greer <mgreer@mvista.com> |
diff --git a/arch/ppc/syslib/mv64x60_win.c b/arch/ppc/syslib/mv64x60_win.c index 5b827e2bbe22..4bf1ad17bf1a 100644 --- a/arch/ppc/syslib/mv64x60_win.c +++ b/arch/ppc/syslib/mv64x60_win.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/mv64x60_win.c | ||
3 | * | ||
4 | * Tables with info on how to manipulate the 32 & 64 bit windows on the | 2 | * Tables with info on how to manipulate the 32 & 64 bit windows on the |
5 | * various types of Marvell bridge chips. | 3 | * various types of Marvell bridge chips. |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/ocp.c b/arch/ppc/syslib/ocp.c index 2fe28ded2c60..a4ecc2ee579f 100644 --- a/arch/ppc/syslib/ocp.c +++ b/arch/ppc/syslib/ocp.c | |||
@@ -451,10 +451,9 @@ ocp_driver_init(void) | |||
451 | DBG(("ocp: ocp_driver_init()...\n")); | 451 | DBG(("ocp: ocp_driver_init()...\n")); |
452 | 452 | ||
453 | /* Allocate/register primary OCP bus */ | 453 | /* Allocate/register primary OCP bus */ |
454 | ocp_bus = kmalloc(sizeof(struct device), GFP_KERNEL); | 454 | ocp_bus = kzalloc(sizeof(struct device), GFP_KERNEL); |
455 | if (ocp_bus == NULL) | 455 | if (ocp_bus == NULL) |
456 | return 1; | 456 | return 1; |
457 | memset(ocp_bus, 0, sizeof(struct device)); | ||
458 | strcpy(ocp_bus->bus_id, "ocp"); | 457 | strcpy(ocp_bus->bus_id, "ocp"); |
459 | 458 | ||
460 | bus_register(&ocp_bus_type); | 459 | bus_register(&ocp_bus_type); |
diff --git a/arch/ppc/syslib/open_pic.c b/arch/ppc/syslib/open_pic.c index 894779712b46..38e5b93fbe41 100644 --- a/arch/ppc/syslib/open_pic.c +++ b/arch/ppc/syslib/open_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/open_pic.c -- OpenPIC Interrupt Handling | ||
3 | * | ||
4 | * Copyright (C) 1997 Geert Uytterhoeven | 2 | * Copyright (C) 1997 Geert Uytterhoeven |
5 | * | 3 | * |
6 | * This file is subject to the terms and conditions of the GNU General Public | 4 | * This file is subject to the terms and conditions of the GNU General Public |
diff --git a/arch/ppc/syslib/open_pic2.c b/arch/ppc/syslib/open_pic2.c index 1c40049b9a45..bcbe40de26fe 100644 --- a/arch/ppc/syslib/open_pic2.c +++ b/arch/ppc/syslib/open_pic2.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/open_pic.c -- OpenPIC Interrupt Handling | ||
3 | * | ||
4 | * Copyright (C) 1997 Geert Uytterhoeven | 2 | * Copyright (C) 1997 Geert Uytterhoeven |
5 | * | 3 | * |
6 | * This file is subject to the terms and conditions of the GNU General Public | 4 | * This file is subject to the terms and conditions of the GNU General Public |
diff --git a/arch/ppc/syslib/open_pic_defs.h b/arch/ppc/syslib/open_pic_defs.h index 6c94e7131463..3a25de7cb572 100644 --- a/arch/ppc/syslib/open_pic_defs.h +++ b/arch/ppc/syslib/open_pic_defs.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/open_pic_defs.h -- OpenPIC definitions | ||
3 | * | ||
4 | * Copyright (C) 1997 Geert Uytterhoeven | 2 | * Copyright (C) 1997 Geert Uytterhoeven |
5 | * | 3 | * |
6 | * This file is based on the following documentation: | 4 | * This file is based on the following documentation: |
diff --git a/arch/ppc/syslib/pci_auto.c b/arch/ppc/syslib/pci_auto.c index d64207c2a972..ee20a86fcc4b 100644 --- a/arch/ppc/syslib/pci_auto.c +++ b/arch/ppc/syslib/pci_auto.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/pci_auto.c | ||
3 | * | ||
4 | * PCI autoconfiguration library | 2 | * PCI autoconfiguration library |
5 | * | 3 | * |
6 | * Author: Matt Porter <mporter@mvista.com> | 4 | * Author: Matt Porter <mporter@mvista.com> |
diff --git a/arch/ppc/syslib/ppc4xx_dma.c b/arch/ppc/syslib/ppc4xx_dma.c index 05ccd598dd4e..b40b96a8c609 100644 --- a/arch/ppc/syslib/ppc4xx_dma.c +++ b/arch/ppc/syslib/ppc4xx_dma.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ppc4xx_dma.c | ||
3 | * | ||
4 | * IBM PPC4xx DMA engine core library | 2 | * IBM PPC4xx DMA engine core library |
5 | * | 3 | * |
6 | * Copyright 2000-2004 MontaVista Software Inc. | 4 | * Copyright 2000-2004 MontaVista Software Inc. |
diff --git a/arch/ppc/syslib/ppc4xx_pic.c b/arch/ppc/syslib/ppc4xx_pic.c index aa4165144ec2..fd9af0fc0e9f 100644 --- a/arch/ppc/syslib/ppc4xx_pic.c +++ b/arch/ppc/syslib/ppc4xx_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc4xx_pic.c | ||
3 | * | ||
4 | * Interrupt controller driver for PowerPC 4xx-based processors. | 2 | * Interrupt controller driver for PowerPC 4xx-based processors. |
5 | * | 3 | * |
6 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> | 4 | * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net> |
diff --git a/arch/ppc/syslib/ppc4xx_pm.c b/arch/ppc/syslib/ppc4xx_pm.c deleted file mode 100644 index 60a479204885..000000000000 --- a/arch/ppc/syslib/ppc4xx_pm.c +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | /* | ||
2 | * Author: Armin Kuster <akuster@mvista.com> | ||
3 | * | ||
4 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under | ||
5 | * the terms of the GNU General Public License version 2. This program | ||
6 | * is licensed "as is" without any warranty of any kind, whether express | ||
7 | * or implied. | ||
8 | * | ||
9 | * This an attempt to get Power Management going for the IBM 4xx processor. | ||
10 | * This was derived from the ppc4xx._setup.c file | ||
11 | */ | ||
12 | |||
13 | #include <linux/config.h> | ||
14 | #include <linux/init.h> | ||
15 | |||
16 | #include <asm/ibm4xx.h> | ||
17 | |||
18 | void __init | ||
19 | ppc4xx_pm_init(void) | ||
20 | { | ||
21 | |||
22 | unsigned int value = 0; | ||
23 | |||
24 | /* turn off unused hardware to save power */ | ||
25 | #ifdef CONFIG_405GP | ||
26 | value |= CPM_DCP; /* CodePack */ | ||
27 | #endif | ||
28 | |||
29 | #if !defined(CONFIG_IBM_OCP_GPIO) | ||
30 | value |= CPM_GPIO0; | ||
31 | #endif | ||
32 | |||
33 | #if !defined(CONFIG_PPC405_I2C_ADAP) | ||
34 | value |= CPM_IIC0; | ||
35 | #ifdef CONFIG_STB03xxx | ||
36 | value |= CPM_IIC1; | ||
37 | #endif | ||
38 | #endif | ||
39 | |||
40 | |||
41 | #if !defined(CONFIG_405_DMA) | ||
42 | value |= CPM_DMA; | ||
43 | #endif | ||
44 | |||
45 | mtdcr(DCRN_CPMFR, value); | ||
46 | |||
47 | } | ||
diff --git a/arch/ppc/syslib/ppc4xx_sgdma.c b/arch/ppc/syslib/ppc4xx_sgdma.c index 9f76e8ee39ed..280ea010a9c8 100644 --- a/arch/ppc/syslib/ppc4xx_sgdma.c +++ b/arch/ppc/syslib/ppc4xx_sgdma.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/ppc4xx_sgdma.c | ||
3 | * | ||
4 | * IBM PPC4xx DMA engine scatter/gather library | 2 | * IBM PPC4xx DMA engine scatter/gather library |
5 | * | 3 | * |
6 | * Copyright 2002-2003 MontaVista Software Inc. | 4 | * Copyright 2002-2003 MontaVista Software Inc. |
diff --git a/arch/ppc/syslib/ppc83xx_setup.c b/arch/ppc/syslib/ppc83xx_setup.c index 7bada82527a8..26afd637dc81 100644 --- a/arch/ppc/syslib/ppc83xx_setup.c +++ b/arch/ppc/syslib/ppc83xx_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc83xx_setup.c | ||
3 | * | ||
4 | * MPC83XX common board code | 2 | * MPC83XX common board code |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ppc83xx_setup.h b/arch/ppc/syslib/ppc83xx_setup.h index a122a7322e5e..478b011cd963 100644 --- a/arch/ppc/syslib/ppc83xx_setup.h +++ b/arch/ppc/syslib/ppc83xx_setup.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc83xx_setup.h | ||
3 | * | ||
4 | * MPC83XX common board definitions | 2 | * MPC83XX common board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ppc85xx_common.c b/arch/ppc/syslib/ppc85xx_common.c index 19ad537225e4..0145c968f9ad 100644 --- a/arch/ppc/syslib/ppc85xx_common.c +++ b/arch/ppc/syslib/ppc85xx_common.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc85xx_common.c | ||
3 | * | ||
4 | * MPC85xx support routines | 2 | * MPC85xx support routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ppc85xx_common.h b/arch/ppc/syslib/ppc85xx_common.h index 94edf32151dd..182744a1321c 100644 --- a/arch/ppc/syslib/ppc85xx_common.h +++ b/arch/ppc/syslib/ppc85xx_common.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc85xx_common.h | ||
3 | * | ||
4 | * MPC85xx support routines | 2 | * MPC85xx support routines |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ppc85xx_setup.c b/arch/ppc/syslib/ppc85xx_setup.c index e4dda43fdaa7..e70b34ee6275 100644 --- a/arch/ppc/syslib/ppc85xx_setup.c +++ b/arch/ppc/syslib/ppc85xx_setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc85xx_setup.c | ||
3 | * | ||
4 | * MPC85XX common board code | 2 | * MPC85XX common board code |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ppc85xx_setup.h b/arch/ppc/syslib/ppc85xx_setup.h index e340b0545fb5..f55b8032d3d9 100644 --- a/arch/ppc/syslib/ppc85xx_setup.h +++ b/arch/ppc/syslib/ppc85xx_setup.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc85xx_setup.h | ||
3 | * | ||
4 | * MPC85XX common board definitions | 2 | * MPC85XX common board definitions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/ppc_sys.c b/arch/ppc/syslib/ppc_sys.c index c0b93c4191ee..60c724e11584 100644 --- a/arch/ppc/syslib/ppc_sys.c +++ b/arch/ppc/syslib/ppc_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/ppc_sys.c | ||
3 | * | ||
4 | * PPC System library functions | 2 | * PPC System library functions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
@@ -15,11 +13,22 @@ | |||
15 | */ | 13 | */ |
16 | 14 | ||
17 | #include <linux/string.h> | 15 | #include <linux/string.h> |
16 | #include <linux/bootmem.h> | ||
18 | #include <asm/ppc_sys.h> | 17 | #include <asm/ppc_sys.h> |
19 | 18 | ||
20 | int (*ppc_sys_device_fixup) (struct platform_device * pdev); | 19 | int (*ppc_sys_device_fixup) (struct platform_device * pdev); |
21 | 20 | ||
22 | static int ppc_sys_inited; | 21 | static int ppc_sys_inited; |
22 | static int ppc_sys_func_inited; | ||
23 | |||
24 | static const char *ppc_sys_func_names[] = { | ||
25 | [PPC_SYS_FUNC_DUMMY] = "dummy", | ||
26 | [PPC_SYS_FUNC_ETH] = "eth", | ||
27 | [PPC_SYS_FUNC_UART] = "uart", | ||
28 | [PPC_SYS_FUNC_HLDC] = "hldc", | ||
29 | [PPC_SYS_FUNC_USB] = "usb", | ||
30 | [PPC_SYS_FUNC_IRDA] = "irda", | ||
31 | }; | ||
23 | 32 | ||
24 | void __init identify_ppc_sys_by_id(u32 id) | 33 | void __init identify_ppc_sys_by_id(u32 id) |
25 | { | 34 | { |
@@ -38,13 +47,13 @@ void __init identify_ppc_sys_by_id(u32 id) | |||
38 | void __init identify_ppc_sys_by_name(char *name) | 47 | void __init identify_ppc_sys_by_name(char *name) |
39 | { | 48 | { |
40 | unsigned int i = 0; | 49 | unsigned int i = 0; |
41 | while (ppc_sys_specs[i].ppc_sys_name[0]) | 50 | while (ppc_sys_specs[i].ppc_sys_name[0]) { |
42 | { | ||
43 | if (!strcmp(ppc_sys_specs[i].ppc_sys_name, name)) | 51 | if (!strcmp(ppc_sys_specs[i].ppc_sys_name, name)) |
44 | break; | 52 | break; |
45 | i++; | 53 | i++; |
46 | } | 54 | } |
47 | cur_ppc_sys_spec = &ppc_sys_specs[i]; | 55 | cur_ppc_sys_spec = &ppc_sys_specs[i]; |
56 | |||
48 | return; | 57 | return; |
49 | } | 58 | } |
50 | 59 | ||
@@ -128,6 +137,165 @@ void ppc_sys_device_remove(enum ppc_sys_devices dev) | |||
128 | } | 137 | } |
129 | } | 138 | } |
130 | 139 | ||
140 | /* Platform-notify mapping | ||
141 | * Helper function for BSP code to assign board-specific platfom-divice bits | ||
142 | */ | ||
143 | |||
144 | void platform_notify_map(const struct platform_notify_dev_map *map, | ||
145 | struct device *dev) | ||
146 | { | ||
147 | struct platform_device *pdev; | ||
148 | int len, idx; | ||
149 | const char *s; | ||
150 | |||
151 | /* do nothing if no device or no bus_id */ | ||
152 | if (!dev || !dev->bus_id) | ||
153 | return; | ||
154 | |||
155 | /* call per device map */ | ||
156 | while (map->bus_id != NULL) { | ||
157 | idx = -1; | ||
158 | s = strrchr(dev->bus_id, '.'); | ||
159 | if (s != NULL) | ||
160 | idx = (int)simple_strtol(s + 1, NULL, 10); | ||
161 | else | ||
162 | s = dev->bus_id; | ||
163 | |||
164 | len = s - dev->bus_id; | ||
165 | |||
166 | if (!strncmp(dev->bus_id, map->bus_id, len)) { | ||
167 | pdev = container_of(dev, struct platform_device, dev); | ||
168 | map->rtn(pdev, idx); | ||
169 | } | ||
170 | map++; | ||
171 | } | ||
172 | } | ||
173 | |||
174 | /* | ||
175 | Function assignment stuff. | ||
176 | Intended to work as follows: | ||
177 | the device name defined in foo_devices.c will be concatenated with :"func", | ||
178 | where func is string map of respective function from platfom_device_func enum | ||
179 | |||
180 | The PPC_SYS_FUNC_DUMMY function is intended to remove all assignments, making the device to appear | ||
181 | in platform bus with unmodified name. | ||
182 | */ | ||
183 | |||
184 | /* | ||
185 | Here we'll replace .name pointers with fixed-lenght strings | ||
186 | Hereby, this should be called *before* any func stuff triggeded. | ||
187 | */ | ||
188 | void ppc_sys_device_initfunc(void) | ||
189 | { | ||
190 | int i; | ||
191 | const char *name; | ||
192 | static char new_names[NUM_PPC_SYS_DEVS][BUS_ID_SIZE]; | ||
193 | enum ppc_sys_devices cur_dev; | ||
194 | |||
195 | /* If inited yet, do nothing */ | ||
196 | if (ppc_sys_func_inited) | ||
197 | return; | ||
198 | |||
199 | for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) { | ||
200 | if ((cur_dev = cur_ppc_sys_spec->device_list[i]) < 0) | ||
201 | continue; | ||
202 | |||
203 | if (ppc_sys_platform_devices[cur_dev].name) { | ||
204 | /*backup name */ | ||
205 | name = ppc_sys_platform_devices[cur_dev].name; | ||
206 | strlcpy(new_names[i], name, BUS_ID_SIZE); | ||
207 | ppc_sys_platform_devices[cur_dev].name = new_names[i]; | ||
208 | } | ||
209 | } | ||
210 | |||
211 | ppc_sys_func_inited = 1; | ||
212 | } | ||
213 | |||
214 | /*The "engine" of the func stuff. Here we either concat specified function string description | ||
215 | to the name, or remove it if PPC_SYS_FUNC_DUMMY parameter is passed here*/ | ||
216 | void ppc_sys_device_setfunc(enum ppc_sys_devices dev, | ||
217 | enum platform_device_func func) | ||
218 | { | ||
219 | char *s; | ||
220 | char *name = (char *)ppc_sys_platform_devices[dev].name; | ||
221 | char tmp[BUS_ID_SIZE]; | ||
222 | |||
223 | if (!ppc_sys_func_inited) { | ||
224 | printk(KERN_ERR "Unable to alter function - not inited!\n"); | ||
225 | return; | ||
226 | } | ||
227 | |||
228 | if (ppc_sys_inited) { | ||
229 | platform_device_unregister(&ppc_sys_platform_devices[dev]); | ||
230 | } | ||
231 | |||
232 | if ((s = (char *)strchr(name, ':')) != NULL) { /* reassign */ | ||
233 | /* Either change the name after ':' or remove func modifications */ | ||
234 | if (func != PPC_SYS_FUNC_DUMMY) | ||
235 | strlcpy(s + 1, ppc_sys_func_names[func], BUS_ID_SIZE); | ||
236 | else | ||
237 | *s = 0; | ||
238 | } else if (func != PPC_SYS_FUNC_DUMMY) { | ||
239 | /* do assignment if it is not just "clear" request */ | ||
240 | sprintf(tmp, "%s:%s", name, ppc_sys_func_names[func]); | ||
241 | strlcpy(name, tmp, BUS_ID_SIZE); | ||
242 | } | ||
243 | |||
244 | if (ppc_sys_inited) { | ||
245 | platform_device_register(&ppc_sys_platform_devices[dev]); | ||
246 | } | ||
247 | } | ||
248 | |||
249 | void ppc_sys_device_disable(enum ppc_sys_devices dev) | ||
250 | { | ||
251 | BUG_ON(cur_ppc_sys_spec == NULL); | ||
252 | |||
253 | /*Check if it is enabled*/ | ||
254 | if(!(cur_ppc_sys_spec->config[dev] & PPC_SYS_CONFIG_DISABLED)) { | ||
255 | if (ppc_sys_inited) { | ||
256 | platform_device_unregister(&ppc_sys_platform_devices[dev]); | ||
257 | } | ||
258 | cur_ppc_sys_spec->config[dev] |= PPC_SYS_CONFIG_DISABLED; | ||
259 | } | ||
260 | } | ||
261 | |||
262 | void ppc_sys_device_enable(enum ppc_sys_devices dev) | ||
263 | { | ||
264 | BUG_ON(cur_ppc_sys_spec == NULL); | ||
265 | |||
266 | /*Check if it is disabled*/ | ||
267 | if(cur_ppc_sys_spec->config[dev] & PPC_SYS_CONFIG_DISABLED) { | ||
268 | if (ppc_sys_inited) { | ||
269 | platform_device_register(&ppc_sys_platform_devices[dev]); | ||
270 | } | ||
271 | cur_ppc_sys_spec->config[dev] &= ~PPC_SYS_CONFIG_DISABLED; | ||
272 | } | ||
273 | |||
274 | } | ||
275 | |||
276 | void ppc_sys_device_enable_all(void) | ||
277 | { | ||
278 | enum ppc_sys_devices cur_dev; | ||
279 | int i; | ||
280 | |||
281 | for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) { | ||
282 | cur_dev = cur_ppc_sys_spec->device_list[i]; | ||
283 | ppc_sys_device_enable(cur_dev); | ||
284 | } | ||
285 | } | ||
286 | |||
287 | void ppc_sys_device_disable_all(void) | ||
288 | { | ||
289 | enum ppc_sys_devices cur_dev; | ||
290 | int i; | ||
291 | |||
292 | for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) { | ||
293 | cur_dev = cur_ppc_sys_spec->device_list[i]; | ||
294 | ppc_sys_device_disable(cur_dev); | ||
295 | } | ||
296 | } | ||
297 | |||
298 | |||
131 | static int __init ppc_sys_init(void) | 299 | static int __init ppc_sys_init(void) |
132 | { | 300 | { |
133 | unsigned int i, dev_id, ret = 0; | 301 | unsigned int i, dev_id, ret = 0; |
@@ -136,7 +304,8 @@ static int __init ppc_sys_init(void) | |||
136 | 304 | ||
137 | for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) { | 305 | for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) { |
138 | dev_id = cur_ppc_sys_spec->device_list[i]; | 306 | dev_id = cur_ppc_sys_spec->device_list[i]; |
139 | if (dev_id != -1) { | 307 | if ((dev_id != -1) && |
308 | !(cur_ppc_sys_spec->config[dev_id] & PPC_SYS_CONFIG_DISABLED)) { | ||
140 | if (ppc_sys_device_fixup != NULL) | 309 | if (ppc_sys_device_fixup != NULL) |
141 | ppc_sys_device_fixup(&ppc_sys_platform_devices | 310 | ppc_sys_device_fixup(&ppc_sys_platform_devices |
142 | [dev_id]); | 311 | [dev_id]); |
diff --git a/arch/ppc/syslib/pq2_devices.c b/arch/ppc/syslib/pq2_devices.c index 6ff3aab82fc3..0636aed7b827 100644 --- a/arch/ppc/syslib/pq2_devices.c +++ b/arch/ppc/syslib/pq2_devices.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/pq2_devices.c | ||
3 | * | ||
4 | * PQ2 Device descriptions | 2 | * PQ2 Device descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/pq2_sys.c b/arch/ppc/syslib/pq2_sys.c index 36d6e2179940..75e64f1c144d 100644 --- a/arch/ppc/syslib/pq2_sys.c +++ b/arch/ppc/syslib/pq2_sys.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/pq2_devices.c | ||
3 | * | ||
4 | * PQ2 System descriptions | 2 | * PQ2 System descriptions |
5 | * | 3 | * |
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
diff --git a/arch/ppc/syslib/prep_nvram.c b/arch/ppc/syslib/prep_nvram.c index 2c6364d9641f..474dccbc4a8a 100644 --- a/arch/ppc/syslib/prep_nvram.c +++ b/arch/ppc/syslib/prep_nvram.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/kernel/prep_nvram.c | ||
3 | * | ||
4 | * Copyright (C) 1998 Corey Minyard | 2 | * Copyright (C) 1998 Corey Minyard |
5 | * | 3 | * |
6 | * This reads the NvRAM on PReP compliant machines (generally from IBM or | 4 | * This reads the NvRAM on PReP compliant machines (generally from IBM or |
diff --git a/arch/ppc/syslib/todc_time.c b/arch/ppc/syslib/todc_time.c index 1323c641c19d..a8168b8e5683 100644 --- a/arch/ppc/syslib/todc_time.c +++ b/arch/ppc/syslib/todc_time.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/todc_time.c | ||
3 | * | ||
4 | * Time of Day Clock support for the M48T35, M48T37, M48T59, and MC146818 | 2 | * Time of Day Clock support for the M48T35, M48T37, M48T59, and MC146818 |
5 | * Real Time Clocks/Timekeepers. | 3 | * Real Time Clocks/Timekeepers. |
6 | * | 4 | * |
diff --git a/arch/ppc/syslib/xilinx_pic.c b/arch/ppc/syslib/xilinx_pic.c index 47f04c71fe9c..e672b600f315 100644 --- a/arch/ppc/syslib/xilinx_pic.c +++ b/arch/ppc/syslib/xilinx_pic.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/syslib/xilinx_pic.c | ||
3 | * | ||
4 | * Interrupt controller driver for Xilinx Virtex-II Pro. | 2 | * Interrupt controller driver for Xilinx Virtex-II Pro. |
5 | * | 3 | * |
6 | * Author: MontaVista Software, Inc. | 4 | * Author: MontaVista Software, Inc. |
@@ -15,7 +13,7 @@ | |||
15 | #include <linux/init.h> | 13 | #include <linux/init.h> |
16 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
17 | #include <asm/io.h> | 15 | #include <asm/io.h> |
18 | #include <asm/xparameters.h> | 16 | #include <platforms/4xx/xparameters/xparameters.h> |
19 | #include <asm/ibm4xx.h> | 17 | #include <asm/ibm4xx.h> |
20 | #include <asm/machdep.h> | 18 | #include <asm/machdep.h> |
21 | 19 | ||
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 7dbe00c76c6b..d52d6d211d9f 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -799,9 +799,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
799 | */ | 799 | */ |
800 | print_cpu_info(&S390_lowcore.cpu_data); | 800 | print_cpu_info(&S390_lowcore.cpu_data); |
801 | 801 | ||
802 | for(i = 0; i < NR_CPUS; i++) { | 802 | for_each_cpu(i) { |
803 | if (!cpu_possible(i)) | ||
804 | continue; | ||
805 | lowcore_ptr[i] = (struct _lowcore *) | 803 | lowcore_ptr[i] = (struct _lowcore *) |
806 | __get_free_pages(GFP_KERNEL|GFP_DMA, | 804 | __get_free_pages(GFP_KERNEL|GFP_DMA, |
807 | sizeof(void*) == 8 ? 1 : 0); | 805 | sizeof(void*) == 8 ? 1 : 0); |
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c index 6883c00728cb..b56e79632f24 100644 --- a/arch/sh/kernel/irq.c +++ b/arch/sh/kernel/irq.c | |||
@@ -35,9 +35,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
35 | 35 | ||
36 | if (i == 0) { | 36 | if (i == 0) { |
37 | seq_puts(p, " "); | 37 | seq_puts(p, " "); |
38 | for (j=0; j<NR_CPUS; j++) | 38 | for_each_online_cpu(j) |
39 | if (cpu_online(j)) | 39 | seq_printf(p, "CPU%d ",j); |
40 | seq_printf(p, "CPU%d ",j); | ||
41 | seq_putc(p, '\n'); | 40 | seq_putc(p, '\n'); |
42 | } | 41 | } |
43 | 42 | ||
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index a067a34e0b64..c0e79843f580 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -404,9 +404,8 @@ static int __init topology_init(void) | |||
404 | { | 404 | { |
405 | int cpu_id; | 405 | int cpu_id; |
406 | 406 | ||
407 | for (cpu_id = 0; cpu_id < NR_CPUS; cpu_id++) | 407 | for_each_cpu(cpu_id) |
408 | if (cpu_possible(cpu_id)) | 408 | register_cpu(&cpu[cpu_id], cpu_id, NULL); |
409 | register_cpu(&cpu[cpu_id], cpu_id, NULL); | ||
410 | 409 | ||
411 | return 0; | 410 | return 0; |
412 | } | 411 | } |
diff --git a/arch/sh64/kernel/irq.c b/arch/sh64/kernel/irq.c index 9fc2b71dbd84..d69879c0e063 100644 --- a/arch/sh64/kernel/irq.c +++ b/arch/sh64/kernel/irq.c | |||
@@ -53,9 +53,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
53 | 53 | ||
54 | if (i == 0) { | 54 | if (i == 0) { |
55 | seq_puts(p, " "); | 55 | seq_puts(p, " "); |
56 | for (j=0; j<NR_CPUS; j++) | 56 | for_each_online_cpu(j) |
57 | if (cpu_online(j)) | 57 | seq_printf(p, "CPU%d ",j); |
58 | seq_printf(p, "CPU%d ",j); | ||
59 | seq_putc(p, '\n'); | 58 | seq_putc(p, '\n'); |
60 | } | 59 | } |
61 | 60 | ||
diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c index 410b9a72aba9..4c60a6ef54a9 100644 --- a/arch/sparc/kernel/irq.c +++ b/arch/sparc/kernel/irq.c | |||
@@ -184,9 +184,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
184 | #ifndef CONFIG_SMP | 184 | #ifndef CONFIG_SMP |
185 | seq_printf(p, "%10u ", kstat_irqs(i)); | 185 | seq_printf(p, "%10u ", kstat_irqs(i)); |
186 | #else | 186 | #else |
187 | for (j = 0; j < NR_CPUS; j++) { | 187 | for_each_online_cpu(j) { |
188 | if (cpu_online(j)) | 188 | seq_printf(p, "%10u ", |
189 | seq_printf(p, "%10u ", | ||
190 | kstat_cpu(cpu_logical_map(j)).irqs[i]); | 189 | kstat_cpu(cpu_logical_map(j)).irqs[i]); |
191 | } | 190 | } |
192 | #endif | 191 | #endif |
diff --git a/arch/sparc/kernel/smp.c b/arch/sparc/kernel/smp.c index c6e721d8f477..ea5682ce7031 100644 --- a/arch/sparc/kernel/smp.c +++ b/arch/sparc/kernel/smp.c | |||
@@ -243,9 +243,8 @@ int setup_profiling_timer(unsigned int multiplier) | |||
243 | return -EINVAL; | 243 | return -EINVAL; |
244 | 244 | ||
245 | spin_lock_irqsave(&prof_setup_lock, flags); | 245 | spin_lock_irqsave(&prof_setup_lock, flags); |
246 | for(i = 0; i < NR_CPUS; i++) { | 246 | for_each_cpu(i) { |
247 | if (cpu_possible(i)) | 247 | load_profile_irq(i, lvl14_resolution / multiplier); |
248 | load_profile_irq(i, lvl14_resolution / multiplier); | ||
249 | prof_multiplier(i) = multiplier; | 248 | prof_multiplier(i) = multiplier; |
250 | } | 249 | } |
251 | spin_unlock_irqrestore(&prof_setup_lock, flags); | 250 | spin_unlock_irqrestore(&prof_setup_lock, flags); |
@@ -273,13 +272,12 @@ void smp_bogo(struct seq_file *m) | |||
273 | { | 272 | { |
274 | int i; | 273 | int i; |
275 | 274 | ||
276 | for (i = 0; i < NR_CPUS; i++) { | 275 | for_each_online_cpu(i) { |
277 | if (cpu_online(i)) | 276 | seq_printf(m, |
278 | seq_printf(m, | 277 | "Cpu%dBogo\t: %lu.%02lu\n", |
279 | "Cpu%dBogo\t: %lu.%02lu\n", | 278 | i, |
280 | i, | 279 | cpu_data(i).udelay_val/(500000/HZ), |
281 | cpu_data(i).udelay_val/(500000/HZ), | 280 | (cpu_data(i).udelay_val/(5000/HZ))%100); |
282 | (cpu_data(i).udelay_val/(5000/HZ))%100); | ||
283 | } | 281 | } |
284 | } | 282 | } |
285 | 283 | ||
@@ -288,8 +286,6 @@ void smp_info(struct seq_file *m) | |||
288 | int i; | 286 | int i; |
289 | 287 | ||
290 | seq_printf(m, "State:\n"); | 288 | seq_printf(m, "State:\n"); |
291 | for (i = 0; i < NR_CPUS; i++) { | 289 | for_each_online_cpu(i) |
292 | if (cpu_online(i)) | 290 | seq_printf(m, "CPU%d\t\t: online\n", i); |
293 | seq_printf(m, "CPU%d\t\t: online\n", i); | ||
294 | } | ||
295 | } | 291 | } |
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c index 52621348a56c..cea7fc6fc6e5 100644 --- a/arch/sparc/kernel/sun4d_irq.c +++ b/arch/sparc/kernel/sun4d_irq.c | |||
@@ -103,11 +103,9 @@ found_it: seq_printf(p, "%3d: ", i); | |||
103 | #ifndef CONFIG_SMP | 103 | #ifndef CONFIG_SMP |
104 | seq_printf(p, "%10u ", kstat_irqs(i)); | 104 | seq_printf(p, "%10u ", kstat_irqs(i)); |
105 | #else | 105 | #else |
106 | for (x = 0; x < NR_CPUS; x++) { | 106 | for_each_online_cpu(x) |
107 | if (cpu_online(x)) | 107 | seq_printf(p, "%10u ", |
108 | seq_printf(p, "%10u ", | 108 | kstat_cpu(cpu_logical_map(x)).irqs[i]); |
109 | kstat_cpu(cpu_logical_map(x)).irqs[i]); | ||
110 | } | ||
111 | #endif | 109 | #endif |
112 | seq_printf(p, "%c %s", | 110 | seq_printf(p, "%c %s", |
113 | (action->flags & SA_INTERRUPT) ? '+' : ' ', | 111 | (action->flags & SA_INTERRUPT) ? '+' : ' ', |
diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c index 4219dd2ce3a2..41bb9596be48 100644 --- a/arch/sparc/kernel/sun4d_smp.c +++ b/arch/sparc/kernel/sun4d_smp.c | |||
@@ -249,11 +249,9 @@ void __init smp4d_boot_cpus(void) | |||
249 | } else { | 249 | } else { |
250 | unsigned long bogosum = 0; | 250 | unsigned long bogosum = 0; |
251 | 251 | ||
252 | for(i = 0; i < NR_CPUS; i++) { | 252 | for_each_present_cpu(i) { |
253 | if (cpu_isset(i, cpu_present_map)) { | 253 | bogosum += cpu_data(i).udelay_val; |
254 | bogosum += cpu_data(i).udelay_val; | 254 | smp_highest_cpu = i; |
255 | smp_highest_cpu = i; | ||
256 | } | ||
257 | } | 255 | } |
258 | SMP_PRINTK(("Total of %d Processors activated (%lu.%02lu BogoMIPS).\n", cpucount + 1, bogosum/(500000/HZ), (bogosum/(5000/HZ))%100)); | 256 | SMP_PRINTK(("Total of %d Processors activated (%lu.%02lu BogoMIPS).\n", cpucount + 1, bogosum/(500000/HZ), (bogosum/(5000/HZ))%100)); |
259 | printk("Total of %d Processors activated (%lu.%02lu BogoMIPS).\n", | 257 | printk("Total of %d Processors activated (%lu.%02lu BogoMIPS).\n", |
diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c index fbbd8a474c4c..1dde312eebda 100644 --- a/arch/sparc/kernel/sun4m_smp.c +++ b/arch/sparc/kernel/sun4m_smp.c | |||
@@ -218,10 +218,8 @@ void __init smp4m_boot_cpus(void) | |||
218 | cpu_present_map = cpumask_of_cpu(smp_processor_id()); | 218 | cpu_present_map = cpumask_of_cpu(smp_processor_id()); |
219 | } else { | 219 | } else { |
220 | unsigned long bogosum = 0; | 220 | unsigned long bogosum = 0; |
221 | for(i = 0; i < NR_CPUS; i++) { | 221 | for_each_present_cpu(i) |
222 | if (cpu_isset(i, cpu_present_map)) | 222 | bogosum += cpu_data(i).udelay_val; |
223 | bogosum += cpu_data(i).udelay_val; | ||
224 | } | ||
225 | printk("Total of %d Processors activated (%lu.%02lu BogoMIPS).\n", | 223 | printk("Total of %d Processors activated (%lu.%02lu BogoMIPS).\n", |
226 | cpucount + 1, | 224 | cpucount + 1, |
227 | bogosum/(500000/HZ), | 225 | bogosum/(500000/HZ), |
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index 8c93ba655b33..e505a4125e35 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c | |||
@@ -117,9 +117,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
117 | #ifndef CONFIG_SMP | 117 | #ifndef CONFIG_SMP |
118 | seq_printf(p, "%10u ", kstat_irqs(i)); | 118 | seq_printf(p, "%10u ", kstat_irqs(i)); |
119 | #else | 119 | #else |
120 | for (j = 0; j < NR_CPUS; j++) { | 120 | for_each_online_cpu(j) { |
121 | if (!cpu_online(j)) | ||
122 | continue; | ||
123 | seq_printf(p, "%10u ", | 121 | seq_printf(p, "%10u ", |
124 | kstat_cpu(j).irqs[i]); | 122 | kstat_cpu(j).irqs[i]); |
125 | } | 123 | } |
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 373a701c90a5..1b6e2ade1008 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c | |||
@@ -57,25 +57,21 @@ void smp_info(struct seq_file *m) | |||
57 | int i; | 57 | int i; |
58 | 58 | ||
59 | seq_printf(m, "State:\n"); | 59 | seq_printf(m, "State:\n"); |
60 | for (i = 0; i < NR_CPUS; i++) { | 60 | for_each_online_cpu(i) |
61 | if (cpu_online(i)) | 61 | seq_printf(m, "CPU%d:\t\tonline\n", i); |
62 | seq_printf(m, | ||
63 | "CPU%d:\t\tonline\n", i); | ||
64 | } | ||
65 | } | 62 | } |
66 | 63 | ||
67 | void smp_bogo(struct seq_file *m) | 64 | void smp_bogo(struct seq_file *m) |
68 | { | 65 | { |
69 | int i; | 66 | int i; |
70 | 67 | ||
71 | for (i = 0; i < NR_CPUS; i++) | 68 | for_each_online_cpu(i) |
72 | if (cpu_online(i)) | 69 | seq_printf(m, |
73 | seq_printf(m, | 70 | "Cpu%dBogo\t: %lu.%02lu\n" |
74 | "Cpu%dBogo\t: %lu.%02lu\n" | 71 | "Cpu%dClkTck\t: %016lx\n", |
75 | "Cpu%dClkTck\t: %016lx\n", | 72 | i, cpu_data(i).udelay_val / (500000/HZ), |
76 | i, cpu_data(i).udelay_val / (500000/HZ), | 73 | (cpu_data(i).udelay_val / (5000/HZ)) % 100, |
77 | (cpu_data(i).udelay_val / (5000/HZ)) % 100, | 74 | i, cpu_data(i).clock_tick); |
78 | i, cpu_data(i).clock_tick); | ||
79 | } | 75 | } |
80 | 76 | ||
81 | void __init smp_store_cpu_info(int id) | 77 | void __init smp_store_cpu_info(int id) |
@@ -1282,7 +1278,7 @@ int setup_profiling_timer(unsigned int multiplier) | |||
1282 | return -EINVAL; | 1278 | return -EINVAL; |
1283 | 1279 | ||
1284 | spin_lock_irqsave(&prof_setup_lock, flags); | 1280 | spin_lock_irqsave(&prof_setup_lock, flags); |
1285 | for (i = 0; i < NR_CPUS; i++) | 1281 | for_each_cpu(i) |
1286 | prof_multiplier(i) = multiplier; | 1282 | prof_multiplier(i) = multiplier; |
1287 | current_tick_offset = (timer_tick_offset / multiplier); | 1283 | current_tick_offset = (timer_tick_offset / multiplier); |
1288 | spin_unlock_irqrestore(&prof_setup_lock, flags); | 1284 | spin_unlock_irqrestore(&prof_setup_lock, flags); |
@@ -1384,10 +1380,8 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
1384 | unsigned long bogosum = 0; | 1380 | unsigned long bogosum = 0; |
1385 | int i; | 1381 | int i; |
1386 | 1382 | ||
1387 | for (i = 0; i < NR_CPUS; i++) { | 1383 | for_each_online_cpu(i) |
1388 | if (cpu_online(i)) | 1384 | bogosum += cpu_data(i).udelay_val; |
1389 | bogosum += cpu_data(i).udelay_val; | ||
1390 | } | ||
1391 | printk("Total of %ld processors activated " | 1385 | printk("Total of %ld processors activated " |
1392 | "(%lu.%02lu BogoMIPS).\n", | 1386 | "(%lu.%02lu BogoMIPS).\n", |
1393 | (long) num_online_cpus(), | 1387 | (long) num_online_cpus(), |
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index ded63ee9c4fd..1539a8362b6f 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c | |||
@@ -1828,8 +1828,8 @@ void __flush_tlb_all(void) | |||
1828 | void online_page(struct page *page) | 1828 | void online_page(struct page *page) |
1829 | { | 1829 | { |
1830 | ClearPageReserved(page); | 1830 | ClearPageReserved(page); |
1831 | set_page_count(page, 0); | 1831 | init_page_count(page); |
1832 | free_cold_page(page); | 1832 | __free_page(page); |
1833 | totalram_pages++; | 1833 | totalram_pages++; |
1834 | num_physpages++; | 1834 | num_physpages++; |
1835 | } | 1835 | } |
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index 27cdf9164422..80c9c18aae94 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c | |||
@@ -491,6 +491,16 @@ void __init check_bugs(void) | |||
491 | check_devanon(); | 491 | check_devanon(); |
492 | } | 492 | } |
493 | 493 | ||
494 | void apply_alternatives(void *start, void *end) | 494 | void apply_alternatives(struct alt_instr *start, struct alt_instr *end) |
495 | { | ||
496 | } | ||
497 | |||
498 | void alternatives_smp_module_add(struct module *mod, char *name, | ||
499 | void *locks, void *locks_end, | ||
500 | void *text, void *text_end) | ||
501 | { | ||
502 | } | ||
503 | |||
504 | void alternatives_smp_module_del(struct module *mod) | ||
495 | { | 505 | { |
496 | } | 506 | } |
diff --git a/arch/x86_64/kernel/early_printk.c b/arch/x86_64/kernel/early_printk.c index 6dffb498ccd7..a8a6aa70d695 100644 --- a/arch/x86_64/kernel/early_printk.c +++ b/arch/x86_64/kernel/early_printk.c | |||
@@ -17,11 +17,8 @@ | |||
17 | #define VGABASE ((void __iomem *)0xffffffff800b8000UL) | 17 | #define VGABASE ((void __iomem *)0xffffffff800b8000UL) |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | #define MAX_YPOS max_ypos | ||
21 | #define MAX_XPOS max_xpos | ||
22 | |||
23 | static int max_ypos = 25, max_xpos = 80; | 20 | static int max_ypos = 25, max_xpos = 80; |
24 | static int current_ypos = 1, current_xpos = 0; | 21 | static int current_ypos = 25, current_xpos = 0; |
25 | 22 | ||
26 | static void early_vga_write(struct console *con, const char *str, unsigned n) | 23 | static void early_vga_write(struct console *con, const char *str, unsigned n) |
27 | { | 24 | { |
@@ -29,26 +26,26 @@ static void early_vga_write(struct console *con, const char *str, unsigned n) | |||
29 | int i, k, j; | 26 | int i, k, j; |
30 | 27 | ||
31 | while ((c = *str++) != '\0' && n-- > 0) { | 28 | while ((c = *str++) != '\0' && n-- > 0) { |
32 | if (current_ypos >= MAX_YPOS) { | 29 | if (current_ypos >= max_ypos) { |
33 | /* scroll 1 line up */ | 30 | /* scroll 1 line up */ |
34 | for (k = 1, j = 0; k < MAX_YPOS; k++, j++) { | 31 | for (k = 1, j = 0; k < max_ypos; k++, j++) { |
35 | for (i = 0; i < MAX_XPOS; i++) { | 32 | for (i = 0; i < max_xpos; i++) { |
36 | writew(readw(VGABASE + 2*(MAX_XPOS*k + i)), | 33 | writew(readw(VGABASE+2*(max_xpos*k+i)), |
37 | VGABASE + 2*(MAX_XPOS*j + i)); | 34 | VGABASE + 2*(max_xpos*j + i)); |
38 | } | 35 | } |
39 | } | 36 | } |
40 | for (i = 0; i < MAX_XPOS; i++) | 37 | for (i = 0; i < max_xpos; i++) |
41 | writew(0x720, VGABASE + 2*(MAX_XPOS*j + i)); | 38 | writew(0x720, VGABASE + 2*(max_xpos*j + i)); |
42 | current_ypos = MAX_YPOS-1; | 39 | current_ypos = max_ypos-1; |
43 | } | 40 | } |
44 | if (c == '\n') { | 41 | if (c == '\n') { |
45 | current_xpos = 0; | 42 | current_xpos = 0; |
46 | current_ypos++; | 43 | current_ypos++; |
47 | } else if (c != '\r') { | 44 | } else if (c != '\r') { |
48 | writew(((0x7 << 8) | (unsigned short) c), | 45 | writew(((0x7 << 8) | (unsigned short) c), |
49 | VGABASE + 2*(MAX_XPOS*current_ypos + | 46 | VGABASE + 2*(max_xpos*current_ypos + |
50 | current_xpos++)); | 47 | current_xpos++)); |
51 | if (current_xpos >= MAX_XPOS) { | 48 | if (current_xpos >= max_xpos) { |
52 | current_xpos = 0; | 49 | current_xpos = 0; |
53 | current_ypos++; | 50 | current_ypos++; |
54 | } | 51 | } |
@@ -244,6 +241,7 @@ int __init setup_early_printk(char *opt) | |||
244 | && SCREEN_INFO.orig_video_isVGA == 1) { | 241 | && SCREEN_INFO.orig_video_isVGA == 1) { |
245 | max_xpos = SCREEN_INFO.orig_video_cols; | 242 | max_xpos = SCREEN_INFO.orig_video_cols; |
246 | max_ypos = SCREEN_INFO.orig_video_lines; | 243 | max_ypos = SCREEN_INFO.orig_video_lines; |
244 | current_ypos = SCREEN_INFO.orig_y; | ||
247 | early_console = &early_vga_console; | 245 | early_console = &early_vga_console; |
248 | } else if (!strncmp(buf, "simnow", 6)) { | 246 | } else if (!strncmp(buf, "simnow", 6)) { |
249 | simnow_init(buf + 6); | 247 | simnow_init(buf + 6); |
diff --git a/arch/x86_64/kernel/irq.c b/arch/x86_64/kernel/irq.c index 30d2a1e545fe..d8bd0b345b1e 100644 --- a/arch/x86_64/kernel/irq.c +++ b/arch/x86_64/kernel/irq.c | |||
@@ -38,9 +38,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
38 | 38 | ||
39 | if (i == 0) { | 39 | if (i == 0) { |
40 | seq_printf(p, " "); | 40 | seq_printf(p, " "); |
41 | for (j=0; j<NR_CPUS; j++) | 41 | for_each_online_cpu(j) |
42 | if (cpu_online(j)) | 42 | seq_printf(p, "CPU%d ",j); |
43 | seq_printf(p, "CPU%d ",j); | ||
44 | seq_putc(p, '\n'); | 43 | seq_putc(p, '\n'); |
45 | } | 44 | } |
46 | 45 | ||
@@ -53,10 +52,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
53 | #ifndef CONFIG_SMP | 52 | #ifndef CONFIG_SMP |
54 | seq_printf(p, "%10u ", kstat_irqs(i)); | 53 | seq_printf(p, "%10u ", kstat_irqs(i)); |
55 | #else | 54 | #else |
56 | for (j=0; j<NR_CPUS; j++) | 55 | for_each_online_cpu(j) |
57 | if (cpu_online(j)) | 56 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); |
58 | seq_printf(p, "%10u ", | ||
59 | kstat_cpu(j).irqs[i]); | ||
60 | #endif | 57 | #endif |
61 | seq_printf(p, " %14s", irq_desc[i].handler->typename); | 58 | seq_printf(p, " %14s", irq_desc[i].handler->typename); |
62 | 59 | ||
@@ -68,15 +65,13 @@ skip: | |||
68 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); | 65 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); |
69 | } else if (i == NR_IRQS) { | 66 | } else if (i == NR_IRQS) { |
70 | seq_printf(p, "NMI: "); | 67 | seq_printf(p, "NMI: "); |
71 | for (j = 0; j < NR_CPUS; j++) | 68 | for_each_online_cpu(j) |
72 | if (cpu_online(j)) | 69 | seq_printf(p, "%10u ", cpu_pda(j)->__nmi_count); |
73 | seq_printf(p, "%10u ", cpu_pda(j)->__nmi_count); | ||
74 | seq_putc(p, '\n'); | 70 | seq_putc(p, '\n'); |
75 | #ifdef CONFIG_X86_LOCAL_APIC | 71 | #ifdef CONFIG_X86_LOCAL_APIC |
76 | seq_printf(p, "LOC: "); | 72 | seq_printf(p, "LOC: "); |
77 | for (j = 0; j < NR_CPUS; j++) | 73 | for_each_online_cpu(j) |
78 | if (cpu_online(j)) | 74 | seq_printf(p, "%10u ", cpu_pda(j)->apic_timer_irqs); |
79 | seq_printf(p, "%10u ", cpu_pda(j)->apic_timer_irqs); | ||
80 | seq_putc(p, '\n'); | 75 | seq_putc(p, '\n'); |
81 | #endif | 76 | #endif |
82 | seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); | 77 | seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); |
diff --git a/arch/x86_64/kernel/kprobes.c b/arch/x86_64/kernel/kprobes.c index 8b866a8572cf..14f0ced613b6 100644 --- a/arch/x86_64/kernel/kprobes.c +++ b/arch/x86_64/kernel/kprobes.c | |||
@@ -222,9 +222,9 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p) | |||
222 | 222 | ||
223 | void __kprobes arch_remove_kprobe(struct kprobe *p) | 223 | void __kprobes arch_remove_kprobe(struct kprobe *p) |
224 | { | 224 | { |
225 | down(&kprobe_mutex); | 225 | mutex_lock(&kprobe_mutex); |
226 | free_insn_slot(p->ainsn.insn); | 226 | free_insn_slot(p->ainsn.insn); |
227 | up(&kprobe_mutex); | 227 | mutex_unlock(&kprobe_mutex); |
228 | } | 228 | } |
229 | 229 | ||
230 | static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb) | 230 | static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb) |
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c index 5bf17e41cd2d..66c009e10bac 100644 --- a/arch/x86_64/kernel/nmi.c +++ b/arch/x86_64/kernel/nmi.c | |||
@@ -162,9 +162,7 @@ int __init check_nmi_watchdog (void) | |||
162 | local_irq_enable(); | 162 | local_irq_enable(); |
163 | mdelay((10*1000)/nmi_hz); // wait 10 ticks | 163 | mdelay((10*1000)/nmi_hz); // wait 10 ticks |
164 | 164 | ||
165 | for (cpu = 0; cpu < NR_CPUS; cpu++) { | 165 | for_each_online_cpu(cpu) { |
166 | if (!cpu_online(cpu)) | ||
167 | continue; | ||
168 | if (cpu_pda(cpu)->__nmi_count - counts[cpu] <= 5) { | 166 | if (cpu_pda(cpu)->__nmi_count - counts[cpu] <= 5) { |
169 | endflag = 1; | 167 | endflag = 1; |
170 | printk("CPU#%d: NMI appears to be stuck (%d->%d)!\n", | 168 | printk("CPU#%d: NMI appears to be stuck (%d->%d)!\n", |
diff --git a/arch/x86_64/kernel/signal.c b/arch/x86_64/kernel/signal.c index 5876df116c92..e5f5ce7909a3 100644 --- a/arch/x86_64/kernel/signal.c +++ b/arch/x86_64/kernel/signal.c | |||
@@ -443,9 +443,6 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset) | |||
443 | if (!user_mode(regs)) | 443 | if (!user_mode(regs)) |
444 | return 1; | 444 | return 1; |
445 | 445 | ||
446 | if (try_to_freeze()) | ||
447 | goto no_signal; | ||
448 | |||
449 | if (!oldset) | 446 | if (!oldset) |
450 | oldset = ¤t->blocked; | 447 | oldset = ¤t->blocked; |
451 | 448 | ||
@@ -463,7 +460,6 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset) | |||
463 | return handle_signal(signr, &info, &ka, oldset, regs); | 460 | return handle_signal(signr, &info, &ka, oldset, regs); |
464 | } | 461 | } |
465 | 462 | ||
466 | no_signal: | ||
467 | /* Did we come from a system call? */ | 463 | /* Did we come from a system call? */ |
468 | if ((long)regs->orig_rax >= 0) { | 464 | if ((long)regs->orig_rax >= 0) { |
469 | /* Restart the system call - no handlers present */ | 465 | /* Restart the system call - no handlers present */ |
diff --git a/arch/xtensa/kernel/irq.c b/arch/xtensa/kernel/irq.c index 4cbf6d91571f..51f9bed455fa 100644 --- a/arch/xtensa/kernel/irq.c +++ b/arch/xtensa/kernel/irq.c | |||
@@ -83,9 +83,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
83 | 83 | ||
84 | if (i == 0) { | 84 | if (i == 0) { |
85 | seq_printf(p, " "); | 85 | seq_printf(p, " "); |
86 | for (j=0; j<NR_CPUS; j++) | 86 | for_each_online_cpu(j) |
87 | if (cpu_online(j)) | 87 | seq_printf(p, "CPU%d ",j); |
88 | seq_printf(p, "CPU%d ",j); | ||
89 | seq_putc(p, '\n'); | 88 | seq_putc(p, '\n'); |
90 | } | 89 | } |
91 | 90 | ||
@@ -98,9 +97,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
98 | #ifndef CONFIG_SMP | 97 | #ifndef CONFIG_SMP |
99 | seq_printf(p, "%10u ", kstat_irqs(i)); | 98 | seq_printf(p, "%10u ", kstat_irqs(i)); |
100 | #else | 99 | #else |
101 | for (j = 0; j < NR_CPUS; j++) | 100 | for_each_online_cpu(j) |
102 | if (cpu_online(j)) | 101 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); |
103 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); | ||
104 | #endif | 102 | #endif |
105 | seq_printf(p, " %14s", irq_desc[i].handler->typename); | 103 | seq_printf(p, " %14s", irq_desc[i].handler->typename); |
106 | seq_printf(p, " %s", action->name); | 104 | seq_printf(p, " %s", action->name); |
@@ -113,9 +111,8 @@ skip: | |||
113 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); | 111 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); |
114 | } else if (i == NR_IRQS) { | 112 | } else if (i == NR_IRQS) { |
115 | seq_printf(p, "NMI: "); | 113 | seq_printf(p, "NMI: "); |
116 | for (j = 0; j < NR_CPUS; j++) | 114 | for_each_online_cpu(j) |
117 | if (cpu_online(j)) | 115 | seq_printf(p, "%10u ", nmi_count(j)); |
118 | seq_printf(p, "%10u ", nmi_count(j)); | ||
119 | seq_putc(p, '\n'); | 116 | seq_putc(p, '\n'); |
120 | seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); | 117 | seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); |
121 | } | 118 | } |
diff --git a/arch/xtensa/platform-iss/console.c b/arch/xtensa/platform-iss/console.c index 94fdfe474ac1..2a580efb58ec 100644 --- a/arch/xtensa/platform-iss/console.c +++ b/arch/xtensa/platform-iss/console.c | |||
@@ -31,10 +31,6 @@ | |||
31 | #include <linux/tty.h> | 31 | #include <linux/tty.h> |
32 | #include <linux/tty_flip.h> | 32 | #include <linux/tty_flip.h> |
33 | 33 | ||
34 | #ifdef SERIAL_INLINE | ||
35 | #define _INLINE_ inline | ||
36 | #endif | ||
37 | |||
38 | #define SERIAL_MAX_NUM_LINES 1 | 34 | #define SERIAL_MAX_NUM_LINES 1 |
39 | #define SERIAL_TIMER_VALUE (20 * HZ) | 35 | #define SERIAL_TIMER_VALUE (20 * HZ) |
40 | 36 | ||