From patchwork Wed Mar 18 05:34:52 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 12763 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n2I5bQD2011155 for ; Wed, 18 Mar 2009 05:37:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752502AbZCRFh0 (ORCPT ); Wed, 18 Mar 2009 01:37:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752742AbZCRFh0 (ORCPT ); Wed, 18 Mar 2009 01:37:26 -0400 Received: from yx-out-2324.google.com ([74.125.44.30]:42696 "EHLO yx-out-2324.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752502AbZCRFh0 (ORCPT ); Wed, 18 Mar 2009 01:37:26 -0400 Received: by yx-out-2324.google.com with SMTP id 31so377922yxl.1 for ; Tue, 17 Mar 2009 22:37:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :subject; bh=yn0jEneT6EdEmy3gKda2a3jQE+nC/QivZuXYpaQrcMY=; b=t3aThgMfa+rXwhhSovOf/0MXE87jHW2MDVrdjMdDOwx/slYRyzxYg1waoVrjk/lriE hQLqag60FSL+oBm88OCtnUdbG7VB7ebDiBamjd4UhbgECJvRYMA0E40F2R1n2w4hM8Qj 8BZuS38FtwETQ7tA8SQJ+hp5QjBLph5n8HrGg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=G9eVoA1VGsKrb1cDmR3PvT/DsCtRNSSr6g18PCden8YVFhE5YINfSlivL6CrRP7e74 Y5OpLvZeeyt9oWM1/NYXuL4W7TcO9lIU1BSHhV7ArRkLQDSivYJ9XYw1I4k8Ek4YS25O X0sNeTJAS6YXj1butZzOXY5u/hTbFnOptksQY= Received: by 10.114.95.12 with SMTP id s12mr493263wab.223.1237354643430; Tue, 17 Mar 2009 22:37:23 -0700 (PDT) Received: from rx1.opensource.se (210.5.32.202.bf.2iij.net [202.32.5.210]) by mx.google.com with ESMTPS id y25sm3852755pod.10.2009.03.17.22.37.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 17 Mar 2009 22:37:21 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , lethal@linux-sh.org Date: Wed, 18 Mar 2009 14:34:52 +0900 Message-Id: <20090318053452.4078.65405.sendpatchset@rx1.opensource.se> Subject: [PATCH] sh: use P1 instead of P2 for kexec Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Magnus Damm Use P1 instead of P2 to enable cache when moving data in the kexec assembly snippet. Signed-off-by: Magnus Damm --- 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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 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: