mbox series

[PATCH/RFC,4.19.y-cip,00/41] Fast forward sh-pfc

Message ID 1566991328-25476-1-git-send-email-fabrizio.castro@bp.renesas.com (mailing list archive)
Headers show
Series Fast forward sh-pfc | expand

Message

Fabrizio Castro Aug. 28, 2019, 11:21 a.m. UTC
Dear All,

they have made good progress upstream with the development of sh-pfc,
and although the functionality of the drivers hasn't changed much,
the code looks fairly different. This means that backporting patches
to SoC specific driver files will be increasingly hard and error
prone, unless we fast-forward the code base for 4.19.y-cip, hence
this series.
What do you gus think? Comments welcome!

Thanks,
Fab


Fabrizio Castro (2):
  pinctrl: sh-pfc: r8a7796: Move CANFD pin groups and functions
  pinctrl: sh-pfc: r8a77990: Move CANFD pin groups and functions

Geert Uytterhoeven (26):
  pinctrl: sh-pfc: Print actual field width for variable-width fields
  pinctrl: sh-pfc: Validate pinmux tables at runtime when debugging
  pinctrl: sh-pfc: Validate pins/marks in pin groups at build time
  pinctrl: sh-pfc: Make pinmux_cfg_reg.var_field_width[] variable-length
  pinctrl: sh-pfc: Validate fixed-size field widths at build time
  pinctrl: sh-pfc: Absorb enum IDs in PINMUX_CFG_REG() macro
  pinctrl: sh-pfc: Absorb enum IDs in PINMUX_CFG_REG_VAR() macro
  pinctrl: sh-pfc: Absorb enum IDs in PINMUX_DATA_REG() macro
  pinctrl: sh-pfc: Validate enum IDs for regs with fixed-width fields
  pinctrl: sh-pfc: Validate enum IDs for regs with variable-width fields
  pinctrl: sh-pfc: Improve PINMUX_IPSR_PHYS() documentation
  pinctrl: sh-pfc: Rename 2-parameter CPU_ALL_PORT() variant
  pinctrl: sh-pfc: Add SH_PFC_PIN_CFG_PULL_UP_DOWN shorthand
  pinctrl: sh-pfc: Add new non-GPIO helper macros
  pinctrl: sh-pfc: Correct printk level of group reference warning
  pinctrl: sh-pfc: Mark run-time debug code __init
  pinctrl: sh-pfc: Add check for empty pinmux groups/functions
  pinctrl: sh-pfc: Validate pin tables at runtime
  pinctrl: sh-pfc: r8a7796: Deduplicate VIN5 pin definitions
  pinctrl: sh-pfc: r8a77990: Rename IOCTRLx registers
  pinctrl: sh-pfc: Add missing #include <linux/errno.h>
  pinctrl: sh-pfc: Add PORT_GP_27 helper macro
  pinctrl: sh-pfc: Move PIN_NONE to shared header file
  pinctrl: sh-pfc: r8a77990: Use new macros for non-GPIO pins
  pinctrl: sh-pfc: r8a7796: Add TPU pins, groups and functions
  pinctrl: sh-pfc: r8a7796: Use new macros for non-GPIO pins

Jacopo Mondi (1):
  pinctrl: sh-pfc: r8a7796: Fix VIN versioned groups

Marek Vasut (1):
  pinctrl: sh-pfc: rcar-gen3: Retain TDSELCTRL register across
    suspend/resume

Takeshi Kihara (9):
  pinctrl: sh-pfc: r8a7796: Add I2C{0,3,5} pins, groups and functions
  pinctrl: sh-pfc: rcar-gen3: Remove HDMI CEC pins, groups, and
    functions
  pinctrl: sh-pfc: rcar-gen3: Remove CC5_OSCOUT pin
  pinctrl: sh-pfc: rcar-gen3: Rename SEL_ADG_{A,B,C} to SEL_ADG{A,B,C}
  pinctrl: sh-pfc: r8a77990: Fix MOD_SEL0 bit16 when using NFALE and
    NFRB_N
  pinctrl: sh-pfc: r8a77990: Fix MOD_SEL1 bit31 when using SIM0_D
  pinctrl: sh-pfc: r8a77990: Fix MOD_SEL1 bit30 when using SSI_SCK2 and
    SSI_WS2
  pinctrl: sh-pfc: rcar-gen3: Rename RTS{0,1,3,4}# pin function
    definitions
  pinctrl: sh-pfc: rcar-gen3: Rename SEL_NDFC to SEL_NDF

Ulrich Hecht (2):
  pinctrl: sh-pfc: Add physical pin multiplexing helper macros
  pinctrl: sh-pfc: r8a7796: Remove placeholder I2C pin data

 drivers/pinctrl/sh-pfc/core.c            | 172 ++++++-
 drivers/pinctrl/sh-pfc/pfc-emev2.c       |  67 +--
 drivers/pinctrl/sh-pfc/pfc-r8a73a4.c     |  66 +--
 drivers/pinctrl/sh-pfc/pfc-r8a7740.c     |  58 +--
 drivers/pinctrl/sh-pfc/pfc-r8a77470.c    | 138 ++---
 drivers/pinctrl/sh-pfc/pfc-r8a7778.c     | 179 ++++---
 drivers/pinctrl/sh-pfc/pfc-r8a7779.c     | 119 +++--
 drivers/pinctrl/sh-pfc/pfc-r8a7790.c     | 134 ++---
 drivers/pinctrl/sh-pfc/pfc-r8a7791.c     | 158 +++---
 drivers/pinctrl/sh-pfc/pfc-r8a7792.c     | 136 ++---
 drivers/pinctrl/sh-pfc/pfc-r8a7794.c     | 129 +++--
 drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 239 ++++-----
 drivers/pinctrl/sh-pfc/pfc-r8a7795.c     | 266 +++++-----
 drivers/pinctrl/sh-pfc/pfc-r8a7796.c     | 837 ++++++++++++++++---------------
 drivers/pinctrl/sh-pfc/pfc-r8a77965.c    | 254 +++++-----
 drivers/pinctrl/sh-pfc/pfc-r8a77970.c    |  73 +--
 drivers/pinctrl/sh-pfc/pfc-r8a77980.c    |  81 +--
 drivers/pinctrl/sh-pfc/pfc-r8a77990.c    | 395 +++++++--------
 drivers/pinctrl/sh-pfc/pfc-r8a77995.c    | 100 ++--
 drivers/pinctrl/sh-pfc/pfc-sh7203.c      | 152 +++---
 drivers/pinctrl/sh-pfc/pfc-sh7264.c      | 232 ++++-----
 drivers/pinctrl/sh-pfc/pfc-sh7269.c      | 252 +++++-----
 drivers/pinctrl/sh-pfc/pfc-sh73a0.c      |  54 +-
 drivers/pinctrl/sh-pfc/pfc-sh7720.c      | 144 +++---
 drivers/pinctrl/sh-pfc/pfc-sh7722.c      | 220 ++++----
 drivers/pinctrl/sh-pfc/pfc-sh7723.c      | 200 ++++----
 drivers/pinctrl/sh-pfc/pfc-sh7724.c      | 204 ++++----
 drivers/pinctrl/sh-pfc/pfc-sh7734.c      | 142 +++---
 drivers/pinctrl/sh-pfc/pfc-sh7757.c      | 244 ++++-----
 drivers/pinctrl/sh-pfc/pfc-sh7785.c      | 136 ++---
 drivers/pinctrl/sh-pfc/pfc-sh7786.c      |  80 +--
 drivers/pinctrl/sh-pfc/pfc-shx3.c        |  32 +-
 drivers/pinctrl/sh-pfc/pinctrl.c         |   3 +-
 drivers/pinctrl/sh-pfc/sh_pfc.h          | 163 ++++--
 34 files changed, 3135 insertions(+), 2724 deletions(-)

Comments

Pavel Machek Aug. 29, 2019, 8:12 a.m. UTC | #1
Hi!

> they have made good progress upstream with the development of sh-pfc,
> and although the functionality of the drivers hasn't changed much,
> the code looks fairly different. This means that backporting patches
> to SoC specific driver files will be increasingly hard and error
> prone, unless we fast-forward the code base for 4.19.y-cip, hence
> this series.
> What do you gus think? Comments welcome!

I reviewed the patches... and it is interesting how much magic can be
done with preprocessor.

I do not see anything preventing the merge, but they were marked [rfc]
so I'm not doing that yet. Let me know if I should.

Best regards,
								Pavel
Fabrizio Castro Aug. 29, 2019, 9:36 a.m. UTC | #2
Hi Pavel,

Thank you for your feedback!

> From: Pavel Machek <pavel@denx.de>
> Sent: 29 August 2019 09:12
> Subject: Re: [cip-dev] [PATCH/RFC 4.19.y-cip 00/41] Fast forward sh-pfc
> 
> Hi!
> 
> > they have made good progress upstream with the development of sh-pfc,
> > and although the functionality of the drivers hasn't changed much,
> > the code looks fairly different. This means that backporting patches
> > to SoC specific driver files will be increasingly hard and error
> > prone, unless we fast-forward the code base for 4.19.y-cip, hence
> > this series.
> > What do you gus think? Comments welcome!
> 
> I reviewed the patches... and it is interesting how much magic can be
> done with preprocessor.

I thought the same thing!

> 
> I do not see anything preventing the merge, but they were marked [rfc]
> so I'm not doing that yet. Let me know if I should.

Since nothing nasty was spotted during code review and it works ok, I believe
merging this series could really help us with future development, so yes
please, go ahead and merge.

Thanks!

Fab

> 
> Best regards,
> 								Pavel
> --
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Pavel Machek Aug. 29, 2019, 9:47 a.m. UTC | #3
Hi!

> > > they have made good progress upstream with the development of sh-pfc,
> > > and although the functionality of the drivers hasn't changed much,
> > > the code looks fairly different. This means that backporting patches
> > > to SoC specific driver files will be increasingly hard and error
> > > prone, unless we fast-forward the code base for 4.19.y-cip, hence
> > > this series.
> > > What do you gus think? Comments welcome!
> > 
> > I reviewed the patches... and it is interesting how much magic can be
> > done with preprocessor.
> 
> I thought the same thing!

> > I do not see anything preventing the merge, but they were marked [rfc]
> > so I'm not doing that yet. Let me know if I should.
> 
> Since nothing nasty was spotted during code review and it works ok, I believe
> merging this series could really help us with future development, so yes
> please, go ahead and merge.

Ok, merged, and pushed out.

Best regards,
								Pavel
Fabrizio Castro Aug. 29, 2019, 9:49 a.m. UTC | #4
Hi Pavel,

> From: Pavel Machek <pavel@denx.de>
> Sent: 29 August 2019 10:48
> Subject: Re: [cip-dev] [PATCH/RFC 4.19.y-cip 00/41] Fast forward sh-pfc
> 
> Hi!
> 
> > > > they have made good progress upstream with the development of sh-pfc,
> > > > and although the functionality of the drivers hasn't changed much,
> > > > the code looks fairly different. This means that backporting patches
> > > > to SoC specific driver files will be increasingly hard and error
> > > > prone, unless we fast-forward the code base for 4.19.y-cip, hence
> > > > this series.
> > > > What do you gus think? Comments welcome!
> > >
> > > I reviewed the patches... and it is interesting how much magic can be
> > > done with preprocessor.
> >
> > I thought the same thing!
> 
> > > I do not see anything preventing the merge, but they were marked [rfc]
> > > so I'm not doing that yet. Let me know if I should.
> >
> > Since nothing nasty was spotted during code review and it works ok, I believe
> > merging this series could really help us with future development, so yes
> > please, go ahead and merge.
> 
> Ok, merged, and pushed out.

Thanks!

Fab

> 
> Best regards,
> 								Pavel
> --
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Chris Paterson Aug. 29, 2019, 10:23 a.m. UTC | #5
Hello Pavel, Fab,

> From: cip-dev-bounces@lists.cip-project.org <cip-dev-bounces@lists.cip-
> project.org> On Behalf Of Fabrizio Castro
> Sent: 29 August 2019 10:50
> 
> Hi Pavel,
> 
> > From: Pavel Machek <pavel@denx.de>
> > Sent: 29 August 2019 10:48
> > Subject: Re: [cip-dev] [PATCH/RFC 4.19.y-cip 00/41] Fast forward sh-pfc
> >
> > Hi!
> >
> > > > > they have made good progress upstream with the development of
> sh-pfc,
> > > > > and although the functionality of the drivers hasn't changed much,
> > > > > the code looks fairly different. This means that backporting patches
> > > > > to SoC specific driver files will be increasingly hard and error
> > > > > prone, unless we fast-forward the code base for 4.19.y-cip, hence
> > > > > this series.
> > > > > What do you gus think? Comments welcome!
> > > >
> > > > I reviewed the patches... and it is interesting how much magic can be
> > > > done with preprocessor.
> > >
> > > I thought the same thing!
> >
> > > > I do not see anything preventing the merge, but they were marked
> [rfc]
> > > > so I'm not doing that yet. Let me know if I should.
> > >
> > > Since nothing nasty was spotted during code review and it works ok, I
> believe
> > > merging this series could really help us with future development, so yes
> > > please, go ahead and merge.
> >
> > Ok, merged, and pushed out.

Our CI is hitting some build errors with the latest v4.19-cip (commit b11ac993) with the renesas shmobile_defconfig configurations:
https://gitlab.com/cip-project/cip-kernel/linux-cip/-/jobs/283063646
https://gitlab.com/cip-project/cip-kernel/linux-cip/-/jobs/283063654

In file included from ./include/linux/kernel.h:15,
                 from ./include/asm-generic/bug.h:18,
                 from ./arch/arm/include/asm/bug.h:60,
                 from ./include/linux/bug.h:5,
                 from ./include/linux/io.h:23,
                 from drivers/pinctrl/sh-pfc/pfc-r8a7740.c:21:
./include/linux/build_bug.h:29:45: error: negative width in bit-field '<anonymous>'
 #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
                                             ^
drivers/pinctrl/sh-pfc/sh_pfc.h:52:3: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
   BUILD_BUG_ON_ZERO(sizeof(n##_pins) != sizeof(n##_mux)), \
   ^~~~~~~~~~~~~~~~~
drivers/pinctrl/sh-pfc/sh_pfc.h:54:29: note: in expansion of macro 'SH_PFC_PIN_GROUP_ALIAS'
 #define SH_PFC_PIN_GROUP(n) SH_PFC_PIN_GROUP_ALIAS(n, n)
                             ^~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/sh-pfc/pfc-r8a7740.c:2806:2: note: in expansion of macro 'SH_PFC_PIN_GROUP'
  SH_PFC_PIN_GROUP(gether_gmii),
  ^~~~~~~~~~~~~~~~
./include/linux/build_bug.h:29:45: error: negative width in bit-field '<anonymous>'
 #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
                                             ^
drivers/pinctrl/sh-pfc/sh_pfc.h:52:3: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
   BUILD_BUG_ON_ZERO(sizeof(n##_pins) != sizeof(n##_mux)), \
   ^~~~~~~~~~~~~~~~~
drivers/pinctrl/sh-pfc/sh_pfc.h:54:29: note: in expansion of macro 'SH_PFC_PIN_GROUP_ALIAS'
 #define SH_PFC_PIN_GROUP(n) SH_PFC_PIN_GROUP_ALIAS(n, n)
                             ^~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/sh-pfc/pfc-r8a7740.c:2868:2: note: in expansion of macro 'SH_PFC_PIN_GROUP'
  SH_PFC_PIN_GROUP(lcd0_data24_1),
  ^~~~~~~~~~~~~~~~
make[3]: *** [drivers/pinctrl/sh-pfc/pfc-r8a7740.o] Error 1
scripts/Makefile.build:303: recipe for target 'drivers/pinctrl/sh-pfc/pfc-r8a7740.o' failed
make[2]: *** [drivers/pinctrl/sh-pfc] Error 2
make[2]: *** Waiting for unfinished jobs....
scripts/Makefile.build:544: recipe for target 'drivers/pinctrl/sh-pfc' failed
  AR      drivers/pps/clients/built-in.a
  AR      drivers/pps/generators/built-in.a
  CC      drivers/pps/pps.o
  CC      drivers/power/supply/power_supply_sysfs.o
  CC      drivers/ptp/ptp_clock.o
make[1]: *** [drivers/pinctrl] Error 2
scripts/Makefile.build:544: recipe for target 'drivers/pinctrl' failed
make[1]: *** Waiting for unfinished jobs....
  CC      drivers/ptp/ptp_chardev.o
  AR      drivers/power/supply/built-in.a
  AR      drivers/power/built-in.a
  CC      drivers/ptp/ptp_sysfs.o
  CC      drivers/pps/kapi.o
  CC      drivers/pps/sysfs.o
  AR      drivers/ptp/built-in.a
  AR      drivers/pps/built-in.a
make: *** [drivers] Error 2
Makefile:1046: recipe for target 'drivers' failed


Complete pipeline is still running:
https://gitlab.com/cip-project/cip-kernel/linux-cip/pipelines/79117946


Kind regards, Chris

> 
> Thanks!
> 
> Fab
> 
> >
> > Best regards,
> > 								Pavel
> > --
> > DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> _______________________________________________
> cip-dev mailing list
> cip-dev@lists.cip-project.org
> https://lists.cip-project.org/mailman/listinfo/cip-dev
Fabrizio Castro Aug. 29, 2019, 11:04 a.m. UTC | #6
Hello Chris,

Thank you for your feedback!

> From: Chris Paterson <Chris.Paterson2@renesas.com>
> Sent: 29 August 2019 11:23
> Subject: RE: [cip-dev] [PATCH/RFC 4.19.y-cip 00/41] Fast forward sh-pfc
> 
> Hello Pavel, Fab,
> 
> > From: cip-dev-bounces@lists.cip-project.org <cip-dev-bounces@lists.cip-
> > project.org> On Behalf Of Fabrizio Castro
> > Sent: 29 August 2019 10:50
> >
> > Hi Pavel,
> >
> > > From: Pavel Machek <pavel@denx.de>
> > > Sent: 29 August 2019 10:48
> > > Subject: Re: [cip-dev] [PATCH/RFC 4.19.y-cip 00/41] Fast forward sh-pfc
> > >
> > > Hi!
> > >
> > > > > > they have made good progress upstream with the development of
> > sh-pfc,
> > > > > > and although the functionality of the drivers hasn't changed much,
> > > > > > the code looks fairly different. This means that backporting patches
> > > > > > to SoC specific driver files will be increasingly hard and error
> > > > > > prone, unless we fast-forward the code base for 4.19.y-cip, hence
> > > > > > this series.
> > > > > > What do you gus think? Comments welcome!
> > > > >
> > > > > I reviewed the patches... and it is interesting how much magic can be
> > > > > done with preprocessor.
> > > >
> > > > I thought the same thing!
> > >
> > > > > I do not see anything preventing the merge, but they were marked
> > [rfc]
> > > > > so I'm not doing that yet. Let me know if I should.
> > > >
> > > > Since nothing nasty was spotted during code review and it works ok, I
> > believe
> > > > merging this series could really help us with future development, so yes
> > > > please, go ahead and merge.
> > >
> > > Ok, merged, and pushed out.
> 
> Our CI is hitting some build errors with the latest v4.19-cip (commit b11ac993) with the renesas shmobile_defconfig configurations:
> https://gitlab.com/cip-project/cip-kernel/linux-cip/-/jobs/283063646
> https://gitlab.com/cip-project/cip-kernel/linux-cip/-/jobs/283063654
> 
> In file included from ./include/linux/kernel.h:15,
>                  from ./include/asm-generic/bug.h:18,
>                  from ./arch/arm/include/asm/bug.h:60,
>                  from ./include/linux/bug.h:5,
>                  from ./include/linux/io.h:23,
>                  from drivers/pinctrl/sh-pfc/pfc-r8a7740.c:21:
> ./include/linux/build_bug.h:29:45: error: negative width in bit-field '<anonymous>'
>  #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
>                                              ^
> drivers/pinctrl/sh-pfc/sh_pfc.h:52:3: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
>    BUILD_BUG_ON_ZERO(sizeof(n##_pins) != sizeof(n##_mux)), \
>    ^~~~~~~~~~~~~~~~~
> drivers/pinctrl/sh-pfc/sh_pfc.h:54:29: note: in expansion of macro 'SH_PFC_PIN_GROUP_ALIAS'
>  #define SH_PFC_PIN_GROUP(n) SH_PFC_PIN_GROUP_ALIAS(n, n)
>                              ^~~~~~~~~~~~~~~~~~~~~~
> drivers/pinctrl/sh-pfc/pfc-r8a7740.c:2806:2: note: in expansion of macro 'SH_PFC_PIN_GROUP'
>   SH_PFC_PIN_GROUP(gether_gmii),
>   ^~~~~~~~~~~~~~~~
> ./include/linux/build_bug.h:29:45: error: negative width in bit-field '<anonymous>'
>  #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
>                                              ^
> drivers/pinctrl/sh-pfc/sh_pfc.h:52:3: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
>    BUILD_BUG_ON_ZERO(sizeof(n##_pins) != sizeof(n##_mux)), \
>    ^~~~~~~~~~~~~~~~~
> drivers/pinctrl/sh-pfc/sh_pfc.h:54:29: note: in expansion of macro 'SH_PFC_PIN_GROUP_ALIAS'
>  #define SH_PFC_PIN_GROUP(n) SH_PFC_PIN_GROUP_ALIAS(n, n)
>                              ^~~~~~~~~~~~~~~~~~~~~~
> drivers/pinctrl/sh-pfc/pfc-r8a7740.c:2868:2: note: in expansion of macro 'SH_PFC_PIN_GROUP'
>   SH_PFC_PIN_GROUP(lcd0_data24_1),
>   ^~~~~~~~~~~~~~~~
> make[3]: *** [drivers/pinctrl/sh-pfc/pfc-r8a7740.o] Error 1
> scripts/Makefile.build:303: recipe for target 'drivers/pinctrl/sh-pfc/pfc-r8a7740.o' failed
> make[2]: *** [drivers/pinctrl/sh-pfc] Error 2
> make[2]: *** Waiting for unfinished jobs....
> scripts/Makefile.build:544: recipe for target 'drivers/pinctrl/sh-pfc' failed
>   AR      drivers/pps/clients/built-in.a
>   AR      drivers/pps/generators/built-in.a
>   CC      drivers/pps/pps.o
>   CC      drivers/power/supply/power_supply_sysfs.o
>   CC      drivers/ptp/ptp_clock.o
> make[1]: *** [drivers/pinctrl] Error 2
> scripts/Makefile.build:544: recipe for target 'drivers/pinctrl' failed
> make[1]: *** Waiting for unfinished jobs....
>   CC      drivers/ptp/ptp_chardev.o
>   AR      drivers/power/supply/built-in.a
>   AR      drivers/power/built-in.a
>   CC      drivers/ptp/ptp_sysfs.o
>   CC      drivers/pps/kapi.o
>   CC      drivers/pps/sysfs.o
>   AR      drivers/ptp/built-in.a
>   AR      drivers/pps/built-in.a
> make: *** [drivers] Error 2
> Makefile:1046: recipe for target 'drivers' failed
> 
> 
> Complete pipeline is still running:
> https://gitlab.com/cip-project/cip-kernel/linux-cip/pipelines/79117946

Thank you for reporting this, and I am so glad we have CI in place to spot this things early on now.

I think the safest thing to do here is dropping this series after seeing the build log,
there is clearly more effort needed to keep arm32 and arm64 in check, and backporting
more patches to the sh-pfc driver would still be a pain.

Pavel, do you think you can drop this series?

Thanks,
Fab

> 
> 
> Kind regards, Chris
> 
> >
> > Thanks!
> >
> > Fab
> >
> > >
> > > Best regards,
> > > 								Pavel
> > > --
> > > DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> > > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> > _______________________________________________
> > cip-dev mailing list
> > cip-dev@lists.cip-project.org
> > https://lists.cip-project.org/mailman/listinfo/cip-dev
Ben Hutchings Aug. 29, 2019, 1:51 p.m. UTC | #7
On Thu, 2019-08-29 at 11:04 +0000, Fabrizio Castro wrote:
> Hello Chris,
> 
> Thank you for your feedback!
> 
> > From: Chris Paterson <Chris.Paterson2@renesas.com>
> > Sent: 29 August 2019 11:23
> > Subject: RE: [cip-dev] [PATCH/RFC 4.19.y-cip 00/41] Fast forward sh-pfc
> > 
> > Hello Pavel, Fab,
> > 
> > > From: cip-dev-bounces@lists.cip-project.org <cip-dev-bounces@lists.cip-
> > > project.org> On Behalf Of Fabrizio Castro
> > > Sent: 29 August 2019 10:50
> > > 
> > > Hi Pavel,
> > > 
> > > > From: Pavel Machek <pavel@denx.de>
> > > > Sent: 29 August 2019 10:48
> > > > Subject: Re: [cip-dev] [PATCH/RFC 4.19.y-cip 00/41] Fast forward sh-pfc
> > > > 
> > > > Hi!
> > > > 
> > > > > > > they have made good progress upstream with the development of
> > > sh-pfc,
> > > > > > > and although the functionality of the drivers hasn't changed much,
> > > > > > > the code looks fairly different. This means that backporting patches
> > > > > > > to SoC specific driver files will be increasingly hard and error
> > > > > > > prone, unless we fast-forward the code base for 4.19.y-cip, hence
> > > > > > > this series.
> > > > > > > What do you gus think? Comments welcome!
> > > > > > 
> > > > > > I reviewed the patches... and it is interesting how much magic can be
> > > > > > done with preprocessor.
> > > > > 
> > > > > I thought the same thing!
> > > > > > I do not see anything preventing the merge, but they were marked
> > > [rfc]
> > > > > > so I'm not doing that yet. Let me know if I should.
> > > > > 
> > > > > Since nothing nasty was spotted during code review and it works ok, I
> > > believe
> > > > > merging this series could really help us with future development, so yes
> > > > > please, go ahead and merge.
> > > > 
> > > > Ok, merged, and pushed out.
> > 
> > Our CI is hitting some build errors with the latest v4.19-cip (commit b11ac993) with the renesas shmobile_defconfig configurations:
> > https://gitlab.com/cip-project/cip-kernel/linux-cip/-/jobs/283063646
> > https://gitlab.com/cip-project/cip-kernel/linux-cip/-/jobs/283063654
> > 
> > In file included from ./include/linux/kernel.h:15,
> >                  from ./include/asm-generic/bug.h:18,
> >                  from ./arch/arm/include/asm/bug.h:60,
> >                  from ./include/linux/bug.h:5,
> >                  from ./include/linux/io.h:23,
> >                  from drivers/pinctrl/sh-pfc/pfc-r8a7740.c:21:
> > ./include/linux/build_bug.h:29:45: error: negative width in bit-field '<anonymous>'
> >  #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
> >                                              ^
> > drivers/pinctrl/sh-pfc/sh_pfc.h:52:3: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
> >    BUILD_BUG_ON_ZERO(sizeof(n##_pins) != sizeof(n##_mux)), \
> >    ^~~~~~~~~~~~~~~~~
> > drivers/pinctrl/sh-pfc/sh_pfc.h:54:29: note: in expansion of macro 'SH_PFC_PIN_GROUP_ALIAS'
> >  #define SH_PFC_PIN_GROUP(n) SH_PFC_PIN_GROUP_ALIAS(n, n)
> >                              ^~~~~~~~~~~~~~~~~~~~~~
> > drivers/pinctrl/sh-pfc/pfc-r8a7740.c:2806:2: note: in expansion of macro 'SH_PFC_PIN_GROUP'
> >   SH_PFC_PIN_GROUP(gether_gmii),
> >   ^~~~~~~~~~~~~~~~
[...]
> Thank you for reporting this, and I am so glad we have CI in place to spot this things early on now.
> 
> I think the safest thing to do here is dropping this series after seeing the build log,
> there is clearly more effort needed to keep arm32 and arm64 in check, and backporting
> more patches to the sh-pfc driver would still be a pain.
> 
> Pavel, do you think you can drop this series?

The failing assertions were added by "pinctrl: sh-pfc: Validate
pins/marks in pin groups at build time".  We could revert that one
patch, but it seems to be detecting actual bugs in r8a7740.c, so I
think we should take the fixes for those:

commit 1ebc589a7786f17f97b9e87b44e0fb4d0290d8f8
Author: Geert Uytterhoeven <geert+renesas@glider.be>
Date:   Wed Dec 12 10:57:27 2018 +0100

    pinctrl: sh-pfc: r8a7740: Add missing REF125CK pin to gether_gmii group

commit 96bb2a6ab4eca10e5b6490b3f0738e9f7ec22c2b
Author: Geert Uytterhoeven <geert+renesas@glider.be>
Date:   Wed Dec 12 11:00:27 2018 +0100

    pinctrl: sh-pfc: r8a7740: Add missing LCD0 marks to lcd0_data24_1 group

Ben.
Fabrizio Castro Aug. 29, 2019, 5:07 p.m. UTC | #8
Hi Ben,

Thank you for the feedback!

> From: Ben Hutchings <ben.hutchings@codethink.co.uk>
> Sent: 29 August 2019 14:51
> Subject: Re: [cip-dev] [PATCH/RFC 4.19.y-cip 00/41] Fast forward sh-pfc
> 
> On Thu, 2019-08-29 at 11:04 +0000, Fabrizio Castro wrote:
> > Hello Chris,
> >
> > Thank you for your feedback!
> >
> > > From: Chris Paterson <Chris.Paterson2@renesas.com>
> > > Sent: 29 August 2019 11:23
> > > Subject: RE: [cip-dev] [PATCH/RFC 4.19.y-cip 00/41] Fast forward sh-pfc
> > >
> > > Hello Pavel, Fab,
> > >
> > > > From: cip-dev-bounces@lists.cip-project.org <cip-dev-bounces@lists.cip-
> > > > project.org> On Behalf Of Fabrizio Castro
> > > > Sent: 29 August 2019 10:50
> > > >
> > > > Hi Pavel,
> > > >
> > > > > From: Pavel Machek <pavel@denx.de>
> > > > > Sent: 29 August 2019 10:48
> > > > > Subject: Re: [cip-dev] [PATCH/RFC 4.19.y-cip 00/41] Fast forward sh-pfc
> > > > >
> > > > > Hi!
> > > > >
> > > > > > > > they have made good progress upstream with the development of
> > > > sh-pfc,
> > > > > > > > and although the functionality of the drivers hasn't changed much,
> > > > > > > > the code looks fairly different. This means that backporting patches
> > > > > > > > to SoC specific driver files will be increasingly hard and error
> > > > > > > > prone, unless we fast-forward the code base for 4.19.y-cip, hence
> > > > > > > > this series.
> > > > > > > > What do you gus think? Comments welcome!
> > > > > > >
> > > > > > > I reviewed the patches... and it is interesting how much magic can be
> > > > > > > done with preprocessor.
> > > > > >
> > > > > > I thought the same thing!
> > > > > > > I do not see anything preventing the merge, but they were marked
> > > > [rfc]
> > > > > > > so I'm not doing that yet. Let me know if I should.
> > > > > >
> > > > > > Since nothing nasty was spotted during code review and it works ok, I
> > > > believe
> > > > > > merging this series could really help us with future development, so yes
> > > > > > please, go ahead and merge.
> > > > >
> > > > > Ok, merged, and pushed out.
> > >
> > > Our CI is hitting some build errors with the latest v4.19-cip (commit b11ac993) with the renesas shmobile_defconfig configurations:
> > > https://gitlab.com/cip-project/cip-kernel/linux-cip/-/jobs/283063646
> > > https://gitlab.com/cip-project/cip-kernel/linux-cip/-/jobs/283063654
> > >
> > > In file included from ./include/linux/kernel.h:15,
> > >                  from ./include/asm-generic/bug.h:18,
> > >                  from ./arch/arm/include/asm/bug.h:60,
> > >                  from ./include/linux/bug.h:5,
> > >                  from ./include/linux/io.h:23,
> > >                  from drivers/pinctrl/sh-pfc/pfc-r8a7740.c:21:
> > > ./include/linux/build_bug.h:29:45: error: negative width in bit-field '<anonymous>'
> > >  #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
> > >                                              ^
> > > drivers/pinctrl/sh-pfc/sh_pfc.h:52:3: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
> > >    BUILD_BUG_ON_ZERO(sizeof(n##_pins) != sizeof(n##_mux)), \
> > >    ^~~~~~~~~~~~~~~~~
> > > drivers/pinctrl/sh-pfc/sh_pfc.h:54:29: note: in expansion of macro 'SH_PFC_PIN_GROUP_ALIAS'
> > >  #define SH_PFC_PIN_GROUP(n) SH_PFC_PIN_GROUP_ALIAS(n, n)
> > >                              ^~~~~~~~~~~~~~~~~~~~~~
> > > drivers/pinctrl/sh-pfc/pfc-r8a7740.c:2806:2: note: in expansion of macro 'SH_PFC_PIN_GROUP'
> > >   SH_PFC_PIN_GROUP(gether_gmii),
> > >   ^~~~~~~~~~~~~~~~
> [...]
> > Thank you for reporting this, and I am so glad we have CI in place to spot this things early on now.
> >
> > I think the safest thing to do here is dropping this series after seeing the build log,
> > there is clearly more effort needed to keep arm32 and arm64 in check, and backporting
> > more patches to the sh-pfc driver would still be a pain.
> >
> > Pavel, do you think you can drop this series?
> 
> The failing assertions were added by "pinctrl: sh-pfc: Validate
> pins/marks in pin groups at build time".  We could revert that one
> patch, but it seems to be detecting actual bugs in r8a7740.c, so I
> think we should take the fixes for those:
> 
> commit 1ebc589a7786f17f97b9e87b44e0fb4d0290d8f8
> Author: Geert Uytterhoeven <geert+renesas@glider.be>
> Date:   Wed Dec 12 10:57:27 2018 +0100
> 
>     pinctrl: sh-pfc: r8a7740: Add missing REF125CK pin to gether_gmii group
> 
> commit 96bb2a6ab4eca10e5b6490b3f0738e9f7ec22c2b
> Author: Geert Uytterhoeven <geert+renesas@glider.be>
> Date:   Wed Dec 12 11:00:27 2018 +0100
> 
>     pinctrl: sh-pfc: r8a7740: Add missing LCD0 marks to lcd0_data24_1 group
> 
> Ben.

Thank you for this, I have found problems with 3 SoC specific pinctrl drivers,
I have sent out a v2 for reference, I am not convinced that applying the
series is worth the risk, but I would appreciate your opinion.

Thanks,
Fab

> 
> --
> Ben Hutchings, Software Developer                         Codethink Ltd
> https://www.codethink.co.uk/                 Dale House, 35 Dale Street
>                                      Manchester, M1 2HF, United Kingdom
Pavel Machek Aug. 29, 2019, 8:04 p.m. UTC | #9
Hi!

> > > > > > Since nothing nasty was spotted during code review and it works ok, I
> > > > believe
> > > > > > merging this series could really help us with future development, so yes
> > > > > > please, go ahead and merge.
> > > > > 
> > > > > Ok, merged, and pushed out.
> > > 
> > > Our CI is hitting some build errors with the latest v4.19-cip (commit b11ac993) with the renesas shmobile_defconfig configurations:
> > > https://gitlab.com/cip-project/cip-kernel/linux-cip/-/jobs/283063646
> > > https://gitlab.com/cip-project/cip-kernel/linux-cip/-/jobs/283063654
> > > 
> > > In file included from ./include/linux/kernel.h:15,
> > >                  from ./include/asm-generic/bug.h:18,
> > >                  from ./arch/arm/include/asm/bug.h:60,
> > >                  from ./include/linux/bug.h:5,
> > >                  from ./include/linux/io.h:23,
> > >                  from drivers/pinctrl/sh-pfc/pfc-r8a7740.c:21:
> > > ./include/linux/build_bug.h:29:45: error: negative width in bit-field '<anonymous>'
> > >  #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
> > >                                              ^
> > > drivers/pinctrl/sh-pfc/sh_pfc.h:52:3: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
> > >    BUILD_BUG_ON_ZERO(sizeof(n##_pins) != sizeof(n##_mux)), \
> > >    ^~~~~~~~~~~~~~~~~
> > > drivers/pinctrl/sh-pfc/sh_pfc.h:54:29: note: in expansion of macro 'SH_PFC_PIN_GROUP_ALIAS'
> > >  #define SH_PFC_PIN_GROUP(n) SH_PFC_PIN_GROUP_ALIAS(n, n)
> > >                              ^~~~~~~~~~~~~~~~~~~~~~
> > > drivers/pinctrl/sh-pfc/pfc-r8a7740.c:2806:2: note: in expansion of macro 'SH_PFC_PIN_GROUP'
> > >   SH_PFC_PIN_GROUP(gether_gmii),
> > >   ^~~~~~~~~~~~~~~~
> [...]
> > Thank you for reporting this, and I am so glad we have CI in place to spot this things early on now.
> > 
> > I think the safest thing to do here is dropping this series after seeing the build log,
> > there is clearly more effort needed to keep arm32 and arm64 in check, and backporting
> > more patches to the sh-pfc driver would still be a pain.
> > 
> > Pavel, do you think you can drop this series?
> 
> The failing assertions were added by "pinctrl: sh-pfc: Validate
> pins/marks in pin groups at build time".  We could revert that one
> patch, but it seems to be detecting actual bugs in r8a7740.c, so I
> think we should take the fixes for those:
> 
> commit 1ebc589a7786f17f97b9e87b44e0fb4d0290d8f8
> Author: Geert Uytterhoeven <geert+renesas@glider.be>
> Date:   Wed Dec 12 10:57:27 2018 +0100
> 
>     pinctrl: sh-pfc: r8a7740: Add missing REF125CK pin to gether_gmii group
> 
> commit 96bb2a6ab4eca10e5b6490b3f0738e9f7ec22c2b
> Author: Geert Uytterhoeven <geert+renesas@glider.be>
> Date:   Wed Dec 12 11:00:27 2018 +0100
> 
>     pinctrl: sh-pfc: r8a7740: Add missing LCD0 marks to lcd0_data24_1 group

I'd rather apply these two patches than revert the series. If they are
in the new series, I can pick them easily... and we should have the
tree building again.

Ok... I tried that. I pushed the tree now, and will take a look at the
lava.

Best regards,
								Pavel
Pavel Machek Aug. 29, 2019, 10:35 p.m. UTC | #10
Hi!

> > > > Since nothing nasty was spotted during code review and it works ok, I
> > believe
> > > > merging this series could really help us with future development, so yes
> > > > please, go ahead and merge.
> > >
> > > Ok, merged, and pushed out.
> 
> Our CI is hitting some build errors with the latest v4.19-cip (commit b11ac993) with the renesas shmobile_defconfig configurations:
> https://gitlab.com/cip-project/cip-kernel/linux-cip/-/jobs/283063646
> https://gitlab.com/cip-project/cip-kernel/linux-cip/-/jobs/283063654

Thanks for report. Applying two patches Ben identified did not do the
trick; compelete series did.

Let me know if something is still broken.

Best regards,
								Pavel
Chris Paterson Aug. 30, 2019, 7:26 a.m. UTC | #11
Hello Pavel,

> From: Pavel Machek <pavel@denx.de>
> Sent: 29 August 2019 23:35
>
> Hi!
>
> > > > > Since nothing nasty was spotted during code review and it works ok, I
> > > believe
> > > > > merging this series could really help us with future development, so
> yes
> > > > > please, go ahead and merge.
> > > >
> > > > Ok, merged, and pushed out.
> >
> > Our CI is hitting some build errors with the latest v4.19-cip (commit
> b11ac993) with the renesas shmobile_defconfig configurations:
> > https://gitlab.com/cip-project/cip-kernel/linux-cip/-/jobs/283063646
> > https://gitlab.com/cip-project/cip-kernel/linux-cip/-/jobs/283063654
>
> Thanks for report. Applying two patches Ben identified did not do the
> trick; compelete series did.
>
> Let me know if something is still broken.

Looks okay to me.

Thanks, Chris

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