From patchwork Thu Sep 8 08:52:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nobuhiro Iwamatsu X-Patchwork-Id: 1129232 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p888qb0D027264 for ; Thu, 8 Sep 2011 08:52:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932456Ab1IHIwc (ORCPT ); Thu, 8 Sep 2011 04:52:32 -0400 Received: from mail-yw0-f46.google.com ([209.85.213.46]:41294 "EHLO mail-yw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932435Ab1IHIwc convert rfc822-to-8bit (ORCPT ); Thu, 8 Sep 2011 04:52:32 -0400 Received: by ywf7 with SMTP id 7so461506ywf.19 for ; Thu, 08 Sep 2011 01:52:31 -0700 (PDT) Received: by 10.231.5.42 with SMTP id 42mr332336ibt.80.1315471951184; Thu, 08 Sep 2011 01:52:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.184.78 with HTTP; Thu, 8 Sep 2011 01:52:11 -0700 (PDT) In-Reply-To: <8762ldcaqa.wl%kuninori.morimoto.gx@renesas.com> References: <20110609063132.GC26006@linux-sh.org> <871uy5f9kg.wl%kuninori.morimoto.gx@renesas.com> <2ECC67EFACD13Cebiharaml@si-linux.co.jp> <8762ldcaqa.wl%kuninori.morimoto.gx@renesas.com> From: Nobuhiro Iwamatsu Date: Thu, 8 Sep 2011 17:52:11 +0900 X-Google-Sender-Auth: ZedFeJutmbrJtVL8PBJCbEtq8_I Message-ID: Subject: Re: Ecovec (SH7724) board doesn't work on latest linus tree To: Kuninori Morimoto Cc: Yutaro Ebihara , Paul Mundt , Magnus , Linux-SH , Kuninori Morimoto Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 08 Sep 2011 08:52:41 +0000 (UTC) Hi, Your patch does not seem to have a meaning. In the case of 29bit, CAC/UNCAC_ADDR may not return a right address. I think that it is to use P1SEGADDR, and P2SEGADDR in CAC/UNCAC_ADDR to easily revise this. I attached my patch. Best regards, Nobuhiro From b1f83e75a2dc5a61671d18e8f472450561c9eea7 Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Thu, 8 Sep 2011 17:37:24 +0900 Subject: [PATCH] sh: Fix address calculation of CAC_ADDR and UNCAC_ADDR in 29bit mode In the case of 29bit mode, CAC/UNCAC_ADDR does not return a right address. This revises this problem by using P1SEGADDR and P2SEGADDR in 29bit mode. Signed-off-by: Nobuhiro Iwamatsu --- arch/sh/include/asm/page.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/sh/include/asm/page.h b/arch/sh/include/asm/page.h index 822d608..abcc4dc 100644 --- a/arch/sh/include/asm/page.h +++ b/arch/sh/include/asm/page.h @@ -141,8 +141,13 @@ typedef struct page *pgtable_t; #endif /* !__ASSEMBLY__ */ #ifdef CONFIG_UNCACHED_MAPPING +#if defined(CONFIG_29BIT) +#define UNCAC_ADDR(addr) P2SEGADDR(addr) +#define CAC_ADDR(addr) P1SEGADDR(addr) +#else #define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + uncached_start) #define CAC_ADDR(addr) ((addr) - uncached_start + PAGE_OFFSET) +#endif #else #define UNCAC_ADDR(addr) ((addr)) #define CAC_ADDR(addr) ((addr))