From patchwork Tue Oct 6 21:22:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Fleming X-Patchwork-Id: 52044 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 n96LSd9J000820 for ; Tue, 6 Oct 2009 21:28:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933198AbZJFVYv (ORCPT ); Tue, 6 Oct 2009 17:24:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933190AbZJFVYv (ORCPT ); Tue, 6 Oct 2009 17:24:51 -0400 Received: from 124x34x33x190.ap124.ftth.ucom.ne.jp ([124.34.33.190]:58138 "EHLO master.linux-sh.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933198AbZJFVYu (ORCPT ); Tue, 6 Oct 2009 17:24:50 -0400 Received: from localhost (unknown [127.0.0.1]) by master.linux-sh.org (Postfix) with ESMTP id 2D92C63790; Tue, 6 Oct 2009 21:23:01 +0000 (UTC) X-Quarantine-ID: X-Virus-Scanned: amavisd-new at linux-sh.org X-Amavis-Alert: BAD HEADER, Duplicate header field: "In-Reply-To" Received: from master.linux-sh.org ([127.0.0.1]) by localhost (master.linux-sh.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sbzwxINqWCct; Wed, 7 Oct 2009 06:23:01 +0900 (JST) Received: from localhost (82-38-64-26.cable.ubr06.brad.blueyonder.co.uk [82.38.64.26]) by master.linux-sh.org (Postfix) with ESMTP id 8A3BD63784; Wed, 7 Oct 2009 06:23:00 +0900 (JST) From: Matt Fleming To: Paul Mundt Cc: linux-sh@vger.kernel.org Subject: [PATCH 12/14] sh: Fix the offset from P1SEG/P2SEG where we map RAM Date: Tue, 6 Oct 2009 22:22:32 +0100 Message-Id: X-Mailer: git-send-email 1.6.3.3 In-Reply-To: References: <1db0a1123393575aec324e0d808b6369f9837fe4.1254861984.git.matt@console-pimps.org> <22db0c702ba4b19699c05c38c26a6061bd0bbf40.1254861984.git.matt@console-pimps.org> <522679ccc33da57080deaa75f23dc5d6b782dbba.1254861984.git.matt@console-pimps.org> <014aa11fe1891ca085d72b8b6fb56703b7637a8b.1254861984.git.matt@console-pimps.org> <46a9d1e2f3461c917c9f43e512bd25eced531695.1254861984.git.matt@console-pimps.org> <74c586207600f78a4fa0bd080917bea1c5402f82.1254861984.git.matt@console-pimps.org> In-Reply-To: References: Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c index f13a18c..8c39777 100644 --- a/arch/sh/mm/pmb.c +++ b/arch/sh/mm/pmb.c @@ -268,7 +268,7 @@ static void __pmb_unmap(struct pmb_entry *pmbe) int __uses_jump_to_uncached pmb_init(void) { unsigned int i; - long size; + long size, ret; jump_to_uncached(); @@ -280,12 +280,13 @@ int __uses_jump_to_uncached pmb_init(void) * P1 - provides a cached window onto physical memory * P2 - provides an uncached window onto physical memory */ - size = pmb_remap(P2SEG, __MEMORY_START, __MEMORY_SIZE, - PMB_WT | PMB_UB); - BUG_ON(size != __MEMORY_SIZE); + size = __MEMORY_START + __MEMORY_SIZE; - size = pmb_remap(P1SEG, __MEMORY_START, __MEMORY_SIZE, PMB_C); - BUG_ON(size != __MEMORY_SIZE); + ret = pmb_remap(P1SEG, 0x00000000, size, PMB_C); + BUG_ON(ret != size); + + ret = pmb_remap(P2SEG, 0x00000000, size, PMB_WT | PMB_UB); + BUG_ON(ret != size); ctrl_outl(0, PMB_IRMCR);