Redefine MMU register access asi if CONFIG_LEON
PATCH 2/7 Redefine MMU register access asi if CONFIG_LEON
From fb5efd06d7e8ed5bc09b1be66cda8167342a2737 Mon Sep 17 00:00:00 2001
From: Konrad Eisele <[email protected]>
Date: Tue, 9 Jun 2009 12:51:43 +0200
Subject: [PATCH 2/7] Redefine MMU register access asi if CONFIG_LEON is defined
--- arch/sparc/include/asm/asi.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
arch/sparc/include/asm/asi.h +5 -0
@@ -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 */
Signature · 1 line
1.4.2.1
From fb5efd06d7e8ed5bc09b1be66cda8167342a2737 Mon Sep 17 00:00:00 2001
From: Konrad Eisele <[email protected]>
Date: Tue, 9 Jun 2009 12:51:43 +0200
Subject: [PATCH 2/7] Redefine MMU register access asi if CONFIG_LEON is defined
--- arch/sparc/include/asm/asi.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
arch/sparc/include/asm/asi.h +5 -0
@@ -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 */
Signature · 1 line
1.4.2.1
Quoted 16 lines · Konrad Eisele
From
fb5efd06d7e8ed5bc09b1be66cda8167342a2737Mon Sep 17 00:00:00 2001
From: Konrad Eisele <[email protected]>
Date: Tue, 9 Jun 2009 12:51:43 +0200
Subject: [PATCH 2/7] Redefine MMU register access asi ifCONFIG_LEONis definedSigned-off-by Konrad Eisele <[email protected]>---
arch/sparc/include/asm/asi.h | 5 +++++1 files changed, 5 insertions(+), 0 deletions(-)arch/sparc/include/asm/asi.h +0
-0
arch/sparc/include/asm/asi.h #define ASI_BLK_S 0xf1 /* Secondary, bl · line 267
Quoted 9 lines
arch/sparc/include/asm/asi.h +5
-0@@ -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,
Signature · 4 lines
Julian Calaby Email: [email protected] .Plan: http://sites.google.com/site/juliancalaby/
PATCH 2/7 Redefine MMU register access asi if CONFIG_LEON
In reply to Konrad EiseleFrom: Konrad Eisele <[email protected]>
Quoted 2 lines
Would it not be better to put the ifdefs around the original definition of
ASI_M_MMUREGS?
Done
is defined
--- arch/sparc/include/asm/asi.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
arch/sparc/include/asm/asi.h +4 -0
@@ -40,7 +40,11 @@ #define ASI_M_RES00 0x00 /* Do#define ASI_M_UNA01 0x01/* Same here... */ #define ASI_M_MXCC 0x02/* Access to TI VIKING MXCC registers */ #define ASI_M_FLUSH_PROBE 0x03/* Reference MMU Flush/Probe; rw, ss */ +#ifndef CONFIG_SPARC_LEON #define ASI_M_MMUREGS 0x04/* MMU Registers; rw, ss */ +#else +#define ASI_M_MMUREGS 0x19 +#endif /* CONFIG_SPARC_LEON */ #define ASI_M_TLBDIAG 0x05/* MMU TLB only Diagnostics */ #define ASI_M_DIAGS 0x06/* Reference MMU Diagnostics */ #define ASI_M_IODIAG 0x07/* MMU I/O TLB only Diagnostics */
Signature · 1 line
1.4.2.1
Quoted 18 lines · On Wed, Jun 10, 2009 at 20:11, <[email protected]> wrote:
From: Konrad Eisele <[email protected]>
Quoted 2 lines
Would it not be better to put the ifdefs around the original definition of
ASI_M_MMUREGS?Done
is defined
---
arch/sparc/include/asm/asi.h | 4 ++++1 files changed, 4 insertions(+), 0 deletions(-)arch/sparc/include/asm/asi.h +0
-0
arch/sparc/include/asm/asi.h #define ASI_M_RES00 0x00 /* Do · line 47
Quoted 8 lines
arch/sparc/include/asm/asi.h +4
-0@@ -40,7 +40,11 @@ #define ASI_M_RES00 0x00 /* Do #define ASI_M_UNA01 0x01 /* Same here... */ #define ASI_M_MXCC 0x02 /* Access to TI VIKING MXCC registers */ #define ASI_M_FLUSH_PROBE 0x03 /* Reference MMU Flush/Probe; rw, ss */ +#ifndef CONFIG_SPARC_LEON #define ASI_M_MMUREGS 0x04 /* MMU Registers; rw, ss */ +#else +#define ASI_M_MMUREGS 0x19 +#endif /* CONFIG_SPARC_LEON */
If you do another round of changes to these patches, you may want to write it as:
#ifdef CONFIG_SPARC_LEON
#define ASI_M_MMUREGS 0x19
#else
#define ASI_M_MMUREGS 0x04 /* MMU Registers; rw, ss */
#endif /* CONFIG_SPARC_LEON */
and put some whitespace around it so it stands out.
You could also comment it similarly to the other entries in this file.
arch/sparc/include/asm/asi.h #define ASI_M_RES00 0x00 /* Do · line 50
Quoted 3 lines
arch/sparc/include/asm/asi.h +0
-0#define ASI_M_TLBDIAG 0x05 /* MMU TLB only Diagnostics */ #define ASI_M_DIAGS 0x06 /* Reference MMU Diagnostics */ #define ASI_M_IODIAG 0x07 /* MMU I/O TLB only Diagnostics */
Thanks,
Signature · 4 lines
Julian Calaby Email: [email protected] .Plan: http://sites.google.com/site/juliancalaby/