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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 33695FD377B for ; Wed, 25 Feb 2026 18:19:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8F3D910E7E5; Wed, 25 Feb 2026 18:19:28 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="kXPcw2cb"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5490610E7E5 for ; Wed, 25 Feb 2026 18:19:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1772043567; x=1803579567; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=g+Rv5twtrHNkAa0fHy+gO6vfhR8gb9fyA2QB0P0BZgA=; b=kXPcw2cbG4LpKQV9SHmEQzwBzP/kjVmyHRmvZN8pwLZbDc89dPiZ5qLw 4PtOximCmsAvIZk0yfu2OnZBk4WjW+JKcSRDYDdLGp/0GzPI5o5VmpOZE pyXa3rsobhpyIuNoQs/E1/sUi+9ZySE58/++hkGWO88gKVg7gM2DUmWYs 4KVKT44Hg3O2QRenZm/uvjoP46cO/dT0t617OETzjLkrtcnpLglAmBaCO gXTM0Q5RQSDVb8ZXSD/X25DhPcxAqudO1kxnXsV3QGRVln6hNedjxl36j T0TjguvvqY3EfmCHGogtKdvgVqPW7/8sheyQNyg3eek+RL4mTKcnRDJx8 Q==; X-CSE-ConnectionGUID: 4FeYp5XwQS+Li5qcCAKx4A== X-CSE-MsgGUID: brzUtAatTlug0MEGgdCHUg== X-IronPort-AV: E=McAfee;i="6800,10657,11712"; a="73269232" X-IronPort-AV: E=Sophos;i="6.21,311,1763452800"; d="scan'208";a="73269232" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Feb 2026 10:19:26 -0800 X-CSE-ConnectionGUID: MEm1pWz2TE+yzmwhjUOS7g== X-CSE-MsgGUID: e02kCWvCRtirQ+kehBsaNQ== X-ExtLoop1: 1 Received: from mfalkows-mobl.ger.corp.intel.com (HELO [10.245.84.158]) ([10.245.84.158]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Feb 2026 10:19:25 -0800 Message-ID: Date: Wed, 25 Feb 2026 19:19:23 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] accel/amdxdna: Reduce log noise during process termination To: Mario Limonciello , lizhi.hou@amd.com, mamin506@gmail.com, ogabbay@kernel.org, superm1@kernel.org Cc: dri-devel@lists.freedesktop.org References: <20260210164521.1094274-1-mario.limonciello@amd.com> <20260210164521.1094274-3-mario.limonciello@amd.com> Content-Language: en-US From: "Falkowski, Maciej" In-Reply-To: <20260210164521.1094274-3-mario.limonciello@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Reviewed-by: Maciej Falkowski On 2/10/2026 5:42 PM, Mario Limonciello wrote: > During process termination, several error messages are logged that are > not actual errors but expected conditions when a process is killed or > interrupted. This creates unnecessary noise in the kernel log. > > The specific scenarios are: > > 1. HMM invalidation returns -ERESTARTSYS when the wait is interrupted by > a signal during process cleanup. This is expected when a process is > being terminated and should not be logged as an error. > > 2. Context destruction returns -ENODEV when the firmware or device has > already stopped, which commonly occurs during cleanup if the device > was already torn down. This is also an expected condition during > orderly shutdown. > > Downgrade these expected error conditions from error level to debug level > to reduce log noise while still keeping genuine errors visible. > > Fixes: 97f27573837e ("accel/amdxdna: Fix potential NULL pointer dereference in context cleanup") > Signed-off-by: Mario Limonciello > --- > drivers/accel/amdxdna/aie2_ctx.c | 6 ++++-- > drivers/accel/amdxdna/aie2_message.c | 4 +++- > 2 files changed, 7 insertions(+), 3 deletions(-) > > diff --git a/drivers/accel/amdxdna/aie2_ctx.c b/drivers/accel/amdxdna/aie2_ctx.c > index 37d05f2e986f9..79f6316655e73 100644 > --- a/drivers/accel/amdxdna/aie2_ctx.c > +++ b/drivers/accel/amdxdna/aie2_ctx.c > @@ -497,7 +497,7 @@ static void aie2_release_resource(struct amdxdna_hwctx *hwctx) > > if (AIE2_FEATURE_ON(xdna->dev_handle, AIE2_TEMPORAL_ONLY)) { > ret = aie2_destroy_context(xdna->dev_handle, hwctx); > - if (ret) > + if (ret && ret != -ENODEV) > XDNA_ERR(xdna, "Destroy temporal only context failed, ret %d", ret); > } else { > ret = xrs_release_resource(xdna->xrs_hdl, (uintptr_t)hwctx); > @@ -1070,6 +1070,8 @@ void aie2_hmm_invalidate(struct amdxdna_gem_obj *abo, > > ret = dma_resv_wait_timeout(gobj->resv, DMA_RESV_USAGE_BOOKKEEP, > true, MAX_SCHEDULE_TIMEOUT); > - if (!ret || ret == -ERESTARTSYS) > + if (!ret) > XDNA_ERR(xdna, "Failed to wait for bo, ret %ld", ret); > + else if (ret == -ERESTARTSYS) > + XDNA_DBG(xdna, "Wait for bo interrupted by signal"); > } > diff --git a/drivers/accel/amdxdna/aie2_message.c b/drivers/accel/amdxdna/aie2_message.c > index 77e3cdf18658b..5697c0c2dd43f 100644 > --- a/drivers/accel/amdxdna/aie2_message.c > +++ b/drivers/accel/amdxdna/aie2_message.c > @@ -216,8 +216,10 @@ static int aie2_destroy_context_req(struct amdxdna_dev_hdl *ndev, u32 id) > > req.context_id = id; > ret = aie2_send_mgmt_msg_wait(ndev, &msg); > - if (ret) > + if (ret && ret != -ENODEV) > XDNA_WARN(xdna, "Destroy context failed, ret %d", ret); > + else if (ret == -ENODEV) > + XDNA_DBG(xdna, "Destroy context: device already stopped"); > > return ret; > }