mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@kernel.org>
To: Paul Mundt <lethal@linux-sh.org>,
	Huang Ying <ying.huang@intel.com>,
	Vivek Goyal <vgoyal@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	ebiederm@xmission.com, linux-sh@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: sh kexec build error
Date: Mon, 28 Jul 2008 19:10:04 +0300	[thread overview]
Message-ID: <20080728161004.GH30612@cs181140183.pp.htv.fi> (raw)
In-Reply-To: <20080728131444.GA15942@linux-sh.org>

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


  reply	other threads:[~2008-07-28 16:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-28 13:06 Adrian Bunk
2008-07-28 13:14 ` Paul Mundt
2008-07-28 16:10   ` Adrian Bunk [this message]
2008-07-28 16:17     ` Paul Mundt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080728161004.GH30612@cs181140183.pp.htv.fi \
    --to=bunk@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=vgoyal@redhat.com \
    --cc=ying.huang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®