From: Jani Nikula <jani.nikula@intel.com>
To: David Binderman <linuxdev.baldrick@gmail.com>,
daniel.vetter@intel.com, jani.nikula@linux.intel.com,
airlied@linux.ie, intel-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, dcb314@hotmail.com
Cc: Jani Nikula <jani.nikula@intel.com>
Subject: [PATCH] drm/i915: fix BSM_MASK definition
Date: Mon, 30 May 2016 15:54:10 +0300 [thread overview]
Message-ID: <1464612850-21748-1-git-send-email-jani.nikula@intel.com> (raw)
In-Reply-To: <CAMzoambf23FJH3Lq-gKcrVEus-bqFLxA35n0YjKGhqWOAJdBqg@mail.gmail.com>
The PCI config space BSM (Base of Stolen Memory) register has bits
20..31 set. The BSM_MASK definition goes beyond 32 bits, fix it.
drivers/gpu/drm/i915/i915_reg.h:90:28: warning: result of ‘65535 << 20’
requires 37 bits to represent, but ‘int’ only has 32 bits
[-Wshift-overflow=]
References: http://mid.gmane.org/CAMzoambf23FJH3Lq-gKcrVEus-bqFLxA35n0YjKGhqWOAJdBqg@mail.gmail.com
Reported-by: David Binderman <linuxdev.baldrick@gmail.com>
Cc: David Binderman <linuxdev.baldrick@gmail.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Fixes: e10fa551ae37 ("drm/i915: Clean up PCI config register handling")
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/i915_reg.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index b407411e31ba..769ac8f7ab61 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -87,7 +87,7 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)
#define DEVEN_MCHBAR_EN (1 << 28)
#define BSM 0x5c
-#define BSM_MASK (0xFFFF << 20)
+#define BSM_MASK (0xFFF << 20)
#define HPLLCC 0xc0 /* 85x only */
#define GC_CLOCK_CONTROL_MASK (0x7 << 0)
--
2.1.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-05-30 12:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-30 10:32 drivers/gpu/drm/i915/i915_reg.h:90:shift-overflow problem ? David Binderman
2016-05-30 12:54 ` Jani Nikula [this message]
2016-05-30 14:15 ` Chris Wilson
2016-05-30 14:51 ` Jani Nikula
2016-05-31 9:56 ` ✗ Ro.CI.BAT: failure for drm/i915: fix BSM_MASK definition Patchwork
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=1464612850-21748-1-git-send-email-jani.nikula@intel.com \
--to=jani.nikula@intel.com \
--cc=airlied@linux.ie \
--cc=daniel.vetter@intel.com \
--cc=dcb314@hotmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=linuxdev.baldrick@gmail.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