Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2392858lqp; Sun, 24 Mar 2024 17:28:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWEpx+cb4hyc9pOYG8ogTCcrIiqjqKXF3XQUKL4QZ2/gKMrJI8k63fDTzV4vJ0sDSwU9uUIjs+IEo9afw1eT93UUufujEkzYSTYbiWAwg== X-Google-Smtp-Source: AGHT+IFF6n/xakobyp4ptKxXpWUvfXhT8lFmOIHeGwHhmobMUbntFbzYvTMJS+GXFHoQyWmndGeo X-Received: by 2002:a50:954f:0:b0:564:f6d5:f291 with SMTP id v15-20020a50954f000000b00564f6d5f291mr3316916eda.34.1711326498983; Sun, 24 Mar 2024 17:28:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711326498; cv=pass; d=google.com; s=arc-20160816; b=xPEA7prk86ClPafSkWkW2XhHSnC5T1YQ2CISSA33pwo57otyZfT9cwaeaB2hKY1tDD EpK+nhhsA+NoTMzuOVBEjaw/J/W1sa6FoY3h+r2fPXkmmD1lRnzJzKkVVTLPFhBH5Jh/ UXksdPc8cjxYGKD3ZgZGecstjL0ufcJisKoXOQoDV1LxSeSv46LhUT4FVh14p1pi1jjr BnpKgVxLTL1JcNVZ7Q1dUhFIRLrsT4kQcZ/j4MAWPtkstG6wLFj6kJ5D6Jtp6GVrzdYi Ev98Kwp/cTK9DRgImRMH6NUp8XjQ+d73uZ6X8z7/G+Xv4v7O4/OTPD/90s0AwSxi1B7B jIYg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=HqpbFwtD4yNChcHMkUlfonIMD8hvGvtgEhBN/ooDvpg=; fh=V2A24os7/jwHnE6pEIGQfrk9QpYW1EGxI8SdFfzMtXI=; b=uvfwNP/ENC1ryV1MfihHdvy3E7seEN/nV9/76Hf/yfnRXqlnLxat3hlUxglJ3eTSID m/1SsnMFTTdWbYoAMZ7z7qijkepGPNAZRY0sW6DdIUfAQveBF4shQOy59UoRidSZ/8dI Uz7qCzHiIDaMiq3oc0T72jcvZXimgIhH8VGMhtTutojxAT8VFUGifxjQ6OJ65NTkI0nm xmnnj29P6uSgIzmhbXRW51WQIfDYqzNU33M9QVJ5gdLMrm0bX7tAGkXpqGs2oufwOUs6 rw9hZfb5lqMtBlxlovX0ilOtzjRrlGeS5cMKT1HtkhDVjr8h8gzX20M2hWp4/eR/+J/P CrQQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PDMqmxLi; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113362-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113362-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id p14-20020a056402044e00b0056bac278df7si2081385edw.512.2024.03.24.17.28.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 17:28:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113362-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PDMqmxLi; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113362-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113362-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 39DAB1F2501B for ; Mon, 25 Mar 2024 00:18:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 68A8619CAC8; Sun, 24 Mar 2024 22:42:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PDMqmxLi" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8578C19C3D5; Sun, 24 Mar 2024 22:42:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320163; cv=none; b=GhRcvnFXjzQyQ/viKaJ++FD6W+oFw5n8RT0BgAmfxBx378tNbp+VeNr6BCg16a5SwQpra+Q3BCiz16mr+aXNkpvc6ovkOrvJAFgvQooflX1rSufc26hca8Ln+BHw2/ne7AEz44R3ZNNRY452z001+BYxVYCrTGBpuXyX4IlYdaY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320163; c=relaxed/simple; bh=4oJ854NlLxpw6GGC2faTFne/mnmaH0Ek75Xm2V29Cs8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HPjSAfbS8UtN5gHf1sYfgnwGQtywBkihfVfIIFBzNjrX/Hu/aFhsLT2rD3xHnYk56HmmOWph/rcDCLNP3NlcqTf7LloOxXXmaaKM+KPFk4Ovn6WL306anGZRraIeKcVqzwPve9HPxi10128BW6bX5iNt88x1d7kl0jnh2tpXW5I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PDMqmxLi; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACBADC43394; Sun, 24 Mar 2024 22:42:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320163; bh=4oJ854NlLxpw6GGC2faTFne/mnmaH0Ek75Xm2V29Cs8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PDMqmxLiAB8Y6zHWFraezJSDRQgabG8tEJx4MOfovW13JnLJPBX106NnYYj0TqArb 8wXs8jQy6Q/4nEquAeaLQqiIc+Bh5kKiPVMNz4xX2Q8a2z+IUGElxHnu9YRh9ROxgi aneALNDFl4Ibhwt7hW7Vvfx5AzJeW0Kxe+oCCZej8KHrl5n9g9FdW7sVefWz0nvCrj fYlosO/m37xD7tedyxu6JU6krWr8wrNvY7T1Yj0GvcHSd1tvjE4TWawqfTSDe/TwBo aKxJ2Na6ex65ZGRa+dxI3VHY1n/kqMLBp9FnAjsqbZrINaGrQSJNHjN1HtNGp2aUwd 9kFzYPyzR0kvg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Damian Muszynski , Giovanni Cabiddu , Herbert Xu , Sasha Levin Subject: [PATCH 6.8 471/715] crypto: qat - fix ring to service map for dcc in 4xxx Date: Sun, 24 Mar 2024 18:30:50 -0400 Message-ID: <20240324223455.1342824-472-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Damian Muszynski [ Upstream commit df018f82002a8b4dc407bc9a6f416b9241d14415 ] If a device is configured for data compression chaining (dcc), half of the engines are loaded with the symmetric crypto image and the rest are loaded with the compression image. However, in such configuration all rings can handle compression requests. Fix the ring to service mapping so that when a device is configured for dcc, the ring to service mapping reports that all rings in a bank can be used for compression. Fixes: a238487f7965 ("crypto: qat - fix ring to service map for QAT GEN4") Signed-off-by: Damian Muszynski Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c b/drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c index 94a0ebb03d8c9..e171cddf6f025 100644 --- a/drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c +++ b/drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c @@ -331,6 +331,13 @@ static u16 get_ring_to_svc_map(struct adf_accel_dev *accel_dev) if (!fw_config) return 0; + /* If dcc, all rings handle compression requests */ + if (adf_get_service_enabled(accel_dev) == SVC_DCC) { + for (i = 0; i < RP_GROUP_COUNT; i++) + rps[i] = COMP; + goto set_mask; + } + for (i = 0; i < RP_GROUP_COUNT; i++) { switch (fw_config[i].ae_mask) { case ADF_AE_GROUP_0: @@ -359,6 +366,7 @@ static u16 get_ring_to_svc_map(struct adf_accel_dev *accel_dev) } } +set_mask: ring_to_svc_map = rps[RP_GROUP_0] << ADF_CFG_SERV_RING_PAIR_0_SHIFT | rps[RP_GROUP_1] << ADF_CFG_SERV_RING_PAIR_1_SHIFT | rps[RP_GROUP_0] << ADF_CFG_SERV_RING_PAIR_2_SHIFT | -- 2.43.0