From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: Matthew Brost <matthew.brost@intel.com>, intel-xe@lists.freedesktop.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Subject: Re: [PATCH] drm/xe: Make all ABI shift values unsigned
Date: Wed, 31 Jan 2024 14:12:16 +0100 [thread overview]
Message-ID: <85ff43a8-022d-41ea-9a38-5806c0cebb17@linux.intel.com> (raw)
In-Reply-To: <20240131025424.2087936-1-matthew.brost@intel.com>
On 1/31/24 03:54, Matthew Brost wrote:
> All ABI definitions are unsigned and not defining as unsigned is causing
> build errors [1].
>
> [1] https://lore.kernel.org/all/20240123111235.3097079-1-geert@linux-m68k.org/
>
> Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Took me a while to set up a gcc-5 aarch64 cross-compiler, but verified
that this indeed fixes the build errors.
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> ---
> drivers/gpu/drm/xe/abi/guc_actions_abi.h | 4 ++--
> drivers/gpu/drm/xe/abi/guc_actions_slpc_abi.h | 4 ++--
> .../drm/xe/abi/guc_communication_ctb_abi.h | 8 ++++----
> drivers/gpu/drm/xe/abi/guc_klvs_abi.h | 6 +++---
> drivers/gpu/drm/xe/abi/guc_messages_abi.h | 20 +++++++++----------
> 5 files changed, 21 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/abi/guc_actions_abi.h b/drivers/gpu/drm/xe/abi/guc_actions_abi.h
> index 3062e0e0d467..79ba98a169f9 100644
> --- a/drivers/gpu/drm/xe/abi/guc_actions_abi.h
> +++ b/drivers/gpu/drm/xe/abi/guc_actions_abi.h
> @@ -50,8 +50,8 @@
>
> #define HOST2GUC_SELF_CFG_REQUEST_MSG_LEN (GUC_HXG_REQUEST_MSG_MIN_LEN + 3u)
> #define HOST2GUC_SELF_CFG_REQUEST_MSG_0_MBZ GUC_HXG_REQUEST_MSG_0_DATA0
> -#define HOST2GUC_SELF_CFG_REQUEST_MSG_1_KLV_KEY (0xffff << 16)
> -#define HOST2GUC_SELF_CFG_REQUEST_MSG_1_KLV_LEN (0xffff << 0)
> +#define HOST2GUC_SELF_CFG_REQUEST_MSG_1_KLV_KEY (0xffffu << 16)
> +#define HOST2GUC_SELF_CFG_REQUEST_MSG_1_KLV_LEN (0xffffu << 0)
> #define HOST2GUC_SELF_CFG_REQUEST_MSG_2_VALUE32 GUC_HXG_REQUEST_MSG_n_DATAn
> #define HOST2GUC_SELF_CFG_REQUEST_MSG_3_VALUE64 GUC_HXG_REQUEST_MSG_n_DATAn
>
> diff --git a/drivers/gpu/drm/xe/abi/guc_actions_slpc_abi.h b/drivers/gpu/drm/xe/abi/guc_actions_slpc_abi.h
> index 811add10c30d..c165e26c0976 100644
> --- a/drivers/gpu/drm/xe/abi/guc_actions_slpc_abi.h
> +++ b/drivers/gpu/drm/xe/abi/guc_actions_slpc_abi.h
> @@ -242,8 +242,8 @@ struct slpc_shared_data {
> (HOST2GUC_PC_SLPC_REQUEST_REQUEST_MSG_MIN_LEN + \
> HOST2GUC_PC_SLPC_EVENT_MAX_INPUT_ARGS)
> #define HOST2GUC_PC_SLPC_REQUEST_MSG_0_MBZ GUC_HXG_REQUEST_MSG_0_DATA0
> -#define HOST2GUC_PC_SLPC_REQUEST_MSG_1_EVENT_ID (0xff << 8)
> -#define HOST2GUC_PC_SLPC_REQUEST_MSG_1_EVENT_ARGC (0xff << 0)
> +#define HOST2GUC_PC_SLPC_REQUEST_MSG_1_EVENT_ID (0xffu << 8)
> +#define HOST2GUC_PC_SLPC_REQUEST_MSG_1_EVENT_ARGC (0xffu << 0)
> #define HOST2GUC_PC_SLPC_REQUEST_MSG_N_EVENT_DATA_N GUC_HXG_REQUEST_MSG_n_DATAn
>
> #endif
> diff --git a/drivers/gpu/drm/xe/abi/guc_communication_ctb_abi.h b/drivers/gpu/drm/xe/abi/guc_communication_ctb_abi.h
> index 4aaed1cb4e12..8f86a16dc577 100644
> --- a/drivers/gpu/drm/xe/abi/guc_communication_ctb_abi.h
> +++ b/drivers/gpu/drm/xe/abi/guc_communication_ctb_abi.h
> @@ -82,11 +82,11 @@ static_assert(sizeof(struct guc_ct_buffer_desc) == 64);
> #define GUC_CTB_HDR_LEN 1u
> #define GUC_CTB_MSG_MIN_LEN GUC_CTB_HDR_LEN
> #define GUC_CTB_MSG_MAX_LEN (GUC_CTB_MSG_MIN_LEN + GUC_CTB_MAX_DWORDS)
> -#define GUC_CTB_MSG_0_FENCE (0xffff << 16)
> -#define GUC_CTB_MSG_0_FORMAT (0xf << 12)
> +#define GUC_CTB_MSG_0_FENCE (0xffffu << 16)
> +#define GUC_CTB_MSG_0_FORMAT (0xfu << 12)
> #define GUC_CTB_FORMAT_HXG 0u
> -#define GUC_CTB_MSG_0_RESERVED (0xf << 8)
> -#define GUC_CTB_MSG_0_NUM_DWORDS (0xff << 0)
> +#define GUC_CTB_MSG_0_RESERVED (0xfu << 8)
> +#define GUC_CTB_MSG_0_NUM_DWORDS (0xffu << 0)
> #define GUC_CTB_MAX_DWORDS 255
>
> /**
> diff --git a/drivers/gpu/drm/xe/abi/guc_klvs_abi.h b/drivers/gpu/drm/xe/abi/guc_klvs_abi.h
> index 47094b9b044c..0400bc0fccdc 100644
> --- a/drivers/gpu/drm/xe/abi/guc_klvs_abi.h
> +++ b/drivers/gpu/drm/xe/abi/guc_klvs_abi.h
> @@ -31,9 +31,9 @@
> */
>
> #define GUC_KLV_LEN_MIN 1u
> -#define GUC_KLV_0_KEY (0xffff << 16)
> -#define GUC_KLV_0_LEN (0xffff << 0)
> -#define GUC_KLV_n_VALUE (0xffffffff << 0)
> +#define GUC_KLV_0_KEY (0xffffu << 16)
> +#define GUC_KLV_0_LEN (0xffffu << 0)
> +#define GUC_KLV_n_VALUE (0xffffffffu << 0)
>
> /**
> * DOC: GuC Self Config KLVs
> diff --git a/drivers/gpu/drm/xe/abi/guc_messages_abi.h b/drivers/gpu/drm/xe/abi/guc_messages_abi.h
> index ff888d16bd4f..534a39db7772 100644
> --- a/drivers/gpu/drm/xe/abi/guc_messages_abi.h
> +++ b/drivers/gpu/drm/xe/abi/guc_messages_abi.h
> @@ -41,10 +41,10 @@
> */
>
> #define GUC_HXG_MSG_MIN_LEN 1u
> -#define GUC_HXG_MSG_0_ORIGIN (0x1 << 31)
> +#define GUC_HXG_MSG_0_ORIGIN (0x1u << 31)
> #define GUC_HXG_ORIGIN_HOST 0u
> #define GUC_HXG_ORIGIN_GUC 1u
> -#define GUC_HXG_MSG_0_TYPE (0x7 << 28)
> +#define GUC_HXG_MSG_0_TYPE (0x7u << 28)
> #define GUC_HXG_TYPE_REQUEST 0u
> #define GUC_HXG_TYPE_EVENT 1u
> #define GUC_HXG_TYPE_FAST_REQUEST 2u
> @@ -52,8 +52,8 @@
> #define GUC_HXG_TYPE_NO_RESPONSE_RETRY 5u
> #define GUC_HXG_TYPE_RESPONSE_FAILURE 6u
> #define GUC_HXG_TYPE_RESPONSE_SUCCESS 7u
> -#define GUC_HXG_MSG_0_AUX (0xfffffff << 0)
> -#define GUC_HXG_MSG_n_PAYLOAD (0xffffffff << 0)
> +#define GUC_HXG_MSG_0_AUX (0xfffffffu << 0)
> +#define GUC_HXG_MSG_n_PAYLOAD (0xffffffffu << 0)
>
> /**
> * DOC: HXG Request
> @@ -87,8 +87,8 @@
> */
>
> #define GUC_HXG_REQUEST_MSG_MIN_LEN GUC_HXG_MSG_MIN_LEN
> -#define GUC_HXG_REQUEST_MSG_0_DATA0 (0xfff << 16)
> -#define GUC_HXG_REQUEST_MSG_0_ACTION (0xffff << 0)
> +#define GUC_HXG_REQUEST_MSG_0_DATA0 (0xfffu << 16)
> +#define GUC_HXG_REQUEST_MSG_0_ACTION (0xffffu << 0)
> #define GUC_HXG_REQUEST_MSG_n_DATAn GUC_HXG_MSG_n_PAYLOAD
>
> /**
> @@ -119,8 +119,8 @@
> */
>
> #define GUC_HXG_EVENT_MSG_MIN_LEN GUC_HXG_MSG_MIN_LEN
> -#define GUC_HXG_EVENT_MSG_0_DATA0 (0xfff << 16)
> -#define GUC_HXG_EVENT_MSG_0_ACTION (0xffff << 0)
> +#define GUC_HXG_EVENT_MSG_0_DATA0 (0xfffu << 16)
> +#define GUC_HXG_EVENT_MSG_0_ACTION (0xffffu << 0)
> #define GUC_HXG_EVENT_MSG_n_DATAn GUC_HXG_MSG_n_PAYLOAD
>
> /**
> @@ -190,8 +190,8 @@
> */
>
> #define GUC_HXG_FAILURE_MSG_LEN GUC_HXG_MSG_MIN_LEN
> -#define GUC_HXG_FAILURE_MSG_0_HINT (0xfff << 16)
> -#define GUC_HXG_FAILURE_MSG_0_ERROR (0xffff << 0)
> +#define GUC_HXG_FAILURE_MSG_0_HINT (0xfffu << 16)
> +#define GUC_HXG_FAILURE_MSG_0_ERROR (0xffffu << 0)
>
> /**
> * DOC: HXG Response
next prev parent reply other threads:[~2024-01-31 13:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 2:54 [PATCH] drm/xe: Make all ABI shift values unsigned Matthew Brost
2024-01-31 5:04 ` ✓ CI.Patch_applied: success for " Patchwork
2024-01-31 5:05 ` ✗ CI.checkpatch: warning " Patchwork
2024-01-31 5:06 ` ✓ CI.KUnit: success " Patchwork
2024-01-31 5:13 ` ✓ CI.Build: " Patchwork
2024-01-31 5:13 ` ✓ CI.Hooks: " Patchwork
2024-01-31 5:14 ` ✓ CI.checksparse: " Patchwork
2024-01-31 5:59 ` ✓ CI.BAT: " Patchwork
2024-01-31 13:12 ` Thomas Hellström [this message]
2024-01-31 13:36 ` [PATCH] " Lucas De Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=85ff43a8-022d-41ea-9a38-5806c0cebb17@linux.intel.com \
--to=thomas.hellstrom@linux.intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=matthew.brost@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox