On Wed, Apr 13, 2022 at 7:24 PM Geert Uytterhoeven <geert+renesas@xxxxxxxxx> wrote: > 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. Done. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx 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