diff mbox

ARM: footbridge: fix overlapping PCI mappings

Message ID 1372387356-15341-1-git-send-email-vapier@gentoo.org (mailing list archive)
State New, archived
Headers show

Commit Message

Mike Frysinger June 28, 2013, 2:42 a.m. UTC
Commit 8ef6e6201b26cb9fde79c1baa08145af6aca2815 (ARM: footbridge: use
fixed PCI i/o mapping) broke booting on my netwinder.  Before that,
everything boots fine.  Since then, it crashes on boot.

With earlyprintk, I see it BUG-ing like so:
kernel BUG at lib/ioremap.c:27!
Internal error: Oops - BUG: 0 [#1] ARM
...
[<c0139b54>] (ioremap_page_range+0x128/0x154) from [<c02e6a6c>] (dc21285_setup+0xd0/0x114)
[<c02e6a6c>] (dc21285_setup+0xd0/0x114) from [<c02e4874>] (pci_common_init+0xa0/0x298)
[<c02e4874>] (pci_common_init+0xa0/0x298) from [<c02e793c>] (netwinder_pci_init+0xc/0x18)
[<c02e793c>] (netwinder_pci_init+0xc/0x18) from [<c02e27d0>] (do_one_initcall+0xb4/0x180)
...

Russell points out it's because of overlapping PCI mappings that was
added with the aforementioned commit.  Rob thought the code would re-use
the static mapping, but that turns out to not be the case and instead
hits the BUG further down.

After deleting this hunk as suggested by Russel, the system boots up fine
again and all my PCI devices work (IDE, ethernet, the DC21285).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 arch/arm/mach-footbridge/dc21285.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Rob Herring July 15, 2013, 8:52 p.m. UTC | #1
On Thu, Jun 27, 2013 at 9:42 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> Commit 8ef6e6201b26cb9fde79c1baa08145af6aca2815 (ARM: footbridge: use
> fixed PCI i/o mapping) broke booting on my netwinder.  Before that,
> everything boots fine.  Since then, it crashes on boot.
>
> With earlyprintk, I see it BUG-ing like so:
> kernel BUG at lib/ioremap.c:27!
> Internal error: Oops - BUG: 0 [#1] ARM
> ...
> [<c0139b54>] (ioremap_page_range+0x128/0x154) from [<c02e6a6c>] (dc21285_setup+0xd0/0x114)
> [<c02e6a6c>] (dc21285_setup+0xd0/0x114) from [<c02e4874>] (pci_common_init+0xa0/0x298)
> [<c02e4874>] (pci_common_init+0xa0/0x298) from [<c02e793c>] (netwinder_pci_init+0xc/0x18)
> [<c02e793c>] (netwinder_pci_init+0xc/0x18) from [<c02e27d0>] (do_one_initcall+0xb4/0x180)
> ...
>
> Russell points out it's because of overlapping PCI mappings that was
> added with the aforementioned commit.  Rob thought the code would re-use
> the static mapping, but that turns out to not be the case and instead
> hits the BUG further down.
>
> After deleting this hunk as suggested by Russel, the system boots up fine
> again and all my PCI devices work (IDE, ethernet, the DC21285).
>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Acked-by: Rob Herring <rob.herring@calxeda.com>

Olof, Kevin,

Please apply and add stable.

Rob

> ---
>  arch/arm/mach-footbridge/dc21285.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c
> index a7cd2cf..3490a24 100644
> --- a/arch/arm/mach-footbridge/dc21285.c
> +++ b/arch/arm/mach-footbridge/dc21285.c
> @@ -276,8 +276,6 @@ int __init dc21285_setup(int nr, struct pci_sys_data *sys)
>
>         sys->mem_offset  = DC21285_PCI_MEM;
>
> -       pci_ioremap_io(0, DC21285_PCI_IO);
> -
>         pci_add_resource_offset(&sys->resources, &res[0], sys->mem_offset);
>         pci_add_resource_offset(&sys->resources, &res[1], sys->mem_offset);
>
> --
> 1.8.2.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Olof Johansson July 23, 2013, 3:02 a.m. UTC | #2
On Mon, Jul 15, 2013 at 03:52:12PM -0500, Rob Herring wrote:
> On Thu, Jun 27, 2013 at 9:42 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> > Commit 8ef6e6201b26cb9fde79c1baa08145af6aca2815 (ARM: footbridge: use
> > fixed PCI i/o mapping) broke booting on my netwinder.  Before that,
> > everything boots fine.  Since then, it crashes on boot.
> >
> > With earlyprintk, I see it BUG-ing like so:
> > kernel BUG at lib/ioremap.c:27!
> > Internal error: Oops - BUG: 0 [#1] ARM
> > ...
> > [<c0139b54>] (ioremap_page_range+0x128/0x154) from [<c02e6a6c>] (dc21285_setup+0xd0/0x114)
> > [<c02e6a6c>] (dc21285_setup+0xd0/0x114) from [<c02e4874>] (pci_common_init+0xa0/0x298)
> > [<c02e4874>] (pci_common_init+0xa0/0x298) from [<c02e793c>] (netwinder_pci_init+0xc/0x18)
> > [<c02e793c>] (netwinder_pci_init+0xc/0x18) from [<c02e27d0>] (do_one_initcall+0xb4/0x180)
> > ...
> >
> > Russell points out it's because of overlapping PCI mappings that was
> > added with the aforementioned commit.  Rob thought the code would re-use
> > the static mapping, but that turns out to not be the case and instead
> > hits the BUG further down.
> >
> > After deleting this hunk as suggested by Russel, the system boots up fine
> > again and all my PCI devices work (IDE, ethernet, the DC21285).
> >
> > Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> 
> Acked-by: Rob Herring <rob.herring@calxeda.com>
> 
> Olof, Kevin,
> 
> Please apply and add stable.

Done (stable v3.5+). Thanks.


-Olof
diff mbox

Patch

diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c
index a7cd2cf..3490a24 100644
--- a/arch/arm/mach-footbridge/dc21285.c
+++ b/arch/arm/mach-footbridge/dc21285.c
@@ -276,8 +276,6 @@  int __init dc21285_setup(int nr, struct pci_sys_data *sys)
 
 	sys->mem_offset  = DC21285_PCI_MEM;
 
-	pci_ioremap_io(0, DC21285_PCI_IO);
-
 	pci_add_resource_offset(&sys->resources, &res[0], sys->mem_offset);
 	pci_add_resource_offset(&sys->resources, &res[1], sys->mem_offset);