[Crash-utility] [PATCH v4 2/4] [ppc] Support for platform based Virtual address translation

Suzuki K. Poulose suzuki at in.ibm.com
Tue Feb 21 06:14:12 UTC 2012


On 02/21/2012 07:01 AM, Toshikazu Nakayama wrote:
> (2012/02/20 20:06), Suzuki K. Poulose wrote:
[...]
>> + * Find the platform of the crashing system and set the
>> + * base_platform accordingly.
>> + */
>> +void
>> +ppc_probe_base_platform(void)
>> +{
>> +	probe_func_t probe;
>> +	char platform_name[MAX_PLATFORM_LEN];
>> +	ulong ptr;
>> +	int i;
>> +
>> +	if(!try_get_symbol_data("powerpc_base_platform", sizeof(ulong),&ptr) ||
>> +		read_string(ptr, platform_name, MAX_PLATFORM_LEN - 1) == 0)
>> +		/* Let us fallback to default definitions */
>> +		platform_name[0] = '\0';
> 
> Could you give some fallback message at PLATFORM: via 'mach' command
> like "undetectable" or any good phrase?

Yep, makes sense. I will make it '(unknown)'.


>>
>>    	*paddr = PAGEBASE(pte) + PAGEOFFSET(vaddr);
>> @@ -623,7 +709,7 @@ ppc_get_task_pgd(ulong task)
>>     *  If a physaddr pointer is passed in, don't print anything.
>>     */
>>    static int
>> -ppc_translate_pte(ulong pte, void *physaddr, ulonglong unused)
>> +ppc_translate_pte(ulong unused, void *physaddr, ulonglong pte)
> 
> This change may gives impacts for existing machdep->translate_pte() users
> whose external modules are possible to call with legacy prototype
> machdep->translate_pte(pte, physaddr, unused) for 32bit pte.
> A "unused" should be used for extended 64bit pte support in addition to
> first 32bit pte support.
> 
> I think it is better for everyone to mark machdep->flags with PAE at PATCH3/4.
> Maybe PAE is named for x86 but there are no differences in terms of flag
> handling.
> 
> Then declare ppc_translate_pte(ulong pte32, void *physaddr, ulonglong pte64)
> so that ppc_pgd_vtop() can call with ppc_translate_pte((ulong)pte, NULL, pte)
> and external users can also select similar way.

Makes sense. I will respin this with the changes. Thank you very much for the
suggestions.

Suzuki




More information about the Crash-utility mailing list