diff mbox

[4/7] Undefine srmmu_hwprobe in the CONFIG_LEON case.

Message ID 4A2E45E2.4070906@gaisler.com
State Changes Requested
Delegated to: David Miller
Headers show

Commit Message

Konrad Eisele June 9, 2009, 11:22 a.m. UTC
From 93d982ed55ae6f81a06329524fbfdf0fec4d9d1e Mon Sep 17 00:00:00 2001
From: Konrad Eisele <konrad@gaisler.com>
Date: Tue, 9 Jun 2009 12:59:42 +0200
Subject: [PATCH 4/7] Undefine srmmu_hwprobe in the CONFIG_LEON case.
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

Signed-off-by: Konrad Eisele <konrad@gaisler.com>
---
  arch/sparc/include/asm/pgtsrmmu.h |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)

Comments

Julian Calaby June 10, 2009, 12:01 a.m. UTC | #1
On Tue, Jun 9, 2009 at 21:22, Konrad Eisele<konrad@gaisler.com> wrote:
> From 93d982ed55ae6f81a06329524fbfdf0fec4d9d1e Mon Sep 17 00:00:00 2001
> From: Konrad Eisele <konrad@gaisler.com>
> Date: Tue, 9 Jun 2009 12:59:42 +0200
> Subject: [PATCH 4/7] Undefine srmmu_hwprobe in the CONFIG_LEON case.
> 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
>
> Signed-off-by: Konrad Eisele <konrad@gaisler.com>
> ---
>  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..1701181 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(
>
>  }
>
> +#if !(defined(CONFIG_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)

Surely there is a better way to do this, oh and if this is the only
way, #ifndef CONFIG_LEON is much cleaner.

Thanks,
diff mbox

Patch

diff --git a/arch/sparc/include/asm/pgtsrmmu.h b/arch/sparc/include/asm/pgtsrmmu.h
index 808555f..1701181 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(

  }

+#if !(defined(CONFIG_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)