* [PATCH] fbdev: make get_fb_unmapped_area depends of !MMU
@ 2017-07-10 14:48 Benjamin Gaignard
2017-07-10 16:31 ` Eric Engestrom
2017-07-12 0:10 ` kbuild test robot
0 siblings, 2 replies; 3+ messages in thread
From: Benjamin Gaignard @ 2017-07-10 14:48 UTC (permalink / raw)
To: b.zolnierkie, daniel.vetter, linux-fbdev, linux-kernel, noralf,
dri-devel, emil.l.velikov, yannick.fertre
Cc: Benjamin Gaignard
Even if CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA flag is selected
do not compile and use get_fb_unmapped_area() if CONFIG_MMU is
also set. This will avoid mmap errors when compiling multi
architectures at same time.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
---
drivers/video/fbdev/core/fbmem.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
index 069fe79..16b5aef 100644
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -1492,7 +1492,7 @@ static long fb_compat_ioctl(struct file *file, unsigned int cmd,
return 0;
}
-#ifdef CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA
+#if defined(CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA) && !defined(CONFIG_MMU)
unsigned long get_fb_unmapped_area(struct file *filp,
unsigned long addr, unsigned long len,
unsigned long pgoff, unsigned long flags)
@@ -1519,7 +1519,8 @@ unsigned long get_fb_unmapped_area(struct file *filp,
.open = fb_open,
.release = fb_release,
#if defined(HAVE_ARCH_FB_UNMAPPED_AREA) || \
- defined(CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA)
+ (defined(CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA) && \\
+ !defined(CONFIG_MMU))
.get_unmapped_area = get_fb_unmapped_area,
#endif
#ifdef CONFIG_FB_DEFERRED_IO
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] fbdev: make get_fb_unmapped_area depends of !MMU
2017-07-10 14:48 [PATCH] fbdev: make get_fb_unmapped_area depends of !MMU Benjamin Gaignard
@ 2017-07-10 16:31 ` Eric Engestrom
2017-07-12 0:10 ` kbuild test robot
1 sibling, 0 replies; 3+ messages in thread
From: Eric Engestrom @ 2017-07-10 16:31 UTC (permalink / raw)
To: Benjamin Gaignard
Cc: b.zolnierkie, daniel.vetter, linux-fbdev, linux-kernel, noralf,
dri-devel, emil.l.velikov, yannick.fertre
On Monday, 2017-07-10 16:48:55 +0200, Benjamin Gaignard wrote:
> Even if CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA flag is selected
> do not compile and use get_fb_unmapped_area() if CONFIG_MMU is
> also set. This will avoid mmap errors when compiling multi
> architectures at same time.
>
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> ---
> drivers/video/fbdev/core/fbmem.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
> index 069fe79..16b5aef 100644
> --- a/drivers/video/fbdev/core/fbmem.c
> +++ b/drivers/video/fbdev/core/fbmem.c
> @@ -1492,7 +1492,7 @@ static long fb_compat_ioctl(struct file *file, unsigned int cmd,
> return 0;
> }
>
> -#ifdef CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA
> +#if defined(CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA) && !defined(CONFIG_MMU)
> unsigned long get_fb_unmapped_area(struct file *filp,
> unsigned long addr, unsigned long len,
> unsigned long pgoff, unsigned long flags)
> @@ -1519,7 +1519,8 @@ unsigned long get_fb_unmapped_area(struct file *filp,
> .open = fb_open,
> .release = fb_release,
> #if defined(HAVE_ARCH_FB_UNMAPPED_AREA) || \
> - defined(CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA)
> + (defined(CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA) && \\
^^
Double backslash
> + !defined(CONFIG_MMU))
> .get_unmapped_area = get_fb_unmapped_area,
> #endif
> #ifdef CONFIG_FB_DEFERRED_IO
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fbdev: make get_fb_unmapped_area depends of !MMU
2017-07-10 14:48 [PATCH] fbdev: make get_fb_unmapped_area depends of !MMU Benjamin Gaignard
2017-07-10 16:31 ` Eric Engestrom
@ 2017-07-12 0:10 ` kbuild test robot
1 sibling, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2017-07-12 0:10 UTC (permalink / raw)
To: Benjamin Gaignard
Cc: kbuild-all, b.zolnierkie, daniel.vetter, linux-fbdev,
linux-kernel, noralf, dri-devel, emil.l.velikov, yannick.fertre
[-- Attachment #1: Type: text/plain, Size: 1460 bytes --]
Hi Benjamin,
[auto build test ERROR on linus/master]
[also build test ERROR on v4.12 next-20170711]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Benjamin-Gaignard/fbdev-make-get_fb_unmapped_area-depends-of-MMU/20170711-034314
config: x86_64-rhel (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
vim +1513 drivers/video/fbdev/core/fbmem.c
1500
1501 static const struct file_operations fb_fops = {
1502 .owner = THIS_MODULE,
1503 .read = fb_read,
1504 .write = fb_write,
1505 .unlocked_ioctl = fb_ioctl,
1506 #ifdef CONFIG_COMPAT
1507 .compat_ioctl = fb_compat_ioctl,
1508 #endif
1509 .mmap = fb_mmap,
1510 .open = fb_open,
1511 .release = fb_release,
1512 #if defined(HAVE_ARCH_FB_UNMAPPED_AREA) || \
> 1513 (defined(CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA) && \\
1514 !defined(CONFIG_MMU))
1515 .get_unmapped_area = get_fb_unmapped_area,
1516 #endif
1517 #ifdef CONFIG_FB_DEFERRED_IO
1518 .fsync = fb_deferred_io_fsync,
1519 #endif
1520 .llseek = default_llseek,
1521 };
1522
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 38670 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-12 0:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-10 14:48 [PATCH] fbdev: make get_fb_unmapped_area depends of !MMU Benjamin Gaignard
2017-07-10 16:31 ` Eric Engestrom
2017-07-12 0:10 ` kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).