From patchwork Mon Jul 10 14:48:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 9833155 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 153A160350 for ; Mon, 10 Jul 2017 14:49:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06376284E4 for ; Mon, 10 Jul 2017 14:49:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED8E6284FC; Mon, 10 Jul 2017 14:49:14 +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 9B673284E4 for ; Mon, 10 Jul 2017 14:49:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D9C8F6E153; Mon, 10 Jul 2017 14:49:13 +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 7D9196E153 for ; Mon, 10 Jul 2017 14:49:11 +0000 (UTC) Received: by mail-wr0-x234.google.com with SMTP id k67so141450122wrc.2 for ; Mon, 10 Jul 2017 07:49:11 -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=HyVluSqHaJCl9iDPE9zGQDTgPrYCoJDSzyuUa65JcMM=; b=ZgXpMF4I46wQwQeEQaTWAqtGECDADrb+RL1FG+A8rG56VADsqLoDKz3npukunTzQGb UVEaWN6m75YhvXAH8gyXl2Hyg9qf3fiD0CDoOhWwFWrT+hEuyy3RQwvobGekvBI+xrya lKSKzJgHK7a0OnovErnJIs21TBL9bupJq+GLQ= 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=HyVluSqHaJCl9iDPE9zGQDTgPrYCoJDSzyuUa65JcMM=; b=p8MFVZqNv9J4WnmfOrLcz4OQAGroBgV1j0hHnd6s2M5RafWwyuOBMXtaZBoF+5nAE3 OgyJl+1yGjkwHBT1A418DiCirscn0y24HwDZrL/z9bdElDkIY1BqVgPXRlGT174/0KfS 3dE5TMBhXipScLm8exCOGIybtKR7PBEaOPJfhLW8pX3K8jeHXSzzznRuHZd94e/3r2pl /osDTnzt8yt3dElUzmb+0Rp6Us7ZjUY60HD0kheM+DCKvAd1YSG7+M/BUrTv/ddE5yeT VXKetelpUQ1aBCd6l64fGnKMXXtBlPUy+5WlnDAZUdupVhzXu3T6s8EbtX7/+KA+wt1f Tj2g== X-Gm-Message-State: AIVw113FJhJ7PyLetkqyz5wZutStepKXlfMpJaKNfGZGJ0rHRN7PNBrX wYkRg8lN1F+bg/xk X-Received: by 10.223.171.146 with SMTP id s18mr8583207wrc.38.1499698149876; Mon, 10 Jul 2017 07:49:09 -0700 (PDT) Received: from lmenx321.st.com. ([80.215.173.155]) by smtp.gmail.com with ESMTPSA id i136sm7924813wmf.33.2017.07.10.07.49.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Jul 2017 07:49:09 -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 Subject: [PATCH] fbdev: make get_fb_unmapped_area depends of !MMU Date: Mon, 10 Jul 2017 16:48:55 +0200 Message-Id: <1499698135-24526-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 --- 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