Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5011420pxj; Wed, 9 Jun 2021 07:15:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyul50IaIkW+tGp8qxfg/kDXBKQokL3wL/jPCuI1rWo9PCUTejZMnvAP00ANNeCpqvkA7Dg X-Received: by 2002:aa7:cc9a:: with SMTP id p26mr30696063edt.74.1623248138439; Wed, 09 Jun 2021 07:15:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623248138; cv=none; d=google.com; s=arc-20160816; b=DoM+CRYtEbLs47gPLegAcNqrZGKbWXbl+lqSbGqnhEVrdiEs3WHEYqjNHlH43xLf1N +fDi1U2PGGYRFZRoPY7+01NwFAMoskzLnrTHTb39iH3VRWWCa8U21J2TvC8iRd6gNX3F zEui0FvcNTJtXeeBs+OCvwyY5+LA87fgkKUd+UkKthEZOsRAb/K6Akvct78fOW29pz7D +r3spYCdmmh4Vf9F7qd+Hx+qSKk4U0urWk1zTnc2+rX6JidiuTtxsWIO+1QMWFL5YmzU xQKKOtLvubbZ68wG8qI8EMZhMVQUGK30mkgrQSmSmuY/s3aG4WmTeB8e8l6oBDEoitWK PXaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=uzQRBDfZ0yMJrbPaIV/qoNjmF0LGHLLpdIMaTV1POc8=; b=ySAu2646DzUzd8J5OvkX4EnspuSwxxjaRHwfuO2dI42QZMyqUefhsPArr6S2+AishB ND8WaAowi3PhrhJYHfqOihTMxt567XZmDh0NKadkRjxVCd74AjgSq7NP6sJn7elRVP9d bmTLU7nCMr1xS4UMFtFBRuq2qUl4S0etwYOFUTzKAOsb0u/9LIhGD+EpC6S20Sm6X8Lg odJtG1SMiruC/yZFSfUd00lqUBFRcXuarz+msHMwB5fSII45hgbDuK4MVS790C2R8gVT ekRpqPsCcsGoognhPwUWbN/UkNXvRDXOHh3kEkb4u7g1MBCX+x/DmpQ+lXNj2q2a/9Nb M/yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rz5e9QJy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn21si2465945edb.483.2021.06.09.07.15.15; Wed, 09 Jun 2021 07:15:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rz5e9QJy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238424AbhFIJyc (ORCPT + 99 others); Wed, 9 Jun 2021 05:54:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:41818 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238428AbhFIJya (ORCPT ); Wed, 9 Jun 2021 05:54:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D206761375; Wed, 9 Jun 2021 09:52:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623232356; bh=9O8DXLaMQM9wVBMqS6re6m7iWtxcq4OkN60k7/72jNE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rz5e9QJyYBUIFX4wbQiLyfbCr2ONPnv5qZ/sXNbA9h6nEWncd+rc5hcnpU2TD4nyT ACJoUjv/x3+cwkrkkd1ZkWHbvlDn9YME8rOTKS55xu0fFWCD9Cmk0Gyogs19ecbGo9 HvfxvTAvubbRjOMLWKiZ7G4PyIs8geVKrKQ4ELn8= Date: Wed, 9 Jun 2021 11:52:34 +0200 From: Greg KH To: "yekai(A)" Cc: linux-accelerators@lists.ozlabs.org, linux-kernel@vger.kernel.org, linuxarm@huawei.com, zhangfei.gao@linaro.org, wangzhou1@hisilicon.com Subject: Re: [PATCH] uacce: add print information if not enable sva Message-ID: References: <1622792769-28017-1-git-send-email-yekai13@huawei.com> <3f1590c4-b9f1-18f5-370a-57d9707f38a0@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3f1590c4-b9f1-18f5-370a-57d9707f38a0@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 08, 2021 at 09:39:52AM +0800, yekai(A) wrote: > > > On 2021/6/4 15:51, Greg KH wrote: > > On Fri, Jun 04, 2021 at 03:46:09PM +0800, Kai Ye wrote: > > > Add print information necessary if user not enable sva. > > > > > > Signed-off-by: Kai Ye > > > --- > > > drivers/misc/uacce/uacce.c | 11 +++++++++-- > > > 1 file changed, 9 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c > > > index bae18ef0..fe38af8 100644 > > > --- a/drivers/misc/uacce/uacce.c > > > +++ b/drivers/misc/uacce/uacce.c > > > @@ -387,15 +387,22 @@ static void uacce_release(struct device *dev) > > > > > > static unsigned int uacce_enable_sva(struct device *parent, unsigned int flags) > > > { > > > + int ret; > > > + > > > if (!(flags & UACCE_DEV_SVA)) > > > return flags; > > > > > > flags &= ~UACCE_DEV_SVA; > > > > > > - if (iommu_dev_enable_feature(parent, IOMMU_DEV_FEAT_IOPF)) > > > + ret = iommu_dev_enable_feature(parent, IOMMU_DEV_FEAT_IOPF); > > > + if (ret) { > > > + dev_err(parent, "failed to enable IOPF feature! ret = %d\n", ret); > > > > Why is this needed? Has this ever happened in real life such that the > > log message is now required? > > > > > > > > > return flags; > > > + } > > > > > > - if (iommu_dev_enable_feature(parent, IOMMU_DEV_FEAT_SVA)) { > > > + ret = iommu_dev_enable_feature(parent, IOMMU_DEV_FEAT_SVA); > > > + if (ret) { > > > + dev_err(parent, "failed to enable SVA feature! ret = %d\n", ret); > > > > Same here, does this happen in real systems? > > > > thanks, > > > > greg k-h > > . > > > In a other debug version, the SVA feature failed to be enabled, and no > related information was printed. we don't know the cause of the problem. > Finally, Although, it's not the problem here. but we find that the sva > enable function doesn't have debug information. Therefore, it is > inconvenient to locate the fault. > so i think the log message is required. Ok, can you resend with the changes that Joe suggested to make this even easier to use? thanks, greg k-h