public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
From: Magnus Damm <magnus.damm@gmail.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH] sh: use P1 instead of P2 for kexec
Date: Wed, 18 Mar 2009 05:34:52 +0000	[thread overview]
Message-ID: <20090318053452.4078.65405.sendpatchset@rx1.opensource.se> (raw)

From: Magnus Damm <damm@igel.co.jp>

Use P1 instead of P2 to enable cache when
moving data in the kexec assembly snippet.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
---

 Q: Maybe we need to flush data cache before jumping?

 arch/sh/kernel/machine_kexec.c   |    2 +-
 arch/sh/kernel/relocate_kernel.S |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

--- 0005/arch/sh/kernel/machine_kexec.c
+++ work/arch/sh/kernel/machine_kexec.c	2009-03-18 11:44:45.000000000 +0900
@@ -100,7 +100,7 @@ void machine_kexec(struct kimage *image)
 #endif
 	/* now call it */
 	rnk = (relocate_new_kernel_t) reboot_code_buffer;
-	(*rnk)(page_list, reboot_code_buffer, P2SEGADDR(image->start));
+	(*rnk)(page_list, reboot_code_buffer, P1SEGADDR(image->start));
 }
 
 void arch_crash_save_vmcoreinfo(void)
--- 0005/arch/sh/kernel/relocate_kernel.S
+++ work/arch/sh/kernel/relocate_kernel.S	2009-03-18 11:45:14.000000000 +0900
@@ -18,7 +18,7 @@ relocate_new_kernel:
 	/* r6 = start_address      */
 
 	mov.l	10f,r8	  /* PAGE_SIZE */
-	mov.l	11f,r9    /* P2SEG */
+	mov.l	11f,r9    /* P1SEG */
 
 	/*  stack setting */
 	add	r8,r5
@@ -29,7 +29,7 @@ relocate_new_kernel:
 0:
 	mov.l	@r4+,r0	  /* cmd = *ind++ */
 
-1:	/* addr = (cmd | P2SEG) & 0xfffffff0 */
+1:	/* addr = (cmd | P1SEG) & 0xfffffff0 */
 	mov	r0,r2
 	or	r9,r2
 	mov	#-16,r1
@@ -86,7 +86,7 @@ relocate_new_kernel:
 10:
 	.long	PAGE_SIZE
 11:
-	.long	P2SEG
+	.long	P1SEG
 
 relocate_new_kernel_end:
 

             reply	other threads:[~2009-03-18  5:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-18  5:34 Magnus Damm [this message]
2009-03-18  6:01 ` [PATCH] sh: use P1 instead of P2 for kexec 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=20090318053452.4078.65405.sendpatchset@rx1.opensource.se \
    --to=magnus.damm@gmail.com \
    --cc=linux-sh@vger.kernel.org \
    /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