diff options
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/kernel/traps.c | 6 | ||||
-rw-r--r-- | arch/ia64/mm/discontig.c | 33 | ||||
-rw-r--r-- | arch/ia64/mm/init.c | 2 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/sn2/sn_proc_fs.c | 39 |
4 files changed, 25 insertions, 55 deletions
diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c index dabd6c32641e..7c1ddc8ac443 100644 --- a/arch/ia64/kernel/traps.c +++ b/arch/ia64/kernel/traps.c | |||
@@ -30,19 +30,19 @@ extern spinlock_t timerlist_lock; | |||
30 | fpswa_interface_t *fpswa_interface; | 30 | fpswa_interface_t *fpswa_interface; |
31 | EXPORT_SYMBOL(fpswa_interface); | 31 | EXPORT_SYMBOL(fpswa_interface); |
32 | 32 | ||
33 | struct notifier_block *ia64die_chain; | 33 | ATOMIC_NOTIFIER_HEAD(ia64die_chain); |
34 | 34 | ||
35 | int | 35 | int |
36 | register_die_notifier(struct notifier_block *nb) | 36 | register_die_notifier(struct notifier_block *nb) |
37 | { | 37 | { |
38 | return notifier_chain_register(&ia64die_chain, nb); | 38 | return atomic_notifier_chain_register(&ia64die_chain, nb); |
39 | } | 39 | } |
40 | EXPORT_SYMBOL_GPL(register_die_notifier); | 40 | EXPORT_SYMBOL_GPL(register_die_notifier); |
41 | 41 | ||
42 | int | 42 | int |
43 | unregister_die_notifier(struct notifier_block *nb) | 43 | unregister_die_notifier(struct notifier_block *nb) |
44 | { | 44 | { |
45 | return notifier_chain_unregister(&ia64die_chain, nb); | 45 | return atomic_notifier_chain_unregister(&ia64die_chain, nb); |
46 | } | 46 | } |
47 | EXPORT_SYMBOL_GPL(unregister_die_notifier); | 47 | EXPORT_SYMBOL_GPL(unregister_die_notifier); |
48 | 48 | ||
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c index 2f5e44862e91..ec9eeb89975d 100644 --- a/arch/ia64/mm/discontig.c +++ b/arch/ia64/mm/discontig.c | |||
@@ -379,31 +379,6 @@ static void __init *memory_less_node_alloc(int nid, unsigned long pernodesize) | |||
379 | } | 379 | } |
380 | 380 | ||
381 | /** | 381 | /** |
382 | * pgdat_insert - insert the pgdat into global pgdat_list | ||
383 | * @pgdat: the pgdat for a node. | ||
384 | */ | ||
385 | static void __init pgdat_insert(pg_data_t *pgdat) | ||
386 | { | ||
387 | pg_data_t *prev = NULL, *next; | ||
388 | |||
389 | for_each_pgdat(next) | ||
390 | if (pgdat->node_id < next->node_id) | ||
391 | break; | ||
392 | else | ||
393 | prev = next; | ||
394 | |||
395 | if (prev) { | ||
396 | prev->pgdat_next = pgdat; | ||
397 | pgdat->pgdat_next = next; | ||
398 | } else { | ||
399 | pgdat->pgdat_next = pgdat_list; | ||
400 | pgdat_list = pgdat; | ||
401 | } | ||
402 | |||
403 | return; | ||
404 | } | ||
405 | |||
406 | /** | ||
407 | * memory_less_nodes - allocate and initialize CPU only nodes pernode | 382 | * memory_less_nodes - allocate and initialize CPU only nodes pernode |
408 | * information. | 383 | * information. |
409 | */ | 384 | */ |
@@ -560,7 +535,7 @@ void show_mem(void) | |||
560 | printk("Mem-info:\n"); | 535 | printk("Mem-info:\n"); |
561 | show_free_areas(); | 536 | show_free_areas(); |
562 | printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); | 537 | printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); |
563 | for_each_pgdat(pgdat) { | 538 | for_each_online_pgdat(pgdat) { |
564 | unsigned long present; | 539 | unsigned long present; |
565 | unsigned long flags; | 540 | unsigned long flags; |
566 | int shared = 0, cached = 0, reserved = 0; | 541 | int shared = 0, cached = 0, reserved = 0; |
@@ -745,11 +720,5 @@ void __init paging_init(void) | |||
745 | pfn_offset, zholes_size); | 720 | pfn_offset, zholes_size); |
746 | } | 721 | } |
747 | 722 | ||
748 | /* | ||
749 | * Make memory less nodes become a member of the known nodes. | ||
750 | */ | ||
751 | for_each_node_mask(node, memory_less_mask) | ||
752 | pgdat_insert(mem_data[node].pgdat); | ||
753 | |||
754 | zero_page_memmap_ptr = virt_to_page(ia64_imva(empty_zero_page)); | 723 | zero_page_memmap_ptr = virt_to_page(ia64_imva(empty_zero_page)); |
755 | } | 724 | } |
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index ff4f31fcd330..2ef1151cde90 100644 --- a/arch/ia64/mm/init.c +++ b/arch/ia64/mm/init.c | |||
@@ -600,7 +600,7 @@ mem_init (void) | |||
600 | kclist_add(&kcore_vmem, (void *)VMALLOC_START, VMALLOC_END-VMALLOC_START); | 600 | kclist_add(&kcore_vmem, (void *)VMALLOC_START, VMALLOC_END-VMALLOC_START); |
601 | kclist_add(&kcore_kernel, _stext, _end - _stext); | 601 | kclist_add(&kcore_kernel, _stext, _end - _stext); |
602 | 602 | ||
603 | for_each_pgdat(pgdat) | 603 | for_each_online_pgdat(pgdat) |
604 | if (pgdat->bdata->node_bootmem_map) | 604 | if (pgdat->bdata->node_bootmem_map) |
605 | totalram_pages += free_all_bootmem_node(pgdat); | 605 | totalram_pages += free_all_bootmem_node(pgdat); |
606 | 606 | ||
diff --git a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c index c686d9c12f7b..5100261310f7 100644 --- a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c +++ b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c | |||
@@ -93,19 +93,22 @@ static int coherence_id_open(struct inode *inode, struct file *file) | |||
93 | static struct proc_dir_entry | 93 | static struct proc_dir_entry |
94 | *sn_procfs_create_entry(const char *name, struct proc_dir_entry *parent, | 94 | *sn_procfs_create_entry(const char *name, struct proc_dir_entry *parent, |
95 | int (*openfunc)(struct inode *, struct file *), | 95 | int (*openfunc)(struct inode *, struct file *), |
96 | int (*releasefunc)(struct inode *, struct file *)) | 96 | int (*releasefunc)(struct inode *, struct file *), |
97 | ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *)) | ||
97 | { | 98 | { |
98 | struct proc_dir_entry *e = create_proc_entry(name, 0444, parent); | 99 | struct proc_dir_entry *e = create_proc_entry(name, 0444, parent); |
99 | 100 | ||
100 | if (e) { | 101 | if (e) { |
101 | e->proc_fops = (struct file_operations *)kmalloc( | 102 | struct file_operations *f; |
102 | sizeof(struct file_operations), GFP_KERNEL); | 103 | |
103 | if (e->proc_fops) { | 104 | f = kzalloc(sizeof(*f), GFP_KERNEL); |
104 | memset(e->proc_fops, 0, sizeof(struct file_operations)); | 105 | if (f) { |
105 | e->proc_fops->open = openfunc; | 106 | f->open = openfunc; |
106 | e->proc_fops->read = seq_read; | 107 | f->read = seq_read; |
107 | e->proc_fops->llseek = seq_lseek; | 108 | f->llseek = seq_lseek; |
108 | e->proc_fops->release = releasefunc; | 109 | f->release = releasefunc; |
110 | f->write = write; | ||
111 | e->proc_fops = f; | ||
109 | } | 112 | } |
110 | } | 113 | } |
111 | 114 | ||
@@ -119,31 +122,29 @@ extern int sn_topology_release(struct inode *, struct file *); | |||
119 | void register_sn_procfs(void) | 122 | void register_sn_procfs(void) |
120 | { | 123 | { |
121 | static struct proc_dir_entry *sgi_proc_dir = NULL; | 124 | static struct proc_dir_entry *sgi_proc_dir = NULL; |
122 | struct proc_dir_entry *e; | ||
123 | 125 | ||
124 | BUG_ON(sgi_proc_dir != NULL); | 126 | BUG_ON(sgi_proc_dir != NULL); |
125 | if (!(sgi_proc_dir = proc_mkdir("sgi_sn", NULL))) | 127 | if (!(sgi_proc_dir = proc_mkdir("sgi_sn", NULL))) |
126 | return; | 128 | return; |
127 | 129 | ||
128 | sn_procfs_create_entry("partition_id", sgi_proc_dir, | 130 | sn_procfs_create_entry("partition_id", sgi_proc_dir, |
129 | partition_id_open, single_release); | 131 | partition_id_open, single_release, NULL); |
130 | 132 | ||
131 | sn_procfs_create_entry("system_serial_number", sgi_proc_dir, | 133 | sn_procfs_create_entry("system_serial_number", sgi_proc_dir, |
132 | system_serial_number_open, single_release); | 134 | system_serial_number_open, single_release, NULL); |
133 | 135 | ||
134 | sn_procfs_create_entry("licenseID", sgi_proc_dir, | 136 | sn_procfs_create_entry("licenseID", sgi_proc_dir, |
135 | licenseID_open, single_release); | 137 | licenseID_open, single_release, NULL); |
136 | 138 | ||
137 | e = sn_procfs_create_entry("sn_force_interrupt", sgi_proc_dir, | 139 | sn_procfs_create_entry("sn_force_interrupt", sgi_proc_dir, |
138 | sn_force_interrupt_open, single_release); | 140 | sn_force_interrupt_open, single_release, |
139 | if (e) | 141 | sn_force_interrupt_write_proc); |
140 | e->proc_fops->write = sn_force_interrupt_write_proc; | ||
141 | 142 | ||
142 | sn_procfs_create_entry("coherence_id", sgi_proc_dir, | 143 | sn_procfs_create_entry("coherence_id", sgi_proc_dir, |
143 | coherence_id_open, single_release); | 144 | coherence_id_open, single_release, NULL); |
144 | 145 | ||
145 | sn_procfs_create_entry("sn_topology", sgi_proc_dir, | 146 | sn_procfs_create_entry("sn_topology", sgi_proc_dir, |
146 | sn_topology_open, sn_topology_release); | 147 | sn_topology_open, sn_topology_release, NULL); |
147 | } | 148 | } |
148 | 149 | ||
149 | #endif /* CONFIG_PROC_FS */ | 150 | #endif /* CONFIG_PROC_FS */ |