Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4153746rdh; Tue, 28 Nov 2023 13:23:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IEQpdUOjNKk8OG0ARS93nZBhmFyX6AtqVs6gbNApmDk21aXkB2etZwtdLV9coY0T2TH9KP+ X-Received: by 2002:a05:6830:1491:b0:6bc:f999:a544 with SMTP id s17-20020a056830149100b006bcf999a544mr18453931otq.15.1701206617740; Tue, 28 Nov 2023 13:23:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701206617; cv=none; d=google.com; s=arc-20160816; b=Itcx3g1Kaoy/wNd5g8hraySOQEJy+ZbGliZMEUXX4wq6+bz+B6tn/rLrx4qFMiQ9Zd hPuaJM31A4GA8IRtDCcZf/w1k4FEElAnbBxnNSPhthrQIQcP9fuBq2MDGzZPlgguAIdF TfGBfg+67rkAVPHpKY8flS/mOJ5gthlP/CH+KuGHIn2+7Qn1ToU76zhTD/C90jnZ65YC 3lcDchjtIBrUoU5HtG2YP0T46PiL6q6XAqDqP4F4FQysqGYeYeAFsNK/frsEfIq4r8VT h1ulu0tKxnznHsc/x+YMFQb+kR2eX5/J15BpJ+XjW7Cxln8RyE/8KXC9gjsu/K72A4QI B+ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=tt5hmzj1EOpvu9Yme4lhjQAtOJo1nqVur/yv50gYyqs=; fh=YdHTU7+bgVBYkakqZrCzx6k0QHn30uASPLJOR2aip2s=; b=jsDBd2iapyModn/iGpYndWoWnMKJ/C+4lD7oM6utwVeKaHI4rGhWP1ksDMf6DOu6Bm Sz0iEcL4NHwZySxY0oUZEBBxc/bMyY5f1q6XuzOfva6ZWrcTdP4O8kw6vSLG8N7OKgVL /rQ+1tvUlrKr+Osfx74++QXEauNERloXWyaT69w5CMdVxTQNJhfr9wv7v1kn0ldCs3Vk RH1CzpGVE/hH8DFyXOnWjLkCGgzjYWNGDTQ4mjQJsZM/7nCssyV81seghAZGqdRLft9f 5z0RljuF5qimz26wUJuORz1s7bvIqBlMH03OGirv7k+elIu+/JFp5X8m7/xZMr88Fbe+ C6Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RPQpPMW9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id d21-20020a656215000000b005bda1051dacsi12716230pgv.471.2023.11.28.13.23.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 13:23:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RPQpPMW9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 7CF6B804C22F; Tue, 28 Nov 2023 13:23:36 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234992AbjK1VX1 (ORCPT + 99 others); Tue, 28 Nov 2023 16:23:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234990AbjK1VXP (ORCPT ); Tue, 28 Nov 2023 16:23:15 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1F1361A1; Tue, 28 Nov 2023 13:16:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701206195; x=1732742195; h=message-id:subject:from:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=u3LLIxB0xpITkynhMFsp2gJVUo9d/a86JchoCpeKieE=; b=RPQpPMW9tqmz+W1p3C3qrvhNPyHF8A+pzA5IdL03AJqOLDpvib5R9CdI aphGyj8XUo4hCniQtTDNp3+Ic8bC1+DODyFZhz/H2hYycvHOsSyt87zvq FqyOmsOOGNVwhtuN5FIBDEIpFCK4jmNvbwT7BBQwQwwXPpje+X7V9PZMO fRVB1iks5gQ4WiUh7XJz6z1aCO5RkUhJ8gkK/9fb8TOrzpY5qg2XFle1z DVCIJUOe3LyvuYBlZfOPM4je8cqmkmNaEWEMKIifoor70ZcwKVtWZe1BR biLjOU65N3cf+2z9iWmvkrnBo8DPWLEXq1JTWPNJNyyV0bUe3HCe4+3EO g==; X-IronPort-AV: E=McAfee;i="6600,9927,10908"; a="14594451" X-IronPort-AV: E=Sophos;i="6.04,234,1695711600"; d="scan'208";a="14594451" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Nov 2023 13:09:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10908"; a="886574132" X-IronPort-AV: E=Sophos;i="6.04,234,1695711600"; d="scan'208";a="886574132" Received: from arelysna-mobl3.amr.corp.intel.com ([10.209.144.161]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Nov 2023 13:09:26 -0800 Message-ID: Subject: Re: [PATCH v10 14/14] dmaengine: idxd: Add support for device/wq defaults From: Tom Zanussi To: Fenghua Yu , herbert@gondor.apana.org.au, davem@davemloft.net, vkoul@kernel.org Cc: dave.jiang@intel.com, tony.luck@intel.com, wajdi.k.feghali@intel.com, james.guilford@intel.com, kanchana.p.sridhar@intel.com, vinodh.gopal@intel.com, giovanni.cabiddu@intel.com, pavel@ucw.cz, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, dmaengine@vger.kernel.org Date: Tue, 28 Nov 2023 15:09:06 -0600 In-Reply-To: <00aa3b9f-d81e-3dc2-3fb0-bb79e16564d3@intel.com> References: <20231127202704.1263376-1-tom.zanussi@linux.intel.com> <20231127202704.1263376-15-tom.zanussi@linux.intel.com> <00aa3b9f-d81e-3dc2-3fb0-bb79e16564d3@intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 MIME-Version: 1.0 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 28 Nov 2023 13:23:36 -0800 (PST) Hi Fenghua, On Tue, 2023-11-28 at 12:31 -0800, Fenghua Yu wrote: > Hi, Tom, >=20 > On 11/27/23 12:27, Tom Zanussi wrote: > > Add a load_device_defaults() function pointer to struct > > idxd_driver_data, which if defined, will be called when an idxd > > device > > is probed and will allow the idxd device to be configured with > > default > > values. > >=20 > > The load_device_defaults() function is passed an idxd device to > > work > > with to set specific device attributes. > >=20 > > Also add a load_device_defaults() implementation IAA devices; > > future > > patches would add default functions for other device types such as > > DSA. > >=20 > > The way idxd device probing works, if the device configuration is > > valid at that point e.g. at least one workqueue and engine is > > properly > > configured then the device will be enabled and ready to go. > >=20 > > The IAA implementation, idxd_load_iaa_device_defaults(), configures > > a > > single workqueue (wq0) for each device with the following default > > values: > >=20 > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mode=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 "dedicated" > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 threshold=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A00 > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 size=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A016 >=20 > Why is it 16? >=20 > If wqcap supports less than 16, configuring wq size 16 will fail. > If wqcap supports more than 16, wq size 16 uses less wq size than=20 > capable and less performance. >=20 > Is it better to set wq size as total wq size reported in wqcap? Yes, good point. I'll calculate this based on wqcap. > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 priority=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A010 > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 type=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0IDXD_WQT_KERNEL > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 group=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A00 > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 name=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "iaa_crypto" > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 driver_name=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 "crypto" > >=20 > > Note that this now adds another configuration step for any users > > that > > want to configure their own devices/workqueus with something > > different > > in that they'll first need to disable (in the case of IAA) wq0 and > > the > > device itself before they can set their own attributes and re- > > enable, > > since they've been already been auto-enabled.=C2=A0 Note also that in > > order > > for the new configuration to be applied to the deflate-iaa crypto > > algorithm the iaa_crypto module needs to unregister the old > > version, > > which is accomplished by removing the iaa_crypto module, and > > re-registering it with the new configuration by reinserting the > > iaa_crypto module. > >=20 > > Signed-off-by: Tom Zanussi > > --- > > =C2=A0 drivers/dma/idxd/Makefile=C2=A0=C2=A0 |=C2=A0 2 +- > > =C2=A0 drivers/dma/idxd/defaults.c | 53 > > +++++++++++++++++++++++++++++++++++++ > > =C2=A0 drivers/dma/idxd/idxd.h=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 4 +++ > > =C2=A0 drivers/dma/idxd/init.c=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 7 +++++ > > =C2=A0 4 files changed, 65 insertions(+), 1 deletion(-) > > =C2=A0 create mode 100644 drivers/dma/idxd/defaults.c > >=20 > > diff --git a/drivers/dma/idxd/Makefile b/drivers/dma/idxd/Makefile > > index c5e679070e46..2b4a0d406e1e 100644 > > --- a/drivers/dma/idxd/Makefile > > +++ b/drivers/dma/idxd/Makefile > > @@ -4,7 +4,7 @@ obj-$(CONFIG_INTEL_IDXD_BUS) +=3D idxd_bus.o > > =C2=A0 idxd_bus-y :=3D bus.o > > =C2=A0=20 > > =C2=A0 obj-$(CONFIG_INTEL_IDXD) +=3D idxd.o > > -idxd-y :=3D init.o irq.o device.o sysfs.o submit.o dma.o cdev.o > > debugfs.o > > +idxd-y :=3D init.o irq.o device.o sysfs.o submit.o dma.o cdev.o > > debugfs.o defaults.o > > =C2=A0=20 > > =C2=A0 idxd-$(CONFIG_INTEL_IDXD_PERFMON) +=3D perfmon.o > > =C2=A0=20 > > diff --git a/drivers/dma/idxd/defaults.c > > b/drivers/dma/idxd/defaults.c > > new file mode 100644 > > index 000000000000..a0c9faad8efe > > --- /dev/null > > +++ b/drivers/dma/idxd/defaults.c > > @@ -0,0 +1,53 @@ > > +// SPDX-License-Identifier: GPL-2.0 > > +/* Copyright(c) 2023 Intel Corporation. All rights rsvd. */ > > +#include > > +#include "idxd.h" > > + > > +int idxd_load_iaa_device_defaults(struct idxd_device *idxd) > > +{ > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0struct idxd_engine *engine; > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0struct idxd_group *group; > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0struct idxd_wq *wq; > > + > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (!test_bit(IDXD_FLAG_CONF= IGURABLE, &idxd->flags)) > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0return 0; > > + > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0wq =3D idxd->wqs[0]; > > + > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (wq->state !=3D IDXD_WQ_D= ISABLED) > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0return -EPERM; > > + > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0/* set mode to "dedicated" *= / > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0set_bit(WQ_FLAG_DEDICATED, &= wq->flags); > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0wq->threshold =3D 0; > > + > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0/* set size to 16 */ > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0wq->size =3D 16; > > + > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0/* set priority to 10 */ > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0wq->priority =3D 10; > > + > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0/* set type to "kernel" */ > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0wq->type =3D IDXD_WQT_KERNEL= ; > > + > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0/* set wq group to 0 */ > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0group =3D idxd->groups[0]; > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0wq->group =3D group; > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0group->num_wqs++; > > + > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0/* set name to "iaa_crypto" = */ > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0memset(wq->name, 0, WQ_NAME_= SIZE + 1); > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0strscpy(wq->name, "iaa_crypt= o", WQ_NAME_SIZE + 1); >=20 > Is strcpy(wq->name, "iaa_crypto") simpler than memset() and > strscpy()? That's what I originally had, but checkpatch complained about it, suggesting strscpy, so I changed it to make checkpatch happy. >=20 > > + > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0/* set driver_name to "crypt= o" */ > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0memset(wq->driver_name, 0, D= RIVER_NAME_SIZE + 1); > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0strscpy(wq->driver_name, "cr= ypto", DRIVER_NAME_SIZE + 1); >=20 > Is strcpy(wq->driver_name, "crypto") simpler? Same here. Thanks, Tom >=20 > > + > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0engine =3D idxd->engines[0]; > > + > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0/* set engine group to 0 */ > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0engine->group =3D idxd->grou= ps[0]; > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0engine->group->num_engines++= ; > > + > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0return 0; > > +} > > diff --git a/drivers/dma/idxd/idxd.h b/drivers/dma/idxd/idxd.h > > index 62ea21b25906..47de3f93ff1e 100644 > > --- a/drivers/dma/idxd/idxd.h > > +++ b/drivers/dma/idxd/idxd.h > > @@ -277,6 +277,8 @@ struct idxd_dma_dev { > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0struct dma_device dma; > > =C2=A0 }; > > =C2=A0=20 > > +typedef int (*load_device_defaults_fn_t) (struct idxd_device > > *idxd); > > + > > =C2=A0 struct idxd_driver_data { > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0const char *name_prefix= ; > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0enum idxd_type type; > > @@ -286,6 +288,7 @@ struct idxd_driver_data { > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0int evl_cr_off; > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0int cr_status_off; > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0int cr_result_off; > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0load_device_defaults_fn_t lo= ad_device_defaults; > > =C2=A0 }; > > =C2=A0=20 > > =C2=A0 struct idxd_evl { > > @@ -730,6 +733,7 @@ void idxd_unregister_devices(struct idxd_device > > *idxd); > > =C2=A0 void idxd_wqs_quiesce(struct idxd_device *idxd); > > =C2=A0 bool idxd_queue_int_handle_resubmit(struct idxd_desc *desc); > > =C2=A0 void multi_u64_to_bmap(unsigned long *bmap, u64 *val, int count)= ; > > +int idxd_load_iaa_device_defaults(struct idxd_device *idxd); > > =C2=A0=20 > > =C2=A0 /* device interrupt control */ > > =C2=A0 irqreturn_t idxd_misc_thread(int vec, void *data); > > diff --git a/drivers/dma/idxd/init.c b/drivers/dma/idxd/init.c > > index 0eb1c827a215..14df1f1347a8 100644 > > --- a/drivers/dma/idxd/init.c > > +++ b/drivers/dma/idxd/init.c > > @@ -59,6 +59,7 @@ static struct idxd_driver_data idxd_driver_data[] > > =3D { > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0.evl_cr_off =3D offsetof(struct iax_evl_entry, c= r), > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0.cr_status_off =3D offsetof(struct > > iax_completion_record, status), > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0.cr_result_off =3D offsetof(struct > > iax_completion_record, error_code), > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0.load_device_defaults =3D > > idxd_load_iaa_device_defaults, > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0}, > > =C2=A0 }; > > =C2=A0=20 > > @@ -745,6 +746,12 @@ static int idxd_pci_probe(struct pci_dev > > *pdev, const struct pci_device_id *id) > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0goto err; > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0} > > =C2=A0=20 > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (data->load_device_defaul= ts) { > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0rc =3D data->load_device_defaults(idxd); > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0if (rc) > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0dev_wa= rn(dev, "IDXD loading device defaults > > failed\n"); > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0} > > + > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0rc =3D idxd_register_de= vices(idxd); > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (rc) { > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0dev_err(dev, "IDXD sysfs setup failed\n"); >=20 > Thanks. >=20 > -Fenghua