From patchwork Mon Jan 30 21:01:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 50488 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2396511wrn; Mon, 30 Jan 2023 13:06:17 -0800 (PST) X-Google-Smtp-Source: AK7set+jz6slxIDYZPDsE8skvi2eFXVWzN43qjtUUmfRMVEOe3wE1Hfm4uvxmx1d8TwAy6FoLf57 X-Received: by 2002:a17:90b:1bd1:b0:22c:9078:181 with SMTP id oa17-20020a17090b1bd100b0022c90780181mr7232886pjb.33.1675112777300; Mon, 30 Jan 2023 13:06:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675112777; cv=none; d=google.com; s=arc-20160816; b=EGnM/LnymyH4rOrUbGq5XwjCHYcMC7p9jtwcrQlBWXPkdc5FzQiOVbkBupmT7XnuYV URCf9eCAmWWh2TYwc6HzKcYgwWmR+NU9xtx59Se40LMyip5W/HyZmFisMJg0PYqWNBq/ 3pr/TITQ/DfOc7PSM+8jOWYd+S0bHR9GyBfNtq1OVEH3xOawrVogCY68IqYt3g6QfG+B F1rkeR/HeYrU3LUsC/S1N2TBaUzUYqioNvmfIj6tGiyVlTC4QrK7x5LE7Ceu58Pwjuc2 wC/5qtqwIbEHSuLKv/bdGLGabOeJTs49TZEAk307kFnzRwJ8RX1EztsRLgLbkNEBtz/m QXog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dM0y1yQcXWiFMZI5D02Tn6gafxuwKDl7gTmaBAdj+n8=; b=tHasm6NQDZ61WNEPIMKZvzVWc2gFcyOsVkEiaCsRBclx97rJ535ApylHdTLqnlASes +/0Nq/GEFhLTpzNDtQv7W4kwQgRkiZQBWGy5sR3UhIsRrhXhmvKyPQl/3ZixhcyhcHzL n6EUAWDed0SdnvELuSBWtUcLJMoFQFd1DmNhAFhySZM72nQnrHY5GbVeEeyQp3qYLbVV ykF/MsB0iom8Zl84Z4U2nMva2qGRZROYa9crlevMhUIHUTuW5WJHAvXCrvFkt2I9vfbV N/Vx3N+N0jT7VmQpW19o6+6ZPeL5mUcBPx3vSQV5DcT88KmCrwd7s0Ihpn5S5Vj83BJ6 h9iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j5jAfAy0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y30-20020a63b51e000000b004da2c9dcc73si12451527pge.868.2023.01.30.13.06.04; Mon, 30 Jan 2023 13:06:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j5jAfAy0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230267AbjA3VEB (ORCPT + 99 others); Mon, 30 Jan 2023 16:04:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230285AbjA3VDz (ORCPT ); Mon, 30 Jan 2023 16:03:55 -0500 Received: from mail-il1-x12e.google.com (mail-il1-x12e.google.com [IPv6:2607:f8b0:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92EF01E1CC for ; Mon, 30 Jan 2023 13:03:53 -0800 (PST) Received: by mail-il1-x12e.google.com with SMTP id u7so4174757ilg.4 for ; Mon, 30 Jan 2023 13:03:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dM0y1yQcXWiFMZI5D02Tn6gafxuwKDl7gTmaBAdj+n8=; b=j5jAfAy0SfjdnpKaxOWTdmx/JhW/AWmoGzSpAwZUmP2Zy0IlmVplU1xuKKrZZzLUGg U5vlw8wBNxGR90mztzFpVIZqQcodf/ypx7ZOqk0s5VRfIvtFH2p6YlkbRhCWxchapwjZ 5otexYaTtN87Sm4eXhINjgEhpkoJEqu0JmET4JZlDVepOS9qNmf5qBPnh1aAG6fMFcdV PjyuObiUZCHp6PvWmnuQ3BZtJ0PRbMHUX4zFn3qzQTmuOvnJXcETzLCGerEl6146b3Ev moD7AR+V2+HIaF5VrqRAmkdsgLWav0N8wzUpni3rtbYiciLAJdHARcFUkgvuRq0j7Mxx YdpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dM0y1yQcXWiFMZI5D02Tn6gafxuwKDl7gTmaBAdj+n8=; b=CrZitPdRCGrgpUfSPdt28795QVAFP2CG9Jw3K0lBKvN/uV2+R7pheASj4H5FeLBY/6 vL8AoAW7V2dvjGg3E297K1XvN4EfYITTUTUn99ZOOm+vuQBIMrFxeFl1ihgmMSCC/ImF wErdGo2/x2FEWflQVfV7pPC3BPl2NoWxtzs21j/VtgdErkgUtS9OiLapsgZ0VlovUEXi 9/oe6dU4rGTVjfaf+tyfUXVM8gZnoPGAlO9aBLwZXKAeIg0eqcFb7TmuEXCVEwKVqmeY 9tt8eHJg6WUPDMdAS2qtD/Ih2gp9QoIKHIzp6vYKpdWDLUn8U460Svgel1eeT43mm5Dv 8jNA== X-Gm-Message-State: AO0yUKXOTb0aC16izCEsFni6BQSrSSIBNFPaGk86QAU81kDz0LzPte+s 7fYkQWwly8flNAUu+cm8UVDV6g== X-Received: by 2002:a05:6e02:1e08:b0:310:f849:83b9 with SMTP id g8-20020a056e021e0800b00310f84983b9mr4044843ila.9.1675112632939; Mon, 30 Jan 2023 13:03:52 -0800 (PST) Received: from presto.localdomain ([98.61.227.136]) by smtp.gmail.com with ESMTPSA id a30-20020a02735e000000b003aef8fded9asm1992046jae.127.2023.01.30.13.03.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 13:03:52 -0800 (PST) From: Alex Elder To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: caleb.connolly@linaro.org, mka@chromium.org, evgreen@chromium.org, andersson@kernel.org, quic_cpratapa@quicinc.com, quic_avuyyuru@quicinc.com, quic_jponduru@quicinc.com, quic_subashab@quicinc.com, elder@kernel.org, netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 6/8] net: ipa: greater timer granularity options Date: Mon, 30 Jan 2023 15:01:56 -0600 Message-Id: <20230130210158.4126129-7-elder@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230130210158.4126129-1-elder@linaro.org> References: <20230130210158.4126129-1-elder@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756483055729982159?= X-GMAIL-MSGID: =?utf-8?q?1756483055729982159?= Starting with IPA v5.0, the head-of-line blocking timer has more than two pulse generators available to define timer granularity. To prepare for that, change the way the field value is encoded to use ipa_reg_encode() rather than ipa_reg_bit(). The aggregation granularity selection could (in principle) also use an additional pulse generator starting with IPA v5.0. Encode the AGGR_GRAN_SEL field differently to allow that as well. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_endpoint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ipa/ipa_endpoint.c b/drivers/net/ipa/ipa_endpoint.c index 8909ba8bfd0e9..c029209191d41 100644 --- a/drivers/net/ipa/ipa_endpoint.c +++ b/drivers/net/ipa/ipa_endpoint.c @@ -965,7 +965,7 @@ static u32 aggr_time_limit_encode(struct ipa *ipa, const struct ipa_reg *reg, ret = ipa_qtime_val(microseconds, max); if (ret < 0) { val = -ret; - gran_sel = ipa_reg_bit(reg, AGGR_GRAN_SEL); + gran_sel = ipa_reg_encode(reg, AGGR_GRAN_SEL, 1); } else { val = ret; gran_sel = 0; @@ -1057,7 +1057,7 @@ static u32 hol_block_timer_encode(struct ipa *ipa, const struct ipa_reg *reg, ret = ipa_qtime_val(microseconds, max); if (ret < 0) { val = -ret; - gran_sel = ipa_reg_bit(reg, TIMER_GRAN_SEL); + gran_sel = ipa_reg_encode(reg, TIMER_GRAN_SEL, 1); } else { val = ret; gran_sel = 0;