From patchwork Mon Dec 20 10:15:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1570959 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=L0fOe3kA; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=sipsolutions.net header.i=@sipsolutions.net header.a=rsa-sha256 header.s=mail header.b=iKyX/DlA; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JHb8j306Nz9s3q for ; Mon, 20 Dec 2021 21:16:21 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NzgQah6eoDEW3FPptTBpAoLHidlsrgzDpSfhJnp6yu4=; b=L0fOe3kAoea2J6 PT699CH862wW4JYCVE72Vvw5ymU1BSlfp6zbi7845kmlFrdEeJWRjl3+xbC0f8+T8VDsVNgUnqJYt K6ehW9uFg9OJ9GwhHhlE/MYIBle+Ig9h6PnvWRNDLfPlRAaY3D5peT9ZjF5pIwE6SxWfy+EdRgEsW DDEIHA7r3kZeLpoQmHl/0gkRZpKWbXY1RgM0df3jB3p/4mTXRYHTIxwYQ3rGIcAjKxW2QszouLUYI FZmzqMVVBR/ZU0q1JbO2evbSW315opDq/O2i6WkZD/QEe4BEDvTrpKM669umK/ZWUbIRGbtitC9nJ aG2DrLmv3FsLfShPREMA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mzFhr-001am3-CM; Mon, 20 Dec 2021 10:15:47 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mzFhp-001akB-0k for linux-um@lists.infradead.org; Mon, 20 Dec 2021 10:15:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=alHpGosBZG9KLUVJPord3i/tdWAv/gVYDukIQiUTKBI=; t=1639995341; x=1641204941; b=iKyX/DlAgkQYQ5dkVVn3sAG7613Zg9+REKT2AWOWUu0tl3e exlg4rYPfOFgsyfhjdyj9hs/olYPkomXqvyRABdiotCMbJ2oTyLZoFhtsz8IQSsSrkh18EGneNs2X /tBjkF9uYdtqTEA79H1deJOtkKyPrRLcju3IQRV7OBQrMmfXKotYsjxPC/HNPPUAx/XhO/a12Nvcj 6WjD6/CaydgbNHR2eeBigVdPl3MumCXl3lUH+woKPPZAiaqpFtA99psi2Cma+p5ctzvc79fpQ56i5 E2b8q9Jaq45s3+Opj5sr2ZV4aKoUXVBD64dY80NNJ4TGddMt70DH+UGNufiy7cOQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1mzFhf-00E3ko-Uu; Mon, 20 Dec 2021 11:15:36 +0100 From: Johannes Berg To: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org, linux-um@lists.infradead.org, Geert Uytterhoeven , Johannes Berg Subject: [PATCH] drm/ttm: fix compilation on ARCH=um Date: Mon, 20 Dec 2021 11:15:22 +0100 Message-Id: <20211220111519.a4c8c6eff702.Ie4cf4e68698f6a9f546b83379bc52c266504424f@changeid> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211220_021545_089802_616EA6CF X-CRM114-Status: GOOD ( 12.15 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Johannes Berg Even if it's probably not really useful, it can get selected by e.g. randconfig builds, and then failing to compile is an annoyance. Unfortunately, it's hard to fix in Kconfig, since DRM_TTM is select [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg Even if it's probably not really useful, it can get selected by e.g. randconfig builds, and then failing to compile is an annoyance. Unfortunately, it's hard to fix in Kconfig, since DRM_TTM is selected by many things that don't really depend on any specific architecture, and just depend on PCI (which is indeed now available in ARCH=um via simulation/emulation). Fix this in the code instead by just ifdef'ing the relevant two lines that depend on "real X86". Reported-by: Geert Uytterhoeven Signed-off-by: Johannes Berg --- drivers/gpu/drm/ttm/ttm_module.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_module.c b/drivers/gpu/drm/ttm/ttm_module.c index 0037eefe3239..a3ad7c9736ec 100644 --- a/drivers/gpu/drm/ttm/ttm_module.c +++ b/drivers/gpu/drm/ttm/ttm_module.c @@ -68,9 +68,11 @@ pgprot_t ttm_prot_from_caching(enum ttm_caching caching, pgprot_t tmp) #if defined(__i386__) || defined(__x86_64__) if (caching == ttm_write_combined) tmp = pgprot_writecombine(tmp); +#ifndef CONFIG_UML else if (boot_cpu_data.x86 > 3) tmp = pgprot_noncached(tmp); -#endif +#endif /* CONFIG_UML */ +#endif /* __i386__ || __x86_64__ */ #if defined(__ia64__) || defined(__arm__) || defined(__aarch64__) || \ defined(__powerpc__) || defined(__mips__) if (caching == ttm_write_combined)