Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2389739iob; Sun, 15 May 2022 17:50:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUWwO6V9qgNPRXhXLqQJ8oBTjDB3QtwfciZP9PK409JeDsEv9EsQh/stJGAl1yhBZQUMow X-Received: by 2002:a17:907:60d6:b0:6fa:95d3:d4e5 with SMTP id hv22-20020a17090760d600b006fa95d3d4e5mr13092266ejc.357.1652662250143; Sun, 15 May 2022 17:50:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652662250; cv=none; d=google.com; s=arc-20160816; b=A8Whe9XeiLWd6MCAenkW3SdIJEh1Dfb9gmDCfXtqaWdCoas3dktV6hYSRP/A+II6X3 7RN4vryCipkOpsbvSm2/dotXuyoTVn8nU5mEFIJoz9m2zC2kGQ8XAZGgpPHW7OzYcy59 5uG1SWnnwzDkh0sTlIl4GwfTo/4W9Qy8zp3tgSu7+FBvaFtgM+TtXF0DVBql1ZUlaBS4 8y02L33JSEm9SVMhTshFz0AEixoXAPhgmRFHVxXJVkN2lEFWUXbvDhgHXZOlSMcwQTv+ 47sOCoOdYEp0IpQVE9/hNWWDRZT13JCufBdd1G+sDIXY/PkPDD1WDLr/hYz/ivhWB09T SHVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=uAAN2W54G48k9hRqje/cdaPTrbIW4YAQoF/hPdMAfD4=; b=r97BZhDlRUc743p709dG8l58lonIhLBJ8A7aPM1bxAQLO/gys8TxbTs+8XaxdD0YUh yaUZvMsIWzXhGXDYxHN7Aa2sqCIu8cBcUsLnF0VhszKd2XvGTwKuDYKL7AM5ozXPA0Em VpyvIRVmMATasgph+hC1iF7PIe1OwmfnX7Yk+3nuHGSA9jLxDjHUC633c4G2ADgIzl+Z qYSvHMG/owl7IS2CF7nu/0kbbguqvNvasBslXwWWK1/AzvVBX1o+d2oeFe81rRj3xo5K kaXEOoPpPGcmZ2rYKztevJjIJetoE4yk67ZYBvDVHOt3HCSmhKnOb0vYnPTjF0MArsXA jGng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NgAhjgFH; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d2-20020aa7d682000000b00427e7dbfe16si8130358edr.392.2022.05.15.17.50.24; Sun, 15 May 2022 17:50:50 -0700 (PDT) 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=NgAhjgFH; 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 S231211AbiENQ0z (ORCPT + 99 others); Sat, 14 May 2022 12:26:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233057AbiENQ0x (ORCPT ); Sat, 14 May 2022 12:26:53 -0400 Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com [IPv6:2607:f8b0:4864:20::b2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BD3E2CE18 for ; Sat, 14 May 2022 09:26:50 -0700 (PDT) Received: by mail-yb1-xb2d.google.com with SMTP id r1so20264041ybo.7 for ; Sat, 14 May 2022 09:26:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uAAN2W54G48k9hRqje/cdaPTrbIW4YAQoF/hPdMAfD4=; b=NgAhjgFHi90HV2GORZIQ4dktxh+umurffW9MJr9ugCzFo3AOyZIR0rtZtnqis+BXgt 9/PWQLorLuUj5ssBcR9dpOyZVGb5tVBRVn5WtjTfhxWqd0b+/Aps6LaqJmS0T96MyoSi fNKs2ZaugB33/LC0VPxjyXgzry5NFeye6XHzsnc07WCW3mwLf+UlSSwm9QdH9tC6jMSI +jLlBGIvB68JmdxHLvk32ZBmv+Z2TfWXLUWmS5rSP+Ml5vLcXb+/VQ5/XxS+ihnLXUK9 gVCTZ1T8qJDhNpUYxKMUYjO7VCU7hqJDBTcngG8EixlAiT8Q5vWGETNept85pD/VbnN3 QZfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uAAN2W54G48k9hRqje/cdaPTrbIW4YAQoF/hPdMAfD4=; b=PPOSQit1e3UZtQVFQ2e3/BWuLe9eRX7Vvhe+q0Uz7+yemrtZgL/gWY/T+aIPKkdX0l Av9mAEZyrPGjfTEVVCcWbQsB0S5gYxS3fSTrSPjpgilKGlKo1HnCRdLpaQXOHc+Sxb6E QBoIqGccfnF8/nGhlF6w/m1B+JKMfx8Ifc9H5KtvJovxuj8c3WUj7dPivhQhbEwxdXxq 4AqJu3COS+huHUmzUFWcTfm8o7eUkxdSZSv7mwua6J7ucBYi1+ESfvg+PpwAc6nLYMXx /5Pf0kA8bU0jWOOfm8yLNzK04NklENdDCmidKyWgzlwjO3/okdFQG8EKO3x9xjPAKPI0 vaqw== X-Gm-Message-State: AOAM532eqTC4chonoKs0KcTFRGRdbj/PP1Y9t/CtIyzehUXqDMuGrv22 uRpTpSVBQi/SZhKQIfiLgAq9EZ0nNNoqmu8L3+fz3Q== X-Received: by 2002:a5b:302:0:b0:64b:a20a:fcd9 with SMTP id j2-20020a5b0302000000b0064ba20afcd9mr7045834ybp.492.1652545609490; Sat, 14 May 2022 09:26:49 -0700 (PDT) MIME-Version: 1.0 References: <20220512162320.2213488-1-maz@kernel.org> <87r14wmmea.wl-maz@kernel.org> In-Reply-To: <87r14wmmea.wl-maz@kernel.org> From: Linus Walleij Date: Sat, 14 May 2022 18:26:38 +0200 Message-ID: Subject: Re: [PATCH] gpio: Remove dynamic allocation from populate_parent_alloc_arg() To: Marc Zyngier Cc: linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, linux-arm-msm@vger.kernel.org, kernel-team@android.com, Daniel Palmer , Romain Perier , Bartosz Golaszewski , Thierry Reding , Jonathan Hunter , Robert Richter , Nobuhiro Iwamatsu , Andy Gross , Bjorn Andersson Content-Type: text/plain; charset="UTF-8" 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,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Sat, May 14, 2022 at 12:36 PM Marc Zyngier wrote: > On Fri, 13 May 2022 22:24:40 +0100, > Linus Walleij wrote: > > > > On Thu, May 12, 2022 at 6:23 PM Marc Zyngier wrote: > > > > > The gpiolib is unique in the way it uses intermediate fwspecs > > > when feeding an interrupt specifier to the parent domain, as it > > > relies on the populate_parent_alloc_arg() callback to perform > > > a dynamic allocation. > > > > > > THis is pretty inefficient (we free the structure almost immediately), > > > and the only reason this isn't a stack allocation is that our > > > ThunderX friend uses MSIs rather than a FW-constructed structure. > > > > > > Let's solve it by providing a new type composed of the union > > > of a struct irq_fwspec and a msi_info_t, which satisfies both > > > requirements. This allows us to use a stack allocation, and we > > > can move the handful of users to this new scheme. > > > > > > Also perform some additional cleanup, such as getting rid of the > > > stub versions of the irq_domain_translate_*cell helpers, which > > > are never used when CONFIG_IRQ_DOMAIN_HIERARCHY isn't selected. > > > > > > Tested on a Tegra186. > > > > > > Signed-off-by: Marc Zyngier > > > Cc: Daniel Palmer > > > Cc: Romain Perier > > > Cc: Linus Walleij > > > Cc: Bartosz Golaszewski > > > Cc: Thierry Reding > > > Cc: Jonathan Hunter > > > Cc: Robert Richter > > > Cc: Nobuhiro Iwamatsu > > > Cc: Andy Gross > > > Cc: Bjorn Andersson > > > > This looks very appetizing to me but: > > > > drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 15 ++++----- > > > > This seems to have some changes to > > ->populate_parent_alloc_arg not even in linux-next, > > so I get confused, what are the prerequisites? (Probably > > something I already reviewed, but...) > > Odd. This patch is on top of irqchip-next, which is itself already in > -next (you got me worried and I just pulled everything to check). I confused it with pinctrl-ssbi-gpio.c. Simple beginners mistake. Reviewed-by: Linus Walleij Yours, Linus Walleij