From: Jiaxun Yang <jiaxun.yang@flygoat.com>
To: John Garry <john.garry@huawei.com>, linux-mips@vger.kernel.org
Cc: chenhc@lemote.com, tsbogend@alpha.franken.de
Subject: Re: logical PIO code for mips question (was Re: [PATCH RESEND v3 3/3] MIPS: Loongson64: Enable PCI_IO_VMMAP)
Date: Thu, 14 Jan 2021 19:10:44 +0800 [thread overview]
Message-ID: <83748d12-eee2-686a-e12d-2abf19aeccd0@flygoat.com> (raw)
In-Reply-To: <797e574a-e4fe-df6c-f352-6a5a239c32de@huawei.com>
在 2021/1/14 下午5:18, John Garry 写道:
> On 14/01/2021 00:13, Jiaxun Yang wrote:
>>>> range->fwnode = &of_root->fwnode;
>>>> + range->size = MMIO_LOWER_RESERVED;
>>>> + range->hw_start = LOONGSON_PCIIO_BASE;
>>>> + range->flags = LOGIC_PIO_CPU_MMIO;
>>>> +
>>>> + if (logic_pio_register_range(range)) {
>>>> + pr_err("Failed to reserve PIO range for legacy ISA\n");
>>>> + goto free_range;
>>>> + }
>>>
>>> Hi Jiaxun,
>>>
>>>> +
>>>> + if (WARN(range->io_start != 0,
>>>> + "Reserved PIO range does not start from 0\n"))
>>>
>>> Do the mips code still rely on this check?
>
>
> Hi Jiaxun,
>
>>
>> Yes :-/
>
> ok, but I was hoping that this dependency would be removed at some stage.
>
>>
>>>
>>> I was considering changing the logical PIO code to reserve the first
>>> 64K of PCI MMIO space, but making that change would break this code
>>> as things stand.
>>>
>>> The motivation is that some drivers, like [0], access IO ports
>>> unconditionally and can kill systems when no PCI host exists. By
>>> reserving the first 64K, accesses by those drivers could nullified.
>>
>> Actually we're trying to deal with almost the same problem.
>> The reserved region on MIPS is used to serve these driver that access
>> I/O ports bypassing resource subsystem.
>
> Yes, so reserving the first 64K of IO space would break mips, as
> things stand. Has any work been done for these drivers that bypass
> resource subsystem (or directly access hardcoded IO ports)?
Not yet.
>
> I may just do this (reserve 64K) under INDIRECT_PIO for now, not sure
> yet.
Probably we can make the first page of LOGIC_PIO a special region. It
could be a
reserved region when no legacy ISA bus present or overlay by MMIO in
case like
MIPS here.
Thanks.
- Jiaxun
>
> Thanks,
> John
next prev parent reply other threads:[~2021-01-14 11:12 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-26 11:47 [PATCH 0/4] MIPS: Loongson64: Use logic_pio Jiaxun Yang
2020-04-26 11:47 ` [PATCH 1/4] MIPS: Massage address spaces headers Jiaxun Yang
2020-04-26 11:47 ` [PATCH 2/4] MIPS: Introduce PCI_IO_VMMAP Jiaxun Yang
2020-04-26 11:47 ` [PATCH 3/4] lib: logic_pio: Introduce MMIO_LOWER_RESERVED Jiaxun Yang
2020-04-27 10:43 ` John Garry
2020-04-27 11:03 ` Jiaxun Yang
2020-04-27 11:54 ` John Garry
2020-04-27 11:54 ` John Garry
2020-04-27 11:54 ` John Garry
2020-04-27 12:21 ` Jiaxun Yang
2020-04-27 12:21 ` Jiaxun Yang
2020-04-27 12:21 ` Jiaxun Yang
2020-04-26 11:47 ` [PATCH 4/4] MIPS: Loongson64: Enable PCI_IO_VMMAP Jiaxun Yang
2020-04-30 0:57 ` [PATCH v3 1/3] MIPS: Move VMALLOC_START into spaces.h Jiaxun Yang
2020-04-30 0:57 ` [PATCH v3 2/3] MIPS: Introduce PCI_IO_VMMAP Jiaxun Yang
2020-04-30 0:57 ` [PATCH v3 3/3] MIPS: Loongson64: Enable PCI_IO_VMMAP Jiaxun Yang
2020-05-08 11:44 ` [PATCH RESEND v3 1/3] MIPS: Move VMALLOC_START into spaces.h Jiaxun Yang
2020-05-08 11:44 ` [PATCH RESEND v3 2/3] MIPS: Introduce PCI_IO_VMMAP Jiaxun Yang
2020-05-08 16:11 ` Thomas Bogendoerfer
2020-05-08 16:22 ` Jiaxun Yang
2020-05-08 16:52 ` Thomas Bogendoerfer
2020-05-08 17:09 ` Jiaxun Yang
2020-05-14 14:21 ` Thomas Bogendoerfer
2020-05-14 14:56 ` Jiaxun Yang
2020-05-14 13:20 ` Jiaxun Yang
2020-05-08 11:44 ` [PATCH RESEND v3 3/3] MIPS: Loongson64: Enable PCI_IO_VMMAP Jiaxun Yang
2021-01-13 18:02 ` logical PIO code for mips question (was Re: [PATCH RESEND v3 3/3] MIPS: Loongson64: Enable PCI_IO_VMMAP) John Garry
2021-01-14 0:13 ` Jiaxun Yang
2021-01-14 9:18 ` John Garry
2021-01-14 11:10 ` Jiaxun Yang [this message]
2021-01-14 11:20 ` John Garry
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=83748d12-eee2-686a-e12d-2abf19aeccd0@flygoat.com \
--to=jiaxun.yang@flygoat.com \
--cc=chenhc@lemote.com \
--cc=john.garry@huawei.com \
--cc=linux-mips@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
/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.