diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-26 19:04:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-26 19:04:22 -0400 |
commit | 21cdbc1378e8aa96e1ed4a606dce1a8e7daf7fdf (patch) | |
tree | 55b6c294b912ccdc3eede15960b0ece53a69d902 /arch/s390/mm | |
parent | 86d9c070175de65890794fa227b68297da6206d8 (diff) | |
parent | ef3500b2b2955af4fa6b0564b51c0c604e38c571 (diff) |
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: (81 commits)
[S390] remove duplicated #includes
[S390] cpumask: use mm_cpumask() wrapper
[S390] cpumask: Use accessors code.
[S390] cpumask: prepare for iterators to only go to nr_cpu_ids/nr_cpumask_bits.
[S390] cpumask: remove cpu_coregroup_map
[S390] fix clock comparator save area usage
[S390] Add hwcap flag for the etf3 enhancement facility
[S390] Ensure that ipl panic notifier is called late.
[S390] fix dfp elf hwcap/facility bit detection
[S390] smp: perform initial cpu reset before starting a cpu
[S390] smp: fix memory leak on __cpu_up
[S390] ipl: Improve checking logic and remove switch defaults.
[S390] s390dbf: Remove needless check for NULL pointer.
[S390] s390dbf: Remove redundant initilizations.
[S390] use kzfree()
[S390] BUG to BUG_ON changes
[S390] zfcpdump: Prevent zcore from beeing built as a kernel module.
[S390] Use csum_partial in checksum.h
[S390] cleanup lowcore.h
[S390] eliminate ipl_device from lowcore
...
Diffstat (limited to 'arch/s390/mm')
-rw-r--r-- | arch/s390/mm/fault.c | 28 | ||||
-rw-r--r-- | arch/s390/mm/init.c | 2 | ||||
-rw-r--r-- | arch/s390/mm/pgtable.c | 6 |
3 files changed, 9 insertions, 27 deletions
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 4d537205e83c..833e8366c351 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
@@ -200,29 +200,6 @@ static void do_low_address(struct pt_regs *regs, unsigned long error_code) | |||
200 | do_no_context(regs, error_code, 0); | 200 | do_no_context(regs, error_code, 0); |
201 | } | 201 | } |
202 | 202 | ||
203 | /* | ||
204 | * We ran out of memory, or some other thing happened to us that made | ||
205 | * us unable to handle the page fault gracefully. | ||
206 | */ | ||
207 | static int do_out_of_memory(struct pt_regs *regs, unsigned long error_code, | ||
208 | unsigned long address) | ||
209 | { | ||
210 | struct task_struct *tsk = current; | ||
211 | struct mm_struct *mm = tsk->mm; | ||
212 | |||
213 | up_read(&mm->mmap_sem); | ||
214 | if (is_global_init(tsk)) { | ||
215 | yield(); | ||
216 | down_read(&mm->mmap_sem); | ||
217 | return 1; | ||
218 | } | ||
219 | printk("VM: killing process %s\n", tsk->comm); | ||
220 | if (regs->psw.mask & PSW_MASK_PSTATE) | ||
221 | do_group_exit(SIGKILL); | ||
222 | do_no_context(regs, error_code, address); | ||
223 | return 0; | ||
224 | } | ||
225 | |||
226 | static void do_sigbus(struct pt_regs *regs, unsigned long error_code, | 203 | static void do_sigbus(struct pt_regs *regs, unsigned long error_code, |
227 | unsigned long address) | 204 | unsigned long address) |
228 | { | 205 | { |
@@ -367,7 +344,6 @@ good_area: | |||
367 | goto bad_area; | 344 | goto bad_area; |
368 | } | 345 | } |
369 | 346 | ||
370 | survive: | ||
371 | if (is_vm_hugetlb_page(vma)) | 347 | if (is_vm_hugetlb_page(vma)) |
372 | address &= HPAGE_MASK; | 348 | address &= HPAGE_MASK; |
373 | /* | 349 | /* |
@@ -378,8 +354,8 @@ survive: | |||
378 | fault = handle_mm_fault(mm, vma, address, write); | 354 | fault = handle_mm_fault(mm, vma, address, write); |
379 | if (unlikely(fault & VM_FAULT_ERROR)) { | 355 | if (unlikely(fault & VM_FAULT_ERROR)) { |
380 | if (fault & VM_FAULT_OOM) { | 356 | if (fault & VM_FAULT_OOM) { |
381 | if (do_out_of_memory(regs, error_code, address)) | 357 | up_read(&mm->mmap_sem); |
382 | goto survive; | 358 | pagefault_out_of_memory(); |
383 | return; | 359 | return; |
384 | } else if (fault & VM_FAULT_SIGBUS) { | 360 | } else if (fault & VM_FAULT_SIGBUS) { |
385 | do_sigbus(regs, error_code, address); | 361 | do_sigbus(regs, error_code, address); |
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index f0258ca3b17e..c634dfbe92e9 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
@@ -40,7 +40,9 @@ | |||
40 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | 40 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); |
41 | 41 | ||
42 | pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((__aligned__(PAGE_SIZE))); | 42 | pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((__aligned__(PAGE_SIZE))); |
43 | |||
43 | char empty_zero_page[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE))); | 44 | char empty_zero_page[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE))); |
45 | EXPORT_SYMBOL(empty_zero_page); | ||
44 | 46 | ||
45 | /* | 47 | /* |
46 | * paging_init() sets up the page tables | 48 | * paging_init() sets up the page tables |
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index 6b6ddc4ea02b..be6c1cf4ad5a 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c | |||
@@ -258,6 +258,10 @@ int s390_enable_sie(void) | |||
258 | struct task_struct *tsk = current; | 258 | struct task_struct *tsk = current; |
259 | struct mm_struct *mm, *old_mm; | 259 | struct mm_struct *mm, *old_mm; |
260 | 260 | ||
261 | /* Do we have switched amode? If no, we cannot do sie */ | ||
262 | if (!switch_amode) | ||
263 | return -EINVAL; | ||
264 | |||
261 | /* Do we have pgstes? if yes, we are done */ | 265 | /* Do we have pgstes? if yes, we are done */ |
262 | if (tsk->mm->context.has_pgste) | 266 | if (tsk->mm->context.has_pgste) |
263 | return 0; | 267 | return 0; |
@@ -292,7 +296,7 @@ int s390_enable_sie(void) | |||
292 | tsk->mm = tsk->active_mm = mm; | 296 | tsk->mm = tsk->active_mm = mm; |
293 | preempt_disable(); | 297 | preempt_disable(); |
294 | update_mm(mm, tsk); | 298 | update_mm(mm, tsk); |
295 | cpu_set(smp_processor_id(), mm->cpu_vm_mask); | 299 | cpumask_set_cpu(smp_processor_id(), mm_cpumask(mm)); |
296 | preempt_enable(); | 300 | preempt_enable(); |
297 | task_unlock(tsk); | 301 | task_unlock(tsk); |
298 | mmput(old_mm); | 302 | mmput(old_mm); |