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: 9836053 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 C158D60363 for ; Wed, 12 Jul 2017 07:44:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B472E27FE4 for ; Wed, 12 Jul 2017 07:44:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A9217285A3; Wed, 12 Jul 2017 07:44:10 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4013E27FE4 for ; Wed, 12 Jul 2017 07:44:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CBE186E0AF; Wed, 12 Jul 2017 07:44:08 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr0-x234.google.com (mail-wr0-x234.google.com [IPv6:2a00:1450:400c:c0c::234]) by gabe.freedesktop.org (Postfix) with ESMTPS id D3DEE6E0AF for ; Wed, 12 Jul 2017 07:44:06 +0000 (UTC) Received: by mail-wr0-x234.google.com with SMTP id r103so21762564wrb.0 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=ixmb6F0Ua5vttSFln7lVYgImQS9pvG6uhBvOeBscbaARNk0D3o70Tk3tZY6UZogfj0 A2FzfyxmhZGYvShrO1IzDOQELBjgp0q0A7i35zqnFtBsd8asibBmRisQ+sda8jEWeyZ3 6t3yls17czAkOVFTlv/fPI/pjyUYhSm1x3H4vTzvV17LChq3mmFXfuhMvUrrrxIr3SAw Kl0XJNADcLb+uwzyAxkcL5vWH9gYqub/rmQIbVO9Z+ajS4EdS6kxBPP2hIT+c4+8zq6Q zjjCMHfRPrU2kPlMLZ+/QkPt9goytY6s0ZqYmXognbP1qyOb61vpOITHuOaMwGtTc7dX mzwA== X-Gm-Message-State: AIVw113+ir79lxIcmNb0aQ0LvlNO7eu8ByMtQaZIfPR5lgS7jUXiZ+wr LgfqSnQczU5nsR5Y 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 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 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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