Skip to content

Commit 5b98f09

Browse files
Liu Xianggregkh
authored andcommitted
MIPS: irq: Allocate accurate order pages for irq stack
commit 72faa7a upstream. The irq_pages is the number of pages for irq stack, but not the order which is needed by __get_free_pages(). We can use get_order() to calculate the accurate order. Signed-off-by: Liu Xiang <liu.xiang6@zte.com.cn> Signed-off-by: Paul Burton <paul.burton@mips.com> Fixes: fe8bd18 ("MIPS: Introduce irq_stack") Cc: linux-mips@vger.kernel.org Cc: stable@vger.kernel.org # v4.11+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 0adb8a1 commit 5b98f09

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/mips/kernel/irq.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ asmlinkage void spurious_interrupt(void)
5252
void __init init_IRQ(void)
5353
{
5454
int i;
55+
unsigned int order = get_order(IRQ_STACK_SIZE);
5556

5657
for (i = 0; i < NR_IRQS; i++)
5758
irq_set_noprobe(i);
5859

5960
arch_init_irq();
6061

6162
for_each_possible_cpu(i) {
62-
int irq_pages = IRQ_STACK_SIZE / PAGE_SIZE;
63-
void *s = (void *)__get_free_pages(GFP_KERNEL, irq_pages);
63+
void *s = (void *)__get_free_pages(GFP_KERNEL, order);
6464

6565
irq_stack[i] = s;
6666
pr_debug("CPU%d IRQ stack at 0x%p - 0x%p\n", i,

0 commit comments

Comments
 (0)