From mboxrd@z Thu Jan 1 00:00:00 1970 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 28A47CFB440 for ; Mon, 7 Oct 2024 06:10:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 748416B0102; Mon, 7 Oct 2024 02:10:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6F83E6B0103; Mon, 7 Oct 2024 02:10:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5E6506B0104; Mon, 7 Oct 2024 02:10:42 -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 419DE6B0102 for ; Mon, 7 Oct 2024 02:10:42 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 6C232160D4E for ; Mon, 7 Oct 2024 06:10:41 +0000 (UTC) X-FDA: 82645782282.07.4765EA1 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by imf26.hostedemail.com (Postfix) with ESMTP id 49A73140004 for ; Mon, 7 Oct 2024 06:10:39 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=none; spf=pass (imf26.hostedemail.com: domain of christophe.leroy@csgroup.eu designates 93.17.235.10 as permitted sender) smtp.mailfrom=christophe.leroy@csgroup.eu; dmarc=pass (policy=quarantine) header.from=csgroup.eu ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1728281371; a=rsa-sha256; cv=none; b=6Os14YqIB9ASirUsWmu26BhxSYe9slLQMRvwDprMwVvP8BnYa1Pmx5zq9UgBJ8M9raoYa6 43a77NT4K3IdOO24odYUFDs5fepfYSj6qE/MG6NtMS9rnqhgW7kiBCm6JfsUIgJsOdXZ63 b7K00NsDp+OBHCSSNGaQFw/wPoNZ+8M= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=none; spf=pass (imf26.hostedemail.com: domain of christophe.leroy@csgroup.eu designates 93.17.235.10 as permitted sender) smtp.mailfrom=christophe.leroy@csgroup.eu; dmarc=pass (policy=quarantine) header.from=csgroup.eu ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1728281371; 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=MjwAxuiuy25K0moh6+fp0cJjq/FjrfXgbpSkineP60Q=; b=d5WBNkhx4f+d4/btO8ZJaOBm6+sdSc78+qeTQo+G7tkm3q+PjN1KtmR60rY4M6wccin/Eo byYNEkR4ddn0LP94D4IwVP9tvE8NBEElhM5L4VwSTMp9lhUnOJ+fYAE/bzGG3mgfow766j Xop3wDq0G80Dro9FW6sVQpkHk1EVhdg= Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4XMTKS6Q7Rz9sPd; Mon, 7 Oct 2024 08:10:36 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DIML3QXE3sOd; Mon, 7 Oct 2024 08:10:36 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4XMTKS5XC8z9rvV; Mon, 7 Oct 2024 08:10:36 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id AB1AD8B765; Mon, 7 Oct 2024 08:10:36 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id XZVaR_2kVu_W; Mon, 7 Oct 2024 08:10:36 +0200 (CEST) Received: from [172.25.230.108] (unknown [172.25.230.108]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 556AB8B764; Mon, 7 Oct 2024 08:10:36 +0200 (CEST) Message-ID: <0a419a1d-6124-411c-bcae-a8dac87f73d0@csgroup.eu> Date: Mon, 7 Oct 2024 08:10:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 1/2] drm: Fix fault format To: Arnd Bergmann , Vincenzo Frascino , linux-kernel@vger.kernel.org, Linux-Arch , linux-mm@kvack.org Cc: Andy Lutomirski , Thomas Gleixner , "Jason A . Donenfeld" , Michael Ellerman , Nicholas Piggin , Naveen N Rao , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Theodore Ts'o , Andrew Morton , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers References: <20241003152910.3287259-1-vincenzo.frascino@arm.com> <20241003152910.3287259-2-vincenzo.frascino@arm.com> <5b52dfcf-7b4c-4715-b1b2-6e41062302bd@app.fastmail.com> Content-Language: fr-FR From: Christophe Leroy In-Reply-To: <5b52dfcf-7b4c-4715-b1b2-6e41062302bd@app.fastmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Stat-Signature: emo3bjddug6utk3fm44pefkgywohz7mx X-Rspamd-Queue-Id: 49A73140004 X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1728281439-645193 X-HE-Meta: U2FsdGVkX19QgENvAkYwqynUkhJ7pby2jTasR7B48+4SbHnP4KU6Bh3KJ+iPxGehE93QmONXcloKnkYd0wf/AovRGoNncVBmiurIvrn3/1S+5iOFdv+vH4tYuLwCRfGP+MGKcz1W28XxUuJlSh2xerM21P2WVLr3D+RhfA+G+f7KHYS1OoYxaQnFFrFEwWE8e32qX0yAIc0Ar5KNRMxfrXp80/k3DiPlgMdak6lFmIRphUJT6QfYSOK618nswY12D+sTiIpQiLO8swttfhfc0dwaDZxAEHHrAF+rDwBmzx7GnfYii7Wc0l20b4EyYZusIYZIicgqs0/WZHP9Kat4SwjErKXcDBOygT9qgJTQSCeLhOPmzqFtFXKBZdNhivm9iDxaiyISPuoppI3jDa3fTjBg+GdQpvn7SKyGUyKFTMlsHdrJeBYkhZuP55RPd3bS7vy9vCQe0QNPcJpnkzqRqnG0JlhzxxzlPFXqZylyFuejY1vVOsz3wAZMisZDYdLXpg92GCo31w4E+kOrZQEsOi3sPH9M/Bw5XRR55peLjkXA0E4DXYAvFfIjQtSMj4LYpWkn95JqXJM0aOcjr+r5vqwhoqbitxC6RpcQLCsCjzusW1LC1v73SbOxqXfRRf/9Ydfd78z6Xk4vEo2kkermgYEC4DzNMGvkq1QXtp0IRNOXBEB5adkKqoSdOb91ebYsvKDPb/g6hpKSg/fYRvHoZ0qYpONDcrwzYKCPsjp+oD7cBZ3IF7kJir/f3b1fBCgfpTpGOGFpUmIHL/nPq7geB6uG1Sdf0dGz/onxEpPCoMhYJ2MRFg2kflMOHMOjhdZqav2wqO7PBR5aDfF1M77evzgOPD9CXHEAtbw2C9Ivv4LZYQ0gyDgB57h0Ruc4efvgRG5NnmDEKE1zfh9WYizA9CcUnenjy7812UfIl8kqV5n+8E5+LpefhVuNq9l+oJaDYKa6Ooax92An5D3qMuN UuG0fEzn qqjm69RgenZ5JOs9rBzayPpXSR0AZV3NczsmLVZ8y3d+PLPrKCJzCNRE0HuaZ3EzyQRN1QvPYQlDUk1+x0W0PKQbzOUmyxyUqe//ySmJ6YQ2OdUfHMqlIDwcGCpu7pmRZ80WIHxfxldbFRjQ= 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: Le 04/10/2024 à 15:21, Arnd Bergmann a écrit : > On Thu, Oct 3, 2024, at 15:29, Vincenzo Frascino wrote: >> diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c >> b/drivers/gpu/drm/i915/gt/intel_gt.c >> index a6c69a706fd7..352ef5e1c615 100644 >> --- a/drivers/gpu/drm/i915/gt/intel_gt.c >> +++ b/drivers/gpu/drm/i915/gt/intel_gt.c >> @@ -308,7 +308,7 @@ static void gen6_check_faults(struct intel_gt *gt) >> fault = GEN6_RING_FAULT_REG_READ(engine); >> if (fault & RING_FAULT_VALID) { >> gt_dbg(gt, "Unexpected fault\n" >> - "\tAddr: 0x%08lx\n" >> + "\tAddr: 0x%08x\n" >> "\tAddress space: %s\n" >> "\tSource ID: %d\n" >> "\tType: %d\n", > > Isn't the type of PAGE_MASK still architecture dependent? Indeed when I commented that PAGE_MASK was type agnostic I was thinking about the powerpc PAGE_MASK: #define PAGE_MASK (~((1 << PAGE_SHIFT) - 1)) It should probably be possible to generalise it to all architectures. But if you keep some PAGE_MASK with forced UL type just like: #define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT) #define PAGE_MASK (~(PAGE_SIZE-1)) Then that version of PAGE_MASK isn't agnostic and ANDing an int with that mask makes a long result. > I think you need a cast to either 'int' or 'long' here to > make the corresponding format string work across all > architectures. With the current version of your patch 2/2, > it looks like it has to be %x for architectures with > 64-bit phys_addr_t, but %lx for the other ones. > > Changing the 'u32 fault' variable to 'unsigned long' > would also work here. > > Arnd