Igor Grobman | 2 Dec 2004 17:59
Picon
Favicon

Re: power4 performance counters

Anton,
Thanks for the oprofile and 970 Book IV pointers.  They proved very
useful.

On Tue, 30 Nov 2004, Anton Blanchard wrote:

>
>
> Let me know if you get stuck. Just out of interest, are you planning to
> work on one of the performance counter packages (eg pmapi, perfctr)

I am working on a kernel instrumentation/profiling tool called kerninst.
I mentioned it on this list before.  Basically, we provide a mechanism to
place code snippets in any arbitrary point, while the kernel is running
(no recompile/reboot is needed).  I am looking to provide primitives for
using performance counters inside the instrumentation.  Hence, my
question.

See http://www.paradyn.org/html/kerninst.html.  ppc64 release is coming
real soon now.

-Igor
Milton Miller | 3 Dec 2004 06:46
Favicon

Re: PPC64: EEH Recovery (Revised)

Well, I was going to suggest you allocate the bars in the cnode that 
you use to save the device tree
with, in the function eeh_save_bars.   Then I realized that 
eeh_save_bars doesn't do anything
except walk the tree allocating nodes, finding matching pci devices to 
read and copy pci_dev->
is_bridge.  The actuall save was done at eeh_late_init. Which means 
eeh_save_bars is misnamed.

You walk the list in recursive decent, creating a node each time you 
go.   You restore the
bars in the same recursive decent order, only instead of walking 
device_node you walk the
tree that you saved.   Why can you not just alloate a struct list and a 
"is_bridge" field,
do the same walk adding to the end of the list in save then restore by 
walking the list
forwards with list_for_each_safe ?   See, the restore code just became 
linear.

milton
Andreas Schwab | 4 Dec 2004 17:34
Picon

2.6.10-rc3 does not boot on PowerMac

The 2.6.10-rc3 kernel does not boot on PowerMac G5, the last thing I see
is "smp_core99_kick_cpu done".  Any idea where I should start looking?

Andreas.

--

-- 
Andreas Schwab, SuSE Labs, schwab <at> suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Anton Blanchard | 4 Dec 2004 19:20
Picon
Favicon

Re: 2.6.10-rc3 does not boot on PowerMac


> The 2.6.10-rc3 kernel does not boot on PowerMac G5, the last thing I see
> is "smp_core99_kick_cpu done".  Any idea where I should start looking?

At a guess, does backing out this patch help?

Anton

--

From: Olof Johansson <olof <at> austin.ibm.com>

Below patch changes the early CPU spinup code to be based on physical
CPU ID instead of logical. This will make it possible to kexec off of
a different cpu than 0, for example after it's been hot-unplugged.

The booted cpu will still be mapped as logical cpu 0, since there's
various stuff in the early boot that assumes logical boot cpuid is 0.

Also, it expands the kexec boot param structure to allow the booted
physical cpuid to be passed in. This includes bumping the version number
to 2 for backwards compat.

Signed-off-by: Olof Johansson <olof <at> austin.ibm.com>
Signed-off-by: Anton Blanchard <anton <at> samba.org>

diff -puN arch/ppc64/kernel/asm-offsets.c~boot-cpuid arch/ppc64/kernel/asm-offsets.c
--- linux-2.5/arch/ppc64/kernel/asm-offsets.c~boot-cpuid	2004-11-16 12:41:26.546908234 -0600
+++ linux-2.5-olof/arch/ppc64/kernel/asm-offsets.c	2004-11-16 13:24:49.372405523 -0600
 <at>  <at>  -103,6 +103,7  <at>  <at>  int main(void)
(Continue reading)

Andreas Schwab | 4 Dec 2004 22:24
Picon

Re: 2.6.10-rc3 does not boot on PowerMac

Anton Blanchard <anton <at> samba.org> writes:

>> The 2.6.10-rc3 kernel does not boot on PowerMac G5, the last thing I see
>> is "smp_core99_kick_cpu done".  Any idea where I should start looking?
>
> At a guess, does backing out this patch help?

It's actually something completely different.  The system boots all right,
but there is no framebuffer console at all (X is working fine).  The
problem seems to be the recent pci cleanups.  The offb driver wants to
reserve 98004000-98183fff, but there is no matching pci resource.

2.6.9:
90000000-9fffffff : /pci <at> 0,f0000000
  90000000-9001ffff : 0000:f0:10.0
  91000000-91ffffff : 0000:f0:10.0
  98000000-9fffffff : 0000:f0:10.0
    98004000-98183fff : offb

2.6.10-rc3:
90000000-9fffffff : /pci <at> 0,f0000000
  90000000-97ffffff : 0000:f0:10.0
  98000000-9801ffff : 0000:f0:10.0

Andreas.

--

-- 
Andreas Schwab, SuSE Labs, schwab <at> suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
(Continue reading)

Benjamin Herrenschmidt | 5 Dec 2004 05:23

Re: 2.6.10-rc3 does not boot on PowerMac

On Sat, 2004-12-04 at 22:24 +0100, Andreas Schwab wrote:
> Anton Blanchard <anton <at> samba.org> writes:
> 
> >> The 2.6.10-rc3 kernel does not boot on PowerMac G5, the last thing I see
> >> is "smp_core99_kick_cpu done".  Any idea where I should start looking?
> >
> > At a guess, does backing out this patch help?
> 
> It's actually something completely different.  The system boots all right,
> but there is no framebuffer console at all (X is working fine).  The
> problem seems to be the recent pci cleanups.  The offb driver wants to
> reserve 98004000-98183fff, but there is no matching pci resource.
> 
> 2.6.9:
> 90000000-9fffffff : /pci <at> 0,f0000000
>   90000000-9001ffff : 0000:f0:10.0
>   91000000-91ffffff : 0000:f0:10.0
>   98000000-9fffffff : 0000:f0:10.0
>     98004000-98183fff : offb
> 
> 2.6.10-rc3:
> 90000000-9fffffff : /pci <at> 0,f0000000
>   90000000-97ffffff : 0000:f0:10.0
>   98000000-9801ffff : 0000:f0:10.0

That is very strange ... it looks like the video card is beeing remapped
to a different location than where it was initially. Can you send me the
dmesg log ? Is this an nvidia or an ATI card ? Does either rivafb or
radeonfb work ?

(Continue reading)

Andreas Schwab | 5 Dec 2004 16:56
Picon

Re: 2.6.10-rc3 does not boot on PowerMac

Benjamin Herrenschmidt <benh <at> kernel.crashing.org> writes:

> That is very strange ... it looks like the video card is beeing remapped
> to a different location than where it was initially. Can you send me the
> dmesg log ? Is this an nvidia or an ATI card ? Does either rivafb or
> radeonfb work ?

It's an nvidia card, but it is not supported by rivafb (pci id 10de:0321).
I have attached /proc/iomem and dmesg output for both 2.6.9 and 2.6.10-rc3.

Andreas.

--

-- 
Andreas Schwab, SuSE Labs, schwab <at> suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
trying to initialize btext ...
Starting Linux PPC64 2.6.9
-----------------------------------------------------
naca                          = 0xc000000000004000
naca->pftSize                 = 0x19
naca->debug_switch            = 0x0
naca->interrupt_controller    = 0x1
systemcfg                     = 0xc000000000005000
systemcfg->processorCount     = 0x2
systemcfg->physicalMemorySize = 0x50000000
systemcfg->dCacheL1LineSize   = 0x80
(Continue reading)

Andreas Schwab | 5 Dec 2004 17:36
Picon

Re: 2.6.10-rc3 does not boot on PowerMac

Andreas Schwab <schwab <at> suse.de> writes:

> Benjamin Herrenschmidt <benh <at> kernel.crashing.org> writes:
>
>> That is very strange ... it looks like the video card is beeing remapped
>> to a different location than where it was initially. Can you send me the
>> dmesg log ? Is this an nvidia or an ATI card ? Does either rivafb or
>> radeonfb work ?
>
> It's an nvidia card, but it is not supported by rivafb (pci id 10de:0321).

When I add this id to the list in riva/fbdev.c I get a mangled display,
but at least the driver finds the framebuffer memory.

    90000000-97ffffff : rivafb
    f1000000-f1ffffff : rivafb

rivafb: nVidia device/chipset 10DE0321
rivafb: Detected CRTC controller 0 being used
rivafb: disabling acceleration
rivafb: setting virtual Y resolution to 52428
Console: switching to colour frame buffer device 160x64
rivafb: PCI nVidia NV32 framebuffer ver 0.9.5b (64MB  <at>  0x90000000)

Andreas.

--

-- 
Andreas Schwab, SuSE Labs, schwab <at> suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
(Continue reading)

Felix Domke | 5 Dec 2004 19:29

G5 iMac .config

I tried to compile a kernel with the iMac-patches posted by J. Mayer, 
but my kernel doesn't boot. My kernel is 2.6.10-rc2, the patches applied 
  cleanly. The kernel from the gentoo livecd ("imacg5") works well, but 
i can't find the corresponding .config file anywhere.

The last message is

"DO-QUIESCE finishedreturning from prom_init".

I guess my kernel is just not configured in the right way. Can anybody 
send me a working .config to work on from or tell me what important 
things there are to check for?

thanks,
Felix
Benjamin Herrenschmidt | 5 Dec 2004 21:44

Re: 2.6.10-rc3 does not boot on PowerMac

On Sun, 2004-12-05 at 16:56 +0100, Andreas Schwab wrote:
> Benjamin Herrenschmidt <benh <at> kernel.crashing.org> writes:
> 
> > That is very strange ... it looks like the video card is beeing remapped
> > to a different location than where it was initially. Can you send me the
> > dmesg log ? Is this an nvidia or an ATI card ? Does either rivafb or
> > radeonfb work ?
> 
> It's an nvidia card, but it is not supported by rivafb (pci id 10de:0321).
> I have attached /proc/iomem and dmesg output for both 2.6.9 and 2.6.10-rc3.

The dmesg doesn't contain anything useful apparently. For some reason,
the nVidia card is getting moved around by the PCI code it seems (lspci
-vv would probably show you that it gets re-assigned a different
location).

It's absolutely bad if the kernel starts doing that to cards that are
already located to valid addresses. The MacIO (K2) chip itself for
example is a PCI device and must _never_ be moved around or the kernel
will die right away.

It would be useful to enable some PCI debugging to figure out what's
going on there.

Ben.

Gmane