Re: [PATCH] drm/xe: Fix build without CONFIG_FAULT_INJECTION
On Mon, Dec 18, 2023 at 10:51:03AM -0800, Dixit, Ashutosh wrote: > On Mon, 18 Dec 2023 06:57:14 -0800, Thomas Hellström wrote: > > > > > > On 12/18/23 15:30, Rodrigo Vivi wrote: > > > Ideally this header could be included without the CONFIG_FAULT_INJECTION > > > and it would take care itself for the includes it needs. > > > So, let's temporary workaround this by moving this below and including > > > only when CONFIG_FAULT_INJECTION is selected to avoid build breakages. > > > > > > Another solution would be us including the linux/types.h as well, but > > > this creates unnecessary cases. > > > > > > Reference: > > > https://lore.kernel.org/all/20230816134748.979231-1-himal.prasad.ghimi...@intel.com/ > > > Cc: Himal Prasad Ghimiray > > > Cc: Oded Gabbay > > > Cc: Thomas Hellström > > > Cc: Lucas De Marchi > > > Signed-off-by: Rodrigo Vivi > > LGTM. > > > > Reviewed-by: Thomas Hellström > > Hmm, msm/msm_drv.c doesn't seem to need to do this. because it also imports the types.h: drivers/gpu/drm/msm/msm_drv.h:#include > Anyway maybe ok for a > temporary fix... yes, it is a temporary hammer. But maybe we don't need this if Andrew acks to get this through drm-xe-next -> drm-next: https://lore.kernel.org/all/a5o2opdfsfnbptrrbvillogft2uqp73w4icu3mdmmwtvoqmdr2@y2fbrc6t4aew/
Re: [PATCH] drm/xe: Fix build without CONFIG_FAULT_INJECTION
On Mon, 18 Dec 2023 06:57:14 -0800, Thomas Hellström wrote: > > > On 12/18/23 15:30, Rodrigo Vivi wrote: > > Ideally this header could be included without the CONFIG_FAULT_INJECTION > > and it would take care itself for the includes it needs. > > So, let's temporary workaround this by moving this below and including > > only when CONFIG_FAULT_INJECTION is selected to avoid build breakages. > > > > Another solution would be us including the linux/types.h as well, but > > this creates unnecessary cases. > > > > Reference: > > https://lore.kernel.org/all/20230816134748.979231-1-himal.prasad.ghimi...@intel.com/ > > Cc: Himal Prasad Ghimiray > > Cc: Oded Gabbay > > Cc: Thomas Hellström > > Cc: Lucas De Marchi > > Signed-off-by: Rodrigo Vivi > LGTM. > > Reviewed-by: Thomas Hellström Hmm, msm/msm_drv.c doesn't seem to need to do this. Anyway maybe ok for a temporary fix...
Re: [PATCH] drm/xe: Fix build without CONFIG_FAULT_INJECTION
On 12/18/23 15:30, Rodrigo Vivi wrote: Ideally this header could be included without the CONFIG_FAULT_INJECTION and it would take care itself for the includes it needs. So, let's temporary workaround this by moving this below and including only when CONFIG_FAULT_INJECTION is selected to avoid build breakages. Another solution would be us including the linux/types.h as well, but this creates unnecessary cases. Reference: https://lore.kernel.org/all/20230816134748.979231-1-himal.prasad.ghimi...@intel.com/ Cc: Himal Prasad Ghimiray Cc: Oded Gabbay Cc: Thomas Hellström Cc: Lucas De Marchi Signed-off-by: Rodrigo Vivi LGTM. Reviewed-by: Thomas Hellström --- drivers/gpu/drm/xe/xe_debugfs.c | 2 +- drivers/gpu/drm/xe/xe_gt.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_debugfs.c b/drivers/gpu/drm/xe/xe_debugfs.c index f1e80be8b9306..c56fd7d59f057 100644 --- a/drivers/gpu/drm/xe/xe_debugfs.c +++ b/drivers/gpu/drm/xe/xe_debugfs.c @@ -5,7 +5,6 @@ #include "xe_debugfs.h" -#include #include #include @@ -22,6 +21,7 @@ #endif #ifdef CONFIG_FAULT_INJECTION +#include /* XXX: fault-inject.h is broken */ DECLARE_FAULT_ATTR(gt_reset_failure); #endif diff --git a/drivers/gpu/drm/xe/xe_gt.h b/drivers/gpu/drm/xe/xe_gt.h index f3c780bd266dd..4486e083f5eff 100644 --- a/drivers/gpu/drm/xe/xe_gt.h +++ b/drivers/gpu/drm/xe/xe_gt.h @@ -7,7 +7,6 @@ #define _XE_GT_H_ #include -#include #include "xe_device_types.h" #include "xe_hw_engine.h" @@ -20,6 +19,7 @@ #define CCS_MASK(gt) (((gt)->info.engine_mask & XE_HW_ENGINE_CCS_MASK) >> XE_HW_ENGINE_CCS0) #ifdef CONFIG_FAULT_INJECTION +#include /* XXX: fault-inject.h is broken */ extern struct fault_attr gt_reset_failure; static inline bool xe_fault_inject_gt_reset(void) {
[PATCH] drm/xe: Fix build without CONFIG_FAULT_INJECTION
Ideally this header could be included without the CONFIG_FAULT_INJECTION and it would take care itself for the includes it needs. So, let's temporary workaround this by moving this below and including only when CONFIG_FAULT_INJECTION is selected to avoid build breakages. Another solution would be us including the linux/types.h as well, but this creates unnecessary cases. Reference: https://lore.kernel.org/all/20230816134748.979231-1-himal.prasad.ghimi...@intel.com/ Cc: Himal Prasad Ghimiray Cc: Oded Gabbay Cc: Thomas Hellström Cc: Lucas De Marchi Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/xe/xe_debugfs.c | 2 +- drivers/gpu/drm/xe/xe_gt.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_debugfs.c b/drivers/gpu/drm/xe/xe_debugfs.c index f1e80be8b9306..c56fd7d59f057 100644 --- a/drivers/gpu/drm/xe/xe_debugfs.c +++ b/drivers/gpu/drm/xe/xe_debugfs.c @@ -5,7 +5,6 @@ #include "xe_debugfs.h" -#include #include #include @@ -22,6 +21,7 @@ #endif #ifdef CONFIG_FAULT_INJECTION +#include /* XXX: fault-inject.h is broken */ DECLARE_FAULT_ATTR(gt_reset_failure); #endif diff --git a/drivers/gpu/drm/xe/xe_gt.h b/drivers/gpu/drm/xe/xe_gt.h index f3c780bd266dd..4486e083f5eff 100644 --- a/drivers/gpu/drm/xe/xe_gt.h +++ b/drivers/gpu/drm/xe/xe_gt.h @@ -7,7 +7,6 @@ #define _XE_GT_H_ #include -#include #include "xe_device_types.h" #include "xe_hw_engine.h" @@ -20,6 +19,7 @@ #define CCS_MASK(gt) (((gt)->info.engine_mask & XE_HW_ENGINE_CCS_MASK) >> XE_HW_ENGINE_CCS0) #ifdef CONFIG_FAULT_INJECTION +#include /* XXX: fault-inject.h is broken */ extern struct fault_attr gt_reset_failure; static inline bool xe_fault_inject_gt_reset(void) { -- 2.43.0