Octeon: Several misc fixes
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
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
@@ -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
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
@@ -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
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
@@ -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
@@ -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
Re: [PATCH 1/3] MIPS: Octeon: Remove superfluous on_each_cpu parameter
In reply to Yang ShiQuoted 5 lines · Yang Shi
Now,
on_each_cpujust need three parameters, but theon_each_cpustill uses four parameters in Octeon'ssetup.c. So, remove the superfluous parameter.Signed-off-by Yang Shi<[email protected]>
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@@ -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 }
David Daney
NAKRe: [PATCH 3/3] MIPS: Octeon: Add add_wired_entry decralation in header file
In reply to Yang ShiQuoted 5 lines · Yang Shi
Octeon's
setup.cusesadd_wired_entry, but it is not declared anywhere. Copyadd_wired_entrydecralation frompgtable-32.htopgtable-64.hand includeasm/pgtable.hinto Octeon'ssetup.c.Signed-off-by Yang Shi<[email protected]>
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@@ -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@@ -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
Re: [PATCH 2/3] MIPS: Octeon: Remove redundant declaration of octeon_reserve32_memory
In reply to Yang ShiQuoted 4 lines · Yang Shi
In Octeon's
setup.c,octeon_reserve32_memoryis defined, so remove the redundant extern declaration of this variable.Signed-off-by Yang Shi<[email protected]>
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@@ -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;
Re: [PATCH 1/3] MIPS: Octeon: Remove superfluous on_each_cpu parameter
In reply to David DaneyQuoted 6 lines · David Daney
Quoted 4 lines · Yang Shi
Now,
on_each_cpujust need three parameters, but theon_each_cpustill uses four parameters in Octeon'ssetup.c. So, remove the superfluous parameter.
Quoted 8 lines
Quoted 2 lines
Signed-off-by Yang Shi<[email protected]>NAK! We are removing
CONFIG_CAVIUM_RESERVE32_USE_WIRED_TLBcompletely.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@@ -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 }
Re: [PATCH 3/3] MIPS: Octeon: Add add_wired_entry decralation in header file
In reply to David DaneyQuoted 11 lines · David Daney
Quoted 5 lines · Yang Shi
Octeon's
setup.cusesadd_wired_entry, but it is not declared anywhere. Copyadd_wired_entrydecralation frompgtable-32.htopgtable-64.hand includeasm/pgtable.hinto Octeon'ssetup.c.Signed-off-by Yang Shi<[email protected]>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
Ralf Baechle
AppliedRe: [PATCH 2/3] MIPS: Octeon: Remove redundant declaration of octeon_reserve32_memory
In reply to David DaneyQuoted 10 lines · David Daney
Quoted 4 lines · Yang Shi
In Octeon's
setup.c,octeon_reserve32_memoryis defined, so remove the redundant extern declaration of this variable.Signed-off-by Yang Shi<[email protected]>Acked-by David Daney <[email protected]>This looks good to me. Thanks,
David Daney
Applied, thanks.
Ralf