From: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
James Hogan <James.Hogan@imgtec.com>,
Qais Yousef <Qais.Yousef@imgtec.com>
Subject: Re: [PATCH v2 1/4] PCI/quirks: Fix PIIX4 memory base and size mask
Date: Tue, 8 Oct 2013 17:29:38 -0700 [thread overview]
Message-ID: <5254A372.3090302@imgtec.com> (raw)
In-Reply-To: <CAErSpo4pbyth6FU5XUNpRpah94BAuH3fyrGG20VGROyqTfZUtA@mail.gmail.com>
On 10/08/2013 04:13 PM, Bjorn Helgaas wrote:
> On Mon, Oct 7, 2013 at 3:14 PM, Deng-Cheng Zhu <dengcheng.zhu@imgtec.com> wrote:
>> [Resend to the mailing list due to the bounceback caused by html format]
>>
>>
>> On 10/04/2013 09:37 PM, Bjorn Helgaas wrote:
>>> On Fri, Oct 4, 2013 at 9:42 PM, DengCheng Zhu <DengCheng.Zhu@imgtec.com>
>>> wrote:
>>>>> Does this fix a user-visible problem? If so, what does it look like
>>>>> when the problem occurs?
>>>> No, I found the problem while debugging another issue and trying to
>>>> understand this piece of code and after looking into different versions
>>>> of
>>>> PIIX4 datasheets. But I don't think it should prevent such a fix because
>>>> the code is straightforward and the spec is clear enough. If the existing
>>>> encoding was intentionally made like this by the code author due to the
>>>> inaccuracy of the spec, then it's very likely some code comments were
>>>> placed here. There are 2 possibilities:
>>>>
>>>> - This fix breaks something. People should have to bisect the problem.
>>>> - This fix is valid. Some day people need PIIX4 mem quirks and they don't
>>>> have to run into a possibly well-hidden issue.
>>>>
>>>> What do you think?
>>> Don't worry, I'm willing to fix it even if nobody has actually
>>> reported a problem. It's just nice to include the symptoms if
>>> somebody *has* reported it, so when other people see the same symptom,
>>> they can more easily find the fix.
>>
>> Ah, I see. Thanks.
>>
>> So far I didn't see them on any branch in kernel/git/helgaas/pci.git
>> <https://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/>
> This change definitely makes the code match the specs you mentioned.
> But we don't have any problem reports,
It's very likely that nobody really used PIIX4 ACPI devices 12 and 13.
Maybe some day they'll be used, or maybe they can be deleted from the code.
But if they'll be kept in the code, had better fix it IMO.
> and when Linus added this code
> (6693e74a "PCI: be more verbose about resource quirks), he presumably
> was looking at a spec, too. It's possible he transcribed the masks
> incorrectly, but twice in one patch?
>
> The PIIX4 is an old part, and for something like that I would
> generally say "don't touch it" because the risk of breakage outweighs
> a possible fix for machines nobody uses anymore.
>
> However, I see that the PIIX4 is emulated in, e.g., qemu, so it's
> still relevant. But before I apply this, can you please research qemu
> and how it uses these registers? For example, if you can show that
> qemu emulates the registers with the additional bits you add to the
> masks here, then we should be able to make linux act incorrectly by
> setting those bits in a qemu BIOS.
QEMU doesn't emulate PIIX4 ACPI devices 12 & 13, so these registers are not
used in it.
Deng-Cheng
next prev parent reply other threads:[~2013-10-09 0:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-04 23:30 [PATCH v2 0/4] PCI/quirks: PIIX4 ACPI bugfix and cleanups Deng-Cheng Zhu
2013-10-04 23:30 ` [PATCH v2 1/4] PCI/quirks: Fix PIIX4 memory base and size mask Deng-Cheng Zhu
2013-10-05 2:13 ` Bjorn Helgaas
2013-10-05 3:42 ` DengCheng Zhu
2013-10-05 4:37 ` Bjorn Helgaas
2013-10-07 21:14 ` Deng-Cheng Zhu
2013-10-08 23:13 ` Bjorn Helgaas
2013-10-09 0:29 ` Deng-Cheng Zhu [this message]
2013-10-04 23:30 ` [PATCH v2 2/4] PCI/quirks: Rename piix4_[io|mem]_quirk to add acpi Deng-Cheng Zhu
2013-10-08 23:14 ` Bjorn Helgaas
2013-10-09 1:45 ` Deng-Cheng Zhu
2013-10-04 23:30 ` [PATCH v2 3/4] PCI/quirks: Extract the size detection logic of PIIX4 ACPI io and mem Deng-Cheng Zhu
2013-10-04 23:30 ` [PATCH v2 4/4] PCI/quirks: Convert hard-coded values to macros for PIIX4 ACPI quirks Deng-Cheng Zhu
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=5254A372.3090302@imgtec.com \
--to=dengcheng.zhu@imgtec.com \
--cc=James.Hogan@imgtec.com \
--cc=Qais.Yousef@imgtec.com \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
/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.