• Benjamin Herrenschmidt's avatar
    [POWERPC] Fix device-tree locking vs. interrupts · f4ac7b5e
    Benjamin Herrenschmidt authored
    Lockdep found out that we can occasionally take the device-tree
    lock for reading from softirq time (from rtas_token called
    by the rtas real time clock code called by the NTP code),
    while we take it occasionally for writing without masking
    interrupts. The combination of those two can thus deadlock.
    
    While some of those cases of interrupt read lock could be fixed
    (such as caching the RTAS tokens) I figured that taking the
    lock for writing is so rare (device-tree modification) that we
    may as well penalize that case and allow reading from interrupts.
    
    Thus, this turns all the writers to take the lock with irqs
    masked to avoid the situation.
    Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    f4ac7b5e
prom.c 40 KB