FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 05-24-2011, 06:53 PM
Mika Westerberg
 
Default ARM support for CONFIG_SPARSEMEM: (was DD image)

[ 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);

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 05-25-2011, 06:07 AM
"Karlsson, Jan"
 
Default ARM support for CONFIG_SPARSEMEM: (was DD image)

Hi Mika,

The patch you give below is equal to the code I have been running for the last half year. I did not supply this as a patch, as I did not know how to set _MAX_PHYSMEM_BITS. I just tried a few values until everything seemed to work.

Jan

-----Original Message-----
From: crash-utility-bounces@redhat.com [mailto:crash-utility-bounces@redhat.com] On Behalf Of Mika Westerberg
Sent: tisdag den 24 maj 2011 20:54
To: Discussion list for crash utility usage, maintenance and development
Cc: amer4554@gmail.com
Subject: Re: [Crash-utility] ARM support for CONFIG_SPARSEMEM: (was Re: DD image)

[ 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);

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 

Thread Tools




All times are GMT. The time now is 10:15 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org