From: Daniel Vetter <daniel@ffwll.ch>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
Daniel Vetter <daniel.vetter@intel.com>,
Benjamin Gaignard <benjamin.gaignard@linaro.org>,
Jani Nikula <jani.nikula@linux.intel.com>,
Sean Paul <seanpaul@chromium.org>,
David Airlie <airlied@linux.ie>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] drm: fix drm_vm for NOMMU builds
Date: Wed, 11 Jan 2017 17:27:13 +0100 [thread overview]
Message-ID: <20170111162713.veyyu56sbjaym3fe@phenom.ffwll.local> (raw)
In-Reply-To: <20170111133357.3664191-1-arnd@arndb.de>
On Wed, Jan 11, 2017 at 02:33:34PM +0100, Arnd Bergmann wrote:
> When building DRM without an MMU, we run into a compile-time error because
> pte_wrprotect() is not defined:
>
> drivers/gpu/drm/drm_vm.c: In function 'drm_mmap_dma':
> drivers/gpu/drm/drm_vm.c:496:9: error: implicit declaration of function 'pte_wrprotect' [-Werror=implicit-function-declaration]
>
> The line is not meaningful here, so we can simply add another
> compile-time check around it.
>
> Fixes: 62a0d98a188c ("drm: allow to use mmuless SoC")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
We don't need drm_vm.c on modern drivers, and the idea was to simply not
compile it when not needed. See:
commit 99c48e1e38f0aeaa107ad67c8d91f6c9d9d567a9
Author: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Date: Wed Jan 4 10:12:56 2017 +0100
drm: compile drm_vm.c only when needed
How did you manage to enable this stuff?
-Daniel
> ---
> drivers/gpu/drm/drm_vm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c
> index bd311c77c254..038946588ed7 100644
> --- a/drivers/gpu/drm/drm_vm.c
> +++ b/drivers/gpu/drm/drm_vm.c
> @@ -488,7 +488,7 @@ static int drm_mmap_dma(struct file *filp, struct vm_area_struct *vma)
> vma->vm_flags &= ~(VM_WRITE | VM_MAYWRITE);
> #if defined(__i386__) || defined(__x86_64__)
> pgprot_val(vma->vm_page_prot) &= ~_PAGE_RW;
> -#else
> +#elif IS_ENABLED(CONFIG_MMU)
> /* Ye gads this is ugly. With more thought
> we could move this up higher and use
> `protection_map' instead. */
> @@ -572,7 +572,7 @@ static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma)
> vma->vm_flags &= ~(VM_WRITE | VM_MAYWRITE);
> #if defined(__i386__) || defined(__x86_64__)
> pgprot_val(vma->vm_page_prot) &= ~_PAGE_RW;
> -#else
> +#elif defined (CONFIG_MMU)
> /* Ye gads this is ugly. With more thought
> we could move this up higher and use
> `protection_map' instead. */
> --
> 2.9.0
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2017-01-11 16:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-11 13:33 Arnd Bergmann
2017-01-11 13:33 ` [PATCH 2/2] drm: add more MMU dependencies Arnd Bergmann
2017-01-11 14:02 ` Lucas Stach
2017-01-11 16:25 ` Daniel Vetter
2017-01-11 16:27 ` Daniel Vetter [this message]
2017-01-11 16:33 ` [PATCH 1/2] drm: fix drm_vm for NOMMU builds Arnd Bergmann
2017-01-11 16:36 ` Daniel Vetter
2017-01-11 16:59 ` Arnd Bergmann
2017-01-11 17:03 ` Benjamin Gaignard
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=20170111162713.veyyu56sbjaym3fe@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@linux.ie \
--cc=arnd@arndb.de \
--cc=benjamin.gaignard@linaro.org \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=seanpaul@chromium.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®