summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/regs/xe_reg_defs.h
diff options
context:
space:
mode:
authorMichal Wajdeczko <michal.wajdeczko@intel.com>2024-03-14 18:31:25 +0100
committerMichał Winiarski <michal.winiarski@intel.com>2024-03-15 22:20:14 +0100
commit0322fa12f4513eca159f6f605282ccf5f4f2bbc3 (patch)
treea3e0af3e8dac97b64f2c538ff1b77bc9de7fa4ad /drivers/gpu/drm/xe/regs/xe_reg_defs.h
parentbde5d76785bcf62afcfd873504599539d4e6c014 (diff)
downloadlwn-0322fa12f4513eca159f6f605282ccf5f4f2bbc3.tar.gz
lwn-0322fa12f4513eca159f6f605282ccf5f4f2bbc3.zip
drm/xe: Assert size of the struct xe_reg
We want to keep the struct xe_reg as small as possible. Make sure we don't accidentally change its size. Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240314173130.1177-2-michal.wajdeczko@intel.com Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/regs/xe_reg_defs.h')
-rw-r--r--drivers/gpu/drm/xe/regs/xe_reg_defs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/regs/xe_reg_defs.h b/drivers/gpu/drm/xe/regs/xe_reg_defs.h
index c50e7650c09a..114b07db962f 100644
--- a/drivers/gpu/drm/xe/regs/xe_reg_defs.h
+++ b/drivers/gpu/drm/xe/regs/xe_reg_defs.h
@@ -6,6 +6,8 @@
#ifndef _XE_REG_DEFS_H_
#define _XE_REG_DEFS_H_
+#include <linux/build_bug.h>
+
#include "compat-i915-headers/i915_reg_defs.h"
/**
@@ -44,6 +46,7 @@ struct xe_reg {
u32 raw;
};
};
+static_assert(sizeof(struct xe_reg) == sizeof(u32));
/**
* struct xe_reg_mcr - MCR register definition