aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/traps.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/parisc/kernel/traps.c')
-rw-r--r--arch/parisc/kernel/traps.c35
1 files changed, 15 insertions, 20 deletions
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
index b99b39f1da02..553b09855cfd 100644
--- a/arch/parisc/kernel/traps.c
+++ b/arch/parisc/kernel/traps.c
@@ -807,7 +807,7 @@ void notrace handle_interruption(int code, struct pt_regs *regs)
807} 807}
808 808
809 809
810int __init check_ivt(void *iva) 810void __init initialize_ivt(const void *iva)
811{ 811{
812 extern u32 os_hpmc_size; 812 extern u32 os_hpmc_size;
813 extern const u32 os_hpmc[]; 813 extern const u32 os_hpmc[];
@@ -818,8 +818,8 @@ int __init check_ivt(void *iva)
818 u32 *hpmcp; 818 u32 *hpmcp;
819 u32 length; 819 u32 length;
820 820
821 if (strcmp((char *)iva, "cows can fly")) 821 if (strcmp((const char *)iva, "cows can fly"))
822 return -1; 822 panic("IVT invalid");
823 823
824 ivap = (u32 *)iva; 824 ivap = (u32 *)iva;
825 825
@@ -839,28 +839,23 @@ int __init check_ivt(void *iva)
839 check += ivap[i]; 839 check += ivap[i];
840 840
841 ivap[5] = -check; 841 ivap[5] = -check;
842
843 return 0;
844} 842}
845 843
846#ifndef CONFIG_64BIT
847extern const void fault_vector_11;
848#endif
849extern const void fault_vector_20;
850 844
851void __init trap_init(void) 845/* early_trap_init() is called before we set up kernel mappings and
846 * write-protect the kernel */
847void __init early_trap_init(void)
852{ 848{
853 void *iva; 849 extern const void fault_vector_20;
854 850
855 if (boot_cpu_data.cpu_type >= pcxu) 851#ifndef CONFIG_64BIT
856 iva = (void *) &fault_vector_20; 852 extern const void fault_vector_11;
857 else 853 initialize_ivt(&fault_vector_11);
858#ifdef CONFIG_64BIT
859 panic("Can't boot 64-bit OS on PA1.1 processor!");
860#else
861 iva = (void *) &fault_vector_11;
862#endif 854#endif
863 855
864 if (check_ivt(iva)) 856 initialize_ivt(&fault_vector_20);
865 panic("IVT invalid"); 857}
858
859void __init trap_init(void)
860{
866} 861}