Linux PARISC architecture development
 help / color / mirror / Atom feed
* [PATCH] export length of os_hpmc vector
@ 2009-01-03  1:35 Kyle McMartin
  2009-01-03  9:24 ` Helge Deller
  0 siblings, 1 reply; 4+ messages in thread
From: Kyle McMartin @ 2009-01-03  1:35 UTC (permalink / raw)
  To: linux-parisc; +Cc: John David Anglin, gmsoft

diff --git a/arch/parisc/kernel/hpmc.S b/arch/parisc/kernel/hpmc.S
index 2cbf13b..5595a2f 100644
--- a/arch/parisc/kernel/hpmc.S
+++ b/arch/parisc/kernel/hpmc.S
@@ -80,6 +80,7 @@ END(hpmc_pim_data)
 
 	.import intr_save, code
 ENTRY(os_hpmc)
+.os_hpmc:
 
 	/*
 	 * registers modified:
@@ -295,5 +296,10 @@ os_hpmc_6:
 	b .
 	nop
 ENDPROC(os_hpmc)
-ENTRY(os_hpmc_end)	/* this label used to compute os_hpmc checksum */
+.os_hpmc_end:
 	nop
+.data
+.align 4
+	.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..cbf4794 100644
--- a/arch/parisc/kernel/traps.c
+++ b/arch/parisc/kernel/traps.c
@@ -821,8 +852,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 const u32 os_hpmc[];
 
 	int i;
 	u32 check = 0;
@@ -839,8 +870,7 @@ int __init check_ivt(void *iva)
 	    *ivap++ = 0;
 
 	/* Compute Checksum for HPMC handler */

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] export length of os_hpmc vector
  2009-01-03  1:35 [PATCH] export length of os_hpmc vector Kyle McMartin
@ 2009-01-03  9:24 ` Helge Deller
  2009-01-03 15:56   ` Kyle McMartin
  0 siblings, 1 reply; 4+ messages in thread
From: Helge Deller @ 2009-01-03  9:24 UTC (permalink / raw)
  To: Kyle McMartin; +Cc: linux-parisc, John David Anglin, gmsoft

Kyle McMartin wrote:
> diff --git a/arch/parisc/kernel/hpmc.S b/arch/parisc/kernel/hpmc.S
> index 2cbf13b..5595a2f 100644
> --- a/arch/parisc/kernel/hpmc.S
> +++ b/arch/parisc/kernel/hpmc.S
> @@ -80,6 +80,7 @@ END(hpmc_pim_data)
>  
>  	.import intr_save, code
>  ENTRY(os_hpmc)
> +.os_hpmc:

ENTRY(os_hpmc) already expands to
os_hpmc:

so you could

> +	.word .os_hpmc_end-.os_hpmc

change this to 
	.word .os_hpmc_end-os_hpmc
and drop the local label ".os_hpmc"

Helge

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] export length of os_hpmc vector
  2009-01-03  9:24 ` Helge Deller
@ 2009-01-03 15:56   ` Kyle McMartin
  2009-01-03 16:31     ` John David Anglin
  0 siblings, 1 reply; 4+ messages in thread
From: Kyle McMartin @ 2009-01-03 15:56 UTC (permalink / raw)
  To: Helge Deller; +Cc: Kyle McMartin, linux-parisc, John David Anglin, gmsoft

On Sat, Jan 03, 2009 at 10:24:33AM +0100, Helge Deller wrote:
> Kyle McMartin wrote:
> > diff --git a/arch/parisc/kernel/hpmc.S b/arch/parisc/kernel/hpmc.S
> > index 2cbf13b..5595a2f 100644
> > --- a/arch/parisc/kernel/hpmc.S
> > +++ b/arch/parisc/kernel/hpmc.S
> > @@ -80,6 +80,7 @@ END(hpmc_pim_data)
> >  
> >  	.import intr_save, code
> >  ENTRY(os_hpmc)
> > +.os_hpmc:
> 
> ENTRY(os_hpmc) already expands to
> os_hpmc:
> 
> so you could
> 
> > +	.word .os_hpmc_end-.os_hpmc
> 
> change this to 
> 	.word .os_hpmc_end-os_hpmc
> and drop the local label ".os_hpmc"
> 

In his previous mail JDA said to use local labels for safety...

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] export length of os_hpmc vector
  2009-01-03 15:56   ` Kyle McMartin
@ 2009-01-03 16:31     ` John David Anglin
  0 siblings, 0 replies; 4+ messages in thread
From: John David Anglin @ 2009-01-03 16:31 UTC (permalink / raw)
  To: Kyle McMartin; +Cc: deller, kyle, linux-parisc, gmsoft

> > change this to 
> > 	.word .os_hpmc_end-os_hpmc
> > and drop the local label ".os_hpmc"
> > 
> 
> In his previous mail JDA said to use local labels for safety...

The important thing is to ensure that the diff is an absolute value,
and that there's no relocation for the diff.

Diffs are tricky.  There may be a stub associated with os_hpmc.  I know
gdb sometimes gets confused between the stub and real entry point of
a function, and GCC always uses local labels in the exception and debug
tables.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-01-03 16:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-03  1:35 [PATCH] export length of os_hpmc vector Kyle McMartin
2009-01-03  9:24 ` Helge Deller
2009-01-03 15:56   ` Kyle McMartin
2009-01-03 16:31     ` John David Anglin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox