Re: [PATCH] powerpc/fsl-pci: don't unmap the PCI SoC controller registers in setup_pci_atmu
On Apr 13, 2013, at 2:14 AM, Kevin Hao wrote: > In patch 34642bbb (powerpc/fsl-pci: Keep PCI SoC controller registers in > pci_controller) we choose to keep the map of the PCI SoC controller > registers. But we missed to delete the unmap in setup_pci_atmu > function. This will cause the following call trace once we access > the PCI SoC controller registers later. > > Unable to handle kernel paging request for data at address 0x880080040f14 > Faulting instruction address: 0xc002ea58 > Oops: Kernel access of bad area, sig: 11 [#1] > SMP NR_CPUS=24 T4240 QDS > Modules linked in: > NIP: c002ea58 LR: c002eaf4 CTR: c002eac0 > REGS: c0017e10b4a0 TRAP: 0300 Not tainted > (3.9.0-rc1-00052-gfa3529f-dirty) > MSR: 80029000 CR: 28adbe22 XER: > SOFTE: 0 > DEAR: 880080040f14, ESR: > TASK = c0017e10[1] 'swapper/0' THREAD: c0017e108000 CPU: 2 > GPR00: c0017e10b720 c09928d8 c0017e578e00 > GPR04: 000c 0001 c0017e10bb40 > GPR08: 88008004 0016 > GPR12: 88adbe22 cfffa800 c0001ba0 > GPR16: > GPR20: c08a5b70 > GPR24: c08af938 c09a28d8 c09bb5dc c0017e10bb40 > GPR28: c0017e32a400 c0017e10bc00 c0017e32a400 c0017e578e00 > NIP [c002ea58] .fsl_pcie_check_link+0x88/0xf0 > LR [c002eaf4] .fsl_indirect_read_config+0x34/0xb0 > Call Trace: > [c0017e10b720] [c0017e10b7a0] 0xc0017e10b7a0 (unreliable) > [c0017e10ba30] [c002eaf4] .fsl_indirect_read_config+0x34/0xb0 > [c0017e10bad0] [c033aa08] .pci_bus_read_config_byte+0x88/0xd0 > [c0017e10bb90] [c088d708] .pci_apply_final_quirks+0x9c/0x18c > [c0017e10bc40] [c00013dc] .do_one_initcall+0x5c/0x1f0 > [c0017e10bcf0] [c086ebac] .kernel_init_freeable+0x180/0x26c > [c0017e10bdb0] [c0001bbc] .kernel_init+0x1c/0x460 > [c0017e10be30] [c880] .ret_from_kernel_thread+0x64/0xe4 > Instruction dump: > 38210310 2b800015 4fdde842 7c600026 5463fffe e8010010 7c0803a6 4e800020 > 6000 6000 e92301d0 7c0004ac <80690f14> 0c03 4c00012c 38210310 > ---[ end trace 7a8fe0cbccb7d992 ]--- > > Kernel panic - not syncing: Attempted to kill init! exitcode=0x000b > > Signed-off-by: Kevin Hao > --- > This is based on Kumar's next branch. > > arch/powerpc/sysdev/fsl_pci.c | 7 ++- > 1 file changed, 2 insertions(+), 5 deletions(-) applied to next - k ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc/fsl-pci: don't unmap the PCI SoC controller registers in setup_pci_atmu
On 04/13/2013 03:14 PM, Kevin Hao wrote: In patch 34642bbb (powerpc/fsl-pci: Keep PCI SoC controller registers in pci_controller) we choose to keep the map of the PCI SoC controller registers. But we missed to delete the unmap in setup_pci_atmu function. This will cause the following call trace once we access the PCI SoC controller registers later. Unable to handle kernel paging request for data at address 0x880080040f14 Faulting instruction address: 0xc002ea58 Oops: Kernel access of bad area, sig: 11 [#1] SMP NR_CPUS=24 T4240 QDS Modules linked in: NIP: c002ea58 LR: c002eaf4 CTR: c002eac0 REGS: c0017e10b4a0 TRAP: 0300 Not tainted (3.9.0-rc1-00052-gfa3529f-dirty) MSR: 80029000 CR: 28adbe22 XER: SOFTE: 0 DEAR: 880080040f14, ESR: TASK = c0017e10[1] 'swapper/0' THREAD: c0017e108000 CPU: 2 GPR00: c0017e10b720 c09928d8 c0017e578e00 GPR04: 000c 0001 c0017e10bb40 GPR08: 88008004 0016 GPR12: 88adbe22 cfffa800 c0001ba0 GPR16: GPR20: c08a5b70 GPR24: c08af938 c09a28d8 c09bb5dc c0017e10bb40 GPR28: c0017e32a400 c0017e10bc00 c0017e32a400 c0017e578e00 NIP [c002ea58] .fsl_pcie_check_link+0x88/0xf0 LR [c002eaf4] .fsl_indirect_read_config+0x34/0xb0 Call Trace: [c0017e10b720] [c0017e10b7a0] 0xc0017e10b7a0 (unreliable) [c0017e10ba30] [c002eaf4] .fsl_indirect_read_config+0x34/0xb0 [c0017e10bad0] [c033aa08] .pci_bus_read_config_byte+0x88/0xd0 [c0017e10bb90] [c088d708] .pci_apply_final_quirks+0x9c/0x18c [c0017e10bc40] [c00013dc] .do_one_initcall+0x5c/0x1f0 [c0017e10bcf0] [c086ebac] .kernel_init_freeable+0x180/0x26c [c0017e10bdb0] [c0001bbc] .kernel_init+0x1c/0x460 [c0017e10be30] [c880] .ret_from_kernel_thread+0x64/0xe4 Instruction dump: 38210310 2b800015 4fdde842 7c600026 5463fffe e8010010 7c0803a6 4e800020 6000 6000 e92301d0 7c0004ac <80690f14> 0c03 4c00012c 38210310 ---[ end trace 7a8fe0cbccb7d992 ]--- Kernel panic - not syncing: Attempted to kill init! exitcode=0x000b Signed-off-by: Kevin Hao --- acked. thanks. Roy ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] powerpc/fsl-pci: don't unmap the PCI SoC controller registers in setup_pci_atmu
In patch 34642bbb (powerpc/fsl-pci: Keep PCI SoC controller registers in pci_controller) we choose to keep the map of the PCI SoC controller registers. But we missed to delete the unmap in setup_pci_atmu function. This will cause the following call trace once we access the PCI SoC controller registers later. Unable to handle kernel paging request for data at address 0x880080040f14 Faulting instruction address: 0xc002ea58 Oops: Kernel access of bad area, sig: 11 [#1] SMP NR_CPUS=24 T4240 QDS Modules linked in: NIP: c002ea58 LR: c002eaf4 CTR: c002eac0 REGS: c0017e10b4a0 TRAP: 0300 Not tainted (3.9.0-rc1-00052-gfa3529f-dirty) MSR: 80029000 CR: 28adbe22 XER: SOFTE: 0 DEAR: 880080040f14, ESR: TASK = c0017e10[1] 'swapper/0' THREAD: c0017e108000 CPU: 2 GPR00: c0017e10b720 c09928d8 c0017e578e00 GPR04: 000c 0001 c0017e10bb40 GPR08: 88008004 0016 GPR12: 88adbe22 cfffa800 c0001ba0 GPR16: GPR20: c08a5b70 GPR24: c08af938 c09a28d8 c09bb5dc c0017e10bb40 GPR28: c0017e32a400 c0017e10bc00 c0017e32a400 c0017e578e00 NIP [c002ea58] .fsl_pcie_check_link+0x88/0xf0 LR [c002eaf4] .fsl_indirect_read_config+0x34/0xb0 Call Trace: [c0017e10b720] [c0017e10b7a0] 0xc0017e10b7a0 (unreliable) [c0017e10ba30] [c002eaf4] .fsl_indirect_read_config+0x34/0xb0 [c0017e10bad0] [c033aa08] .pci_bus_read_config_byte+0x88/0xd0 [c0017e10bb90] [c088d708] .pci_apply_final_quirks+0x9c/0x18c [c0017e10bc40] [c00013dc] .do_one_initcall+0x5c/0x1f0 [c0017e10bcf0] [c086ebac] .kernel_init_freeable+0x180/0x26c [c0017e10bdb0] [c0001bbc] .kernel_init+0x1c/0x460 [c0017e10be30] [c880] .ret_from_kernel_thread+0x64/0xe4 Instruction dump: 38210310 2b800015 4fdde842 7c600026 5463fffe e8010010 7c0803a6 4e800020 6000 6000 e92301d0 7c0004ac <80690f14> 0c03 4c00012c 38210310 ---[ end trace 7a8fe0cbccb7d992 ]--- Kernel panic - not syncing: Attempted to kill init! exitcode=0x000b Signed-off-by: Kevin Hao --- This is based on Kumar's next branch. arch/powerpc/sysdev/fsl_pci.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index 40ffe29..cf81d65 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c @@ -244,12 +244,12 @@ static void setup_pci_atmu(struct pci_controller *hose) if (paddr_hi == paddr_lo) { pr_err("%s: No outbound window space\n", name); - goto out; + return; } if (paddr_lo == 0) { pr_err("%s: No space for inbound window\n", name); - goto out; + return; } /* setup PCSRBAR/PEXCSRBAR */ @@ -395,9 +395,6 @@ static void setup_pci_atmu(struct pci_controller *hose) pr_info("%s: DMA window size is 0x%llx\n", name, (u64)hose->dma_window_size); } - -out: - iounmap(pci); } static void __init setup_pci_cmd(struct pci_controller *hose) -- 1.8.1.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev