From patchwork Thu Sep 8 13:11:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Hellstrom X-Patchwork-Id: 114007 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id EC6D3B6F87 for ; Fri, 9 Sep 2011 11:19:48 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757936Ab1IIBTa (ORCPT ); Thu, 8 Sep 2011 21:19:30 -0400 Received: from mail168c2.megamailservers.com ([69.49.111.68]:49564 "EHLO mail168c2.megamailservers.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757726Ab1IIBT1 (ORCPT ); Thu, 8 Sep 2011 21:19:27 -0400 X-Greylist: delayed 43639 seconds by postgrey-1.27 at vger.kernel.org; Thu, 08 Sep 2011 21:19:27 EDT X-POP-User: jan@gaisler.com Received: from localhost.localdomain (gaisler.se [92.33.28.242]) by mail168c2.megamailservers.com (8.13.6/8.13.1) with ESMTP id p88DBuOe031447; Thu, 8 Sep 2011 09:11:57 -0400 From: Daniel Hellstrom To: davem@davemloft.net Cc: sparclinux@vger.kernel.org Subject: [PATCH] sparc32,leon: SRMMU MMU Table probe fix Date: Thu, 8 Sep 2011 15:11:15 +0200 Message-Id: <1315487475-16690-1-git-send-email-daniel@gaisler.com> X-Mailer: git-send-email 1.5.4 X-CSC: 0 X-CHA: v=1.1 cv=bJ4pTctY3ZwLo81WwtZ7itcuHPLkNMm0HGlL8GWf3sE= c=1 sm=1 a=9VOLCLE7WHkA:10 a=U62ajLuCel8A:10 a=jXKJviUpWSOlMmIvGrHOfw==:17 a=ebG-ZW-8AAAA:8 a=HTiXKhQfxWhPIEGvxbUA:9 a=_t01rFxigJxSMF_Bo0AA:7 a=cCYF7-FHeg4A:10 a=jXKJviUpWSOlMmIvGrHOfw==:117 Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org The LEON MMU Model (SRMMU) does not implement MMu Table probing in hardware, instead it is implemented in software. However the software implementation does not return the PTE as it should which always results in INVALID entires and the PROM mappings are not inherited as they should during startup. The following patch removes the masking of the PTE. Signed-off-by: Daniel Hellstrom --- arch/sparc/include/asm/pgtsrmmu.h | 2 +- arch/sparc/mm/leon_mm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sparc/include/asm/pgtsrmmu.h b/arch/sparc/include/asm/pgtsrmmu.h index 1407c07..f6ae2b2 100644 --- a/arch/sparc/include/asm/pgtsrmmu.h +++ b/arch/sparc/include/asm/pgtsrmmu.h @@ -280,7 +280,7 @@ static inline unsigned long srmmu_hwprobe(unsigned long vaddr) return retval; } #else -#define srmmu_hwprobe(addr) (srmmu_swprobe(addr, 0) & SRMMU_PTE_PMASK) +#define srmmu_hwprobe(addr) srmmu_swprobe(addr, 0) #endif static inline int diff --git a/arch/sparc/mm/leon_mm.c b/arch/sparc/mm/leon_mm.c index e485a68..13c2169 100644 --- a/arch/sparc/mm/leon_mm.c +++ b/arch/sparc/mm/leon_mm.c @@ -162,7 +162,7 @@ ready: printk(KERN_INFO "swprobe: padde %x\n", paddr_calc); if (paddr) *paddr = paddr_calc; - return paddrbase; + return pte; } void leon_flush_icache_all(void)