aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/s390/mm/mem_detect.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/s390/mm/mem_detect.c b/arch/s390/mm/mem_detect.c
index 22d502e885ed..fb216e11c25d 100644
--- a/arch/s390/mm/mem_detect.c
+++ b/arch/s390/mm/mem_detect.c
@@ -47,19 +47,21 @@ static void find_memory_chunks(struct mem_chunk chunk[])
47 47
48void detect_memory_layout(struct mem_chunk chunk[]) 48void detect_memory_layout(struct mem_chunk chunk[])
49{ 49{
50 unsigned long flags, cr0; 50 unsigned long flags, flags_dat, cr0;
51 51
52 memset(chunk, 0, MEMORY_CHUNKS * sizeof(struct mem_chunk)); 52 memset(chunk, 0, MEMORY_CHUNKS * sizeof(struct mem_chunk));
53 /* Disable IRQs, DAT and low address protection so tprot does the 53 /* Disable IRQs, DAT and low address protection so tprot does the
54 * right thing and we don't get scheduled away with low address 54 * right thing and we don't get scheduled away with low address
55 * protection disabled. 55 * protection disabled.
56 */ 56 */
57 flags = __arch_local_irq_stnsm(0xf8); 57 local_irq_save(flags);
58 flags_dat = __arch_local_irq_stnsm(0xfb);
58 __ctl_store(cr0, 0, 0); 59 __ctl_store(cr0, 0, 0);
59 __ctl_clear_bit(0, 28); 60 __ctl_clear_bit(0, 28);
60 find_memory_chunks(chunk); 61 find_memory_chunks(chunk);
61 __ctl_load(cr0, 0, 0); 62 __ctl_load(cr0, 0, 0);
62 arch_local_irq_restore(flags); 63 __arch_local_irq_ssm(flags_dat);
64 local_irq_restore(flags);
63} 65}
64EXPORT_SYMBOL(detect_memory_layout); 66EXPORT_SYMBOL(detect_memory_layout);
65 67