All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jiri Slaby <jslaby@suse.cz>,
	virtualization@lists.linux-foundation.org,
	Linux kernel mailing list <linux-kernel@vger.kernel.org>,
	David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org
Subject: Re: virtio gpu sparse warning
Date: Mon, 28 Nov 2016 08:50:44 +0100	[thread overview]
Message-ID: <1480319444.20061.4.camel@redhat.com> (raw)
In-Reply-To: <20161124045101-mutt-send-email-mst@kernel.org>

On Do, 2016-11-24 at 04:57 +0200, Michael S. Tsirkin wrote:
> sparse produces these warnings:
> 
> drivers/gpu/drm/virtio/virtgpu_fb.c:340:27: warning: incorrect type in
> assignment (different address spaces)
> drivers/gpu/drm/virtio/virtgpu_fb.c:340:27:    expected char [noderef]
> <asn:2>*screen_base
> drivers/gpu/drm/virtio/virtgpu_fb.c:340:27:    got void *vmap
> 
> This is because the expected type is void __iomem *, while
> virtio gpu object is void *vmap.
> 
> We could just cast the warning away but I'm not sure this
> is not a symptom of an actual problem. For example, might
> some code call iounmap on this address?

Nobody is ever going to unmap that, the kernel will simply use given
address to access the framebuffer.

Actually it looks like this (in include/linux/fb.h):

        union {
                char __iomem *screen_base;      /* Virtual address */
                char *screen_buffer;
        };

and given that the virtio always uses normal ram as backing storage for
the framebuffer we should simply s/screen_base/screen_buffer/.  I'll go
prepare a patch.

cheers,
  Gerd

WARNING: multiple messages have this Message-ID (diff)
From: Gerd Hoffmann <kraxel@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jiri Slaby <jslaby@suse.cz>,
	Linux kernel mailing list <linux-kernel@vger.kernel.org>,
	dri-devel@lists.freedesktop.org,
	virtualization@lists.linux-foundation.org
Subject: Re: virtio gpu sparse warning
Date: Mon, 28 Nov 2016 08:50:44 +0100	[thread overview]
Message-ID: <1480319444.20061.4.camel@redhat.com> (raw)
In-Reply-To: <20161124045101-mutt-send-email-mst@kernel.org>

On Do, 2016-11-24 at 04:57 +0200, Michael S. Tsirkin wrote:
> sparse produces these warnings:
> 
> drivers/gpu/drm/virtio/virtgpu_fb.c:340:27: warning: incorrect type in
> assignment (different address spaces)
> drivers/gpu/drm/virtio/virtgpu_fb.c:340:27:    expected char [noderef]
> <asn:2>*screen_base
> drivers/gpu/drm/virtio/virtgpu_fb.c:340:27:    got void *vmap
> 
> This is because the expected type is void __iomem *, while
> virtio gpu object is void *vmap.
> 
> We could just cast the warning away but I'm not sure this
> is not a symptom of an actual problem. For example, might
> some code call iounmap on this address?

Nobody is ever going to unmap that, the kernel will simply use given
address to access the framebuffer.

Actually it looks like this (in include/linux/fb.h):

        union {
                char __iomem *screen_base;      /* Virtual address */
                char *screen_buffer;
        };

and given that the virtio always uses normal ram as backing storage for
the framebuffer we should simply s/screen_base/screen_buffer/.  I'll go
prepare a patch.

cheers,
  Gerd

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2016-11-28  7:50 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-07  8:43 BUG: 'list_empty(&vgdev->free_vbufs)' is true! Jiri Slaby
2016-11-08 20:37 ` Michael S. Tsirkin
2016-11-08 20:37   ` Michael S. Tsirkin
2016-11-09  8:01   ` Gerd Hoffmann
2016-11-09  8:01     ` Gerd Hoffmann
2016-11-11 16:28     ` Jiri Slaby
2016-11-11 16:28     ` Jiri Slaby
2016-11-15  8:46       ` Gerd Hoffmann
2016-11-15  8:46       ` Gerd Hoffmann
2016-11-15  8:46         ` Gerd Hoffmann
2016-11-15  8:55         ` Jiri Slaby
2016-11-15  8:55         ` Jiri Slaby
2016-11-15  8:55           ` Jiri Slaby
2016-11-15  9:05           ` Gerd Hoffmann
2016-11-15  9:05           ` Gerd Hoffmann
2016-11-16 13:12       ` Gerd Hoffmann
2016-11-16 13:12         ` Gerd Hoffmann
2016-11-24  2:57         ` virtio gpu sparse warning Michael S. Tsirkin
2016-11-24  2:57           ` Michael S. Tsirkin
2016-11-28  7:50           ` Gerd Hoffmann
2016-11-28  7:50           ` Gerd Hoffmann [this message]
2016-11-28  7:50             ` Gerd Hoffmann
2016-12-15 13:01         ` BUG: 'list_empty(&vgdev->free_vbufs)' is true! Jiri Slaby
2016-12-15 13:01           ` Jiri Slaby
2016-11-11 14:35   ` Jiri Slaby
2016-11-11 14:35   ` Jiri Slaby
2016-11-08 20:37 ` Michael S. Tsirkin

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=1480319444.20061.4.camel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux-foundation.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.