From patchwork Wed Jun 10 10:15:43 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Eisele X-Patchwork-Id: 28399 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 0B43DB70C5 for ; Wed, 10 Jun 2009 20:13:09 +1000 (EST) Received: by ozlabs.org (Postfix) id E3A22DDD0B; Wed, 10 Jun 2009 20:13:08 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 5B7E0DDD04 for ; Wed, 10 Jun 2009 20:13:08 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753315AbZFJKMp (ORCPT ); Wed, 10 Jun 2009 06:12:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754328AbZFJKMp (ORCPT ); Wed, 10 Jun 2009 06:12:45 -0400 Received: from mail176c2.megamailservers.com ([69.49.111.76]:59120 "EHLO mail176c2.megamailservers.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753315AbZFJKMo (ORCPT ); Wed, 10 Jun 2009 06:12:44 -0400 X-Authenticated-User: konrad.gaisler.com Received: from localhost.localdomain (c-10a5e155.260-1-64736c10.cust.bredbandsbolaget.se [85.225.165.16]) (authenticated bits=0) by mail176c2.megamailservers.com (8.13.6/8.13.1) with ESMTP id n5AACeaE027334; Wed, 10 Jun 2009 06:12:44 -0400 From: konrad@gaisler.com To: sparclinux@vger.kernel.org Cc: sam@ravnborg.org, julian.calaby@gmail.com, Konrad Eisele Subject: [PATCH 4/7] Undefine srmmu_hwprobe in the CONFIG_SPARC_LEON case. Date: Wed, 10 Jun 2009 12:15:43 +0200 Message-Id: <1244628943-23907-1-git-send-email-konrad@gaisler.com> X-Mailer: git-send-email 1.6.3.2 In-Reply-To: <4A2E45E2.4070906@gaisler.com> References: <4A2E45E2.4070906@gaisler.com> Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org From: Konrad Eisele >> srmmu_get_pte (unsigned long addr) > > Surely there is a better way to do this, oh and if this is the only > way, #ifndef CONFIG_LEON is much cleaner. > SPARC-LEON doesnt have a hardware probe, so the function cannot be used for leon. I implement a softwareprobe instead. Changed to #ifndef CONFIG_LEON The sparc-leon SRMMU has no mmu probe logic implemented. Instead function srmmu_swprobe() is used that is defined in arch/sparc/mm/leon.c. arch/sparc/include/asm/leon.h on the other hand defines srmmu_hwprobe(addr) as a macro --- arch/sparc/include/asm/pgtsrmmu.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/sparc/include/asm/pgtsrmmu.h b/arch/sparc/include/asm/pgtsrmmu.h index 808555f..267178c 100644 --- a/arch/sparc/include/asm/pgtsrmmu.h +++ b/arch/sparc/include/asm/pgtsrmmu.h @@ -267,6 +267,7 @@ static inline void srmmu_flush_tlb_page( } +#ifndef CONFIG_SPARC_LEON static inline unsigned long srmmu_hwprobe(unsigned long vaddr) { unsigned long retval; @@ -278,6 +279,7 @@ static inline unsigned long srmmu_hwprob return retval; } +#endif static inline int srmmu_get_pte (unsigned long addr)