From patchwork Mon Jan 30 21:01:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 50494 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2397060wrn; Mon, 30 Jan 2023 13:07:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXvXfZ0NEQIfsiH4t6Ak/Gpjm8V3kw4yGdH1Akso0SK5wJ0I8qvwwoRBlg+VLsbuXtaSXYm0 X-Received: by 2002:a17:902:7889:b0:192:b5a8:3eb6 with SMTP id q9-20020a170902788900b00192b5a83eb6mr41827153pll.44.1675112857690; Mon, 30 Jan 2023 13:07:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675112857; cv=none; d=google.com; s=arc-20160816; b=FgQmjRX7mX80Qu0/qRfZ3S9N2Rve1prhu9wfmL204k+++xqmI7kNpNIWKwZZWu9LnC 4xNngOsE/GZ/jBnyydiXj2kldHU8rljeR4eGrBKWkmtRyGsmZ5+GtMI1qa73BQFOfdTA CGkP7j2EtRiVZm6+T6uNigE98u4s4ryfB5t59vjI8rsIKAR/DV3nod+1JyZrss0gcpk6 5BNlfnh9DRcTESuwVuFEMEXrTKtDcxb4zfSxIqy7pJiy8m+vU9wvRsCBLRC+m9Mem1RW TucElJdfYdO/x8i4E7QjbdrAFvbOaEu6PWxTvqso+jEE8Ly4xUjLcj9Wm19DmcdQ2yP+ GQWQ== 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=hjEtYXJDp6iclp+CacIWVQrUALk4651QlhNhwW9psWc=; b=A0Dz94GmRnq2ZfyoPdZToMgr5CJ9cLrw1U3D2W6inq8R33GwCPK+wnVuFKFGNqI8em 98xBviCdRfKwJC87pQvgEb2PTGgskEyB6su3r8AQfQxttL5ezWEBtFRwnfbIrmLFcDvo OSyMLqreZhjqTMoM4ck+bogfe6msYMlTSpPpXnr60O5qpoCdKg7J6cFtV4ayc3EhedTY cNsionY7iptN51gnhcmL7eMxjtj8SNLcTjSMDlFTVEpoNDro8UqcEyfgBpRYySG2k471 D1mC1veuNj2jBaO5OXn9gHRl0hfxgZ8MK/j18TcPySFOCXajKfMrHbzF5YXss4PvrgHx ej7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y07MbFOY; 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 u5-20020a17090282c500b001949d488c0asi13448323plz.508.2023.01.30.13.07.24; Mon, 30 Jan 2023 13:07:37 -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=Y07MbFOY; 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 S230308AbjA3VFH (ORCPT + 99 others); Mon, 30 Jan 2023 16:05:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbjA3VFD (ORCPT ); Mon, 30 Jan 2023 16:05:03 -0500 Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA734485BE for ; Mon, 30 Jan 2023 13:04:37 -0800 (PST) Received: by mail-io1-xd34.google.com with SMTP id o1so1171854ioo.10 for ; Mon, 30 Jan 2023 13:04:37 -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=hjEtYXJDp6iclp+CacIWVQrUALk4651QlhNhwW9psWc=; b=Y07MbFOYxOnlk9zeG1BJM4rCp26i7iCbS7OBlWQEB59AaW7LlF9gqKWobXisdIL/MV 2z0Q5JOa6hTyJg+QkolsD0W55C9JqLU9nWv+2fEKslgqMOXfmvtgVA+kXUN+GhGG2nYS MUamAqiBDqbcmxTtAdjraAICTaftm2lJuYL/lhyfeWlQuNb80ePuX+amS6b/iF/S+Ofq KH6MJoZV+8GcO6Xu1GEGa/vYvJ0qxLzmSutUdk7ln/OWKQJ01H82hw89WHDN6ikQyIMl ofmaCQVYWXFqs0hqbwK7Qs2x7kB//XUlDIdzwVNwaQE79nAZQHRk9nJbNRM2lACSGu1S zOtQ== 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=hjEtYXJDp6iclp+CacIWVQrUALk4651QlhNhwW9psWc=; b=w0lNhvX6tliH1yFZvPu8nlKjZfKknx6JX2ZIxWlZ3Ykj0bArnwUcKuM9Kk3qjI9scD 1qk8+tGAE/aZIa/xHtvVXdl9eF3STp5c/u3o+LMbEpiY6f084IY5ZUlcwm6HS/fSC/2H 9b3UcI3EazyQV98IMx2azKFwfNQMuM6vYugCGIYM9KsJJfktb1j/ylu9ni/Uq93brYnQ 3YU6Wm4SvEkl2dnuWYKufpXoW2491wVMo3rLdB4JpUrRyanF4/Ft/Dx9MmevaM30PnUb SUdAbgZawA3+H2sVxW0TVI1r0jenhVRI6U2/pFvEAy0fsaoXWWoCPsMJFJLHT701H8uL BJ6w== X-Gm-Message-State: AO0yUKWp/fiuq9SN0Oy5nt0Nqg4qrBjTvw0ANu94tIm39IdPTfZTb+QD Gx/+PDNjA7TWaR0pE6wvka8F3g== X-Received: by 2002:a6b:fb16:0:b0:71a:1b72:5afc with SMTP id h22-20020a6bfb16000000b0071a1b725afcmr4556466iog.19.1675112673912; Mon, 30 Jan 2023 13:04:33 -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.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 13:04:07 -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 8/8] net: ipa: define two new memory regions Date: Mon, 30 Jan 2023 15:01:58 -0600 Message-Id: <20230130210158.4126129-9-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?1756483139842399500?= X-GMAIL-MSGID: =?utf-8?q?1756483139842399500?= IPA v5.0 uses two memory regions not previously used. Define them and treat them as valid only for IPA v5.0. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_mem.c | 8 +++++++- drivers/net/ipa/ipa_mem.h | 8 +++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/net/ipa/ipa_mem.c b/drivers/net/ipa/ipa_mem.c index 9ec5af323f731..a07776e20cb0d 100644 --- a/drivers/net/ipa/ipa_mem.c +++ b/drivers/net/ipa/ipa_mem.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. - * Copyright (C) 2019-2022 Linaro Ltd. + * Copyright (C) 2019-2023 Linaro Ltd. */ #include @@ -163,6 +163,12 @@ static bool ipa_mem_id_valid(struct ipa *ipa, enum ipa_mem_id mem_id) return false; break; + case IPA_MEM_AP_V4_FILTER: + case IPA_MEM_AP_V6_FILTER: + if (version != IPA_VERSION_5_0) + return false; + break; + case IPA_MEM_NAT_TABLE: case IPA_MEM_STATS_FILTER_ROUTE: if (version < IPA_VERSION_4_5) diff --git a/drivers/net/ipa/ipa_mem.h b/drivers/net/ipa/ipa_mem.h index 570bfdd99bffb..868e9c20e8c41 100644 --- a/drivers/net/ipa/ipa_mem.h +++ b/drivers/net/ipa/ipa_mem.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. - * Copyright (C) 2019-2021 Linaro Ltd. + * Copyright (C) 2019-2023 Linaro Ltd. */ #ifndef _IPA_MEM_H_ #define _IPA_MEM_H_ @@ -62,13 +62,15 @@ enum ipa_mem_id { IPA_MEM_PDN_CONFIG, /* 0/2 canaries (IPA v4.0+) */ IPA_MEM_STATS_QUOTA_MODEM, /* 2/4 canaries (IPA v4.0+) */ IPA_MEM_STATS_QUOTA_AP, /* 0 canaries, optional (IPA v4.0+) */ - IPA_MEM_STATS_TETHERING, /* 0 canaries (IPA v4.0+) */ + IPA_MEM_STATS_TETHERING, /* 0 canaries, optional (IPA v4.0+) */ IPA_MEM_STATS_DROP, /* 0 canaries, optional (IPA v4.0+) */ - /* The next 5 filter and route statistics regions are optional */ + /* The next 7 filter and route statistics regions are optional */ IPA_MEM_STATS_V4_FILTER, /* 0 canaries (IPA v4.0-v4.2) */ IPA_MEM_STATS_V6_FILTER, /* 0 canaries (IPA v4.0-v4.2) */ IPA_MEM_STATS_V4_ROUTE, /* 0 canaries (IPA v4.0-v4.2) */ IPA_MEM_STATS_V6_ROUTE, /* 0 canaries (IPA v4.0-v4.2) */ + IPA_MEM_AP_V4_FILTER, /* 2 canaries (IPA v5.0) */ + IPA_MEM_AP_V6_FILTER, /* 0 canaries (IPA v5.0) */ IPA_MEM_STATS_FILTER_ROUTE, /* 0 canaries (IPA v4.5+) */ IPA_MEM_NAT_TABLE, /* 4 canaries, optional (IPA v4.5+) */ IPA_MEM_END_MARKER, /* 1 canary (not a real region) */