Re: [PATCH] powerpc/fsl-pci:fix incorrect iounmap pci hose-private_data

2013-04-23 Thread Kumar Gala

On Apr 23, 2013, at 12:44 AM, Zang Roy-R61911 wrote:

 
 
 -Original Message-
 From: Zang Roy-R61911
 Sent: Tuesday, April 23, 2013 2:36 AM
 To: linuxppc-dev@lists.ozlabs.org
 Cc: ga...@kernel.crashing.org; Zang Roy-R61911; Chen Yuanquan-B41889
 Subject: [PATCH] powerpc/fsl-pci:fix incorrect iounmap pci hose-
 private_data
 
 pci hose-private_data will be used by other function, for example,
 fsl_pcie_check_link(), so do not iounmap it.
 
 fix the kerenl crash on T4240:
 
 Unable to handle kernel paging request for data at address
 0x880080060f14
 Faulting instruction address: 0xc0032554
 Oops: Kernel access of bad area, sig: 11 [#1] SMP NR_CPUS=24 T4240 QDS
 Modules linked in:
 NIP: c0032554 LR: c003254c CTR: c001e5c0
 REGS: c00179143440 TRAP: 0300   Not tainted
 (3.8.8-rt2-00754-g951f064-dirt)
 MSR: 80029000 CE,EE,ME  CR: 24adbe22  XER: 
 SOFTE: 0
 DEAR: 880080060f14, ESR:  TASK = c0017913d2c0[1]
 'swapper/0' THREAD: c0017914 CPU: 2
 GPR00: c003254c c001791436c0 c0ae2998
 0027
 GPR04:  05a5 
 0002
 GPR08: 3030303038303038 c0a2d4d0 c0aebeb8
 c0af2998
 GPR12: 24adbe22 cfffa800 c0001be0
 
 GPR16:   
 
 GPR20:   
 c09ddf70
 GPR24: c09e8d40 c0af2998 c0b1529c
 c00179143b40
 GPR28: c001799b4000 c00179143c00 88008006
 c0727ec8
 NIP [c0032554] .fsl_pcie_check_link+0x104/0x150 LR
 [c003254c] .fsl_pcie_check_link+0xfc/0x150 Call Trace:
 [c001791436c0] [c003254c] .fsl_pcie_check_link+0xfc/0x150
 (unreliab)
 [c00179143a30] [c00325d4]
 .fsl_indirect_read_config+0x34/0xb0
 [c00179143ad0] [c02c7ee8]
 .pci_bus_read_config_byte+0x88/0xd0
 [c00179143b90] [c09c0528] .pci_apply_final_quirks+0x9c/0x18c
 [c00179143c40] [c000142c] .do_one_initcall+0x5c/0x1f0
 [c00179143cf0] [c09a0bb4] .kernel_init_freeable+0x180/0x264
 [c00179143db0] [c0001bfc] .kernel_init+0x1c/0x420
 [c00179143e30] [c8b4] .ret_from_kernel_thread+0x64/0xb0
 Instruction dump:
 6000 4ba0 ebc301d0 3fe2ffc4 3c62ffe0 3bff5530 38638a78 7fe4fb78
 7fc5f378 486ea77d 6000 7c0004ac 801e0f14 0c00 4c00012c 3c62ffe0
 ---[ end trace f841fbc03c9d2e1b ]---
 
 Kernel panic - not syncing: Attempted to kill init! exitcode=0x000b
 
 Rebooting in 180 seconds..
 
 Signed-off-by: Yuanquan Chen yuanquan.c...@freescale.com
 Signed-off-by: Roy Zang tie-fei.z...@freescale.com
 ---
 based on Kumar's next branch.
 tested on P3041 and T4240.
 Please ignore this patch, I will send a v2 version.
 Thanks.
 Roy

Ok, did you see this patch:

http://patchwork.ozlabs.org/patch/236293/

- k

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


RE: [PATCH] powerpc/fsl-pci:fix incorrect iounmap pci hose-private_data

2013-04-23 Thread Zang Roy-R61911


 -Original Message-
 From: Linuxppc-dev [mailto:linuxppc-dev-bounces+tie-
 fei.zang=freescale@lists.ozlabs.org] On Behalf Of Kumar Gala
 Sent: Tuesday, April 23, 2013 10:29 PM
 To: Zang Roy-R61911
 Cc: linuxppc-dev@lists.ozlabs.org; Chen Yuanquan-B41889
 Subject: Re: [PATCH] powerpc/fsl-pci:fix incorrect iounmap pci hose-
 private_data
 
 
 On Apr 23, 2013, at 12:44 AM, Zang Roy-R61911 wrote:
 
 
 
  -Original Message-
  From: Zang Roy-R61911
  Sent: Tuesday, April 23, 2013 2:36 AM
  To: linuxppc-dev@lists.ozlabs.org
  Cc: ga...@kernel.crashing.org; Zang Roy-R61911; Chen Yuanquan-B41889
  Subject: [PATCH] powerpc/fsl-pci:fix incorrect iounmap pci hose-
  private_data
 
  pci hose-private_data will be used by other function, for example,
  fsl_pcie_check_link(), so do not iounmap it.
 
  fix the kerenl crash on T4240:
 
  Unable to handle kernel paging request for data at address
  0x880080060f14
  Faulting instruction address: 0xc0032554
  Oops: Kernel access of bad area, sig: 11 [#1] SMP NR_CPUS=24 T4240
  QDS Modules linked in:
  NIP: c0032554 LR: c003254c CTR: c001e5c0
  REGS: c00179143440 TRAP: 0300   Not tainted
  (3.8.8-rt2-00754-g951f064-dirt)
  MSR: 80029000 CE,EE,ME  CR: 24adbe22  XER: 
  SOFTE: 0
  DEAR: 880080060f14, ESR:  TASK =
  c0017913d2c0[1] 'swapper/0' THREAD: c0017914 CPU: 2
  GPR00: c003254c c001791436c0 c0ae2998
  0027
  GPR04:  05a5 
  0002
  GPR08: 3030303038303038 c0a2d4d0 c0aebeb8
  c0af2998
  GPR12: 24adbe22 cfffa800 c0001be0
  
  GPR16:   
  
  GPR20:   
  c09ddf70
  GPR24: c09e8d40 c0af2998 c0b1529c
  c00179143b40
  GPR28: c001799b4000 c00179143c00 88008006
  c0727ec8
  NIP [c0032554] .fsl_pcie_check_link+0x104/0x150 LR
  [c003254c] .fsl_pcie_check_link+0xfc/0x150 Call Trace:
  [c001791436c0] [c003254c] .fsl_pcie_check_link+0xfc/0x150
  (unreliab)
  [c00179143a30] [c00325d4]
  .fsl_indirect_read_config+0x34/0xb0
  [c00179143ad0] [c02c7ee8]
  .pci_bus_read_config_byte+0x88/0xd0
  [c00179143b90] [c09c0528]
  .pci_apply_final_quirks+0x9c/0x18c
  [c00179143c40] [c000142c] .do_one_initcall+0x5c/0x1f0
  [c00179143cf0] [c09a0bb4]
  .kernel_init_freeable+0x180/0x264 [c00179143db0]
  [c0001bfc] .kernel_init+0x1c/0x420 [c00179143e30]
  [c8b4] .ret_from_kernel_thread+0x64/0xb0 Instruction dump:
  6000 4ba0 ebc301d0 3fe2ffc4 3c62ffe0 3bff5530 38638a78
  7fe4fb78
  7fc5f378 486ea77d 6000 7c0004ac 801e0f14 0c00 4c00012c
  3c62ffe0 ---[ end trace f841fbc03c9d2e1b ]---
 
  Kernel panic - not syncing: Attempted to kill init!
  exitcode=0x000b
 
  Rebooting in 180 seconds..
 
  Signed-off-by: Yuanquan Chen yuanquan.c...@freescale.com
  Signed-off-by: Roy Zang tie-fei.z...@freescale.com
  ---
  based on Kumar's next branch.
  tested on P3041 and T4240.
  Please ignore this patch, I will send a v2 version.
  Thanks.
  Roy
 
 Ok, did you see this patch:
 
 http://patchwork.ozlabs.org/patch/236293/
Kevin remaindered me after I sent the v2 version.
You can pick up that one.
I add a ack to that patch.
Roy

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


[PATCH] powerpc/fsl-pci:fix incorrect iounmap pci hose-private_data

2013-04-22 Thread Roy Zang
pci hose-private_data will be used by other function, for example,
fsl_pcie_check_link(), so do not iounmap it.

fix the kerenl crash on T4240:

Unable to handle kernel paging request for data at address
0x880080060f14
Faulting instruction address: 0xc0032554
Oops: Kernel access of bad area, sig: 11 [#1]
SMP NR_CPUS=24 T4240 QDS
Modules linked in:
NIP: c0032554 LR: c003254c CTR: c001e5c0
REGS: c00179143440 TRAP: 0300   Not tainted
(3.8.8-rt2-00754-g951f064-dirt)
MSR: 80029000 CE,EE,ME  CR: 24adbe22  XER: 
SOFTE: 0
DEAR: 880080060f14, ESR: 
TASK = c0017913d2c0[1] 'swapper/0' THREAD: c0017914 CPU: 2
GPR00: c003254c c001791436c0 c0ae2998
0027
GPR04:  05a5 
0002
GPR08: 3030303038303038 c0a2d4d0 c0aebeb8
c0af2998
GPR12: 24adbe22 cfffa800 c0001be0

GPR16:   

GPR20:   
c09ddf70
GPR24: c09e8d40 c0af2998 c0b1529c
c00179143b40
GPR28: c001799b4000 c00179143c00 88008006
c0727ec8
NIP [c0032554] .fsl_pcie_check_link+0x104/0x150
LR [c003254c] .fsl_pcie_check_link+0xfc/0x150
Call Trace:
[c001791436c0] [c003254c] .fsl_pcie_check_link+0xfc/0x150
(unreliab)
[c00179143a30] [c00325d4]
.fsl_indirect_read_config+0x34/0xb0
[c00179143ad0] [c02c7ee8]
.pci_bus_read_config_byte+0x88/0xd0
[c00179143b90] [c09c0528] .pci_apply_final_quirks+0x9c/0x18c
[c00179143c40] [c000142c] .do_one_initcall+0x5c/0x1f0
[c00179143cf0] [c09a0bb4] .kernel_init_freeable+0x180/0x264
[c00179143db0] [c0001bfc] .kernel_init+0x1c/0x420
[c00179143e30] [c8b4] .ret_from_kernel_thread+0x64/0xb0
Instruction dump:
6000 4ba0 ebc301d0 3fe2ffc4 3c62ffe0 3bff5530 38638a78 7fe4fb78
7fc5f378 486ea77d 6000 7c0004ac 801e0f14 0c00 4c00012c
3c62ffe0
---[ end trace f841fbc03c9d2e1b ]---

Kernel panic - not syncing: Attempted to kill init! exitcode=0x000b

Rebooting in 180 seconds..

Signed-off-by: Yuanquan Chen yuanquan.c...@freescale.com
Signed-off-by: Roy Zang tie-fei.z...@freescale.com
---
based on Kumar's next branch.
tested on P3041 and T4240.

 arch/powerpc/sysdev/fsl_pci.c |   11 ++-
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index f823304..c343edc 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -242,15 +242,11 @@ static void setup_pci_atmu(struct pci_controller *hose)
paddr_hi -= hose-pci_mem_offset;
paddr_lo -= hose-pci_mem_offset;
 
-   if (paddr_hi == paddr_lo) {
+   if (paddr_hi == paddr_lo)
pr_err(%s: No outbound window space\n, name);
-   goto out;
-   }
 
-   if (paddr_lo == 0) {
+   if (paddr_lo == 0)
pr_err(%s: No space for inbound window\n, name);
-   goto out;
-   }
 
/* setup PCSRBAR/PEXCSRBAR */
early_write_config_dword(hose, 0, 0, PCI_BASE_ADDRESS_0, 0x);
@@ -395,9 +391,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.7.9.5


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


RE: [PATCH] powerpc/fsl-pci:fix incorrect iounmap pci hose-private_data

2013-04-22 Thread Zang Roy-R61911


 -Original Message-
 From: Zang Roy-R61911
 Sent: Tuesday, April 23, 2013 2:36 AM
 To: linuxppc-dev@lists.ozlabs.org
 Cc: ga...@kernel.crashing.org; Zang Roy-R61911; Chen Yuanquan-B41889
 Subject: [PATCH] powerpc/fsl-pci:fix incorrect iounmap pci hose-
 private_data
 
 pci hose-private_data will be used by other function, for example,
 fsl_pcie_check_link(), so do not iounmap it.
 
 fix the kerenl crash on T4240:
 
 Unable to handle kernel paging request for data at address
 0x880080060f14
 Faulting instruction address: 0xc0032554
 Oops: Kernel access of bad area, sig: 11 [#1] SMP NR_CPUS=24 T4240 QDS
 Modules linked in:
 NIP: c0032554 LR: c003254c CTR: c001e5c0
 REGS: c00179143440 TRAP: 0300   Not tainted
 (3.8.8-rt2-00754-g951f064-dirt)
 MSR: 80029000 CE,EE,ME  CR: 24adbe22  XER: 
 SOFTE: 0
 DEAR: 880080060f14, ESR:  TASK = c0017913d2c0[1]
 'swapper/0' THREAD: c0017914 CPU: 2
 GPR00: c003254c c001791436c0 c0ae2998
 0027
 GPR04:  05a5 
 0002
 GPR08: 3030303038303038 c0a2d4d0 c0aebeb8
 c0af2998
 GPR12: 24adbe22 cfffa800 c0001be0
 
 GPR16:   
 
 GPR20:   
 c09ddf70
 GPR24: c09e8d40 c0af2998 c0b1529c
 c00179143b40
 GPR28: c001799b4000 c00179143c00 88008006
 c0727ec8
 NIP [c0032554] .fsl_pcie_check_link+0x104/0x150 LR
 [c003254c] .fsl_pcie_check_link+0xfc/0x150 Call Trace:
 [c001791436c0] [c003254c] .fsl_pcie_check_link+0xfc/0x150
 (unreliab)
 [c00179143a30] [c00325d4]
 .fsl_indirect_read_config+0x34/0xb0
 [c00179143ad0] [c02c7ee8]
 .pci_bus_read_config_byte+0x88/0xd0
 [c00179143b90] [c09c0528] .pci_apply_final_quirks+0x9c/0x18c
 [c00179143c40] [c000142c] .do_one_initcall+0x5c/0x1f0
 [c00179143cf0] [c09a0bb4] .kernel_init_freeable+0x180/0x264
 [c00179143db0] [c0001bfc] .kernel_init+0x1c/0x420
 [c00179143e30] [c8b4] .ret_from_kernel_thread+0x64/0xb0
 Instruction dump:
 6000 4ba0 ebc301d0 3fe2ffc4 3c62ffe0 3bff5530 38638a78 7fe4fb78
 7fc5f378 486ea77d 6000 7c0004ac 801e0f14 0c00 4c00012c 3c62ffe0
 ---[ end trace f841fbc03c9d2e1b ]---
 
 Kernel panic - not syncing: Attempted to kill init! exitcode=0x000b
 
 Rebooting in 180 seconds..
 
 Signed-off-by: Yuanquan Chen yuanquan.c...@freescale.com
 Signed-off-by: Roy Zang tie-fei.z...@freescale.com
 ---
 based on Kumar's next branch.
 tested on P3041 and T4240.
Please ignore this patch, I will send a v2 version.
Thanks.
Roy

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