2 * linux/arch/arm/kernel/setup.c
4 * Copyright (C) 1995-2001 Russell King
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 #include <linux/module.h>
11 #include <linux/kernel.h>
12 #include <linux/stddef.h>
13 #include <linux/ioport.h>
14 #include <linux/delay.h>
15 #include <linux/utsname.h>
16 #include <linux/initrd.h>
17 #include <linux/console.h>
18 #include <linux/bootmem.h>
19 #include <linux/seq_file.h>
20 #include <linux/screen_info.h>
21 #include <linux/init.h>
22 #include <linux/root_dev.h>
23 #include <linux/cpu.h>
24 #include <linux/interrupt.h>
25 #include <linux/smp.h>
30 #include <asm/procinfo.h>
31 #include <asm/setup.h>
32 #include <asm/mach-types.h>
33 #include <asm/cacheflush.h>
34 #include <asm/tlbflush.h>
36 #include <asm/mach/arch.h>
37 #include <asm/mach/irq.h>
38 #include <asm/mach/time.h>
39 #include <asm/traps.h>
45 #define MEM_SIZE (16*1024*1024)
48 #if defined(CONFIG_FPE_NWFPE) || defined(CONFIG_FPE_FASTFPE)
51 static int __init fpe_setup(char *line)
53 memcpy(fpe_type, line, 8);
57 __setup("fpe=", fpe_setup);
60 extern void paging_init(struct meminfo *, struct machine_desc *desc);
61 extern void reboot_setup(char *str);
62 extern int root_mountflags;
63 extern void _stext, _text, _etext, __data_start, _edata, _end;
65 unsigned int processor_id;
66 EXPORT_SYMBOL(processor_id);
67 unsigned int __machine_arch_type;
68 EXPORT_SYMBOL(__machine_arch_type);
70 unsigned int __atags_pointer __initdata;
72 unsigned int system_rev;
73 EXPORT_SYMBOL(system_rev);
75 unsigned int system_serial_low;
76 EXPORT_SYMBOL(system_serial_low);
78 unsigned int system_serial_high;
79 EXPORT_SYMBOL(system_serial_high);
81 unsigned int elf_hwcap;
82 EXPORT_SYMBOL(elf_hwcap);
84 unsigned long __initdata vmalloc_reserve = 128 << 20;
88 struct processor processor;
91 struct cpu_tlb_fns cpu_tlb;
94 struct cpu_user_fns cpu_user;
97 struct cpu_cache_fns cpu_cache;
99 #ifdef CONFIG_OUTER_CACHE
100 struct outer_cache_fns outer_cache;
107 } ____cacheline_aligned;
109 static struct stack stacks[NR_CPUS];
111 char elf_platform[ELF_PLATFORM_SIZE];
112 EXPORT_SYMBOL(elf_platform);
114 unsigned long phys_initrd_start __initdata = 0;
115 unsigned long phys_initrd_size __initdata = 0;
117 static struct meminfo meminfo __initdata = { 0, };
118 static const char *cpu_name;
119 static const char *machine_name;
120 static char __initdata command_line[COMMAND_LINE_SIZE];
122 static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE;
123 static union { char c[4]; unsigned long l; } endian_test __initdata = { { 'l', '?', '?', 'b' } };
124 #define ENDIANNESS ((char)endian_test.l)
126 DEFINE_PER_CPU(struct cpuinfo_arm, cpu_data);
129 * Standard memory resources
131 static struct resource mem_res[] = {
136 .flags = IORESOURCE_MEM
139 .name = "Kernel text",
142 .flags = IORESOURCE_MEM
145 .name = "Kernel data",
148 .flags = IORESOURCE_MEM
152 #define video_ram mem_res[0]
153 #define kernel_code mem_res[1]
154 #define kernel_data mem_res[2]
156 static struct resource io_res[] = {
161 .flags = IORESOURCE_IO | IORESOURCE_BUSY
167 .flags = IORESOURCE_IO | IORESOURCE_BUSY
173 .flags = IORESOURCE_IO | IORESOURCE_BUSY
177 #define lp0 io_res[0]
178 #define lp1 io_res[1]
179 #define lp2 io_res[2]
181 static const char *cache_types[16] = {
200 static const char *cache_clean[16] = {
219 static const char *cache_lockdown[16] = {
238 static const char *proc_arch[] = {
258 #define CACHE_TYPE(x) (((x) >> 25) & 15)
259 #define CACHE_S(x) ((x) & (1 << 24))
260 #define CACHE_DSIZE(x) (((x) >> 12) & 4095) /* only if S=1 */
261 #define CACHE_ISIZE(x) ((x) & 4095)
263 #define CACHE_SIZE(y) (((y) >> 6) & 7)
264 #define CACHE_ASSOC(y) (((y) >> 3) & 7)
265 #define CACHE_M(y) ((y) & (1 << 2))
266 #define CACHE_LINE(y) ((y) & 3)
268 static inline void dump_cache(const char *prefix, int cpu, unsigned int cache)
270 unsigned int mult = 2 + (CACHE_M(cache) ? 1 : 0);
272 printk("CPU%u: %s: %d bytes, associativity %d, %d byte lines, %d sets\n",
274 mult << (8 + CACHE_SIZE(cache)),
275 (mult << CACHE_ASSOC(cache)) >> 1,
276 8 << CACHE_LINE(cache),
277 1 << (6 + CACHE_SIZE(cache) - CACHE_ASSOC(cache) -
281 static void __init dump_cpu_info(int cpu)
283 unsigned int info = read_cpuid(CPUID_CACHETYPE);
285 if (info != processor_id) {
286 printk("CPU%u: D %s %s cache\n", cpu, cache_is_vivt() ? "VIVT" : "VIPT",
287 cache_types[CACHE_TYPE(info)]);
289 dump_cache("I cache", cpu, CACHE_ISIZE(info));
290 dump_cache("D cache", cpu, CACHE_DSIZE(info));
292 dump_cache("cache", cpu, CACHE_ISIZE(info));
296 if (arch_is_coherent())
297 printk("Cache coherency enabled\n");
300 int cpu_architecture(void)
304 if ((processor_id & 0x0008f000) == 0) {
305 cpu_arch = CPU_ARCH_UNKNOWN;
306 } else if ((processor_id & 0x0008f000) == 0x00007000) {
307 cpu_arch = (processor_id & (1 << 23)) ? CPU_ARCH_ARMv4T : CPU_ARCH_ARMv3;
308 } else if ((processor_id & 0x00080000) == 0x00000000) {
309 cpu_arch = (processor_id >> 16) & 7;
311 cpu_arch += CPU_ARCH_ARMv3;
312 } else if ((processor_id & 0x000f0000) == 0x000f0000) {
315 /* Revised CPUID format. Read the Memory Model Feature
316 * Register 0 and check for VMSAv7 or PMSAv7 */
317 asm("mrc p15, 0, %0, c0, c1, 4"
319 if ((mmfr0 & 0x0000000f) == 0x00000003 ||
320 (mmfr0 & 0x000000f0) == 0x00000030)
321 cpu_arch = CPU_ARCH_ARMv7;
322 else if ((mmfr0 & 0x0000000f) == 0x00000002 ||
323 (mmfr0 & 0x000000f0) == 0x00000020)
324 cpu_arch = CPU_ARCH_ARMv6;
326 cpu_arch = CPU_ARCH_UNKNOWN;
328 cpu_arch = CPU_ARCH_UNKNOWN;
334 * These functions re-use the assembly code in head.S, which
335 * already provide the required functionality.
337 extern struct proc_info_list *lookup_processor_type(unsigned int);
338 extern struct machine_desc *lookup_machine_type(unsigned int);
340 static void __init setup_processor(void)
342 struct proc_info_list *list;
345 * locate processor in the list of supported processor
346 * types. The linker builds this table for us from the
347 * entries in arch/arm/mm/proc-*.S
349 list = lookup_processor_type(processor_id);
351 printk("CPU configuration botched (ID %08x), unable "
352 "to continue.\n", processor_id);
356 cpu_name = list->cpu_name;
359 processor = *list->proc;
362 cpu_tlb = *list->tlb;
365 cpu_user = *list->user;
368 cpu_cache = *list->cache;
371 printk("CPU: %s [%08x] revision %d (ARMv%s), cr=%08lx\n",
372 cpu_name, processor_id, (int)processor_id & 15,
373 proc_arch[cpu_architecture()], cr_alignment);
375 sprintf(init_utsname()->machine, "%s%c", list->arch_name, ENDIANNESS);
376 sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS);
377 elf_hwcap = list->elf_hwcap;
378 #ifndef CONFIG_ARM_THUMB
379 elf_hwcap &= ~HWCAP_THUMB;
386 * cpu_init - initialise one CPU.
388 * cpu_init dumps the cache information, initialises SMP specific
389 * information, and sets up the per-CPU stacks.
393 unsigned int cpu = smp_processor_id();
394 struct stack *stk = &stacks[cpu];
396 if (cpu >= NR_CPUS) {
397 printk(KERN_CRIT "CPU%u: bad primary CPU number\n", cpu);
401 if (system_state == SYSTEM_BOOTING)
405 * setup stacks for re-entrant exception handlers
417 "I" (PSR_F_BIT | PSR_I_BIT | IRQ_MODE),
418 "I" (offsetof(struct stack, irq[0])),
419 "I" (PSR_F_BIT | PSR_I_BIT | ABT_MODE),
420 "I" (offsetof(struct stack, abt[0])),
421 "I" (PSR_F_BIT | PSR_I_BIT | UND_MODE),
422 "I" (offsetof(struct stack, und[0])),
423 "I" (PSR_F_BIT | PSR_I_BIT | SVC_MODE)
427 static struct machine_desc * __init setup_machine(unsigned int nr)
429 struct machine_desc *list;
432 * locate machine in the list of supported machines.
434 list = lookup_machine_type(nr);
436 printk("Machine configuration botched (nr %d), unable "
437 "to continue.\n", nr);
441 printk("Machine: %s\n", list->name);
446 static void __init early_initrd(char **p)
448 unsigned long start, size;
450 start = memparse(*p, p);
452 size = memparse((*p) + 1, p);
454 phys_initrd_start = start;
455 phys_initrd_size = size;
458 __early_param("initrd=", early_initrd);
460 static void __init arm_add_memory(unsigned long start, unsigned long size)
462 struct membank *bank;
465 * Ensure that start/size are aligned to a page boundary.
466 * Size is appropriately rounded down, start is rounded up.
468 size -= start & ~PAGE_MASK;
470 bank = &meminfo.bank[meminfo.nr_banks++];
472 bank->start = PAGE_ALIGN(start);
473 bank->size = size & PAGE_MASK;
474 bank->node = PHYS_TO_NID(start);
478 * Pick out the memory size. We look for mem=size@start,
479 * where start and size are "size[KkMm]"
481 static void __init early_mem(char **p)
483 static int usermem __initdata = 0;
484 unsigned long size, start;
487 * If the user specifies memory size, we
488 * blow away any automatically generated
493 meminfo.nr_banks = 0;
497 size = memparse(*p, p);
499 start = memparse(*p + 1, p);
501 arm_add_memory(start, size);
503 __early_param("mem=", early_mem);
506 * vmalloc=size forces the vmalloc area to be exactly 'size'
507 * bytes. This can be used to increase (or decrease) the vmalloc
508 * area - the default is 128m.
510 static void __init early_vmalloc(char **arg)
512 vmalloc_reserve = memparse(*arg, arg);
514 __early_param("vmalloc=", early_vmalloc);
517 * Initial parsing of the command line.
519 static void __init parse_cmdline(char **cmdline_p, char *from)
521 char c = ' ', *to = command_line;
526 extern struct early_params __early_begin, __early_end;
527 struct early_params *p;
529 for (p = &__early_begin; p < &__early_end; p++) {
530 int len = strlen(p->arg);
532 if (memcmp(from, p->arg, len) == 0) {
533 if (to != command_line)
538 while (*from != ' ' && *from != '\0')
547 if (COMMAND_LINE_SIZE <= ++len)
552 *cmdline_p = command_line;
556 setup_ramdisk(int doload, int prompt, int image_start, unsigned int rd_sz)
558 #ifdef CONFIG_BLK_DEV_RAM
559 extern int rd_size, rd_image_start, rd_prompt, rd_doload;
561 rd_image_start = image_start;
571 request_standard_resources(struct meminfo *mi, struct machine_desc *mdesc)
573 struct resource *res;
576 kernel_code.start = virt_to_phys(&_text);
577 kernel_code.end = virt_to_phys(&_etext - 1);
578 kernel_data.start = virt_to_phys(&__data_start);
579 kernel_data.end = virt_to_phys(&_end - 1);
581 for (i = 0; i < mi->nr_banks; i++) {
582 unsigned long virt_start, virt_end;
584 if (mi->bank[i].size == 0)
587 virt_start = __phys_to_virt(mi->bank[i].start);
588 virt_end = virt_start + mi->bank[i].size - 1;
590 res = alloc_bootmem_low(sizeof(*res));
591 res->name = "System RAM";
592 res->start = __virt_to_phys(virt_start);
593 res->end = __virt_to_phys(virt_end);
594 res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
596 request_resource(&iomem_resource, res);
598 if (kernel_code.start >= res->start &&
599 kernel_code.end <= res->end)
600 request_resource(res, &kernel_code);
601 if (kernel_data.start >= res->start &&
602 kernel_data.end <= res->end)
603 request_resource(res, &kernel_data);
606 if (mdesc->video_start) {
607 video_ram.start = mdesc->video_start;
608 video_ram.end = mdesc->video_end;
609 request_resource(&iomem_resource, &video_ram);
613 * Some machines don't have the possibility of ever
614 * possessing lp0, lp1 or lp2
616 if (mdesc->reserve_lp0)
617 request_resource(&ioport_resource, &lp0);
618 if (mdesc->reserve_lp1)
619 request_resource(&ioport_resource, &lp1);
620 if (mdesc->reserve_lp2)
621 request_resource(&ioport_resource, &lp2);
627 * This is the new way of passing data to the kernel at boot time. Rather
628 * than passing a fixed inflexible structure to the kernel, we pass a list
629 * of variable-sized tags to the kernel. The first tag must be a ATAG_CORE
630 * tag for the list to be recognised (to distinguish the tagged list from
631 * a param_struct). The list is terminated with a zero-length tag (this tag
632 * is not parsed in any way).
634 static int __init parse_tag_core(const struct tag *tag)
636 if (tag->hdr.size > 2) {
637 if ((tag->u.core.flags & 1) == 0)
638 root_mountflags &= ~MS_RDONLY;
639 ROOT_DEV = old_decode_dev(tag->u.core.rootdev);
644 __tagtable(ATAG_CORE, parse_tag_core);
646 static int __init parse_tag_mem32(const struct tag *tag)
648 if (meminfo.nr_banks >= NR_BANKS) {
650 "Ignoring memory bank 0x%08x size %dKB\n",
651 tag->u.mem.start, tag->u.mem.size / 1024);
654 arm_add_memory(tag->u.mem.start, tag->u.mem.size);
658 __tagtable(ATAG_MEM, parse_tag_mem32);
660 #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE)
661 struct screen_info screen_info = {
662 .orig_video_lines = 30,
663 .orig_video_cols = 80,
664 .orig_video_mode = 0,
665 .orig_video_ega_bx = 0,
666 .orig_video_isVGA = 1,
667 .orig_video_points = 8
670 static int __init parse_tag_videotext(const struct tag *tag)
672 screen_info.orig_x = tag->u.videotext.x;
673 screen_info.orig_y = tag->u.videotext.y;
674 screen_info.orig_video_page = tag->u.videotext.video_page;
675 screen_info.orig_video_mode = tag->u.videotext.video_mode;
676 screen_info.orig_video_cols = tag->u.videotext.video_cols;
677 screen_info.orig_video_ega_bx = tag->u.videotext.video_ega_bx;
678 screen_info.orig_video_lines = tag->u.videotext.video_lines;
679 screen_info.orig_video_isVGA = tag->u.videotext.video_isvga;
680 screen_info.orig_video_points = tag->u.videotext.video_points;
684 __tagtable(ATAG_VIDEOTEXT, parse_tag_videotext);
687 static int __init parse_tag_ramdisk(const struct tag *tag)
689 setup_ramdisk((tag->u.ramdisk.flags & 1) == 0,
690 (tag->u.ramdisk.flags & 2) == 0,
691 tag->u.ramdisk.start, tag->u.ramdisk.size);
695 __tagtable(ATAG_RAMDISK, parse_tag_ramdisk);
697 static int __init parse_tag_initrd(const struct tag *tag)
699 printk(KERN_WARNING "ATAG_INITRD is deprecated; "
700 "please update your bootloader.\n");
701 phys_initrd_start = __virt_to_phys(tag->u.initrd.start);
702 phys_initrd_size = tag->u.initrd.size;
706 __tagtable(ATAG_INITRD, parse_tag_initrd);
708 static int __init parse_tag_initrd2(const struct tag *tag)
710 phys_initrd_start = tag->u.initrd.start;
711 phys_initrd_size = tag->u.initrd.size;
715 __tagtable(ATAG_INITRD2, parse_tag_initrd2);
717 static int __init parse_tag_serialnr(const struct tag *tag)
719 system_serial_low = tag->u.serialnr.low;
720 system_serial_high = tag->u.serialnr.high;
724 __tagtable(ATAG_SERIAL, parse_tag_serialnr);
726 static int __init parse_tag_revision(const struct tag *tag)
728 system_rev = tag->u.revision.rev;
732 __tagtable(ATAG_REVISION, parse_tag_revision);
734 static int __init parse_tag_cmdline(const struct tag *tag)
736 strlcpy(default_command_line, tag->u.cmdline.cmdline, COMMAND_LINE_SIZE);
740 __tagtable(ATAG_CMDLINE, parse_tag_cmdline);
743 * Scan the tag table for this tag, and call its parse function.
744 * The tag table is built by the linker from all the __tagtable
747 static int __init parse_tag(const struct tag *tag)
749 extern struct tagtable __tagtable_begin, __tagtable_end;
752 for (t = &__tagtable_begin; t < &__tagtable_end; t++)
753 if (tag->hdr.tag == t->tag) {
758 return t < &__tagtable_end;
762 * Parse all tags in the list, checking both the global and architecture
763 * specific tag tables.
765 static void __init parse_tags(const struct tag *t)
767 for (; t->hdr.size; t = tag_next(t))
770 "Ignoring unrecognised tag 0x%08x\n",
775 * This holds our defaults.
777 static struct init_tags {
778 struct tag_header hdr1;
779 struct tag_core core;
780 struct tag_header hdr2;
781 struct tag_mem32 mem;
782 struct tag_header hdr3;
783 } init_tags __initdata = {
784 { tag_size(tag_core), ATAG_CORE },
785 { 1, PAGE_SIZE, 0xff },
786 { tag_size(tag_mem32), ATAG_MEM },
787 { MEM_SIZE, PHYS_OFFSET },
791 static void (*init_machine)(void) __initdata;
793 static int __init customize_machine(void)
795 /* customizes platform devices, or adds new ones */
800 arch_initcall(customize_machine);
802 void __init setup_arch(char **cmdline_p)
804 struct tag *tags = (struct tag *)&init_tags;
805 struct machine_desc *mdesc;
806 char *from = default_command_line;
809 mdesc = setup_machine(machine_arch_type);
810 machine_name = mdesc->name;
812 if (mdesc->soft_reboot)
816 tags = phys_to_virt(__atags_pointer);
817 else if (mdesc->boot_params)
818 tags = phys_to_virt(mdesc->boot_params);
821 * If we have the old style parameters, convert them to
824 if (tags->hdr.tag != ATAG_CORE)
825 convert_to_tag_list(tags);
826 if (tags->hdr.tag != ATAG_CORE)
827 tags = (struct tag *)&init_tags;
830 mdesc->fixup(mdesc, tags, &from, &meminfo);
832 if (tags->hdr.tag == ATAG_CORE) {
833 if (meminfo.nr_banks != 0)
834 squash_mem_tags(tags);
839 init_mm.start_code = (unsigned long) &_text;
840 init_mm.end_code = (unsigned long) &_etext;
841 init_mm.end_data = (unsigned long) &_edata;
842 init_mm.brk = (unsigned long) &_end;
844 memcpy(boot_command_line, from, COMMAND_LINE_SIZE);
845 boot_command_line[COMMAND_LINE_SIZE-1] = '\0';
846 parse_cmdline(cmdline_p, from);
847 paging_init(&meminfo, mdesc);
848 request_standard_resources(&meminfo, mdesc);
857 * Set up various architecture-specific pointers
859 init_arch_irq = mdesc->init_irq;
860 system_timer = mdesc->timer;
861 init_machine = mdesc->init_machine;
864 #if defined(CONFIG_VGA_CONSOLE)
865 conswitchp = &vga_con;
866 #elif defined(CONFIG_DUMMY_CONSOLE)
867 conswitchp = &dummy_con;
874 static int __init topology_init(void)
878 for_each_possible_cpu(cpu) {
879 struct cpuinfo_arm *cpuinfo = &per_cpu(cpu_data, cpu);
880 cpuinfo->cpu.hotpluggable = 1;
881 register_cpu(&cpuinfo->cpu, cpu);
887 subsys_initcall(topology_init);
889 static const char *hwcap_str[] = {
905 c_show_cache(struct seq_file *m, const char *type, unsigned int cache)
907 unsigned int mult = 2 + (CACHE_M(cache) ? 1 : 0);
909 seq_printf(m, "%s size\t\t: %d\n"
911 "%s line length\t: %d\n"
913 type, mult << (8 + CACHE_SIZE(cache)),
914 type, (mult << CACHE_ASSOC(cache)) >> 1,
915 type, 8 << CACHE_LINE(cache),
916 type, 1 << (6 + CACHE_SIZE(cache) - CACHE_ASSOC(cache) -
920 static int c_show(struct seq_file *m, void *v)
924 seq_printf(m, "Processor\t: %s rev %d (%s)\n",
925 cpu_name, (int)processor_id & 15, elf_platform);
927 #if defined(CONFIG_SMP)
928 for_each_online_cpu(i) {
930 * glibc reads /proc/cpuinfo to determine the number of
931 * online processors, looking for lines beginning with
932 * "processor". Give glibc what it expects.
934 seq_printf(m, "processor\t: %d\n", i);
935 seq_printf(m, "BogoMIPS\t: %lu.%02lu\n\n",
936 per_cpu(cpu_data, i).loops_per_jiffy / (500000UL/HZ),
937 (per_cpu(cpu_data, i).loops_per_jiffy / (5000UL/HZ)) % 100);
939 #else /* CONFIG_SMP */
940 seq_printf(m, "BogoMIPS\t: %lu.%02lu\n",
941 loops_per_jiffy / (500000/HZ),
942 (loops_per_jiffy / (5000/HZ)) % 100);
945 /* dump out the processor features */
946 seq_puts(m, "Features\t: ");
948 for (i = 0; hwcap_str[i]; i++)
949 if (elf_hwcap & (1 << i))
950 seq_printf(m, "%s ", hwcap_str[i]);
952 seq_printf(m, "\nCPU implementer\t: 0x%02x\n", processor_id >> 24);
953 seq_printf(m, "CPU architecture: %s\n", proc_arch[cpu_architecture()]);
955 if ((processor_id & 0x0008f000) == 0x00000000) {
957 seq_printf(m, "CPU part\t: %07x\n", processor_id >> 4);
959 if ((processor_id & 0x0008f000) == 0x00007000) {
961 seq_printf(m, "CPU variant\t: 0x%02x\n",
962 (processor_id >> 16) & 127);
965 seq_printf(m, "CPU variant\t: 0x%x\n",
966 (processor_id >> 20) & 15);
968 seq_printf(m, "CPU part\t: 0x%03x\n",
969 (processor_id >> 4) & 0xfff);
971 seq_printf(m, "CPU revision\t: %d\n", processor_id & 15);
974 unsigned int cache_info = read_cpuid(CPUID_CACHETYPE);
975 if (cache_info != processor_id) {
976 seq_printf(m, "Cache type\t: %s\n"
977 "Cache clean\t: %s\n"
978 "Cache lockdown\t: %s\n"
979 "Cache format\t: %s\n",
980 cache_types[CACHE_TYPE(cache_info)],
981 cache_clean[CACHE_TYPE(cache_info)],
982 cache_lockdown[CACHE_TYPE(cache_info)],
983 CACHE_S(cache_info) ? "Harvard" : "Unified");
985 if (CACHE_S(cache_info)) {
986 c_show_cache(m, "I", CACHE_ISIZE(cache_info));
987 c_show_cache(m, "D", CACHE_DSIZE(cache_info));
989 c_show_cache(m, "Cache", CACHE_ISIZE(cache_info));
996 seq_printf(m, "Hardware\t: %s\n", machine_name);
997 seq_printf(m, "Revision\t: %04x\n", system_rev);
998 seq_printf(m, "Serial\t\t: %08x%08x\n",
999 system_serial_high, system_serial_low);
1004 static void *c_start(struct seq_file *m, loff_t *pos)
1006 return *pos < 1 ? (void *)1 : NULL;
1009 static void *c_next(struct seq_file *m, void *v, loff_t *pos)
1015 static void c_stop(struct seq_file *m, void *v)
1019 const struct seq_operations cpuinfo_op = {