diff mbox series

[RFC,4/7] drm/i915/pxp: fix undefined reference to `intel_pxp_gsccs_is_ready_for_sessions'

Message ID 8921351F23CD8948+20250411105459.90782-4-chenlinxuan@uniontech.com (mailing list archive)
State New
Headers show
Series kernel-hacking: introduce CONFIG_NO_AUTO_INLINE | expand

Commit Message

Chen Linxuan April 11, 2025, 10:54 a.m. UTC
On x86_64 with gcc version 13.3.0, I compile kernel with:

  make defconfig
  ./scripts/kconfig/merge_config.sh .config <(
    echo CONFIG_COMPILE_TEST=y
  )
  make KCFLAGS="-fno-inline-functions -fno-inline-small-functions -fno-inline-functions-called-once"

Then I get a linker error:

  ld: vmlinux.o: in function `pxp_fw_dependencies_completed':
  kintel_pxp.c:(.text+0x95728f): undefined reference to `intel_pxp_gsccs_is_ready_for_sessions'

Signed-off-by: Chen Linxuan <chenlinxuan@uniontech.com>
---
 drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Jani Nikula April 15, 2025, 7:59 a.m. UTC | #1
On Fri, 11 Apr 2025, Chen Linxuan <chenlinxuan@uniontech.com> wrote:
> On x86_64 with gcc version 13.3.0, I compile kernel with:
>
>   make defconfig
>   ./scripts/kconfig/merge_config.sh .config <(
>     echo CONFIG_COMPILE_TEST=y
>   )
>   make KCFLAGS="-fno-inline-functions -fno-inline-small-functions -fno-inline-functions-called-once"

The change looks good, but I'm guessing the real explanation is that you
have CONFIG_DRM_I915_PXP=n and that appears to be broken.

Fixes: 99afb7cc8c44 ("drm/i915/pxp: Add ARB session creation and cleanup")
Reviewed-by: Jani Nikula <jani.nikula@intel.com>

But how do you want this merged?


BR,
Jani.

>
> Then I get a linker error:
>
>   ld: vmlinux.o: in function `pxp_fw_dependencies_completed':
>   kintel_pxp.c:(.text+0x95728f): undefined reference to `intel_pxp_gsccs_is_ready_for_sessions'
>
> Signed-off-by: Chen Linxuan <chenlinxuan@uniontech.com>
> ---
>  drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h b/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h
> index 9aae779c4da3..4969d3de2bac 100644
> --- a/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h
> +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h
> @@ -23,6 +23,7 @@ int intel_pxp_gsccs_init(struct intel_pxp *pxp);
>  
>  int intel_pxp_gsccs_create_session(struct intel_pxp *pxp, int arb_session_id);
>  void intel_pxp_gsccs_end_arb_fw_session(struct intel_pxp *pxp, u32 arb_session_id);
> +bool intel_pxp_gsccs_is_ready_for_sessions(struct intel_pxp *pxp);
>  
>  #else
>  static inline void intel_pxp_gsccs_fini(struct intel_pxp *pxp)
> @@ -34,8 +35,11 @@ static inline int intel_pxp_gsccs_init(struct intel_pxp *pxp)
>  	return 0;
>  }
>  
> -#endif
> +static inline bool intel_pxp_gsccs_is_ready_for_sessions(struct intel_pxp *pxp)
> +{
> +	return false;
> +}
>  
> -bool intel_pxp_gsccs_is_ready_for_sessions(struct intel_pxp *pxp);
> +#endif
>  
>  #endif /*__INTEL_PXP_GSCCS_H__ */
Chen Linxuan April 15, 2025, 8:09 a.m. UTC | #2
Jani Nikula <jani.nikula@linux.intel.com> 于2025年4月15日周二 15:59写道:
>
> On Fri, 11 Apr 2025, Chen Linxuan <chenlinxuan@uniontech.com> wrote:
> > On x86_64 with gcc version 13.3.0, I compile kernel with:
> >
> >   make defconfig
> >   ./scripts/kconfig/merge_config.sh .config <(
> >     echo CONFIG_COMPILE_TEST=y
> >   )
> >   make KCFLAGS="-fno-inline-functions -fno-inline-small-functions -fno-inline-functions-called-once"
>
> The change looks good, but I'm guessing the real explanation is that you
> have CONFIG_DRM_I915_PXP=n and that appears to be broken.
>
> Fixes: 99afb7cc8c44 ("drm/i915/pxp: Add ARB session creation and cleanup")
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
>
> But how do you want this merged?
>

As patch 5 has been merged into rdma-next, I think it's OK to merge
this single patch into your tree.

>
> BR,
> Jani.
>
> >
> > Then I get a linker error:
> >
> >   ld: vmlinux.o: in function `pxp_fw_dependencies_completed':
> >   kintel_pxp.c:(.text+0x95728f): undefined reference to `intel_pxp_gsccs_is_ready_for_sessions'
> >
> > Signed-off-by: Chen Linxuan <chenlinxuan@uniontech.com>
> > ---
> >  drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h | 8 ++++++--
> >  1 file changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h b/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h
> > index 9aae779c4da3..4969d3de2bac 100644
> > --- a/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h
> > +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h
> > @@ -23,6 +23,7 @@ int intel_pxp_gsccs_init(struct intel_pxp *pxp);
> >
> >  int intel_pxp_gsccs_create_session(struct intel_pxp *pxp, int arb_session_id);
> >  void intel_pxp_gsccs_end_arb_fw_session(struct intel_pxp *pxp, u32 arb_session_id);
> > +bool intel_pxp_gsccs_is_ready_for_sessions(struct intel_pxp *pxp);
> >
> >  #else
> >  static inline void intel_pxp_gsccs_fini(struct intel_pxp *pxp)
> > @@ -34,8 +35,11 @@ static inline int intel_pxp_gsccs_init(struct intel_pxp *pxp)
> >       return 0;
> >  }
> >
> > -#endif
> > +static inline bool intel_pxp_gsccs_is_ready_for_sessions(struct intel_pxp *pxp)
> > +{
> > +     return false;
> > +}
> >
> > -bool intel_pxp_gsccs_is_ready_for_sessions(struct intel_pxp *pxp);
> > +#endif
> >
> >  #endif /*__INTEL_PXP_GSCCS_H__ */
>
> --
> Jani Nikula, Intel
>
>
Jani Nikula April 15, 2025, 9:07 a.m. UTC | #3
On Tue, 15 Apr 2025, Chen Linxuan <chenlinxuan@uniontech.com> wrote:
> Jani Nikula <jani.nikula@linux.intel.com> 于2025年4月15日周二 15:59写道:
>>
>> On Fri, 11 Apr 2025, Chen Linxuan <chenlinxuan@uniontech.com> wrote:
>> > On x86_64 with gcc version 13.3.0, I compile kernel with:
>> >
>> >   make defconfig
>> >   ./scripts/kconfig/merge_config.sh .config <(
>> >     echo CONFIG_COMPILE_TEST=y
>> >   )
>> >   make KCFLAGS="-fno-inline-functions -fno-inline-small-functions -fno-inline-functions-called-once"
>>
>> The change looks good, but I'm guessing the real explanation is that you
>> have CONFIG_DRM_I915_PXP=n and that appears to be broken.
>>
>> Fixes: 99afb7cc8c44 ("drm/i915/pxp: Add ARB session creation and cleanup")
>> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
>>
>> But how do you want this merged?
>>
>
> As patch 5 has been merged into rdma-next, I think it's OK to merge
> this single patch into your tree.

Thanks. I amended the commit message a little, and resent this to
intel-gfx [1], and will merge it via drm-intel-next.

BR,
Jani.



[1] https://lore.kernel.org/r/20250415090616.2649889-1-jani.nikula@intel.com
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h b/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h
index 9aae779c4da3..4969d3de2bac 100644
--- a/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h
+++ b/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h
@@ -23,6 +23,7 @@  int intel_pxp_gsccs_init(struct intel_pxp *pxp);
 
 int intel_pxp_gsccs_create_session(struct intel_pxp *pxp, int arb_session_id);
 void intel_pxp_gsccs_end_arb_fw_session(struct intel_pxp *pxp, u32 arb_session_id);
+bool intel_pxp_gsccs_is_ready_for_sessions(struct intel_pxp *pxp);
 
 #else
 static inline void intel_pxp_gsccs_fini(struct intel_pxp *pxp)
@@ -34,8 +35,11 @@  static inline int intel_pxp_gsccs_init(struct intel_pxp *pxp)
 	return 0;
 }
 
-#endif
+static inline bool intel_pxp_gsccs_is_ready_for_sessions(struct intel_pxp *pxp)
+{
+	return false;
+}
 
-bool intel_pxp_gsccs_is_ready_for_sessions(struct intel_pxp *pxp);
+#endif
 
 #endif /*__INTEL_PXP_GSCCS_H__ */