Re: HPMC bus timeout on C3600

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 02, 2009 at 07:09:57PM -0500, John David Anglin wrote:
> > I think we've been over this before ;-)
> 
> One safe way to compute this difference is using a difference
> of local labels in .data.
> 

Something like this? Sorry, I've almost completely forgotten gas syntax
and all that jazz...

I seem to recall writing a patch to dump the first 16 insns of os_hpmc
from the check_ivt call, and found that it was working sensibly on
64-bit.

regards, Kyle

diff --git a/arch/parisc/kernel/hpmc.S b/arch/parisc/kernel/hpmc.S
index 2cbf13b..02e41da 100644
--- a/arch/parisc/kernel/hpmc.S
+++ b/arch/parisc/kernel/hpmc.S
@@ -295,5 +295,9 @@ os_hpmc_6:
 	b .
 	nop
 ENDPROC(os_hpmc)
-ENTRY(os_hpmc_end)	/* this label used to compute os_hpmc checksum */
+ENTRY(os_hpmc_end)
 	nop
+.data
+	.export os_hpmc_size
+os_hpmc_size:
+	.word os_hpmc_end-os_hpmc
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
index 4c771cd..5cb66ac 100644
--- a/arch/parisc/kernel/traps.c
+++ b/arch/parisc/kernel/traps.c
@@ -821,8 +821,8 @@ 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[];
+	extern u32 os_hpmc_size;
+	extern u32 os_hpmc[];
 
 	int i;
 	u32 check = 0;
@@ -839,8 +839,7 @@ int __init check_ivt(void *iva)
 	    *ivap++ = 0;
 
 	/* Compute Checksum for HPMC handler */
-
-	length = os_hpmc_end - os_hpmc;
+	length = os_hpmc_size * sizeof(u32);
 	ivap[7] = length;
 
 	hpmcp = (u32 *)os_hpmc;
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux