From patchwork Sun Oct 10 17:29:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 12548681 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C952FC433FE for ; Sun, 10 Oct 2021 17:30:04 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6A56161105 for ; Sun, 10 Oct 2021 17:30:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6A56161105 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CB4ED6E33F; Sun, 10 Oct 2021 17:30:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by gabe.freedesktop.org (Postfix) with ESMTPS id 684A56E33F for ; Sun, 10 Oct 2021 17:30:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-ID:Content-Description:In-Reply-To:References; bh=ElKmRgunDXAFgaLsva8h4MdS8Z4mUm9nwnKPIHOnh9k=; b=kMhFnATrV0InsEL8jwYwbHxcUL 1jHkqRYsYAnhubVi4Vz7gOm+mq7tHf/cMM6DQcrTCG5w80V3tCgxkXSb+FlJl5kRGWQTK5LcmnVlG 3nyoajIPQwuOe90AwtUydgSSGhJqlw/P/JL9g+UAd4ejQaMWZ8T0mqINKRGWFGkByYOvrMp1J7Fhz 4zoWM1PqKVus0NsxQcmK9tlUpZJu/rar1nno5cGIJh8HozeN6IMgzUQNcmv2Qb0pmj+tnmrnuplA4 JbEhjQ0EIIJE7P3HjmWG6D5cPVQGBlCO9swnZO+hxHD+1u2TAxJJ+LkbhofoFA6OCdZcNpEgOgZij dRCqLdiw==; Received: from [2601:1c0:6280:3f0::aa0b] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mZce4-007CI6-5H; Sun, 10 Oct 2021 17:29:56 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, Jeff Dike , Richard Weinberger , Anton Ivanov , linux-um@lists.infradead.org Subject: [PATCH v2] drm/r128: fix build for UML Date: Sun, 10 Oct 2021 10:29:55 -0700 Message-Id: <20211010172955.30088-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Fix a build error on CONFIG_UML, which does not support (provide) wbinvd(). UML can use the generic mb() instead. ../drivers/gpu/drm/r128/ati_pcigart.c: In function ‘drm_ati_pcigart_init’: ../drivers/gpu/drm/r128/ati_pcigart.c:218:2: error: implicit declaration of function ‘wbinvd’ [-Werror=implicit-function-declaration] wbinvd(); ^~~~~~ Fixes: 68f5d3f3b654 ("um: add PCI over virtio emulation driver") Signed-off-by: Randy Dunlap Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: Jeff Dike Cc: Richard Weinberger Cc: Anton Ivanov Cc: linux-um@lists.infradead.org --- v2: update Fixes: tag (thanks, Johannes) drivers/gpu/drm/r128/ati_pcigart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-next-20211007.orig/drivers/gpu/drm/r128/ati_pcigart.c +++ linux-next-20211007/drivers/gpu/drm/r128/ati_pcigart.c @@ -215,7 +215,7 @@ int drm_ati_pcigart_init(struct drm_devi } ret = 0; -#if defined(__i386__) || defined(__x86_64__) +#if (defined(__i386__) || defined(__x86_64__)) && !defined(CONFIG_UML) wbinvd(); #else mb();