From: Finn Thain <fthain@linux-m68k.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: William R Sowerbutts <will@sowerbutts.com>,
linux-m68k <linux-m68k@lists.linux-m68k.org>
Subject: Re: Linux 6.4.4 on m68k - Q40 - pata_falcon causes oops at boot time
Date: Sun, 23 Jul 2023 19:59:01 +1000 (AEST) [thread overview]
Message-ID: <1dabd80c-d91e-7869-e95e-199fc58b9f84@linux-m68k.org> (raw)
In-Reply-To: <CAMuHMdUU62jjunJh9cqSqHT87B0H0A4udOOPs=WN7WZKpcagVA@mail.gmail.com>
On Sun, 23 Jul 2023, Geert Uytterhoeven wrote:
> >
> > First the correct ISA port address (0x3f6) is translated to the
> > correct MMIO address (0xff400000 + 4 * 0x3f6 = 0xff400fd8). This is
> > done when the platform device is declared in arch/m68k/q40/config.c
> > around line 288.
> >
> > Then this address is passed to pata_falcon which computes the correct
> > MMIO addresses for the ATA task file registers in
> > drivers/ata/pata_falcon.c around line 168 (ap->ioaddr.altstatus_addr =
> > 0xff400fd8 + 1 = 0xff400fd9)
> >
> > The access to the hardware registers is performed in
> > drivers/ata/libata-sff.c which uses ioread8/iowrite8. These functions
> > are defined in lib/iomap.c. These functions look at the address passed
> > it, determine that it is an MMIO address, and pass it to readb/writeb.
> > This is the first error, we actually want to do an ISA I/O cycle, not
> > memory cycle, but being passed a pre-translated address confuses these
> > two functions.
> >
> > arch/m68k/include/asm/io_mm.h defines inb/outb/readb/writeb etc. They
> > translate the provided address into the MMIO address in the Q40s
> > physical address space and then perform the MMIO access. This is
> > where the second, unnecessary, translation takes place, and the
> > resulting address is wrong: (0xff800000 + 1 + 4 * 0xff400fd9) &
> > 0xffffffff = 0xfc803f65 -- and this is the address accessed when we
> > get the oops.
>
Could be related to the bug that Michael tackled here?
https://lore.kernel.org/linux-m68k/1623290683-17859-1-git-send-email-schmitzmic@gmail.com/
> Looks like something was missed in commit 44b1fbc0f5f30e66 ("m68k/q40:
> Replace q40ide driver with pata_falcon and falconide") in v5.14. Before,
> Q40 used its own IDE driver (q40ide, CONFIG_BLK_DEV_Q40IDE).
Could be that too.
> It might be a good idea to verify that IDE works in v5.13
Yes, please do.
next prev parent reply other threads:[~2023-07-23 9:59 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <ZLvZmVfzJNHlPTlJ@sowerbutts.com>
2023-07-23 8:35 ` Linux 6.4.4 on m68k - Q40 - pata_falcon causes oops at boot time Geert Uytterhoeven
2023-07-23 9:59 ` Finn Thain [this message]
2023-07-23 15:28 ` William R Sowerbutts
2023-07-24 1:43 ` Finn Thain
2023-07-24 11:09 ` William R Sowerbutts
2023-07-26 7:22 ` Finn Thain
2023-07-23 20:26 ` Michael Schmitz
2023-07-24 11:42 ` William R Sowerbutts
2023-07-24 20:26 ` Michael Schmitz
2023-07-26 9:22 ` Finn Thain
2023-07-26 20:13 ` Michael Schmitz
2023-07-27 1:16 ` Finn Thain
2023-07-27 3:17 ` Michael Schmitz
2023-07-27 23:47 ` Finn Thain
2023-07-28 7:21 ` Geert Uytterhoeven
2023-07-28 7:52 ` Michael Schmitz
2023-07-28 8:03 ` Geert Uytterhoeven
2023-07-29 4:56 ` Michael Schmitz
2023-08-13 3:06 ` Michael Schmitz
2023-08-13 7:38 ` Finn Thain
2023-08-13 21:20 ` Michael Schmitz
2023-08-13 22:24 ` William R Sowerbutts
2023-08-13 22:54 ` Michael Schmitz
2023-08-13 23:37 ` Finn Thain
2023-08-14 0:33 ` Michael Schmitz
2023-08-14 1:15 ` Finn Thain
2023-08-14 2:48 ` Michael Schmitz
2023-08-14 11:18 ` William R Sowerbutts
2023-08-14 20:15 ` Michael Schmitz
2023-08-14 20:24 ` Richard Z
2023-08-14 23:31 ` Finn Thain
2023-08-15 3:05 ` Richard Z
2023-08-15 3:30 ` Michael Schmitz
2023-08-15 9:49 ` William R Sowerbutts
2023-08-15 10:42 ` Geert Uytterhoeven
2023-08-15 20:43 ` Richard Z
2023-08-15 20:13 ` Michael Schmitz
2023-08-15 22:10 ` William R Sowerbutts
2023-08-15 22:38 ` Michael Schmitz
2023-08-14 20:19 ` Richard Z
2023-08-14 21:22 ` Michael Schmitz
2023-08-15 11:04 ` William R Sowerbutts
2023-08-16 17:56 ` William R Sowerbutts
2023-07-27 7:18 ` Geert Uytterhoeven
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=1dabd80c-d91e-7869-e95e-199fc58b9f84@linux-m68k.org \
--to=fthain@linux-m68k.org \
--cc=geert@linux-m68k.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=will@sowerbutts.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox