diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2013-04-27 12:42:18 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-05-02 15:50:22 +0200 |
commit | d009f4d8860defaea65ea7573818b96f3c4b171e (patch) | |
tree | b4ddaf9bc9ac7a88a5b051a8b5e8e536391e506a /arch/s390/mm/mem_detect.c | |
parent | 066b9fd660befd59dff77e24963338bfeabb8c3b (diff) | |
download | op-kernel-dev-d009f4d8860defaea65ea7573818b96f3c4b171e.zip op-kernel-dev-d009f4d8860defaea65ea7573818b96f3c4b171e.tar.gz |
s390/mem_detect: fix lockdep irq tracing
When disabling and enabling interrupts we must tell lockdep.
So use local_irq_save()/restore() to disable and enable interrupts.
The DAT disabling/enabling get handled separately now.
Note: we may not call trace_hardirqs_on() with DAT disabled, since
the generic code may access vmalloc'ed data structures.
Reported-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/mm/mem_detect.c')
-rw-r--r-- | arch/s390/mm/mem_detect.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/s390/mm/mem_detect.c b/arch/s390/mm/mem_detect.c index 22d502e..fb216e1 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[]) void detect_memory_layout(struct mem_chunk chunk[]) { - unsigned long flags, cr0; + 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 * right thing and we don't get scheduled away with low address * protection disabled. */ - flags = __arch_local_irq_stnsm(0xf8); + local_irq_save(flags); + flags_dat = __arch_local_irq_stnsm(0xfb); __ctl_store(cr0, 0, 0); __ctl_clear_bit(0, 28); find_memory_chunks(chunk); __ctl_load(cr0, 0, 0); - arch_local_irq_restore(flags); + __arch_local_irq_ssm(flags_dat); + local_irq_restore(flags); } EXPORT_SYMBOL(detect_memory_layout); |