Hi Michael/Aneesh,

Thanks for reviewing the patch..


On Friday 23 September 2016 04:40 PM, Michael Ellerman wrote:
Hari Bathini <hbath...@linux.vnet.ibm.com> writes:

diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h
index e2fb408..558987c 100644
--- a/arch/powerpc/include/asm/mmu.h
+++ b/arch/powerpc/include/asm/mmu.h
@@ -199,6 +199,21 @@ static inline void mmu_clear_feature(unsigned long feature)
extern unsigned int __start___mmu_ftr_fixup, __stop___mmu_ftr_fixup; +/*
+ * Possible MMU modes
+ */
+#define MMU_MODE_NONE           0
+#define MMU_MODE_RADIX          1
+#define MMU_MODE_HASH           2
+#define MMU_MODE_HASH32         3
+#define MMU_MODE_NOHASH         4
+#define MMU_MODE_NOHASH32       5
These are already defined in the same file:

/*
  * MMU families
  */
#define MMU_FTR_HPTE_TABLE              ASM_CONST(0x00000001)
#define MMU_FTR_TYPE_8xx                ASM_CONST(0x00000002)
#define MMU_FTR_TYPE_40x                ASM_CONST(0x00000004)
#define MMU_FTR_TYPE_44x                ASM_CONST(0x00000008)
#define MMU_FTR_TYPE_FSL_E              ASM_CONST(0x00000010)
#define MMU_FTR_TYPE_47x                ASM_CONST(0x00000020)
#define MMU_FTR_TYPE_RADIX              ASM_CONST(0x00000040)

And the values for the current CPU are in cur_cpu_spec->mmu_features.

I primarily tried to introduce this patch as crash tool doesn't have access to
offset info (which is needed to access structure member mmu_features) early
in it's initialization process.

So if you must export anything, make it that value, and hopefully the
rest of the patch goes away.

On second thought, as long as we can get the vmemmap start address, for which we have a variable already, we can push finding of MMU type for later. I may need no kernel patch in that case. Working on patches for crash & makedumpfile tools
accordingly. Will post a v3 only if that doesn't work out..

Thanks
Hari

Reply via email to