From patchwork Wed Jan 4 17:52:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 3568 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp5274979wrt; Wed, 4 Jan 2023 09:58:04 -0800 (PST) X-Google-Smtp-Source: AMrXdXsT8Vw++CX0L5FyYyPOAnYRK0OPKuf/3suT0e98ePWsBbAiPWNbu0/eF70yAH+zg/pV1mZj X-Received: by 2002:a17:907:1b0b:b0:7c1:6344:84a with SMTP id mp11-20020a1709071b0b00b007c16344084amr65405276ejc.5.1672855084631; Wed, 04 Jan 2023 09:58:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672855084; cv=none; d=google.com; s=arc-20160816; b=rPzJw8R3/PrhE2/Cnj3/MC8SVRaRI/0AkDKt8ZxeCGYnmeRDTNiTT3Dd5XpWlkqI/g S5WKvP89iEHCezeOtEmwtoTeKeNgsic6ewWqBTmGwDtOGaf2XsVEDwSQOv4VV8qlCt7B yAZe/3Ehn+/62okfla9MpBtgNjkbmR9XQqUrfAnEf0iUjvGZwC9QooKACCdJuHnCo7mr USUUBKdmQ44yiW9UVMxQjHUB8vxcxMlwJOpMwbxrvu++O1McCag7eWoYNOhg+9XINZyK 9ApwfdkwK5we4FG5q6Pf2l+WCFD+qvBin3iE/1v/jpqwtX4qVh3HaqfK9P79Kv8xNUQo RS2A== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=fg/enfb4RCctdkewRQV7tDb9j91n7CjfohPG/ug4xNA=; b=BQuEyLrSonaHXKw49mlm3iYcWR30QbESd7gPJJ0LZsf0rx/IVpsxPaIhAWZyFfhAX2 t89hHwFYIQTrISsqP1l++jeG1AS+S5xDuipxhBMOUYfa5r7MFWoZmBIIctho5NYxcOFZ +wffq8n1Hv99jqrIVuDupPdGXDD1wvKUUR9ByzdmqRfDxDNV4TYDuPxsVTU0KN3V75uk 8A/2+8SonGaQc0U80sNj4AJjtv8kFuxn5DtMOhoVClgM5EEKMF4QcsB4j9lLeUXhnGG4 Dj0tFq6l18taWjjMq+gkMr96YfP5jnZdQ9l1h62ft9ucOaHcjqtfb10vZnWsCuhgerOO tvSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="UJ/LrgnN"; 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 sd22-20020a1709076e1600b007c17efb64fcsi30993561ejc.639.2023.01.04.09.57.41; Wed, 04 Jan 2023 09:58:04 -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="UJ/LrgnN"; 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 S240001AbjADRwz (ORCPT + 99 others); Wed, 4 Jan 2023 12:52:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239892AbjADRwn (ORCPT ); Wed, 4 Jan 2023 12:52:43 -0500 Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 305F73476E for ; Wed, 4 Jan 2023 09:52:38 -0800 (PST) Received: by mail-io1-xd2f.google.com with SMTP id g20so18392225iob.2 for ; Wed, 04 Jan 2023 09:52:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=fg/enfb4RCctdkewRQV7tDb9j91n7CjfohPG/ug4xNA=; b=UJ/LrgnN4pcaz198G+5P7BM0ISpetZ/ZOmv/tKYGHv49MGNMuNjbcTvgQhYh/TLb88 sO/rvZOiWLxuI4oZx9bDghFf/Br/1GqbVVks/ONde/4HhZpXT6LcTfS53bY7tOYCgnYK tUpw/6Ki9kcq90w7Q6Sb11fvO0csYO/Nyqkt+qWgW3uctLqb3J9cDAUBHB7K4arOj4eD CzhlyNjJaEr2HjWwCIaIfenzkZMn0cRuJYw0HN9SuPnpMhgYZPEUHIztE2d3duFb8W9x IarZy11oiY+Nhu5XoxTt9qRsSS5bneT2xUki/Yeo5LwRBK9wINrffHKFNs5CAyj2EO8+ xqmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fg/enfb4RCctdkewRQV7tDb9j91n7CjfohPG/ug4xNA=; b=DwIRi6JsSY5iwM+CNuIYl24XJue3kUsvwxGm00g1Y1j1qt/VYgXbu2BEy7Gz/CYZdX xAd65gR0Xo1kRzCWq7rI3pZJ4m8mwGyi0QZGuvhOVCDxa4FYDeCl3oAN6p9kS8jCJpyJ j6RaW4cGDnKipf7/1Gl++MXaqZQik13375aipJh0ggKZZKxossqQhu5YepBnbA+D2VTE EyjmBXAf+RGr8Yc06A5VaGfjyZsQfEFBcKJj7hqhTSXI1RzkT/tqbAF4NnM+ceimCxQP fRQ0bXl6ZeNNKLJ8PUHFiAKVtoNvwejEzD1FpXWGi3QwpYTMGot3gb4QC5RGBydLiJHN iiHA== X-Gm-Message-State: AFqh2kosrciiX3VBQTDCvZ5410JmVy27J0Is6WMEpPjRK9eWOwcMAzYY Pxzx5Z9gNLe81RMxGSP3cwP8cQ== X-Received: by 2002:a6b:5010:0:b0:6bc:d70f:8b2f with SMTP id e16-20020a6b5010000000b006bcd70f8b2fmr33993243iob.9.1672854757450; Wed, 04 Jan 2023 09:52:37 -0800 (PST) Received: from presto.localdomain ([98.61.227.136]) by smtp.gmail.com with ESMTPSA id u3-20020a02cbc3000000b00375783003fcsm10872304jaq.136.2023.01.04.09.52.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Jan 2023 09:52:36 -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 v2 0/6] net: ipa: simplify IPA interrupt handling Date: Wed, 4 Jan 2023 11:52:27 -0600 Message-Id: <20230104175233.2862874-1-elder@linaro.org> X-Mailer: git-send-email 2.34.1 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?1754115693399937119?= X-GMAIL-MSGID: =?utf-8?q?1754115693399937119?= One of the IPA's two IRQs fires when data on a suspended channel is available (to request that the channel--or system--be resumed to recieve the pending data). This interrupt also handles a few conditions signaled by the embedded microcontroller. For this "IPA interrupt", the current code requires a handler to be dynamically registered for each interrupt condition. Any condition that has no registered handler is quietly ignored. This design is derived from the downstream IPA driver implementation. There isn't any need for this complexity. Even in the downstream code, only four of the available 30 or so IPA interrupt conditions are ever handled. So these handlers can pretty easily just be called directly in the main IRQ handler function. This series simplifies the interrupt handling code by having the small number of IPA interrupt handlers be called directly, rather than having them be registered dynamically. Version 2 just adds a missing forward-reference, as suggested by Caleb. -Alex Alex Elder (6): net: ipa: introduce a common microcontroller interrupt handler net: ipa: introduce ipa_interrupt_enable() net: ipa: enable IPA interrupt handlers separate from registration net: ipa: register IPA interrupt handlers directly net: ipa: kill ipa_interrupt_add() net: ipa: don't maintain IPA interrupt handler array drivers/net/ipa/ipa_interrupt.c | 103 ++++++++++++++------------------ drivers/net/ipa/ipa_interrupt.h | 48 +++++---------- drivers/net/ipa/ipa_power.c | 19 ++---- drivers/net/ipa/ipa_power.h | 12 ++++ drivers/net/ipa/ipa_uc.c | 21 +++++-- drivers/net/ipa/ipa_uc.h | 8 +++ 6 files changed, 99 insertions(+), 112 deletions(-)