lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 14 May 2021 17:37:30 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     linux-kernel@...r.kernel.org
Cc:     kernel test robot <lkp@...el.com>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Kieran Bingham <kieran.bingham+renesas@...asonboard.com>,
        dri-devel@...ts.freedesktop.org, linux-renesas-soc@...r.kernel.org,
        Jacopo Mondi <jacopo+renesas@...ndi.org>
Subject: Re: [PATCH v2] drm: rcar-du: fix linker undefined references

ping?
thanks.

On 4/23/21 5:12 PM, Randy Dunlap wrote:
> When DRM_RCAR_DU=y and DRM_RCAR_LVDS=m, there are several build errors
> as reported by 'kernel test robot'. These can be corrected by changing
> source code occurrences of IS_ENABLED(...) to IS_REACHABLE(...).
> 
> In looking at this, the same problem (build errors) happens when
> DRM_RCAR_DU=y and DRM_RCAR_CMM=m, so again change an IS_ENABLED()
> to IS_REACHABLE() for this case as well.
> 
> These changes fix the following 8 build/link errors:
> 
> aarch64-linux-ld: drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_enable':
> rcar_du_crtc.c:(.text+0x1be8): undefined reference to `rcar_lvds_clk_enable'
> aarch64-linux-ld: drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_disable':
> rcar_du_crtc.c:(.text+0x2438): undefined reference to `rcar_lvds_clk_disable'
> aarch64-linux-ld: drivers/gpu/drm/rcar-du/rcar_du_drv.o: in function `rcar_du_init':
> rcar_du_drv.c:(.init.text+0x14): undefined reference to `rcar_du_of_init'
> aarch64-linux-ld: drivers/gpu/drm/rcar-du/rcar_du_encoder.o: in function `rcar_du_encoder_init':
> rcar_du_encoder.c:(.text+0x1d4): undefined reference to `rcar_lvds_dual_link'
> 
> aarch64-linux-ld: drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_cmm_setup':
> rcar_du_crtc.c:(.text+0x380): undefined reference to `rcar_cmm_setup'
> aarch64-linux-ld: drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_enable':
> rcar_du_crtc.c:(.text+0x1c08): undefined reference to `rcar_cmm_enable'
> aarch64-linux-ld: drivers/gpu/drm/rcar-du/rcar_du_crtc.o: in function `rcar_du_crtc_atomic_disable':
> rcar_du_crtc.c:(.text+0x231c): undefined reference to `rcar_cmm_disable'
> aarch64-linux-ld: drivers/gpu/drm/rcar-du/rcar_du_kms.o: in function `rcar_du_modeset_init':
> rcar_du_kms.c:(.text+0xd08): undefined reference to `rcar_cmm_init'
> 
> All RCAR kconfig combinations now build for me.
> 
> Fixes: e08e934d6c28 ("drm: rcar-du: Add support for CMM")
> Fixes: 02f2b30032c1 ("drm: rcar-du: lvds: Add API to enable/disable clock output")
> Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
> Reported-by: kernel test robot <lkp@...el.com>
> Cc: Masahiro Yamada <masahiroy@...nel.org>
> Cc: Laurent Pinchart <laurent.pinchart@...asonboard.com>
> Cc: Kieran Bingham <kieran.bingham+renesas@...asonboard.com>
> Cc: dri-devel@...ts.freedesktop.org
> Cc: linux-renesas-soc@...r.kernel.org
> Cc: Jacopo Mondi <jacopo+renesas@...ndi.org>
> ---
> v2: also send to LKML;
>     don't change Kconfig "imply" to "select" since not all platforms
>     with DU have CMM and/or LVDS support. Use IS_REACHABLE() instead.
> 
>  drivers/gpu/drm/rcar-du/rcar_cmm.h   |    4 ++--
>  drivers/gpu/drm/rcar-du/rcar_du_of.h |    2 +-
>  drivers/gpu/drm/rcar-du/rcar_lvds.h  |    2 +-
>  3 files changed, 4 insertions(+), 4 deletions(-)
> 
> --- linux-next-20210420.orig/drivers/gpu/drm/rcar-du/rcar_lvds.h
> +++ linux-next-20210420/drivers/gpu/drm/rcar-du/rcar_lvds.h
> @@ -12,7 +12,7 @@
>  
>  struct drm_bridge;
>  
> -#if IS_ENABLED(CONFIG_DRM_RCAR_LVDS)
> +#if IS_REACHABLE(CONFIG_DRM_RCAR_LVDS)
>  int rcar_lvds_clk_enable(struct drm_bridge *bridge, unsigned long freq);
>  void rcar_lvds_clk_disable(struct drm_bridge *bridge);
>  bool rcar_lvds_dual_link(struct drm_bridge *bridge);
> --- linux-next-20210420.orig/drivers/gpu/drm/rcar-du/rcar_du_of.h
> +++ linux-next-20210420/drivers/gpu/drm/rcar-du/rcar_du_of.h
> @@ -11,7 +11,7 @@
>  
>  struct of_device_id;
>  
> -#if IS_ENABLED(CONFIG_DRM_RCAR_LVDS)
> +#if IS_REACHABLE(CONFIG_DRM_RCAR_LVDS)
>  void __init rcar_du_of_init(const struct of_device_id *of_ids);
>  #else
>  static inline void rcar_du_of_init(const struct of_device_id *of_ids) { }
> --- linux-next-20210420.orig/drivers/gpu/drm/rcar-du/rcar_cmm.h
> +++ linux-next-20210420/drivers/gpu/drm/rcar-du/rcar_cmm.h
> @@ -25,7 +25,7 @@ struct rcar_cmm_config {
>  	} lut;
>  };
>  
> -#if IS_ENABLED(CONFIG_DRM_RCAR_CMM)
> +#if IS_REACHABLE(CONFIG_DRM_RCAR_CMM)
>  int rcar_cmm_init(struct platform_device *pdev);
>  
>  int rcar_cmm_enable(struct platform_device *pdev);
> @@ -53,6 +53,6 @@ static inline int rcar_cmm_setup(struct
>  {
>  	return 0;
>  }
> -#endif /* IS_ENABLED(CONFIG_DRM_RCAR_CMM) */
> +#endif /* IS_REACHABLE(CONFIG_DRM_RCAR_CMM) */
>  
>  #endif /* __RCAR_CMM_H__ */
> 


-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ