aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorKyle McMartin <kyle@parisc-linux.org>2007-06-04 02:26:52 -0400
committerKyle McMartin <kyle@minerva.i.cabal.ca>2007-06-04 02:26:52 -0400
commitc3d4ed4e3e5aa8d9e6b4b795f004a7028ce780e9 (patch)
tree1def009131bd6abec52a9a99a7c12ee22dc9b81f /arch
parent3bb457af4fa86dceef57d7c3e959aff162457fdc (diff)
[PARISC] Fix kernel panic in check_ivt
check_ivt had some seriously broken code wrt function pointers on parisc64. Instead of referencing the hpmc code via a function pointer, export symbols and reference it as a const array. Thanks to jda for pointing out the broken 64-bit func ptr handling. Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/parisc/kernel/hpmc.S5
-rw-r--r--arch/parisc/kernel/traps.c7
2 files changed, 5 insertions, 7 deletions
diff --git a/arch/parisc/kernel/hpmc.S b/arch/parisc/kernel/hpmc.S
index d8baa158d8a0..43b41df0b541 100644
--- a/arch/parisc/kernel/hpmc.S
+++ b/arch/parisc/kernel/hpmc.S
@@ -295,8 +295,5 @@ os_hpmc_6:
295 b . 295 b .
296 nop 296 nop
297ENDPROC(os_hpmc) 297ENDPROC(os_hpmc)
298 298ENTRY(os_hpmc_end) /* this label used to compute os_hpmc checksum */
299 /* this label used to compute os_hpmc checksum */
300ENTRY(os_hpmc_end)
301
302 nop 299 nop
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
index 0ba1d3dbca2a..c3ec9f1ec0f3 100644
--- a/arch/parisc/kernel/traps.c
+++ b/arch/parisc/kernel/traps.c
@@ -802,13 +802,14 @@ void handle_interruption(int code, struct pt_regs *regs)
802 802
803int __init check_ivt(void *iva) 803int __init check_ivt(void *iva)
804{ 804{
805 extern const u32 os_hpmc[];
806 extern const u32 os_hpmc_end[];
807
805 int i; 808 int i;
806 u32 check = 0; 809 u32 check = 0;
807 u32 *ivap; 810 u32 *ivap;
808 u32 *hpmcp; 811 u32 *hpmcp;
809 u32 length; 812 u32 length;
810 extern void os_hpmc(void);
811 extern void os_hpmc_end(void);
812 813
813 if (strcmp((char *)iva, "cows can fly")) 814 if (strcmp((char *)iva, "cows can fly"))
814 return -1; 815 return -1;
@@ -820,7 +821,7 @@ int __init check_ivt(void *iva)
820 821
821 /* Compute Checksum for HPMC handler */ 822 /* Compute Checksum for HPMC handler */
822 823
823 length = (u32)((unsigned long)os_hpmc_end - (unsigned long)os_hpmc); 824 length = os_hpmc_end - os_hpmc;
824 ivap[7] = length; 825 ivap[7] = length;
825 826
826 hpmcp = (u32 *)os_hpmc; 827 hpmcp = (u32 *)os_hpmc;