MIPS: Enable ARCH_HAS_DEBUG_VIRTUAL for 64-bit
RFC 1/1 MIPS: Enable ARCH_HAS_DEBUG_VIRTUAL for 64-bit
Update __debug_virt_addr_valid() to check for a virtual address' validity below CKSSEG and remove the !64BIT dependency on ARCH_HAS_DEBUG_VIRTUAL to make DEBUG_VIRTUAL selectable.
Signed-off-by Florian Fainelli <[email protected]>
---
This requires the previous patch to be applied for this to work cleanly.
arch/mips/Kconfig | 2 +- arch/mips/mm/physaddr.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-)
arch/mips/Kconfig +1 -1
@@ -5,7 +5,7 @@ config MIPS select ARCH_32BIT_OFF_T if !64BIT select ARCH_BINFMT_ELF_STATE if MIPS_FP_SUPPORT select ARCH_HAS_CURRENT_STACK_POINTER if !CC_IS_CLANG || CLANG_VERSION >= 140000 - select ARCH_HAS_DEBUG_VIRTUAL if !64BIT + select ARCH_HAS_DEBUG_VIRTUAL select ARCH_HAS_FORTIFY_SOURCE select ARCH_HAS_KCOV select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE if !EVA
arch/mips/mm/physaddr.c +4 -0
@@ -31,7 +31,11 @@ static inline bool __debug_virt_addr_valid(unsigned long x)if (x ==MAX_DMA_ADDRESS )return true; +#ifdef CONFIG_64BIT +return KSEGX (x) <CKSSEG ; +#else return KSEGX (x) <KSEG2 ; +#endif }phys_addr_t __virt_to_phys (volatile const void *x)
Signature · 1 line
2.25.1
Thomas Bogendoerfer
maintainerQuoted 30 lines · Florian Fainelli
Update
__debug_virt_addr_valid()to check for a virtual address' validity below CKSSEG and remove the !64BIT dependency onARCH_HAS_DEBUG_VIRTUALto makeDEBUG_VIRTUALselectable.Signed-off-by Florian Fainelli <[email protected]>---
This requires the previous patch to be applied for this to work cleanly.arch/mips/Kconfig | 2 +- arch/mips/mm/physaddr.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-)arch/mips/Kconfig +1
-1@@ -5,7 +5,7 @@ config MIPS select ARCH_32BIT_OFF_T if !64BIT select ARCH_BINFMT_ELF_STATE if MIPS_FP_SUPPORT select ARCH_HAS_CURRENT_STACK_POINTER if !CC_IS_CLANG || CLANG_VERSION >= 140000 - select ARCH_HAS_DEBUG_VIRTUAL if !64BIT + select ARCH_HAS_DEBUG_VIRTUAL select ARCH_HAS_FORTIFY_SOURCE select ARCH_HAS_KCOV select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE if !EVAarch/mips/mm/physaddr.c +0
-0
arch/mips/mm/physaddr.c static inline bool __debug_virt_addr_valid(unsigned long x) · line 35
Quoted 5 lines
arch/mips/mm/physaddr.c +2
-0@@ -31,7 +31,11 @@ static inline bool __debug_virt_addr_valid(unsigned long x)if (x ==MAX_DMA_ADDRESS )return true; +#ifdef CONFIG_64BIT +return KSEGX (x) <CKSSEG ;
as KSEGX does 32bit casts, I have some doubts that this is correct. What do I miss ?
Thomas.
Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]