diff options
| -rw-r--r-- | arch/powerpc/kernel/setup_64.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index cea66987a6ea..f3fb5a79de52 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
| @@ -424,9 +424,18 @@ void __init setup_system(void) | |||
| 424 | DBG(" <- setup_system()\n"); | 424 | DBG(" <- setup_system()\n"); |
| 425 | } | 425 | } |
| 426 | 426 | ||
| 427 | static u64 slb0_limit(void) | ||
| 428 | { | ||
| 429 | if (cpu_has_feature(CPU_FTR_1T_SEGMENT)) { | ||
| 430 | return 1UL << SID_SHIFT_1T; | ||
| 431 | } | ||
| 432 | return 1UL << SID_SHIFT; | ||
| 433 | } | ||
| 434 | |||
| 427 | #ifdef CONFIG_IRQSTACKS | 435 | #ifdef CONFIG_IRQSTACKS |
| 428 | static void __init irqstack_early_init(void) | 436 | static void __init irqstack_early_init(void) |
| 429 | { | 437 | { |
| 438 | u64 limit = slb0_limit(); | ||
| 430 | unsigned int i; | 439 | unsigned int i; |
| 431 | 440 | ||
| 432 | /* | 441 | /* |
| @@ -436,10 +445,10 @@ static void __init irqstack_early_init(void) | |||
| 436 | for_each_possible_cpu(i) { | 445 | for_each_possible_cpu(i) { |
| 437 | softirq_ctx[i] = (struct thread_info *) | 446 | softirq_ctx[i] = (struct thread_info *) |
| 438 | __va(lmb_alloc_base(THREAD_SIZE, | 447 | __va(lmb_alloc_base(THREAD_SIZE, |
| 439 | THREAD_SIZE, 0x10000000)); | 448 | THREAD_SIZE, limit)); |
| 440 | hardirq_ctx[i] = (struct thread_info *) | 449 | hardirq_ctx[i] = (struct thread_info *) |
| 441 | __va(lmb_alloc_base(THREAD_SIZE, | 450 | __va(lmb_alloc_base(THREAD_SIZE, |
| 442 | THREAD_SIZE, 0x10000000)); | 451 | THREAD_SIZE, limit)); |
| 443 | } | 452 | } |
| 444 | } | 453 | } |
| 445 | #else | 454 | #else |
| @@ -470,7 +479,7 @@ static void __init exc_lvl_early_init(void) | |||
| 470 | */ | 479 | */ |
| 471 | static void __init emergency_stack_init(void) | 480 | static void __init emergency_stack_init(void) |
| 472 | { | 481 | { |
| 473 | unsigned long limit; | 482 | u64 limit; |
| 474 | unsigned int i; | 483 | unsigned int i; |
| 475 | 484 | ||
| 476 | /* | 485 | /* |
| @@ -482,7 +491,7 @@ static void __init emergency_stack_init(void) | |||
| 482 | * bringup, we need to get at them in real mode. This means they | 491 | * bringup, we need to get at them in real mode. This means they |
| 483 | * must also be within the RMO region. | 492 | * must also be within the RMO region. |
| 484 | */ | 493 | */ |
| 485 | limit = min(0x10000000ULL, lmb.rmo_size); | 494 | limit = min(slb0_limit(), lmb.rmo_size); |
| 486 | 495 | ||
| 487 | for_each_possible_cpu(i) { | 496 | for_each_possible_cpu(i) { |
| 488 | unsigned long sp; | 497 | unsigned long sp; |
