All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>,
	Dominik Brodowski <linux@dominikbrodowski.net>,
	linux-omap <linux-omap@vger.kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 14/22] ARM: omap1: use pci_ioremap_io() for omap_cf
Date: Wed, 14 Aug 2019 00:49:18 -0700	[thread overview]
Message-ID: <20190814074918.GA52127@atomide.com> (raw)
In-Reply-To: <CAK8P3a0LjKrc+7c5Ht9OL7LfYyLnG9=y7u+w24ujA1xAid_yCQ@mail.gmail.com>

* Arnd Bergmann <arnd@arndb.de> [190813 19:34]:
> On Tue, Aug 13, 2019 at 8:12 PM Aaro Koskinen <aaro.koskinen@iki.fi> wrote:
> > On Tue, Aug 13, 2019 at 01:02:16PM +0200, Arnd Bergmann wrote:
> > > On Tue, Aug 13, 2019 at 12:36 PM Tony Lindgren <tony@atomide.com> wrote:
> >
> > > - I force CONFIG_PCI to be enabled here in order to keep the
> > >   asm/io.h logic unchanged. If PCI support in itself is an issue,
> > >   then turning on CONFIG_PCI without the rest of this patch
> > >   should also break.
> >
> > The board dies early, probably in pci_reserve_io():
> >
> > Starting kernel ...
> >
> > [    0.000000] Booting Linux on physical CPU 0x0
> > [    0.000000] Linux version 5.3.0-rc4-osk-los_80efa+-00028-g09f6f22a63e9 (aaro@amd-fx-6350) (gcc version 8.3.0 (GCC)) #1 Tue Aug 13 20:50:11 EEST 2019
> > [    0.000000] CPU: ARM926EJ-S [41069263] revision 3 (ARMv5TEJ), cr=0005317f
> > [    0.000000] CPU: VIVT data cache, VIVT instruction cache
> > [    0.000000] Machine: TI-OSK
> > [    0.000000] Ignoring tag cmdline (using the default kernel command line)
> > [    0.000000] printk: bootconsole [earlycon0] enabled
> > [    0.000000] Memory policy: Data cache writeback
> > [    0.000000] Internal error: Oops - undefined instruction: 0 [#1] ARM
> > [    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 5.3.0-rc4-osk-los_80efa+-00028-g09f6f22a63e9 #1
> > [    0.000000] Hardware name: TI-OSK
> > [    0.000000] PC is at vm_area_add_early+0x1c/0x74
> 
> That sounds like an address conflict in the virtual addres space.
> 
> In multiplatform kernels, PCI I/O space is hardwired to addresses
> 0xfee00000-0xfeffffff,
> which happened to be available on all the other machines that needed it so far.
> 
> OMAP1_IO_VIRT is 0xfefb0000-0xfefeffff, which clearly overlaps with the end of
> the PCI I/O area.
> 
> We only really need 4KB of I/O space rather than the full 2MB, but it
> would also be
> good not to make this too machine specific.
> 
> Could we change OMAP1_IO_OFFSET to stay out of that area? Something like
> 
> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
> index 97c114c1ef80..3b66d203dc98 100644
> --- a/arch/arm/Kconfig.debug
> +++ b/arch/arm/Kconfig.debug
> @@ -1794,9 +1794,9 @@ config DEBUG_UART_VIRT
>         default 0xfef00000 if ARCH_IXP4XX && !CPU_BIG_ENDIAN
>         default 0xfef00003 if ARCH_IXP4XX && CPU_BIG_ENDIAN
>         default 0xfef36000 if DEBUG_HIGHBANK_UART
> -       default 0xfefb0000 if DEBUG_OMAP1UART1 || DEBUG_OMAP7XXUART1
> -       default 0xfefb0800 if DEBUG_OMAP1UART2 || DEBUG_OMAP7XXUART2
> -       default 0xfefb9800 if DEBUG_OMAP1UART3 || DEBUG_OMAP7XXUART3
> +       default 0xff000000 if DEBUG_OMAP1UART1 || DEBUG_OMAP7XXUART1
> +       default 0xff000800 if DEBUG_OMAP1UART2 || DEBUG_OMAP7XXUART2
> +       default 0xff009800 if DEBUG_OMAP1UART3 || DEBUG_OMAP7XXUART3
>         default 0xff003000 if DEBUG_U300_UART
>         default 0xffd01000 if DEBUG_HIP01_UART
>         default DEBUG_UART_PHYS if !MMU
> diff --git a/arch/arm/mach-omap1/hardware.h b/arch/arm/mach-omap1/hardware.h
> index 232b8deef907..9fc76a3c9e57 100644
> --- a/arch/arm/mach-omap1/hardware.h
> +++ b/arch/arm/mach-omap1/hardware.h
> @@ -61,7 +61,7 @@ static inline u32 omap_cs3_phys(void)
> 
>  #endif /* ifndef __ASSEMBLER__ */
> 
> -#define OMAP1_IO_OFFSET                0x01000000      /* Virtual IO
> = 0xfefb0000 */
> +#define OMAP1_IO_OFFSET                0x00fb0000      /* Virtual IO
> = 0xff000000 */
>  #define OMAP1_IO_ADDRESS(pa)   IOMEM((pa) - OMAP1_IO_OFFSET)
> 
>  #include "serial.h"

Oh OK yeah sounds like that's the issue.

> There may be additional locations that hardcode the virtual address.

Those should be in mach-omap1/io.c, and I recall innovator had some
hardcoded fpga address that should also be checked.

Regards,

Tony

WARNING: multiple messages have this Message-ID (diff)
From: Tony Lindgren <tony@atomide.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Dominik Brodowski <linux@dominikbrodowski.net>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	linux-omap <linux-omap@vger.kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 14/22] ARM: omap1: use pci_ioremap_io() for omap_cf
Date: Wed, 14 Aug 2019 00:49:18 -0700	[thread overview]
Message-ID: <20190814074918.GA52127@atomide.com> (raw)
In-Reply-To: <CAK8P3a0LjKrc+7c5Ht9OL7LfYyLnG9=y7u+w24ujA1xAid_yCQ@mail.gmail.com>

* Arnd Bergmann <arnd@arndb.de> [190813 19:34]:
> On Tue, Aug 13, 2019 at 8:12 PM Aaro Koskinen <aaro.koskinen@iki.fi> wrote:
> > On Tue, Aug 13, 2019 at 01:02:16PM +0200, Arnd Bergmann wrote:
> > > On Tue, Aug 13, 2019 at 12:36 PM Tony Lindgren <tony@atomide.com> wrote:
> >
> > > - I force CONFIG_PCI to be enabled here in order to keep the
> > >   asm/io.h logic unchanged. If PCI support in itself is an issue,
> > >   then turning on CONFIG_PCI without the rest of this patch
> > >   should also break.
> >
> > The board dies early, probably in pci_reserve_io():
> >
> > Starting kernel ...
> >
> > [    0.000000] Booting Linux on physical CPU 0x0
> > [    0.000000] Linux version 5.3.0-rc4-osk-los_80efa+-00028-g09f6f22a63e9 (aaro@amd-fx-6350) (gcc version 8.3.0 (GCC)) #1 Tue Aug 13 20:50:11 EEST 2019
> > [    0.000000] CPU: ARM926EJ-S [41069263] revision 3 (ARMv5TEJ), cr=0005317f
> > [    0.000000] CPU: VIVT data cache, VIVT instruction cache
> > [    0.000000] Machine: TI-OSK
> > [    0.000000] Ignoring tag cmdline (using the default kernel command line)
> > [    0.000000] printk: bootconsole [earlycon0] enabled
> > [    0.000000] Memory policy: Data cache writeback
> > [    0.000000] Internal error: Oops - undefined instruction: 0 [#1] ARM
> > [    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 5.3.0-rc4-osk-los_80efa+-00028-g09f6f22a63e9 #1
> > [    0.000000] Hardware name: TI-OSK
> > [    0.000000] PC is at vm_area_add_early+0x1c/0x74
> 
> That sounds like an address conflict in the virtual addres space.
> 
> In multiplatform kernels, PCI I/O space is hardwired to addresses
> 0xfee00000-0xfeffffff,
> which happened to be available on all the other machines that needed it so far.
> 
> OMAP1_IO_VIRT is 0xfefb0000-0xfefeffff, which clearly overlaps with the end of
> the PCI I/O area.
> 
> We only really need 4KB of I/O space rather than the full 2MB, but it
> would also be
> good not to make this too machine specific.
> 
> Could we change OMAP1_IO_OFFSET to stay out of that area? Something like
> 
> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
> index 97c114c1ef80..3b66d203dc98 100644
> --- a/arch/arm/Kconfig.debug
> +++ b/arch/arm/Kconfig.debug
> @@ -1794,9 +1794,9 @@ config DEBUG_UART_VIRT
>         default 0xfef00000 if ARCH_IXP4XX && !CPU_BIG_ENDIAN
>         default 0xfef00003 if ARCH_IXP4XX && CPU_BIG_ENDIAN
>         default 0xfef36000 if DEBUG_HIGHBANK_UART
> -       default 0xfefb0000 if DEBUG_OMAP1UART1 || DEBUG_OMAP7XXUART1
> -       default 0xfefb0800 if DEBUG_OMAP1UART2 || DEBUG_OMAP7XXUART2
> -       default 0xfefb9800 if DEBUG_OMAP1UART3 || DEBUG_OMAP7XXUART3
> +       default 0xff000000 if DEBUG_OMAP1UART1 || DEBUG_OMAP7XXUART1
> +       default 0xff000800 if DEBUG_OMAP1UART2 || DEBUG_OMAP7XXUART2
> +       default 0xff009800 if DEBUG_OMAP1UART3 || DEBUG_OMAP7XXUART3
>         default 0xff003000 if DEBUG_U300_UART
>         default 0xffd01000 if DEBUG_HIP01_UART
>         default DEBUG_UART_PHYS if !MMU
> diff --git a/arch/arm/mach-omap1/hardware.h b/arch/arm/mach-omap1/hardware.h
> index 232b8deef907..9fc76a3c9e57 100644
> --- a/arch/arm/mach-omap1/hardware.h
> +++ b/arch/arm/mach-omap1/hardware.h
> @@ -61,7 +61,7 @@ static inline u32 omap_cs3_phys(void)
> 
>  #endif /* ifndef __ASSEMBLER__ */
> 
> -#define OMAP1_IO_OFFSET                0x01000000      /* Virtual IO
> = 0xfefb0000 */
> +#define OMAP1_IO_OFFSET                0x00fb0000      /* Virtual IO
> = 0xff000000 */
>  #define OMAP1_IO_ADDRESS(pa)   IOMEM((pa) - OMAP1_IO_OFFSET)
> 
>  #include "serial.h"

Oh OK yeah sounds like that's the issue.

> There may be additional locations that hardcode the virtual address.

Those should be in mach-omap1/io.c, and I recall innovator had some
hardcoded fpga address that should also be checked.

Regards,

Tony

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-08-14  7:49 UTC|newest]

Thread overview: 138+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08 21:22 [PATCH 00/22] ARM: omap1 multiplatform support Arnd Bergmann
2019-08-08 21:22 ` Arnd Bergmann
2019-08-08 21:22 ` [PATCH 01/22] ARM: omap1: innovator: pass lcd control address as pdata Arnd Bergmann
2019-08-08 21:22   ` Arnd Bergmann
2019-08-08 21:22   ` Arnd Bergmann
2019-08-08 21:22   ` Arnd Bergmann
2019-08-09 11:29   ` Bartlomiej Zolnierkiewicz
2019-08-09 11:29     ` Bartlomiej Zolnierkiewicz
2019-08-09 11:29     ` Bartlomiej Zolnierkiewicz
2019-08-08 21:22 ` [PATCH 02/22] ARM: omap1: make omapfb standalone compilable Arnd Bergmann
2019-08-08 21:22   ` Arnd Bergmann
2019-08-08 21:22   ` Arnd Bergmann
2019-08-09 11:32   ` Bartlomiej Zolnierkiewicz
2019-08-09 11:32     ` Bartlomiej Zolnierkiewicz
2019-08-09 11:43     ` Arnd Bergmann
2019-08-09 11:43       ` Arnd Bergmann
2019-08-09 14:36       ` Bartlomiej Zolnierkiewicz
2019-08-09 14:36         ` Bartlomiej Zolnierkiewicz
2019-08-09 19:55         ` Arnd Bergmann
2019-08-09 19:55           ` Arnd Bergmann
2019-08-12  9:21           ` Bartlomiej Zolnierkiewicz
2019-08-12  9:21             ` Bartlomiej Zolnierkiewicz
2019-08-08 21:22 ` [PATCH 03/22] ARM: omap1: move omap15xx local bus handling to usb.c Arnd Bergmann
2019-08-08 21:22   ` Arnd Bergmann
2019-08-09  5:32   ` Felipe Balbi
2019-08-09  5:32     ` Felipe Balbi
2019-08-09  5:32     ` Felipe Balbi
2019-08-10 10:28   ` Christoph Hellwig
2019-08-10 10:28     ` Christoph Hellwig
2019-08-10 10:28     ` Christoph Hellwig
2019-08-08 21:22 ` [PATCH 04/22] ARM: omap1: move ohci phy power handling to board files Arnd Bergmann
2019-08-08 21:22   ` Arnd Bergmann
2019-08-08 21:22 ` [PATCH 05/22] ARM: omap1: move mach/usb.h to include/linux/soc Arnd Bergmann
2019-08-08 21:22   ` Arnd Bergmann
2019-08-08 21:22   ` Arnd Bergmann
2019-08-08 21:22 ` [PATCH 06/22] ARM: omap1: move some headers " Arnd Bergmann
2019-08-08 21:22   ` Arnd Bergmann
2019-08-08 21:22   ` Arnd Bergmann
2019-08-08 21:22 ` [PATCH 07/22] ARM: omap1: move perseus spi pinconf to board file Arnd Bergmann
2019-08-08 21:22   ` Arnd Bergmann
2019-08-08 21:22   ` Arnd Bergmann
2019-08-08 22:24   ` Mark Brown
2019-08-08 22:24     ` Mark Brown
2019-08-09 11:29     ` Arnd Bergmann
2019-08-09 11:29       ` Arnd Bergmann
2019-08-09 12:01       ` Mark Brown
2019-08-09 12:01         ` Mark Brown
2019-08-08 21:22 ` [PATCH 08/22] ARM: omap1: move CF chipselect setup " Arnd Bergmann
2019-08-08 21:22   ` Arnd Bergmann
2019-08-08 21:22   ` Arnd Bergmann
2019-08-08 21:22 ` [PATCH 09/22] fbdev: omap: avoid using mach/*.h files Arnd Bergmann
2019-08-08 21:22   ` Arnd Bergmann
2019-08-08 21:22   ` Arnd Bergmann
2019-08-08 21:22   ` Arnd Bergmann
2019-08-09 11:34   ` Bartlomiej Zolnierkiewicz
2019-08-09 11:34     ` Bartlomiej Zolnierkiewicz
2019-08-09 11:34     ` Bartlomiej Zolnierkiewicz
2019-08-08 21:22 ` [PATCH 10/22] usb: omap: avoid mach/*.h headers Arnd Bergmann
2019-08-08 21:22   ` Arnd Bergmann
2019-08-09  5:38   ` Greg Kroah-Hartman
2019-08-09  5:38     ` Greg Kroah-Hartman
2019-08-08 21:22 ` [PATCH 11/22] clocksource: ti-dmtimer: avoid using mach/hardware.h Arnd Bergmann
2019-08-08 21:22   ` Arnd Bergmann
2019-08-08 21:22   ` Arnd Bergmann
2019-08-09  7:01   ` Daniel Lezcano
2019-08-09  7:01     ` Daniel Lezcano
2019-08-09  7:33     ` Arnd Bergmann
2019-08-09  7:33       ` Arnd Bergmann
2019-08-09  7:57       ` Daniel Lezcano
2019-08-09  7:57         ` Daniel Lezcano
2019-08-08 21:22 ` [PATCH 12/22] serial: 8250/omap1: include linux/soc/ti/omap1-soc.h Arnd Bergmann
2019-08-08 21:22   ` Arnd Bergmann
2019-08-08 21:22   ` Arnd Bergmann
2019-08-08 21:22 ` [PATCH 13/22] input: omap: void using mach/*.h headers Arnd Bergmann
2019-08-08 21:22   ` Arnd Bergmann
2019-08-08 21:42   ` Dmitry Torokhov
2019-08-08 21:42     ` Dmitry Torokhov
2019-08-08 21:46     ` Arnd Bergmann
2019-08-08 21:46       ` Arnd Bergmann
2019-08-08 21:46       ` Arnd Bergmann
2019-08-08 22:19       ` Dmitry Torokhov
2019-08-08 22:19         ` Dmitry Torokhov
2019-08-08 23:39         ` Sebastian Reichel
2019-08-08 23:39           ` Sebastian Reichel
2019-08-09 11:23           ` Arnd Bergmann
2019-08-09 11:23             ` Arnd Bergmann
2019-08-08 21:22 ` [PATCH 14/22] ARM: omap1: use pci_ioremap_io() for omap_cf Arnd Bergmann
2019-08-08 21:22   ` Arnd Bergmann
2019-08-13 10:36   ` Tony Lindgren
2019-08-13 10:36     ` Tony Lindgren
2019-08-13 11:02     ` Arnd Bergmann
2019-08-13 11:02       ` Arnd Bergmann
2019-08-13 18:11       ` Aaro Koskinen
2019-08-13 18:11         ` Aaro Koskinen
2019-08-13 18:11         ` Aaro Koskinen
2019-08-13 19:33         ` Arnd Bergmann
2019-08-13 19:33           ` Arnd Bergmann
2019-08-14  7:49           ` Tony Lindgren [this message]
2019-08-14  7:49             ` Tony Lindgren
2019-08-14 10:36             ` Arnd Bergmann
2019-08-14 10:36               ` Arnd Bergmann
2019-08-14 13:40               ` Tony Lindgren
2019-08-14 13:40                 ` Tony Lindgren
2019-08-16  8:34               ` Aaro Koskinen
2019-08-16  8:34                 ` Aaro Koskinen
2019-08-27 16:33                 ` Arnd Bergmann
2019-08-27 16:33                   ` Arnd Bergmann
2019-08-27 19:04                   ` Aaro Koskinen
2019-08-27 19:04                     ` Aaro Koskinen
2019-08-28 13:02                     ` Arnd Bergmann
2019-08-28 13:02                       ` Arnd Bergmann
2019-08-28 18:23                       ` Aaro Koskinen
2019-08-28 18:23                         ` Aaro Koskinen
2019-08-28 18:45                         ` Tony Lindgren
2019-08-28 18:45                           ` Tony Lindgren
2019-08-08 21:41 ` [PATCH 15/22] ARM: omap1: move mach/*.h into mach directory Arnd Bergmann
2019-08-08 21:41   ` Arnd Bergmann
2019-08-08 21:41   ` Arnd Bergmann
2019-08-08 21:41   ` [PATCH 16/22] ARM: omap1: move clk support into a single file Arnd Bergmann
2019-08-08 21:41     ` Arnd Bergmann
2019-08-08 21:41     ` Arnd Bergmann
2019-08-08 21:41   ` [PATCH 17/22] ARM: omap1: remove some dead clock code Arnd Bergmann
2019-08-08 21:41     ` Arnd Bergmann
2019-08-08 21:41   ` [PATCH 18/22] ARM: omap1: clk: rework 'struct clk' Arnd Bergmann
2019-08-08 21:41     ` Arnd Bergmann
2019-08-08 21:41   ` [PATCH 19/22] ARM: omap1: clk: use common_clk-like callbacks Arnd Bergmann
2019-08-08 21:41     ` Arnd Bergmann
2019-08-08 21:43 ` [PATCH 20/22] ARM: omap1: clk: use clk_init_data Arnd Bergmann
2019-08-08 21:43   ` Arnd Bergmann
2019-08-08 21:43   ` [PATCH 21/22] ARM: omap1: use common clk framework Arnd Bergmann
2019-08-08 21:43     ` Arnd Bergmann
2019-08-14 21:10     ` Aaro Koskinen
2019-08-14 21:10       ` Aaro Koskinen
2019-08-15  7:10       ` Arnd Bergmann
2019-08-15  7:10         ` Arnd Bergmann
2019-08-08 21:47 ` [PATCH 22/22] ARM: omap1: enable multiplatform Arnd Bergmann
2019-08-08 21:47   ` Arnd Bergmann
2019-08-08 21:47   ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190814074918.GA52127@atomide.com \
    --to=tony@atomide.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=arnd@arndb.de \
    --cc=b.zolnierkie@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.