All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@denx.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Pavel Machek <pavel@denx.de>, Mark Brown <broonie@kernel.org>,
	"Lad, Prabhakar" <prabhakar.csengg@gmail.com>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Jiri Kosina <trivial@kernel.org>,
	Sergei Shtylyov <sergei.shtylyov@gmail.com>,
	linux-spi <linux-spi@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Chris Brandt <Chris.Brandt@renesas.com>
Subject: Re: [PATCH 2/2] spi: rpc-if: Remove CONFIG_PM_SLEEP ifdefery
Date: Tue, 5 Jan 2021 11:42:34 +0100	[thread overview]
Message-ID: <20210105104234.GA29908@amd> (raw)
In-Reply-To: <CAMuHMdUjevJ+DgJGnPUN0+ctxm2ML1NYSTgYsjC4c8tDqjUkxQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1818 bytes --]

Hi!

> On Tue, Jan 5, 2021 at 12:40 AM Pavel Machek <pavel@denx.de> wrote:
> > > > > >                 .name   = "rpc-if-spi",
> > > > > > -               .pm     = DEV_PM_OPS,
> > > > > > +               .pm     = &rpcif_spi_pm_ops,
> > >
> > > > > You're aware rpcif_spi_pm_ops is now always referenced and thus emitted,
> > > > > increasing kernel size by 92 bytes if CONFIG_PM_SLEEP=n?
> > > > > This may matter for RZ/A SoCs running from internal SRAM.
> > >
> > > > Hmm didn't realise this would be an issue on RZ/A.
> > >
> > > > Mark, could you please drop this patch from your branch.
> > >
> > > Please send an incremental patch with an appropriate changelog.
> >
> > Let's fix this properly. I'm pretty sure we have some macros that can
> > solve this without re-introducing the ifdefs...
> 
> There's pm_ptr(), but it uses CONFIG_PM as a selector, not CONFIG_PM_SLEEP.

Okay; so we could introduce pm_sleep_ptr().

Or we could just put single #ifdef CONFIG_PM_SLEEP around the .pm
assignment? That would be improvement on the original, and still
result in the same binary, right?

> > (Besides... 92 bytes. How big is kernel these days? 4MB? More? How
> > much SRAM do you have?)
> 
> 92 bytes is indeed not much (on 64-bit it would be doubled).
> Still, it's good to make people think about innocent looking changes,
> once in a while.
> 
> RZ/A1H and RZ/A1M have 10 resp. 5 MiB of SRAM.
> RZ/A2 has 4 MiB SRAM, which is sufficient to run Linux when used with
> XIP (requires a one-line Kconfig change rmk has been vetoing for
 > years).

Aha, that is a bit smaller than I expected.

Best regards,
								Pavel

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2021-01-05 10:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-30 14:57 [PATCH 0/2] spi: rpc-if: Trivial fixes Lad Prabhakar
2020-12-30 14:57 ` [PATCH 1/2] spi: rpc-if: Avoid use of C++ style comments Lad Prabhakar
2020-12-30 16:27   ` Sergei Shtylyov
2020-12-30 23:16     ` Lad, Prabhakar
2020-12-30 14:57 ` [PATCH 2/2] spi: rpc-if: Remove CONFIG_PM_SLEEP ifdefery Lad Prabhakar
2020-12-30 18:05   ` Pavel Machek
2021-01-04 12:34   ` Geert Uytterhoeven
2021-01-04 21:25     ` Lad, Prabhakar
2021-01-04 21:30       ` Mark Brown
2021-01-04 23:40         ` Pavel Machek
2021-01-05  7:37           ` Geert Uytterhoeven
2021-01-05 10:42             ` Pavel Machek [this message]
2021-01-05 11:11               ` Geert Uytterhoeven
2020-12-31 13:29 ` (subset) [PATCH 0/2] spi: rpc-if: Trivial fixes Mark Brown

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=20210105104234.GA29908@amd \
    --to=pavel@denx.de \
    --cc=Chris.Brandt@renesas.com \
    --cc=broonie@kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=prabhakar.csengg@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=sergei.shtylyov@gmail.com \
    --cc=trivial@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.