PPC: Change lib_ppc/bat_rw.c to use high bats
PATCH v2 2/4 PPC: Change lib_ppc/bat_rw.c to use high bats
From: Becky Bruce <[email protected]>
Currently, this code only deals with BATs 0-3, which makes it useless on systems that support BATs 4-7. Add the support for these registers.
--- include/asm-ppc/mmu.h | 4 ++ lib_ppc/bat_rw.c | 134 ++++++++++++++++++++++++++++++++++--------------- 2 files changed, 97 insertions(+), 41 deletions(-)
include/asm-ppc/mmu.h +4 -0
@@ -141,6 +141,10 @@ extern void _tlbia(void); /* invalidate all TLB entries */typedef enum {IBAT0 =0 ,IBAT1 ,IBAT2 ,IBAT3 , DBAT0, DBAT1, DBAT2, DBAT3 +#ifdef CONFIG_HIGH_BATS + ,IBAT4 ,IBAT5 ,IBAT6 ,IBAT7 , +DBAT4 ,DBAT5 ,DBAT6 ,DBAT7 +#endif }ppc_bat_t ;extern int read_bat (ppc_bat_t bat,unsigned long *upper,unsigned long *lower);
lib_ppc/bat_rw.c +93 -41
186 lines not on this page · raw message
Signature · 1 line
1.5.4.1
PATCH v2 2/4 PPC: Change lib_ppc/bat_rw.c to use high bats
include/asm-ppc/mmu.h extern void _tlbia(void); /* invalidate all TLB entries */ · line 147
Quoted 12 lines · Becky.bruce at freescale.com
include/asm-ppc/mmu.h +4
-0@@ -141,6 +141,10 @@ extern void _tlbia(void); /* invalidate all TLB entries */ typedef enum { IBAT0 = 0, IBAT1, IBAT2, IBAT3, DBAT0, DBAT1, DBAT2, DBAT3 +#ifdef CONFIG_HIGH_BATS + , IBAT4, IBAT5, IBAT6, IBAT7, + DBAT4, DBAT5, DBAT6, DBAT7 +#endif
C allows trailing commas on such lists; no need to move it inside the ifdef.
-Scott
PATCH v2 2/4 PPC: Change lib_ppc/bat_rw.c to use high bats
Quoted 18 lines · Scott Wood
include/asm-ppc/mmu.h extern void _tlbia(void); /* invalidate all TLB entries */ · line 147
Quoted 13 lines · Becky.bruce at freescale.com
include/asm-ppc/mmu.h +0
-0@@ -141,6 +141,10 @@ extern void _tlbia(void); /* invalidate allTLB entries */
typedef enum { IBAT0 = 0, IBAT1, IBAT2, IBAT3, DBAT0, DBAT1, DBAT2, DBAT3include/asm-ppc/mmu.h +4
-0+#ifdef CONFIG_HIGH_BATS + , IBAT4, IBAT5, IBAT6, IBAT7, + DBAT4, DBAT5, DBAT6, DBAT7 +#endif C allows trailing commas on such lists; no need to move it inside the ifdef.
Dangling commas bother me in the extreme. If this is the concensus, I'll move it, but I prefer it where it is.
-B
PATCH v2 2/4 PPC: Change lib_ppc/bat_rw.c to use high bats
Quoted 19 lines · Becky Bruce
Quoted 17 lines · Scott Wood
include/asm-ppc/mmu.h extern void _tlbia(void); /* invalidate all TLB entries */ · line 147
Quoted 13 lines · Becky.bruce at freescale.com
include/asm-ppc/mmu.h +0
-0@@ -141,6 +141,10 @@ extern void _tlbia(void); /* invalidate allTLB entries */
typedef enum { IBAT0 = 0, IBAT1, IBAT2, IBAT3, DBAT0, DBAT1, DBAT2, DBAT3include/asm-ppc/mmu.h +4
-0+#ifdef CONFIG_HIGH_BATS + , IBAT4, IBAT5, IBAT6, IBAT7, + DBAT4, DBAT5, DBAT6, DBAT7 +#endif C allows trailing commas on such lists; no need to move it inside the ifdef.
Quoted 4 lines
Dangling commas bother me in the extreme. If this is the concensus, I'll move it, but I prefer it where it is.
-B
+1 for moving. Dangling commas is the second best thing in C. ;-)
Best regards,
gvb
PATCH v2 2/4 PPC: Change lib_ppc/bat_rw.c to use high bats
Quoted 20 lines · Jerry Van Baren
Quoted 19 lines · Becky Bruce
Quoted 17 lines · Scott Wood
include/asm-ppc/mmu.h extern void _tlbia(void); /* invalidate all TLB entries */ · line 147
Quoted 13 lines · Becky.bruce at freescale.com
include/asm-ppc/mmu.h +0
-0@@ -141,6 +141,10 @@ extern void _tlbia(void); /* invalidate allTLB entries */
typedef enum { IBAT0 = 0, IBAT1, IBAT2, IBAT3, DBAT0, DBAT1, DBAT2, DBAT3include/asm-ppc/mmu.h +4
-0+#ifdef CONFIG_HIGH_BATS + , IBAT4, IBAT5, IBAT6, IBAT7, + DBAT4, DBAT5, DBAT6, DBAT7 +#endif C allows trailing commas on such lists; no need to move it inside the ifdef.
Quoted 6 lines
Quoted 4 lines
Dangling commas bother me in the extreme. If this is the concensus, I'll move it, but I prefer it where it is.
-B
+1 for moving. Dangling commas is the second best thing in C. ;-)
+1 for moving. Dangling commas is the second best thing in C. ;-)
Best Regards,
J.
PATCH v2 2/4 PPC: Change lib_ppc/bat_rw.c to use high bats
Quoted 22 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 21 lines · Jerry Van Baren
Quoted 20 lines · Becky Bruce
Quoted 18 lines · Scott Wood
include/asm-ppc/mmu.h extern void _tlbia(void); /* invalidate all TLB entries */ · line 147
Quoted 13 lines · Becky.bruce at freescale.com
include/asm-ppc/mmu.h +0
-0@@ -141,6 +141,10 @@ extern void _tlbia(void); /* invalidate allTLB entries */
typedef enum { IBAT0 = 0, IBAT1, IBAT2, IBAT3, DBAT0, DBAT1, DBAT2, DBAT3include/asm-ppc/mmu.h +4
-0+#ifdef CONFIG_HIGH_BATS + , IBAT4, IBAT5, IBAT6, IBAT7, + DBAT4, DBAT5, DBAT6, DBAT7 +#endif C allows trailing commas on such lists; no need to move it inside the
ifdef.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Dangling commas bother me in the extreme. If this is the concensus, I'll move it, but I prefer it where it is.
-B
+1 for moving. Dangling commas is the second best thing in C. ;-)
+1 for moving. Dangling commas is the second best thing in C. ;-)
I also want to know what's the first best thing! I have to guess that the dangling comma is really the fifteenth-best thing, or something..... but I don't want this thread to degenerate into a holy war.
Ayway, point taken, and I'll move it. But I don't have to like it :)
Cheers,
B
PATCH v2 2/4 PPC: Change lib_ppc/bat_rw.c to use high bats
In reply to Jerry Van BarenQuoted 9 lines · Jerry Van Baren
Quoted 7 lines
Quoted 2 lines
C allows trailing commas on such lists; no need to move it inside the ifdef.
Dangling commas bother me in the extreme. If this is the concensus, I'll move it, but I prefer it where it is.
-B
+1 for moving. Dangling commas is the second best thing in C. ;-)
Now I'm curious. :) And what's supposed to be "the best thing in C"?
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
PATCH v2 2/4 PPC: Change lib_ppc/bat_rw.c to use high bats
Quoted 6 lines · Stefan Roese
Quoted 5 lines · Jerry Van Baren
Quoted 5 lines
Quoted 2 lines
C allows trailing commas on such lists; no need to move it inside the ifdef.
Dangling commas bother me in the extreme. If this is the concensus, I'll move it, but I prefer it where it is.
Quoted 7 lines
Quoted 2 lines
Quoted 1 line
-B
+1 for moving. Dangling commas is the second best thing in C. ;-)
Now I'm curious. :) And what's supposed to be "the best thing in C"?
Best regards,
Stefan
I figured everybody has a favorite feature of C, so by claiming *second best*, I wouldn't have to argue with everybody that it was the best. :-D
Great conversation starter too, I use it in the bar all the time. ;-)
As Calvin says, "I try to make everyone's day a little more surreal." The Essential Calvin and Hobbes, p152-3
<http://www.calvin-and-hobbes.org/information/quotes>
gvb
PATCH v2 2/4 PPC: Change lib_ppc/bat_rw.c to use high bats
In reply to Becky BruceQuoted 13 lines · In message <[email protected]> you wrote:
Quoted 12 lines
include/asm-ppc/mmu.h extern void _tlbia(void); /* invalidate all TLB entries */ · line 147
Quoted 9 lines
TLB entries */
typedef enum { IBAT0 = 0, IBAT1, IBAT2, IBAT3, DBAT0, DBAT1, DBAT2, DBAT3include/asm-ppc/mmu.h +4
-0+#ifdef CONFIG_HIGH_BATS + , IBAT4, IBAT5, IBAT6, IBAT7, + DBAT4, DBAT5, DBAT6, DBAT7 +#endif C allows trailing commas on such lists; no need to move it inside the ifdef.
Quoted 2 lines
Dangling commas bother me in the extreme. If this is the concensus, I'll move it, but I prefer it where it is.
Please move it. As is it looks irregular and ugly to me.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Q: What do you get when you cross an ethernet with an income statement? A: A local area networth.