Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3105600imm; Mon, 24 Sep 2018 16:07:41 -0700 (PDT) X-Google-Smtp-Source: ACcGV62PII8TKi4hf550/GAsXNcqJ/Et748ps85S8eNuNH1sTG3XBwcO8G1Xu0YSGCJKRjYlRjB5 X-Received: by 2002:a63:7f06:: with SMTP id a6-v6mr764552pgd.296.1537830461762; Mon, 24 Sep 2018 16:07:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537830461; cv=none; d=google.com; s=arc-20160816; b=k2D2nX3OOdHyiHfQ+UAjFgIow+A9oSfTvG2JwqwBoCMYiehQ0xBaUkrhnH0ueOjJkB /cl/nnKaVImZ659imp0kUAMnrBio0pEYvu83oX8OqaXNoLU2WLDlQW5MfFqv5T6s55qc aqfNR9CX0/sxPTs+v+L8eMp4nX9TIseUzDe3MJIobd1XrRUx22whJ48JaaOIwClMmfZD pAA21pGC7BdYYzfW7EmIgrdQN/7LJXQ19HUaxaHRrnxwiOZDFEjX8w1812obb7wderFO 6qiGiAydfG+Ia7jzMYUBrQwVCtP8FJxRULEqhymU0QW6Px2mK9GFl+S1W/8AGxv4Lr1K 0eiw== 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:cc:to:from:date:dkim-signature; bh=hHPOn700Cvv6nz7O9Tql1vFayIAICs0JvoJEL+U86Rg=; b=Ht5lGi6usnpNUb+Sul1zP8EQ+Ngi4e61tmjL6AqUheYoWqYhsmGYaAmUXQQ2Lb+FfV wbxq6TZyGlSBt2WTD4Cj0b+sCyBOXzB6aW1Rq1A2OahvreqE1Q7sfPv7Avew/dqGzakY Yob9NmSgEw+WXqAY5wx/5HcJvR2PuOJ1Pqvq5RQkFq6moln/rjIeMGw5g6OPKvxElT2l btBG4g6qGtQV8XuvqsugUqID+mexE85qZqJ1+htGQ4AHMOG3KgkM504sl/RM/dWHPC0v kr6JZiA5wrjPSF6MOBYwON3WcnYbG7vbq2RSMLMl0SgBjXGPU5AuxFoXGK4glgOHNYAg qDHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K7ns2Blx; 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 bc3-v6si558224plb.214.2018.09.24.16.07.21; Mon, 24 Sep 2018 16:07:41 -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=K7ns2Blx; 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 S1727253AbeIYFLq (ORCPT + 99 others); Tue, 25 Sep 2018 01:11:46 -0400 Received: from mail-it1-f194.google.com ([209.85.166.194]:55760 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726099AbeIYFLq (ORCPT ); Tue, 25 Sep 2018 01:11:46 -0400 Received: by mail-it1-f194.google.com with SMTP id c23-v6so4822609itd.5 for ; Mon, 24 Sep 2018 16:07:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=hHPOn700Cvv6nz7O9Tql1vFayIAICs0JvoJEL+U86Rg=; b=K7ns2BlxweCeEAs10ypsVYqswacJLLfak96kIQaTZh7hAY74Qj888wkhXvnXipAX1X pxo/oIgsr+9Ym37BERfyh7dk6jDx74Jt2g5CdgcosNPSdMbRsEI1PV3KvJo52NxehJd3 AJQjMbTvuULQUeu22ljC82SUtiCb4QiRVIhKA= 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:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=hHPOn700Cvv6nz7O9Tql1vFayIAICs0JvoJEL+U86Rg=; b=mjiPtWeJWlIV+HBWuXiKD9JLRIqCCuISMUnToDWk6Nlv+5v0S6IIqodGFHlgP2/2Tq QOBo+V/Ums3/wfwc+pIyoBxu3mlt/JYe7C8u7EyubP99uW7CXenQQ8FtZS/Oow021xNT erIB+1YcDygffWYwp8xaBMIqwjiQiLiGy0QUGEObw5X84mWH3CjM1mR7mIdnpGJzQ7cp rf7rR66W1hYekI0DB8ZszDluiz7eZqsAcmg0CCF+Mhapxjqq8q8tgg6tnbLPAyfrwM8j TcO2UOAwySQ/ta8ZccytyNa5NfF6hRMmB3UA62ta/pyGEbmBZuallOTRBOD3LFZ1SRy4 dVMQ== X-Gm-Message-State: ABuFfohZ8lCNBsARx6lwAFXXu5M9cdgK3m0rMTFpMiTggKgZbuLrL/rS rzm27PgxGgm1H1rNKYF4K5Pk8A== X-Received: by 2002:a24:1d84:: with SMTP id 126-v6mr568978itj.63.1537830432377; Mon, 24 Sep 2018 16:07:12 -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 o201-v6sm186766ito.41.2018.09.24.16.07.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Sep 2018 16:07:11 -0700 (PDT) Date: Mon, 24 Sep 2018 18:07:10 -0500 From: Dan Rue To: Greg Kroah-Hartman Cc: 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: <20180924230710.o7bqbw353few6pjw@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180924113121.469295005@linuxfoundation.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 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. 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); > > >