[ dropped my Nokia address from the CC list, since I'm not working for Nokia
anymore ]
On Tue, May 24, 2011 at 09:58:48AM -0400, Dave Anderson wrote:
BTW, I await any patches from the ARM folks to set these bits
appropriately. Currently there is this for ARM in defs.h:
#ifdef ARM
... [ cut ] ...
#define _SECTION_SIZE_BITS 28
#define _MAX_PHYSMEM_BITS 32
#endif /* ARM */
Yet you state above that you're using 22 for _SECTION_SIZE_BITS.
This varies between different SoCs and it is not used by others. Since it is
not stored in a crashdump IIRC, we really cannot set that value dynamically.
So I see two options:
1) leave it as is and make crash to complain when it detects such
situation or
2) guess the values and try to do the right thing (TM)
My preference goes with 2) provided that we can get it working on majority of
the ARM SoCs.
We could try to stick with _SECTION_SIZE_BITS=28, as it seems to be largest
currently used section size amongst different ARM SoCs, and hope that it works
with others where this is smaller.
Jan, Takuo: maybe you could try whether following patch works? I don't have
any hardware which use SPARSEMEM so I'm unable to test it.
Regards,
MW
diff --git a/arm.c b/arm.c
index 0347166..9d4afcc 100644
--- a/arm.c
+++ b/arm.c
@@ -260,6 +260,9 @@ arm_init(int when)
STRUCT_EXISTS("pteval_t"))
machdep->flags |= PGTABLE_V2;
+ machdep->section_size_bits = _SECTION_SIZE_BITS;
+ machdep->max_physmem_bits = _MAX_PHYSMEM_BITS;
+
if (symbol_exists("irq_desc"))
ARRAY_LENGTH_INIT(machdep->nr_irqs, irq_desc,
"irq_desc", NULL, 0);