From patchwork Wed Feb 28 12:27:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 207841 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3311107dyb; Wed, 28 Feb 2024 04:28:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVdljHiropI5575XVZwnwOc6Ng2jJbwhVZ22uGrvlag6vLfWWhSXA3FL7amIQENz0QH1DP+ELRpFbsdP4gGkldaYWuggw== X-Google-Smtp-Source: AGHT+IE2lITFsBVDhZmCszcDsS3DtFjEADMw4vxEOP2iybvsXmGPtn4lZzQWhb62IuyIch6tq9Qv X-Received: by 2002:a17:906:1745:b0:a3e:7eb1:4bf6 with SMTP id d5-20020a170906174500b00a3e7eb14bf6mr9624834eje.2.1709123316736; Wed, 28 Feb 2024 04:28:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709123316; cv=pass; d=google.com; s=arc-20160816; b=toWoS8+gS2+XG4v/4KbebmJEOpTmElqEKbZvYcqXHUQFabYdYwUPzsgtGiJh2qfTQ8 zMeXVzwR9rGn/mvajVV3jyyJk7ya4a4zCsPSnSXdw8qzfB4FRfMmnN5+7KBoCxW/3srb schYRfJcYsAWmozd0sVy/p6W4P/J0+u8JJ6gPCp1unPHMcl9772benpRBgh57b8QZdsY KK/Khx4SE7BdseL+JYrzJ3d2v45WrYf81e5GiyGrvPv/pwzgrQxxa0FMO72cH8W+8uxa zquff4KnyU6EbYnDFEDfvii08FtoKhd9GFVgC98KXePwchZyDv0Ou3gkuNUhZ9Wgu+1s /Nqg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=QeDlcpxz7mxJ8Ny/Whvjqa7wdCYKRvIdDOiRDB0uSLc=; fh=B8+dYoIMkTPvHsvlfLTdR6YVr1aOo1yAtQSdZBNAQQY=; b=zILZxHougECrhpH10Ef7jbyW4pSV00UQLKLuHlACJ3QlcMYoTsv45olt0btd2zotIF bKmzayVpCGx1669yQ4vvuk9r1ACR+rjtU9WLUty7as9pSEnx5vUTO8FScWydQ5G2wWAO PXKXOnrmDZ5cmnpO0HIk/1CBJpi7gpJ0uh3TFz2oPH9LuDh3y5J8+i/fn/uHIvC+Awog /om0UN8GKGt14/fmVdNOpXc1kWw8DLrO5aJiWQ4x0hH4ashL7VuMRTrCU/zuvHYgEjNX C6juNFgQVdPSpWBZv5MFBbwHBp4iODs1IFRMJel1cEykhtoOBvM+r7QcNqjIFRDVxzLR yO0A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KB3pClLY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-85017-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85017-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id n9-20020a170906688900b00a43ef2d9923si715101ejr.967.2024.02.28.04.28.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 04:28:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85017-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KB3pClLY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-85017-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85017-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 549D71F22911 for ; Wed, 28 Feb 2024 12:28:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 49C6E6CDCD; Wed, 28 Feb 2024 12:27:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KB3pClLY" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9ADAF3BBCF for ; Wed, 28 Feb 2024 12:27:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709123276; cv=none; b=YXNTXaUvmhJJ8SHuJmAp9c88FUm03ru0JoE0o6i8dnbMSAjR8Fg2OtKWp//QDlvEkyk0jH+II3mMXW/3LEL0EcYgYGh222xyS41bWsqSk6qfMkdsNMs9UxYajavENgmn6JJzIHfVt9BshrmaXqb2Hax9V1lOgIDDWfhJXLEimHg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709123276; c=relaxed/simple; bh=zJkyW1REgGcoo5I8xkc1mIm72bDArJYrzYMZkYH4CyE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=H2X6gxkOZQ5sIgsjzOE5oWpe8k0ED7wmtqtK/VNfuFClMGS0r8gRZU2Q+v/qqgRK5+o+HxLI9IZ/07cQwVU+WKnUWh/G6K4E+sxFIaQN6W/PZYkvoWJUXdfTY6pQ4VMIWMfNUL4oswteLi4YmZ7AgMs6SryGZapDlq1wqXqPPXk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KB3pClLY; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9966DC433F1; Wed, 28 Feb 2024 12:27:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709123276; bh=zJkyW1REgGcoo5I8xkc1mIm72bDArJYrzYMZkYH4CyE=; h=From:To:Cc:Subject:Date:From; b=KB3pClLY5dKCrRpGkbtavnPw1utKoKmS/kX8Uohz+oFYrGvdIXg7tvVk9Lo3h4EPc o4WcwGJbOcn6pnyqzT8vd426E4eA4utqcx7B8E0ROL0jzRyCFio6LBB0NIz0D7P6eu viaQgw14TQFfcg1FWjm6Y9dJ5SRqTIxPBpRKoHbEvPaHmfyUkAEIc705MRY75IygYF dMoM0tMEA9lvhHulq+bxGtvhC4FTBru8fhQdvr+AfJfTZLQUHqmQKLSwoKHCJ9i+gl H5zL9urT2k/1YO97uS8YF4FSObxmPm4j8S7Vp0IP+wgfm3c730fy93NH5l4IaDS+V+ n0L4ar7Z6GNyw== From: Arnd Bergmann To: Lucas De Marchi , Oded Gabbay , =?utf-8?q?Thomas_Hellstr=C3=B6m?= Cc: Arnd Bergmann , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rodrigo Vivi , Matt Roper , Matthew Auld , Matthew Brost , Michal Wajdeczko , intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] xe: avoid using writeq() on 32-bit Date: Wed, 28 Feb 2024 13:27:33 +0100 Message-Id: <20240228122746.3091608-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792145690486087542 X-GMAIL-MSGID: 1792145690486087542 From: Arnd Bergmann 32-bit kernels do not provide a writeq(), failing the build: drivers/gpu/drm/xe/xe_ggtt.c:78:2: error: use of undeclared identifier 'writeq' 78 | writeq(pte, &ggtt->gsm[addr >> XE_PTE_SHIFT]); Using lo_hi_writeq() instead will write the lower 32 bits to the address before writing the upper 32 bits to the following word, which is likely the correct replacement to do on 32-bit targets. Include the linux/io-64-nonatomic-lo-hi.h header to automatically pick the regular writeq() on 64-bit machines but fall back to lo_hi_writeq() on 32-bit ones. Fixes: 237412e45390 ("drm/xe: Enable 32bits build") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/xe/xe_ggtt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c index 5d46958e3144..1ffcc63ca86d 100644 --- a/drivers/gpu/drm/xe/xe_ggtt.c +++ b/drivers/gpu/drm/xe/xe_ggtt.c @@ -6,6 +6,7 @@ #include "xe_ggtt.h" #include +#include #include #include