From patchwork Wed Jul 12 07:43:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 9836051 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E31EB60363 for ; Wed, 12 Jul 2017 07:44:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D678A27FE4 for ; Wed, 12 Jul 2017 07:44:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CAE70285A3; Wed, 12 Jul 2017 07:44:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A96727FE4 for ; Wed, 12 Jul 2017 07:44:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756812AbdGLHoH (ORCPT ); Wed, 12 Jul 2017 03:44:07 -0400 Received: from mail-wr0-f181.google.com ([209.85.128.181]:36780 "EHLO mail-wr0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756783AbdGLHoG (ORCPT ); Wed, 12 Jul 2017 03:44:06 -0400 Received: by mail-wr0-f181.google.com with SMTP id c11so21632473wrc.3 for ; Wed, 12 Jul 2017 00:44:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=u+rzPaJfbyXXghfUFsJZjNAWTawxdfpaP3lJ0ROME98=; b=IemeuZ7MggNJTVIXlBPUuQKxvlnih60Fh05i1ut4ICEBK0Xga+wkuEPWoVeR8sbt4F 6WjacIcw0uW1DjZtJRebCdo/wDfQvKdonjnff7CtTYfIvY870JIG5HsMcNclDd4xId6Y JDlMt/F72vbKPMY/ktQTpr/dBAxxkzxEX93nk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=u+rzPaJfbyXXghfUFsJZjNAWTawxdfpaP3lJ0ROME98=; b=I6veaTtQZPNfdfbitDiPMXCVzQTefYE1khjmF86tOhSUfz4SOFBvIPjLxhnSsBVhoZ NyBiAplZw8jQvvxGYTPHWOjQ1RI735nniHWbzh3MOYQC9+0bFTWnfA36jKMQjpHy9tw2 Sjs45TKTVysFRCbrG3o1S2ITYG0d1OZGYR/ISHuJzmnHF+1B0URUfeyZUmVGYxhRm3oN xLjBmCaSgYFTkWvJPt2LVzj7xDKhlUoN0zWvrgeYmHHBWRmCl6/Kf6mftpTyDDHxfVyN TcmeR9tPIutfYIa3JGxsOfjPcOjY5Y7DW/lMhxHnrRMIF8UBDqRpnFX07cJr+VIbhmjz vnyA== X-Gm-Message-State: AIVw110JYddkGXaIIEbfpxHJFCYK6wxhPACcIFyfqXgqJEUaxR2SRJIx UfKCMew8tHQM8fAz8KMHsQ== X-Received: by 10.223.175.37 with SMTP id z34mr1934909wrc.11.1499845445491; Wed, 12 Jul 2017 00:44:05 -0700 (PDT) Received: from lmenx321.st.com. ([80.214.75.225]) by smtp.gmail.com with ESMTPSA id x21sm1564980wme.24.2017.07.12.00.44.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 12 Jul 2017 00:44:04 -0700 (PDT) From: Benjamin Gaignard To: b.zolnierkie@samsung.com, daniel.vetter@ffwll.ch, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, noralf@tronnes.org, dri-devel@lists.freedesktop.org, emil.l.velikov@gmail.com, yannick.fertre@st.com, eric.engestrom@imgtec.com Cc: Benjamin Gaignard Subject: [PATCH v2] fbdev: make get_fb_unmapped_area depends of !MMU Date: Wed, 12 Jul 2017 09:43:07 +0200 Message-Id: <1499845387-10394-1-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Daniel Vetter --- version 2: - remove duplicated "\" 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..f20c5d2 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