Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 373273
b: refs/heads/master
c: 0a69406
h: refs/heads/master
i:
  373271: b8efd69
v: v3
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed May 2, 2013
1 parent 03c60ef commit 98164f0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d009f4d8860defaea65ea7573818b96f3c4b171e
refs/heads/master: 0a694067111e8fcd3eda430f8fa2d0277edd231f
14 changes: 13 additions & 1 deletion trunk/arch/s390/mm/mem_detect.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,28 @@ void detect_memory_layout(struct mem_chunk chunk[])
unsigned long flags, flags_dat, cr0;

memset(chunk, 0, MEMORY_CHUNKS * sizeof(struct mem_chunk));
/* Disable IRQs, DAT and low address protection so tprot does the
/*
* Disable IRQs, DAT and low address protection so tprot does the
* right thing and we don't get scheduled away with low address
* protection disabled.
*/
local_irq_save(flags);
flags_dat = __arch_local_irq_stnsm(0xfb);
/*
* In case DAT was enabled, make sure chunk doesn't reside in vmalloc
* space. We have disabled DAT and any access to vmalloc area will
* cause an exception.
* If DAT was disabled we are called from early ipl code.
*/
if (test_bit(5, &flags_dat)) {
if (WARN_ON_ONCE(is_vmalloc_or_module_addr(chunk)))
goto out;
}
__ctl_store(cr0, 0, 0);
__ctl_clear_bit(0, 28);
find_memory_chunks(chunk);
__ctl_load(cr0, 0, 0);
out:
__arch_local_irq_ssm(flags_dat);
local_irq_restore(flags);
}
Expand Down

0 comments on commit 98164f0

Please sign in to comment.