linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Booting 2.6.29-rc3 on mpc8661d_hpcn failing
@ 2009-01-30 12:31 Martyn Welch
  2009-01-30 13:17 ` Martyn Welch
  2009-01-30 14:42 ` Kumar Gala
  0 siblings, 2 replies; 16+ messages in thread
From: Martyn Welch @ 2009-01-30 12:31 UTC (permalink / raw)
  To: linuxppc-dev list

Hi Guys,

It seems that 2.6.29-rc3 is not booting on the MPC8641 HPCN. I have just updated u-boot to the latest git to see if that improved matters, however I get stuck at the following. Any ideas?

Using MPC86xx HPCN machine description                                          
Total memory = 1024MB; using 2048kB for hash table (at cf400000)                
Linux version 2.6.29-rc3-00014-g4cd6797 (welchma@ubuntu8041) (gcc version 4.1.29
Found initrd at 0xcf783000:0xcfe8ab7e                                           
CPU maps initialized for 1 thread per core                                      
console [udbg0] enabled                                                         
setup_arch: bootmem                                                             
mpc86xx_hpcn_setup_arch()                                                       
Found FSL PCI host bridge at 0x00000000ffe08000. Firmware bus number: 0->2      
PCI host bridge /pcie@ffe08000 (primary) ranges:                                
 MEM 0x0000000080000000..0x000000009fffffff -> 0x0000000080000000               
  IO 0x00000000ffc00000..0x00000000ffc0ffff -> 0x0000000000000000               
Found FSL PCI host bridge at 0x00000000ffe09000. Firmware bus number: 0->0      
PCI host bridge /pcie@ffe09000  ranges:                                         
 MEM 0x00000000a0000000..0x00000000bfffffff -> 0x00000000a0000000               
  IO 0x00000000ffc10000..0x00000000ffc1ffff -> 0x0000000000000000               
MPC86xx HPCN board from Freescale Semiconductor                                 
arch: exit                                                                      
Zone PFN ranges:                                                                
  DMA      0x00000000 -> 0x00030000                                             
  Normal   0x00030000 -> 0x00030000                                             
  HighMem  0x00030000 -> 0x00040000                                             
Movable zone start PFN for each node                                            
early_node_map[1] active PFN ranges                                             
    0: 0x00000000 -> 0x00040000                                                 
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260096     
Kernel command line:                                                            
mpic: Setting up MPIC " MPIC     " version 1.2 at ffe40000, max 2 CPUs          
mpic: ISU size: 256, shift: 8, mask: ff                                         
mpic: Initializing for 256 sources                                              
i8259 legacy interrupt controller initialized                                   
PID hash table entries: 4096 (order: 12, 16384 bytes)                           
clocksource: timebase mult[2800000] shift[22] registered                        
Console: colour dummy device 80x25                                              
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)                
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)                  
Memory: 1023696k/1048576k available (4968k kernel code, 23968k reserved, 160k d)
SLUB: Genslabs=12, HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1         
Calibrating delay loop... 199.68 BogoMIPS (lpj=99840)                           
Mount-cache hash table entries: 512                                             
mpic: requesting IPIs ...                                                       
Processor 1 found.                                                              


Martyn
-- 
Martyn Welch MEng MPhil MIET (Principal Software Engineer)   T:+44(0)1327322748
GE Fanuc Intelligent Platforms Ltd,        |Registered in England and Wales
Tove Valley Business Park, Towcester,      |(3828642) at 100 Barbirolli Square,
Northants, NN12 6PF, UK T:+44(0)1327359444 |Manchester,M2 3AB  VAT:GB 729849476

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Booting 2.6.29-rc3 on mpc8661d_hpcn failing
  2009-01-30 12:31 Booting 2.6.29-rc3 on mpc8661d_hpcn failing Martyn Welch
@ 2009-01-30 13:17 ` Martyn Welch
  2009-01-30 14:42 ` Kumar Gala
  1 sibling, 0 replies; 16+ messages in thread
From: Martyn Welch @ 2009-01-30 13:17 UTC (permalink / raw)
  To: linuxppc-dev list

Martyn Welch wrote:
> Hi Guys,
> 
> It seems that 2.6.29-rc3 is not booting on the MPC8641 HPCN. I have just 
> updated u-boot to the latest git to see if that improved matters, 
> however I get stuck at the following. Any ideas?
> 

Gah! That lost it's formatting some how, sorry.

I have just tried 2.6.29-rc2 and I get the same.

Martyn


-- 
Martyn Welch MEng MPhil MIET (Principal Software Engineer)   T:+44(0)1327322748
GE Fanuc Intelligent Platforms Ltd,        |Registered in England and Wales
Tove Valley Business Park, Towcester,      |(3828642) at 100 Barbirolli Square,
Northants, NN12 6PF, UK T:+44(0)1327359444 |Manchester,M2 3AB  VAT:GB 729849476

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Booting 2.6.29-rc3 on mpc8661d_hpcn failing
  2009-01-30 12:31 Booting 2.6.29-rc3 on mpc8661d_hpcn failing Martyn Welch
  2009-01-30 13:17 ` Martyn Welch
@ 2009-01-30 14:42 ` Kumar Gala
  2009-01-30 16:47   ` Becky Bruce
  1 sibling, 1 reply; 16+ messages in thread
From: Kumar Gala @ 2009-01-30 14:42 UTC (permalink / raw)
  To: Martyn Welch; +Cc: linuxppc-dev list


On Jan 30, 2009, at 6:31 AM, Martyn Welch wrote:

> Hi Guys,
>
> It seems that 2.6.29-rc3 is not booting on the MPC8641 HPCN. I have  
> just updated u-boot to the latest git to see if that improved  
> matters, however I get stuck at the following. Any ideas?

did you update your .dtb as well?

- k

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Booting 2.6.29-rc3 on mpc8661d_hpcn failing
  2009-01-30 14:42 ` Kumar Gala
@ 2009-01-30 16:47   ` Becky Bruce
  2009-02-02  9:36     ` Martyn Welch
  0 siblings, 1 reply; 16+ messages in thread
From: Becky Bruce @ 2009-01-30 16:47 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev list, Martyn Welch


On Jan 30, 2009, at 8:42 AM, Kumar Gala wrote:

>
> On Jan 30, 2009, at 6:31 AM, Martyn Welch wrote:
>
>> Hi Guys,
>>
>> It seems that 2.6.29-rc3 is not booting on the MPC8641 HPCN. I have  
>> just updated u-boot to the latest git to see if that improved  
>> matters, however I get stuck at the following. Any ideas?
>
> did you update your .dtb as well?

We've changed the memory map for that board in the latest u-boot,  
which is why you need a new .dtb.  If this still failing, let me know,  
and I'll give it a try on my board and see what's up since this is  
probably my fault :)

Cheers,
B

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Booting 2.6.29-rc3 on mpc8661d_hpcn failing
  2009-01-30 16:47   ` Becky Bruce
@ 2009-02-02  9:36     ` Martyn Welch
  2009-02-02 15:45       ` Kumar Gala
  0 siblings, 1 reply; 16+ messages in thread
From: Martyn Welch @ 2009-02-02  9:36 UTC (permalink / raw)
  To: Becky Bruce; +Cc: linuxppc-dev list

Becky Bruce wrote:
> 
> On Jan 30, 2009, at 8:42 AM, Kumar Gala wrote:
> 
>>
>> On Jan 30, 2009, at 6:31 AM, Martyn Welch wrote:
>>
>>> Hi Guys,
>>>
>>> It seems that 2.6.29-rc3 is not booting on the MPC8641 HPCN. I have 
>>> just updated u-boot to the latest git to see if that improved 
>>> matters, however I get stuck at the following. Any ideas?
>>
>> did you update your .dtb as well?

Yup, just double checked it. SOC mapped at ffe00000. If I use the wrong DTB I don't get any serial output...

> 
> We've changed the memory map for that board in the latest u-boot, which 
> is why you need a new .dtb.  If this still failing, let me know, and 
> I'll give it a try on my board and see what's up since this is probably 
> my fault :)
> 

It appears the same problem is affecting our sbc610 as well, the location of the SOC hasn't changed on that board.

Martyn


-- 
Martyn Welch MEng MPhil MIET (Principal Software Engineer)   T:+44(0)1327322748
GE Fanuc Intelligent Platforms Ltd,        |Registered in England and Wales
Tove Valley Business Park, Towcester,      |(3828642) at 100 Barbirolli Square,
Northants, NN12 6PF, UK T:+44(0)1327359444 |Manchester,M2 3AB  VAT:GB 729849476

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Booting 2.6.29-rc3 on mpc8661d_hpcn failing
  2009-02-02  9:36     ` Martyn Welch
@ 2009-02-02 15:45       ` Kumar Gala
  2009-02-02 16:00         ` Martyn Welch
  0 siblings, 1 reply; 16+ messages in thread
From: Kumar Gala @ 2009-02-02 15:45 UTC (permalink / raw)
  To: Martyn Welch; +Cc: linuxppc-dev list


On Feb 2, 2009, at 3:36 AM, Martyn Welch wrote:

> Becky Bruce wrote:
>> On Jan 30, 2009, at 8:42 AM, Kumar Gala wrote:
>>>
>>> On Jan 30, 2009, at 6:31 AM, Martyn Welch wrote:
>>>
>>>> Hi Guys,
>>>>
>>>> It seems that 2.6.29-rc3 is not booting on the MPC8641 HPCN. I  
>>>> have just updated u-boot to the latest git to see if that  
>>>> improved matters, however I get stuck at the following. Any ideas?
>>>
>>> did you update your .dtb as well?
>
> Yup, just double checked it. SOC mapped at ffe00000. If I use the  
> wrong DTB I don't get any serial output...
>
>> We've changed the memory map for that board in the latest u-boot,  
>> which is why you need a new .dtb.  If this still failing, let me  
>> know, and I'll give it a try on my board and see what's up since  
>> this is probably my fault :)
>
> It appears the same problem is affecting our sbc610 as well, the  
> location of the SOC hasn't changed on that board.
>
> Martyn

Hm.. maybe try a git-bisect between 2.6.28 and 2.6.29-rc3?

- k

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Booting 2.6.29-rc3 on mpc8661d_hpcn failing
  2009-02-02 15:45       ` Kumar Gala
@ 2009-02-02 16:00         ` Martyn Welch
  2009-02-02 16:11           ` Kumar Gala
  0 siblings, 1 reply; 16+ messages in thread
From: Martyn Welch @ 2009-02-02 16:00 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev list

Kumar Gala wrote:
> 
> On Feb 2, 2009, at 3:36 AM, Martyn Welch wrote:
> 
>> Becky Bruce wrote:
>>> On Jan 30, 2009, at 8:42 AM, Kumar Gala wrote:
>>>>
>>>> On Jan 30, 2009, at 6:31 AM, Martyn Welch wrote:
>>>>
>>>>> Hi Guys,
>>>>>
>>>>> It seems that 2.6.29-rc3 is not booting on the MPC8641 HPCN. I have 
>>>>> just updated u-boot to the latest git to see if that improved 
>>>>> matters, however I get stuck at the following. Any ideas?
>>>>
>>>> did you update your .dtb as well?
>>
>> Yup, just double checked it. SOC mapped at ffe00000. If I use the 
>> wrong DTB I don't get any serial output...
>>
>>> We've changed the memory map for that board in the latest u-boot, 
>>> which is why you need a new .dtb.  If this still failing, let me 
>>> know, and I'll give it a try on my board and see what's up since this 
>>> is probably my fault :)
>>
>> It appears the same problem is affecting our sbc610 as well, the 
>> location of the SOC hasn't changed on that board.
>>
>> Martyn
> 
> Hm.. maybe try a git-bisect between 2.6.28 and 2.6.29-rc3?
> 

That's was today's "little" task. I was just in the process of writing an email :-)

It got me to the following commit:

commit 64b3d0e8122b422e879b23d42f9e0e8efbbf9744
Author: Benjamin Herrenschmidt <benh@kernel.crashing.org>

    powerpc/mm: Rework usage of _PAGE_COHERENT/NO_CACHE/GUARDED

I tried reverting it, but as I had kinda thought, that really didn't help.

I'm just recompiling to check that I didn't screw-up during the bisection.

Martyn

-- 
Martyn Welch MEng MPhil MIET (Principal Software Engineer)   T:+44(0)1327322748
GE Fanuc Intelligent Platforms Ltd,        |Registered in England and Wales
Tove Valley Business Park, Towcester,      |(3828642) at 100 Barbirolli Square,
Northants, NN12 6PF, UK T:+44(0)1327359444 |Manchester,M2 3AB  VAT:GB 729849476

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Booting 2.6.29-rc3 on mpc8661d_hpcn failing
  2009-02-02 16:00         ` Martyn Welch
@ 2009-02-02 16:11           ` Kumar Gala
  2009-02-02 16:20             ` Martyn Welch
  0 siblings, 1 reply; 16+ messages in thread
From: Kumar Gala @ 2009-02-02 16:11 UTC (permalink / raw)
  To: Martyn Welch; +Cc: linuxppc-dev list


On Feb 2, 2009, at 10:00 AM, Martyn Welch wrote:

> Kumar Gala wrote:
>> On Feb 2, 2009, at 3:36 AM, Martyn Welch wrote:
>>> Becky Bruce wrote:
>>>> On Jan 30, 2009, at 8:42 AM, Kumar Gala wrote:
>>>>>
>>>>> On Jan 30, 2009, at 6:31 AM, Martyn Welch wrote:
>>>>>
>>>>>> Hi Guys,
>>>>>>
>>>>>> It seems that 2.6.29-rc3 is not booting on the MPC8641 HPCN. I  
>>>>>> have just updated u-boot to the latest git to see if that  
>>>>>> improved matters, however I get stuck at the following. Any  
>>>>>> ideas?
>>>>>
>>>>> did you update your .dtb as well?
>>>
>>> Yup, just double checked it. SOC mapped at ffe00000. If I use the  
>>> wrong DTB I don't get any serial output...
>>>
>>>> We've changed the memory map for that board in the latest u-boot,  
>>>> which is why you need a new .dtb.  If this still failing, let me  
>>>> know, and I'll give it a try on my board and see what's up since  
>>>> this is probably my fault :)
>>>
>>> It appears the same problem is affecting our sbc610 as well, the  
>>> location of the SOC hasn't changed on that board.
>>>
>>> Martyn
>> Hm.. maybe try a git-bisect between 2.6.28 and 2.6.29-rc3?
>
> That's was today's "little" task. I was just in the process of  
> writing an email :-)
>
> It got me to the following commit:
>
> commit 64b3d0e8122b422e879b23d42f9e0e8efbbf9744
> Author: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>
>   powerpc/mm: Rework usage of _PAGE_COHERENT/NO_CACHE/GUARDED
>
> I tried reverting it, but as I had kinda thought, that really didn't  
> help.
>
> I'm just recompiling to check that I didn't screw-up during the  
> bisection.

Hmm.

take a look at this thread.

http://ozlabs.org/pipermail/linuxppc-dev/2009-January/067437.html

- k

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Booting 2.6.29-rc3 on mpc8661d_hpcn failing
  2009-02-02 16:11           ` Kumar Gala
@ 2009-02-02 16:20             ` Martyn Welch
  2009-02-02 20:49               ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 16+ messages in thread
From: Martyn Welch @ 2009-02-02 16:20 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev list

Kumar Gala wrote:
> 
> On Feb 2, 2009, at 10:00 AM, Martyn Welch wrote:
> 
>> Kumar Gala wrote:
>>> On Feb 2, 2009, at 3:36 AM, Martyn Welch wrote:
>>>> Becky Bruce wrote:
>>>>> On Jan 30, 2009, at 8:42 AM, Kumar Gala wrote:
>>>>>>
>>>>>> On Jan 30, 2009, at 6:31 AM, Martyn Welch wrote:
>>>>>>
>>>>>>> Hi Guys,
>>>>>>>
>>>>>>> It seems that 2.6.29-rc3 is not booting on the MPC8641 HPCN. I 
>>>>>>> have just updated u-boot to the latest git to see if that 
>>>>>>> improved matters, however I get stuck at the following. Any ideas?
>>>>>>
>>>>>> did you update your .dtb as well?
>>>>
>>>> Yup, just double checked it. SOC mapped at ffe00000. If I use the 
>>>> wrong DTB I don't get any serial output...
>>>>
>>>>> We've changed the memory map for that board in the latest u-boot, 
>>>>> which is why you need a new .dtb.  If this still failing, let me 
>>>>> know, and I'll give it a try on my board and see what's up since 
>>>>> this is probably my fault :)
>>>>
>>>> It appears the same problem is affecting our sbc610 as well, the 
>>>> location of the SOC hasn't changed on that board.
>>>>
>>>> Martyn
>>> Hm.. maybe try a git-bisect between 2.6.28 and 2.6.29-rc3?
>>
>> That's was today's "little" task. I was just in the process of writing 
>> an email :-)
>>
>> It got me to the following commit:
>>
>> commit 64b3d0e8122b422e879b23d42f9e0e8efbbf9744
>> Author: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>>
>>   powerpc/mm: Rework usage of _PAGE_COHERENT/NO_CACHE/GUARDED
>>
>> I tried reverting it, but as I had kinda thought, that really didn't 
>> help.
>>
>> I'm just recompiling to check that I didn't screw-up during the 
>> bisection.
> 

Nope, didn't screw-up...

> Hmm.
> 
> take a look at this thread.
> 
> http://ozlabs.org/pipermail/linuxppc-dev/2009-January/067437.html
> 

...and that confirms that this issue has well and truly left this newbies comfort zone ;-)

Martyn

-- 
Martyn Welch MEng MPhil MIET (Principal Software Engineer)   T:+44(0)1327322748
GE Fanuc Intelligent Platforms Ltd,        |Registered in England and Wales
Tove Valley Business Park, Towcester,      |(3828642) at 100 Barbirolli Square,
Northants, NN12 6PF, UK T:+44(0)1327359444 |Manchester,M2 3AB  VAT:GB 729849476

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Booting 2.6.29-rc3 on mpc8661d_hpcn failing
  2009-02-02 16:20             ` Martyn Welch
@ 2009-02-02 20:49               ` Benjamin Herrenschmidt
  2009-02-03 12:22                 ` Martyn Welch
  0 siblings, 1 reply; 16+ messages in thread
From: Benjamin Herrenschmidt @ 2009-02-02 20:49 UTC (permalink / raw)
  To: Martyn Welch; +Cc: linuxppc-dev list


> >> commit 64b3d0e8122b422e879b23d42f9e0e8efbbf9744
> >> Author: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> >>
> >>   powerpc/mm: Rework usage of _PAGE_COHERENT/NO_CACHE/GUARDED
> >>
> >> I tried reverting it, but as I had kinda thought, that really didn't 
> >> help.
> >>
> >> I'm just recompiling to check that I didn't screw-up during the 
> >> bisection.
> > 

Is this a chip that must not have M set ? Or something else ? You guys
have to help if you CC me, I have about 0 idea what a MPC8661d is :-)

Also, does 4c456a67f501b8b15542c7c21c28812bf88f484b help ?
> 
Cheers,
Ben.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Booting 2.6.29-rc3 on mpc8661d_hpcn failing
  2009-02-02 20:49               ` Benjamin Herrenschmidt
@ 2009-02-03 12:22                 ` Martyn Welch
  2009-02-03 15:50                   ` Martyn Welch
  0 siblings, 1 reply; 16+ messages in thread
From: Martyn Welch @ 2009-02-03 12:22 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list

Benjamin Herrenschmidt wrote:
>>>> commit 64b3d0e8122b422e879b23d42f9e0e8efbbf9744
>>>> Author: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>>>>
>>>>   powerpc/mm: Rework usage of _PAGE_COHERENT/NO_CACHE/GUARDED
>>>>
>>>> I tried reverting it, but as I had kinda thought, that really didn't 
>>>> help.
>>>>
>>>> I'm just recompiling to check that I didn't screw-up during the 
>>>> bisection.
> 
> Is this a chip that must not have M set ? Or something else ? You guys
> have to help if you CC me, I have about 0 idea what a MPC8661d is :-)
> 

Sorry, my fault. It's a Freescale SOC with two e600 cores. Beyond that, I'm afraid I'm a little out of my depth. 

> Also, does 4c456a67f501b8b15542c7c21c28812bf88f484b help ?

I believe that to be included in 2.6.29-rc3 if my (rather rudimentary) git skills haven't let me down? The problem persists in 2.6.29-rc3.

Martyn

-- 
Martyn Welch MEng MPhil MIET (Principal Software Engineer)   T:+44(0)1327322748
GE Fanuc Intelligent Platforms Ltd,        |Registered in England and Wales
Tove Valley Business Park, Towcester,      |(3828642) at 100 Barbirolli Square,
Northants, NN12 6PF, UK T:+44(0)1327359444 |Manchester,M2 3AB  VAT:GB 729849476

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Booting 2.6.29-rc3 on mpc8661d_hpcn failing
  2009-02-03 12:22                 ` Martyn Welch
@ 2009-02-03 15:50                   ` Martyn Welch
  2009-02-04  0:47                     ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 16+ messages in thread
From: Martyn Welch @ 2009-02-03 15:50 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list

Martyn Welch wrote:
> Benjamin Herrenschmidt wrote:
>>>>> commit 64b3d0e8122b422e879b23d42f9e0e8efbbf9744
>>>>> Author: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>>>>>
>>>>>   powerpc/mm: Rework usage of _PAGE_COHERENT/NO_CACHE/GUARDED
>>>>>
>>>>> I tried reverting it, but as I had kinda thought, that really 
>>>>> didn't help.
>>>>>
>>>>> I'm just recompiling to check that I didn't screw-up during the 
>>>>> bisection.
>>
>> Is this a chip that must not have M set ? Or something else ? You guys
>> have to help if you CC me, I have about 0 idea what a MPC8661d is :-)
>>
> 
> Sorry, my fault. It's a Freescale SOC with two e600 cores. Beyond that, 
> I'm afraid I'm a little out of my depth.
>> Also, does 4c456a67f501b8b15542c7c21c28812bf88f484b help ?
> 
> I believe that to be included in 2.6.29-rc3 if my (rather rudimentary) 
> git skills haven't let me down? The problem persists in 2.6.29-rc3.
> 

I've done a bit more investigation:

The primary CPU is spinning in smp_generic_give_timebase() waiting for "!tbsync->ack". The secondary CPU has made it into smp_generic_take_timebase() and has apparently (according to some printk's I put in there) set "tbsync->ack=1". After that I don't get any printk's, I guess that the one I have put in the "!tbsync->handshake" while loop is making it to the print buffer, but with both processors spinning it's not getting to the serial console.

At a guess, given that commit 64b3d0e8122b422e879b23d42f9e0e8efbbf9744 seems to be the point that it stopped working correctly, that "tbsync" is now somehow becoming cached?

Martyn

-- 
Martyn Welch MEng MPhil MIET (Principal Software Engineer)   T:+44(0)1327322748
GE Fanuc Intelligent Platforms Ltd,        |Registered in England and Wales
Tove Valley Business Park, Towcester,      |(3828642) at 100 Barbirolli Square,
Northants, NN12 6PF, UK T:+44(0)1327359444 |Manchester,M2 3AB  VAT:GB 729849476

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Booting 2.6.29-rc3 on mpc8661d_hpcn failing
  2009-02-03 15:50                   ` Martyn Welch
@ 2009-02-04  0:47                     ` Benjamin Herrenschmidt
  2009-02-04 12:22                       ` Martyn Welch
  0 siblings, 1 reply; 16+ messages in thread
From: Benjamin Herrenschmidt @ 2009-02-04  0:47 UTC (permalink / raw)
  To: Martyn Welch; +Cc: linuxppc-dev list

On Tue, 2009-02-03 at 15:50 +0000, Martyn Welch wrote:
> 
> The primary CPU is spinning in smp_generic_give_timebase() waiting for
> "!tbsync->ack". The secondary CPU has made it into
> smp_generic_take_timebase() and has apparently (according to some
> printk's I put in there) set "tbsync->ack=1". After that I don't get
> any printk's, I guess that the one I have put in the "!
> tbsync->handshake" while loop is making it to the print buffer, but
> with both processors spinning it's not getting to the serial console.
> 
> At a guess, given that commit 64b3d0e8122b422e879b23d42f9e0e8efbbf9744
> seems to be the point that it stopped working correctly, that "tbsync"
> is now somehow becoming cached?
> 
Maybe we are missing the M bit in the mapping ?

Let's see... the kernel mapping is done via BATs on those guys (ie, e600
is a hash table based processor right ? some kind of 74xx). The code
that sets them up is in

arch/powerpc/mm/ppc_mmu_32.c

In mmu_mapin_ram() we call setbat() multiple times. The last argument is
the "flags" which is set to _PAGE_RAM. That should contain
_PAGE_COHERENT when CONFIG_SMP is set unless I screwed up. IE. _PAGE_RAM
is _PAGE_KERNEL | _PAGE_HWEXEC. _PAGE_KERNEL is _PAGE_BASE plus things,
and _PAGE_BASE should contains _PAGE_COHERENT if CONFIG_SMP or
CONFIG_PPC_STD_MMU are set and they should both be in your case.

setbat() itself will clear _PAGE_COHERENT under some circumstances
however. Either if the flags contain _PAGE_NO_CACHE, which should not be
the case here, or if the CPU feature bit CPU_FTR_NEED_COHERENT is -not-
set. I think that could be the cause of the problem.

CPU_FTR_NEED_COHERENT is set as part of CPU_FTR_COMMON if CONFIG_SMP
is set (among other things). So it -should- be set for you. since
CPU_FTR_COMMON should be OR'ed with all CPU table entries.

So I'm a bit at a loss here... unless something else went wrong.

Please let me know what you find out.

Cheers,
Ben.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Booting 2.6.29-rc3 on mpc8661d_hpcn failing
  2009-02-04  0:47                     ` Benjamin Herrenschmidt
@ 2009-02-04 12:22                       ` Martyn Welch
  2009-02-10 15:40                         ` Kumar Gala
  0 siblings, 1 reply; 16+ messages in thread
From: Martyn Welch @ 2009-02-04 12:22 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list

On Wed, 2009-02-04 at 11:47 +1100, Benjamin Herrenschmidt wrote:
> On Tue, 2009-02-03 at 15:50 +0000, Martyn Welch wrote:
> > 
> > The primary CPU is spinning in smp_generic_give_timebase() waiting for
> > "!tbsync->ack". The secondary CPU has made it into
> > smp_generic_take_timebase() and has apparently (according to some
> > printk's I put in there) set "tbsync->ack=1". After that I don't get
> > any printk's, I guess that the one I have put in the "!
> > tbsync->handshake" while loop is making it to the print buffer, but
> > with both processors spinning it's not getting to the serial console.
> > 
> > At a guess, given that commit 64b3d0e8122b422e879b23d42f9e0e8efbbf9744
> > seems to be the point that it stopped working correctly, that "tbsync"
> > is now somehow becoming cached?
> > 
> Maybe we are missing the M bit in the mapping ?
> 
> Let's see... the kernel mapping is done via BATs on those guys (ie, e600
> is a hash table based processor right ? some kind of 74xx). The code
> that sets them up is in
> 
> arch/powerpc/mm/ppc_mmu_32.c
> 
> In mmu_mapin_ram() we call setbat() multiple times. The last argument is
> the "flags" which is set to _PAGE_RAM. That should contain
> _PAGE_COHERENT when CONFIG_SMP is set unless I screwed up. IE. _PAGE_RAM
> is _PAGE_KERNEL | _PAGE_HWEXEC. _PAGE_KERNEL is _PAGE_BASE plus things,
> and _PAGE_BASE should contains _PAGE_COHERENT if CONFIG_SMP or
> CONFIG_PPC_STD_MMU are set and they should both be in your case.
> 
> setbat() itself will clear _PAGE_COHERENT under some circumstances
> however. Either if the flags contain _PAGE_NO_CACHE, which should not be
> the case here, or if the CPU feature bit CPU_FTR_NEED_COHERENT is -not-
> set. I think that could be the cause of the problem.
> 
> CPU_FTR_NEED_COHERENT is set as part of CPU_FTR_COMMON if CONFIG_SMP
> is set (among other things). So it -should- be set for you. since
> CPU_FTR_COMMON should be OR'ed with all CPU table entries.
> 
> So I'm a bit at a loss here... unless something else went wrong.
> 
> Please let me know what you find out.
> 
> Cheers,
> Ben.

I think it is indeed something else. I added the patch below which
resulted in the following lines in the kernel messages:

Set BAT 2 for 0x10000000 from phys:0x0 at virt:0xc0000000
Page coherency set
Set BAT 3 for 0x10000000 from phys:0x10000000 at virt:0xd0000000
Page coherency set
...
tbsync structure allocated at 0xef818360 for 0x48
tbsync happens to live at 0xc0515110
running happens to live at 0xc0515114

This suggests to me that whilst *tbsync and running are located within
RAM mapped by the BATs, the memory allocated for the tbsync structure is
not and is mapped via page tables. I guess this structure is then only
mapped correctly for the first core.

Martyn

-- 

diff --git a/arch/powerpc/kernel/smp-tbsync.c b/arch/powerpc/kernel/smp-tbsync.c
index a5e5452..fdeda20 100644
--- a/arch/powerpc/kernel/smp-tbsync.c
+++ b/arch/powerpc/kernel/smp-tbsync.c
@@ -117,6 +117,10 @@ void __devinit smp_generic_give_timebase(void)
 
        /* if this fails then this kernel won't work anyway... */
        tbsync = kzalloc( sizeof(*tbsync), GFP_KERNEL );
+       printk("tbsync structure allocated at 0x%p for 0x%x\n", tbsync, 
+               sizeof(*tbsync));
+       printk("tbsync happens to live at 0x%p\n", &tbsync);
+       printk("running happens to live at 0x%p\n", &running);
        mb();
        running = 1;
 
diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c
index fe65c40..2035cd6 100644
--- a/arch/powerpc/mm/ppc_mmu_32.c
+++ b/arch/powerpc/mm/ppc_mmu_32.c
@@ -123,6 +123,9 @@ void __init setbat(int index, unsigned long virt, phys_addr_
        int wimgxpp;
        struct ppc_bat *bat = BATS[index];
 
+       printk("Set BAT %d for 0x%x from phys:0x%lx at virt:0x%lx\n", index, 
+               size, phys, virt);
+
        if ((flags & _PAGE_NO_CACHE) ||
            (cpu_has_feature(CPU_FTR_NEED_COHERENT) == 0))
                flags &= ~_PAGE_COHERENT;
@@ -134,6 +137,11 @@ void __init setbat(int index, unsigned long virt, phys_addr
                wimgxpp = flags & (_PAGE_WRITETHRU | _PAGE_NO_CACHE
                                   | _PAGE_COHERENT | _PAGE_GUARDED);
                wimgxpp |= (flags & _PAGE_RW)? BPP_RW: BPP_RX;
+               if (wimgxpp & _PAGE_COHERENT) {
+                       printk("Page coherency set\n");
+               } else {
+                       printk("Page coherency cleared\n");
+               }
                bat[1].batu = virt | (bl << 2) | 2; /* Vs=1, Vp=0 */
                bat[1].batl = BAT_PHYS_ADDR(phys) | wimgxpp;
 #ifndef CONFIG_KGDB /* want user access for breakpoints */


-- 
Martyn Welch MEng MPhil MIET (Principal Software Engineer)   T:+44(0)1327322748
GE Fanuc Intelligent Platforms Ltd,        |Registered in England and Wales
Tove Valley Business Park, Towcester,      |(3828642) at 100 Barbirolli Square,
Northants, NN12 6PF, UK T:+44(0)1327359444 |Manchester,M2 3AB  VAT:GB 729849476

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: Booting 2.6.29-rc3 on mpc8661d_hpcn failing
  2009-02-04 12:22                       ` Martyn Welch
@ 2009-02-10 15:40                         ` Kumar Gala
  2009-02-10 20:58                           ` Kumar Gala
  0 siblings, 1 reply; 16+ messages in thread
From: Kumar Gala @ 2009-02-10 15:40 UTC (permalink / raw)
  To: Martyn Welch; +Cc: linuxppc-dev list

I might have missed this but what u-boot rev are you using?

- k

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Booting 2.6.29-rc3 on mpc8661d_hpcn failing
  2009-02-10 15:40                         ` Kumar Gala
@ 2009-02-10 20:58                           ` Kumar Gala
  0 siblings, 0 replies; 16+ messages in thread
From: Kumar Gala @ 2009-02-10 20:58 UTC (permalink / raw)
  To: Martyn Welch; +Cc: linuxppc-dev list

I've posted a patch that I believe should fix your issue.

- k

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2009-02-10 20:59 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-30 12:31 Booting 2.6.29-rc3 on mpc8661d_hpcn failing Martyn Welch
2009-01-30 13:17 ` Martyn Welch
2009-01-30 14:42 ` Kumar Gala
2009-01-30 16:47   ` Becky Bruce
2009-02-02  9:36     ` Martyn Welch
2009-02-02 15:45       ` Kumar Gala
2009-02-02 16:00         ` Martyn Welch
2009-02-02 16:11           ` Kumar Gala
2009-02-02 16:20             ` Martyn Welch
2009-02-02 20:49               ` Benjamin Herrenschmidt
2009-02-03 12:22                 ` Martyn Welch
2009-02-03 15:50                   ` Martyn Welch
2009-02-04  0:47                     ` Benjamin Herrenschmidt
2009-02-04 12:22                       ` Martyn Welch
2009-02-10 15:40                         ` Kumar Gala
2009-02-10 20:58                           ` Kumar Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).