Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp261218rdb; Thu, 1 Feb 2024 07:52:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IHovaRtWKhsEi+fNNA6zXV6w36zvZDzGIjTKIdaSDq/a+IXKnNoK5qMXWvENZhHTJhjTAyz X-Received: by 2002:a05:6a20:dda2:b0:19c:9af5:a472 with SMTP id kw34-20020a056a20dda200b0019c9af5a472mr2668293pzb.62.1706802757120; Thu, 01 Feb 2024 07:52:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706802757; cv=pass; d=google.com; s=arc-20160816; b=muvW3WuojeC+1zDzDThjqgaJRm0jTihSsJXkxACL+agXwSHCHMdrc72cJqcpz7jhM7 h1dWZxv48SnL+pgltSOGsgfKWH1v+1gthceYi6CJiKRDdaRK+YWElm22WjG7Qpnh9IKg Pe3TnYWXKTI6duHYrBgabzA6hTGgGeTNWwlPA42jrnK4E37cXCsCd5mavpHWd28L2BkO 98DqXnbEyD0MW7T77YnZnT/yPq2FscdrwYUvBWm2NRubds2y6Qtx9JuVtdHvXtKKKIaq fz1JMonzum+UqMQh5l1subAazAFG/STh0wNxVTTSkTXmWhS4ADDGrL6cWnlAA6VEi1Tb 90Dg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=yaAN25dm5DeNElSpmwnX+9J8PFQ/cR2EqbmwMU50Nhc=; fh=ew2eVC6g0sZuQ6KJclN3SoN0fRnB/Xdz5NQG7B8kxwc=; b=OFce097j46GBsmUYPKMheTaATf7OHkaXFtykdoGMm8XBZz24mElhzIvJEGJtgF7QJd plNXujFkxcj0g8kifKYaNDdpNcz/+t6ushY3Vpjwq8hHynZdjgWBgFd2Hzb/NZG9U/d6 9AOcthu19vVBFIjZ39/UFd7lt1TslpVkr9b9WwBoUDxv9zyE9usb3uUJyfz/r6uEfCa8 n+sgSvvfN58R8wjzhjMcBrSSCgB+4HCB3UzuhH4UE4tufW+R02DV5VX1AEuiUlGqJb/s 8/5aED5qAFdkADDBbFn1oBYnJplAOmF/Kgq7K7X7gSvA0AGWQaxbqkIlKoEJ9zVyCH/f CTEA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=O0SL2YDD; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-crypto+bounces-1780-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1780-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=1; AJvYcCVtQVpvD4t1P/oKiEgUfxM8+ZQBAFk3ol6Dmz9q/k9YIpJ+oRiftrdLOkXzNviptBi/qvTJkq6ib0v9xdpwFLBOs6DwnAeS20oS+ahM+A== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id n6-20020a170902e54600b001d8a64238b5si12490873plf.174.2024.02.01.07.52.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 07:52:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-1780-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=O0SL2YDD; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-crypto+bounces-1780-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1780-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 30D0C284991 for ; Thu, 1 Feb 2024 15:42:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DACB8626C3; Thu, 1 Feb 2024 15:42:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="O0SL2YDD" X-Original-To: linux-crypto@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E1BB7626DE; Thu, 1 Feb 2024 15:41:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.55.52.93 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706802120; cv=none; b=JCNz2mIJXU4R4hFGsm3y1ve0aulox9HfGAhPSzjYbU/RMRrMIW5I0hVhkM8NC+1P6Wjh1yREy2AYOXwDGyeLX2NFMU5x79IZKBGEMMH2PZ73gzRuV8FusWsQcZDKANiLS9+2+PetBxRwnw4eSPX223cehjQ16SRH+efYQkPNY3A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706802120; c=relaxed/simple; bh=Rt9MKBvpI4q3qgP+7Cxr0ZR27vDhEiu//K4HLtSzAdk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=uEDGmaKqt1HCN0DISJLI4PMd9O8aIXfosw4KV1hW/HjrFLnBLhstGyy53ml9QaO5JNBhYZk1+EeNwnYLNZV1CejYMcJslxPsWiPKBkaD24ijDMEWd0Z1EIMzadS+XJ6LB7fgG7ntBAGPwuyucrpqfiyJtCt4GgpsH735Qy87JvI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=O0SL2YDD; arc=none smtp.client-ip=192.55.52.93 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706802118; x=1738338118; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=Rt9MKBvpI4q3qgP+7Cxr0ZR27vDhEiu//K4HLtSzAdk=; b=O0SL2YDDejRHrdL3uuSFlmGQbuY+wRyTTd4r2po00QcJ0SDU3xckFbOZ OqLCeAuFLimRN6tuDPX48NUF4kbEhXz4FgSgvxaYq2ABKa95ceXXnK8wU /T4z52g1t9H+ZjwPeKepfxixiXl7tUDbH1Dp9d2Z/jqbwBRlbHpPzs/aU lEuHaMonRl0dXCy3GImHJ8OHzX3uS/ii/WgRvCU10topABQHxT1JUwy6B 92wvcTJ+j5k/K1eZc5VluZy38hbGQIcmEgSKM6KYWfGylINBAdiX+qL+2 pPC3F01yBZJZuFx8PZftRGWhVR90SrC3sZiM7Q6+fFX8lVAa1DGfaIQ9D w==; X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="401052875" X-IronPort-AV: E=Sophos;i="6.05,234,1701158400"; d="scan'208";a="401052875" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2024 07:41:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,234,1701158400"; d="scan'208";a="133290" Received: from qat-server-archercity1.sh.intel.com ([10.67.111.115]) by orviesa007.jf.intel.com with ESMTP; 01 Feb 2024 07:41:56 -0800 From: Xin Zeng To: herbert@gondor.apana.org.au, alex.williamson@redhat.com, jgg@nvidia.com, yishaih@nvidia.com, shameerali.kolothum.thodi@huawei.com, kevin.tian@intel.com Cc: linux-crypto@vger.kernel.org, kvm@vger.kernel.org, qat-linux@intel.com, Xin Zeng Subject: [PATCH 02/10] crypto: qat - relocate and rename 4xxx PF2VM definitions Date: Thu, 1 Feb 2024 23:33:29 +0800 Message-Id: <20240201153337.4033490-3-xin.zeng@intel.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20240201153337.4033490-1-xin.zeng@intel.com> References: <20240201153337.4033490-1-xin.zeng@intel.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Move and rename ADF_4XXX_PF2VM_OFFSET and ADF_4XXX_VM2PF_OFFSET to ADF_GEN4_PF2VM_OFFSET and ADF_GEN4_VM2PF_OFFSET respectively. These definitions are moved from adf_gen4_pfvf.c to adf_gen4_hw_data.h as they are specific to GEN4 and not just to qat_4xxx. This change is made in anticipation of their use in live migration. This does not introduce any functional change. Signed-off-by: Xin Zeng Reviewed-by: Giovanni Cabiddu --- drivers/crypto/intel/qat/qat_common/adf_gen4_hw_data.h | 4 ++++ drivers/crypto/intel/qat/qat_common/adf_gen4_pfvf.c | 8 +++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/crypto/intel/qat/qat_common/adf_gen4_hw_data.h b/drivers/crypto/intel/qat/qat_common/adf_gen4_hw_data.h index 7d8a774cadc8..9cabbb5ce96b 100644 --- a/drivers/crypto/intel/qat/qat_common/adf_gen4_hw_data.h +++ b/drivers/crypto/intel/qat/qat_common/adf_gen4_hw_data.h @@ -197,6 +197,10 @@ do { \ /* Arbiter threads mask with error value */ #define ADF_GEN4_ENA_THD_MASK_ERROR GENMASK(ADF_NUM_THREADS_PER_AE, 0) +/* PF2VM communication channel */ +#define ADF_GEN4_PF2VM_OFFSET(i) (0x40B010 + (i) * 0x20) +#define ADF_GEN4_VM2PF_OFFSET(i) (0x40B014 + (i) * 0x20) + void adf_gen4_set_ssm_wdtimer(struct adf_accel_dev *accel_dev); enum icp_qat_gen4_slice_mask { diff --git a/drivers/crypto/intel/qat/qat_common/adf_gen4_pfvf.c b/drivers/crypto/intel/qat/qat_common/adf_gen4_pfvf.c index 8e8efe93f3ee..21474d402d09 100644 --- a/drivers/crypto/intel/qat/qat_common/adf_gen4_pfvf.c +++ b/drivers/crypto/intel/qat/qat_common/adf_gen4_pfvf.c @@ -6,12 +6,10 @@ #include "adf_accel_devices.h" #include "adf_common_drv.h" #include "adf_gen4_pfvf.h" +#include "adf_gen4_hw_data.h" #include "adf_pfvf_pf_proto.h" #include "adf_pfvf_utils.h" -#define ADF_4XXX_PF2VM_OFFSET(i) (0x40B010 + ((i) * 0x20)) -#define ADF_4XXX_VM2PF_OFFSET(i) (0x40B014 + ((i) * 0x20)) - /* VF2PF interrupt source registers */ #define ADF_4XXX_VM2PF_SOU 0x41A180 #define ADF_4XXX_VM2PF_MSK 0x41A1C0 @@ -29,12 +27,12 @@ static const struct pfvf_csr_format csr_gen4_fmt = { static u32 adf_gen4_pf_get_pf2vf_offset(u32 i) { - return ADF_4XXX_PF2VM_OFFSET(i); + return ADF_GEN4_PF2VM_OFFSET(i); } static u32 adf_gen4_pf_get_vf2pf_offset(u32 i) { - return ADF_4XXX_VM2PF_OFFSET(i); + return ADF_GEN4_VM2PF_OFFSET(i); } static void adf_gen4_enable_vf2pf_interrupts(void __iomem *pmisc_addr, u32 vf_mask) -- 2.18.2