diff options
Diffstat (limited to 'arch/tile/kernel/setup.c')
-rw-r--r-- | arch/tile/kernel/setup.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/arch/tile/kernel/setup.c b/arch/tile/kernel/setup.c index c1a697e68546..6444a2bbe1a4 100644 --- a/arch/tile/kernel/setup.c +++ b/arch/tile/kernel/setup.c | |||
@@ -187,11 +187,11 @@ early_param("vmalloc", parse_vmalloc); | |||
187 | 187 | ||
188 | #ifdef CONFIG_HIGHMEM | 188 | #ifdef CONFIG_HIGHMEM |
189 | /* | 189 | /* |
190 | * Determine for each controller where its lowmem is mapped and how | 190 | * Determine for each controller where its lowmem is mapped and how much of |
191 | * much of it is mapped there. On controller zero, the first few | 191 | * it is mapped there. On controller zero, the first few megabytes are |
192 | * megabytes are mapped at 0xfd000000 as code, so in principle we | 192 | * already mapped in as code at MEM_SV_INTRPT, so in principle we could |
193 | * could start our data mappings higher up, but for now we don't | 193 | * start our data mappings higher up, but for now we don't bother, to avoid |
194 | * bother, to avoid additional confusion. | 194 | * additional confusion. |
195 | * | 195 | * |
196 | * One question is whether, on systems with more than 768 Mb and | 196 | * One question is whether, on systems with more than 768 Mb and |
197 | * controllers of different sizes, to map in a proportionate amount of | 197 | * controllers of different sizes, to map in a proportionate amount of |
@@ -876,6 +876,9 @@ void __cpuinit setup_cpu(int boot) | |||
876 | #if CHIP_HAS_SN_PROC() | 876 | #if CHIP_HAS_SN_PROC() |
877 | raw_local_irq_unmask(INT_SNITLB_MISS); | 877 | raw_local_irq_unmask(INT_SNITLB_MISS); |
878 | #endif | 878 | #endif |
879 | #ifdef __tilegx__ | ||
880 | raw_local_irq_unmask(INT_SINGLE_STEP_K); | ||
881 | #endif | ||
879 | 882 | ||
880 | /* | 883 | /* |
881 | * Allow user access to many generic SPRs, like the cycle | 884 | * Allow user access to many generic SPRs, like the cycle |
@@ -893,11 +896,12 @@ void __cpuinit setup_cpu(int boot) | |||
893 | #endif | 896 | #endif |
894 | 897 | ||
895 | /* | 898 | /* |
896 | * Set the MPL for interrupt control 0 to user level. | 899 | * Set the MPL for interrupt control 0 & 1 to the corresponding |
897 | * This includes access to the SYSTEM_SAVE and EX_CONTEXT SPRs, | 900 | * values. This includes access to the SYSTEM_SAVE and EX_CONTEXT |
898 | * as well as the PL 0 interrupt mask. | 901 | * SPRs, as well as the interrupt mask. |
899 | */ | 902 | */ |
900 | __insn_mtspr(SPR_MPL_INTCTRL_0_SET_0, 1); | 903 | __insn_mtspr(SPR_MPL_INTCTRL_0_SET_0, 1); |
904 | __insn_mtspr(SPR_MPL_INTCTRL_1_SET_1, 1); | ||
901 | 905 | ||
902 | /* Initialize IRQ support for this cpu. */ | 906 | /* Initialize IRQ support for this cpu. */ |
903 | setup_irq_regs(); | 907 | setup_irq_regs(); |
@@ -1033,7 +1037,7 @@ static void __init validate_va(void) | |||
1033 | * In addition, make sure we CAN'T use the end of memory, since | 1037 | * In addition, make sure we CAN'T use the end of memory, since |
1034 | * we use the last chunk of each pgd for the pgd_list. | 1038 | * we use the last chunk of each pgd for the pgd_list. |
1035 | */ | 1039 | */ |
1036 | int i, fc_fd_ok = 0; | 1040 | int i, user_kernel_ok = 0; |
1037 | unsigned long max_va = 0; | 1041 | unsigned long max_va = 0; |
1038 | unsigned long list_va = | 1042 | unsigned long list_va = |
1039 | ((PGD_LIST_OFFSET / sizeof(pgd_t)) << PGDIR_SHIFT); | 1043 | ((PGD_LIST_OFFSET / sizeof(pgd_t)) << PGDIR_SHIFT); |
@@ -1044,13 +1048,13 @@ static void __init validate_va(void) | |||
1044 | break; | 1048 | break; |
1045 | if (range.start <= MEM_USER_INTRPT && | 1049 | if (range.start <= MEM_USER_INTRPT && |
1046 | range.start + range.size >= MEM_HV_INTRPT) | 1050 | range.start + range.size >= MEM_HV_INTRPT) |
1047 | fc_fd_ok = 1; | 1051 | user_kernel_ok = 1; |
1048 | if (range.start == 0) | 1052 | if (range.start == 0) |
1049 | max_va = range.size; | 1053 | max_va = range.size; |
1050 | BUG_ON(range.start + range.size > list_va); | 1054 | BUG_ON(range.start + range.size > list_va); |
1051 | } | 1055 | } |
1052 | if (!fc_fd_ok) | 1056 | if (!user_kernel_ok) |
1053 | early_panic("Hypervisor not configured for VAs 0xfc/0xfd\n"); | 1057 | early_panic("Hypervisor not configured for user/kernel VAs\n"); |
1054 | if (max_va == 0) | 1058 | if (max_va == 0) |
1055 | early_panic("Hypervisor not configured for low VAs\n"); | 1059 | early_panic("Hypervisor not configured for low VAs\n"); |
1056 | if (max_va < KERNEL_HIGH_VADDR) | 1060 | if (max_va < KERNEL_HIGH_VADDR) |