Patchwork [2/7] Redefine MMU register access asi if CONFIG_LEON

login
register
mail settings
Submitter Konrad Eisele
Date June 9, 2009, 11:22 a.m.
Message ID <4A2E45D8.7080609@gaisler.com>
Download mbox | patch
Permalink /patch/28300/
State Changes Requested
Delegated to: David Miller
Headers show

Comments

Konrad Eisele - June 9, 2009, 11:22 a.m.
From fb5efd06d7e8ed5bc09b1be66cda8167342a2737 Mon Sep 17 00:00:00 2001
From: Konrad Eisele <konrad@gaisler.com>
Date: Tue, 9 Jun 2009 12:51:43 +0200
Subject: [PATCH 2/7] Redefine MMU register access asi if CONFIG_LEON
is defined

Signed-off-by: Konrad Eisele <konrad@gaisler.com>
---
  arch/sparc/include/asm/asi.h |    5 +++++
  1 files changed, 5 insertions(+), 0 deletions(-)
Julian Calaby - June 10, 2009, 12:02 a.m.
On Tue, Jun 9, 2009 at 21:22, Konrad Eisele<konrad@gaisler.com> wrote:
> From fb5efd06d7e8ed5bc09b1be66cda8167342a2737 Mon Sep 17 00:00:00 2001
> From: Konrad Eisele <konrad@gaisler.com>
> Date: Tue, 9 Jun 2009 12:51:43 +0200
> Subject: [PATCH 2/7] Redefine MMU register access asi if CONFIG_LEON
> is defined
>
> Signed-off-by: Konrad Eisele <konrad@gaisler.com>
> ---
>  arch/sparc/include/asm/asi.h |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/arch/sparc/include/asm/asi.h b/arch/sparc/include/asm/asi.h
> index 74703c5..aa498f8 100644
> --- a/arch/sparc/include/asm/asi.h
> +++ b/arch/sparc/include/asm/asi.h
> @@ -259,4 +259,9 @@ #define ASI_BLK_S           0xf1 /* Secondary, bl
>  #define ASI_BLK_PL             0xf8 /* Primary, blk ld/st, little      */
>  #define ASI_BLK_SL             0xf9 /* Secondary, blk ld/st, little    */
>
> +#ifdef CONFIG_LEON
> +#undef  ASI_M_MMUREGS
> +#define ASI_M_MMUREGS          0x19
> +#endif /* CONFIG_LEON */
> +
>  #endif /* _SPARC_ASI_H */

Would it not be better to put the ifdefs around the original
definition of ASI_M_MMUREGS?

Thanks,

Patch

diff --git a/arch/sparc/include/asm/asi.h b/arch/sparc/include/asm/asi.h
index 74703c5..aa498f8 100644
--- a/arch/sparc/include/asm/asi.h
+++ b/arch/sparc/include/asm/asi.h
@@ -259,4 +259,9 @@  #define ASI_BLK_S		0xf1 /* Secondary, bl
  #define ASI_BLK_PL		0xf8 /* Primary, blk ld/st, little	*/
  #define ASI_BLK_SL		0xf9 /* Secondary, blk ld/st, little	*/

+#ifdef CONFIG_LEON
+#undef  ASI_M_MMUREGS
+#define ASI_M_MMUREGS		0x19
+#endif /* CONFIG_LEON */
+
  #endif /* _SPARC_ASI_H */