aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/traps.c
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/parisc/kernel/traps.c
parent[PARISC] Fix bug when syscall nr is __NR_Linux_syscalls (diff)
downloadlinux-dev-c3d4ed4e3e5aa8d9e6b4b795f004a7028ce780e9.tar.xz
linux-dev-c3d4ed4e3e5aa8d9e6b4b795f004a7028ce780e9.zip
[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 '')
-rw-r--r--arch/parisc/kernel/traps.c7
1 files changed, 4 insertions, 3 deletions
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)
int __init check_ivt(void *iva)
{
+ extern const u32 os_hpmc[];
+ extern const u32 os_hpmc_end[];
+
int i;
u32 check = 0;
u32 *ivap;
u32 *hpmcp;
u32 length;
- extern void os_hpmc(void);
- extern void os_hpmc_end(void);
if (strcmp((char *)iva, "cows can fly"))
return -1;
@@ -820,7 +821,7 @@ int __init check_ivt(void *iva)
/* Compute Checksum for HPMC handler */
- length = (u32)((unsigned long)os_hpmc_end - (unsigned long)os_hpmc);
+ length = os_hpmc_end - os_hpmc;
ivap[7] = length;
hpmcp = (u32 *)os_hpmc;