From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH 00/50] pinctrl: renesas: Reserved field optimizations
Date: Wed, 13 Apr 2022 19:23:22 +0200 [thread overview]
Message-ID: <cover.1649865241.git.geert+renesas@glider.be> (raw)
Hi Linus,
Lots of register in pin control subdrivers for Renesas SoCs contain
reserved or unused fields. As the macros for describing these registers
(PINMUX_CFG_REG() and PINMUX_CFG_REG_VAR() for registers with
fixed-width resp. variable-width fields) require describing all fields,
the resulting data structures contain lots of dummy (zero) values: 2^N
values for a field of N-bits wide. To reduce data size, reserved bit
fields wider than 3 bits were typically split in multiple 2-bit fields.
This patch series aims to improve this by introducing a shorthand for
describing reserved variable-width register fields without dummy values.
- Patch 1 converts a few register definitions for registers with
fixed-width fields that accidentally used the equivalent but larger
description format intended for registers with variable-width
fields,
- Patch 2 introduces a shorthand for describing reserved register
fields,
- Patches 3-22 convert reserved field descriptions in the various
SoC-specific pin control subdrivers to the new shorthands,
- Patches 23-49 convert register definitions for registers with
reserved fixed-width fields to the equivalent definitions with
variable-width fields where it makes sense,
- Patch 50 updates the checker to flag possible conversions to
variable-width reserved fields.
The total kernel size reduction due to patches 3-49 is:
- 12685 bytes on ARM32 SoCs (multi-platform),
- 5416 bytes on ARM64 SoCs (multi-platform),
- 2575 bytes on SH SoCs (sum of mutually-exclusive single platforms).
I've been running with these changes on R-Mobile APE6 and A1, R-Car
M2-W, H3 ES1.x, H3 ES2.0, M3-W, M3-N, V3M, E3, D3, V3U, and S4, and
SH-Mobile AG5 during the past six weeks, without any issues.
I plan to queue these in renesas-pinctrl-for-v5.19.
Thanks for your comments!
Geert Uytterhoeven (50):
pinctrl: renesas: r8a77470: Use fixed-width description for IPSR regs
pinctrl: renesas: Add shorthand for reserved register fields
pinctrl: renesas: rmobile: Mark unused PORTCR bits reserved
pinctrl: renesas: emev2: Use shorthands for reserved fields
pinctrl: renesas: r8a77470: Use shorthands for reserved fields
pinctrl: renesas: r8a7778: Use shorthands for reserved fields
pinctrl: renesas: r8a7779: Use shorthands for reserved fields
pinctrl: renesas: r8a7790: Use shorthands for reserved fields
pinctrl: renesas: r8a7791: Use shorthands for reserved fields
pinctrl: renesas: r8a7792: Use shorthands for reserved fields
pinctrl: renesas: r8a7794: Use shorthands for reserved fields
pinctrl: renesas: r8a77950: Use shorthands for reserved fields
pinctrl: renesas: r8a77951: Use shorthands for reserved fields
pinctrl: renesas: r8a7796: Use shorthands for reserved fields
pinctrl: renesas: r8a77965: Use shorthands for reserved fields
pinctrl: renesas: r8a77970: Use shorthands for reserved fields
pinctrl: renesas: r8a77980: Use shorthands for reserved fields
pinctrl: renesas: r8a77990: Use shorthands for reserved fields
pinctrl: renesas: r8a77995: Use shorthands for reserved fields
pinctrl: renesas: r8a779a0: Use shorthands for reserved fields
pinctrl: renesas: r8a779f0: Use shorthands for reserved fields
pinctrl: renesas: sh7734: Use shorthands for reserved fields
pinctrl: renesas: r8a73a4: Optimize fixed-width reserved fields
pinctrl: renesas: r8a7740: Optimize fixed-width reserved fields
pinctrl: renesas: r8a77470: Optimize fixed-width reserved fields
pinctrl: renesas: r8a7779: Optimize fixed-width reserved fields
pinctrl: renesas: r8a7792: Optimize fixed-width reserved fields
pinctrl: renesas: r8a77950: Optimize fixed-width reserved fields
pinctrl: renesas: r8a77951: Optimize fixed-width reserved fields
pinctrl: renesas: r8a77965: Optimize fixed-width reserved fields
pinctrl: renesas: r8a7796: Optimize fixed-width reserved fields
pinctrl: renesas: r8a77970: Optimize fixed-width reserved fields
pinctrl: renesas: r8a77980: Optimize fixed-width reserved fields
pinctrl: renesas: r8a77990: Optimize fixed-width reserved fields
pinctrl: renesas: r8a77995: Optimize fixed-width reserved fields
pinctrl: renesas: r8a779a0: Optimize fixed-width reserved fields
pinctrl: renesas: r8a779f0: Optimize fixed-width reserved fields
pinctrl: renesas: sh7203: Optimize fixed-width reserved fields
pinctrl: renesas: sh7264: Optimize fixed-width reserved fields
pinctrl: renesas: sh7269: Optimize fixed-width reserved fields
pinctrl: renesas: sh73a0: Optimize fixed-width reserved fields
pinctrl: renesas: sh7720: Optimize fixed-width reserved fields
pinctrl: renesas: sh7722: Optimize fixed-width reserved fields
pinctrl: renesas: sh7723: Optimize fixed-width reserved fields
pinctrl: renesas: sh7724: Optimize fixed-width reserved fields
pinctrl: renesas: sh7734: Optimize fixed-width reserved fields
pinctrl: renesas: sh7757: Optimize fixed-width reserved fields
pinctrl: renesas: sh7785: Optimize fixed-width reserved fields
pinctrl: renesas: sh7786: Optimize fixed-width reserved fields
pinctrl: renesas: checker: Add reserved field checks
drivers/pinctrl/renesas/core.c | 43 +++--
drivers/pinctrl/renesas/pfc-emev2.c | 59 ++-----
drivers/pinctrl/renesas/pfc-r8a73a4.c | 58 ++-----
drivers/pinctrl/renesas/pfc-r8a7740.c | 74 ++++----
drivers/pinctrl/renesas/pfc-r8a77470.c | 176 +++++--------------
drivers/pinctrl/renesas/pfc-r8a7778.c | 98 +++--------
drivers/pinctrl/renesas/pfc-r8a7779.c | 82 +++------
drivers/pinctrl/renesas/pfc-r8a7790.c | 110 ++++--------
drivers/pinctrl/renesas/pfc-r8a7791.c | 111 ++++--------
drivers/pinctrl/renesas/pfc-r8a7792.c | 231 ++++++-------------------
drivers/pinctrl/renesas/pfc-r8a7794.c | 97 +++--------
drivers/pinctrl/renesas/pfc-r8a77950.c | 170 ++++--------------
drivers/pinctrl/renesas/pfc-r8a77951.c | 169 +++++-------------
drivers/pinctrl/renesas/pfc-r8a7796.c | 166 +++++-------------
drivers/pinctrl/renesas/pfc-r8a77965.c | 166 +++++-------------
drivers/pinctrl/renesas/pfc-r8a77970.c | 136 ++++-----------
drivers/pinctrl/renesas/pfc-r8a77980.c | 107 ++++--------
drivers/pinctrl/renesas/pfc-r8a77990.c | 132 ++++----------
drivers/pinctrl/renesas/pfc-r8a77995.c | 131 +++-----------
drivers/pinctrl/renesas/pfc-r8a779a0.c | 217 ++++++++---------------
drivers/pinctrl/renesas/pfc-r8a779f0.c | 100 ++++-------
drivers/pinctrl/renesas/pfc-sh7203.c | 53 +++---
drivers/pinctrl/renesas/pfc-sh7264.c | 104 +++++------
drivers/pinctrl/renesas/pfc-sh7269.c | 82 ++++-----
drivers/pinctrl/renesas/pfc-sh73a0.c | 87 ++++------
drivers/pinctrl/renesas/pfc-sh7720.c | 57 +++---
drivers/pinctrl/renesas/pfc-sh7722.c | 202 +++++++++------------
drivers/pinctrl/renesas/pfc-sh7723.c | 70 ++++----
drivers/pinctrl/renesas/pfc-sh7724.c | 7 +-
drivers/pinctrl/renesas/pfc-sh7734.c | 115 ++++--------
drivers/pinctrl/renesas/pfc-sh7757.c | 95 ++++------
drivers/pinctrl/renesas/pfc-sh7785.c | 60 +++----
drivers/pinctrl/renesas/pfc-sh7786.c | 21 +--
drivers/pinctrl/renesas/sh_pfc.h | 17 +-
34 files changed, 1116 insertions(+), 2487 deletions(-)
--
2.25.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next reply other threads:[~2022-04-13 17:24 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-13 17:23 Geert Uytterhoeven [this message]
2022-04-13 17:23 ` [PATCH 01/50] pinctrl: renesas: r8a77470: Use fixed-width description for IPSR regs Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 02/50] pinctrl: renesas: Add shorthand for reserved register fields Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 03/50] pinctrl: renesas: rmobile: Mark unused PORTCR bits reserved Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 04/50] pinctrl: renesas: emev2: Use shorthands for reserved fields Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 05/50] pinctrl: renesas: r8a77470: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 06/50] pinctrl: renesas: r8a7778: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 07/50] pinctrl: renesas: r8a7779: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 08/50] pinctrl: renesas: r8a7790: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 09/50] pinctrl: renesas: r8a7791: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 10/50] pinctrl: renesas: r8a7792: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 11/50] pinctrl: renesas: r8a7794: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 12/50] pinctrl: renesas: r8a77950: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 13/50] pinctrl: renesas: r8a77951: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 14/50] pinctrl: renesas: r8a7796: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 15/50] pinctrl: renesas: r8a77965: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 16/50] pinctrl: renesas: r8a77970: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 17/50] pinctrl: renesas: r8a77980: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 18/50] pinctrl: renesas: r8a77990: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 19/50] pinctrl: renesas: r8a77995: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 20/50] pinctrl: renesas: r8a779a0: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 21/50] pinctrl: renesas: r8a779f0: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 22/50] pinctrl: renesas: sh7734: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 23/50] pinctrl: renesas: r8a73a4: Optimize fixed-width " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 24/50] pinctrl: renesas: r8a7740: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 25/50] pinctrl: renesas: r8a77470: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 26/50] pinctrl: renesas: r8a7779: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 27/50] pinctrl: renesas: r8a7792: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 28/50] pinctrl: renesas: r8a77950: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 29/50] pinctrl: renesas: r8a77951: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 30/50] pinctrl: renesas: r8a77965: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 31/50] pinctrl: renesas: r8a7796: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 32/50] pinctrl: renesas: r8a77970: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 33/50] pinctrl: renesas: r8a77980: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 34/50] pinctrl: renesas: r8a77990: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 35/50] pinctrl: renesas: r8a77995: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 36/50] pinctrl: renesas: r8a779a0: " Geert Uytterhoeven
2022-04-13 17:23 ` [PATCH 37/50] pinctrl: renesas: r8a779f0: " Geert Uytterhoeven
2022-04-13 17:24 ` [PATCH 38/50] pinctrl: renesas: sh7203: " Geert Uytterhoeven
2022-04-13 17:24 ` [PATCH 39/50] pinctrl: renesas: sh7264: " Geert Uytterhoeven
2022-04-13 17:24 ` [PATCH 40/50] pinctrl: renesas: sh7269: " Geert Uytterhoeven
2022-04-13 17:24 ` [PATCH 41/50] pinctrl: renesas: sh73a0: " Geert Uytterhoeven
2022-04-13 17:24 ` [PATCH 42/50] pinctrl: renesas: sh7720: " Geert Uytterhoeven
2022-04-13 17:24 ` [PATCH 43/50] pinctrl: renesas: sh7722: " Geert Uytterhoeven
2022-04-13 17:24 ` [PATCH 44/50] pinctrl: renesas: sh7723: " Geert Uytterhoeven
2022-04-13 17:24 ` [PATCH 45/50] pinctrl: renesas: sh7724: " Geert Uytterhoeven
2022-04-13 17:24 ` [PATCH 46/50] pinctrl: renesas: sh7734: " Geert Uytterhoeven
2022-04-13 17:24 ` [PATCH 47/50] pinctrl: renesas: sh7757: " Geert Uytterhoeven
2022-04-13 17:24 ` [PATCH 48/50] pinctrl: renesas: sh7785: " Geert Uytterhoeven
2022-04-13 17:24 ` [PATCH 49/50] pinctrl: renesas: sh7786: " Geert Uytterhoeven
2022-04-13 17:24 ` [PATCH 50/50] pinctrl: renesas: checker: Add reserved field checks Geert Uytterhoeven
2022-05-05 10:50 ` [PATCH 00/50] pinctrl: renesas: Reserved field optimizations Geert Uytterhoeven
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=cover.1649865241.git.geert+renesas@glider.be \
--to=geert+renesas@glider.be \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-renesas-soc@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 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).