Re: nouveau regression on G5 Dual Core

2015-04-22 Thread Olaf Hering
On Mon, Mar 30, Olaf Hering wrote:

 On Sat, Mar 28, Olaf Hering wrote:
 
  On Sat, Mar 28, Olaf Hering wrote:
  
   I just updated the kernel from some 3.18 based state to 4.0-rc5+. The
  
  3.19 is already broken, will bisect next week.
 
 After a first run I was able to boot prior the first bad commit, which caused 
 a
 crash on boot.  Now I have to find the commit which actually allows boot 
 again,
 but with the white screen.
 
 Ben, was ad4a362635353f7ceb66f4038269770fee1025fa tested on a pmac?

c7e873f85fb60b1af589ac1b0c62353cfe0bbb29 fixed the crash, but not the
failure to read the ROM contents.

So what exactly did ad4a362635353f7ceb66f4038269770fee1025fa change?

A kernel build from ad4a362635353f7ceb66f4038269770fee1025fa plus the fix
c7e873f85fb60b1af589ac1b0c62353cfe0bbb29 gives this in dmesg:

[   29.621628] nouveau  [  DEVICE][:0a:00.0] BOOT0  : 0x043100a4
[   29.621635] nouveau  [  DEVICE][:0a:00.0] Chipset: NV43 (NV43)
[   29.621638] nouveau  [  DEVICE][:0a:00.0] Family : NV40
[   29.713302] nouveau  [   VBIOS][:0a:00.0] using image from PROM
[   29.713616] nouveau  [   VBIOS][:0a:00.0] version 00.00.00.00.00
[   29.713689] nouveau W[   VBIOS][:0a:00.0] DCB table not found
[   29.713698] nouveau W[   VBIOS][:0a:00.0] DCB table not found
[   29.713733] nouveau W[   VBIOS][:0a:00.0] 0x[ ]: init data not found
[   29.713783] u3msi: allocated virq 0x1a (hw 0x9) addr 0xf8004090
[   29.713808] nouveau  [ PMC][:0a:00.0] MSI interrupts enabled
[   29.713868] nouveau  [ PFB][:0a:00.0] RAM type: DDR1
[   29.713871] nouveau  [ PFB][:0a:00.0] RAM size: 256 MiB
[   29.713874] nouveau  [ PFB][:0a:00.0]ZCOMP: 378880 tags
[   29.740738] nouveau W[   VBIOS][:0a:00.0] DCB table not found
[   29.740746] nouveau W[   VBIOS][:0a:00.0] DCB table not found
[   29.740755] nouveau W[   VBIOS][:0a:00.0] DCB table not found
[   29.740760] nouveau W[   VBIOS][:0a:00.0] DCB table not found
[   29.740763] nouveau W[   VBIOS][:0a:00.0] DCB table not found
[   29.740767] nouveau  [  PTHERM][:0a:00.0] FAN control: none / external
[   29.740770] nouveau W[   VBIOS][:0a:00.0] DCB table not found
[   29.740773] nouveau W[   VBIOS][:0a:00.0] DCB table not found
[   29.740788] nouveau  [  PTHERM][:0a:00.0] internal sensor: no
[   29.760655] nouveau  [ CLK][:0a:00.0] --: core 300 MHz shader 300 
MHz memory 500 MHz
[   29.760722] nouveau W[   VBIOS][:0a:00.0] DCB table not found
[   29.760796] nouveau :0a:00.0: Using 32-bit DMA via iommu
[   29.760891] [TTM] Zone  kernel: Available graphics memory: 1003278 kiB
[   29.760894] [TTM] Initializing pool allocator
[   29.760928] nouveau  [ DRM] VRAM: 252 MiB
[   29.760931] nouveau  [ DRM] GART: 512 MiB
[   29.760959] [TTM] Finalizing pool allocator
[   29.760989] [TTM] Zone  kernel: Used memory at exit: 0 kiB
[   29.762856] insmod (775) used greatest stack depth: 6080 bytes left


I will see which commit leads to the failure that exists since v3.19-rc4.


Olaf


 root@g5:~/work/kernel/linux # git bisect log 
 git bisect start
 # good: [b2776bf7149bddd1f4161f14f79520f17fc1d71d] Linux 3.18
 git bisect good b2776bf7149bddd1f4161f14f79520f17fc1d71d
 # bad: [bfa76d49576599a4b9f9b7a71f23d73d6dcff735] Linux 3.19
 git bisect bad bfa76d49576599a4b9f9b7a71f23d73d6dcff735
 # good: [54850e73e86e3bc092680d1bdb84eb322f982ab1] zram: change parameter 
 from vaild_io_request()
 git bisect good 54850e73e86e3bc092680d1bdb84eb322f982ab1
 # bad: [dab363f938a53ddaee60bfecc1aebdbb3d3af5f0] Merge tag 
 'staging-3.19-rc1' of 
 git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
 git bisect bad dab363f938a53ddaee60bfecc1aebdbb3d3af5f0
 # good: [26178ec11ef3c6c814bf16a0a2b9c2f7242e3c64] x86: mm: consolidate 
 VM_FAULT_RETRY handling
 git bisect good 26178ec11ef3c6c814bf16a0a2b9c2f7242e3c64
 # good: [1b4bcf1fedbe7dcd98d9d35dfc947f033a398c4d] staging: comedi: 
 addi_tcw.h: provide generic defines for the ADDI-DATA TCW
 git bisect good 1b4bcf1fedbe7dcd98d9d35dfc947f033a398c4d
 # good: [030794a368946b98a8252d3172f5f2a1b0e4fb0e] drm/exynos: Fix DSI 
 resuming fail because power domain being off
 git bisect good 030794a368946b98a8252d3172f5f2a1b0e4fb0e
 # bad: [59ea90543f57a40827d7d1e528d657b8cc7161b1] drm/i915: Implement GPU 
 reset for 915/945
 git bisect bad 59ea90543f57a40827d7d1e528d657b8cc7161b1
 # bad: [37025602f6abc5919c7d5a8517bc7d6ea08acc57] drm/nouveau/platform: add 
 GPU speedo information to nouveau platform
 git bisect bad 37025602f6abc5919c7d5a8517bc7d6ea08acc57
 # good: [33f86ff62c4368c8d6bf3c76dc2fa416e3f90213] Merge branch 
 'amdkfd-next-3.19' of git://people.freedesktop.org/~gabbayo/linux into 
 drm-next
 git bisect good 33f86ff62c4368c8d6bf3c76dc2fa416e3f90213
 # bad: [1f89b4756fb83f385ac0e277b092774c01a5ab9c] drm/gm204/disp: initial 
 support
 git bisect bad 1f89b4756fb83f385ac0e277b092774c01a5ab9c
 # bad: [c2c2f6cb79141ca22f84c36887fd867373c35c4e] drm

Re: nouveau regression on G5 Dual Core

2015-04-22 Thread Olaf Hering
On Wed, Apr 22, Olaf Hering wrote:

 I will see which commit leads to the failure that exists since v3.19-rc4.

c2c2f6cb79141ca22f84c36887fd867373c35c4e +
c7e873f85fb60b1af589ac1b0c62353cfe0bbb29 leads to this output:

[   47.367618] nouveau  [  DEVICE][:0a:00.0] BOOT0  : 0x043100a4
[   47.367626] nouveau  [  DEVICE][:0a:00.0] Chipset: NV43 (NV43)
[   47.367629] nouveau  [  DEVICE][:0a:00.0] Family : NV40
[   47.367894] nouveau :0a:00.0: Invalid ROM contents
[   47.367929] nouveau ![   VBIOS][:0a:00.0] unable to locate usable image
[   47.367933] nouveau E[  DEVICE][:0a:00.0] failed to create 0x1001, 
-22
[   47.367937] nouveau E[ DRM] failed to create 0x0080, -22
[   47.368852] nouveau: probe of :0a:00.0 failed with error -22


And using the commit prior the breakage ad4a362^ (which is e897242) leads to
this output and a working console:

[   28.099484] nouveau  [  DEVICE][:0a:00.0] BOOT0  : 0x043100a4
[   28.099491] nouveau  [  DEVICE][:0a:00.0] Chipset: NV43 (NV43)
[   28.099494] nouveau  [  DEVICE][:0a:00.0] Family : NV40
[   28.099610] nouveau  [   VBIOS][:0a:00.0] checking OpenFirmware for 
image...
[   28.099636] nouveau  [   VBIOS][:0a:00.0] ... checksum invalid
[   28.099639] nouveau  [   VBIOS][:0a:00.0] checking PRAMIN for image...
[   28.099645] nouveau  [   VBIOS][:0a:00.0] ... signature not found
[   28.099648] nouveau  [   VBIOS][:0a:00.0] checking PROM for image...
[   28.191159] nouveau  [   VBIOS][:0a:00.0] ... signature not found
[   28.191162] nouveau  [   VBIOS][:0a:00.0] checking ACPI for image...
[   28.191166] nouveau  [   VBIOS][:0a:00.0] ... signature not found
[   28.191169] nouveau  [   VBIOS][:0a:00.0] checking PCIROM for image...
[   28.191207] nouveau :0a:00.0: Invalid ROM contents
[   28.191229] nouveau  [   VBIOS][:0a:00.0] ... signature not found
[   28.191232] nouveau  [   VBIOS][:0a:00.0] checking PLATFORM for image...
[   28.191236] nouveau  [   VBIOS][:0a:00.0] ... signature not found
[   28.191239] nouveau  [   VBIOS][:0a:00.0] using image from OpenFirmware
[   28.191279] nouveau  [   VBIOS][:0a:00.0] BIT signature found
[   28.191284] nouveau  [   VBIOS][:0a:00.0] version 05.43.02.75.00
[   28.191629] u3msi: allocated virq 0x1a (hw 0x9) addr 0xf8004090
[   28.191647] nouveau  [ PMC][:0a:00.0] MSI interrupts enabled
[   28.191705] nouveau  [ PFB][:0a:00.0] RAM type: DDR1
[   28.191708] nouveau  [ PFB][:0a:00.0] RAM size: 256 MiB
[   28.191711] nouveau  [ PFB][:0a:00.0]ZCOMP: 378880 tags
[   28.250490] nouveau  [  PTHERM][:0a:00.0] FAN control: toggle
[   28.250515] nouveau  [  PTHERM][:0a:00.0] internal sensor: no
[   28.270373] nouveau  [ CLK][:0a:00.0] 20: core 300 MHz shader 300 
MHz memory 500 MHz
[   28.270398] nouveau  [ CLK][:0a:00.0] --: core 300 MHz shader 300 
MHz memory 500 MHz
[   28.270556] nouveau :0a:00.0: Using 32-bit DMA via iommu
[   28.270649] [TTM] Zone  kernel: Available graphics memory: 1003278 kiB
[   28.270652] [TTM] Initializing pool allocator
[   28.270687] nouveau  [ DRM] VRAM: 252 MiB
[   28.270690] nouveau  [ DRM] GART: 512 MiB
[   28.270712] nouveau  [ DRM] TMDS table version 1.1
[   28.270716] nouveau  [ DRM] DCB version 3.0
[   28.270720] nouveau  [ DRM] DCB outp 00: 01000100 0028
[   28.270723] nouveau  [ DRM] DCB outp 01: 03000102 
[   28.270727] nouveau  [ DRM] DCB outp 02: 04011210 0028
[   28.270730] nouveau  [ DRM] DCB outp 03: 02111212 02000100
[   28.270733] nouveau  [ DRM] DCB outp 04: 02011211 0020c070
[   28.270736] nouveau  [ DRM] DCB conn 00: 1030
[   28.270740] nouveau  [ DRM] DCB conn 01: 2130
[   28.272297] nouveau  [ I2C][:0a:00.0] detected TMDS transmitter: 
sil164
[   28.277738] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[   28.277742] [drm] Driver supports precise vblank timestamp query.
[   28.277750] nouveau  [ DRM] 0x14C5: Parsing digital output script table
[   28.331954] nouveau  [ DRM] MM: using M2MF for buffer copies
[   28.331997] nouveau  [ DRM] Setting dpms mode 3 on TV encoder (output 4)
[   28.377539] nouveau  [ DRM] allocated 1920x1080 fb: 0x9000, bo 
c0007b911400
[   28.400310] nouveau  [ DRM] 0x14C5: Parsing digital output script table
[   28.450037] Console: switching to colour frame buffer device 240x67
[   28.451900] nouveau :0a:00.0: fb0: nouveaufb frame buffer device
[   28.451903] nouveau :0a:00.0: registered panic notifier
[   28.456097] [drm] Initialized nouveau 1.2.1 20120801 for :0a:00.0 on 
minor 0


Olaf
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v3 00/17] crypto: talitos - Add support for SEC1

2015-04-17 Thread Olaf Hering
On Fri, Apr 17, Christophe Leroy wrote:

 v3 is a complete rework of the patchset. Since a kernel can be built
 with support for both MPC82xx and MPC83xx at the same time, talitos
 driver shall support both SEC1 and SEC2+ at the same time.

The used git send-email command lacked the --thread option.

From this perspective: NACK to the whole series...

Olaf
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: nouveau regression on G5 Dual Core

2015-03-30 Thread Olaf Hering
On Sat, Mar 28, Olaf Hering wrote:

 On Sat, Mar 28, Olaf Hering wrote:
 
  I just updated the kernel from some 3.18 based state to 4.0-rc5+. The
 
 3.19 is already broken, will bisect next week.

After a first run I was able to boot prior the first bad commit, which caused a
crash on boot.  Now I have to find the commit which actually allows boot again,
but with the white screen.

Ben, was ad4a362635353f7ceb66f4038269770fee1025fa tested on a pmac?

Olaf

root@g5:~/work/kernel/linux # git bisect log 
git bisect start
# good: [b2776bf7149bddd1f4161f14f79520f17fc1d71d] Linux 3.18
git bisect good b2776bf7149bddd1f4161f14f79520f17fc1d71d
# bad: [bfa76d49576599a4b9f9b7a71f23d73d6dcff735] Linux 3.19
git bisect bad bfa76d49576599a4b9f9b7a71f23d73d6dcff735
# good: [54850e73e86e3bc092680d1bdb84eb322f982ab1] zram: change parameter from 
vaild_io_request()
git bisect good 54850e73e86e3bc092680d1bdb84eb322f982ab1
# bad: [dab363f938a53ddaee60bfecc1aebdbb3d3af5f0] Merge tag 'staging-3.19-rc1' 
of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
git bisect bad dab363f938a53ddaee60bfecc1aebdbb3d3af5f0
# good: [26178ec11ef3c6c814bf16a0a2b9c2f7242e3c64] x86: mm: consolidate 
VM_FAULT_RETRY handling
git bisect good 26178ec11ef3c6c814bf16a0a2b9c2f7242e3c64
# good: [1b4bcf1fedbe7dcd98d9d35dfc947f033a398c4d] staging: comedi: addi_tcw.h: 
provide generic defines for the ADDI-DATA TCW
git bisect good 1b4bcf1fedbe7dcd98d9d35dfc947f033a398c4d
# good: [030794a368946b98a8252d3172f5f2a1b0e4fb0e] drm/exynos: Fix DSI resuming 
fail because power domain being off
git bisect good 030794a368946b98a8252d3172f5f2a1b0e4fb0e
# bad: [59ea90543f57a40827d7d1e528d657b8cc7161b1] drm/i915: Implement GPU reset 
for 915/945
git bisect bad 59ea90543f57a40827d7d1e528d657b8cc7161b1
# bad: [37025602f6abc5919c7d5a8517bc7d6ea08acc57] drm/nouveau/platform: add GPU 
speedo information to nouveau platform
git bisect bad 37025602f6abc5919c7d5a8517bc7d6ea08acc57
# good: [33f86ff62c4368c8d6bf3c76dc2fa416e3f90213] Merge branch 
'amdkfd-next-3.19' of git://people.freedesktop.org/~gabbayo/linux into drm-next
git bisect good 33f86ff62c4368c8d6bf3c76dc2fa416e3f90213
# bad: [1f89b4756fb83f385ac0e277b092774c01a5ab9c] drm/gm204/disp: initial 
support
git bisect bad 1f89b4756fb83f385ac0e277b092774c01a5ab9c
# bad: [c2c2f6cb79141ca22f84c36887fd867373c35c4e] drm/nouveau/bios: fetch 
images beyond the first one in the rom
git bisect bad c2c2f6cb79141ca22f84c36887fd867373c35c4e
# good: [9c8af882bf1230bb85c1dbf67e0dde6888223ceb] drm: Add adv7511 encoder 
driver
git bisect good 9c8af882bf1230bb85c1dbf67e0dde6888223ceb
# good: [4894f6628e1ae04b2cc6222df692364c1ac1250f] drm/nouveau: a, somehow, 
missed hunk of fix regression on agp boards
git bisect good 4894f6628e1ae04b2cc6222df692364c1ac1250f
# bad: [ad4a362635353f7ceb66f4038269770fee1025fa] drm/nouveau/bios: split out 
shadow methods
git bisect bad ad4a362635353f7ceb66f4038269770fee1025fa
# good: [e8972421623cd10a12cc7343da029b58777fdd2f] drm/nouveau/bios: fix thinko 
when parsing extdev table
git bisect good e8972421623cd10a12cc7343da029b58777fdd2f
# first bad commit: [ad4a362635353f7ceb66f4038269770fee1025fa] 
drm/nouveau/bios: split out shadow methods

Olaf
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

nouveau regression on G5 Dual Core

2015-03-28 Thread Olaf Hering

I just updated the kernel from some 3.18 based state to 4.0-rc5+. The
result is a white screen. Looks like the failure is this, full dmesg
below.

...
[0.877458] [drm] Initialized drm 1.1.0 20060810
[0.877849] nouveau  [  DEVICE][:0a:00.0] BOOT0  : 0x043100a4
[0.877853] nouveau  [  DEVICE][:0a:00.0] Chipset: NV43 (NV43)
[0.877856] nouveau  [  DEVICE][:0a:00.0] Family : NV40
[0.878059] nouveau :0a:00.0: Invalid ROM contents
[0.878074] nouveau ![   VBIOS][:0a:00.0] unable to locate usable image
[0.878079] nouveau E[  DEVICE][:0a:00.0] failed to create 0x1001, 
-22
[0.878085] nouveau E[ DRM] failed to create 0x0080, -22
[0.878423] nouveau: probe of :0a:00.0 failed with error -22
...

I will try to bisect it during the next days.


Olaf

[0.00] Allocated 4096 bytes for 2 pacas at c000
[0.00] DART table allocated at: c0007f00
[0.00] Using PowerMac machine description
[0.00] Page orders: linear mapping = 24, virtual = 12, io = 12
[0.00] Found initrd at 0xc13d64ba:0xc171b5be
[0.00] Found U4 memory controller  host bridge @ 0xf800 revision: 
0x42
[0.00] Mapped at 0xd8008000
[0.00] Found a Shasta mac-io controller, rev: 0, mapped at 
0xd80080041000
[0.00] PowerMac motherboard: PowerMac G5 Dual Core
[0.00] DART IOMMU initialized for U4 type chipset
[0.00] bootconsole [udbg0] enabled
[0.00] CPU maps initialized for 1 thread per core
[0.00]  (thread shift is 0)
[0.00] Starting Linux PPC64 #2 SMP Sat Mar 28 13:48:35 CET 2015
[0.00] -
[0.00] ppc64_pft_size= 0x0
[0.00] phys_mem_size = 0x8000
[0.00] cpu_features  = 0x0804806318100448
[0.00]   possible= 0x1f7fffef18500649
[0.00]   always  = 0x18100040
[0.00] cpu_user_features = 0xdc08 0x
[0.00] mmu_features  = 0x0c01
[0.00] firmware_features = 0x
[0.00] htab_address  = 0xc0007c00
[0.00] htab_hash_mask= 0x3
[0.00] -
[0.00] Initializing cgroup subsys cpuset
[0.00] Initializing cgroup subsys cpu
[0.00] Initializing cgroup subsys cpuacct
[0.00] Linux version 3.18-mainline 
(master@a39bdfb590f54d0f41d6a5b352b085322d007dcd) (gcc version 4.8.1 20130909 
[gcc-4_8-branch revision 202388] (SUSE Linux) ) #2 SMP Sat Mar 28 13:48:35 CET 
2015
[0.00] Found U4-PCIE PCI host bridge.  Firmware bus number: 0-255
[0.00] PCI host bridge /pci@0,f000  ranges:
[0.00]  MEM 0xf100..0xf1ff - 
0xf100 
[0.00]   IO 0xf000..0xf07f - 0x
[0.00]  MEM 0x9000..0xafff - 
0x9000 
[0.00] Can't get bus-range for /ht@0,f200, assume bus 0
[0.00] Found U3-HT PCI host bridge.  Firmware bus number: 0-239
[0.00] PCI host bridge /ht@0,f200 (primary) ranges:
[0.00] SMU: Driver 0.7 (c) 2005 Benjamin Herrenschmidt, IBM Corp.
[0.00] nvram: Checking bank 0...
[0.00] nvram: gen0=282, gen1=283
[0.00] nvram: Active bank is: 1
[0.00] nvram: OF partition at 0x410
[0.00] nvram: XP partition at 0x1020
[0.00] nvram: NR partition at 0x1120
[0.00] Top of RAM: 0x8000, Total RAM: 0x8000
[0.00] Memory hole size: 0MB
[0.00] Zone ranges:
[0.00]   DMA  [mem 0x-0x7fff]
[0.00]   DMA32empty
[0.00]   Normal   empty
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x-0x7fff]
[0.00] Initmem setup node 0 [mem 0x-0x7fff]
[0.00] On node 0 totalpages: 524288
[0.00] free_area_init_node: node 0, pgdat c08e0900, 
node_mem_map c0007a00
[0.00]   DMA zone: 8192 pages used for memmap
[0.00]   DMA zone: 0 pages reserved
[0.00]   DMA zone: 524288 pages, LIFO batch:31
[0.00] PERCPU: Embedded 18 pages/cpu @c0007ee0 s33688 r0 d40040 
u524288
[0.00] pcpu-alloc: s33688 r0 d40040 u524288 alloc=1*1048576
[0.00] pcpu-alloc: [0] 0 1 
[0.00] Built 1 zonelists in Zone order, mobility grouping on.  Total 
pages: 516096
[0.00] Kernel command line: quiet
[0.00] PID hash table entries: 4096 (order: 3, 32768 bytes)
[0.00] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[0.00] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[0.00] Sorting __ex_table...
[0.00] Memory: 

Re: nouveau regression on G5 Dual Core

2015-03-28 Thread Olaf Hering
On Sat, Mar 28, Olaf Hering wrote:

 I just updated the kernel from some 3.18 based state to 4.0-rc5+. The

3.19 is already broken, will bisect next week.

Olaf
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [git pull] Please pull powerpc.git next branch

2014-01-29 Thread Olaf Hering
On Wed, Jan 29, Alistair Popple wrote:

 Looks like I missed the dart iommu code when changing the iommu table
 initialisation. The patch below should fix it, would you mind testing it Ben?

 +++ b/arch/powerpc/sysdev/dart_iommu.c

 + iommu_table_dart.it_page_shift = IOMMU_PAGE_SHIFT_4K;


Yes, that fixes it for me. Thanks!

Olaf
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [git pull] Please pull powerpc.git next branch

2014-01-28 Thread Olaf Hering
On Tue, Jan 28, Benjamin Herrenschmidt wrote:

 So here's my next branch for powerpc. A bit late as I was on vacation

This breaks booting on G5 11,2, the nouveau driver prints errors and as
result the kernel hangs, fans kick in. This is what I did:

# Rebase 54c0a4b..b2e448e onto 54c0a4b

I will try to bisect it.

Olaf
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH] scsi/ibmvscsi: add module alias for ibmvscsic

2012-07-30 Thread Olaf Hering
On Mon, Jul 30, Benjamin Herrenschmidt wrote:

 On Wed, 2012-07-18 at 18:49 +0200, o...@aepfle.de wrote:
  From: Olaf Hering o...@aepfle.de
  
  The driver is named ibmvscsic, at runtime it its name is advertised as
  ibmvscsi. For this reason mkinitrd wont pickup the driver properly.
  Reported by IBM during SLES11 beta testing:
  
  https://bugzilla.novell.com/show_bug.cgi?id=459933
  LTC50724
 
 So while this would work, I do wonder however whether we could instead
 fix it by simplifying the whole thing as follow since iSeries is now
 gone and so we don't need split backends anymore:
 
 scsi/ibmvscsi: Remove backend abstraction

I cant that these things myself anymore.

Olaf
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH] radeonfb: Add quirk for the graphics adapter in some JSxx

2012-07-18 Thread Olaf Hering
On Thu, Jul 19, Jingoo Han wrote:

 On Thursday, July 19, 2012 1:49 AM, o...@aepfle.de wrote:
  From: Tony Breeds t...@bakeyournoodle.com
  
  These devices are set to 640x480 by firmware, switch them to 800x600@60
  so that the graphical installer can run on remote console.
  
  Reported by IBM during SLES10 SP2 beta testing:
  
  https://bugzilla.novell.com/show_bug.cgi?id=461002
  LTC50817
  
  Signed-off-by: Olaf Hering o...@aepfle.de
 
 If the author is Tony Breeds, please add 'Signed-off-by: Tony Breeds 
 t...@bakeyournoodle.com'.

He provided the initial version of the change, but did not add his tag
back in 2009. Tony, perhaps you can do that now?

Olaf
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: Pegasos OHCI bug (was Re: PROBLEM: memory corrupting bug, bisected to 6dda9d55)

2010-10-27 Thread Olaf Hering
On Wed, Oct 27, pac...@kosh.dhis.org wrote:

 |1. How do I locate all usb nodes in the device tree?
 |
 |2. How do I know if a particular usb node is OHCI?

In the installed system, run 'lspci | grep -i usb', this gives the pci
bus numbers.  Then run 'find /sys -name devspec', and look or the bus
numbers from the lspci output.  Each devspec file contains the firmware
path.  The ohci node may have subdirectories. Run 'words' in each of
them at the firmware prompt. Perhaps there is one to shutdown the
controller?

I just noticed older firmware did not have a node for ohci, newer ones
my have a /p...@8000/u...@5 node.

Good luck.

Olaf
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH] [powerpc] do not expect executable permissions for in-tree shell scripts

2010-06-10 Thread Olaf Hering
On Thu, Jun 10, Benjamin Herrenschmidt wrote:

 I still don't like it very much.. why not chmod'ing it +x instead ? :-)

I looked at a few other scripts in the source tree, they are called with
$(CONFIG_SHELL) name, or perl name, or awk name or even sh name.

So my change adds some sort of consistency and makes packaging more robust.


Olaf
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH] [powerpc] do not expect executable permissions for in-tree shell scripts

2010-06-05 Thread Olaf Hering

scripts in the kernel source do not have executable permissions if they were 
created with patch(1)
run mkuboot.sh with bash, its tagged as bash script.

/opt/cross/kernel/linux-2.6.33-cross-host-kernel-source/arch/powerpc/boot/wrapper:
 line 273: 
/opt/cross/kernel/linux-2.6.33-cross-host-kernel-source/scripts/mkuboot.sh: 
Permission denied

Signed-off-by: Olaf Hering o...@aepfle.de

---

This happens with 2.6.33, other versions have this bug as well.

 arch/powerpc/boot/wrapper |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.33-cross-host-kernel-source.orig/arch/powerpc/boot/wrapper
+++ linux-2.6.33-cross-host-kernel-source/arch/powerpc/boot/wrapper
@@ -270,7 +270,7 @@ membase=`${CROSS}objdump -p $kernel |
 case $platform in
 uboot)
 rm -f $ofile
-${MKIMAGE} -A ppc -O linux -T kernel -C gzip -a $membase -e $membase \
+bash ${MKIMAGE} -A ppc -O linux -T kernel -C gzip -a $membase -e $membase \
$uboot_version -d $vmz $ofile
 if [ -z $cacheit ]; then
rm -f $vmz
@@ -330,7 +330,7 @@ coff)
 ;;
 cuboot*)
 gzip -f -9 $ofile
-${MKIMAGE} -A ppc -O linux -T kernel -C gzip -a $base -e $entry \
+bash ${MKIMAGE} -A ppc -O linux -T kernel -C gzip -a $base -e $entry \
 $uboot_version -d $ofile.gz $ofile
 ;;
 treeboot*)
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH] [powerpc] do not expect executable permissions for in-tree shell scripts

2010-06-05 Thread Olaf Hering
On Sat, Jun 05, Sean MacLennan wrote:

 On Sat, 5 Jun 2010 10:10:39 +0200
 Olaf Hering o...@aepfle.de wrote:
 
  scripts in the kernel source do not have executable permissions if
  they were created with patch(1) run mkuboot.sh with bash, its tagged
  as bash script.
 
 Wouldn't it be better to use ${SHELL}? Not every system has bash.

Maybe.
As it stands right now, mkuboot.sh does not run without bash.


And:
Reality check please.
A _development system_ without bash, installed per default on every sane
Linux distro, does most likely not exist.


Olaf
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH/RFC] ps3/block: Add ps3vram-ng driver for accessing video RAM as block device

2009-03-05 Thread Olaf Hering
On Thu, Mar 05, Geert Uytterhoeven wrote:

 On Thu, 5 Mar 2009, Geert Uytterhoeven wrote:
  On Thu, 5 Mar 2009, Olaf Hering wrote:
   I see our old mtddriver does not have modalias support for autoloading.
  
  You forgot to backport commit 0a2d15b928e0b1673d4ed5f48d95af211b6fcc06
  (mtd/ps3vram: Add modalias support to the ps3vram driver) to the openSuSE
  tree?
 
 Or do you mean that udev doesn't load mtdblock automatically?

I have not tried current kernels.
Our older versions of mtd based ps3vram do not have the autoloading feature.

So, please merge the block based ps3vram.ko.

Thanks for pushing it into mainline.

Olaf
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH/RFC] ps3/block: Add ps3vram-ng driver for accessing video RAM as block device

2009-03-04 Thread Olaf Hering

Am 04.03.2009 um 14:57 schrieb Geert Uytterhoeven:

Ideally, we think it would be best if the existing MTD-based ps3vram  
driver
would be replaced by the new block-based ps3vram driver before  
2.6.29 is
released. This would relieve the burden of supporting two different  
swap space
schemes on PS3 (swap on /dev/mtdblock0 vs. /dev/ps3vram) from the  
distro
maintainer's shoulders, as in that case there would never have been  
a stable

kernel version containing the MTD-based ps3vram driver.


openSuSE already ships with the ps3vram driver since a two releases.
A simple name based udev rule could symlink ps3vram to mtdblock0, so  
an upgrade

will not break existing setups.


+obj-$(CONFIG_PS3_VRAM) += ps3vram_ng.o


Please give the driver the obvious name ps3vram, that way upgrading  
will be smooth.


I see our old mtddriver does not have modalias support for autoloading.
Hopefully the new driver has this feature.

Olaf
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


unconditional link object arch/powerpc/lib/crtsavres.o breaks module build

2008-08-06 Thread Olaf Hering

Sam,

please have a look at bug 11143.
http://bugzilla.kernel.org/show_bug.cgi?id=11143


arch/powerpc/lib/crtsavres.o is added inconditionally to the linker
flags, but there is no rule to actually create the object file.
This breaks building external modules on 32bit powerpc since 2.6.26.

Thanks,
Olaf
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH v2] Change the default link address for pSeries zImage kernels.

2008-07-02 Thread Olaf Hering
On Tue, Jun 24, Tony Breeds wrote:

 Currently we set the start of the .text section to be 4Mb for pSeries.
 In situations where the zImage is  8Mb we'll fail to boot (due to
 overlapping with OF).  Move .text in a zImage from 4MB to 64MB (well past OF).
 
 We still will not be able to load large zImage unless we also move OF,
 to that end, add a note to the zImage ELF to move OF to 32Mb.  If this
 is the very first kernel booted then we'll need to move OF manually by
 setting real-base.

Setting real-base to what?

What currently happens with a large boot file is:
Firmware loads the zImage at load-base, finds that the ELF file is too
large to fit into the memory window and stops.

With your patch, firmware loads 12566528 bytes, and starts the zImage.
The result is a truncated file, the initrd will be corrupted, kernel
panic in populate_rootfs().

The only system where firmware relocates itself from 12MB to 32MB is a
p640 with firmware version NAN04194.
All other systems seem to ignore the NOTE section, real-base remains at
0xc0

So I do not think your patch is a real improvement,
clear error vs. silent corruption.

Do you happen to know how to automate the changing the value of
real-base? The addnote change has appearently no effect on recent
systems.

Olaf
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: Linux 2.6.26-rc5

2008-06-05 Thread Olaf Hering
On Wed, Jun 04, Linus Torvalds wrote:

 Another week, another batch of mostly pretty small fixes. Hopefully the 
 regression list is shrinking, and we've fixed at least a couple of the 
 oopses on Arjan's list.

SATA on a dualcore G5 is broken, it happend between
c3b25b32e8bef526cca748e1ba023c6bdd705a99..53c8ba95402be65d412a806cda3430f0e72cd107

irq 18: nobody cared (try booting with the irqpoll option)
Disabling IRQ #18


ctrl alt del on the USB keyboard does not trigger a reboot.
Sometimes the cursor stops blinking, sometimes just nothing happens
after ctrl alt del.


Does 53c8ba95402be65d412a806cda3430f0e72cd107 work for others on G5?
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] libata: fix G5 SATA broken on -rc5

2008-06-05 Thread Olaf Hering
On Thu, Jun 05, Hugh Dickins wrote:

 Fix G5 SATA irq 18: nobody cared, reported on -rc5 by Olaf Hering:
 fixlet to a57c1bade5a0ee5cd8b74502db9cbebb7f5780b2 libata-sff:
 Fix oops reported in kerneloops.org for pnp devices with no ctl
 
 Signed-off-by: Hugh Dickins [EMAIL PROTECTED]
 Acked-by: Alan Cox [EMAIL PROTECTED]


Tested-by: Olaf Hering [EMAIL PROTECTED]

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: dead network on JS21 with tg3 driver after flowcontrol changes

2008-05-16 Thread Olaf Hering
On Thu, May 15, Michael Chan wrote:

 Matt, I think that's very likely the problem.  If we are trying to
 establish link in parallel detect mode, the flow control settings may
 not match.  If we do not enter the if statement to do nothing, we will
 keep autonegotiating forever and never establish link.

Yes, this patch fixes nfsroot for me. Thanks.
mii-tool is not shipped anymore, even in SLES10.
I assume that ethtool is the replacement?

Olaf
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: linux-next: powercp-next build failure

2008-05-15 Thread Olaf Hering
On Thu, May 15, Stephen Rothwell wrote:

 Today's linux-next build (sparc64 defconfig) fails like this:
 
 drivers/of/device.c: In function `modalias_show':
 drivers/of/device.c:66: error: implicit declaration of function 
 `of_device_get_modalias'
 
 Caused by commit 140b932f8cb6cced10b96860651a198b1b89cbb9 ([POWERPC]
 Create modalias file in sysfs for of_platform bus) from the powerpc-next
 tree as there is a definition and declaration of of_device_get_modalias
 only for powerpc.  I reverted that commit for today.

Better fix it up because my patch was for 2.6.25, and I cant follow
mainline due to time constraints.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


dead network on JS21 with tg3 driver after flowcontrol changes

2008-05-15 Thread Olaf Hering

Commit ef167e27039eeaea6d3cdd5c547b082e89840bdd ([TG3]: Fix supporting
flowctrl code) breaks networking on IBM JS21 blade servers. If I revert
this change from 2.6.26-rc2-git4, nfsroot for example will work again.
There are no packages submitted, a tcpdump on a different host sees no
broadcast messages.

Any ideas how to fix this?
What info do you need from the system?
I started with arch/powerpc/configs/ppc64_defconfig and updated CONFIG_CMDLINE
for nfsroot.


tg3.c:v3.92 (May 2, 2008)
tg3 :10:04.0: enabling device ( - 0002)
eth0: Tigon3 [partno(none) rev 8003 PHY(5780)] (PCIX:133MHz:64-bit) 1000Base-SX 
Ethernet 00:11:25:c9:07:22
eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[1] WireSpeed[0] TSOcap[1]
eth0: dma_rwctrl[76144000] dma_mask[40-bit]
tg3 :10:04.1: enabling device ( - 0002)
eth1: Tigon3 [partno(none) rev 8003 PHY(5780)] (PCIX:133MHz:64-bit) 1000Base-SX 
Ethernet 00:11:25:c9:07:23
eth1: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] WireSpeed[0] TSOcap[1]
eth1: dma_rwctrl[76144000] dma_mask[40-bit]
...

full dmesg:

Using pSeries machine description
Page orders: linear mapping = 24, virtual = 12, io = 12
console [udbg0] enabled
Partition configured for 2 cpus.
CPU maps initialized for 1 thread per core
 (thread shift is 0)
Starting Linux PPC64 #3 SMP Thu May 15 13:47:10 CEST 2008
-
ppc64_pft_size= 0x19
physicalMemorySize= 0x7a00
htab_hash_mask= 0x3
-
Initializing cgroup subsys cpuset
Linux version 2.6.26-rc2-git4 ([EMAIL PROTECTED]) (gcc version 4.1.2 20070115 
(prerelease) (SUSE Linux)) #3 SMP Thu May 15 13:47:10 CEST 2008
[boot]0012 Setup Arch
Entering add_active_range(0, 0, 499712) 0 entries of 256 used
PCI host bridge /[EMAIL PROTECTED]  ranges:
  IO 0x0100f400..0x0100f43f - 0x
 MEM 0x01008000..0x0100efff - 0x8000 
PPC64 nvram contains 8192 bytes
Using dedicated idle loop
Top of RAM: 0x7a00, Total RAM: 0x7a00
Memory hole size: 0MB
Zone PFN ranges:
  DMA 0 -   499712
  Normal 499712 -   499712
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0:0 -   499712
On node 0 totalpages: 499712
  DMA zone: 6832 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 492880 pages, LIFO batch:31
  Normal zone: 0 pages used for memmap
  Movable zone: 0 pages used for memmap
[boot]0015 Setup Done
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 492880
Kernel command line: debug panic=9 rw root=/dev/nfs 
nfsroot=10.10.4.97:/data/inst/nfs/olh ip=:eth1:dhcp 
[boot]0020 XICS Init
[boot]0021 XICS Done
pic: no ISA interrupt controller
PID hash table entries: 4096 (order: 12, 32768 bytes)
time_init: decrementer frequency = 14.318000 MHz
time_init: processor frequency   = 2597.40 MHz
clocksource: timebase mult[1175e5e5] shift[22] registered
clockevent: decrementer mult[3aa] shift[16] cpu[0]
Console: colour dummy device 80x25
console handover: boot [udbg0] - real [hvc0]
Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
Memory: 1942124k/1998848k available (8288k kernel code, 56096k reserved, 1412k 
data, 532k bss, 380k init)
SLUB: Genslabs=12, HWalign=128, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
Calibrating delay loop... 28.60 BogoMIPS (lpj=57216)
Mount-cache hash table entries: 256
clockevent: decrementer mult[3aa] shift[16] cpu[1]
Processor 1 found.
Brought up 2 CPUs
CPU0 attaching sched-domain:
 domain 0: span 0-1
  groups: 0 1
CPU1 attaching sched-domain:
 domain 0: span 0-1
  groups: 1 0
khelper used greatest stack depth: 12896 bytes left
khelper used greatest stack depth: 12320 bytes left
khelper used greatest stack depth: 11904 bytes left
net_namespace: 936 bytes
xor: measuring software checksum speed
   8regs :  5830.000 MB/sec
   8regs_prefetch:  4644.000 MB/sec
   32regs:  5751.000 MB/sec
   32regs_prefetch:  4601.000 MB/sec
xor: using function: 8regs (5830.000 MB/sec)
NET: Registered protocol family 16
IBM eBus Device Driver
PCI: Probing PCI hardware
IOMMU table initialized, virtual merging enabled
PCI: Probing PCI hardware done
SCSI subsystem initialized
libata version 3.00 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
Switched to high resolution mode on CPU 0
Switched to high resolution mode on CPU 1
IP route cache hash table entries: 65536 (order: 7, 524288 bytes)
TCP established hash table entries: 262144 (order: 10, 4194304 bytes)
TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
TCP: Hash tables configured (established 262144 bind 65536)
TCP reno registered
NET: Registered protocol family 1
RTAS daemon started
Total HugeTLB memory allocated, 0
JFS: 

Re: dead network on JS21 with tg3 driver after flowcontrol changes

2008-05-15 Thread Olaf Hering
On Thu, May 15, Michael Chan wrote:

 Olaf Hering wrote:
 
  Any ideas how to fix this?
  What info do you need from the system?
 
 Are you using eth0 or eth1?  The dmesg below shows that
 link came up on eth1 and IP address from DHCP was received.

I'm using eth1.
The log was done with the patch reverted.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH v5] create modalias file in sysfs for bus of_platform

2008-05-08 Thread Olaf Hering
On Thu, Apr 24, Olaf Hering wrote:

 Create /sys/bus/of_platform/devices/*/modalias file to allow autoloading
 of modules. modalias files are already present for many other bus types.
 This adds also a newline to the devspec files.
 
 Also create a devspec file for mac-io devices. They were created as a side
 effect. Use correct buffer size for mac-io modalias buffer.
 
 Tested on iBook1 and Efika.

Did anyone test this on other systems, like sparc?
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: missing current-speed property prevents autoconsole on pegasos

2008-04-25 Thread Olaf Hering
On Thu, Apr 24, Matt Sealey wrote:

 Why not just have users who wish to use console serial port autodetection
 add 3 lines to their nvramrc?

The point of autodetection is that no userinteraction is required.

I guess the serial driver does not probe the configured hardware port
speed anymore (if it ever did that).
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH v5] create modalias file in sysfs for bus of_platform

2008-04-24 Thread Olaf Hering
Create /sys/bus/of_platform/devices/*/modalias file to allow autoloading
of modules. modalias files are already present for many other bus types.
This adds also a newline to the devspec files.

Also create a devspec file for mac-io devices. They were created as a side
effect. Use correct buffer size for mac-io modalias buffer.

Tested on iBook1 and Efika.

Signed-off-by: Olaf Hering [EMAIL PROTECTED]

---
 drivers/macintosh/macio_sysfs.c |   12 +++-
 drivers/of/device.c |   36 
 drivers/of/platform.c   |3 +++
 3 files changed, 34 insertions(+), 17 deletions(-)

--- a/drivers/macintosh/macio_sysfs.c
+++ b/drivers/macintosh/macio_sysfs.c
@@ -44,7 +44,7 @@ static ssize_t modalias_show (struct dev
struct of_device *ofdev = to_of_device(dev);
int len;
 
-   len = of_device_get_modalias(ofdev, buf, PAGE_SIZE);
+   len = of_device_get_modalias(ofdev, buf, PAGE_SIZE - 2);
 
buf[len] = '\n';
buf[len+1] = 0;
@@ -52,6 +52,15 @@ static ssize_t modalias_show (struct dev
return len+1;
 }
 
+static ssize_t devspec_show(struct device *dev,
+   struct device_attribute *attr, char *buf)
+{
+   struct of_device *ofdev;
+
+   ofdev = to_of_device(dev);
+   return sprintf(buf, %s\n, ofdev-node-full_name);
+}
+
 macio_config_of_attr (name, %s\n);
 macio_config_of_attr (type, %s\n);
 
@@ -60,5 +69,6 @@ struct device_attribute macio_dev_attrs[
__ATTR_RO(type),
__ATTR_RO(compatible),
__ATTR_RO(modalias),
+   __ATTR_RO(devspec),
__ATTR_NULL
 };
--- a/drivers/of/device.c
+++ b/drivers/of/device.c
@@ -48,16 +48,32 @@ void of_dev_put(struct of_device *dev)
 }
 EXPORT_SYMBOL(of_dev_put);
 
-static ssize_t dev_show_devspec(struct device *dev,
+static ssize_t devspec_show(struct device *dev,
struct device_attribute *attr, char *buf)
 {
struct of_device *ofdev;
 
ofdev = to_of_device(dev);
-   return sprintf(buf, %s, ofdev-node-full_name);
+   return sprintf(buf, %s\n, ofdev-node-full_name);
 }
 
-static DEVICE_ATTR(devspec, S_IRUGO, dev_show_devspec, NULL);
+static ssize_t modalias_show(struct device *dev,
+   struct device_attribute *attr, char *buf)
+{
+   struct of_device *ofdev = to_of_device(dev);
+   ssize_t len = 0;
+
+   len = of_device_get_modalias(ofdev, buf, PAGE_SIZE - 2);
+   buf[len] = '\n';
+   buf[len+1] = 0;
+   return len+1;
+}
+
+struct device_attribute of_platform_device_attrs[] = {
+   __ATTR_RO(devspec),
+   __ATTR_RO(modalias),
+   __ATTR_NULL
+};
 
 /**
  * of_release_dev - free an of device structure when all users of it are 
finished.
@@ -78,25 +94,13 @@ EXPORT_SYMBOL(of_release_dev);
 
 int of_device_register(struct of_device *ofdev)
 {
-   int rc;
-
BUG_ON(ofdev-node == NULL);
-
-   rc = device_register(ofdev-dev);
-   if (rc)
-   return rc;
-
-   rc = device_create_file(ofdev-dev, dev_attr_devspec);
-   if (rc)
-   device_unregister(ofdev-dev);
-
-   return rc;
+   return device_register(ofdev-dev);
 }
 EXPORT_SYMBOL(of_device_register);
 
 void of_device_unregister(struct of_device *ofdev)
 {
-   device_remove_file(ofdev-dev, dev_attr_devspec);
device_unregister(ofdev-dev);
 }
 EXPORT_SYMBOL(of_device_unregister);
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -17,6 +17,8 @@
 #include linux/of_device.h
 #include linux/of_platform.h
 
+extern struct device_attribute of_platform_device_attrs[];
+
 static int of_platform_bus_match(struct device *dev, struct device_driver *drv)
 {
struct of_device *of_dev = to_of_device(dev);
@@ -103,6 +105,7 @@ int of_bus_type_init(struct bus_type *bu
bus-suspend = of_platform_device_suspend;
bus-resume = of_platform_device_resume;
bus-shutdown = of_platform_device_shutdown;
+   bus-dev_attrs = of_platform_device_attrs;
return bus_register(bus);
 }
 
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: RFC: MPC5200 PSC AC97 driver

2008-04-22 Thread Olaf Hering
On Thu, Apr 17, Juergen Beisert wrote:

 if someone is interested: Here the full patch to get sound support for
 MPC5200b and a current 2.6.25 kernel.

It misses a 'MODULE_DEVICE_TABLE(of, mpc52xx_ac97_of_match);' and a nul
termination of struct mpc52xx_ac97_of_match.
This will allow autoload of the drivers, as it is done in most other
kernel drivers.

Olaf
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: crash in init_ipic_sysfs on efika

2008-03-20 Thread Olaf Hering
On Wed, Mar 19, Paul Mackerras wrote:

 Olaf Hering writes:
 
  I cant reproduce this bug on my board, but:
  
  The global primary_ipic in arch/powerpc/sysdev/ipic.c can remain NULL if
  ipic_init() fails. init_ipic_sysfs() will crash in that case.
  
  Something like this may fix it:
 
 Is this needed for 2.6.25?  Is the system at all usable if ipic_init
 fails?

CONFIG_PPC_MPC51* needs to be disabled for pmac/chrp/bplan .configs.

A full featured ppc32_defconfig will probably catch such errors.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: crash in init_ipic_sysfs on efika

2008-03-19 Thread Olaf Hering
On Mon, Mar 17, Olaf Hering wrote:

 The global primary_ipic in arch/powerpc/sysdev/ipic.c can remain NULL if
 ipic_init() fails. init_ipic_sysfs() will crash in that case.
 
 Something like this may fix it:
 
 Index: linux-2.6.25-rc6/arch/powerpc/sysdev/ipic.c
 ===
 --- linux-2.6.25-rc6.orig/arch/powerpc/sysdev/ipic.c
 +++ linux-2.6.25-rc6/arch/powerpc/sysdev/ipic.c
 @@ -906,7 +906,7 @@ static int __init init_ipic_sysfs(void)
  {
 int rc;
  
 -   if (!primary_ipic-regs)
 +   if (!primary_ipic || !primary_ipic-regs)
 return -ENODEV;
 printk(KERN_DEBUG Registering ipic with sysfs...\n);

ipic_init() is not called for every board.
This change for the used config fixes the crash as well.

@@ -168,14 +168,14 @@ CONFIG_PPC_MULTIPLATFORM=y
 # CONFIG_PPC_86xx is not set
 CONFIG_CLASSIC32=y
 CONFIG_PPC_CHRP=y
-CONFIG_PPC_MPC512x=y
-CONFIG_PPC_MPC5121=y
-CONFIG_MPC5121_ADS=y
+# CONFIG_PPC_MPC512x is not set
+# CONFIG_PPC_MPC5121 is not set
+# CONFIG_MPC5121_ADS is not set
 CONFIG_PPC_MPC52xx=y
-CONFIG_PPC_MPC5200_SIMPLE=y
+# CONFIG_PPC_MPC5200_SIMPLE is not set
 CONFIG_PPC_EFIKA=y
 # CONFIG_PPC_LITE5200 is not set
-CONFIG_PPC_MPC5200_BUGFIX=y
+# CONFIG_PPC_MPC5200_BUGFIX is not set
 CONFIG_PPC_PMAC=y
 # CONFIG_PPC_CELL is not set
 # CONFIG_PPC_CELL_NATIVE is not set


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


crash in init_ipic_sysfs on efika

2008-03-17 Thread Olaf Hering

I cant reproduce this bug on my board, but:

The global primary_ipic in arch/powerpc/sysdev/ipic.c can remain NULL if
ipic_init() fails. init_ipic_sysfs() will crash in that case.

Something like this may fix it:

Index: linux-2.6.25-rc6/arch/powerpc/sysdev/ipic.c
===
--- linux-2.6.25-rc6.orig/arch/powerpc/sysdev/ipic.c
+++ linux-2.6.25-rc6/arch/powerpc/sysdev/ipic.c
@@ -906,7 +906,7 @@ static int __init init_ipic_sysfs(void)
 {
int rc;
 
-   if (!primary_ipic-regs)
+   if (!primary_ipic || !primary_ipic-regs)
return -ENODEV;
printk(KERN_DEBUG Registering ipic with sysfs...\n);
 


ok boot eth:192.168.2.52,inst32 inst32 console=ttyPSC0,115200

SuSE Linux zImage starting: loaded at 0004-00d24cbc (0/0/01003ed8;
sp: 017ffe80)
uncompressing ELF header done. (0100 bytes)
Allocated 008584d4 bytes for kernel @ 0200
Allocated 00a963a2 bytes for initrd @ 02859000
uncompressing kernel done. (004faeb8 bytes)
entering kernel at 0201(2859000/a963a2/01003ed8)
OF stdout device is: /failsafe
command line: console=ttyPSC0,115200
memory layout at init:
  alloc_bottom : 032f
  alloc_top: 3000
  alloc_top_hi : f000c000
  rmo_top  : 3000
  ram_top  : f000c000
Looking for displays
instantiating rtas at 0x07ffb000 ... done
Applying EFIKA device tree fixups
Fixing bestcomm interrupts property
Adding Ethernet MDIO node
Adding Ethernet PHY node
copying OF device tree ...
Building dt strings...
Building dt structure...
Device tree strings 0x032f1000 - 0x032f17e0
Device tree struct  0x032f2000 - 0x03315000
Calling quiesce ...
returning from prom_init
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 113264k/131072k available (4808k kernel code, 17648k reserved,
164k data, 461k bss, 228k init)
Security Framework initialized
AppArmor: AppArmor initialized
AppArmor: Unable to log event (1505) to audit subsys
AppArmor: Registered secondary security module name=capability
AppArmor: Unable to log event (1505) to audit subsys
Capability LSM initialized as secondary
Failure registering Root Plug module with the kernel
AppArmor: Unable to register %s as a secondary security module
name=root_plug
AppArmor: Unable to log event (1505) to audit subsys
Failure registering Root Plug  module with primary security module.
Mount-cache hash table entries: 512
net_namespace: 544 bytes
NET: Registered protocol family 16
PCI: Probing PCI hardware
DMA: MPC52xx BestComm driver
DMA: MPC52xx BestComm engine @f0001200 ok !
Unable to handle kernel paging request for data at address 0x
Faulting instruction address: 0xc0486aac
Oops: Kernel access of bad area, sig: 11 [#1]
Efika
Modules linked in:
NIP: c0486aac LR: c0479200 CTR: c0486a90
REGS: c782bea0 TRAP: 0300   Not tainted  (2.6.25-rc5-git2-5-default)
MSR: 9032 EE,ME,IR,DR  CR: 44002082  XER: 2000
DAR: , DSISR: 2000
TASK = c78237c0[1] 'swapper' THREAD: c782a000
GPR00: c0479200 c782bf50 c78237c0 ffed 0003  

GPR08: fffc  c7800780 000f06a0 22002022 dff7 c0405540
c0405558
GPR16: c0405568 c040558c c0405594 c04055a4 c04055d0 c040 024184a4

GPR24:  c04a6468 c0405550 c782a000 c04e  
c04af198
NIP [c0486aac] init_ipic_sysfs+0x1c/0x90
LR [c0479200] kernel_init+0xf8/0x2a0
Call Trace:
[c782bf50] [c04869fc] mpc52xx_bcom_init+0x24/0x34 (unreliable)
[c782bf60] [c0479200] kernel_init+0xf8/0x2a0
[c782bff0] [c001330c] kernel_thread+0x44/0x60
Instruction dump:
80010024 bb61000c 38210020 7c0803a6 4e800020 9421fff0 7c0802a6 3d20c04f
3860ffed 90010014 93e1000c 81299730 8009 2f80 41be0058 3c60c041
---[ end trace 8640abe69a316dee ]---
Kernel panic - not syncing: Attempted to kill init!
Rebooting in 180 seconds..

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


undefined references to __udivdi3 on powerpc

2008-02-28 Thread Olaf Hering

While debugging __divdi3 calls in drivers/crypto/hifn_795x.c (due to the
ndelay() delay call with a s64), I found even more breakage of that
sort. This is after a allnoconfig with ARCH=powerpc in 2.6.25-rc3,
plus CONFIG_MODULES=y and CONFIG_CRYPTO_DEV_HIFN_795X=y:

  LD  .tmp_vmlinux1
  kernel/built-in.o: In function `update_xtime_cache':
  (.text+0x221a0): undefined reference to `__umoddi3'
  kernel/built-in.o: In function `update_xtime_cache':
  (.text+0x221c0): undefined reference to `__udivdi3'
  kernel/built-in.o: In function `getnstimeofday':
  (.text+0x22330): undefined reference to `__umoddi3'
  kernel/built-in.o: In function `getnstimeofday':
  (.text+0x22350): undefined reference to `__udivdi3'
  kernel/built-in.o: In function `timekeeping_resume':
  timekeeping.c:(.text+0x226a0): undefined reference to `__udivdi3'
  timekeeping.c:(.text+0x22778): undefined reference to `__umoddi3'
  timekeeping.c:(.text+0x22798): undefined reference to `__udivdi3'
  kernel/built-in.o: In function `update_wall_time':
  (.text+0x22c7c): undefined reference to `__umoddi3'
  kernel/built-in.o: In function `update_wall_time':
  (.text+0x22c9c): undefined reference to `__udivdi3'
  kernel/built-in.o: In function `update_wall_time':
  (.text+0x230f8): undefined reference to `__umoddi3'
  kernel/built-in.o: In function `update_wall_time':
  (.text+0x23118): undefined reference to `__udivdi3'
  kernel/built-in.o: In function `do_settimeofday':
  (.text+0x23520): undefined reference to `__udivdi3'
  kernel/built-in.o: In function `timekeeping_init':
  (.init.text+0x1870): undefined reference to `__udivdi3'
  make[1]: *** [.tmp_vmlinux1] Error 1

But its not a regression, 2.6.24 allnoconfig does not link either on
powerpc32. 

How can this be fixed?

Olaf
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: undefined references to __udivdi3 on powerpc

2008-02-28 Thread Olaf Hering
On Thu, Feb 28, Segher Boessenkool wrote:

 While debugging __divdi3 calls in drivers/crypto/hifn_795x.c (due to the
 ndelay() delay call with a s64), I found even more breakage of that
 sort. This is after a allnoconfig with ARCH=powerpc in 2.6.25-rc3,
 plus CONFIG_MODULES=y and CONFIG_CRYPTO_DEV_HIFN_795X=y:

 I cannot reproduce this, but my tree has

   time: prevent the loop in timespec_add_ns() from being optimised away

 which is in -mm now.  Could you try that patch?

Yes, this patch fixes it.
Thanks.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: pci_proc_init: proc_dir_entry '00' already registered

2008-02-28 Thread Olaf Hering
On Sun, Feb 10, Alexey Dobriyan wrote:

 On Sun, Feb 10, 2008 at 11:07:57AM +0100, Olaf Hering wrote:
  Current Linus tree gives this new warning during bootup:
  
  +proc_dir_entry '00' already registered
  +Call Trace:
  +[c0007b0dfba0] [c000e4b0] .show_stack+0x70/0x1bc (unreliable)
  +[c0007b0dfc50] [c00f2714] .proc_register+0x130/0x210
  +[c0007b0dfd00] [c00f299c] .proc_mkdir_mode+0x40/0x70
  +[c0007b0dfd80] [c0276ed8] .pci_proc_attach_device+0xac/0x144
  +[c0007b0dfe20] [c05bdb3c] .pci_proc_init+0x74/0xac
  +[c0007b0dfea0] [c05a27ac] .kernel_init+0x1d0/0x394
  +[c0007b0dff90] [c001e258] .kernel_thread+0x4c/0x68
 
 Can you insert dump_stack() when '00' is registered, not just second
 time?

Its pci_bus_add_device(). Full dmesg attached:

diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
index ef5a6a2..3c6fcd9 100644
--- a/drivers/pci/bus.c
+++ b/drivers/pci/bus.c
@@ -16,6 +16,8 @@ #include linux/proc_fs.h
 #include linux/init.h
 
 #include pci.h
+#define olh(fmt,args ...) \
+   printk(KERN_DEBUG %s(%u) %s(%u):c%u,j%lu  fmt 
\n,__FUNCTION__,__LINE__,current-comm,current-pid,smp_processor_id(),jiffies,##args)
 
 /**
  * pci_bus_alloc_resource - allocate a resource from a parent bus
@@ -80,6 +82,7 @@ pci_bus_alloc_resource(struct pci_bus *b
 int pci_bus_add_device(struct pci_dev *dev)
 {
int retval;
+   olh(%s,dev-dev.bus_id);
retval = device_add(dev-dev);
if (retval)
return retval;
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
index ef18fcd..1a9ef7c 100644
--- a/drivers/pci/proc.c
+++ b/drivers/pci/proc.c
@@ -6,6 +6,8 @@
  * Copyright (c) 1997--1999 Martin Mares [EMAIL PROTECTED]
  */
 
+#define olh(fmt,args ...) \
+   printk(KERN_DEBUG %s(%u) %s(%u):c%u,j%lu  fmt 
\n,__FUNCTION__,__LINE__,current-comm,current-pid,smp_processor_id(),jiffies,##args)
 #include linux/init.h
 #include linux/pci.h
 #include linux/module.h
@@ -390,6 +392,7 @@ int pci_proc_attach_device(struct pci_de
struct proc_dir_entry *e;
char name[16];
 
+   olh(%d: %p - %s,proc_initialized,dev,dev-dev.bus_id);
if (!proc_initialized)
return -EACCES;
 
@@ -478,6 +481,7 @@ static int __init pci_proc_init(void)
entry-proc_fops = proc_bus_pci_dev_operations;
proc_initialized = 1;
while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
+   olh(%s,dev-dev.bus_id);
pci_proc_attach_device(dev);
}
return 0;
DART table allocated at: c0007f00
Using PowerMac machine description
Page orders: linear mapping = 24, virtual = 12, io = 12
Found initrd at 0xc130:0xc1559c00
Found U4 memory controller  host bridge @ 0xf800 revision: 0x42
Mapped at 0xd8008000
Found a Shasta mac-io controller, rev: 0, mapped at 0xd80080041000
PowerMac motherboard: PowerMac G5 Dual Core
DART IOMMU initialized for U4 type chipset
console [udbg0] enabled
CPU maps initialized for 1 thread per core
 (thread shift is 0)
Starting Linux PPC64 #231 SMP Thu Feb 28 19:53:21 CET 2008
-
ppc64_pft_size= 0x0
physicalMemorySize= 0x8000
htab_address  = 0xc0007c00
htab_hash_mask= 0x3
-
Linux version 2.6.25-rc3-g5-dirty ([EMAIL PROTECTED]) (gcc version 4.1.0 (SUSE 
Linux)) #231 SMP Thu Feb 28 19:53:21 CET 2008
[boot]0012 Setup Arch
Entering add_active_range(0, 0, 524288) 0 entries of 256 used
Found U4-PCIE PCI host bridge.  Firmware bus number: 0-255
PCI host bridge /[EMAIL PROTECTED],f000  ranges:
 MEM 0xf100..0xf1ff - 0xf100 
  IO 0xf000..0xf07f - 0x
 MEM 0x9000..0xafff - 0x9000 
Can't get bus-range for /[EMAIL PROTECTED],f200, assume bus 0
Found U3-HT PCI host bridge.  Firmware bus number: 0-239
PCI host bridge /[EMAIL PROTECTED],f200 (primary) ranges:
SMU: Driver 0.7 (c) 2005 Benjamin Herrenschmidt, IBM Corp.
nvram: Checking bank 0...
nvram: gen0=210, gen1=211
nvram: Active bank is: 1
nvram: OF partition at 0x410
nvram: XP partition at 0x1020
nvram: NR partition at 0x1120
Top of RAM: 0x8000, Total RAM: 0x8000
Memory hole size: 0MB
Zone PFN ranges:
  DMA 0 -   524288
  Normal 524288 -   524288
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0:0 -   524288
On node 0 totalpages: 524288
  DMA zone: 7168 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 517120 pages, LIFO batch:31
  Normal zone: 0 pages used for memmap
  Movable zone: 0 pages used for memmap
[boot]0015 Setup Done
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 517120
Kernel command line: root=UUID=a77c3a2a-dd4a-4cf6

pci_proc_init: proc_dir_entry '00' already registered

2008-02-10 Thread Olaf Hering
Current Linus tree gives this new warning during bootup:

+proc_dir_entry '00' already registered
+Call Trace:
+[c0007b0dfba0] [c000e4b0] .show_stack+0x70/0x1bc (unreliable)
+[c0007b0dfc50] [c00f2714] .proc_register+0x130/0x210
+[c0007b0dfd00] [c00f299c] .proc_mkdir_mode+0x40/0x70
+[c0007b0dfd80] [c0276ed8] .pci_proc_attach_device+0xac/0x144
+[c0007b0dfe20] [c05bdb3c] .pci_proc_init+0x74/0xac
+[c0007b0dfea0] [c05a27ac] .kernel_init+0x1d0/0x394
+[c0007b0dff90] [c001e258] .kernel_thread+0x4c/0x68

Its a dualcore G5.


DART table allocated at: c0007f00
Using PowerMac machine description
Page orders: linear mapping = 24, virtual = 12, io = 12
Found initrd at 0xc130:0xc1559c00
Found U4 memory controller  host bridge @ 0xf800 revision: 0x42
Mapped at 0xd8008000
Found a Shasta mac-io controller, rev: 0, mapped at 0xd80080041000
PowerMac motherboard: PowerMac G5 Dual Core
DART IOMMU initialized for U4 type chipset
console [udbg0] enabled
CPU maps initialized for 1 thread per core
 (thread shift is 0)
Starting Linux PPC64 #221 SMP Sun Feb 10 10:50:00 CET 2008
-
ppc64_pft_size= 0x0
physicalMemorySize= 0x8000
htab_address  = 0xc0007c00
htab_hash_mask= 0x3
-
Linux version 2.6.24-g5-0-g25f6663 ([EMAIL PROTECTED]) (gcc version 4.1.0 
(SUSE Linux)) #221 SMP Sun Feb 10 10:50:00 CET 2008
[boot]0012 Setup Arch
Entering add_active_range(0, 0, 524288) 0 entries of 256 used
Found U4-PCIE PCI host bridge.  Firmware bus number: 0-255
PCI host bridge /[EMAIL PROTECTED],f000  ranges:
 MEM 0xf100..0xf1ff - 0xf100 
  IO 0xf000..0xf07f - 0x
 MEM 0x9000..0xafff - 0x9000 
Can't get bus-range for /[EMAIL PROTECTED],f200, assume bus 0
Found U3-HT PCI host bridge.  Firmware bus number: 0-239
PCI host bridge /[EMAIL PROTECTED],f200 (primary) ranges:
SMU: Driver 0.7 (c) 2005 Benjamin Herrenschmidt, IBM Corp.
nvram: Checking bank 0...
nvram: gen0=208, gen1=209
nvram: Active bank is: 1
nvram: OF partition at 0x410
nvram: XP partition at 0x1020
nvram: NR partition at 0x1120
Top of RAM: 0x8000, Total RAM: 0x8000
Memory hole size: 0MB
Zone PFN ranges:
  DMA 0 -   524288
  Normal 524288 -   524288
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0:0 -   524288
On node 0 totalpages: 524288
  DMA zone: 7168 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 517120 pages, LIFO batch:31
  Normal zone: 0 pages used for memmap
  Movable zone: 0 pages used for memmap
[boot]0015 Setup Done
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 517120
Kernel command line: root=UUID=a77c3a2a-dd4a-4cf6-8c74-287c49897b10 sysrq=1 
quiet video=nvidiafb:[EMAIL PROTECTED],bpp:16 panic=12 
mpic: Setting up MPIC  MPIC 1version 1.2 at f804, max 4 CPUs
mpic: ISU size: 124, shift: 7, mask: 7f
mpic: Initializing for 124 sources
mpic: Setting up HT PICs workarounds for U3/U4
mpic:   - HT:07.0 [0x90] vendor 106b device 0053 has 86 irqs
PID hash table entries: 4096 (order: 12, 32768 bytes)
time_init: decrementer frequency = 33.33 MHz
time_init: processor frequency   = 2300.00 MHz
clocksource: timebase mult[781] shift[22] registered
clockevent: decrementer mult[888] shift[16] cpu[0]
Console: colour dummy device 80x25
console handover: boot [udbg0] - real [tty0]
Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
Memory: 2005248k/2097152k available (5984k kernel code, 91208k reserved, 940k 
data, 489k bss, 216k init)
Calibrating delay loop... 66.56 BogoMIPS (lpj=332800)
Mount-cache hash table entries: 256
device-tree: Duplicate name in /[EMAIL PROTECTED],f200/[EMAIL 
PROTECTED]/[EMAIL PROTECTED]/[EMAIL PROTECTED], renamed to [EMAIL PROTECTED]
PowerMac SMP probe found 2 cpus
KeyWest i2c @0xf8001003 irq 16 /[EMAIL PROTECTED],f800/[EMAIL PROTECTED]
 channel 1 bus /[EMAIL PROTECTED],f800/[EMAIL PROTECTED]/[EMAIL PROTECTED]
KeyWest i2c @0x80018000 irq 27 /[EMAIL PROTECTED],f200/[EMAIL 
PROTECTED]/[EMAIL PROTECTED]/[EMAIL PROTECTED]
 channel 0 bus /[EMAIL PROTECTED],f200/[EMAIL PROTECTED]/[EMAIL 
PROTECTED]/[EMAIL PROTECTED]/[EMAIL PROTECTED]
 channel 0 bus /[EMAIL PROTECTED],f200/[EMAIL PROTECTED]/[EMAIL 
PROTECTED]/[EMAIL PROTECTED]/[EMAIL PROTECTED]
SMU i2c /[EMAIL PROTECTED],0/[EMAIL PROTECTED]
 channel b bus /[EMAIL PROTECTED],0/[EMAIL PROTECTED]/[EMAIL PROTECTED]
 channel e bus /[EMAIL PROTECTED],0/[EMAIL PROTECTED]/[EMAIL PROTECTED]
Processor timebase sync using platform function
mpic: requesting IPIs ... 
Processor 1 found.
clockevent: 

[PATCH v4] create modalias file in sysfs for bus of_platform

2008-01-26 Thread Olaf Hering
Create /sys/bus/of_platform/devices/*/modalias file to allow autoloading
of modules. modalias files are already present for many other bus types.

Signed-off-by: Olaf Hering [EMAIL PROTECTED]

---
 drivers/of/device.c   |   33 ++---
 drivers/of/platform.c |3 +++
 2 files changed, 21 insertions(+), 15 deletions(-)

Index: linux-2.6/drivers/of/device.c
===
--- linux-2.6.orig/drivers/of/device.c
+++ linux-2.6/drivers/of/device.c
@@ -77,7 +77,7 @@ void of_dev_put(struct of_device *dev)
 }
 EXPORT_SYMBOL(of_dev_put);
 
-static ssize_t dev_show_devspec(struct device *dev,
+static ssize_t devspec_show(struct device *dev,
struct device_attribute *attr, char *buf)
 {
struct of_device *ofdev;
@@ -86,7 +86,22 @@ static ssize_t dev_show_devspec(struct d
return sprintf(buf, %s, ofdev-node-full_name);
 }
 
-static DEVICE_ATTR(devspec, S_IRUGO, dev_show_devspec, NULL);
+static ssize_t modalias_show(struct device *dev,
+   struct device_attribute *attr, char *buf)
+{
+   ssize_t len;
+
+   len = of_device_get_modalias(to_of_device(dev), buf, PAGE_SIZE - 2);
+   buf[len] = '\n';
+   buf[len+1] = 0;
+   return len+1;
+}
+
+struct device_attribute of_platform_device_attrs[] = {
+   __ATTR_RO(devspec),
+   __ATTR_RO(modalias),
+   __ATTR_NULL
+};
 
 /**
  * of_release_dev - free an of device structure when all users of it are 
finished.
@@ -107,25 +122,13 @@ EXPORT_SYMBOL(of_release_dev);
 
 int of_device_register(struct of_device *ofdev)
 {
-   int rc;
-
BUG_ON(ofdev-node == NULL);
-
-   rc = device_register(ofdev-dev);
-   if (rc)
-   return rc;
-
-   rc = device_create_file(ofdev-dev, dev_attr_devspec);
-   if (rc)
-   device_unregister(ofdev-dev);
-
-   return rc;
+   return device_register(ofdev-dev);
 }
 EXPORT_SYMBOL(of_device_register);
 
 void of_device_unregister(struct of_device *ofdev)
 {
-   device_remove_file(ofdev-dev, dev_attr_devspec);
device_unregister(ofdev-dev);
 }
 EXPORT_SYMBOL(of_device_unregister);
Index: linux-2.6/drivers/of/platform.c
===
--- linux-2.6.orig/drivers/of/platform.c
+++ linux-2.6/drivers/of/platform.c
@@ -17,6 +17,8 @@
 #include linux/of_device.h
 #include linux/of_platform.h
 
+extern struct device_attribute of_platform_device_attrs[];
+
 static int of_platform_bus_match(struct device *dev, struct device_driver *drv)
 {
struct of_device *of_dev = to_of_device(dev);
@@ -93,6 +95,7 @@ int of_bus_type_init(struct bus_type *bu
bus-remove = of_platform_device_remove;
bus-suspend = of_platform_device_suspend;
bus-resume = of_platform_device_resume;
+   bus-dev_attrs = of_platform_device_attrs;
return bus_register(bus);
 }
 
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] create modalias file in sysfs for bus vio

2008-01-25 Thread Olaf Hering
On Wed, Jan 23, Stephen Rothwell wrote:

 It would be nice if we could factor out the vio:T%sS%s string as it is
 also used in vio_hotplug().

What exactly do you have in mind?
Creating a tempstring seems to make things more complicated.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] hide kernel only code in asm-powerpc/elf.h

2008-01-25 Thread Olaf Hering

stuff inside CONFIG_* should not be exported via make headers-install

Signed-off-by: Olaf Hering [EMAIL PROTECTED]

---
 include/asm-powerpc/elf.h |2 ++
 1 file changed, 2 insertions(+)

--- a/include/asm-powerpc/elf.h
+++ b/include/asm-powerpc/elf.h
@@ -420,6 +420,7 @@ do {
\
 /* Keep this the last entry.  */
 #define R_PPC64_NUM107
 
+#ifdef __KERNEL__
 #ifdef CONFIG_SPU_BASE
 /* Notes used in ET_CORE. Note name is SPU/fd/filename. */
 #define NT_SPU 1
@@ -427,5 +428,6 @@ do {
\
 #define ARCH_HAVE_EXTRA_ELF_NOTES
 
 #endif /* CONFIG_SPU_BASE */
+#endif /* __KERNEL__ */
 
 #endif /* _ASM_POWERPC_ELF_H */
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: crash in kmem_cache_init

2008-01-23 Thread Olaf Hering
On Wed, Jan 23, Pekka Enberg wrote:

 Hi Christoph,
 
 On Jan 23, 2008 1:18 AM, Christoph Lameter [EMAIL PROTECTED] wrote:
  My patch is useless (fascinating history of the changelog there through).
  fallback_alloc calls kmem_getpages without GFP_THISNODE. This means that
  alloc_pages_node() will try to allocate on the current node but fallback
  to neighboring node if nothing is there
 
 Sure, but I was referring to the scenario where current node _has_
 pages available but no -nodelists. Olaf, did you try it?

Does not help.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: crash in kmem_cache_init

2008-01-23 Thread Olaf Hering
On Wed, Jan 23, Mel Gorman wrote:

 Sorry this is dragging out. Can you post the full dmesg with loglevel=8 of the
 following patch against 2.6.24-rc8 please? It contains the debug information
 that helped me figure out what was going wrong on the PPC64 machine here,
 the revert and the !l3 checks (i.e. the two patches that made machines I
 have access to work). Thanks

It boots with your change.


boot: x
Please wait, loading kernel...
Allocated 00a0 bytes for kernel @ 0020
   Elf64 kernel loaded...
OF stdout device is: /vdevice/[EMAIL PROTECTED]
Hypertas detected, assuming LPAR !
command line: debug xmon=on panic=1 loglevel=8 
memory layout at init:
  alloc_bottom : 00ac1000
  alloc_top: 1000
  alloc_top_hi : da00
  rmo_top  : 1000
  ram_top  : da00
Looking for displays
found display   : /[EMAIL PROTECTED]/[EMAIL PROTECTED]/[EMAIL PROTECTED]/[EMAIL 
PROTECTED], opening ... done
instantiating rtas at 0x0f6a1000 ... done
 : boot cpu 
0002 : starting cpu hw idx 0002... done
0004 : starting cpu hw idx 0004... done
0006 : starting cpu hw idx 0006... done
copying OF device tree ...
Building dt strings...
Building dt structure...
Device tree strings 0x00cc2000 - 0x00cc34e4
Device tree struct  0x00cc4000 - 0x00cd6000
Calling quiesce ...
returning from prom_init
Partition configured for 8 cpus.
Starting Linux PPC64 #52 SMP Wed Jan 23 13:05:38 CET 2008
-
ppc64_pft_size= 0x1c
physicalMemorySize= 0xda00
htab_hash_mask= 0x1f
-
Linux version 2.6.24-rc8-ppc64 ([EMAIL PROTECTED]) (gcc version 4.1.2 20070115 
(prerelease) (SUSE Linux)) #52 SMP Wed Jan 23 13:05:38 CET 2008
[boot]0012 Setup Arch
EEH: PCI Enhanced I/O Error Handling Enabled
PPC64 nvram contains 8192 bytes
Zone PFN ranges:
  DMA 0 -   892928
  Normal 892928 -   892928
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
1:0 -   892928
Could not find start_pfn for node 0
[boot]0015 Setup Done
Built 2 zonelists in Node order, mobility grouping on.  Total pages: 880720
Policy zone: DMA
Kernel command line: debug xmon=on panic=1 loglevel=8 
[boot]0020 XICS Init
xics: no ISA interrupt controller
[boot]0021 XICS Done
PID hash table entries: 4096 (order: 12, 32768 bytes)
time_init: decrementer frequency = 275.07 MHz
time_init: processor frequency   = 2197.80 MHz
clocksource: timebase mult[e8ab05] shift[22] registered
clockevent: decrementer mult[466a] shift[16] cpu[0]
Console: colour dummy device 80x25
console handover: boot [udbg-1] - real [hvc0]
Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
freeing bootmem node 1
Memory: 3496632k/3571712k available (6188k kernel code, 75080k reserved, 1324k 
data, 1220k bss, 304k init)
Online nodes
o 0
o 1
Nodes with regular memory
o 1
Current running CPU 0 is associated with node 0
Current node is 0
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 0
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 1
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 2
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 3
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 4
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 5
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 6
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 7
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 8
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 9
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 10
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 11
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 12
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 13
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 14
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 15
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 16
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 17
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 18
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 19
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 20
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 21
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 22
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 23
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 24
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 25
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 26
 o kmem_list3_init
kmem_cache_init Setting kmem_cache NULL 27
 o kmem_list3_init

Re: crash in kmem_cache_init

2008-01-23 Thread Olaf Hering
On Wed, Jan 23, Olaf Hering wrote:

 On Wed, Jan 23, Mel Gorman wrote:
 
  Sorry this is dragging out. Can you post the full dmesg with loglevel=8 of 
  the
  following patch against 2.6.24-rc8 please? It contains the debug information
  that helped me figure out what was going wrong on the PPC64 machine here,
  the revert and the !l3 checks (i.e. the two patches that made machines I
  have access to work). Thanks
 
 It boots with your change.

This version of the patch boots ok for me:
Maybe I made a mistake with earlier patches, no idea.

---
 mm/slab.c |   17 +
 1 file changed, 13 insertions(+), 4 deletions(-)

--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1590,7 +1590,7 @@ void __init kmem_cache_init(void)
/* Replace the static kmem_list3 structures for the boot cpu */
init_list(cache_cache, initkmem_list3[CACHE_CACHE], node);
 
-   for_each_node_state(nid, N_NORMAL_MEMORY) {
+   for_each_online_node(nid) {
init_list(malloc_sizes[INDEX_AC].cs_cachep,
  initkmem_list3[SIZE_AC + nid], nid);
 
@@ -1968,7 +1968,7 @@ static void __init set_up_list3s(struct 
 {
int node;
 
-   for_each_node_state(node, N_NORMAL_MEMORY) {
+   for_each_online_node(node) {
cachep-nodelists[node] = initkmem_list3[index + node];
cachep-nodelists[node]-next_reap = jiffies +
REAPTIMEOUT_LIST3 +
@@ -2099,7 +2099,7 @@ static int __init_refok setup_cpu_cache(
g_cpucache_up = PARTIAL_L3;
} else {
int node;
-   for_each_node_state(node, N_NORMAL_MEMORY) {
+   for_each_online_node(node) {
cachep-nodelists[node] =
kmalloc_node(sizeof(struct kmem_list3),
GFP_KERNEL, node);
@@ -2775,6 +2775,11 @@ static int cache_grow(struct kmem_cache 
/* Take the l3 list lock to change the colour_next on this node */
check_irq_off();
l3 = cachep-nodelists[nodeid];
+   if (!l3) {
+   nodeid = numa_node_id();
+   l3 = cachep-nodelists[nodeid];
+   }
+   BUG_ON(!l3);
spin_lock(l3-list_lock);
 
/* Get colour for the slab, and cal the next value. */
@@ -3317,6 +3322,10 @@ static void *cache_alloc_node(struct
int x;
 
l3 = cachep-nodelists[nodeid];
+   if (!l3) {
+   nodeid = numa_node_id();
+   l3 = cachep-nodelists[nodeid];
+   }
BUG_ON(!l3);
 
 retry:
@@ -3815,7 +3824,7 @@ static int alloc_kmemlist(struct kmem_ca
struct array_cache *new_shared;
struct array_cache **new_alien = NULL;
 
-   for_each_node_state(node, N_NORMAL_MEMORY) {
+   for_each_online_node(node) {
 
 if (use_alien_caches) {
 new_alien = alloc_alien_cache(node, cachep-limit);
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] Fix boot problem in situations where the boot CPU is running on a memoryless node

2008-01-23 Thread Olaf Hering
On Wed, Jan 23, Mel Gorman wrote:

 This patch in combination with a partial revert of commit
 04231b3002ac53f8a64a7bd142fde3fa4b6808c6 fixes a regression between 2.6.23
 and 2.6.24-rc8 where a PPC64 machine with all CPUS on a memoryless node fails
 to boot. If approved by the SLAB maintainers, it should be merged for 2.6.24.

This change alone does not help, its not the version I tested.
Will all the changes below go into 2.6.24 as well, in a seperate patch?

-   for_each_node_state(node, N_NORMAL_MEMORY) {
+   for_each_online_node(node) {

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] create modalias file in sysfs for bus vio

2008-01-22 Thread Olaf Hering

Create /sys/bus/vio/devices/*/modalias file to allow autoloading
of modules. modalias files are already present for many other bus types.

Signed-off-by: Olaf Hering [EMAIL PROTECTED]
---
 arch/powerpc/kernel/vio.c |   15 +++
 1 file changed, 15 insertions(+)

--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -296,9 +296,24 @@ static ssize_t devspec_show(struct devic
return sprintf(buf, %s\n, of_node ? of_node-full_name : none);
 }
 
+static ssize_t modalias_show (struct device *dev, struct device_attribute 
*attr,
+ char *buf)
+{
+   struct device_node *of_node = dev-archdata.of_node;
+   const char *compat;
+   int i = 0;
+
+   if (of_node) {
+   compat = of_get_property(of_node, compatible, i);
+   i = sprintf (buf, vio:T%sS%s\n, of_node-type, compat ? 
compat : );
+   }
+   return i;
+}
+
 static struct device_attribute vio_dev_attrs[] = {
__ATTR_RO(name),
__ATTR_RO(devspec),
+   __ATTR_RO(modalias),
__ATTR_NULL
 };
 
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] create modalias file in sysfs for bus of_platform

2008-01-22 Thread Olaf Hering

Create /sys/bus/of_platform/devices/*/modalias file to allow autoloading
of modules. modalias files are already present for many other bus types.

Signed-off-by: Olaf Hering [EMAIL PROTECTED]

---
 drivers/of/device.c |   18 ++
 1 file changed, 18 insertions(+)

--- a/drivers/of/device.c
+++ b/drivers/of/device.c
@@ -86,7 +86,19 @@ static ssize_t dev_show_devspec(struct d
return sprintf(buf, %s, ofdev-node-full_name);
 }
 
+static ssize_t dev_show_modalias(struct device *dev,
+   struct device_attribute *attr, char *buf)
+{
+   struct of_device *ofdev = to_of_device(dev);
+   ssize_t len = 0;
+
+   if (ofdev)
+   len = of_device_get_modalias(ofdev, buf, PAGE_SIZE);
+   return len;
+}
+
 static DEVICE_ATTR(devspec, S_IRUGO, dev_show_devspec, NULL);
+static DEVICE_ATTR(modalias, S_IRUGO, dev_show_modalias, NULL);
 
 /**
  * of_release_dev - free an of device structure when all users of it are 
finished.
@@ -116,6 +128,11 @@ int of_device_register(struct of_device 
return rc;
 
rc = device_create_file(ofdev-dev, dev_attr_devspec);
+   if (rc) {
+   device_unregister(ofdev-dev);
+   return rc;
+   }
+   rc = device_create_file(ofdev-dev, dev_attr_modalias);
if (rc)
device_unregister(ofdev-dev);
 
@@ -126,6 +143,7 @@ EXPORT_SYMBOL(of_device_register);
 void of_device_unregister(struct of_device *ofdev)
 {
device_remove_file(ofdev-dev, dev_attr_devspec);
+   device_remove_file(ofdev-dev, dev_attr_modalias);
device_unregister(ofdev-dev);
 }
 EXPORT_SYMBOL(of_device_unregister);
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH v2] create modalias file in sysfs for bus of_platform

2008-01-22 Thread Olaf Hering
Create /sys/bus/of_platform/devices/*/modalias file to allow autoloading
of modules. modalias files are already present for many other bus types.

Signed-off-by: Olaf Hering [EMAIL PROTECTED]

---
 drivers/of/device.c |   19 +++
 1 file changed, 19 insertions(+)

--- a/drivers/of/device.c
+++ b/drivers/of/device.c
@@ -86,7 +86,20 @@ static ssize_t dev_show_devspec(struct d
return sprintf(buf, %s, ofdev-node-full_name);
 }
 
+static ssize_t dev_show_modalias(struct device *dev,
+   struct device_attribute *attr, char *buf)
+{
+   struct of_device *ofdev = to_of_device(dev);
+   ssize_t len = 0;
+
+   len = of_device_get_modalias(ofdev, buf, PAGE_SIZE);
+   buf[len] = '\n';
+   buf[len+1] = 0;
+   return len+1;
+}
+
 static DEVICE_ATTR(devspec, S_IRUGO, dev_show_devspec, NULL);
+static DEVICE_ATTR(modalias, S_IRUGO, dev_show_modalias, NULL);
 
 /**
  * of_release_dev - free an of device structure when all users of it are 
finished.
@@ -116,6 +129,11 @@ int of_device_register(struct of_device 
return rc;
 
rc = device_create_file(ofdev-dev, dev_attr_devspec);
+   if (rc) {
+   device_unregister(ofdev-dev);
+   return rc;
+   }
+   rc = device_create_file(ofdev-dev, dev_attr_modalias);
if (rc)
device_unregister(ofdev-dev);
 
@@ -126,6 +144,7 @@ EXPORT_SYMBOL(of_device_register);
 void of_device_unregister(struct of_device *ofdev)
 {
device_remove_file(ofdev-dev, dev_attr_devspec);
+   device_remove_file(ofdev-dev, dev_attr_modalias);
device_unregister(ofdev-dev);
 }
 EXPORT_SYMBOL(of_device_unregister);
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH v3] create modalias file in sysfs for bus of_platform

2008-01-22 Thread Olaf Hering

Create /sys/bus/of_platform/devices/*/modalias file to allow autoloading
of modules. modalias files are already present for many other bus types.

Signed-off-by: Olaf Hering [EMAIL PROTECTED]

---
 drivers/of/device.c |   19 +++
 1 file changed, 19 insertions(+)

--- a/drivers/of/device.c
+++ b/drivers/of/device.c
@@ -86,7 +86,20 @@ static ssize_t dev_show_devspec(struct d
return sprintf(buf, %s, ofdev-node-full_name);
 }
 
+static ssize_t dev_show_modalias(struct device *dev,
+   struct device_attribute *attr, char *buf)
+{
+   struct of_device *ofdev = to_of_device(dev);
+   ssize_t len = 0;
+
+   len = of_device_get_modalias(ofdev, buf, PAGE_SIZE - 2);
+   buf[len] = '\n';
+   buf[len+1] = 0;
+   return len+1;
+}
+
 static DEVICE_ATTR(devspec, S_IRUGO, dev_show_devspec, NULL);
+static DEVICE_ATTR(modalias, S_IRUGO, dev_show_modalias, NULL);
 
 /**
  * of_release_dev - free an of device structure when all users of it are 
finished.
@@ -116,6 +129,11 @@ int of_device_register(struct of_device 
return rc;
 
rc = device_create_file(ofdev-dev, dev_attr_devspec);
+   if (rc) {
+   device_unregister(ofdev-dev);
+   return rc;
+   }
+   rc = device_create_file(ofdev-dev, dev_attr_modalias);
if (rc)
device_unregister(ofdev-dev);
 
@@ -126,6 +144,7 @@ EXPORT_SYMBOL(of_device_register);
 void of_device_unregister(struct of_device *ofdev)
 {
device_remove_file(ofdev-dev, dev_attr_devspec);
+   device_remove_file(ofdev-dev, dev_attr_modalias);
device_unregister(ofdev-dev);
 }
 EXPORT_SYMBOL(of_device_unregister);
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: crash in kmem_cache_init

2008-01-22 Thread Olaf Hering
On Tue, Jan 22, Mel Gorman wrote:

 http://www.csn.ul.ie/~mel/postings/slab-20080122/partial-revert-slab-changes.patch
 .. Can you please check on your machine if it fixes your problem?

It does not fix or change the nature of the crash.

 Olaf, please confirm whether you need the patch below as well as the
 revert to make your machine boot.

It crashes now in a different way if the patch below is applied:

Linux version 2.6.24-rc8-ppc64 ([EMAIL PROTECTED]) (gcc version 4.1.2 20070115 
(prerelease) (SUSE Linux)) #43 SMP Tue Jan 22 22:39:05 CET 2008
[boot]0012 Setup Arch
EEH: PCI Enhanced I/O Error Handling Enabled
PPC64 nvram contains 8192 bytes
Zone PFN ranges:
  DMA 0 -   892928
  Normal 892928 -   892928
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
1:0 -   892928
Could not find start_pfn for node 0
[boot]0015 Setup Done
Built 2 zonelists in Node order, mobility grouping on.  Total pages: 880720
Policy zone: DMA
Kernel command line: debug xmon=on panic=1  
[boot]0020 XICS Init
xics: no ISA interrupt controller
[boot]0021 XICS Done
PID hash table entries: 4096 (order: 12, 32768 bytes)
time_init: decrementer frequency = 275.07 MHz
time_init: processor frequency   = 2197.80 MHz
clocksource: timebase mult[e8ab05] shift[22] registered
clockevent: decrementer mult[466a] shift[16] cpu[0]
Console: colour dummy device 80x25
console handover: boot [udbg-1] - real [hvc0]
Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
freeing bootmem node 1
Memory: 3496632k/3571712k available (6188k kernel code, 75080k reserved, 1324k 
data, 1220k bss, 304k init)
Unable to handle kernel paging request for data at address 0x0058
Faulting instruction address: 0xc00fe018
cpu 0x0: Vector: 300 (Data Access) at [c075bac0]
pc: c00fe018: .setup_cpu_cache+0x184/0x1f4
lr: c00fdfa8: .setup_cpu_cache+0x114/0x1f4
sp: c075bd40
   msr: 80009032
   dar: 58
 dsisr: 4200
  current = 0xc0665a50
  paca= 0xc0666380
pid   = 0, comm = swapper
enter ? for help
[c075bd40] c00fb368 .kmem_cache_create+0x3c0/0x478 (unreliable)
[c075be20] c05e6780 .kmem_cache_init+0x284/0x4f4
[c075bee0] c05bf8ec .start_kernel+0x2f8/0x3fc
[c075bf90] c0008590 .start_here_common+0x60/0xd0
0:mon 

0xc00fe018 is in setup_cpu_cache 
(/home/olaf/kernel/git/linux-2.6-numa/mm/slab.c:2111).
2106BUG_ON(!cachep-nodelists[node]);
2107
kmem_list3_init(cachep-nodelists[node]);
2108}
2109}
2110}
2111cachep-nodelists[numa_node_id()]-next_reap =
2112jiffies + REAPTIMEOUT_LIST3 +
2113((unsigned long)cachep) % REAPTIMEOUT_LIST3;
2114
2115cpu_cache_get(cachep)-avail = 0;

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: crash in kmem_cache_init

2008-01-22 Thread Olaf Hering
On Tue, Jan 22, Christoph Lameter wrote:

  0xc00fe018 is in setup_cpu_cache 
  (/home/olaf/kernel/git/linux-2.6-numa/mm/slab.c:2111).
  2106BUG_ON(!cachep-nodelists[node]);
  2107
  kmem_list3_init(cachep-nodelists[node]);
  2108}
  2109}
  2110}
 
 if (cachep-nodelists[numa_node_id()])
   return;

Does not help.


Linux version 2.6.24-rc8-ppc64 ([EMAIL PROTECTED]) (gcc version 4.1.2 20070115 
(prerelease) (SUSE Linux)) #48 SMP Wed Jan 23 08:54:23 CET 2008
[boot]0012 Setup Arch
EEH: PCI Enhanced I/O Error Handling Enabled
PPC64 nvram contains 8192 bytes
Zone PFN ranges:
  DMA 0 -   892928
  Normal 892928 -   892928
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
1:0 -   892928
Could not find start_pfn for node 0
[boot]0015 Setup Done
Built 2 zonelists in Node order, mobility grouping on.  Total pages: 880720
Policy zone: DMA
Kernel command line: debug xmon=on panic=1  
[boot]0020 XICS Init
xics: no ISA interrupt controller
[boot]0021 XICS Done
PID hash table entries: 4096 (order: 12, 32768 bytes)
time_init: decrementer frequency = 275.07 MHz
time_init: processor frequency   = 2197.80 MHz
clocksource: timebase mult[e8ab05] shift[22] registered
clockevent: decrementer mult[466a] shift[16] cpu[0]
Console: colour dummy device 80x25
console handover: boot [udbg-1] - real [hvc0]
Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
freeing bootmem node 1
Memory: 3496632k/3571712k available (6188k kernel code, 75080k reserved, 1324k 
data, 1220k bss, 304k init)
Kernel panic - not syncing: kmem_cache_create(): failed to create slab 
`size-32(DMA)'

Rebooting in 1 seconds..

---
 mm/slab.c |   17 ++---
 1 file changed, 14 insertions(+), 3 deletions(-)

--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1590,7 +1590,7 @@ void __init kmem_cache_init(void)
/* Replace the static kmem_list3 structures for the boot cpu */
init_list(cache_cache, initkmem_list3[CACHE_CACHE], node);
 
-   for_each_node_state(nid, N_NORMAL_MEMORY) {
+   for_each_online_node(nid) {
init_list(malloc_sizes[INDEX_AC].cs_cachep,
  initkmem_list3[SIZE_AC + nid], nid);
 
@@ -1968,7 +1968,7 @@ static void __init set_up_list3s(struct 
 {
int node;
 
-   for_each_node_state(node, N_NORMAL_MEMORY) {
+   for_each_online_node(node) {
cachep-nodelists[node] = initkmem_list3[index + node];
cachep-nodelists[node]-next_reap = jiffies +
REAPTIMEOUT_LIST3 +
@@ -2108,6 +2108,8 @@ static int __init_refok setup_cpu_cache(
}
}
}
+   if (!cachep-nodelists[numa_node_id()])
+   return -ENODEV;
cachep-nodelists[numa_node_id()]-next_reap =
jiffies + REAPTIMEOUT_LIST3 +
((unsigned long)cachep) % REAPTIMEOUT_LIST3;
@@ -2775,6 +2777,11 @@ static int cache_grow(struct kmem_cache 
/* Take the l3 list lock to change the colour_next on this node */
check_irq_off();
l3 = cachep-nodelists[nodeid];
+   if (!l3) {
+   nodeid = numa_node_id();
+   l3 = cachep-nodelists[nodeid];
+   }
+   BUG_ON(!l3);
spin_lock(l3-list_lock);
 
/* Get colour for the slab, and cal the next value. */
@@ -3317,6 +3324,10 @@ static void *cache_alloc_node(struct
int x;
 
l3 = cachep-nodelists[nodeid];
+   if (!l3) {
+   nodeid = numa_node_id();
+   l3 = cachep-nodelists[nodeid];
+   }
BUG_ON(!l3);
 
 retry:
@@ -3815,7 +3826,7 @@ static int alloc_kmemlist(struct kmem_ca
struct array_cache *new_shared;
struct array_cache **new_alien = NULL;
 
-   for_each_node_state(node, N_NORMAL_MEMORY) {
+   for_each_online_node(node) {
 
 if (use_alien_caches) {
 new_alien = alloc_alien_cache(node, cachep-limit);
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] revert chrp_pci_fixup_vt8231_ata devinit to fix libata on pegasos

2008-01-21 Thread Olaf Hering

commit 6d98bda79bea0e1be26c0767d0e9923ad3b72f2e changed the init order
for chrp_pci_fixup_vt8231_ata()
It can not work anymore because either the irq is not yet set to 14 or
pci_get_device() returns nothing. At least the printk() in
chrp_pci_fixup_vt8231_ata() does not trigger anymore.
pata_via works again on Pegasos with the change below.

Signed-off-by: Olaf Hering [EMAIL PROTECTED]

--- a/arch/powerpc/platforms/chrp/pci.c
+++ b/arch/powerpc/platforms/chrp/pci.c
@@ -354,7 +354,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_WI
  * mode as well. The same fixup must be done to the class-code property in
  * the IDE node /[EMAIL PROTECTED]/[EMAIL PROTECTED],1
  */
-static void __devinit chrp_pci_fixup_vt8231_ata(struct pci_dev *viaide)
+static void chrp_pci_fixup_vt8231_ata(struct pci_dev *viaide)
 {
u8 progif;
struct pci_dev *viaisa;
@@ -375,4 +375,4 @@ static void __devinit chrp_pci_fixup_vt8
 
pci_dev_put(viaisa);
 }
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, 
chrp_pci_fixup_vt8231_ata);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, 
chrp_pci_fixup_vt8231_ata);
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] autodetect serial console on pegasos2

2008-01-21 Thread Olaf Hering
Autodetect the serial console on Pegasos2.

Signed-off-by: Olaf Hering [EMAIL PROTECTED]

---
 arch/powerpc/platforms/chrp/setup.c |   52 
 1 file changed, 52 insertions(+)

--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -251,6 +251,57 @@ static void briq_restart(char *cmd)
for(;;);
 }
 
+/*
+ * Per default, input/output-device points to the keyboard/screen
+ * If no card is installed, the built-in serial port is used as a fallback.
+ * But unfortunately, the firmware does not connect /chosen/{stdin,stdout}
+ * the the built-in serial node. Instead, a /failsafe node is created.
+ */
+static void chrp_init_early(void)
+{
+   struct device_node *node;
+   const char *property;
+
+   if (strstr(cmd_line, console=))
+   return;
+   /* find the boot console from /chosen/stdout */
+   if (!of_chosen)
+   return;
+   node = of_find_node_by_path(/);
+   if (!node)
+   return;
+   property = of_get_property(node, model, NULL);
+   if (!property)
+   goto out_put;
+   if (strcmp(property, Pegasos2))
+   goto out_put;
+   /* this is a Pegasos2 */
+   property = of_get_property(of_chosen, linux,stdout-path, NULL);
+   if (!property)
+   goto out_put;
+   of_node_put(node);
+   node = of_find_node_by_path(property);
+   if (!node)
+   return;
+   property = of_get_property(node, device_type, NULL);
+   if (!property)
+   goto out_put;
+   if (strcmp(property, serial))
+   goto out_put;
+   /*
+* The 9pin connector is either /failsafe
+* or /[EMAIL PROTECTED]/[EMAIL PROTECTED]/[EMAIL PROTECTED]
+* The optional graphics card has also type 'serial' in VGA mode.
+*/
+   property = of_get_property(node, name, NULL);
+   if (!property)
+   goto out_put;
+   if (!strcmp(property, failsafe) || !strcmp(property, serial))
+   add_preferred_console(ttyS, 0, NULL);
+out_put:
+   of_node_put(node);
+}
+
 void __init chrp_setup_arch(void)
 {
struct device_node *root = of_find_node_by_path(/);
@@ -594,6 +645,7 @@ define_machine(chrp) {
.probe  = chrp_probe,
.setup_arch = chrp_setup_arch,
.init   = chrp_init2,
+   .init_early = chrp_init_early,
.show_cpuinfo   = chrp_show_cpuinfo,
.init_IRQ   = chrp_init_IRQ,
.restart= rtas_restart,
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] autodetect serial console on efika

2008-01-21 Thread Olaf Hering
On Mon, Jan 21, Grant Likely wrote:

 On 1/21/08, Olaf Hering [EMAIL PROTECTED] wrote:
 
  Efika boards have to be booted with console=ttyPSC0 unless there is a
  graphics card plugged in. Detect if the firmware stdout is the serial
  connector.
 
  Signed-off-by: Olaf Hering [EMAIL PROTECTED]
 
 Hrrrum; I think this is a good idea, but I'm not thrilled with the
 approach.  Here are my concerns:
 
 - Determining that linux,stdout-path points to a PSC should should be
 done in common code.  It's useful for all 5200 boards, not just the
 Efika.  (However, if 'failsafe' processing is efika specific, then it
 can stay in efika.c).  This might be best done within the PSC driver
 itself, but I'm not sure.
 - Recognizing a psc node should be done by inspecting the compatible
 property, not by device_type and model properties.

I dont have any other 5200 hardware to test a different patch.
Please improve my version and submit it for inclusion.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] add modalias info to mv643xx_eth.ko

2008-01-18 Thread Olaf Hering
mv643xx_eth has an platform modalias file in sysfs.
But the module itself has no alias: line. Autoloading fails
without the alias info in the module.

Signed-off-by: Olaf Hering [EMAIL PROTECTED]

---
 drivers/net/mv643xx_eth.c |1 +
 1 file changed, 1 insertion(+)

--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -2099,6 +2099,7 @@ MODULE_LICENSE(GPL);
 MODULE_AUTHOR( Rabeeh Khoury, Assaf Hoffman, Matthew Dharm, Manish Lachwani
 and Dale Farnsworth);
 MODULE_DESCRIPTION(Ethernet driver for Marvell MV643XX);
+MODULE_ALIAS(platform:mv643xx_eth);
 
 /*
  * The second part is the low level driver of the gigE ethernet ports.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: crash in kmem_cache_init

2008-01-17 Thread Olaf Hering
On Thu, Jan 17, Christoph Lameter wrote:

 On Thu, 17 Jan 2008, Pekka Enberg wrote:
 
  Looks similar to the one discussed on linux-mm ([BUG] at
  mm/slab.c:3320 thread). Christoph?
 
 Right. Try the latest version of the patch to fix it:

The patch does not help.
 
 Index: linux-2.6/mm/slab.c
 ===
 --- linux-2.6.orig/mm/slab.c  2008-01-03 12:26:42.0 -0800
 +++ linux-2.6/mm/slab.c   2008-01-09 15:59:49.0 -0800
 @@ -2977,7 +2977,10 @@ retry:
   }
   l3 = cachep-nodelists[node];
  
 - BUG_ON(ac-avail  0 || !l3);
 + if (!l3)
 + return NULL;
 +
 + BUG_ON(ac-avail  0);
   spin_lock(l3-list_lock);
  
   /* See if we can refill from the shared array */

Is this hunk supposed to go into cache_grow()? There is no NULL check
for l3.

But if I do that, it does not help:

freeing bootmem node 1
Memory: 3496632k/3571712k available (6188k kernel code, 75080k reserved, 1324k 
data, 1220k bss, 304k init)
cache_grow(2781) swapper(0):c0,j4294937299 cp c06a4fb8 !l3
Kernel panic - not syncing: kmem_cache_create(): failed to create slab `size-32'

Rebooting in 1 seconds..

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: crash in kmem_cache_init

2008-01-17 Thread Olaf Hering
On Thu, Jan 17, Christoph Lameter wrote:

  freeing bootmem node 1
  Memory: 3496632k/3571712k available (6188k kernel code, 75080k reserved, 
  1324k data, 1220k bss, 304k init)
  cache_grow(2781) swapper(0):c0,j4294937299 cp c06a4fb8 !l3
 
 Is there more backtrace information? What function called cache_grow?

I just put a 'if (!l3) return 0;' into cache_grow, the backtrace is the
one from the initial report.
Reverting 04231b3002ac53f8a64a7bd142fde3fa4b6808c6 does not change
anything.


Since -mm boots further, what patch should I try?

The kernel boots on a different p570.
See attached dmesg. huckleberry boots, cranberry crashes.


--- huckleberry.suse.de-2.6.16.57-0.5-ppc64.txt 2008-01-17 20:48:18.510309000 
+0100
+++ cranberry.suse.de-2.6.16.57-0.5-ppc64.txt   2008-01-17 20:48:09.425402000 
+0100
@@ -1,56 +1,55 @@
 Page orders: linear mapping = 24, others = 12
-Found initrd at 0xc270:0xc2a93000
+Found initrd at 0xc130:0xc16e6c1e
 Partition configured for 8 cpus.
 Starting Linux PPC64 #1 SMP Wed Dec 5 09:02:21 UTC 2007
 -
-ppc64_pft_size= 0x1b
+ppc64_pft_size= 0x1c
 ppc64_interrupt_controller= 0x2
 platform  = 0x101
-physicalMemorySize= 0x15800
+physicalMemorySize= 0xda00
 ppc64_caches.dcache_line_size = 0x80
 ppc64_caches.icache_line_size = 0x80
 htab_address  = 0x
-htab_hash_mask= 0xf
+htab_hash_mask= 0x1f
 -
 [boot]0100 MM Init
 [boot]0100 MM Init Done
 Linux version 2.6.16.57-0.5-ppc64 ([EMAIL PROTECTED]) (gcc version 4.1.2 
20070115 (prerelease) (SUSE Linux)) #1 SMP Wed Dec 5 09:02:21 UTC 2007
 [boot]0012 Setup Arch
-Node 0 Memory: 0x0-0xb000
-Node 1 Memory: 0xb000-0x15800
+Node 0 Memory:
+Node 1 Memory: 0x0-0xda00
 EEH: PCI Enhanced I/O Error Handling Enabled
-PPC64 nvram contains 7168 bytes
+PPC64 nvram contains 8192 bytes
 Using dedicated idle loop
-On node 0 totalpages: 720896
-  DMA zone: 720896 pages, LIFO batch:31
+On node 0 totalpages: 0
+  DMA zone: 0 pages, LIFO batch:0
   DMA32 zone: 0 pages, LIFO batch:0
   Normal zone: 0 pages, LIFO batch:0
   HighMem zone: 0 pages, LIFO batch:0
-On node 1 totalpages: 688128
-  DMA zone: 688128 pages, LIFO batch:31
+On node 1 totalpages: 892928
+  DMA zone: 892928 pages, LIFO batch:31
   DMA32 zone: 0 pages, LIFO batch:0
   Normal zone: 0 pages, LIFO batch:0
   HighMem zone: 0 pages, LIFO batch:0
 [boot]0015 Setup Done
 Built 2 zonelists
-Kernel command line: 
root=/dev/disk/by-id/scsi-SIBM_ST373453LC_3HW1CPW57445Q010-part5  xmon=on 
sysrq=1 quiet 
+Kernel command line: root=/dev/system/root  xmon=on sysrq=1 quiet 
 [boot]0020 XICS Init
 xics: no ISA interrupt controller
 [boot]0021 XICS Done
 PID hash table entries: 4096 (order: 12, 131072 bytes)
-time_init: decrementer frequency = 207.052000 MHz
-time_init: processor frequency   = 1654.344000 MHz
+time_init: decrementer frequency = 275.07 MHz
+time_init: processor frequency   = 2197.80 MHz
 Console: colour dummy device 80x25
-Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes)
-Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes)
-freeing bootmem node 0
+Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
+Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
 freeing bootmem node 1
-Memory: 5524952k/5636096k available (4464k kernel code, 44k reserved, 
1992k data, 836k bss, 264k init)
-Calibrating delay loop... 413.69 BogoMIPS (lpj=2068480)
+Memory: 3494648k/3571712k available (4464k kernel code, 77064k reserved, 1992k 
data, 836k bss, 264k init)
+Calibrating delay loop... 548.86 BogoMIPS (lpj=2744320)
 Security Framework v1.0.0 initialized
 Mount-cache hash table entries: 256
 checking if image is initramfs... it is
-Freeing initrd memory: 3660k freed
+Freeing initrd memory: 3995k freed
 Processor 1 found.
 Processor 2 found.
 Processor 3 found.
@@ -61,7 +60,7 @@ Processor 7 found.
 Brought up 8 CPUs
 Node 0 CPUs: 0-3
 Node 1 CPUs: 4-7
-migration_cost=41,0,4308
+migration_cost=38,0,3225
 NET: Registered protocol family 16
 PCI: Probing PCI hardware
 IOMMU table initialized, virtual merging enabled
Page orders: linear mapping = 24, others = 12
Found initrd at 0xc270:0xc2a93000
Partition configured for 8 cpus.
Starting Linux PPC64 #1 SMP Wed Dec 5 09:02:21 UTC 2007
-
ppc64_pft_size= 0x1b
ppc64_interrupt_controller= 0x2
platform  = 0x101
physicalMemorySize= 0x15800
ppc64_caches.dcache_line_size = 0x80
ppc64_caches.icache_line_size = 0x80
htab_address  = 0x
htab_hash_mask= 0xf
-

Re: crash in kmem_cache_init

2008-01-17 Thread Olaf Hering
On Thu, Jan 17, Olaf Hering wrote:

 Since -mm boots further, what patch should I try?

rc8-mm1 crashes as well, l3 passed to reap_alien() is NULL.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: crash in kmem_cache_init

2008-01-17 Thread Olaf Hering
On Thu, Jan 17, Christoph Lameter wrote:

 On Thu, 17 Jan 2008, Olaf Hering wrote:
 
  The patch does not help.
 
 Duh. We need to know more about the problem.

cache_grow is called from 3 places. The third call has cleared l3 for
some reason.



Allocated 00a0 bytes for kernel @ 0020
   Elf64 kernel loaded...
OF stdout device is: /vdevice/[EMAIL PROTECTED]
Hypertas detected, assuming LPAR !
command line:  xmon=on sysrq=1 debug panic=1 
memory layout at init:
  alloc_bottom : 00ac1000
  alloc_top: 1000
  alloc_top_hi : da00
  rmo_top  : 1000
  ram_top  : da00
Looking for displays
found display   : /[EMAIL PROTECTED]/[EMAIL PROTECTED]/[EMAIL PROTECTED]/[EMAIL 
PROTECTED], opening ... done
instantiating rtas at 0x0f6a1000 ... done
 : boot cpu 
0002 : starting cpu hw idx 0002... done
0004 : starting cpu hw idx 0004... done
0006 : starting cpu hw idx 0006... done
copying OF device tree ...
Building dt strings...
Building dt structure...
Device tree strings 0x00cc2000 - 0x00cc34e4
Device tree struct  0x00cc4000 - 0x00cd6000
Calling quiesce ...
returning from prom_init
Partition configured for 8 cpus.
Starting Linux PPC64 #34 SMP Thu Jan 17 22:06:41 CET 2008
-
ppc64_pft_size= 0x1c
physicalMemorySize= 0xda00
htab_hash_mask= 0x1f
-
Linux version 2.6.24-rc8-ppc64 ([EMAIL PROTECTED]) (gcc version 4.1.2 20070115 
(prerelease) (SUSE Linux)) #34 SMP Thu Jan 17 22:06:41 CET 2008
[boot]0012 Setup Arch
EEH: PCI Enhanced I/O Error Handling Enabled
PPC64 nvram contains 8192 bytes
Zone PFN ranges:
  DMA 0 -   892928
  Normal 892928 -   892928
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
1:0 -   892928
Could not find start_pfn for node 0
[boot]0015 Setup Done
Built 2 zonelists in Node order, mobility grouping on.  Total pages: 880720
Policy zone: DMA
Kernel command line:  xmon=on sysrq=1 debug panic=1 
[boot]0020 XICS Init
xics: no ISA interrupt controller
[boot]0021 XICS Done
PID hash table entries: 4096 (order: 12, 32768 bytes)
time_init: decrementer frequency = 275.07 MHz
time_init: processor frequency   = 2197.80 MHz
clocksource: timebase mult[e8ab05] shift[22] registered
clockevent: decrementer mult[466a] shift[16] cpu[0]
Console: colour dummy device 80x25
console handover: boot [udbg-1] - real [hvc0]
Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
freeing bootmem node 1
Memory: 3496633k/3571712k available (6188k kernel code, 75080k reserved, 1324k 
data, 1220k bss, 304k init)
cache_grow(2778) swapper(0):c0,j4294937299 cachep c06a4fb8 nodeid 0 l3 
c05fddf0
cache_grow(2778) swapper(0):c0,j4294937299 cachep c06a4fb8 nodeid 1 l3 
c05fddf0
cache_grow(2778) swapper(0):c0,j4294937299 cachep c06a4fb8 nodeid 2 l3 
c05fddf0
cache_grow(2778) swapper(0):c0,j4294937299 cachep c06a4fb8 nodeid 3 l3 
c05fddf0
[ cut here ]
Badness at /home/olaf/kernel/git/linux-2.6.24-rc8/mm/slab.c:2779
NIP: c00f78f4 LR: c00f78e0 CTR: 801af404
REGS: c075b880 TRAP: 0700   Not tainted  (2.6.24-rc8-ppc64)
MSR: 80029032 EE,ME,IR,DR  CR: 2422  XER: 0001
TASK = c0665a50[0] 'swapper' THREAD: c0758000 CPU: 0
GPR00: 0004 c075bb00 c07544c0 0063 
GPR04: 0001 0001   
GPR08:  c06a19a0 c07a84b0 c07a84a8 
GPR12: 4000 c0666380   
GPR16:    4020 
GPR20:  007fbd70 c054f6c8 000492d0 
GPR24:  c06a4fb8 c06a4fb8 c05fdc80 
GPR28:  000412d0 c06e5b80 0004 
NIP [c00f78f4] .cache_grow+0xc8/0x39c
LR [c00f78e0] .cache_grow+0xb4/0x39c
Call Trace:
[c075bb00] [c00f78e0] .cache_grow+0xb4/0x39c (unreliable)
[c075bbd0] [c00f82d0] .cache_alloc_refill+0x234/0x2c0
[c075bc90] [c00f842c] .kmem_cache_alloc+0xd0/0x294
[c075bd40] [c00fb4e8] .kmem_cache_create+0x208/0x478
[c075be20] [c05e670c] .kmem_cache_init+0x218/0x4f4
[c075bee0] [c05bf8ec] .start_kernel+0x2f8/0x3fc
[c075bf90] [c0008590] .start_here_common+0x60/0xd0
Instruction dump:
e89e80e0 e92a e80b0468 7f4ad378 fbe10070 f8010078 4bf85f01 6000 
381f0001 7c1f07b4 2f9f0004

crash in kmem_cache_init

2008-01-15 Thread Olaf Hering

Current linus tree crashes in kmem_cache_init, as shown below. The
system is a 8cpu 2.2GHz POWER5 system, model 9117-570, with 4GB ram.
Firmware is 240_332, 2.6.23 boots ok with the same config.

There is a series of mm related patches in 2.6.24-rc1:
commit 04231b3002ac53f8a64a7bd142fde3fa4b6808c6 seems to break it,

== .git/BISECT_LOG ==
git-bisect start
# good: [0b8bc8b91cf6befea20fe78b90367ca7b61cfa0d] Linux 2.6.23
git-bisect good 0b8bc8b91cf6befea20fe78b90367ca7b61cfa0d
# bad: [cebdeed27b068dcc3e7c311d7ec0d9c33b5138c2] Linux 2.6.24-rc1
git-bisect bad cebdeed27b068dcc3e7c311d7ec0d9c33b5138c2
# good: [9ac52315d4cf5f561f36dabaf0720c00d3553162] sched: guest CPU accounting: 
add guest-CPU /proc/pid/stat fields
git-bisect good 9ac52315d4cf5f561f36dabaf0720c00d3553162
# bad: [b9ec0339d8e22cadf2d9d1b010b51dc53837dfb0] add consts where appropriate 
in fs/nls/Kconfig fs/nls/Makefile fs/nls/nls_ascii.c fs/nls/nls_base.c 
fs/nls/nls_cp1250.c fs/nls/nls_cp1251.c fs/nls/nls_cp1255.c fs/nls/nls_cp437.c 
fs/nls/nls_cp737.c fs/nls/nls_cp775.c fs/nls/nls_cp850.c fs/nls/nls_cp852.c 
fs/nls/nls_cp855.c fs/nls/nls_cp857.c fs/nls/nls_cp860.c fs/nls/nls_cp861.c 
fs/nls/nls_cp862.c fs/nls/nls_cp863.c fs/nls/nls_cp864.c fs/nls/nls_cp865.c 
fs/nls/nls_cp866.c fs/nls/nls_cp869.c fs/nls/nls_cp874.c fs/nls/nls_cp932.c 
fs/nls/nls_cp936.c fs/nls/nls_cp949.c fs/nls/nls_cp950.c fs/nls/nls_euc-jp.c 
fs/nls/nls_iso8859-1.c fs/nls/nls_iso8859-13.c fs/nls/nls_iso8859-14.c 
fs/nls/nls_iso8859-15.c fs/nls/nls_iso8859-2.c fs/nls/nls_iso8859-3.c 
fs/nls/nls_iso8859-4.c fs/nls/nls_iso8859-5.c fs/nls/nls_iso8859-6.c 
fs/nls/nls_iso8859-7.c fs/nls/nls_iso8859-9.c fs/nls/nls_koi8-r.c 
fs/nls/nls_koi8-ru.c fs/nls/nls_koi8-u.c fs/nls/nls_utf8.c
git-bisect bad b9ec0339d8e22cadf2d9d1b010b51dc53837dfb0
# bad: [78a26e25ce4837a03ac3b6c32cdae1958e547639] uml: separate timer 
initialization
git-bisect bad 78a26e25ce4837a03ac3b6c32cdae1958e547639
# good: [4acad72ded8e3f0211bd2a762e23c28229c61a51] [IPV6]: Consolidate the 
ip6_pol_route_(input|output) pair
git-bisect good 4acad72ded8e3f0211bd2a762e23c28229c61a51
# good: [64da82efae0d7b5f7c478021840fd329f76d965d] Add support for PCMCIA card 
Sierra WIreless AC850
git-bisect good 64da82efae0d7b5f7c478021840fd329f76d965d
# bad: [37b07e4163f7306aa735a6e250e8d22293e5b8de] memoryless nodes: fixup uses 
of node_online_map in generic code
git-bisect bad 37b07e4163f7306aa735a6e250e8d22293e5b8de
# good: [64649a58919e66ec21792dbb6c48cb3da22cbd7f] mm: trim more holes
git-bisect good 64649a58919e66ec21792dbb6c48cb3da22cbd7f
# good: [fb53b3094888be0cf8ddf052277654268904bdf5] smbfs: convert to new aops
git-bisect good fb53b3094888be0cf8ddf052277654268904bdf5
# good: [13808910713a98cc1159291e62cdfec92cc94d05] Memoryless nodes: Generic 
management of nodemasks for various purposes




 .
Please wait, loading kernel...
Allocated 00a0 bytes for kernel @ 0020
   Elf64 kernel loaded...
OF stdout device is: /vdevice/[EMAIL PROTECTED]
Hypertas detected, assuming LPAR !
command line: panic=1 debug xmon=on
memory layout at init:
  alloc_bottom : 00ac1000
  alloc_top: 1000
  alloc_top_hi : da00
  rmo_top  : 1000
  ram_top  : da00
Looking for displays
found display   : /[EMAIL PROTECTED]/[EMAIL PROTECTED]/[EMAIL PROTECTED]/[EMAIL 
PROTECTED], opening ... done
instantiating rtas at 0x0f6a1000 ... done
 : boot cpu 
0002 : starting cpu hw idx 0002... done
0004 : starting cpu hw idx 0004... done
0006 : starting cpu hw idx 0006... done
copying OF device tree ...
Building dt strings...
Building dt structure...
Device tree strings 0x00cc2000 - 0x00cc34e4
Device tree struct  0x00cc4000 - 0x00cd6000
Calling quiesce ...
returning from prom_init
Partition configured for 8 cpus.
Starting Linux PPC64 #2 SMP Tue Jan 15 14:23:02 CET 2008
-
ppc64_pft_size= 0x1c
physicalMemorySize= 0xda00
htab_hash_mask= 0x1f
-
Linux version 2.6.24-rc7-ppc64 ([EMAIL PROTECTED]) (gcc version 4.1.2 20070115 
(prerelease) (SUSE Linux)) #2 SMP Tue Jan 15 14:23:02 CET 2008
[boot]0012 Setup Arch
EEH: PCI Enhanced I/O Error Handling Enabled
PPC64 nvram contains 8192 bytes
Zone PFN ranges:
  DMA 0 -   892928
  Normal 892928 -   892928
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
1:0 -   892928
Could not find start_pfn for node 0
[boot]0015 Setup Done
Built 2 zonelists in Node order, mobility grouping on.  Total pages: 880720
Policy zone: DMA
Kernel command line: panic=1 debug xmon=on
[boot]0020 XICS Init
xics: no ISA interrupt controller
[boot]0021 XICS Done
PID hash table entries: 4096 (order: 12, 32768 bytes)
time_init: decrementer 

Re: [RFC] add phy-handle property for fec_mpc52xx

2008-01-10 Thread Olaf Hering
On Wed, Jan 09, Grant Likely wrote:

 From: Olaf Hering [EMAIL PROTECTED]
 
 The new network driver fec_mpc52xx will not work on efika because the
 firmware does not provide all required properties.
 http://www.powerdeveloper.org/asset/by-id/46 has a Forth script to
 create more properties. But only the phy stuff is required to get a
 working network.
 
 This should go into the kernel because its appearently
 impossible to boot the script via tftp and then load the real boot
 binary (yaboot or zimage).
 
 (Olaf's s-o-b line needs to go here)
 Signed-off-by: Grant Likely [EMAIL PROTECTED]


Signed-off-by: Olaf Hering [EMAIL PROTECTED]

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


add phy-handle property for fec_mpc52xx

2008-01-09 Thread Olaf Hering

The new network driver fec_mpc52xx will not work on efika because the
firmware does not provide all required properties.
http://www.powerdeveloper.org/asset/by-id/46 has a Forth script to
create more properties. But only the phy stuff is required to get a
working network.

This should go into the kernel because its appearently
impossible to boot the script via tftp and then load the real boot
binary (yaboot or zimage).

---
 arch/powerpc/kernel/prom_init.c |   28 
 1 file changed, 28 insertions(+)

--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -1487,6 +1487,34 @@ static void __init prom_find_mmu(void)
else if (strncmp(version, FirmWorks,3., 12) == 0) {
of_workarounds = OF_WA_CLAIM | OF_WA_LONGTRAIL;
call_prom(interpret, 1, 1, dev /memory 0 to allow-reclaim);
+#ifdef CONFIG_PPC_MPC52xx
+   } else if (strcmp(version, EFIKA5K2) == 0) {
+   call_prom(interpret, 1, 1,
+.\ Adding EFIKA5K2 Ethernet PHY\ cr
+s\ /builtin\ find-device
+new-device
+1 encode-int s\ #address-cells\ property
+0 encode-int s\ #size-cells\ property
+s\ mdio\ 2dup device-name device-type
+s\ mpc5200b-fec-phy\ encode-string s\ 
compatible\ property
+0xf0003000 0x400 reg
+0x2 encode-int
+0x5 encode-int encode+
+0x3 encode-int encode+
+s\ interrupts\ property
+new-device
+s\ ethernet-phy\ 2dup device-name 
device-type
+0x10 encode-int s\ reg\ property
+my-self
+ihandlephandle
+finish-device
+finish-device
+s\ /builtin/ethernet\ find-device
+encode-int
+s\ phy-handle\ property
+device-end
+   );
+#endif
} else
return;
_prom-memory = call_prom(open, 1, 1, ADDR(/memory));
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] powerpc: fix os-term usage on kernel panic

2007-11-29 Thread Olaf Hering
On Wed, Nov 28, Linas Vepstas wrote:

 On Wed, Nov 28, 2007 at 12:00:37PM +0100, Olaf Hering wrote:
  On Tue, Nov 27, Will Schmidt wrote:

-   if (panic_timeout)
-   return;
  
  This change is wrong. Booting with panic=123 really means the system
  has to reboot in 123 seconds after a panic.
 
 And it does.

Have you ever tried it? Current state is that the JS20 hangs after
panic, simply because it calls into the hypervisor (or whatever).
To reproduce:
 mkdir ../O-os-term
 cp arch/powerpc/configs/pseries_defconfig ../O-os-term/.config
 yes '' | make -kj6 O=../O-os-term zImage
 scp -4pr ../O-os-term/arch/powerpc/boot/zImage [EMAIL PROTECTED]:/tftpboot/js20


 boot /[EMAIL PROTECTED]/[EMAIL PROTECTED]/[EMAIL PROTECTED],1 debug panic=1 
root=/dev/sdx42


Whoever relies on the string passing to the HMC can boot with panic=0 or
use some sysctl to write to /proc/sys/kernel/panic
So, please restore the panic_timeout check.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] autoload snd-powermac via modalias

2007-11-07 Thread Olaf Hering

Autoload snd-powermac on systems without i2s bus by creating a fake
modalias entry. udev/modprobe will use the 'modalias' file from
/sys/devices/pci*/*/*/*:mac-io/*:davbus/ to find a matching module.
Newer systems use snd-aoa, which provides the required modalias already.

Some systems with i2s bus, but without a 'layout-id' property, will not work
with this patch because an fake i2s alias will conflict with snd-aoa.


Signed-off-by: Olaf Hering [EMAIL PROTECTED]

---
 sound/ppc/powermac.c |   10 ++
 1 file changed, 10 insertions(+)

--- a/sound/ppc/powermac.c
+++ b/sound/ppc/powermac.c
@@ -174,6 +174,16 @@ static struct platform_driver snd_pmac_d
},
 };
 
+/* for NewWorld AGP (Pismo, CRT iMac) */
+MODULE_ALIAS(of:NdavbusTsoundbusCdavbus);
+/* for OldWorld beige G3 */
+/* for NewWorld PCI (G3 and early G4) */
+MODULE_ALIAS(of:NdavbusTdavbus);
+/* for OldWorld ohare based */
+MODULE_ALIAS(of:NdavbusTsoundbus);
+/* for OldWorld bandit based */
+MODULE_ALIAS(of:NawacsTsound);
+
 static int __init alsa_card_pmac_init(void)
 {
int err;
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] Bugfix to commit 4f9a58d75bfe82ab2b8ba5b8506dfb190a267834

2007-10-23 Thread Olaf Hering
On Mon, Oct 22, Grant Likely wrote:

 Olaf, do I have the correct solution here?

Sure.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] fix mace_handle_misc_intrs compilation

2007-09-24 Thread Olaf Hering

Fix compilation after incomplete struct net_device changes.

Signed-off-by: Olaf Hering [EMAIL PROTECTED]

---
 drivers/net/mace.c |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/drivers/net/mace.c
+++ b/drivers/net/mace.c
@@ -633,7 +633,7 @@ static void mace_set_multicast(struct ne
 spin_unlock_irqrestore(mp-lock, flags);
 }
 
-static void mace_handle_misc_intrs(struct mace_data *mp, int intr)
+static void mace_handle_misc_intrs(struct mace_data *mp, int intr, struct 
net_device *dev)
 {
 volatile struct mace __iomem *mb = mp-mace;
 static int mace_babbles, mace_jabbers;
@@ -669,7 +669,7 @@ static irqreturn_t mace_interrupt(int ir
 spin_lock_irqsave(mp-lock, flags);
 intr = in_8(mb-ir);  /* read interrupt register */
 in_8(mb-xmtrc);  /* get retries */
-mace_handle_misc_intrs(mp, intr);
+mace_handle_misc_intrs(mp, intr, dev);
 
 i = mp-tx_empty;
 while (in_8(mb-pr)  XMTSV) {
@@ -682,7 +682,7 @@ static irqreturn_t mace_interrupt(int ir
 */
intr = in_8(mb-ir);
if (intr != 0)
-   mace_handle_misc_intrs(mp, intr);
+   mace_handle_misc_intrs(mp, intr, dev);
if (mp-tx_bad_runt) {
fs = in_8(mb-xmtfs);
mp-tx_bad_runt = 0;
@@ -817,7 +817,7 @@ static void mace_tx_timeout(unsigned lon
goto out;
 
 /* update various counters */
-mace_handle_misc_intrs(mp, in_8(mb-ir));
+mace_handle_misc_intrs(mp, in_8(mb-ir), dev);
 
 cp = mp-tx_cmds + NCMDS_TX * mp-tx_empty;
 
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


resume crashes with active cpufreq_userspace

2007-09-12 Thread Olaf Hering

2.6.22.5 crashes on resume on an iBook G3 600MHz. when cpufreq_userspace is
active. System is PowerBook4,3, 750FX revision 2.3
2.6.18 crashed also on resume, but I dont know if this was the same bug.

The oopes differ. Once I get an 'Unrecoverable FP Unavailable
Exception 801' in audit_log_vformat, hald-addon-cpuf was the active task.
Only the first two function were printed in the oops backtrace.

Another one was during a pagefault in cpufreq code, while events/0 was
the active task.

Most of the time, the screen stays black with only the cursor in the
upper left corner, sometimes not even that.

Resume seems to work ok on other models, like my own ibook with 745/755
cpu, revision 51.17, PowerBook4,1
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] fix pmac_zilog debug arg

2007-08-26 Thread Olaf Hering

drivers/serial/pmac_zilog.c:1590: warning: format '%d' expects type 'int', but 
argument 3 has type 'pm_message_t'

Signed-off-by: Olaf Hering [EMAIL PROTECTED]

---
 drivers/serial/pmac_zilog.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/serial/pmac_zilog.c
+++ b/drivers/serial/pmac_zilog.c
@@ -1587,7 +1587,7 @@ static int pmz_suspend(struct macio_dev 
if (pm_state.event == mdev-ofdev.dev.power.power_state.event)
return 0;
 
-   pmz_debug(suspend, switching to state %d\n, pm_state);
+   pmz_debug(suspend, switching to state %d\n, pm_state.event);
 
state = pmz_uart_reg.state + uap-port.line;
 
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] fix undefined reference to device_power_up/resume

2007-08-25 Thread Olaf Hering
On Sat, Aug 25, Paul Mackerras wrote:

 Olaf Hering writes:
 
  So change even more places from PM to PM_SLEEP to allow linking.
 
 What config shows these errors?  I presume you need to have CONFIG_PM
 but not CONFIG_PM_SLEEP in order to see them?

The .config below boots on a wallstreet.
atyfb hangs for some reason, pcmcia still broken. I will send separate
mails for these bugs.


#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.23-rc3
# Fri Aug 24 21:05:04 2007
#
# CONFIG_PPC64 is not set

#
# Processor support
#
CONFIG_6xx=y
# CONFIG_PPC_85xx is not set
# CONFIG_PPC_8xx is not set
# CONFIG_40x is not set
# CONFIG_44x is not set
# CONFIG_E200 is not set
CONFIG_PPC_FPU=y
# CONFIG_ALTIVEC is not set
CONFIG_PPC_STD_MMU=y
CONFIG_PPC_STD_MMU_32=y
# CONFIG_PPC_MM_SLICES is not set
# CONFIG_SMP is not set
CONFIG_PPC32=y
CONFIG_PPC_MERGE=y
CONFIG_MMU=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_IRQ_PER_CPU=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_ARCH_HAS_ILOG2_U32=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_GENERIC_FIND_NEXT_BIT=y
# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
CONFIG_PPC=y
CONFIG_EARLY_PRINTK=y
CONFIG_GENERIC_NVRAM=y
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_PPC_OF=y
CONFIG_OF=y
# CONFIG_PPC_UDBG_16550 is not set
# CONFIG_GENERIC_TBSYNC is not set
CONFIG_AUDIT_ARCH=y
CONFIG_GENERIC_BUG=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
# CONFIG_DEFAULT_UIMAGE is not set
# CONFIG_PPC_DCR_NATIVE is not set
# CONFIG_PPC_DCR_MMIO is not set
CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=-wallstreet
CONFIG_LOCALVERSION_AUTO=y
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
# CONFIG_USER_NS is not set
# CONFIG_AUDIT is not set
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=21
CONFIG_SYSFS_DEPRECATED=y
# CONFIG_RELAY is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
# CONFIG_EMBEDDED is not set
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_ANON_INODES=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_SLAB=y
# CONFIG_SLUB is not set
# CONFIG_SLOB is not set
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0
# CONFIG_MODULES is not set
CONFIG_BLOCK=y
# CONFIG_LBD is not set
# CONFIG_BLK_DEV_IO_TRACE is not set
# CONFIG_LSF is not set
# CONFIG_BLK_DEV_BSG is not set

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
# CONFIG_IOSCHED_AS is not set
# CONFIG_IOSCHED_DEADLINE is not set
# CONFIG_IOSCHED_CFQ is not set
# CONFIG_DEFAULT_AS is not set
# CONFIG_DEFAULT_DEADLINE is not set
# CONFIG_DEFAULT_CFQ is not set
CONFIG_DEFAULT_NOOP=y
CONFIG_DEFAULT_IOSCHED=noop

#
# Platform support
#
CONFIG_PPC_MULTIPLATFORM=y
# CONFIG_EMBEDDED6xx is not set
# CONFIG_PPC_82xx is not set
# CONFIG_PPC_83xx is not set
# CONFIG_PPC_86xx is not set
CONFIG_CLASSIC32=y
# CONFIG_PPC_CHRP is not set
# CONFIG_PPC_MPC52xx is not set
# CONFIG_PPC_MPC5200 is not set
# CONFIG_PPC_EFIKA is not set
# CONFIG_PPC_LITE5200 is not set
CONFIG_PPC_PMAC=y
# CONFIG_PPC_CELL is not set
# CONFIG_PPC_CELL_NATIVE is not set
# CONFIG_PQ2ADS is not set
CONFIG_PPC_NATIVE=y
CONFIG_MPIC=y
# CONFIG_MPIC_WEIRD is not set
# CONFIG_PPC_I8259 is not set
# CONFIG_PPC_RTAS is not set
# CONFIG_MMIO_NVRAM is not set
CONFIG_PPC_MPC106=y
# CONFIG_PPC_970_NAP is not set
# CONFIG_PPC_INDIRECT_IO is not set
# CONFIG_GENERIC_IOMAP is not set
# CONFIG_CPU_FREQ is not set
# CONFIG_PPC601_SYNC_FIX is not set
# CONFIG_TAU is not set
# CONFIG_CPM2 is not set
# CONFIG_FSL_ULI1575 is not set

#
# Kernel options
#
# CONFIG_HIGHMEM is not set
CONFIG_HZ_100=y
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not set
# CONFIG_HZ_1000 is not set
CONFIG_HZ=100
CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=y
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
# CONFIG_KEXEC is not set
CONFIG_ARCH_FLATMEM_ENABLE=y
CONFIG_ARCH_POPULATES_NODE_MAP=y
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
# CONFIG_DISCONTIGMEM_MANUAL is not set
# CONFIG_SPARSEMEM_MANUAL is not set
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
# CONFIG_SPARSEMEM_STATIC is not set
CONFIG_SPLIT_PTLOCK_CPUS=4
# CONFIG_RESOURCES_64BIT is not set
CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y
CONFIG_VIRT_TO_BUS=y
CONFIG_PROC_DEVICETREE=y
# CONFIG_CMDLINE_BOOL is not set
CONFIG_PM=y
# CONFIG_PM_LEGACY is not set
# CONFIG_PM_DEBUG is not set
# CONFIG_SUSPEND is not set
# CONFIG_HIBERNATION is not set
CONFIG_APM_EMULATION=y
# CONFIG_SECCOMP is not set

[PATCH] atyfb: force 29MHz xtal on G3 PowerBooks

2007-08-25 Thread Olaf Hering

The atyfb does not work on my 233MHz PowerBook with Mach64 LP, when the
kernel is booted from firmware. aty_ld_pll_ct() returns 0x22 and xtal
remains at 14.31818. When booted from MacOS, aty_ld_pll_ct() returns 0x3c
and xtal is changed to 29.498928.
Google indicates that all 4 PowerBook models need the higher value.

Signed-off-by: Olaf Hering [EMAIL PROTECTED]

--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -2411,7 +2411,7 @@ static int __devinit aty_init(struct fb_
diff1 = -diff1;
if (diff2  0)
diff2 = -diff2;
-   if (diff2  diff1) {
+   if (diff2  diff1 || (M64_HAS(G3_PB_1024x768))) {
par-ref_clk_per = 1ULL / 29498928;
xtal = 29.498928;
}
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] bmac: add simple ethtool support for network manager

2007-08-25 Thread Olaf Hering

NetworkManager will not start dhcpd on an interface unless it reports
link-up state via ethtool.

Signed-off-by: Olaf Hering [EMAIL PROTECTED]

---
 drivers/net/bmac.c |   13 +
 1 file changed, 13 insertions(+)

--- a/drivers/net/bmac.c
+++ b/drivers/net/bmac.c
@@ -19,6 +19,7 @@
 #include linux/spinlock.h
 #include linux/crc32.h
 #include linux/bitrev.h
+#include linux/ethtool.h
 #include asm/prom.h
 #include asm/dbdma.h
 #include asm/io.h
@@ -1246,6 +1247,17 @@ static void bmac_reset_and_enable(struct
}
spin_unlock_irqrestore(bp-lock, flags);
 }
+static void bmac_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo 
*info)
+{
+   struct bmac_data *bp = netdev_priv(dev);
+   strcpy(info-driver, bmac);
+   strcpy(info-bus_info, bp-mdev-ofdev.dev.bus_id);
+}
+
+static const struct ethtool_ops bmac_ethtool_ops = {
+   .get_drvinfo= bmac_get_drvinfo,
+   .get_link   = ethtool_op_get_link,
+};
 
 static int __devinit bmac_probe(struct macio_dev *mdev, const struct 
of_device_id *match)
 {
@@ -1311,6 +1323,7 @@ static int __devinit bmac_probe(struct m
 
dev-open = bmac_open;
dev-stop = bmac_close;
+   dev-ethtool_ops = bmac_ethtool_ops;
dev-hard_start_xmit = bmac_output;
dev-get_stats = bmac_stats;
dev-set_multicast_list = bmac_set_multicast;
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] fix undefined reference to device_power_up/resume

2007-08-24 Thread Olaf Hering

Current Linus tree fails to link on pmac32:

drivers/built-in.o: In function `pmac_wakeup_devices':
via-pmu.c:(.text+0x5bab4): undefined reference to `device_power_up'
via-pmu.c:(.text+0x5bb08): undefined reference to `device_resume'
drivers/built-in.o: In function `pmac_suspend_devices':
via-pmu.c:(.text+0x5c260): undefined reference to `device_power_down'
via-pmu.c:(.text+0x5c27c): undefined reference to `device_resume'
make[1]: *** [.tmp_vmlinux1] Error 1

changing CONFIG_PM  CONFIG_PM_SLEEP leads to:

drivers/built-in.o: In function `pmu_led_set':
via-pmu-led.c:(.text+0x5cdca): undefined reference to `pmu_sys_suspended'
via-pmu-led.c:(.text+0x5cdce): undefined reference to `pmu_sys_suspended'
drivers/built-in.o: In function `pmu_req_done':
via-pmu-led.c:(.text+0x5ce3e): undefined reference to `pmu_sys_suspended'
via-pmu-led.c:(.text+0x5ce42): undefined reference to `pmu_sys_suspended'
drivers/built-in.o: In function `adb_init':
(.init.text+0x4c5c): undefined reference to `pmu_register_sleep_notifier'
make[1]: *** [.tmp_vmlinux1] Error 1

So change even more places from PM to PM_SLEEP to allow linking.

Signed-off-by: Olaf Hering [EMAIL PROTECTED]

---
 drivers/macintosh/adb.c |4 ++--
 drivers/macintosh/via-pmu.c |   34 +-
 include/linux/pmu.h |2 +-
 3 files changed, 20 insertions(+), 20 deletions(-)

--- a/drivers/macintosh/adb.c
+++ b/drivers/macintosh/adb.c
@@ -89,7 +89,7 @@ static int sleepy_trackpad;
 static int autopoll_devs;
 int __adb_probe_sync;
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static void adb_notify_sleep(struct pmu_sleep_notifier *self, int when);
 static struct pmu_sleep_notifier adb_sleep_notifier = {
adb_notify_sleep,
@@ -313,7 +313,7 @@ int __init adb_init(void)
printk(KERN_WARNING Warning: no ADB interface detected\n);
adb_controller = NULL;
} else {
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
pmu_register_sleep_notifier(adb_sleep_notifier);
 #endif /* CONFIG_PM */
 #ifdef CONFIG_PPC
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -152,10 +152,10 @@ static spinlock_t pmu_lock;
 static u8 pmu_intr_mask;
 static int pmu_version;
 static int drop_interrupts;
-#if defined(CONFIG_PM)  defined(CONFIG_PPC32)
+#if defined(CONFIG_PM_SLEEP)  defined(CONFIG_PPC32)
 static int option_lid_wakeup = 1;
-#endif /* CONFIG_PM  CONFIG_PPC32 */
-#if 
(defined(CONFIG_PM)defined(CONFIG_PPC32))||defined(CONFIG_PMAC_BACKLIGHT_LEGACY)
+#endif /* CONFIG_PM_SLEEP  CONFIG_PPC32 */
+#if 
(defined(CONFIG_PM_SLEEP)defined(CONFIG_PPC32))||defined(CONFIG_PMAC_BACKLIGHT_LEGACY)
 static int sleep_in_progress;
 #endif
 static unsigned long async_req_locks;
@@ -875,7 +875,7 @@ proc_read_options(char *page, char **sta
 {
char *p = page;
 
-#if defined(CONFIG_PM)  defined(CONFIG_PPC32)
+#if defined(CONFIG_PM_SLEEP)  defined(CONFIG_PPC32)
if (pmu_kind == PMU_KEYLARGO_BASED 
pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) = 0)
p += sprintf(p, lid_wakeup=%d\n, option_lid_wakeup);
@@ -916,7 +916,7 @@ proc_write_options(struct file *file, co
*(val++) = 0;
while(*val == ' ')
val++;
-#if defined(CONFIG_PM)  defined(CONFIG_PPC32)
+#if defined(CONFIG_PM_SLEEP)  defined(CONFIG_PPC32)
if (pmu_kind == PMU_KEYLARGO_BASED 
pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) = 0)
if (!strcmp(label, lid_wakeup))
@@ -1738,7 +1738,7 @@ pmu_present(void)
return via != 0;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 
 static LIST_HEAD(sleep_notifiers);
 
@@ -1769,9 +1769,9 @@ pmu_unregister_sleep_notifier(struct pmu
return 0;
 }
 EXPORT_SYMBOL(pmu_unregister_sleep_notifier);
-#endif /* CONFIG_PM */
+#endif /* CONFIG_PM_SLEEP */
 
-#if defined(CONFIG_PM)  defined(CONFIG_PPC32)
+#if defined(CONFIG_PM_SLEEP)  defined(CONFIG_PPC32)
 
 /* Sleep is broadcast last-to-first */
 static void broadcast_sleep(int when)
@@ -2390,7 +2390,7 @@ powerbook_sleep_3400(void)
return 0;
 }
 
-#endif /* CONFIG_PM  CONFIG_PPC32 */
+#endif /* CONFIG_PM_SLEEP  CONFIG_PPC32 */
 
 /*
  * Support for /dev/pmu device
@@ -2573,7 +2573,7 @@ pmu_ioctl(struct inode * inode, struct f
int error = -EINVAL;
 
switch (cmd) {
-#if defined(CONFIG_PM)  defined(CONFIG_PPC32)
+#if defined(CONFIG_PM_SLEEP)  defined(CONFIG_PPC32)
case PMU_IOC_SLEEP:
if (!capable(CAP_SYS_ADMIN))
return -EACCES;
@@ -2601,7 +2601,7 @@ pmu_ioctl(struct inode * inode, struct f
return put_user(0, argp);
else
return put_user(1, argp);
-#endif /* CONFIG_PM  CONFIG_PPC32 */
+#endif /* CONFIG_PM_SLEEP  CONFIG_PPC32 */
 
 #ifdef CONFIG_PMAC_BACKLIGHT_LEGACY
/* Compatibility ioctl's for backlight */
@@ -2757,7 +2757,7 @@ pmu_polled_request(struct adb_request *r
  * to do suspend-to-disk

[PATCH] advertise correct IDE mode on Pegasos2

2007-08-17 Thread Olaf Hering

The built-in IDE controller is configured in legacy mode,
but the PCI registers advertise native mode.
Force the PCI class into legacy mode. This allows pata_via to access
two drives.
The Pegasos specific irq enforcement in the via82cxxx driver
can be removed.

Tested on Pegasos2 with firmware version 20040810, and two IDE disks.


Signed-off-by: Olaf Hering [EMAIL PROTECTED]

---
 arch/powerpc/kernel/prom_init.c   |   11 ---
 arch/powerpc/platforms/chrp/pci.c |   28 
 drivers/ide/pci/via82cxxx.c   |7 ---
 3 files changed, 36 insertions(+), 10 deletions(-)

--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -2041,6 +2041,7 @@ static void __init fixup_device_tree_map
 /*
  * Pegasos and BriQ lacks the ranges property in the isa node
  * Pegasos needs decimal IRQ 14/15, not hexadecimal
+ * Pegasos has the IDE configured in legacy mode, but advertised as native
  */
 static void __init fixup_device_tree_chrp(void)
 {
@@ -2078,9 +2079,13 @@ static void __init fixup_device_tree_chr
prom_printf(Fixing up IDE interrupt on Pegasos...\n);
prop[0] = 14;
prop[1] = 0x0;
-   prop[2] = 15;
-   prop[3] = 0x0;
-   prom_setprop(ph, name, interrupts, prop, 4*sizeof(u32));
+   prom_setprop(ph, name, interrupts, prop, 2*sizeof(u32));
+   prom_printf(Fixing up IDE class-code on Pegasos...\n);
+   rc = prom_getprop(ph, class-code, prop, sizeof(u32));
+   if (rc == sizeof(u32)) {
+   prop[0] = ~0x5;
+   prom_setprop(ph, name, class-code, prop, sizeof(u32));
+   }
}
 }
 #else
--- a/arch/powerpc/platforms/chrp/pci.c
+++ b/arch/powerpc/platforms/chrp/pci.c
@@ -338,3 +338,31 @@ void chrp_pci_fixup_winbond_ata(struct p
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105,
chrp_pci_fixup_winbond_ata);
+
+/* Pegasos2 firmware version 20040810 configures the built-in IDE controller
+ * in legacy mode, but sets the PCI registers to PCI native mode.
+ * The chip can only operate in legacy mode, so force the PCI class into legacy
+ * mode as well. The same fixup must be done to the class-code property in
+ * the IDE node /[EMAIL PROTECTED]/[EMAIL PROTECTED],1
+ */
+static void chrp_pci_fixup_vt8231_ata(struct pci_dev *viaide)
+{
+   u8 progif;
+   struct pci_dev *viaisa;
+
+   if (!machine_is(chrp) || _chrp_type != _CHRP_Pegasos)
+   return;
+   if (viaide-irq != 14)
+   return;
+
+   viaisa = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8231, 
NULL);
+   if (!viaisa)
+   return;
+   printk(Fixing VIA IDE, force legacy mode on '%s'\n, 
viaide-dev.bus_id);
+
+   pci_read_config_byte(viaide, PCI_CLASS_PROG, progif);
+   pci_write_config_byte(viaide, PCI_CLASS_PROG, progif  ~0x5);
+
+   pci_dev_put(viaisa);
+}
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, 
chrp_pci_fixup_vt8231_ata);
--- a/drivers/ide/pci/via82cxxx.c
+++ b/drivers/ide/pci/via82cxxx.c
@@ -436,13 +436,6 @@ static void __devinit init_hwif_via82cxx
hwif-tuneproc = via82cxxx_tune_drive;
hwif-speedproc = via_set_drive;
 
-
-#ifdef CONFIG_PPC_CHRP
-   if(machine_is(chrp)  _chrp_type == _CHRP_Pegasos) {
-   hwif-irq = hwif-channel ? 15 : 14;
-   }
-#endif
-
for (i = 0; i  2; i++) {
hwif-drives[i].io_32bit = 1;
hwif-drives[i].unmask = (vdev-via_config-flags  
VIA_NO_UNMASK) ? 0 : 1;
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] advertise correct IDE mode on Pegasos2

2007-08-17 Thread Olaf Hering
On Fri, Aug 17, Olaf Hering wrote:

Still not 100% perfect.

 + prom_printf(Fixing up IDE class-code on Pegasos...\n);
 + rc = prom_getprop(ph, class-code, prop, sizeof(u32));
 + if (rc == sizeof(u32)) {
 + prop[0] = ~0x5;
 + prom_setprop(ph, name, class-code, prop, sizeof(u32));
 + }

This updates the class code in the device-tree, but sysfs still shows
the old value.

 + pci_read_config_byte(viaide, PCI_CLASS_PROG, progif);
 + pci_write_config_byte(viaide, PCI_CLASS_PROG, progif  ~0x5);

Is this a readonly register by any chance?
Appending a 'viaide-class = ~0x5;' changes the code paths in
do_ide_setup_pci_device(), now IDE prints 'not 100%% native mode,
will probe irqs later'. Where are the irqs supposed to come from?

 -#ifdef CONFIG_PPC_CHRP
 - if(machine_is(chrp)  _chrp_type == _CHRP_Pegasos) {
 - hwif-irq = hwif-channel ? 15 : 14;
 - }
 -#endif

Maybe we should just leave this in and dont bother about the arch
specific tweak?
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] advertise correct IDE mode on Pegasos2

2007-08-17 Thread Olaf Hering
The built-in IDE controller is configured in legacy mode,
but the PCI registers advertise native mode.
Force the PCI class into legacy mode. This allows pata_via to access
two drives.
The Pegasos specific irq enforcement in the via82cxxx driver
must stay because there is aparently no generic way to setup irq per channel.

Tested on Pegasos2 with firmware version 20040810, and two IDE disks.

Signed-off-by: Olaf Hering [EMAIL PROTECTED]

---
 arch/powerpc/kernel/prom_init.c   |   11 ---
 arch/powerpc/platforms/chrp/pci.c |   29 +
 2 files changed, 37 insertions(+), 3 deletions(-)

--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -2044,6 +2044,7 @@ static void __init fixup_device_tree_map
 /*
  * Pegasos and BriQ lacks the ranges property in the isa node
  * Pegasos needs decimal IRQ 14/15, not hexadecimal
+ * Pegasos has the IDE configured in legacy mode, but advertised as native
  */
 static void __init fixup_device_tree_chrp(void)
 {
@@ -2081,9 +2082,13 @@ static void __init fixup_device_tree_chr
prom_printf(Fixing up IDE interrupt on Pegasos...\n);
prop[0] = 14;
prop[1] = 0x0;
-   prop[2] = 15;
-   prop[3] = 0x0;
-   prom_setprop(ph, name, interrupts, prop, 4*sizeof(u32));
+   prom_setprop(ph, name, interrupts, prop, 2*sizeof(u32));
+   prom_printf(Fixing up IDE class-code on Pegasos...\n);
+   rc = prom_getprop(ph, class-code, prop, sizeof(u32));
+   if (rc == sizeof(u32)) {
+   prop[0] = ~0x5;
+   prom_setprop(ph, name, class-code, prop, sizeof(u32));
+   }
}
 }
 #else
--- a/arch/powerpc/platforms/chrp/pci.c
+++ b/arch/powerpc/platforms/chrp/pci.c
@@ -338,3 +338,32 @@ void chrp_pci_fixup_winbond_ata(struct p
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105,
chrp_pci_fixup_winbond_ata);
+
+/* Pegasos2 firmware version 20040810 configures the built-in IDE controller
+ * in legacy mode, but sets the PCI registers to PCI native mode.
+ * The chip can only operate in legacy mode, so force the PCI class into legacy
+ * mode as well. The same fixup must be done to the class-code property in
+ * the IDE node /[EMAIL PROTECTED]/[EMAIL PROTECTED],1
+ */
+static void chrp_pci_fixup_vt8231_ata(struct pci_dev *viaide)
+{
+   u8 progif;
+   struct pci_dev *viaisa;
+
+   if (!machine_is(chrp) || _chrp_type != _CHRP_Pegasos)
+   return;
+   if (viaide-irq != 14)
+   return;
+
+   viaisa = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8231, 
NULL);
+   if (!viaisa)
+   return;
+   printk(Fixing VIA IDE, force legacy mode on '%s'\n, 
viaide-dev.bus_id);
+
+   pci_read_config_byte(viaide, PCI_CLASS_PROG, progif);
+   pci_write_config_byte(viaide, PCI_CLASS_PROG, progif  ~0x5);
+   viaide-class = ~0x5;
+
+   pci_dev_put(viaisa);
+}
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, 
chrp_pci_fixup_vt8231_ata);
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: adding Pegasus IDE quirk for pata_via

2007-08-16 Thread Olaf Hering
On Mon, Apr 09, Matt Sealey wrote:

 + if (bridge) {
 + u8 iir, irqlist[4] = { 14, 15, 10, 
 11 };
 +
 + pci_read_config_byte(bridge, 
 VIA_IDE_STEERING, iir);

What value has VIA_IDE_STEERING?
Googles only reference is your own posting.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] Stop pmac_zilog from abusing 8250's device numbers.

2007-08-14 Thread Olaf Hering
On Wed, Apr 04, Paul Mackerras wrote:

 David Woodhouse writes:
 
  There are proper device numbers registered for pmac_zilog now. Use them.

Which numbers?

 Sigh.  I guess this is inevitable, but IMNSHO this exposes a weakness
 in our serial subsystem.

So, when will the name of pmac_zilog get changed?
What major/minor pair will the two ports get?
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] Stop pmac_zilog from abusing 8250's device numbers.

2007-08-14 Thread Olaf Hering
On Tue, Aug 14, David Woodhouse wrote:

 On Tue, 2007-08-14 at 13:49 +0200, Olaf Hering wrote:
  On Wed, Apr 04, Paul Mackerras wrote:
  
   David Woodhouse writes:
   
There are proper device numbers registered for pmac_zilog now. Use them.
  
  Which numbers?
 
 shinybook /shiny/git/mtd-utils $ ls -l /dev/ttyPZ*
 crw-rw 1 root uucp 204, 192 2007-08-13 11:48 /dev/ttyPZ0
 crw-rw 1 root uucp 204, 193 2007-08-13 11:48 /dev/ttyPZ1

I dont see 204:192 in devices.txt
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 2.6.22.y] ieee1394: revert sbp2: enforce 32bit DMA mapping

2007-08-06 Thread Olaf Hering
On Mon, Aug 06, Benjamin Herrenschmidt wrote:

 BTW. Any reason why you don't set the DMA mask in the ohci driver rather
 than the sbp2 one ?

I used this patch, and the attached CD was found.
What dma mask should be used in ohci_probe()?


---
 drivers/ieee1394/ohci1394.c   |2 ++
 drivers/ieee1394/sbp2.c   |3 +++
 drivers/pci/pci.c |1 +
 drivers/pci/probe.c   |1 +
 include/asm-powerpc/dma-mapping.h |1 +
 5 files changed, 8 insertions(+)

--- a/drivers/ieee1394/ohci1394.c
+++ b/drivers/ieee1394/ohci1394.c
@@ -3223,6 +3223,8 @@ static int __devinit ohci1394_pci_probe(
}
 #endif /* CONFIG_PPC_PMAC */
 
+   if (pci_set_dma_mask(dev, DMA_32BIT_MASK))
+   FAIL(-ENXIO, Failed to set DMA mask);
 if (pci_enable_device(dev))
FAIL(-ENXIO, Failed to enable OHCI hardware);
 pci_set_master(dev);
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -775,12 +775,15 @@ static struct sbp2_lu *sbp2_alloc_device
goto failed_alloc;
}
 #else
+   printk(KERN_DEBUG %s():%u dev '%s' %p parent '%s' %p 
%016lx\n,__func__,__LINE__,hi-host-device.bus_id,hi-host-device.dma_mask,hi-host-device.parent-bus_id,(hi-host-device.parent-dma_mask),*(hi-host-device.parent-dma_mask));
if (dma_set_mask(hi-host-device.parent, DMA_32BIT_MASK)) {
SBP2_ERR(failed to set 4GB DMA mask);
goto failed_alloc;
}
 #endif
}
+   else
+   printk(KERN_DEBUG %s():%u dev '%s' parent 
'%s'\n,__func__,__LINE__,hi-host-device.bus_id,hi-host-device.parent-bus_id);
 
/* Prevent unloading of the 1394 host */
if (!try_module_get(hi-host-driver-owner)) {
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1358,6 +1358,7 @@ pci_set_dma_mask(struct pci_dev *dev, u6
return -EIO;
 
dev-dma_mask = mask;
+   printk(KERN_DEBUG %s() '%s' %p 
%016lx\n,__func__,dev-dev.bus_id,dev-dev.dma_mask,*(dev-dev.dma_mask));
 
return 0;
 }
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -937,6 +937,7 @@ void pci_device_add(struct pci_dev *dev,
 
set_dev_node(dev-dev, pcibus_to_node(bus));
dev-dev.dma_mask = dev-dma_mask;
+   printk(KERN_DEBUG %s() '%s' %p 
%016lx\n,__func__,dev-dev.bus_id,dev-dev.dma_mask,*(dev-dev.dma_mask));
dev-dev.coherent_dma_mask = 0xull;
 
/* Fix up broken headers */
--- a/include/asm-powerpc/dma-mapping.h
+++ b/include/asm-powerpc/dma-mapping.h
@@ -92,6 +92,7 @@ static inline int dma_set_mask(struct de
 {
struct dma_mapping_ops *dma_ops = get_dma_ops(dev);
 
+   printk(KERN_DEBUG %s() '%s' %016llx 
%p\n,__func__,dev-bus_id,(unsigned long long)dma_mask,dma_ops);
if (unlikely(dma_ops == NULL))
return -EIO;
if (dma_ops-set_dma_mask != NULL)

Using PowerMac machine description
Page orders: linear mapping = 24, virtual = 12, io = 12
Found initrd at 0xc150:0xc1763000
Found U3 memory controller  host bridge @ 0xf800 revision: 0x32
Mapped at 0xd8008000
Found a K2 mac-io controller, rev: 32, mapped at 0xd80080041000
PowerMac motherboard: PowerMac G5
DART: table not allocated, using direct DMA
Starting Linux PPC64 #4 SMP Mon Aug 6 15:40:01 CEST 2007
-
ppc64_pft_size= 0x0
physicalMemorySize= 0x1000
ppc64_caches.dcache_line_size = 0x80
ppc64_caches.icache_line_size = 0x80
htab_address  = 0xcf80
htab_hash_mask= 0x7fff
-
Linux version 2.6.22.1-ppc64 ([EMAIL PROTECTED]) (gcc version 4.1.2 20070115 
(prerelease) (SUSE Linux)) #4 SMP Mon Aug 6 15:40:01 CEST 2007
[boot]0012 Setup Arch
Top of RAM: 0x1000, Total RAM: 0x1000
Memory hole size: 0MB
Entering add_active_range(0, 0, 65536) 0 entries of 256 used
Found U3-AGP PCI host bridge.  Firmware bus number: 240-255
Can't get bus-range for /[EMAIL PROTECTED],f200, assume bus 0
Found U3-HT PCI host bridge.  Firmware bus number: 0-239
PCI Host 0, io start: 40; io end: bf
PCI Host 1, io start: 0; io end: 3f
via-pmu: Server Mode is disabled
PMU driver v2 initialized for Core99, firmware: 0c
nvram: Checking bank 0...
nvram: gen0=493, gen1=492
nvram: Active bank is: 0
nvram: OF partition at 0x410
nvram: XP partition at 0x1020
nvram: NR partition at 0x1120
Zone PFN ranges:
  DMA 0 -65536
  Normal  65536 -65536
early_node_map[1] active PFN ranges
0:0 -65536
On node 0 totalpages: 65536
  DMA zone: 896 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 64640 pages, LIFO batch:15
  Normal zone: 0 pages used for memmap
[boot]0015 Setup Done
Built 1 zonelists.  Total pages: 64640
Kernel command line: 
mpic: Setting up MPIC  MPIC 1version 

Re: [PATCH] powerpc: Fix initialization and usage of dma_mask

2007-08-06 Thread Olaf Hering
On Tue, Aug 07, Benjamin Herrenschmidt wrote:

 powerpc has a couple of bugs in the usage of dma_masks that tend to
 break when drivers explicitely try to set a 32 bits mask for example.
 
 First the code that generates the pci devices from the OF device-tree
 doesn't initialize the mask properly, then our implementation of
 set_dma_mask() was trying to validate the -previous- mask value, not the
 one passed in as an argument.
 
 This patch should fix these.
 
 Signed-off-by: Benjamin Herrenschmidt [EMAIL PROTECTED]
 ---
 
 Does this fix the problem you've noticed ?

This patch fixes it. Thanks.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: hvc_iseries not working

2007-07-17 Thread Olaf Hering
On Mon, Jul 16, Will Schmidt wrote:

 On Fri, 2007-07-13 at 19:05 +0200, Olaf Hering wrote:
  2.6.21 arch/powerpc/configs/iseries_defconfig works on an i825 with v5r4
  2.6.22 arch/powerpc/configs/iseries_defconfig does not. But it works on
  a i820 with v5r3.
  2.6.22 boots ok with CONFIG_VIOCONS
 
 When it works, do you have more than one processor assigned to the
 partition?   

The partition does not change, only the kernel (And iseries_defconfig) changes.
The partition has a single cpu assigned, 0.8 %
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev