public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sh kexec build error
@ 2008-07-28 13:06 Adrian Bunk
  2008-07-28 13:14 ` Paul Mundt
  0 siblings, 1 reply; 4+ messages in thread
From: Adrian Bunk @ 2008-07-28 13:06 UTC (permalink / raw)
  To: Huang Ying, Vivek Goyal, Andrew Morton, ebiederm, lethal
  Cc: linux-sh, linux-kernel

Commit 3ab83521378268044a448113c6aa9a9e245f4d2f (kexec jump)
causes the following build error on sh:

<--  snip  -->

...
  CC      kernel/kexec.o
{standard input}: Assembler messages:
{standard input}:1518: Error: offset to unaligned destination
make[2]: *** [kernel/kexec.o] Error 1

<--  snip  -->

If I understand the assembler correctly it fails at
include/asm-sh/kexec.h:59

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

* Re: sh kexec build error
  2008-07-28 13:06 sh kexec build error Adrian Bunk
@ 2008-07-28 13:14 ` Paul Mundt
  2008-07-28 16:10   ` Adrian Bunk
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Mundt @ 2008-07-28 13:14 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Huang Ying, Vivek Goyal, Andrew Morton, ebiederm, linux-sh,
	linux-kernel

On Mon, Jul 28, 2008 at 04:06:13PM +0300, Adrian Bunk wrote:
> Commit 3ab83521378268044a448113c6aa9a9e245f4d2f (kexec jump)
> causes the following build error on sh:
> 
> <--  snip  -->
> 
> ...
>   CC      kernel/kexec.o
> {standard input}: Assembler messages:
> {standard input}:1518: Error: offset to unaligned destination
> make[2]: *** [kernel/kexec.o] Error 1
> 
> <--  snip  -->
> 
> If I understand the assembler correctly it fails at
> include/asm-sh/kexec.h:59
> 
Indeed. This should fix it:

---

diff --git a/include/asm-sh/processor_32.h b/include/asm-sh/processor_32.h
index c6583f2..0dadd75 100644
--- a/include/asm-sh/processor_32.h
+++ b/include/asm-sh/processor_32.h
@@ -19,7 +19,7 @@
  * Default implementation of macro that returns current
  * instruction pointer ("program counter").
  */
-#define current_text_addr() ({ void *pc; __asm__("mova	1f, %0\n1:":"=z" (pc)); pc; })
+#define current_text_addr() ({ void *pc; __asm__("mova	1f, %0\n.align 2\n1:":"=z" (pc)); pc; })
 
 /* Core Processor Version Register */
 #define CCN_PVR		0xff000030

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

* Re: sh kexec build error
  2008-07-28 13:14 ` Paul Mundt
@ 2008-07-28 16:10   ` Adrian Bunk
  2008-07-28 16:17     ` Paul Mundt
  0 siblings, 1 reply; 4+ messages in thread
From: Adrian Bunk @ 2008-07-28 16:10 UTC (permalink / raw)
  To: Paul Mundt, Huang Ying, Vivek Goyal, Andrew Morton, ebiederm,
	linux-sh, linux-kernel

On Mon, Jul 28, 2008 at 10:14:44PM +0900, Paul Mundt wrote:
> On Mon, Jul 28, 2008 at 04:06:13PM +0300, Adrian Bunk wrote:
> > Commit 3ab83521378268044a448113c6aa9a9e245f4d2f (kexec jump)
> > causes the following build error on sh:
> > 
> > <--  snip  -->
> > 
> > ...
> >   CC      kernel/kexec.o
> > {standard input}: Assembler messages:
> > {standard input}:1518: Error: offset to unaligned destination
> > make[2]: *** [kernel/kexec.o] Error 1
> > 
> > <--  snip  -->
> > 
> > If I understand the assembler correctly it fails at
> > include/asm-sh/kexec.h:59
> > 
> Indeed. This should fix it:


I can confirm that your patch fixes the compilation.


> diff --git a/include/asm-sh/processor_32.h b/include/asm-sh/processor_32.h
> index c6583f2..0dadd75 100644
> --- a/include/asm-sh/processor_32.h
> +++ b/include/asm-sh/processor_32.h
> @@ -19,7 +19,7 @@
>   * Default implementation of macro that returns current
>   * instruction pointer ("program counter").
>   */
> -#define current_text_addr() ({ void *pc; __asm__("mova	1f, %0\n1:":"=z" (pc)); pc; })
> +#define current_text_addr() ({ void *pc; __asm__("mova	1f, %0\n.align 2\n1:":"=z" (pc)); pc; })
>  
>  /* Core Processor Version Register */
>  #define CCN_PVR		0xff000030

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

* Re: sh kexec build error
  2008-07-28 16:10   ` Adrian Bunk
@ 2008-07-28 16:17     ` Paul Mundt
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Mundt @ 2008-07-28 16:17 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Huang Ying, Vivek Goyal, Andrew Morton, ebiederm, linux-sh,
	linux-kernel

On Mon, Jul 28, 2008 at 07:10:04PM +0300, Adrian Bunk wrote:
> On Mon, Jul 28, 2008 at 10:14:44PM +0900, Paul Mundt wrote:
> > On Mon, Jul 28, 2008 at 04:06:13PM +0300, Adrian Bunk wrote:
> > > Commit 3ab83521378268044a448113c6aa9a9e245f4d2f (kexec jump)
> > > causes the following build error on sh:
> > > 
> > > <--  snip  -->
> > > 
> > > ...
> > >   CC      kernel/kexec.o
> > > {standard input}: Assembler messages:
> > > {standard input}:1518: Error: offset to unaligned destination
> > > make[2]: *** [kernel/kexec.o] Error 1
> > > 
> > > <--  snip  -->
> > > 
> > > If I understand the assembler correctly it fails at
> > > include/asm-sh/kexec.h:59
> > > 
> > Indeed. This should fix it:
> 
> 
> I can confirm that your patch fixes the compilation.
> 
Thanks for testing, I'll roll it in with my next batch of updates.

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

end of thread, other threads:[~2008-07-28 16:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-28 13:06 sh kexec build error Adrian Bunk
2008-07-28 13:14 ` Paul Mundt
2008-07-28 16:10   ` Adrian Bunk
2008-07-28 16:17     ` Paul Mundt

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