Re: Fix BUG_ON() reporting in real mode on powerpc

2016-02-17 Thread Aneesh Kumar K.V
Balbir Singh 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

Re: Fix BUG_ON() reporting in real mode on powerpc

2016-02-17 Thread Balbir Singh
>> 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

Re: Fix BUG_ON() reporting in real mode on powerpc

2016-02-17 Thread Aneesh Kumar K.V
Balbir Singh writes: >> It might be a little better to do this: >> >> bugaddr = regs->nip; >> if (REGION_ID(bugaddr) == 0 && !(regs->msr & MSR_IR)) >> bugaddr += PAGE_OFFSET; >> >> It is possible to execute from addresses with the 0xc000... on top

Re: Fix BUG_ON() reporting in real mode on powerpc

2016-02-17 Thread Anshuman Khandual
On 02/17/2016 12:46 PM, Balbir Singh wrote: >> > It might be a little better to do this: >> > >> >bugaddr = regs->nip; >> >if (REGION_ID(bugaddr) == 0 && !(regs->msr & MSR_IR)) >> >bugaddr += PAGE_OFFSET; >> > >> > It is possible to execute from address

Re: Fix BUG_ON() reporting in real mode on powerpc

2016-02-17 Thread Paul Mackerras
On Wed, Feb 17, 2016 at 01:33:32PM +0530, Anshuman Khandual wrote: > On 02/17/2016 12:46 PM, Balbir Singh wrote: > >> > It might be a little better to do this: > >> > > >> > bugaddr = regs->nip; > >> > if (REGION_ID(bugaddr) == 0 && !(regs->msr & MSR_IR)) > >> >

Re: Fix BUG_ON() reporting in real mode on powerpc

2016-02-16 Thread Balbir Singh
> It might be a little better to do this: > > bugaddr = regs->nip; > if (REGION_ID(bugaddr) == 0 && !(regs->msr & MSR_IR)) > bugaddr += PAGE_OFFSET; > > It is possible to execute from addresses with the 0xc000... on top in > real mode, because th

Re: Fix BUG_ON() reporting in real mode on powerpc

2016-02-16 Thread Paul Mackerras
On Wed, Feb 17, 2016 at 03:43:11PM +1100, Balbir Singh wrote: > From: Balbir Singh > > 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 mo

Fix BUG_ON() reporting in real mode on powerpc

2016-02-16 Thread Balbir Singh
From: Balbir Singh 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 Sug