All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev@vger.kernel.org, Florian Fainelli <f.fainelli@gmail.com>,
	Tristram Ha <Tristram.Ha@microchip.com>,
	Woojung Huh <Woojung.Huh@microchip.com>
Subject: Re: [PATCH V3 05/10] net: dsa: microchip: Use PORT_CTRL_ADDR() instead of indirect function call
Date: Tue, 25 Jun 2019 00:12:09 +0200	[thread overview]
Message-ID: <e328dce5-bb37-7cc7-fa3a-e63558807f04@denx.de> (raw)
In-Reply-To: <20190624032036.GL28942@lunn.ch>

On 6/24/19 5:20 AM, Andrew Lunn wrote:
> On Mon, Jun 24, 2019 at 12:35:03AM +0200, Marek Vasut wrote:
>> The indirect function call to dev->dev_ops->get_port_addr() is expensive
>> especially if called for every single register access, and only returns
>> the value of PORT_CTRL_ADDR() macro. Use PORT_CTRL_ADDR() macro directly
>> instead.
> 
> Hi Marek
> 
> Rather than change just one instance, it would be better to change
> them all. And then remove dev_ops->get_port_addr().

So that actually doesn't work. The rest of the calls are in common code
(ksz_common.h) and I plan to add the KSZ8795, which has different
spacing between the ports, so those have to stay.

Although, depending on how things look, I will do more regmap cleanups,
the driver needs it. Since I have the KSZ9477 devkit, that also makes it
much easier to test the changes. I think inlining those custom accessors
would be high on the list, because they are just a mess. But that's for
another series.

-- 
Best regards,
Marek Vasut

  reply	other threads:[~2019-06-24 22:12 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-23 22:34 [PATCH V3 00/10] net: dsa: microchip: Convert to regmap Marek Vasut
2019-06-23 22:34 ` [PATCH V3 01/10] net: dsa: microchip: Remove ksz_{read,write}24() Marek Vasut
2019-06-24  3:11   ` Andrew Lunn
2019-06-23 22:35 ` [PATCH V3 02/10] net: dsa: microchip: Remove ksz_{get,set}() Marek Vasut
2019-06-24  3:12   ` Andrew Lunn
2019-06-23 22:35 ` [PATCH V3 03/10] net: dsa: microchip: Inline ksz_spi.h Marek Vasut
2019-06-24  3:16   ` Andrew Lunn
2019-06-23 22:35 ` [PATCH V3 04/10] net: dsa: microchip: Move ksz_cfg and ksz_port_cfg to ksz9477.c Marek Vasut
2019-06-24  3:17   ` Andrew Lunn
2019-06-23 22:35 ` [PATCH V3 05/10] net: dsa: microchip: Use PORT_CTRL_ADDR() instead of indirect function call Marek Vasut
2019-06-24  3:20   ` Andrew Lunn
2019-06-24 22:12     ` Marek Vasut [this message]
2019-06-23 22:35 ` [PATCH V3 06/10] net: dsa: microchip: Factor out register access opcode generation Marek Vasut
2019-06-24  3:22   ` Andrew Lunn
2019-06-23 22:35 ` [PATCH V3 07/10] net: dsa: microchip: Initial SPI regmap support Marek Vasut
2019-06-24 19:39   ` kbuild test robot
2019-06-24 22:03   ` Marek Vasut
2019-06-24 23:59     ` Vladimir Oltean
2019-06-25 12:06       ` Marek Vasut
2019-06-25 12:40         ` Vladimir Oltean
2019-06-25 15:18           ` Marek Vasut
2019-06-25 10:03   ` kbuild test robot
2019-06-23 22:35 ` [PATCH V3 08/10] net: dsa: microchip: Dispose of ksz_io_ops Marek Vasut
2019-06-23 22:35 ` [PATCH V3 09/10] net: dsa: microchip: Factor out regmap config generation into common header Marek Vasut
2019-06-23 22:35 ` [PATCH V3 10/10] net: dsa: microchip: Replace ad-hoc bit manipulation with regmap Marek Vasut

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=e328dce5-bb37-7cc7-fa3a-e63558807f04@denx.de \
    --to=marex@denx.de \
    --cc=Tristram.Ha@microchip.com \
    --cc=Woojung.Huh@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@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.