From patchwork Mon Oct 14 15:13:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vincenzo Frascino X-Patchwork-Id: 13835195 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 186A9D18125 for ; Mon, 14 Oct 2024 15:13:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A5E2C6B008C; Mon, 14 Oct 2024 11:13:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9E6BB6B0092; Mon, 14 Oct 2024 11:13:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 813326B0093; Mon, 14 Oct 2024 11:13:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 5D71B6B008C for ; Mon, 14 Oct 2024 11:13:50 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id AA231A1042 for ; Mon, 14 Oct 2024 15:13:35 +0000 (UTC) X-FDA: 82672552494.11.7D2908F Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf01.hostedemail.com (Postfix) with ESMTP id C879F40011 for ; Mon, 14 Oct 2024 15:13:42 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf01.hostedemail.com: domain of vincenzo.frascino@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=vincenzo.frascino@arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1728918781; a=rsa-sha256; cv=none; b=7Gd3CRrParPNeoAmhFlKqNOCWVKt6YjWfpDEh3TYifQd/XvvnejnWCPcSDkJ7QD90bLIu4 1eM4v/oBD7+ZZEa7Oym04OL2soFa63/0Db1Dx9gmmOaIDSGEdSy543vyF1VL8rEv7sNO8E 6b/8SjB/yJGmUJy29Pzuk5QY6LL5gGk= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf01.hostedemail.com: domain of vincenzo.frascino@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=vincenzo.frascino@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1728918781; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HcJfj44K336t7K5c8FPK1UPGnbt91PBb4RqKvJwpimc=; b=KIuV5rg84UT3jB/IvJRQFNrKhEbDvxA5MLFRs48r0YxFGyZFmH5513z6bp0QRMCpp9UHFf jUUPJ/SpF6QJ7RPpqiDuz9dU1cGlzlgJhcFHebBY6+qHVlxO4EHtemheXK3uKEPyDeuWnH svS2VLsDy6FC4gNftB5SOEwF/OChILU= Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0ED3D1424; Mon, 14 Oct 2024 08:14:17 -0700 (PDT) Received: from e119884-lin.cambridge.arm.com (e119884-lin.cambridge.arm.com [10.1.196.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 30D763F51B; Mon, 14 Oct 2024 08:13:46 -0700 (PDT) From: Vincenzo Frascino To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org Cc: Vincenzo Frascino , Arnd Bergmann , Andy Lutomirski , Thomas Gleixner , "Jason A . Donenfeld" Subject: [PATCH v5 1/3] drm: i915: Change fault type to unsigned long Date: Mon, 14 Oct 2024 16:13:38 +0100 Message-Id: <20241014151340.1639555-2-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241014151340.1639555-1-vincenzo.frascino@arm.com> References: <20241014151340.1639555-1-vincenzo.frascino@arm.com> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Queue-Id: C879F40011 X-Rspamd-Server: rspam01 X-Stat-Signature: xpkeiar4rtkxkdc4fqfzzr14n4aa93pj X-HE-Tag: 1728918822-116893 X-HE-Meta: U2FsdGVkX18fWK7if1f4Ez+ETdTNmaL/aVmHkinkbtYz5ow9jNDaTggr52n8me+Eax3sAUkr0nHpMZA8vFFXUeWsCrFOwpus4DNWGhADWarMWMjmKqdmLv4nB8FkdCtw6JPaltNfacrxxiIK86rw0Ao5Rn1QjrhBqUDIRza8+mFFbFINxHAFLN0bX3wm/tJZttDt/5yehqBosHsSto2F+QaeYiWHbtpt44BTX5mqwVheEnsV5vQHV1qOtJp17jQuTOpxItuBMMUS/RZm0os9a4272Pw6CWSNlwvrJQjla38VxTWfW6AAmhMw0gBK6326sHEJxx/GBy0GETVbMPPlESrVxDaA9bHEpwLcwV17i45F5y0n8tetzt+xdN0cOZqPcNJX55oD3A9OC7K0SetVDoGWxGef+1/SC7byyv+vwxVNHDR6w+WTVMU97F+T0x1hoEF8AOuwHp9RaCkj2wmDwFj/EBoG8G4ewCG3GYVUsnNtGu6etNrkdM1bex2+Mp2sYWUmZCd8Eb/htpBEzg3ucLvn6pSoAJ0viL8zUEka+w7C076cQmYdNgAzS/2Lcgi31TB8w2/9rvKedoFKMTUg/gg2NaCsEeW1xUOCn+eWY8oENgKNavBbfdQRblMmw/OFSRVBmU3Tdtog6EvK69TFNGmzREn8xK8RxOhpe4+tQRalR6hdWCJsSkr7EWcP5Hruymb++5d7f/9UgrO460oHjv570e1vhctj7kKLlAhkxXFg2GTma9cHDLpx2qeaLYaCpfZYHfmII0t0oHQRf63dfvygufb75LrroFg9ToUHlwJHuIBD+To+drnhsDJSBMGINdAGo/1TmVMwqeUBRabowECQZaWUX+d+Tve5hpvJIgWQfMY58PjPRrFx6XeaOD+tXvSEKUgy5xp4XWZTWSPi0kMyPJ8RBI1W7lwjOd0L1mUqMWwjqAQxvqS9Xn0hh98KODqYVvsReoMnY5PCstv UeTV5YHL D75liauBBPm8oQMP21qKTeUYKp0/d0FEbEMHf8qlZrQbkm4jg+NUvAMRtibLaeVTu0vh211WZAmwXzq/xA9knGLxChC+FQ7xU2kBCIOwFiMtH4AjDJAISgiOhuOakPjTPaKBY9lhW31Y+2/33Q1/pa4xl9rJsOF387J+Xe/W873l/h3hYPumNYwok8v0kU3ggZs/cEUvti9KI+aTCgGRyvCKJ/vmCvN9e1ZhDwzv+DHjIkQT8UMeJzVMa0v1tb6Ot0Y+QRHPARuX+p8Y= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Fault is currently of type u32 and with the introduction of the generalized vdso/page.h we trigger the error below: drivers/gpu/drm/i915/gt/intel_gt_print.h:29:36: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘u32’ {aka ‘unsigned int’} [-Werror=format=] 29 | drm_dbg(&(_gt)->i915->drm, "GT%u: " _fmt, (_gt)->info.id, | ^~~~~~~~ include/drm/drm_print.h:424:39: note: in definition of macro ‘drm_dev_dbg’ 424 | __drm_dev_dbg(NULL, dev, cat, fmt, ##__VA_ARGS__) | ^~~ include/drm/drm_print.h:524:33: note: in expansion of macro ‘drm_dbg_driver’ 524 | #define drm_dbg(drm, fmt, ...) drm_dbg_driver(drm, fmt, ##__VA_ARGS__) | ^~~~~~~~~~~~~~ linux/drivers/gpu/drm/i915/gt/intel_gt_print.h:29:9: note: in expansion of macro ‘drm_dbg’ 29 | drm_dbg(&(_gt)->i915->drm, "GT%u: " _fmt, (_gt)->info.id, | ^~~~~~~ drivers/gpu/drm/i915/gt/intel_gt.c:310:25: note: in expansion of macro ‘gt_dbg’ 310 | gt_dbg(gt, "Unexpected fault\n" | ^~~~~~ This happens because the type of PAGE_MASK depends on the architecture. Prevent the compilation error changing the 'fault' type to unsigned long. Cc: Arnd Bergmann Cc: Andy Lutomirski Cc: Thomas Gleixner Cc: Jason A. Donenfeld Reviewed-by: Arnd Bergmann Signed-off-by: Vincenzo Frascino --- drivers/gpu/drm/i915/gt/intel_gt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c index a6c69a706fd7..bb29f361110e 100644 --- a/drivers/gpu/drm/i915/gt/intel_gt.c +++ b/drivers/gpu/drm/i915/gt/intel_gt.c @@ -302,7 +302,7 @@ static void gen6_check_faults(struct intel_gt *gt) { struct intel_engine_cs *engine; enum intel_engine_id id; - u32 fault; + unsigned long fault; for_each_engine(engine, gt, id) { fault = GEN6_RING_FAULT_REG_READ(engine); @@ -310,8 +310,8 @@ static void gen6_check_faults(struct intel_gt *gt) gt_dbg(gt, "Unexpected fault\n" "\tAddr: 0x%08lx\n" "\tAddress space: %s\n" - "\tSource ID: %d\n" - "\tType: %d\n", + "\tSource ID: %ld\n" + "\tType: %ld\n", fault & PAGE_MASK, fault & RING_FAULT_GTTSEL_MASK ? "GGTT" : "PPGTT",