From: Florian Fainelli <florian.fainelli@broadcom.com>
To: Christian Marangi <ansuelsmth@gmail.com>
Cc: "Hauke Mehrtens" <hauke@hauke-m.de>,
"Rafał Miłecki" <zajec5@gmail.com>,
"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Broadcom internal kernel review list"
<bcm-kernel-feedback-list@broadcom.com>,
"Álvaro Fernández Rojas" <noltari@gmail.com>,
linux-mips@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
"Daniel González Cabanelas" <dgcbueu@gmail.com>
Subject: Re: [PATCH 6/6] bmips: dma: drop redundant boot_cpu_type in arch_dma_sync
Date: Fri, 3 May 2024 13:08:56 -0700 [thread overview]
Message-ID: <aa80728e-a2fc-4b2a-b441-fc884abd0535@broadcom.com> (raw)
In-Reply-To: <66353d60.050a0220.df862.761f@mx.google.com>
[-- Attachment #1: Type: text/plain, Size: 1489 bytes --]
On 5/3/24 12:39, Christian Marangi wrote:
> On Fri, May 03, 2024 at 12:07:45PM -0700, Florian Fainelli wrote:
>> On 5/3/24 06:54, Christian Marangi wrote:
>>> Drop redundant boot_cpu_type in arch_sync_dma_for_cpu_all. These needs
>>> to be parsed only once and we can make use of bmips_rac_flush_disable to
>>> disable RAC flush on unsupported CPU.
>>>
>>> Set this value in bmips_cpu_setup for unsupported CPU to skip this
>>> redundant check every time DMA needs to be synced.
>>>
>>> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
>>
>> You are taking a shortcut that is reasonable in premise, but keying off the
>> bmips_rac_flush_disable is IMHO misleading. The RAC is enabled in the
>> BMIPS5000 and BMIPS5200 cores, just it does not need SW management unlike
>> earlier cores.
>>
>> If you renamed it to bmips_rac_flush_needed that might be more compelling.
>> Also, the other reason is that on a kernel that was configured for
>> supporting only BMIPS5000 and BMIPS5200 CPUs, I think we could get some
>> decent dead code elimination of the boot_cpu_type() check, which would not
>> be the case.
>
> I was a bit confused by the last part, should I drop this or just rename
> the variable? Cause I think for kernel that support ONLY those CPU I
> guess the DMA function will be optimized anyway since the bool will
> always be false I guess?
I don't think it can be optimized, I would drop that patch. This is a
hot-path and so any optimization is welcome.
--
Florian
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]
next prev parent reply other threads:[~2024-05-03 20:09 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-03 13:54 [PATCH 0/6] mips: bmips: improve handling of RAC and CBR addr Christian Marangi
2024-05-03 13:54 ` [PATCH 1/6] mips: bmips: BCM6358: make sure CBR is correctly set Christian Marangi
2024-05-03 13:54 ` [PATCH 2/6] mips: bmips: rework and cache CBR addr handling Christian Marangi
2024-05-03 19:00 ` Florian Fainelli
2024-05-03 13:54 ` [PATCH 3/6] dt-bindings: mips: brcm: Document mips-cbr-reg property Christian Marangi
2024-05-03 16:21 ` Conor Dooley
2024-05-03 19:33 ` Christian Marangi
2024-05-03 20:06 ` Florian Fainelli
2024-05-03 22:14 ` Conor Dooley
2024-05-05 16:05 ` Christian Marangi
2024-05-03 13:54 ` [PATCH 4/6] mips: bmips: setup: make CBR address configurable Christian Marangi
2024-05-03 19:09 ` Florian Fainelli
2024-05-03 19:35 ` Christian Marangi
2024-05-03 21:24 ` Florian Fainelli
2024-05-03 21:27 ` Christian Marangi
2024-05-03 13:54 ` [PATCH 5/6] mips: bmips: enable RAC on BMIPS4350 Christian Marangi
2024-05-03 18:56 ` Florian Fainelli
2024-05-03 21:11 ` Daniel González Cabanelas
2024-05-03 21:15 ` Christian Marangi
2024-05-03 21:34 ` Daniel González Cabanelas
2024-05-03 13:54 ` [PATCH 6/6] bmips: dma: drop redundant boot_cpu_type in arch_dma_sync Christian Marangi
2024-05-03 13:56 ` Christian Marangi
2024-05-03 19:07 ` Florian Fainelli
2024-05-03 19:39 ` Christian Marangi
2024-05-03 20:08 ` Florian Fainelli [this message]
2024-05-03 13:54 ` [PATCH 6/6] mips: " Christian Marangi
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=aa80728e-a2fc-4b2a-b441-fc884abd0535@broadcom.com \
--to=florian.fainelli@broadcom.com \
--cc=ansuelsmth@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dgcbueu@gmail.com \
--cc=hauke@hauke-m.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=noltari@gmail.com \
--cc=robh@kernel.org \
--cc=tsbogend@alpha.franken.de \
--cc=zajec5@gmail.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
all inboxes | Powered by JetHome®