public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Vitaly Chikunov <vt@altlinux.org>
To: Sasha Levin <sashal@kernel.org>,
	 Matt Roper <matthew.d.roper@intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	 gregkh@linuxfoundation.org, regressions@lists.linux.dev
Subject: [regression] Re: Linux 6.12.75
Date: Thu, 2 Apr 2026 11:44:08 +0300	[thread overview]
Message-ID: <ac4lw9tTNn4baO_h@altlinux.org> (raw)
In-Reply-To: <20260304131402.83200-2-sashal@kernel.org>

Sasha,

1. I cannot find this commit posted on lore.kernel.org to report to
exact patch.

| From: Matt Roper <matthew.d.roper@intel.com>
| Date: Tue, 10 Sep 2024 16:47:29 -0700
| Subject: [PATCH 6.12/sisyphus] drm/xe: Switch MMIO interface to take xe_mmio
|  instead of xe_gt
| 
| [ Upstream commit a84590c5ceb354d2e9f7f6812cfb3a9709e14afa ]
| 
| Since much of the MMIO register access done by the driver is to non-GT
| registers, use of 'xe_gt' in these interfaces has been a long-standing
| design flaw that's been hard to disentangle.
| 
| To avoid a flag day across the whole driver, munge the function names
| and add temporary compatibility macros with the original function names
| that can accept either the new xe_mmio or the old xe_gt structure as a
| parameter.  This will allow us to slowly convert parts of the driver
| over to the new interface independently.
| 
| Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
| Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
| Link: https://patchwork.freedesktop.org/patch/msgid/20240910234719.3335472-54-matthew.d.roper@intel.com
| Stable-dep-of: 4a9b4e1fa52a ("drm/xe/mmio: Avoid double-adjust in 64-bit reads")
| Signed-off-by: Sasha Levin <sashal@kernel.org>
| ---
|  drivers/gpu/drm/xe/xe_mmio.h  |  72 +++++++++++++++----
|  drivers/gpu/drm/xe/xe_trace.h |   7 +-
|  drivers/gpu/drm/xe/xe_mmio.c  | 131 ++++++++++++++++------------------
|  3 files changed, 124 insertions(+), 86 deletions(-)

2. After this patch applied to 6.12.75 there is kernel NULL pointer
dereference BUG on MSI MAG H670 12th Gen Intel(R) Core(TM) i5-12600K
with ASRock Intel Arc B580 Challenger [Alchemist], 12GB:

  BUG: kernel NULL pointer dereference, address: 0000000000000000
  #PF: supervisor read access in kernel mode
  #PF: error_code(0x0000) - not-present page
  PGD 0 P4D 0
  Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI
  CPU: 8 UID: 0 PID: 310 Comm: (udev-worker) Not tainted 6.12.79-6.12-alt1 #1
  Hardware name: Micro-Star International Co., Ltd. MS-7D25/MAG H670 TOMAHAWK WIFI DDR4(MS-7D25), BIOS H.N0 07/31/2025
  RIP: 0010:__xe_mmio_read32+0x23/0xe0 [xe]

The commit is found not by a git bisect (since it's reported by end
user and I cannot reproduce it on my hardware) but (by analyzing dmesg)
with:

  (gdb) list *__xe_mmio_read32+0x23
  0x35723 is in __xe_mmio_read32 (drivers/gpu/drm/xe/xe_mmio.c:195).
  190     static void mmio_flush_pending_writes(struct xe_mmio *mmio)
  191     {
  192     #define DUMMY_REG_OFFSET        0x130030
  193             int i;
  194
  195             if (mmio->tile->xe->info.platform != XE_LUNARLAKE)
  196                     return;
  197
  198             /* 4 dummy writes */
  199             for (i = 0; i < 4; i++)

Then finding the suspecting commit:

  $ git log --oneline -G'XE_LUNARLAKE' v6.12.74..v6.12.75
  26a40327c25c drm/xe: Switch MMIO interface to take xe_mmio instead of xe_gt

6.18 and above are not affected by the bug. Also, they have another commit
modifying the line which is not present in 6.12 branch:

  ac596dee8008 drm/xe: Move Wa_15015404425 to use the new XE_DEVICE_WA macro

Thanks,

#regzbot introduced: v6.12.75

Related drm/xe bug report https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/7661

On Wed, Mar 04, 2026 at 08:14:02AM -0500, Sasha Levin wrote:
> diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
> index 3fd462fda6255..449e6c5636712 100644
> --- a/drivers/gpu/drm/xe/xe_mmio.c
> +++ b/drivers/gpu/drm/xe/xe_mmio.c
> @@ -172,122 +180,118 @@ int xe_mmio_init(struct xe_device *xe)
> -static void mmio_flush_pending_writes(struct xe_gt *gt)
> +static void mmio_flush_pending_writes(struct xe_mmio *mmio)
>  {
>  #define DUMMY_REG_OFFSET	0x130030
> -	struct xe_tile *tile = gt_to_tile(gt);
>  	int i;
>  
> -	if (tile->xe->info.platform != XE_LUNARLAKE)
> +	if (mmio->tile->xe->info.platform != XE_LUNARLAKE)
>  		return;
>  
>  	/* 4 dummy writes */
>  	for (i = 0; i < 4; i++)
> -		writel(0, tile->mmio.regs + DUMMY_REG_OFFSET);
> +		writel(0, mmio->regs + DUMMY_REG_OFFSET);
>  }
>  

      reply	other threads:[~2026-04-02  8:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-04 13:14 Linux 6.12.75 Sasha Levin
2026-03-04 13:14 ` Sasha Levin
2026-04-02  8:44   ` Vitaly Chikunov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ac4lw9tTNn4baO_h@altlinux.org \
    --to=vt@altlinux.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew.d.roper@intel.com \
    --cc=regressions@lists.linux.dev \
    --cc=rodrigo.vivi@intel.com \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox