From: Michel Thierry <michel.thierry@intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>,
kbuild test robot <fengguang.wu@intel.com>
Cc: Akash Goel <akash.goel@intel.com>,
Ben Widawsky <ben@bwidawsk.net>,
intel-gfx <intel-gfx@lists.freedesktop.org>,
kbuild-all@01.org
Subject: Re: [drm-intel:for-linux-next 479/497] drivers/gpu/drm/i915/i915_gem_gtt.c:1086:26: sparse: Using plain integer as NULL pointer
Date: Fri, 7 Aug 2015 10:21:34 +0100 [thread overview]
Message-ID: <55C4789E.3080906@intel.com> (raw)
In-Reply-To: <CAKMK7uHcLFcX4VKVfLTf722HhD13meoYfsOgKcvq4jg=ef=Vdg@mail.gmail.com>
On 8/6/2015 11:00 PM, Daniel Vetter wrote:
> On Thu, Aug 6, 2015 at 10:17 PM, kbuild test robot
> <fengguang.wu@intel.com> wrote:
>> 1070 if (IS_ENABLED(CONFIG_X86_32))
>> 1071 /* While we have a proliferation of size_t variables
>> 1072 * we cannot represent the full ppgtt size on 32bit,
>> 1073 * so limit it to the same size as the GGTT (currently
>> 1074 * 2GiB).
>> 1075 */
>> 1076 ppgtt->base.total = to_i915(ppgtt->base.dev)->gtt.base.total;
>> 1077 ppgtt->base.cleanup = gen8_ppgtt_cleanup;
>> 1078 ppgtt->base.allocate_va_range = gen8_alloc_va_range;
>> 1079 ppgtt->base.insert_entries = gen8_ppgtt_insert_entries;
>> 1080 ppgtt->base.clear_range = gen8_ppgtt_clear_range;
>> 1081 ppgtt->base.unbind_vma = ppgtt_unbind_vma;
>> 1082 ppgtt->base.bind_vma = ppgtt_bind_vma;
>> 1083
>> 1084 ppgtt->switch_mm = gen8_mm_switch;
>> 1085
>>> 1086 ret = __pdp_init(false, &ppgtt->pdp);
>
> So the first argument of pdp_init ist struct drm_device *dev and yes
> the first thing it does is deref it.
>
*dev is used only for I915_PDPES_PER_PDP/USES_FULL_48BIT_PPGTT, which in
this path is always false. I didn't expect kbuild to complain. I'll
change it with the other modifications I'm about to send.
> How exactly was this tested again?
>
> Oh and the hunk right below with the CONFIG_X86_32 needs to got too -
> if we're 48b safe then we should be 32b safe too ;-)
Yes, after the offset change it'll be completely safe. I left it in this
patch as that was only moving code around.
I'll include a proper "revert-me" patch, saying why it is safe now.
-Michel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-08-07 9:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-06 20:17 [drm-intel:for-linux-next 479/497] drivers/gpu/drm/i915/i915_gem_gtt.c:1086:26: sparse: Using plain integer as NULL pointer kbuild test robot
2015-08-06 22:00 ` Daniel Vetter
2015-08-07 9:21 ` Michel Thierry [this message]
2015-08-07 10:21 ` Chris Wilson
2015-08-07 11:40 ` Daniel Vetter
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=55C4789E.3080906@intel.com \
--to=michel.thierry@intel.com \
--cc=akash.goel@intel.com \
--cc=ben@bwidawsk.net \
--cc=daniel.vetter@ffwll.ch \
--cc=fengguang.wu@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=kbuild-all@01.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.