diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-15 12:10:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-15 12:10:13 -0400 |
commit | 8568dae21e186fbb111bbe6583033a33fe26f83d (patch) | |
tree | 8c4d1b93865d24a96ced4221a18a852b0367b495 /arch/s390 | |
parent | 713c0515a555952d53956196d47dec3a3ece860a (diff) | |
parent | 8dd79cb1051723496bbdcea2247e49567cedb3ac (diff) |
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
[S390] show_interrupts: prevent cpu hotplug when walking cpu_online_map.
[S390] smp: __smp_call_function_map vs cpu_online_map fix.
[S390] tape: Use ccw_dev_id to build cdev_id.
[S390] dasd: fix timeout handling in interrupt handler
[S390] s390dbf: Use const char * for dbf name.
[S390] dasd: Use const in busid functions.
[S390] blacklist.c: removed duplicated include
[S390] vmlogrdr: module initialization function should return negative errors
[S390] sparsemem vmemmap: initialize memmap.
[S390] Remove last traces of cio_msg=.
[S390] cio: Remove CCW_CMD_SUSPEND_RECONN in front of CCW_CMD_SET_PGID.
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/debug.c | 20 | ||||
-rw-r--r-- | arch/s390/kernel/irq.c | 3 | ||||
-rw-r--r-- | arch/s390/kernel/smp.c | 16 | ||||
-rw-r--r-- | arch/s390/mm/vmem.c | 19 |
4 files changed, 26 insertions, 32 deletions
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index dff0568e67ec..c93d1296cc0a 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c | |||
@@ -71,7 +71,7 @@ static ssize_t debug_input(struct file *file, const char __user *user_buf, | |||
71 | size_t user_len, loff_t * offset); | 71 | size_t user_len, loff_t * offset); |
72 | static int debug_open(struct inode *inode, struct file *file); | 72 | static int debug_open(struct inode *inode, struct file *file); |
73 | static int debug_close(struct inode *inode, struct file *file); | 73 | static int debug_close(struct inode *inode, struct file *file); |
74 | static debug_info_t* debug_info_create(char *name, int pages_per_area, | 74 | static debug_info_t *debug_info_create(const char *name, int pages_per_area, |
75 | int nr_areas, int buf_size, mode_t mode); | 75 | int nr_areas, int buf_size, mode_t mode); |
76 | static void debug_info_get(debug_info_t *); | 76 | static void debug_info_get(debug_info_t *); |
77 | static void debug_info_put(debug_info_t *); | 77 | static void debug_info_put(debug_info_t *); |
@@ -234,8 +234,8 @@ fail_malloc_areas: | |||
234 | */ | 234 | */ |
235 | 235 | ||
236 | static debug_info_t* | 236 | static debug_info_t* |
237 | debug_info_alloc(char *name, int pages_per_area, int nr_areas, int buf_size, | 237 | debug_info_alloc(const char *name, int pages_per_area, int nr_areas, |
238 | int level, int mode) | 238 | int buf_size, int level, int mode) |
239 | { | 239 | { |
240 | debug_info_t* rc; | 240 | debug_info_t* rc; |
241 | 241 | ||
@@ -326,8 +326,8 @@ debug_info_free(debug_info_t* db_info){ | |||
326 | */ | 326 | */ |
327 | 327 | ||
328 | static debug_info_t* | 328 | static debug_info_t* |
329 | debug_info_create(char *name, int pages_per_area, int nr_areas, int buf_size, | 329 | debug_info_create(const char *name, int pages_per_area, int nr_areas, |
330 | mode_t mode) | 330 | int buf_size, mode_t mode) |
331 | { | 331 | { |
332 | debug_info_t* rc; | 332 | debug_info_t* rc; |
333 | 333 | ||
@@ -684,9 +684,9 @@ debug_close(struct inode *inode, struct file *file) | |||
684 | * - Returns handle for debug area | 684 | * - Returns handle for debug area |
685 | */ | 685 | */ |
686 | 686 | ||
687 | debug_info_t *debug_register_mode(char *name, int pages_per_area, int nr_areas, | 687 | debug_info_t *debug_register_mode(const char *name, int pages_per_area, |
688 | int buf_size, mode_t mode, uid_t uid, | 688 | int nr_areas, int buf_size, mode_t mode, |
689 | gid_t gid) | 689 | uid_t uid, gid_t gid) |
690 | { | 690 | { |
691 | debug_info_t *rc = NULL; | 691 | debug_info_t *rc = NULL; |
692 | 692 | ||
@@ -722,8 +722,8 @@ EXPORT_SYMBOL(debug_register_mode); | |||
722 | * - returns handle for debug area | 722 | * - returns handle for debug area |
723 | */ | 723 | */ |
724 | 724 | ||
725 | debug_info_t *debug_register(char *name, int pages_per_area, int nr_areas, | 725 | debug_info_t *debug_register(const char *name, int pages_per_area, |
726 | int buf_size) | 726 | int nr_areas, int buf_size) |
727 | { | 727 | { |
728 | return debug_register_mode(name, pages_per_area, nr_areas, buf_size, | 728 | return debug_register_mode(name, pages_per_area, nr_areas, buf_size, |
729 | S_IRUSR | S_IWUSR, 0, 0); | 729 | S_IRUSR | S_IWUSR, 0, 0); |
diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c index c59a86dca584..e7c5bfb7c755 100644 --- a/arch/s390/kernel/irq.c +++ b/arch/s390/kernel/irq.c | |||
@@ -25,6 +25,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
25 | static const char *intrclass_names[] = { "EXT", "I/O", }; | 25 | static const char *intrclass_names[] = { "EXT", "I/O", }; |
26 | int i = *(loff_t *) v, j; | 26 | int i = *(loff_t *) v, j; |
27 | 27 | ||
28 | get_online_cpus(); | ||
28 | if (i == 0) { | 29 | if (i == 0) { |
29 | seq_puts(p, " "); | 30 | seq_puts(p, " "); |
30 | for_each_online_cpu(j) | 31 | for_each_online_cpu(j) |
@@ -43,7 +44,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
43 | seq_putc(p, '\n'); | 44 | seq_putc(p, '\n'); |
44 | 45 | ||
45 | } | 46 | } |
46 | 47 | put_online_cpus(); | |
47 | return 0; | 48 | return 0; |
48 | } | 49 | } |
49 | 50 | ||
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 0aeb290060d9..1f4228948dc4 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -139,7 +139,6 @@ static void __smp_call_function_map(void (*func) (void *info), void *info, | |||
139 | if (wait) | 139 | if (wait) |
140 | data.finished = CPU_MASK_NONE; | 140 | data.finished = CPU_MASK_NONE; |
141 | 141 | ||
142 | spin_lock(&call_lock); | ||
143 | call_data = &data; | 142 | call_data = &data; |
144 | 143 | ||
145 | for_each_cpu_mask(cpu, map) | 144 | for_each_cpu_mask(cpu, map) |
@@ -151,7 +150,6 @@ static void __smp_call_function_map(void (*func) (void *info), void *info, | |||
151 | if (wait) | 150 | if (wait) |
152 | while (!cpus_equal(map, data.finished)) | 151 | while (!cpus_equal(map, data.finished)) |
153 | cpu_relax(); | 152 | cpu_relax(); |
154 | spin_unlock(&call_lock); | ||
155 | out: | 153 | out: |
156 | if (local) { | 154 | if (local) { |
157 | local_irq_disable(); | 155 | local_irq_disable(); |
@@ -177,11 +175,11 @@ int smp_call_function(void (*func) (void *info), void *info, int nonatomic, | |||
177 | { | 175 | { |
178 | cpumask_t map; | 176 | cpumask_t map; |
179 | 177 | ||
180 | preempt_disable(); | 178 | spin_lock(&call_lock); |
181 | map = cpu_online_map; | 179 | map = cpu_online_map; |
182 | cpu_clear(smp_processor_id(), map); | 180 | cpu_clear(smp_processor_id(), map); |
183 | __smp_call_function_map(func, info, nonatomic, wait, map); | 181 | __smp_call_function_map(func, info, nonatomic, wait, map); |
184 | preempt_enable(); | 182 | spin_unlock(&call_lock); |
185 | return 0; | 183 | return 0; |
186 | } | 184 | } |
187 | EXPORT_SYMBOL(smp_call_function); | 185 | EXPORT_SYMBOL(smp_call_function); |
@@ -202,10 +200,10 @@ EXPORT_SYMBOL(smp_call_function); | |||
202 | int smp_call_function_single(int cpu, void (*func) (void *info), void *info, | 200 | int smp_call_function_single(int cpu, void (*func) (void *info), void *info, |
203 | int nonatomic, int wait) | 201 | int nonatomic, int wait) |
204 | { | 202 | { |
205 | preempt_disable(); | 203 | spin_lock(&call_lock); |
206 | __smp_call_function_map(func, info, nonatomic, wait, | 204 | __smp_call_function_map(func, info, nonatomic, wait, |
207 | cpumask_of_cpu(cpu)); | 205 | cpumask_of_cpu(cpu)); |
208 | preempt_enable(); | 206 | spin_unlock(&call_lock); |
209 | return 0; | 207 | return 0; |
210 | } | 208 | } |
211 | EXPORT_SYMBOL(smp_call_function_single); | 209 | EXPORT_SYMBOL(smp_call_function_single); |
@@ -228,10 +226,10 @@ EXPORT_SYMBOL(smp_call_function_single); | |||
228 | int smp_call_function_mask(cpumask_t mask, void (*func)(void *), void *info, | 226 | int smp_call_function_mask(cpumask_t mask, void (*func)(void *), void *info, |
229 | int wait) | 227 | int wait) |
230 | { | 228 | { |
231 | preempt_disable(); | 229 | spin_lock(&call_lock); |
232 | cpu_clear(smp_processor_id(), mask); | 230 | cpu_clear(smp_processor_id(), mask); |
233 | __smp_call_function_map(func, info, 0, wait, mask); | 231 | __smp_call_function_map(func, info, 0, wait, mask); |
234 | preempt_enable(); | 232 | spin_unlock(&call_lock); |
235 | return 0; | 233 | return 0; |
236 | } | 234 | } |
237 | EXPORT_SYMBOL(smp_call_function_mask); | 235 | EXPORT_SYMBOL(smp_call_function_mask); |
@@ -592,7 +590,9 @@ int __cpuinit start_secondary(void *cpuvoid) | |||
592 | pfault_init(); | 590 | pfault_init(); |
593 | 591 | ||
594 | /* Mark this cpu as online */ | 592 | /* Mark this cpu as online */ |
593 | spin_lock(&call_lock); | ||
595 | cpu_set(smp_processor_id(), cpu_online_map); | 594 | cpu_set(smp_processor_id(), cpu_online_map); |
595 | spin_unlock(&call_lock); | ||
596 | /* Switch on interrupts */ | 596 | /* Switch on interrupts */ |
597 | local_irq_enable(); | 597 | local_irq_enable(); |
598 | /* Print info about this processor */ | 598 | /* Print info about this processor */ |
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c index beccacf907f3..ea2804808f39 100644 --- a/arch/s390/mm/vmem.c +++ b/arch/s390/mm/vmem.c | |||
@@ -27,19 +27,12 @@ struct memory_segment { | |||
27 | 27 | ||
28 | static LIST_HEAD(mem_segs); | 28 | static LIST_HEAD(mem_segs); |
29 | 29 | ||
30 | static void __ref *vmem_alloc_pages(unsigned int order) | 30 | static pud_t *vmem_pud_alloc(void) |
31 | { | ||
32 | if (slab_is_available()) | ||
33 | return (void *)__get_free_pages(GFP_KERNEL, order); | ||
34 | return alloc_bootmem_pages((1 << order) * PAGE_SIZE); | ||
35 | } | ||
36 | |||
37 | static inline pud_t *vmem_pud_alloc(void) | ||
38 | { | 31 | { |
39 | pud_t *pud = NULL; | 32 | pud_t *pud = NULL; |
40 | 33 | ||
41 | #ifdef CONFIG_64BIT | 34 | #ifdef CONFIG_64BIT |
42 | pud = vmem_alloc_pages(2); | 35 | pud = vmemmap_alloc_block(PAGE_SIZE * 4, 0); |
43 | if (!pud) | 36 | if (!pud) |
44 | return NULL; | 37 | return NULL; |
45 | clear_table((unsigned long *) pud, _REGION3_ENTRY_EMPTY, PAGE_SIZE * 4); | 38 | clear_table((unsigned long *) pud, _REGION3_ENTRY_EMPTY, PAGE_SIZE * 4); |
@@ -47,12 +40,12 @@ static inline pud_t *vmem_pud_alloc(void) | |||
47 | return pud; | 40 | return pud; |
48 | } | 41 | } |
49 | 42 | ||
50 | static inline pmd_t *vmem_pmd_alloc(void) | 43 | static pmd_t *vmem_pmd_alloc(void) |
51 | { | 44 | { |
52 | pmd_t *pmd = NULL; | 45 | pmd_t *pmd = NULL; |
53 | 46 | ||
54 | #ifdef CONFIG_64BIT | 47 | #ifdef CONFIG_64BIT |
55 | pmd = vmem_alloc_pages(2); | 48 | pmd = vmemmap_alloc_block(PAGE_SIZE * 4, 0); |
56 | if (!pmd) | 49 | if (!pmd) |
57 | return NULL; | 50 | return NULL; |
58 | clear_table((unsigned long *) pmd, _SEGMENT_ENTRY_EMPTY, PAGE_SIZE * 4); | 51 | clear_table((unsigned long *) pmd, _SEGMENT_ENTRY_EMPTY, PAGE_SIZE * 4); |
@@ -60,7 +53,7 @@ static inline pmd_t *vmem_pmd_alloc(void) | |||
60 | return pmd; | 53 | return pmd; |
61 | } | 54 | } |
62 | 55 | ||
63 | static pte_t __init_refok *vmem_pte_alloc(void) | 56 | static pte_t __ref *vmem_pte_alloc(void) |
64 | { | 57 | { |
65 | pte_t *pte; | 58 | pte_t *pte; |
66 | 59 | ||
@@ -214,7 +207,7 @@ int __meminit vmemmap_populate(struct page *start, unsigned long nr, int node) | |||
214 | if (pte_none(*pt_dir)) { | 207 | if (pte_none(*pt_dir)) { |
215 | unsigned long new_page; | 208 | unsigned long new_page; |
216 | 209 | ||
217 | new_page =__pa(vmem_alloc_pages(0)); | 210 | new_page =__pa(vmemmap_alloc_block(PAGE_SIZE, 0)); |
218 | if (!new_page) | 211 | if (!new_page) |
219 | goto out; | 212 | goto out; |
220 | pte = pfn_pte(new_page >> PAGE_SHIFT, PAGE_KERNEL); | 213 | pte = pfn_pte(new_page >> PAGE_SHIFT, PAGE_KERNEL); |