Fix BUG_ON() reporting in real mode on powerpc
Aneesh Kumar K.V
aneesh.kumar at linux.vnet.ibm.com
Thu Feb 18 13:41:19 AEDT 2016
Balbir Singh <bsingharora at gmail.com> writes:
>>> Changelog:
>>> Don't add PAGE_OFFSET blindly, check if REGION_ID is 0
>>>
>>> I ran into this issue while debugging an early boot problem.
>>> The system hit a BUG_ON() but report bug failed to print the
>>> line number and file name. The reason being that the system
>>> was running in real mode and report_bug() searches for
>>> addresses in the PAGE_OFFSET+ region
>>>
>>> Suggested-by: Paul Mackerras <paulus at samba.org>
>>> Signed-off-by: Balbir Singh <bsingharora at gmail.com>
>
> <snip>
>
>> Can we add some comments around this. When i looked at this first, i was
>> wondering how nip can be in user region. But then realized that what we
>> are checking here is kernel address used in real mode. The use of
>> REGION_ID eventhough simpler is confusing. Hence adding the comment with
>> details Paul mentioned in email will help.
>>
>>
> I've tried and covered it in the changelog, I thought a code comment
> would make sense for the very non obvious cases and not repeat what
> the code does as comment
>
The use of REGION_ID indicate that you are checking for region. Hence
the suggestion. Looking at this again, I suggest we should add a new
macro or will have to open code it. Because in the radix series we make
REGION_ID a hash config thing and this is generic stuff.
-aneesh
More information about the Linuxppc-dev
mailing list