From patchwork Mon Oct 11 08:00:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 12549317 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 AB426C433EF for ; Mon, 11 Oct 2021 08:00:13 +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 6D1CC60EFE for ; Mon, 11 Oct 2021 08:00:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6D1CC60EFE 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 B63266E43B; Mon, 11 Oct 2021 08:00:12 +0000 (UTC) Received: from bombadil.infradead.org (unknown [IPv6:2607:7c80:54:e::133]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5F19F6E43C for ; Mon, 11 Oct 2021 08:00:12 +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=zw5H1GolSJlAJnSqiGkDvpToHiUTjs8D4PJCKCb2xv0=; b=gj03Y6mMO/cTC4AqUK5u9f0iuY IdPuCbi9rkI7dVCc2d51TDP8jm7f8tXB+RqnCe/pGlGwhyEQXjtPOXLKwVN6lSqtN19XWQ4NFrYrz hEcCwRXMOFGFo2+9PdP3FImId7kxM+/9AyyMH92qW++1wvNn7d0vhk1ayVg71P0C8m2qsWAjWlj5F nPt6Zah1QmR5BX3kkxwBGk0JwnoTenIRZTrVphUSchQ2GGNhYROyOvZaLD8zZh0ceEKok8zefmXeL bnayIZcBA5NUi5bNNZ6umU8Vawf7oIqcy6FsOC9qkH+ZN8OmxdlDwSYwQB1hYSUxu2mIx3mjePs11 fo+NFOTQ==; 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 1mZqEB-008Czv-Hn; Mon, 11 Oct 2021 08:00:07 +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, Sam Ravnborg Subject: [PATCH v2] drm/r128: fix build for UML Date: Mon, 11 Oct 2021 01:00:06 -0700 Message-Id: <20211011080006.31081-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 Cc: Sam Ravnborg --- v2: update Fixes: tag (Johannes) Use simple CONFIG_X86 instead of a more complicated expression. (Sam) 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__) +#ifdef CONFIG_X86 wbinvd(); #else mb();