From: Andrew Lunn <andrew@lunn.ch>
To: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Cc: Andrew Lunn <andrew@lunn.ch>, Jason Cooper <jason@lakedaemon.net>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
Wim Van Sebroeck <wim@iguana.be>,
Lior Amsalem <alior@marvell.com>,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
linux-watchdog@vger.kernel.org,
Tawfik Bayouk <tawfik@marvell.com>,
Nadav Haklai <nadavh@marvell.com>,
Gregory Clement <gregory.clement@free-electrons.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/4] watchdog: orion: Use the reference clock on Armada 375 SoC
Date: Thu, 23 Oct 2014 01:59:00 +0200 [thread overview]
Message-ID: <20141022235900.GA20968@lunn.ch> (raw)
In-Reply-To: <54483297.90102@free-electrons.com>
On Wed, Oct 22, 2014 at 07:41:27PM -0300, Ezequiel Garcia wrote:
> On 10/22/2014 11:02 AM, Andrew Lunn wrote:
> > On Wed, Oct 22, 2014 at 10:34:42AM -0300, Ezequiel Garcia wrote:
> >> The 25 MHz reference clock has better stability so its use is preferred over the
> >> core clock. Changes the Armada 375 clock initialization to use this reference
> >> clock. To ensure the driver is compatible with an old devicetree, also provide
> >> a fallback path which will silently return to the previous behavior.
> >
> > Hi Ezequiel
> >
> > There is now quite a lot of code in orion_wdt.c which is not relevant
> > to Orion5x and Kirkwood. Would it be possible to put some of it inside
> > a #ifdef MACH_MVEBU_V7?
> >
>
> Hum.. I found ifdefs scary, so I tend to avoid them if at all possible.
> Just did a quick hack enclosing all the armada-xxx stuff around #if 0
> and here's the result:
>
> $ ./scripts/bloat-o-meter ~/linux/.builds/mvebu_v7/drivers/watchdog/orion_wdt.o ~/linux/.builds/orion5x/drivers/watchdog/orion_wdt.o
> add/remove: 0/0 grow/shrink: 1/4 up/down: 12/-80 (-68)
> function old new delta
> orion_wdt_probe 732 744 +12
> orion_wdt_get_timeleft 44 40 -4
> orion_enabled 68 60 -8
> orion_start 120 88 -32
> orion_wdt_ping 80 44 -36
Hi Ezequiel
I did a similar test:
size drivers/watchdog/orion_wdt.o-*
text data bss dec hex filename
4428 100 1 4529 11b1 drivers/watchdog/orion_wdt.o-full-fat
2324 100 1 2425 979 drivers/watchdog/orion_wdt.o-skimmed
So for v5 kirkwood/orion5x, there is about 90% overhead from the v7
code, in the text section. This is for -rc1 code, before adding any
more v7 code in this patchset.
I don't think the #ifdef's look that scary.
Andrew
WARNING: multiple messages have this Message-ID (diff)
From: andrew@lunn.ch (Andrew Lunn)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] watchdog: orion: Use the reference clock on Armada 375 SoC
Date: Thu, 23 Oct 2014 01:59:00 +0200 [thread overview]
Message-ID: <20141022235900.GA20968@lunn.ch> (raw)
In-Reply-To: <54483297.90102@free-electrons.com>
On Wed, Oct 22, 2014 at 07:41:27PM -0300, Ezequiel Garcia wrote:
> On 10/22/2014 11:02 AM, Andrew Lunn wrote:
> > On Wed, Oct 22, 2014 at 10:34:42AM -0300, Ezequiel Garcia wrote:
> >> The 25 MHz reference clock has better stability so its use is preferred over the
> >> core clock. Changes the Armada 375 clock initialization to use this reference
> >> clock. To ensure the driver is compatible with an old devicetree, also provide
> >> a fallback path which will silently return to the previous behavior.
> >
> > Hi Ezequiel
> >
> > There is now quite a lot of code in orion_wdt.c which is not relevant
> > to Orion5x and Kirkwood. Would it be possible to put some of it inside
> > a #ifdef MACH_MVEBU_V7?
> >
>
> Hum.. I found ifdefs scary, so I tend to avoid them if at all possible.
> Just did a quick hack enclosing all the armada-xxx stuff around #if 0
> and here's the result:
>
> $ ./scripts/bloat-o-meter ~/linux/.builds/mvebu_v7/drivers/watchdog/orion_wdt.o ~/linux/.builds/orion5x/drivers/watchdog/orion_wdt.o
> add/remove: 0/0 grow/shrink: 1/4 up/down: 12/-80 (-68)
> function old new delta
> orion_wdt_probe 732 744 +12
> orion_wdt_get_timeleft 44 40 -4
> orion_enabled 68 60 -8
> orion_start 120 88 -32
> orion_wdt_ping 80 44 -36
Hi Ezequiel
I did a similar test:
size drivers/watchdog/orion_wdt.o-*
text data bss dec hex filename
4428 100 1 4529 11b1 drivers/watchdog/orion_wdt.o-full-fat
2324 100 1 2425 979 drivers/watchdog/orion_wdt.o-skimmed
So for v5 kirkwood/orion5x, there is about 90% overhead from the v7
code, in the text section. This is for -rc1 code, before adding any
more v7 code in this patchset.
I don't think the #ifdef's look that scary.
Andrew
next prev parent reply other threads:[~2014-10-22 23:59 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-22 13:34 [PATCH 0/4] Make Armada 375 use the reference clock when possible Ezequiel Garcia
2014-10-22 13:34 ` Ezequiel Garcia
2014-10-22 13:34 ` [PATCH 1/4] clocksource: armada-370-xp: Add missing clock enable Ezequiel Garcia
2014-10-22 13:34 ` Ezequiel Garcia
2014-10-22 13:50 ` Thomas Petazzoni
2014-10-22 13:50 ` Thomas Petazzoni
2014-10-22 14:37 ` Gregory CLEMENT
2014-10-22 14:37 ` Gregory CLEMENT
2014-10-22 13:34 ` [PATCH 2/4] watchdog: orion: Use the reference clock on Armada 375 SoC Ezequiel Garcia
2014-10-22 13:34 ` Ezequiel Garcia
2014-10-22 13:51 ` Thomas Petazzoni
2014-10-22 13:51 ` Thomas Petazzoni
2014-10-22 14:02 ` Andrew Lunn
2014-10-22 14:02 ` Andrew Lunn
2014-10-22 22:41 ` Ezequiel Garcia
2014-10-22 22:41 ` Ezequiel Garcia
2014-10-22 22:54 ` Guenter Roeck
2014-10-22 22:54 ` Guenter Roeck
2014-10-22 23:59 ` Andrew Lunn [this message]
2014-10-22 23:59 ` Andrew Lunn
2014-10-23 0:55 ` Ezequiel Garcia
2014-10-23 0:55 ` Ezequiel Garcia
2014-10-22 13:34 ` [PATCH 3/4] clocksource: armada-370-xp: Use the reference clock on A375 SoC Ezequiel Garcia
2014-10-22 13:34 ` Ezequiel Garcia
2014-10-22 13:54 ` Thomas Petazzoni
2014-10-22 13:54 ` Thomas Petazzoni
2014-10-22 15:22 ` Ezequiel Garcia
2014-10-22 15:22 ` Ezequiel Garcia
2014-10-22 13:34 ` [PATCH 4/4] ARM: dts: Enable the reference clock for timer and watchdog on Armada 375 SoC Ezequiel Garcia
2014-10-22 13:34 ` Ezequiel Garcia
2014-10-22 13:55 ` Thomas Petazzoni
2014-10-22 13:55 ` Thomas Petazzoni
2014-10-22 15:27 ` Ezequiel Garcia
2014-10-22 15:27 ` Ezequiel Garcia
2014-10-22 13:55 ` [PATCH 0/4] Make Armada 375 use the reference clock when possible Andrew Lunn
2014-10-22 13:55 ` Andrew Lunn
2014-10-22 13:56 ` Thomas Petazzoni
2014-10-22 13:56 ` Thomas Petazzoni
2014-10-22 14:08 ` Andrew Lunn
2014-10-22 14:08 ` Andrew Lunn
2014-10-22 14:25 ` Thomas Petazzoni
2014-10-22 14:25 ` Thomas Petazzoni
2014-10-22 15:29 ` Ezequiel Garcia
2014-10-22 15:29 ` Ezequiel Garcia
2014-10-23 12:36 ` Ezequiel Garcia
2014-10-23 12:36 ` Ezequiel Garcia
2014-10-23 12:16 ` Ezequiel Garcia
2014-10-23 12:16 ` Ezequiel Garcia
2014-10-23 12:26 ` Thomas Petazzoni
2014-10-23 12:26 ` Thomas Petazzoni
2014-10-23 12:43 ` Ezequiel Garcia
2014-10-23 12:43 ` Ezequiel Garcia
2014-11-03 21:29 ` Thomas Petazzoni
2014-11-03 21:29 ` Thomas Petazzoni
2014-10-22 14:43 ` Gregory CLEMENT
2014-10-22 14:43 ` Gregory CLEMENT
2014-10-22 14:49 ` Thomas Petazzoni
2014-10-22 14:49 ` Thomas Petazzoni
2014-10-22 15:10 ` Ezequiel Garcia
2014-10-22 15:10 ` Ezequiel Garcia
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=20141022235900.GA20968@lunn.ch \
--to=andrew@lunn.ch \
--cc=alior@marvell.com \
--cc=daniel.lezcano@linaro.org \
--cc=ezequiel.garcia@free-electrons.com \
--cc=gregory.clement@free-electrons.com \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=nadavh@marvell.com \
--cc=tawfik@marvell.com \
--cc=tglx@linutronix.de \
--cc=thomas.petazzoni@free-electrons.com \
--cc=wim@iguana.be \
/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.