ia64/linux-2.6.18-xen.hg

view arch/mips/kernel/smtc-proc.c @ 452:c7ed6fe5dca0

kexec: dont initialise regions in reserve_memory()

There is no need to initialise efi_memmap_res and boot_param_res in
reserve_memory() for the initial xen domain as it is done in
machine_kexec_setup_resources() using values from the kexec hypercall.

Signed-off-by: Simon Horman <horms@verge.net.au>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Feb 28 10:55:18 2008 +0000 (2008-02-28)
parents 831230e53067
children
line source
1 /*
2 * /proc hooks for SMTC kernel
3 * Copyright (C) 2005 Mips Technologies, Inc
4 */
6 #include <linux/kernel.h>
7 #include <linux/sched.h>
8 #include <linux/cpumask.h>
9 #include <linux/interrupt.h>
11 #include <asm/cpu.h>
12 #include <asm/processor.h>
13 #include <asm/atomic.h>
14 #include <asm/system.h>
15 #include <asm/hardirq.h>
16 #include <asm/mmu_context.h>
17 #include <asm/smp.h>
18 #include <asm/mipsregs.h>
19 #include <asm/cacheflush.h>
20 #include <linux/proc_fs.h>
22 #include <asm/smtc_proc.h>
24 /*
25 * /proc diagnostic and statistics hooks
26 */
28 /*
29 * Statistics gathered
30 */
31 unsigned long selfipis[NR_CPUS];
33 struct smtc_cpu_proc smtc_cpu_stats[NR_CPUS];
35 static struct proc_dir_entry *smtc_stats;
37 atomic_t smtc_fpu_recoveries;
39 static int proc_read_smtc(char *page, char **start, off_t off,
40 int count, int *eof, void *data)
41 {
42 int totalen = 0;
43 int len;
44 int i;
45 extern unsigned long ebase;
47 len = sprintf(page, "SMTC Status Word: 0x%08x\n", smtc_status);
48 totalen += len;
49 page += len;
50 len = sprintf(page, "Config7: 0x%08x\n", read_c0_config7());
51 totalen += len;
52 page += len;
53 len = sprintf(page, "EBASE: 0x%08lx\n", ebase);
54 totalen += len;
55 page += len;
56 len = sprintf(page, "Counter Interrupts taken per CPU (TC)\n");
57 totalen += len;
58 page += len;
59 for (i=0; i < NR_CPUS; i++) {
60 len = sprintf(page, "%d: %ld\n", i, smtc_cpu_stats[i].timerints);
61 totalen += len;
62 page += len;
63 }
64 len = sprintf(page, "Self-IPIs by CPU:\n");
65 totalen += len;
66 page += len;
67 for(i = 0; i < NR_CPUS; i++) {
68 len = sprintf(page, "%d: %ld\n", i, smtc_cpu_stats[i].selfipis);
69 totalen += len;
70 page += len;
71 }
72 len = sprintf(page, "%d Recoveries of \"stolen\" FPU\n",
73 atomic_read(&smtc_fpu_recoveries));
74 totalen += len;
75 page += len;
77 return totalen;
78 }
80 void init_smtc_stats(void)
81 {
82 int i;
84 for (i=0; i<NR_CPUS; i++) {
85 smtc_cpu_stats[i].timerints = 0;
86 smtc_cpu_stats[i].selfipis = 0;
87 }
89 atomic_set(&smtc_fpu_recoveries, 0);
91 smtc_stats = create_proc_read_entry("smtc", 0444, NULL,
92 proc_read_smtc, NULL);
93 }