Received: by 2002:a4a:301c:0:0:0:0:0 with SMTP id q28-v6csp266950oof; Mon, 24 Sep 2018 20:16:54 -0700 (PDT) X-Google-Smtp-Source: ACcGV62QX7EpLwkKk/lj6w2qCXVkc5NP3at4HgCqLJfiju9qYtt3CVpe5yUdQDKn1yF61iuQGBer X-Received: by 2002:a17:902:7009:: with SMTP id y9-v6mr1429729plk.328.1537845414769; Mon, 24 Sep 2018 20:16:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537845414; cv=none; d=google.com; s=arc-20160816; b=B9CTPHJ3PvJCz+jBeOsr9iV9mQPqrCnyP22whpXYC+lEARplE0fOBoa2pgHDGfPsDx X4l8l9/sBDWPrTkUQT1WYuYgPKkKSTgjQbh89gEQmEg3GFtGZApD9rDs/LkMC/0u1Tyf aV1dewQm6i3Dez6VoI+He958NgCTYefqhx7UO4mZ07JjlUa1itX47jeEN9VHG2Gf6LyL uWeo7zyvoeAxPAoBrS9r0Lt8zFrKsUpNqtC/jMlkGXWZpYtAhE1actz8D+sMU/OgUhPv PDiNZq4CZQWfWTAjFG0MlwZ2YCHCg8FcL0q9VtnHpvSWEup4LrE7KhQorfGHvVZjy33F 9Sxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:to:from:date:dkim-signature; bh=lbvantTxYQoNqplUr3kHGbh6zQ1QSXQ8ERbf2W2is6c=; b=Z0r5jvQ3hwA4k0RtHkudVe8ZIPnavDDOJzmLUNWFnnnAUTm/SF3YvUK7+f9XMxy6BM /n99MyXOAA8tWWcyZm7gY99LeW1WpHnLf93FbCdtTy0Zx6tkTmLrEiOI5Jv0bJFXANPd 6eVuG3hSkZeRWnpM34oQmbcbNlBX3rt34AMFWbpetQypP1qa1MjuZr784zvwT6Mb/072 c7aNvLcetQBDGdJ7PSEWw+j5JHy+njJ8mUdSqaRqg17iFfb75i7AhdMCQpmiqvhkREO5 qfq7cZtFCb2CqGsyUKu08v1lpnOIt8YjoMKUwdslaILHDVjJpFeCI1J7KuZLyfmp5aJ0 lJ+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XzusdV7R; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k10-v6si1087186plt.328.2018.09.24.20.16.05; Mon, 24 Sep 2018 20:16:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XzusdV7R; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727958AbeIYJVX (ORCPT + 99 others); Tue, 25 Sep 2018 05:21:23 -0400 Received: from mail-it1-f194.google.com ([209.85.166.194]:52876 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727698AbeIYJVX (ORCPT ); Tue, 25 Sep 2018 05:21:23 -0400 Received: by mail-it1-f194.google.com with SMTP id h3-v6so13571428ita.2 for ; Mon, 24 Sep 2018 20:16:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=lbvantTxYQoNqplUr3kHGbh6zQ1QSXQ8ERbf2W2is6c=; b=XzusdV7RXmDU9MHYhe5+8++vfp98e+O4axGXUkbWPzCiPS5Vt8PfLQVgldj+JD/1UE EWwDTWbhsVKa5RNFEFrlCeHhbTV4OrhUUXGhl5ArHD9AyN0iRmcaZ8XeD5yJnLcKcNm6 clLLfUeJAGTyoTTZqyFESFRJtzPcccoNOYD4M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=lbvantTxYQoNqplUr3kHGbh6zQ1QSXQ8ERbf2W2is6c=; b=thstM1U1vZ3K8bW6A1RKHtaC1D0RRHqi3RVgKU0lgCru7uMm0KJdMuNU/YyCdQuGtf LROAQ2Bece/inWRi9r4F+eLl5uPBSHRVrFQOSkeodov7yRLvZO24fb4t4HvgAkQTKPCs IAqwtQ0aigdd5FSlMsWVEr6IqdlnHw80PNXUQnEUs0Ydzue8mSmmlPttrH4lOM0W2AZG SUlQpcRDTCWTGjb1y3Qi3ql6tLtp2YMPB41oytxkCa+9+/+B9qMWy9sCQBKVRuj3dMJy vKlA4Uhdnn91XZuppEy+w4C+yKoSI59HbQwi2bmTeOLT9L6pgJxKuYyyvtSJXi9xBh3q Ir/w== X-Gm-Message-State: ABuFfoiY7dJcUg9dZdPGEetQy6os7zRWJa2ywNNJfrY1mlOySMgz8zU5 SR1Zb9OsnJ9KjUMpDsACyND39A== X-Received: by 2002:a24:83c1:: with SMTP id d184-v6mr1202082ite.16.1537845360524; Mon, 24 Sep 2018 20:16:00 -0700 (PDT) Received: from localhost (c-107-2-67-121.hsd1.mn.comcast.net. [107.2.67.121]) by smtp.gmail.com with ESMTPSA id 17-v6sm713277ite.13.2018.09.24.20.15.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Sep 2018 20:15:59 -0700 (PDT) Date: Mon, 24 Sep 2018 22:15:58 -0500 From: Dan Rue To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, stable@vger.kernel.org, "H. Nikolaus Schaller" , Christ van Willegen , Haojian Zhuang , Jacopo Mondi , Paul Cercueil , Sean Wang , Tony Lindgren , Andy Shevchenko , Linus Walleij , Sasha Levin Subject: Re: [PATCH 4.18 164/235] pinctrl: pinmux: Return selector to the pinctrl driver Message-ID: <20180925031558.3k6ukkfhbndgbm65@xps.therub.org> Mail-Followup-To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, stable@vger.kernel.org, "H. Nikolaus Schaller" , Christ van Willegen , Haojian Zhuang , Jacopo Mondi , Paul Cercueil , Sean Wang , Tony Lindgren , Andy Shevchenko , Linus Walleij , Sasha Levin References: <20180924113103.999624566@linuxfoundation.org> <20180924113121.469295005@linuxfoundation.org> <20180924230710.o7bqbw353few6pjw@xps.therub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180924230710.o7bqbw353few6pjw@xps.therub.org> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 24, 2018 at 06:07:10PM -0500, Dan Rue wrote: > On Mon, Sep 24, 2018 at 01:52:30PM +0200, Greg Kroah-Hartman wrote: > > 4.18-stable review patch. If anyone has any objections, please let me know. > > I bisected a boot failure on an x15 (arm) board to this commit on > 4.18.10-rc1. I'm also seeing issues on 4.14 and 4.18 with arm64 boards > hikey and dragonboard 410c, but I have not investigated them yet (they > could be unrelated). > > I see there are fixes to this commit that have not been backported. > Namely: > > 823dd71f58eb ("pinctrl: ingenic: Fix group & function error checking") > a203728ac6bb ("pinctrl: core: Return selector to the pinctrl driver") > > However, I tried adding those two in but I still see the boot failure on > x15. Dropping 9c5cd7b6ca4e ("pinctrl: pinmux: Return selector to the pinctrl driver") does appear to fix the boot issues I'm seeing on x15 and hikey. Dan > > Dan > > > > > ------------------ > > > > From: Tony Lindgren > > > > [ Upstream commit f913cfce4ee49a3382a9ff95696f49a46e56e974 ] > > > > We must return the selector from pinmux_generic_add_function() so > > pin controller device drivers can remove the right group if needed > > for deferred probe for example. And we now must make sure that a > > proper name is passed so we can use it to check if the entry already > > exists. > > > > Note that fixes are also needed for the pin controller drivers to > > use the selector value. > > > > Fixes: a76edc89b100 ("pinctrl: core: Add generic pinctrl functions for > > managing groups") > > Reported-by: H. Nikolaus Schaller > > Cc: Christ van Willegen > > Cc: Haojian Zhuang > > Cc: Jacopo Mondi > > Cc: Paul Cercueil > > Cc: Sean Wang > > Signed-off-by: Tony Lindgren > > Tested-By: H. Nikolaus Schaller > > Reviewed-by: Andy Shevchenko > > Signed-off-by: Linus Walleij > > Signed-off-by: Sasha Levin > > Signed-off-by: Greg Kroah-Hartman > > --- > > drivers/pinctrl/pinmux.c | 16 ++++++++++++---- > > 1 file changed, 12 insertions(+), 4 deletions(-) > > > > --- a/drivers/pinctrl/pinmux.c > > +++ b/drivers/pinctrl/pinmux.c > > @@ -308,7 +308,6 @@ static int pinmux_func_name_to_selector( > > selector++; > > } > > > > - dev_err(pctldev->dev, "function '%s' not supported\n", function); > > return -EINVAL; > > } > > > > @@ -775,6 +774,16 @@ int pinmux_generic_add_function(struct p > > void *data) > > { > > struct function_desc *function; > > + int selector; > > + > > + if (!name) > > + return -EINVAL; > > + > > + selector = pinmux_func_name_to_selector(pctldev, name); > > + if (selector >= 0) > > + return selector; > > + > > + selector = pctldev->num_functions; > > > > function = devm_kzalloc(pctldev->dev, sizeof(*function), GFP_KERNEL); > > if (!function) > > @@ -785,12 +794,11 @@ int pinmux_generic_add_function(struct p > > function->num_group_names = num_groups; > > function->data = data; > > > > - radix_tree_insert(&pctldev->pin_function_tree, pctldev->num_functions, > > - function); > > + radix_tree_insert(&pctldev->pin_function_tree, selector, function); > > > > pctldev->num_functions++; > > > > - return 0; > > + return selector; > > } > > EXPORT_SYMBOL_GPL(pinmux_generic_add_function); > > > > > >