patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / arch / ppc / kernel / setup.c
1 /*
2  * Common prep/pmac/chrp boot and setup code.
3  */
4
5 #include <linux/config.h>
6 #include <linux/module.h>
7 #include <linux/string.h>
8 #include <linux/sched.h>
9 #include <linux/init.h>
10 #include <linux/reboot.h>
11 #include <linux/delay.h>
12 #include <linux/initrd.h>
13 #include <linux/ide.h>
14 #include <linux/tty.h>
15 #include <linux/bootmem.h>
16 #include <linux/seq_file.h>
17 #include <linux/root_dev.h>
18 #include <linux/cpu.h>
19
20 #include <asm/residual.h>
21 #include <asm/io.h>
22 #include <asm/prom.h>
23 #include <asm/processor.h>
24 #include <asm/pgtable.h>
25 #include <asm/bootinfo.h>
26 #include <asm/setup.h>
27 #include <asm/amigappc.h>
28 #include <asm/smp.h>
29 #include <asm/elf.h>
30 #include <asm/cputable.h>
31 #include <asm/bootx.h>
32 #include <asm/btext.h>
33 #include <asm/machdep.h>
34 #include <asm/uaccess.h>
35 #include <asm/system.h>
36 #include <asm/pmac_feature.h>
37 #include <asm/sections.h>
38 #include <asm/nvram.h>
39 #include <asm/xmon.h>
40 #include <asm/ocp.h>
41
42 #if defined CONFIG_KGDB
43 #include <asm/kgdb.h>
44 #endif
45
46 extern void platform_init(unsigned long r3, unsigned long r4,
47                 unsigned long r5, unsigned long r6, unsigned long r7);
48 extern void bootx_init(unsigned long r4, unsigned long phys);
49 extern void identify_cpu(unsigned long offset, unsigned long cpu);
50 extern void do_cpu_ftr_fixups(unsigned long offset);
51 extern void reloc_got2(unsigned long offset);
52
53 extern void ppc6xx_idle(void);
54 extern void power4_idle(void);
55
56 extern boot_infos_t *boot_infos;
57 char saved_command_line[COMMAND_LINE_SIZE];
58 unsigned char aux_device_present;
59 struct ide_machdep_calls ppc_ide_md;
60 char *sysmap;
61 unsigned long sysmap_size;
62
63 /* Used with the BI_MEMSIZE bootinfo parameter to store the memory
64    size value reported by the boot loader. */
65 unsigned long boot_mem_size;
66
67 unsigned long ISA_DMA_THRESHOLD;
68 unsigned long DMA_MODE_READ, DMA_MODE_WRITE;
69
70 #ifdef CONFIG_PPC_MULTIPLATFORM
71 int _machine = 0;
72
73 extern void prep_init(unsigned long r3, unsigned long r4,
74                 unsigned long r5, unsigned long r6, unsigned long r7);
75 extern void pmac_init(unsigned long r3, unsigned long r4,
76                 unsigned long r5, unsigned long r6, unsigned long r7);
77 extern void chrp_init(unsigned long r3, unsigned long r4,
78                 unsigned long r5, unsigned long r6, unsigned long r7);
79 #endif /* CONFIG_PPC_MULTIPLATFORM */
80
81 #ifdef CONFIG_MAGIC_SYSRQ
82 unsigned long SYSRQ_KEY = 0x54;
83 #endif /* CONFIG_MAGIC_SYSRQ */
84
85 #ifdef CONFIG_VGA_CONSOLE
86 unsigned long vgacon_remap_base;
87 #endif
88
89 struct machdep_calls ppc_md;
90
91 /*
92  * These are used in binfmt_elf.c to put aux entries on the stack
93  * for each elf executable being started.
94  */
95 int dcache_bsize;
96 int icache_bsize;
97 int ucache_bsize;
98
99 #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_FB_VGA16) || \
100     defined(CONFIG_FB_VGA16_MODULE) || defined(CONFIG_FB_VESA)
101 struct screen_info screen_info = {
102         0, 25,                  /* orig-x, orig-y */
103         0,                      /* unused */
104         0,                      /* orig-video-page */
105         0,                      /* orig-video-mode */
106         80,                     /* orig-video-cols */
107         0,0,0,                  /* ega_ax, ega_bx, ega_cx */
108         25,                     /* orig-video-lines */
109         1,                      /* orig-video-isVGA */
110         16                      /* orig-video-points */
111 };
112 #endif /* CONFIG_VGA_CONSOLE || CONFIG_FB_VGA16 || CONFIG_FB_VESA */
113
114 void machine_restart(char *cmd)
115 {
116 #ifdef CONFIG_NVRAM
117         nvram_sync();
118 #endif
119         ppc_md.restart(cmd);
120 }
121
122 EXPORT_SYMBOL(machine_restart);
123
124 void machine_power_off(void)
125 {
126 #ifdef CONFIG_NVRAM
127         nvram_sync();
128 #endif
129         ppc_md.power_off();
130 }
131
132 EXPORT_SYMBOL(machine_power_off);
133
134 void machine_halt(void)
135 {
136 #ifdef CONFIG_NVRAM
137         nvram_sync();
138 #endif
139         ppc_md.halt();
140 }
141
142 EXPORT_SYMBOL(machine_halt);
143
144 void (*pm_power_off)(void) = machine_power_off;
145
146 #ifdef CONFIG_TAU
147 extern u32 cpu_temp(unsigned long cpu);
148 extern u32 cpu_temp_both(unsigned long cpu);
149 #endif /* CONFIG_TAU */
150
151 int show_cpuinfo(struct seq_file *m, void *v)
152 {
153         int i = (int) v - 1;
154         int err = 0;
155         unsigned int pvr;
156         unsigned short maj, min;
157         unsigned long lpj;
158
159         if (i >= NR_CPUS) {
160                 /* Show summary information */
161 #ifdef CONFIG_SMP
162                 unsigned long bogosum = 0;
163                 for (i = 0; i < NR_CPUS; ++i)
164                         if (cpu_online(i))
165                                 bogosum += cpu_data[i].loops_per_jiffy;
166                 seq_printf(m, "total bogomips\t: %lu.%02lu\n",
167                            bogosum/(500000/HZ), bogosum/(5000/HZ) % 100);
168 #endif /* CONFIG_SMP */
169
170                 if (ppc_md.show_cpuinfo != NULL)
171                         err = ppc_md.show_cpuinfo(m);
172                 return err;
173         }
174
175 #ifdef CONFIG_SMP
176         if (!cpu_online(i))
177                 return 0;
178         pvr = cpu_data[i].pvr;
179         lpj = cpu_data[i].loops_per_jiffy;
180 #else
181         pvr = mfspr(PVR);
182         lpj = loops_per_jiffy;
183 #endif
184
185         seq_printf(m, "processor\t: %d\n", i);
186         seq_printf(m, "cpu\t\t: ");
187
188         if (cur_cpu_spec[i]->pvr_mask)
189                 seq_printf(m, "%s", cur_cpu_spec[i]->cpu_name);
190         else
191                 seq_printf(m, "unknown (%08x)", pvr);
192 #ifdef CONFIG_ALTIVEC
193         if (cur_cpu_spec[i]->cpu_features & CPU_FTR_ALTIVEC)
194                 seq_printf(m, ", altivec supported");
195 #endif
196         seq_printf(m, "\n");
197
198 #ifdef CONFIG_TAU
199         if (cur_cpu_spec[i]->cpu_features & CPU_FTR_TAU) {
200 #ifdef CONFIG_TAU_AVERAGE
201                 /* more straightforward, but potentially misleading */
202                 seq_printf(m,  "temperature \t: %u C (uncalibrated)\n",
203                            cpu_temp(i));
204 #else
205                 /* show the actual temp sensor range */
206                 u32 temp;
207                 temp = cpu_temp_both(i);
208                 seq_printf(m, "temperature \t: %u-%u C (uncalibrated)\n",
209                            temp & 0xff, temp >> 16);
210 #endif
211         }
212 #endif /* CONFIG_TAU */
213
214         if (ppc_md.show_percpuinfo != NULL) {
215                 err = ppc_md.show_percpuinfo(m, i);
216                 if (err)
217                         return err;
218         }
219
220         switch (PVR_VER(pvr)) {
221         case 0x0020:    /* 403 family */
222                 maj = PVR_MAJ(pvr) + 1;
223                 min = PVR_MIN(pvr);
224                 break;
225         case 0x1008:    /* 740P/750P ?? */
226                 maj = ((pvr >> 8) & 0xFF) - 1;
227                 min = pvr & 0xFF;
228                 break;
229         default:
230                 maj = (pvr >> 8) & 0xFF;
231                 min = pvr & 0xFF;
232                 break;
233         }
234
235         seq_printf(m, "revision\t: %hd.%hd (pvr %04x %04x)\n",
236                    maj, min, PVR_VER(pvr), PVR_REV(pvr));
237
238         seq_printf(m, "bogomips\t: %lu.%02lu\n",
239                    lpj / (500000/HZ), (lpj / (5000/HZ)) % 100);
240
241 #ifdef CONFIG_SMP
242         seq_printf(m, "\n");
243 #endif
244
245         return 0;
246 }
247
248 static void *c_start(struct seq_file *m, loff_t *pos)
249 {
250         int i = *pos;
251
252         return i <= NR_CPUS? (void *) (i + 1): NULL;
253 }
254
255 static void *c_next(struct seq_file *m, void *v, loff_t *pos)
256 {
257         ++*pos;
258         return c_start(m, pos);
259 }
260
261 static void c_stop(struct seq_file *m, void *v)
262 {
263 }
264
265 struct seq_operations cpuinfo_op = {
266         .start =c_start,
267         .next = c_next,
268         .stop = c_stop,
269         .show = show_cpuinfo,
270 };
271
272 /*
273  * We're called here very early in the boot.  We determine the machine
274  * type and call the appropriate low-level setup functions.
275  *  -- Cort <cort@fsmlabs.com>
276  *
277  * Note that the kernel may be running at an address which is different
278  * from the address that it was linked at, so we must use RELOC/PTRRELOC
279  * to access static data (including strings).  -- paulus
280  */
281 __init
282 unsigned long
283 early_init(int r3, int r4, int r5)
284 {
285         unsigned long phys;
286         unsigned long offset = reloc_offset();
287
288         /* Default */
289         phys = offset + KERNELBASE;
290
291         /* First zero the BSS -- use memset, some arches don't have
292          * caches on yet */
293         memset_io(PTRRELOC(&__bss_start), 0, _end - __bss_start);
294
295         /*
296          * Identify the CPU type and fix up code sections
297          * that depend on which cpu we have.
298          */
299         identify_cpu(offset, 0);
300         do_cpu_ftr_fixups(offset);
301
302 #if defined(CONFIG_PPC_MULTIPLATFORM)
303         reloc_got2(offset);
304
305         /* If we came here from BootX, clear the screen,
306          * set up some pointers and return. */
307         if ((r3 == 0x426f6f58) && (r5 == 0))
308                 bootx_init(r4, phys);
309
310         /*
311          * don't do anything on prep
312          * for now, don't use bootinfo because it breaks yaboot 0.5
313          * and assume that if we didn't find a magic number, we have OF
314          */
315         else if (*(unsigned long *)(0) != 0xdeadc0de)
316                 phys = prom_init(r3, r4, (prom_entry)r5);
317
318         reloc_got2(-offset);
319 #endif
320
321         return phys;
322 }
323
324 #ifdef CONFIG_PPC_OF
325 /*
326  * Assume here that all clock rates are the same in a
327  * smp system.  -- Cort
328  */
329 int __openfirmware
330 of_show_percpuinfo(struct seq_file *m, int i)
331 {
332         struct device_node *cpu_node;
333         int *fp, s;
334         
335         cpu_node = find_type_devices("cpu");
336         if (!cpu_node)
337                 return 0;
338         for (s = 0; s < i && cpu_node->next; s++)
339                 cpu_node = cpu_node->next;
340         fp = (int *) get_property(cpu_node, "clock-frequency", NULL);
341         if (fp)
342                 seq_printf(m, "clock\t\t: %dMHz\n", *fp / 1000000);
343         return 0;
344 }
345
346 void __init
347 intuit_machine_type(void)
348 {
349         char *model;
350         struct device_node *root;
351         
352         /* ask the OF info if we're a chrp or pmac */
353         root = find_path_device("/");
354         if (root != 0) {
355                 /* assume pmac unless proven to be chrp -- Cort */
356                 _machine = _MACH_Pmac;
357                 model = get_property(root, "device_type", NULL);
358                 if (model && !strncmp("chrp", model, 4))
359                         _machine = _MACH_chrp;
360                 else {
361                         model = get_property(root, "model", NULL);
362                         if (model && !strncmp(model, "IBM", 3))
363                                 _machine = _MACH_chrp;
364                 }
365         }
366 }
367 #endif
368
369 #ifdef CONFIG_PPC_MULTIPLATFORM
370 /*
371  * The PPC_MULTIPLATFORM version of platform_init...
372  */
373 void __init
374 platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
375               unsigned long r6, unsigned long r7)
376 {
377 #ifdef CONFIG_BOOTX_TEXT
378         if (boot_text_mapped) {
379                 btext_clearscreen();
380                 btext_welcome();
381         }
382 #endif
383
384         parse_bootinfo(find_bootinfo());
385
386         /* if we didn't get any bootinfo telling us what we are... */
387         if (_machine == 0) {
388                 /* prep boot loader tells us if we're prep or not */
389                 if ( *(unsigned long *)(KERNELBASE) == (0xdeadc0de) )
390                         _machine = _MACH_prep;
391         }
392
393         /* not much more to do here, if prep */
394         if (_machine == _MACH_prep) {
395                 prep_init(r3, r4, r5, r6, r7);
396                 return;
397         }
398
399         /* prom_init has already been called from __start */
400         if (boot_infos)
401                 relocate_nodes();
402
403         /* If we aren't PReP, we can find out if we're Pmac
404          * or CHRP with this. */
405         if (_machine == 0)
406                 intuit_machine_type();
407
408         /* finish_device_tree may need _machine defined. */
409         finish_device_tree();
410
411         /*
412          * If we were booted via quik, r3 points to the physical
413          * address of the command-line parameters.
414          * If we were booted from an xcoff image (i.e. netbooted or
415          * booted from floppy), we get the command line from the
416          * bootargs property of the /chosen node.
417          * If an initial ramdisk is present, r3 and r4
418          * are used for initrd_start and initrd_size,
419          * otherwise they contain 0xdeadbeef.
420          */
421         cmd_line[0] = 0;
422         if (r3 >= 0x4000 && r3 < 0x800000 && r4 == 0) {
423                 strlcpy(cmd_line, (char *)r3 + KERNELBASE,
424                         sizeof(cmd_line));
425         } else if (boot_infos != 0) {
426                 /* booted by BootX - check for ramdisk */
427                 if (boot_infos->kernelParamsOffset != 0)
428                         strlcpy(cmd_line, (char *) boot_infos
429                                 + boot_infos->kernelParamsOffset,
430                                 sizeof(cmd_line));
431 #ifdef CONFIG_BLK_DEV_INITRD
432                 if (boot_infos->ramDisk) {
433                         initrd_start = (unsigned long) boot_infos
434                                 + boot_infos->ramDisk;
435                         initrd_end = initrd_start + boot_infos->ramDiskSize;
436                         initrd_below_start_ok = 1;
437                 }
438 #endif
439         } else {
440                 struct device_node *chosen;
441                 char *p;
442         
443 #ifdef CONFIG_BLK_DEV_INITRD
444                 if (r3 && r4 && r4 != 0xdeadbeef) {
445                         if (r3 < KERNELBASE)
446                                 r3 += KERNELBASE;
447                         initrd_start = r3;
448                         initrd_end = r3 + r4;
449                         ROOT_DEV = Root_RAM0;
450                         initrd_below_start_ok = 1;
451                 }
452 #endif
453                 chosen = find_devices("chosen");
454                 if (chosen != NULL) {
455                         p = get_property(chosen, "bootargs", NULL);
456                         if (p && *p) {
457                                 strlcpy(cmd_line, p, sizeof(cmd_line));
458                         }
459                 }
460         }
461 #ifdef CONFIG_ADB
462         if (strstr(cmd_line, "adb_sync")) {
463                 extern int __adb_probe_sync;
464                 __adb_probe_sync = 1;
465         }
466 #endif /* CONFIG_ADB */
467
468         switch (_machine) {
469         case _MACH_Pmac:
470                 pmac_init(r3, r4, r5, r6, r7);
471                 break;
472         case _MACH_chrp:
473                 chrp_init(r3, r4, r5, r6, r7);
474                 break;
475         }
476 }
477 #endif /* CONFIG_PPC_MULTIPLATFORM */
478
479 struct bi_record *find_bootinfo(void)
480 {
481         struct bi_record *rec;
482
483         rec = (struct bi_record *)_ALIGN((ulong)__bss_start+(1<<20)-1,(1<<20));
484         if ( rec->tag != BI_FIRST ) {
485                 /*
486                  * This 0x10000 offset is a terrible hack but it will go away when
487                  * we have the bootloader handle all the relocation and
488                  * prom calls -- Cort
489                  */
490                 rec = (struct bi_record *)_ALIGN((ulong)__bss_start+0x10000+(1<<20)-1,(1<<20));
491                 if ( rec->tag != BI_FIRST )
492                         return NULL;
493         }
494         return rec;
495 }
496
497 void parse_bootinfo(struct bi_record *rec)
498 {
499         if (rec == NULL || rec->tag != BI_FIRST)
500                 return;
501         while (rec->tag != BI_LAST) {
502                 ulong *data = rec->data;
503                 switch (rec->tag) {
504                 case BI_CMD_LINE:
505                         strlcpy(cmd_line, (void *)data, sizeof(cmd_line));
506                         break;
507                 case BI_SYSMAP:
508                         sysmap = (char *)((data[0] >= (KERNELBASE)) ? data[0] :
509                                           (data[0]+KERNELBASE));
510                         sysmap_size = data[1];
511                         break;
512 #ifdef CONFIG_BLK_DEV_INITRD
513                 case BI_INITRD:
514                         initrd_start = data[0] + KERNELBASE;
515                         initrd_end = data[0] + data[1] + KERNELBASE;
516                         break;
517 #endif /* CONFIG_BLK_DEV_INITRD */
518 #ifdef CONFIG_PPC_MULTIPLATFORM
519                 case BI_MACHTYPE:
520                         _machine = data[0];
521                         break;
522 #endif
523                 case BI_MEMSIZE:
524                         boot_mem_size = data[0];
525                         break;
526                 }
527                 rec = (struct bi_record *)((ulong)rec + rec->size);
528         }
529 }
530
531 /*
532  * Find out what kind of machine we're on and save any data we need
533  * from the early boot process (devtree is copied on pmac by prom_init()).
534  * This is called very early on the boot process, after a minimal
535  * MMU environment has been set up but before MMU_init is called.
536  */
537 void __init
538 machine_init(unsigned long r3, unsigned long r4, unsigned long r5,
539              unsigned long r6, unsigned long r7)
540 {
541 #ifdef CONFIG_CMDLINE
542         strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line));
543 #endif /* CONFIG_CMDLINE */
544
545 #ifdef CONFIG_6xx
546         ppc_md.power_save = ppc6xx_idle;
547 #endif
548 #ifdef CONFIG_POWER4
549         ppc_md.power_save = power4_idle;
550 #endif
551
552         platform_init(r3, r4, r5, r6, r7);
553
554         if (ppc_md.progress)
555                 ppc_md.progress("id mach(): done", 0x200);
556 }
557
558 /* Checks "l2cr=xxxx" command-line option */
559 int __init ppc_setup_l2cr(char *str)
560 {
561         if (cur_cpu_spec[0]->cpu_features & CPU_FTR_L2CR) {
562                 unsigned long val = simple_strtoul(str, NULL, 0);
563                 printk(KERN_INFO "l2cr set to %lx\n", val);
564                 _set_L2CR(0);           /* force invalidate by disable cache */
565                 _set_L2CR(val);         /* and enable it */
566         }
567         return 1;
568 }
569 __setup("l2cr=", ppc_setup_l2cr);
570
571 #ifdef CONFIG_NVRAM
572
573 /* Generic nvram hooks used by drivers/char/gen_nvram.c */
574 unsigned char nvram_read_byte(int addr)
575 {
576         if (ppc_md.nvram_read_val)
577                 return ppc_md.nvram_read_val(addr);
578         return 0xff;
579 }
580 EXPORT_SYMBOL(nvram_read_byte);
581
582 void nvram_write_byte(unsigned char val, int addr)
583 {
584         if (ppc_md.nvram_write_val)
585                 ppc_md.nvram_write_val(addr, val);
586 }
587 EXPORT_SYMBOL(nvram_write_byte);
588
589 void nvram_sync(void)
590 {
591         if (ppc_md.nvram_sync)
592                 ppc_md.nvram_sync();
593 }
594 EXPORT_SYMBOL(nvram_sync);
595
596 #endif /* CONFIG_NVRAM */
597
598 static struct cpu cpu_devices[NR_CPUS];
599
600 int __init ppc_init(void)
601 {
602         int i;
603
604         /* clear the progress line */
605         if ( ppc_md.progress ) ppc_md.progress("             ", 0xffff);
606
607         /* register CPU devices */
608         for (i = 0; i < NR_CPUS; i++)
609                 if (cpu_possible(i))
610                         register_cpu(&cpu_devices[i], i, NULL);
611
612         /* call platform init */
613         if (ppc_md.init != NULL) {
614                 ppc_md.init();
615         }
616         return 0;
617 }
618
619 arch_initcall(ppc_init);
620
621 /* Warning, IO base is not yet inited */
622 void __init setup_arch(char **cmdline_p)
623 {
624         extern int panic_timeout;
625         extern char *klimit;
626         extern void do_init_bootmem(void);
627
628         /* so udelay does something sensible, assume <= 1000 bogomips */
629         loops_per_jiffy = 500000000 / HZ;
630
631 #ifdef CONFIG_PPC_MULTIPLATFORM
632         /* This could be called "early setup arch", it must be done
633          * now because xmon need it
634          */
635         if (_machine == _MACH_Pmac)
636                 pmac_feature_init();    /* New cool way */
637 #endif
638
639 #ifdef CONFIG_XMON
640         xmon_map_scc();
641         if (strstr(cmd_line, "xmon"))
642                 xmon(0);
643 #endif /* CONFIG_XMON */
644         if ( ppc_md.progress ) ppc_md.progress("setup_arch: enter", 0x3eab);
645
646 #if defined(CONFIG_KGDB)
647         if (ppc_md.kgdb_map_scc)
648                 ppc_md.kgdb_map_scc();
649         set_debug_traps();
650         if (strstr(cmd_line, "gdb")) {
651                 if (ppc_md.progress)
652                         ppc_md.progress("setup_arch: kgdb breakpoint", 0x4000);
653                 printk("kgdb breakpoint activated\n");
654                 breakpoint();
655         }
656 #endif
657
658         /*
659          * Set cache line size based on type of cpu as a default.
660          * Systems with OF can look in the properties on the cpu node(s)
661          * for a possibly more accurate value.
662          */
663         if (cur_cpu_spec[0]->cpu_features & CPU_FTR_SPLIT_ID_CACHE) {
664                 dcache_bsize = cur_cpu_spec[0]->dcache_bsize;
665                 icache_bsize = cur_cpu_spec[0]->icache_bsize;
666                 ucache_bsize = 0;
667         } else
668                 ucache_bsize = dcache_bsize = icache_bsize
669                         = cur_cpu_spec[0]->dcache_bsize;
670
671         /* reboot on panic */
672         panic_timeout = 180;
673
674         init_mm.start_code = PAGE_OFFSET;
675         init_mm.end_code = (unsigned long) _etext;
676         init_mm.end_data = (unsigned long) _edata;
677         init_mm.brk = (unsigned long) klimit;
678
679         /* Save unparsed command line copy for /proc/cmdline */
680         strlcpy(saved_command_line, cmd_line, sizeof(saved_command_line));
681         *cmdline_p = cmd_line;
682
683         /* set up the bootmem stuff with available memory */
684         do_init_bootmem();
685         if ( ppc_md.progress ) ppc_md.progress("setup_arch: bootmem", 0x3eab);
686
687 #ifdef CONFIG_PPC_OCP
688         /* Initialize OCP device list */
689         ocp_early_init();
690         if ( ppc_md.progress ) ppc_md.progress("ocp: exit", 0x3eab);
691 #endif
692
693         ppc_md.setup_arch();
694         if ( ppc_md.progress ) ppc_md.progress("arch: exit", 0x3eab);
695
696         paging_init();
697
698         /* this is for modules since _machine can be a define -- Cort */
699         ppc_md.ppc_machine = _machine;
700 }