Message ID | 1499698135-24526-1-git-send-email-benjamin.gaignard@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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 >
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
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
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(-)