Skip to contentSkip to conversation

Octeon: Several misc fixes

PATCH New Yang Shi 3 participants 10 messages Mar 3, 2010 – Mar 11, 2010 MIPS

lore
Share & tools
lore

Yang Shi

author
#0 lore raw

PATCH v2 1/1 Octeon: Several misc fixes

Hi David & Ralf,

These are some misc build fixes for Octeon.

Fixed two spelling errors against the first version.

Yang Shi (3):
MIPS: Octeon: Remove superfluous on_each_cpu parameter
MIPS: Octeon: Remove redundant declaration of octeon_reserve32_memory
MIPS: Octeon: Add add_wired_entry decralation in header file

Thanks,
Yang

author
#1 lore raw

PATCH 1/3 MIPS: Octeon: Remove superfluous on_each_cpu parameter

Now, on_each_cpu just need three parameters, but the on_each_cpu still uses four parameters in Octeon's setup.c. So, remove the superfluous parameter.

---
 arch/mips/cavium-octeon/setup.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/mips/cavium-octeon/setup.c +1 -1
index b321d3b..4eaa35f 100644
@@ -230,7 +230,7 @@ static void octeon_hal_setup_per_cpu_reserved32(void *unused)
 void octeon_hal_setup_reserved32(void)
 {
 #ifdef CONFIG_CAVIUM_RESERVE32_USE_WIRED_TLB
-	on_each_cpu(octeon_hal_setup_per_cpu_reserved32, NULL, 0, 1);
+	on_each_cpu(octeon_hal_setup_per_cpu_reserved32, NULL, 1);
 #endif
 }
 
Signature · 1 line
1.6.3.3
author
#2 lore raw

PATCH 2/3 MIPS: Octeon: Remove redundant declaration of octeon_reserve32_memory

In Octeon's setup.c, octeon_reserve32_memory is defined, so remove the redundant extern declaration of this variable.

---
 arch/mips/cavium-octeon/setup.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
arch/mips/cavium-octeon/setup.c +0 -3
index 4eaa35f..8309d68 100644
@@ -45,9 +45,6 @@ extern struct plat_smp_ops octeon_smp_ops;
 extern void pci_console_init(const char *arg);
 #endif
 
-#ifdef CONFIG_CAVIUM_RESERVE32
-extern uint64_t octeon_reserve32_memory;
-#endif
 static unsigned long long MAX_MEMORY = 512ull << 20;
 
 struct octeon_boot_descriptor *octeon_boot_desc_ptr;
Signature · 1 line
1.6.3.3
author
#3 lore raw

PATCH 3/3 MIPS: Octeon: Add add_wired_entry decralation in header file

Octeon's setup.c uses add_wired_entry, but it is not declared anywhere. Copy add_wired_entry decralation from pgtable-32.h to pgtable-64.h and include asm/pgtable.h into Octeon's setup.c.

---
 arch/mips/cavium-octeon/setup.c    |    1 +
 arch/mips/include/asm/pgtable-64.h |    6 ++++++
 2 files changed, 7 insertions(+), 0 deletions(-)
arch/mips/cavium-octeon/setup.c +1 -0
index 8309d68..d63b8e6 100644
@@ -30,6 +30,7 @@
 #include <asm/bootinfo.h>
 #include <asm/sections.h>
 #include <asm/time.h>
+#include <asm/pgtable.h>
 
 #include <asm/octeon/octeon.h>
 
arch/mips/include/asm/pgtable-64.h +6 -0
index 26dc69d..85ee34d 100644
@@ -23,6 +23,12 @@
 #endif
 
 /*
+ * - add_wired_entry() add a fixed TLB entry, and move wired register
+ */
+extern void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
+			       unsigned long entryhi, unsigned long pagemask);
+
+/*
  * Each address space has 2 4K pages as its page directory, giving 1024
  * (== PTRS_PER_PGD) 8 byte pointers to pmd tables. Each pmd table is a
  * single 4K page, giving 512 (== PTRS_PER_PMD) 8 byte pointers to page
Signature · 1 line
1.6.3.3
#4 lore raw

Re: [PATCH 3/3] MIPS: Octeon: Add add_wired_entry decralation in header file

Quoted 5 lines · Yang Shi

Octeon's setup.c uses add_wired_entry, but it is not declared anywhere. Copy add_wired_entry decralation from pgtable-32.h to pgtable-64.h and include asm/pgtable.h into Octeon's setup.c.

NAK!

We are removing the use of add_wired_entry(), so adding a declaration will not be necessary.

David Daney

Quoted 34 lines
---
  arch/mips/cavium-octeon/setup.c    |    1 +
  arch/mips/include/asm/pgtable-64.h |    6 ++++++
  2 files changed, 7 insertions(+), 0 deletions(-)
arch/mips/cavium-octeon/setup.c +1 -0
index 8309d68..d63b8e6 100644
@@ -30,6 +30,7 @@
  #include<asm/bootinfo.h>
  #include<asm/sections.h>
  #include<asm/time.h>
+#include<asm/pgtable.h>
 
  #include<asm/octeon/octeon.h>
 
arch/mips/include/asm/pgtable-64.h +6 -0
index 26dc69d..85ee34d 100644
@@ -23,6 +23,12 @@
  #endif
 
  /*
+ * - add_wired_entry() add a fixed TLB entry, and move wired register
+ */
+extern void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
+			       unsigned long entryhi, unsigned long pagemask);
+
+/*
   * Each address space has 2 4K pages as its page directory, giving 1024
   * (== PTRS_PER_PGD) 8 byte pointers to pmd tables. Each pmd table is a
   * single 4K page, giving 512 (== PTRS_PER_PMD) 8 byte pointers to page
#5 lore raw

Re: [PATCH 3/3] MIPS: Octeon: Add add_wired_entry decralation in header file

Quoted 11 lines · David Daney
Quoted 5 lines · Yang Shi

Octeon's setup.c uses add_wired_entry, but it is not declared anywhere. Copy add_wired_entry decralation from pgtable-32.h to pgtable-64.h and include asm/pgtable.h into Octeon's setup.c.

NAK!

We are removing the use of add_wired_entry(), so adding a declaration will not be necessary.

For explanation - add_wired_entry is a horrible API; it requires the user to have knowledge about the TLB structure, code differently for 32-bit and 64-bit kernels. It's just the API of terror.

Ralf

Acked-by on v1 2/3
#6 lore raw

Re: [PATCH 2/3] MIPS: Octeon: Remove redundant declaration of octeon_reserve32_memory

In reply to Yang Shi
Quoted 4 lines · Yang Shi

In Octeon's setup.c, octeon_reserve32_memory is defined, so remove the redundant extern declaration of this variable.

This looks good to me. Thanks,
David Daney

Quoted 18 lines
---
  arch/mips/cavium-octeon/setup.c |    3 ---
  1 files changed, 0 insertions(+), 3 deletions(-)
arch/mips/cavium-octeon/setup.c +0 -3
index 4eaa35f..8309d68 100644
@@ -45,9 +45,6 @@ extern struct plat_smp_ops octeon_smp_ops;
  extern void pci_console_init(const char *arg);
  #endif
 
-#ifdef CONFIG_CAVIUM_RESERVE32
-extern uint64_t octeon_reserve32_memory;
-#endif
  static unsigned long long MAX_MEMORY = 512ull<<  20;
 
  struct octeon_boot_descriptor *octeon_boot_desc_ptr;
Applied
#7 lore raw

Re: [PATCH 2/3] MIPS: Octeon: Remove redundant declaration of octeon_reserve32_memory

Quoted 10 lines · David Daney
Quoted 4 lines · Yang Shi

In Octeon's setup.c, octeon_reserve32_memory is defined, so remove the redundant extern declaration of this variable.

This looks good to me. Thanks,
David Daney

Applied, thanks.

Ralf

#8 lore raw

Re: [PATCH 1/3] MIPS: Octeon: Remove superfluous on_each_cpu parameter

In reply to Yang Shi
Quoted 5 lines · Yang Shi

Now, on_each_cpu just need three parameters, but the on_each_cpu still uses four parameters in Octeon's setup.c. So, remove the superfluous parameter.

NAK! We are removing CONFIG_CAVIUM_RESERVE32_USE_WIRED_TLB completely.

I will send the removal patch soon.

David Daney

Quoted 17 lines
---
  arch/mips/cavium-octeon/setup.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
arch/mips/cavium-octeon/setup.c +1 -1
index b321d3b..4eaa35f 100644
@@ -230,7 +230,7 @@ static void octeon_hal_setup_per_cpu_reserved32(void *unused)
  void octeon_hal_setup_reserved32(void)
  {
  #ifdef CONFIG_CAVIUM_RESERVE32_USE_WIRED_TLB
-	on_each_cpu(octeon_hal_setup_per_cpu_reserved32, NULL, 0, 1);
+	on_each_cpu(octeon_hal_setup_per_cpu_reserved32, NULL, 1);
  #endif
  }
 
author
#9 lore raw

Re: [PATCH 1/3] MIPS: Octeon: Remove superfluous on_each_cpu parameter

Quoted 6 lines · David Daney
Quoted 4 lines · Yang Shi

Now, on_each_cpu just need three parameters, but the on_each_cpu still uses four parameters in Octeon's setup.c. So, remove the superfluous parameter.

Quoted 8 lines
Quoted 2 lines

NAK! We are removing CONFIG_CAVIUM_RESERVE32_USE_WIRED_TLB completely.

I will send the removal patch soon.

Thanks David. Will apply your patch to remove WIRED_TLB.

Regards,
Yang

Quoted 24 lines

David Daney

Quoted 18 lines
---
  arch/mips/cavium-octeon/setup.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
arch/mips/cavium-octeon/setup.c +1 -1
index b321d3b..4eaa35f 100644
@@ -230,7 +230,7 @@ static void octeon_hal_setup_per_cpu_reserved32(void *unused)
  void octeon_hal_setup_reserved32(void)
  {
  #ifdef CONFIG_CAVIUM_RESERVE32_USE_WIRED_TLB
-	on_each_cpu(octeon_hal_setup_per_cpu_reserved32, NULL, 0, 1);
+	on_each_cpu(octeon_hal_setup_per_cpu_reserved32, NULL, 1);
  #endif
  }