mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 13:22:23 +00:00
percpu: convert spin_lock_irq to spin_lock_irqsave.
From Michael Cree: "Bisection lead to commitb38d08f318
("percpu: restructure locking") as being the cause of lockups at initial boot on the kernel built for generic Alpha. On a suggestion by Tejun Heo that: So, the only thing I can think of is that it's calling spin_unlock_irq() while irq handling isn't set up yet. Can you please try the followings? 1. Convert all spin_[un]lock_irq() to spin_lock_irqsave/unlock_irqrestore()." Fixes:b38d08f318
("percpu: restructure locking") Reported-and-tested-by: Michael Cree <mcree@orcon.net.nz> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Dennis Zhou <dennis@kernel.org>
This commit is contained in:
parent
7566ec393f
commit
6ab7d47bcb
@ -50,6 +50,7 @@ static struct pcpu_chunk *pcpu_create_chunk(gfp_t gfp)
|
||||
const int nr_pages = pcpu_group_sizes[0] >> PAGE_SHIFT;
|
||||
struct pcpu_chunk *chunk;
|
||||
struct page *pages;
|
||||
unsigned long flags;
|
||||
int i;
|
||||
|
||||
chunk = pcpu_alloc_chunk(gfp);
|
||||
@ -68,9 +69,9 @@ static struct pcpu_chunk *pcpu_create_chunk(gfp_t gfp)
|
||||
chunk->data = pages;
|
||||
chunk->base_addr = page_address(pages) - pcpu_group_offsets[0];
|
||||
|
||||
spin_lock_irq(&pcpu_lock);
|
||||
spin_lock_irqsave(&pcpu_lock, flags);
|
||||
pcpu_chunk_populated(chunk, 0, nr_pages, false);
|
||||
spin_unlock_irq(&pcpu_lock);
|
||||
spin_unlock_irqrestore(&pcpu_lock, flags);
|
||||
|
||||
pcpu_stats_chunk_alloc();
|
||||
trace_percpu_create_chunk(chunk->base_addr);
|
||||
|
Loading…
Reference in New Issue
Block a user