From: "Suthikulpanit, Suravee" <suravee.suthikulpanit@amd.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Rafael Wysocki <rjw@rjwysocki.net>, Len Brown <lenb@kernel.org>,
"Catalin Marinas" <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
"Hanjun Guo" <hanjun.guo@linaro.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
linux-arm <linux-arm-kernel@lists.infradead.org>,
Rob Herring <robh+dt@kernel.org>,
Murali Karicheri <m-karicheri2@ti.com>,
Jeremy Linton <jeremy.linton@arm.com>
Subject: Re: [PATCH] pci: acpi: Generic function for setting up PCI device DMA coherency
Date: Tue, 25 Aug 2015 18:11:41 +0700 [thread overview]
Message-ID: <55DC4D6D.207@amd.com> (raw)
In-Reply-To: <CAErSpo6TcwVH+TT5wZnLjOPMTa1NBoN=qJCev1rg1n_xFbggBQ@mail.gmail.com>
Hi Bjorn,
On 8/25/2015 3:14 AM, Bjorn Helgaas wrote:
> On Mon, Aug 24, 2015 at 12:09 PM, Suravee Suthikulpanit
> <Suravee.Suthikulpanit@amd.com> wrote:
>
>>>> commit 84cfb2213cd400fef227ec0d7829ec4e12895da9
>>>> Author: Bjorn Helgaas <bhelgaas@google.com>
>>>> Date: Thu Aug 13 19:49:52 2015 -0500
>>>>
>>>> ACPI / scan: Rename acpi_check_dma() to acpi_dma_is_coherent()
>>>>
>>>> The name "acpi_check_dma()" doesn't give any much indication about
>>>> what
>>>> exactly it checks. The function also returns information both as a
>>>> normal
>>>> return value and as the "bool *coherent" return parameter. But
>>>> "*coherent"
>>>> doesn't actually give any extra information: it is unchanged when
>>>> returning
>>>> false and set to true when returning true.
>>>>
>>>> Rename acpi_check_dma() to acpi_dma_is_coherent() so the callers
>>>> read more
>>>> naturally. Drop the return parameter and just use the function
>>>> return
>>>> value.
>>>>
>>>> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
>>
>>
>> This was because, at one point, we wanted to be able to differentiate
>> between the case _CCA=0 and missing _CCA in ARM64, where we would support
>> DMA (using arch-specific cache maintenance) if _CCA=0, and disable DMA when
>> missing _CCA on ARM64.
>>
>> It seems like the logic is now required (please see
>> https://www.mail-archive.com/linux-usb@vger.kernel.org/msg62735.html). So,
>> we would need the true/false return, and the coherent variable to be able to
>> differentiate between the two cases.
>>
>> Please let me know what you think.
>
> It's hard for me to comment without seeing the actual patches. I
> think returning two values (_CCA-seen and coherent) is a confusing
> interface.
Ok. Let me simplify this and send out V2.
Thanks,
Suravee
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2015-08-25 11:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-13 9:58 [PATCH] pci: acpi: Generic function for setting up PCI device DMA coherency Suravee Suthikulpanit
2015-08-14 1:50 ` Bjorn Helgaas
2015-08-24 17:32 ` Bjorn Helgaas
2015-08-24 19:09 ` Suravee Suthikulpanit
2015-08-24 20:14 ` Bjorn Helgaas
2015-08-25 11:11 ` Suthikulpanit, Suravee [this message]
2015-08-24 16:41 ` Suravee Suthikulpanit
2015-08-24 17:32 ` Bjorn Helgaas
2015-08-24 18:02 ` Suravee Suthikulpanit
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=55DC4D6D.207@amd.com \
--to=suravee.suthikulpanit@amd.com \
--cc=bhelgaas@google.com \
--cc=catalin.marinas@arm.com \
--cc=hanjun.guo@linaro.org \
--cc=jeremy.linton@arm.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=m-karicheri2@ti.com \
--cc=rjw@rjwysocki.net \
--cc=robh+dt@kernel.org \
--cc=will.deacon@arm.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;
as well as URLs for NNTP newsgroup(s).