diff options
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/kernel/msr.c | 9 | ||||
-rw-r--r-- | arch/i386/mach-voyager/voyager_smp.c | 6 | ||||
-rw-r--r-- | arch/i386/mm/pgtable.c | 14 |
3 files changed, 19 insertions, 10 deletions
diff --git a/arch/i386/kernel/msr.c b/arch/i386/kernel/msr.c index d022cb8fd725..5c29a9fb4a44 100644 --- a/arch/i386/kernel/msr.c +++ b/arch/i386/kernel/msr.c | |||
@@ -251,7 +251,9 @@ static int msr_class_device_create(int i) | |||
251 | return err; | 251 | return err; |
252 | } | 252 | } |
253 | 253 | ||
254 | static int msr_class_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) | 254 | #ifdef CONFIG_HOTPLUG_CPU |
255 | static int msr_class_cpu_callback(struct notifier_block *nfb, | ||
256 | unsigned long action, void *hcpu) | ||
255 | { | 257 | { |
256 | unsigned int cpu = (unsigned long)hcpu; | 258 | unsigned int cpu = (unsigned long)hcpu; |
257 | 259 | ||
@@ -270,6 +272,7 @@ static struct notifier_block __cpuinitdata msr_class_cpu_notifier = | |||
270 | { | 272 | { |
271 | .notifier_call = msr_class_cpu_callback, | 273 | .notifier_call = msr_class_cpu_callback, |
272 | }; | 274 | }; |
275 | #endif | ||
273 | 276 | ||
274 | static int __init msr_init(void) | 277 | static int __init msr_init(void) |
275 | { | 278 | { |
@@ -292,7 +295,7 @@ static int __init msr_init(void) | |||
292 | if (err != 0) | 295 | if (err != 0) |
293 | goto out_class; | 296 | goto out_class; |
294 | } | 297 | } |
295 | register_cpu_notifier(&msr_class_cpu_notifier); | 298 | register_hotcpu_notifier(&msr_class_cpu_notifier); |
296 | 299 | ||
297 | err = 0; | 300 | err = 0; |
298 | goto out; | 301 | goto out; |
@@ -315,7 +318,7 @@ static void __exit msr_exit(void) | |||
315 | class_device_destroy(msr_class, MKDEV(MSR_MAJOR, cpu)); | 318 | class_device_destroy(msr_class, MKDEV(MSR_MAJOR, cpu)); |
316 | class_destroy(msr_class); | 319 | class_destroy(msr_class); |
317 | unregister_chrdev(MSR_MAJOR, "cpu/msr"); | 320 | unregister_chrdev(MSR_MAJOR, "cpu/msr"); |
318 | unregister_cpu_notifier(&msr_class_cpu_notifier); | 321 | unregister_hotcpu_notifier(&msr_class_cpu_notifier); |
319 | } | 322 | } |
320 | 323 | ||
321 | module_init(msr_init); | 324 | module_init(msr_init); |
diff --git a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c index 5b8b579a079f..6e9e494c6c3d 100644 --- a/arch/i386/mach-voyager/voyager_smp.c +++ b/arch/i386/mach-voyager/voyager_smp.c | |||
@@ -1938,3 +1938,9 @@ smp_cpus_done(unsigned int max_cpus) | |||
1938 | { | 1938 | { |
1939 | zap_low_mappings(); | 1939 | zap_low_mappings(); |
1940 | } | 1940 | } |
1941 | |||
1942 | void __init | ||
1943 | smp_setup_processor_id(void) | ||
1944 | { | ||
1945 | current_thread_info()->cpu = hard_smp_processor_id(); | ||
1946 | } | ||
diff --git a/arch/i386/mm/pgtable.c b/arch/i386/mm/pgtable.c index 2889567e21a1..5e735ff90e8a 100644 --- a/arch/i386/mm/pgtable.c +++ b/arch/i386/mm/pgtable.c | |||
@@ -30,7 +30,6 @@ void show_mem(void) | |||
30 | struct page *page; | 30 | struct page *page; |
31 | pg_data_t *pgdat; | 31 | pg_data_t *pgdat; |
32 | unsigned long i; | 32 | unsigned long i; |
33 | struct page_state ps; | ||
34 | unsigned long flags; | 33 | unsigned long flags; |
35 | 34 | ||
36 | printk(KERN_INFO "Mem-info:\n"); | 35 | printk(KERN_INFO "Mem-info:\n"); |
@@ -58,12 +57,13 @@ void show_mem(void) | |||
58 | printk(KERN_INFO "%d pages shared\n", shared); | 57 | printk(KERN_INFO "%d pages shared\n", shared); |
59 | printk(KERN_INFO "%d pages swap cached\n", cached); | 58 | printk(KERN_INFO "%d pages swap cached\n", cached); |
60 | 59 | ||
61 | get_page_state(&ps); | 60 | printk(KERN_INFO "%lu pages dirty\n", global_page_state(NR_FILE_DIRTY)); |
62 | printk(KERN_INFO "%lu pages dirty\n", ps.nr_dirty); | 61 | printk(KERN_INFO "%lu pages writeback\n", |
63 | printk(KERN_INFO "%lu pages writeback\n", ps.nr_writeback); | 62 | global_page_state(NR_WRITEBACK)); |
64 | printk(KERN_INFO "%lu pages mapped\n", ps.nr_mapped); | 63 | printk(KERN_INFO "%lu pages mapped\n", global_page_state(NR_FILE_MAPPED)); |
65 | printk(KERN_INFO "%lu pages slab\n", ps.nr_slab); | 64 | printk(KERN_INFO "%lu pages slab\n", global_page_state(NR_SLAB)); |
66 | printk(KERN_INFO "%lu pages pagetables\n", ps.nr_page_table_pages); | 65 | printk(KERN_INFO "%lu pages pagetables\n", |
66 | global_page_state(NR_PAGETABLE)); | ||
67 | } | 67 | } |
68 | 68 | ||
69 | /* | 69 | /* |