AU1550 Kernel bug detected[#1] clockevents_register_device
Hi,
to find my PCI problem I want to use git to find the last working version.
I just start with head and found a compile error:arch/mips/alchemy/common/time.c:93: error: incompatible types in initialization
I comment this line ".cpumask = CPU_MASK_ALL,"
and build again.
This is the result. Somethig is wrong with the timer ...
<5>Linux version 2.6.29-rc2-00351-g5ee8100-dirty (neuber@t60p) (gcc version 4.0.0 (DENX ELDK 4.1 4.0.0)) #2 Tue Jan 27 09:03:59 CET 2009 <6>CPU revision is: 03030200 (Au1550)
<6>(PRId 03030200) @ 336.00 MHz
<6>AMD Alchemy Au1550/Db1550 Board
<6>Determined physical RAM map:
<6> memory: 08000000 @ 00000000 (usable)
<4>Zone PFN ranges:
<4> Normal 0x00000000 -> 0x00008000
<4>Movable zone start PFN for each node <4>early_node_map[1] active PFN ranges
<4> 0: 0x00000000 -> 0x00008000
<7>On node 0 totalpages: 32768
<7>free_area_init_node: node 0, pgdat 804c5b00, node_mem_map 81000000
<7> Normal zone: 256 pages used for memmap <7> Normal zone: 0 pages reserved <7> Normal zone: 32512 pages, LIFO batch:7
<4>Built 1 zonelists in Zone order, mobility grouping on. Total pages:
32512
<5>Kernel command line: console=ttyS0,115200n8 panic=1 ip=192.168.100.101::192.168.100.100:255.255.255.0:tc:eth0:off root=/dev/mtdblock0 rw rootfstype=jffs2
<4>Primary instruction cache 16kB, VIPT, 4-way, linesize 32 bytes. <4>Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes <4>PID hash table entries: 512 (order: 9, 2048 bytes) <4>Kernel bug detected[#1]:
<4>Cpu 0
<4>$ 0 : 00000000 00032954 00000000 00000001 <4>$ 4 : 804ab750 00000000 0003b9ad 00000000 <4>$ 8 : 000225c1 00000000 000225c1 00000000 <4>$12 : 00000000 00000000 3b9aca00 804ab6e0 <4>$16 : 804ab750 804ab750 804f0000 804f0000 <4>$20 : 00ff0000 87fb4298 00000002 00000000 <4>$24 : 804a9d00 8011d8fc <4>$28 : 804a8000 804a9f58 87ff7ab0 804c9814 <4>Hi : 00000008 <4>Lo : 00000000 <4>epc : 8015e554 clockevents_register_device+0x34/0x110
<4> Not tainted
<4>ra : 804c9814 plat_time_init+0x1ac/0x26c
<4>Status: 10003c02 KERNEL EXL
<4>Cause : 00808034
<4>PrId : 03030200 (Au1550)
<4>Modules linked in:
<4>Process swapper (pid: 0, threadinfo=804a8000, task=804aa000, tls=00000000)
<4>Stack : 804ab6e0 8015d1ec 804c9634 87fb4298 804ab750 804ee585 804f0000 804f0000
<4> 00ff0000 804c9814 804e7914 804ee585 804f0000 804f0000804e7914 804c87f4
<4> 00000000 804e7914 00000316 00000316 804c82cc 00000000804ee500 00000000
<4> 20000000 00000000 00000000 ff000000 87ff17b8 00000000
00000000 00000000
<4> 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
<4> ...
<4>Call Trace:
<4>[<8015e554>] clockevents_register_device+0x34/0x110 <4>[<804c9814>] plat_time_init+0x1ac/0x26c <4>[<804c87f4>] start_kernel+0x1f8/0x3e4
<4>
<4>
<4>Code: 00028036 8c830020 2c630001 <00038036> 8c820010 1040002c 24020001 3c10804b 8e03e558
<0>Kernel panic - not syncing: Attempted to kill the idle task! <0>Rebooting in 1 seconds..<5>
<4>** Resetting Integrated �
Quoted 7 lines · Frank Neuber
Hi,
to find my PCI problem I want to use git to find the last working version.
I just start with head and found a compile error:arch/mips/alchemy/common/time.c:93: error: incompatible types in initialization
I comment this line ".cpumask =CPU_MASK_ALL,"
you need to change it to "CPU_MASK_ALL_PTR". Commenting it is not a very good idea ;-)
Beste Gr�sse,
Manuel Lauss
Le Tuesday 27 January 2009 10:11:07 Manuel Lauss, vous avez écrit :
Quoted 11 lines · Frank Neuber
Quoted 7 lines
Hi,
to find my PCI problem I want to use git to find the last working version.
I just start with head and found a compile error:arch/mips/alchemy/common/time.c:93: error: incompatible types in initialization
I comment this line ".cpumask =CPU_MASK_ALL,"you need to change it to "
CPU_MASK_ALL_PTR". Commenting it is not a very good idea ;-)
This build failure also happens on linux-queue. Patch below. --
From: Florian Fainelli
Subject: [PATCH] alchemy: fix build failure on time.c
This patch fixes the following build failure :
arch/mips/alchemy/common/time.c:93: error: incompatible types in initialization
---
arch/mips/alchemy/common/time.c +1 -1
@@ -89,7 +89,7 @@ static struct clock_event_device au1x_rtcmatch2_clockdev = { .irq = AU1000_RTC_MATCH2_INT, .set_next_event = au1x_rtcmatch2_set_next_event, .set_mode = au1x_rtcmatch2_set_mode, - .cpumask = CPU_MASK_ALL, + .cpumask = CPU_MASK_ALL_PTR, };static struct irqaction au1x_rtcmatch2_irqaction = {
Le Tuesday 27 January 2009 10:18:30 Florian Fainelli, vous avez écrit :
Quoted 18 lines
Le Tuesday 27 January 2009 10:11:07 Manuel Lauss, vous avez écrit :
Quoted 11 lines · Frank Neuber
Quoted 7 lines
Hi,
to find my PCI problem I want to use git to find the last working version.
I just start with head and found a compile error:arch/mips/alchemy/common/time.c:93: error: incompatible types in initialization
I comment this line ".cpumask =CPU_MASK_ALL,"you need to change it to "
CPU_MASK_ALL_PTR". Commenting it is not a very good idea ;-)This build failure also happens on linux-queue. Patch below. --
From: Florian Fainelli
Subject: [PATCH] alchemy: fix build failure ontime.c
Quoted 4 lines
This patch fixes the following build failure :
arch/mips/alchemy/common/time.c:93: error: incompatible types in initialization
Errm sorry, this was not for linux-queue ;)
Signature · 4 lines
Best regards, Florian Fainelli Email : [email protected] http://openwrt.org -------------------------------
Thank you all,
now the head kernel comes up.
Why is that fix not in the git? Maby I use the wrong git repository for MIPS kernel. At the moment I use the linus git:git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Am Dienstag, den 27.01.2009, 10:11 +0100 schrieb Manuel Lauss:
Quoted 7 lines
Quoted 4 lines
I just start with head and found a compile error:
arch/mips/alchemy/common/time.c:93: error: incompatible types in initialization
I comment this line ".cpumask =CPU_MASK_ALL,"you need to change it to "
CPU_MASK_ALL_PTR". Commenting it is not a very good idea ;-)
Yea sure, but it was a try ... ;-)
The PCI and PCMCIA problems are going on in the same way:
I tested the CardBus. As you can see the two CardBus bridges maps the whole PCI memory into. If I plug in something it is not accessable because theyenta_cardbus 0000:00:0d.0: No cardbus resource!
error ...
I think somting is wrong with PCI resource management here. I can't believe that nobody is using the PCI or Cardbus on the AU1550 with the current kernel.
I can give you a lspci -vvv of the working system 2.6.16.1 ---cut---
00:0d.0 Class 0607: 104c:ac55 (rev 01)
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64
Interrupt: pin A routed to IRQ 1
Region 0: Memory at 0000000048002000 (32-bit, non-prefetchable) [size=4K]
Bus: primary=00, secondary=01, subordinate=04, sec-latency=176
Memory window 0: 40000000-41fff000 (prefetchable)
Memory window 1: 42000000-43fff000 (prefetchable)
I/O window 0: 00001000-000010ff
I/O window 1: 00001400-000014ff
BridgeCtl: Parity- SERR- ISA- VGA- MAbort- >Reset+ 16bInt- PostWrite-
16-bit legacy interface ports at 0001---cut---
And the 2.6.29-rc2
---cut---
00:0d.0 Class 0607: 104c:ac55 (rev 01)
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64
Interrupt: pin A routed to IRQ 9
Bus: primary=00, secondary=01, subordinate=04, sec-latency=176
Memory window 0: 40000000-43fff000 (prefetchable)
Memory window 1: 44000000-47fff000 (prefetchable)
I/O window 0: 00001000-000010ff
I/O window 1: 00001400-000014ff
BridgeCtl: Parity- SERR- ISA- VGA- MAbort- >Reset+ 16bInt- PostWrite-
16-bit legacy interface ports at 0001---cut---
You can see in the current PCI System the Region 0 is missing and the Memory windows are much more bigger. Also the IRQ is different. I don't understand this at the moment.
This is the relevant bootlog:
---cut---
pci 0000:00:0c.0: PME# supported from D1 D3hot D3cold
pci 0000:00:0c.0: PME# disabled
pci 0000:00:0c.1: PME# supported from D1 D3hot D3cold
pci 0000:00:0c.1: PME# disabled
pci 0000:00:0c.2: PME# supported from D0 D1 D2 D3hot D3cold
pci 0000:00:0c.2: PME# disabled
pci 0000:00:0d.0: PME# supported from D0 D1 D2 D3hot D3cold
pci 0000:00:0d.0: PME# disabled
pci 0000:00:0d.1: PME# supported from D0 D1 D2 D3hot D3cold
pci 0000:00:0d.1: PME# disabled
pci 0000:00:0c.0: BAR 0: can't allocate mem resource [0x50000000-0x4fffffff]
pci 0000:00:0c.1: BAR 0: can't allocate mem resource [0x50000000-0x4fffffff]
pci 0000:00:0d.0: BAR 0: can't allocate mem resource [0x50000000-0x4fffffff]
pci 0000:00:0d.1: BAR 0: can't allocate mem resource [0x50000000-0x4fffffff]
pci 0000:00:0c.2: BAR 0: can't allocate mem resource [0x50000000-0x4fffffff] pci 0000:00:0d.0: CardBus bridge, secondary bus 0000:01
pci 0000:00:0d.0: IO window: 0x001000-0x0010ff pci 0000:00:0d.0: IO window: 0x001400-0x0014ff pci 0000:00:0d.0: PREFETCH window: 0x40000000-0x43ffffff pci 0000:00:0d.0: MEM window: 0x44000000-0x47ffffff pci 0000:00:0d.1: CardBus bridge, secondary bus 0000:05 pci 0000:00:0d.1: IO window: 0x001800-0x0018ff pci 0000:00:0d.1: IO window: 0x001c00-0x001cff pci 0000:00:0d.1: PREFETCH window: 0x48000000-0x4bffffff pci 0000:00:0d.1: MEM window: 0x4c000000-0x4fffffff
PCI: Enabling device 0000:00:0d.0 (0000 -> 0003)
PCI: Enabling device 0000:00:0d.1 (0000 -> 0003)
---cut---
Quoted 5 lines · Frank Neuber
Thank you all,
now the head kernel comes up.
Why is that fix not in the git? Maby I use the wrong git repository for MIPS kernel. At the moment I use the linus git:git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
I sent a patch for this 2 weeks ago; Ralf is probably busy with other stuff atm.
Quoted 10 lines
Am Dienstag, den 27.01.2009, 10:11 +0100 schrieb Manuel Lauss:
Quoted 7 lines
Quoted 4 lines
I just start with head and found a compile error:
arch/mips/alchemy/common/time.c:93: error: incompatible types in initialization
I comment this line ".cpumask =CPU_MASK_ALL,"you need to change it to "
CPU_MASK_ALL_PTR". Commenting it is not a very good idea ;-)Yea sure, but it was a try ... ;-)
Quoted 9 lines
The PCI and PCMCIA problems are going on in the same way:
I tested the CardBus. As you can see the two CardBus bridges maps the whole PCI memory into. If I plug in something it is not accessable because theyenta_cardbus0000:00:0d.0: No cardbus resource!
error ...
I think somting is wrong with PCI resource management here. I can't believe that nobody is using the PCI or Cardbus on the AU1550 with the current kernel.
I'm no PCI expert, but I'm pretty sure resource assignment is done by generic, not mips-specific, code. Please try the linux-pci and/or linux-kernel lists.
Beste Gruesse,
Manuel Lauss
Am Dienstag, den 27.01.2009, 13:11 +0100 schrieb Manuel Lauss:
Quoted 7 lines
Quoted 3 lines
I think somting is wrong with PCI resource management here. I can't believe that nobody is using the PCI or Cardbus on the AU1550 with the current kernel.
I'm no PCI expert, but I'm pretty sure resource assignment is done by generic, not mips-specific, code. Please try the linux-pci and/or linux-kernel lists.
At the moment I buld a matrix of working kernel versions regarding the PCI stuff on the AU1550
For now I can say that the versions
2.6.18, 2.6.18-rc1
is crashing after showing the linux banner
2.6.18-rc2, 2.6.18-rc4, 2.6.19, 2.6.20, 2.6.23 produce this:
Skipping PCI bus scan due to resource conflict
The version 2.6.24 has the same behavior as the current git head.
I will inform you about more results
Regards,
Frank
Am Dienstag, den 27.01.2009, 13:42 +0100 schrieb Frank Neuber:
Quoted 8 lines
Am Dienstag, den 27.01.2009, 13:11 +0100 schrieb Manuel Lauss:
Quoted 7 lines
Quoted 3 lines
I think somting is wrong with PCI resource management here. I can't believe that nobody is using the PCI or Cardbus on the AU1550 with the current kernel.
I'm no PCI expert, but I'm pretty sure resource assignment is done by generic, not mips-specific, code. Please try the linux-pci and/or linux-kernel lists.
Quoted 7 lines
At the moment I buld a matrix of working kernel versions regarding the PCI stuff on the AU1550
For now I can say that the versions
2.6.18, 2.6.18-rc1
is crashing after showing the linux banner
I found the problem for this error. It is because we compare 32 and 64 bit numbers in __request_resource.
Quoted 2 lines
2.6.18-rc2, 2.6.18-rc4, 2.6.19, 2.6.20, 2.6.23 produce this:
Skipping PCI bus scan due to resource conflict
I changed this:
(quoted diff) +0 -0
b/include/asm-mips/mach-au1x00/au1000.h
index 3bdce91..8616c09 100644
include/asm-mips/mach-au1x00/au1000.h +9 -0
@@ -1679,12 +1679,21 @@ enum soc_au1200_ints {#define Au1500_PCI_MEM_START 0x440000000ULL#define Au1500_PCI_MEM_END 0x44FFFFFFFULL +#if 1 +#define PCI_IO_START 0x00001000 +#define PCI_IO_END 0x000FFFFF +#define PCI_MEM_START 0x40000000 +#define PCI_MEM_END 0x4FFFFFFF +#define PCI_FIRST_DEVFN (0 << 3) +#define PCI_LAST_DEVFN (19 << 3) +#else #define PCI_IO_START (Au1500_PCI_IO_START + 0x1000)#define PCI_IO_END (Au1500_PCI_IO_END)#define PCI_MEM_START (Au1500_PCI_MEM_START)#define PCI_MEM_END (Au1500_PCI_MEM_END)#define PCI_FIRST_DEVFN (0<<3)#define PCI_LAST_DEVFN (19<<3) +#endif #define IOPORT_RESOURCE_START 0x00001000/* skip legacy probing */ #define IOPORT_RESOURCE_END 0xffffffff
Now I think a have to look at 64 problems in the resource management of th PCI subsystem
Quoted 8 lines
The version 2.6.24 has the same behavior as the current git head.
I will inform you about more results
Regards,
Frank
Quoted 53 lines · Frank Neuber
Am Dienstag, den 27.01.2009, 13:42 +0100 schrieb Frank Neuber:
Quoted 8 lines
Am Dienstag, den 27.01.2009, 13:11 +0100 schrieb Manuel Lauss:
Quoted 7 lines
Quoted 3 lines
I think somting is wrong with PCI resource management here. I can't believe that nobody is using the PCI or Cardbus on the AU1550 with the current kernel.
I'm no PCI expert, but I'm pretty sure resource assignment is done by generic, not mips-specific, code. Please try the linux-pci and/or linux-kernel lists.
Quoted 7 lines
At the moment I buld a matrix of working kernel versions regarding the PCI stuff on the AU1550
For now I can say that the versions
2.6.18, 2.6.18-rc1
is crashing after showing the linux bannerI found the problem for this error. It is because we compare 32 and 64 bit numbers in
__request_resource.Quoted 2 lines
2.6.18-rc2, 2.6.18-rc4, 2.6.19, 2.6.20, 2.6.23 produce this:
Skipping PCI bus scan due to resource conflictI changed this:
include/asm-mips/mach-au1x00/au1000.h +9
-0@@ -1679,12 +1679,21 @@ enum soc_au1200_ints {#define Au1500_PCI_MEM_START 0x440000000ULL#define Au1500_PCI_MEM_END 0x44FFFFFFFULL +#if 1 +#define PCI_IO_START 0x00001000 +#define PCI_IO_END 0x000FFFFF +#define PCI_MEM_START 0x40000000 +#define PCI_MEM_END 0x4FFFFFFF +#define PCI_FIRST_DEVFN (0 << 3) +#define PCI_LAST_DEVFN (19 << 3) +#else #define PCI_IO_START (Au1500_PCI_IO_START + 0x1000)#define PCI_IO_END (Au1500_PCI_IO_END)#define PCI_MEM_START (Au1500_PCI_MEM_START)#define PCI_MEM_END (Au1500_PCI_MEM_END)#define PCI_FIRST_DEVFN (0<<3)#define PCI_LAST_DEVFN (19<<3) +#endif #define IOPORT_RESOURCE_START 0x00001000/* skip legacy probing */ #define IOPORT_RESOURCE_END 0xffffffff
Quoted 2 lines
Now I think a have to look at 64 problems in the resource management of th PCI subsystem
Do hou have CONFIG_64BIT_PHYS_ADDR=y set in your .config? If I remember correctly, __fixup_bigphys_addr() in alchemy/common/setup.c should take care of this 36bit problem (in the same way you did, btw).
Best regards,
Manuel Lauss
Quoted 6 lines
Quoted 6 lines
include/asm-mips/mach-au1x00/au1000.h +0
-0@@ -1679,12 +1679,21 @@ enum soc_au1200_ints {#define Au1500_PCI_MEM_START 0x440000000ULL#define Au1500_PCI_MEM_END 0x44FFFFFFFULL
Quoted 7 lines
include/asm-mips/mach-au1x00/au1000.h enum soc_au1200_ints { · line 1688
Quoted 7 lines
include/asm-mips/mach-au1x00/au1000.h +7
-0+#if 1 +#define PCI_IO_START 0x00001000 +#define PCI_IO_END 0x000FFFFF +#define PCI_MEM_START 0x40000000 +#define PCI_MEM_END 0x4FFFFFFF +#define PCI_FIRST_DEVFN (0 << 3) +#define PCI_LAST_DEVFN (19 << 3)
The current -git sources already have this change. How come yours don't? (it was changed before 2.6.24).
Best regards,
Manuel Lauss
Am Mittwoch, den 28.01.2009, 10:45 +0100 schrieb Manuel Lauss:
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
include/asm-mips/mach-au1x00/au1000.h +0
-0@@ -1679,12 +1679,21 @@ enum soc_au1200_ints {#define Au1500_PCI_MEM_START 0x440000000ULL#define Au1500_PCI_MEM_END 0x44FFFFFFFULL
Quoted 10 lines
Quoted 7 lines
include/asm-mips/mach-au1x00/au1000.h enum soc_au1200_ints { · line 1688
Quoted 7 lines
include/asm-mips/mach-au1x00/au1000.h +7
-0+#if 1 +#define PCI_IO_START 0x00001000 +#define PCI_IO_END 0x000FFFFF +#define PCI_MEM_START 0x40000000 +#define PCI_MEM_END 0x4FFFFFFF +#define PCI_FIRST_DEVFN (0 << 3) +#define PCI_LAST_DEVFN (19 << 3)The current -git sources already have this change. How come yours don't? (it was changed before 2.6.24).
Because I try to track down the PCI resource management problem in 2.6.24 I want to test older versions which does not have this problem (like 2.6.16) or now after enabeling CONFIG_64BIT_PHYS_ADDR 2.6.19.
For next I will look at 2.6.23 what the problem is with the recource conflict ....
Regards,
Frank
Am Mittwoch, den 28.01.2009, 10:38 +0100 schrieb Manuel Lauss:
Quoted 6 lines
Quoted 2 lines
Now I think a have to look at 64 problems in the resource management of th PCI subsystem
Do hou have
CONFIG_64BIT_PHYS_ADDR=yset in your .config? If I remember correctly,__fixup_bigphys_addr()inalchemy/common/setup.cshould take care of this 36bit problem (in the same way you did, btw).
It think it was set to no (it was EXPERIMENTAL).
Now ,after I realized what the problem is, I tested this with CONFIG_64BIT_PHYS_ADDR=y and the kernel 2.6.19 comes up without this patch.
But the 2.6.23 not. Neither with the patch nor with CONFIG_64BIT_PHYS_ADDR
I can enjoy again "Skipping PCI bus scan due to resource conflict" Ahrrr ...
I'll have a look at this.
Regards,
Frank
Quoted 8 lines · Manuel Lauss
Quoted 5 lines
Thank you all,
now the head kernel comes up.
Why is that fix not in the git? Maby I use the wrong git repository for MIPS kernel. At the moment I use the linus git:git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.gitI sent a patch for this 2 weeks ago; Ralf is probably busy with other stuff atm.
Indeed - but as you may have noticed I'm trying to catch up ...
Ralf