From patchwork Thu Nov 22 19:52:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 151815 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1150291ljp; Thu, 22 Nov 2018 11:52:53 -0800 (PST) X-Google-Smtp-Source: AJdET5fzmEqFp5A+VO+Rbduqk9FTL0AhVAr9CNR6PpeTdToAxIpp0N7o0R68cf7O5OlyWBLvS1zB X-Received: by 2002:a62:7652:: with SMTP id r79mr13117273pfc.241.1542916372928; Thu, 22 Nov 2018 11:52:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542916372; cv=none; d=google.com; s=arc-20160816; b=FdNGnlQxA3YPGtnSxDbmZ/pQZaw6uCrRdn2MPq2r196w0a3S+zY1EzVJPeY+RZqlOy cJiV8jET7nXtCLuTwkNpB/ioJKn3FuSCIPOFqh7u+0oxxd/asFxuYTOP3zIgOrIrWRFU OIEJ9a3jfe0IvhKXIT6EUY3nQF+FXSrksm7ZpgBjcZUDSmfDtFCnQa3CqpMMLZub6G8r 6KpATaMmuZOQVu3ulzrOhb/c2FkOTS+J0znYTXHOyWIdFKezkEej6AIPkkzFTqRJYb2a pRFDOc2pSTxoLfB9EiL3Nys5/L8j4WRZLXzJ37r09d97zeFYvLT5s2x769VGmxRQW+Ru UPRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=mrTxyEYsPyU9bNsB/q/F22YtFB5ncuS8flFXwivZ+QM=; b=xbN9ek8kMPfIYcSkpRHbeBanPghrhV7USM6U8xoijU4Pi7hqY/WdFJfHEe7r6G8erq 0+40BTkfUuT4UvjF+JN8ZCIb06TaYoZbpxvyhjIkON1AJTKgM2lrYMoGI6eJHlECMrB+ ok6BEvgipaZHaFpJmCyUTFBiy5enHSDR+La0SUzsI4cLVdWU/lZG2UqOKG/WQLb0rrPu NAwB8i134PDNZkLGKpqvNUcJWfS2yxFPy4YnO53jgKONc3x35F2h0R414/+u8Hcaejfk 7iI8+7uAE62Bz6/OeWBuW+IFHv/yfI8eSNtrYRVWJJkim5oogKVo3imQDH7TTUmLaT14 lCoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JuXNohHW; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a23si16920538plm.334.2018.11.22.11.52.52; Thu, 22 Nov 2018 11:52:52 -0800 (PST) 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=@kernel.org header.s=default header.b=JuXNohHW; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406756AbeKWGdl (ORCPT + 32 others); Fri, 23 Nov 2018 01:33:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:60994 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389357AbeKWGdk (ORCPT ); Fri, 23 Nov 2018 01:33:40 -0500 Received: from sasha-vm.mshome.net (unknown [37.142.5.207]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D47AE20672; Thu, 22 Nov 2018 19:52:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542916368; bh=Fj2DSwruusYlW5D/VTaAgvSIv/ozbNmVAseEC8JQENM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JuXNohHWjMP3Ii+ChQiKSJn4RRo1SwpPmy8DOUk+8gNPxjORPXgbyhmnpq1zMfmaY x+VI2Q5c+8V7Vwjv3OZWm1ZoPuw0Xb0Bd+D/u06gd1foWMf/8MsOiAtNJplCmYleA/ 3pzS10NYuUq4FojXx3zomv8P+GBMQ0NXWA6NLoLI= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jerome Brunet , Linus Walleij , Sasha Levin , linux-gpio@vger.kernel.org, linux-amlogic@lists.infradead.org Subject: [PATCH AUTOSEL 4.19 02/36] pinctrl: meson: fix gxbb ao pull register bits Date: Thu, 22 Nov 2018 14:52:06 -0500 Message-Id: <20181122195240.13123-2-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181122195240.13123-1-sashal@kernel.org> References: <20181122195240.13123-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jerome Brunet [ Upstream commit 4bc51e1e350cd4707ce6e551a93eae26d40b9889 ] AO pull register definition is inverted between pull (up/down) and pull enable. Fixing this allows to properly apply bias setting through pinconf Fixes: 468c234f9ed7 ("pinctrl: amlogic: Add support for Amlogic Meson GXBB SoC") Signed-off-by: Jerome Brunet Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c index 4ceb06f8a33c..4edeb4cae72a 100644 --- a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c +++ b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c @@ -830,7 +830,7 @@ static struct meson_bank meson_gxbb_periphs_banks[] = { static struct meson_bank meson_gxbb_aobus_banks[] = { /* name first last irq pullen pull dir out in */ - BANK("AO", GPIOAO_0, GPIOAO_13, 0, 13, 0, 0, 0, 16, 0, 0, 0, 16, 1, 0), + BANK("AO", GPIOAO_0, GPIOAO_13, 0, 13, 0, 16, 0, 0, 0, 0, 0, 16, 1, 0), }; static struct meson_pinctrl_data meson_gxbb_periphs_pinctrl_data = { From patchwork Thu Nov 22 19:52:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 151816 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1150330ljp; Thu, 22 Nov 2018 11:52:55 -0800 (PST) X-Google-Smtp-Source: AFSGD/XTwsrgwEChOuRHWmq/Xj4w10WOiQfxgpyBOxknFiCDPc9SfC84AGT8i9GP94rg6HzPeraQ X-Received: by 2002:a63:374e:: with SMTP id g14mr11419769pgn.59.1542916375194; Thu, 22 Nov 2018 11:52:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542916375; cv=none; d=google.com; s=arc-20160816; b=TX0rx2LEiZFlQtRfAo/R/eWA+9l201UbR5UBzdGJPqduLtYUndWDLbWXQIElR9MveA uZC4s0hmoXCE9yCD49LUDuFvvq/YeVF2fpCgedTj9nglZsrukq6/zQ0Wef3y9zFWh+zd OQy4Lj8BtGjpcLEh/wrVU9i48FHtXmT7BuwlGxKfICBu+5wKPct/ja5AEJIAe/q//a7C 3Dli3etU32tmJZNjvEG56gO+L4LNFeGfSlozm96inVcyMEFBop3t3gpdpL++S5j25uH/ E80eOD7zst2FqCTL7h9MVnFcK7QaEPTV6rQYFcMALJHPtb+iF/LocB0/q/2cbZcz0/93 leMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=GPUki7AnGRweW9EeMrFtPTyB/D1uGr2ynNXaPZNbEF0=; b=b6ffgXqy6iYj5h55FMJZGcjVpRRqFqCYGkTNN/Ut9Xh5p+Gse+H3bZkGtwYkJIULbN hICQyIwLsAR+Rtx73qOJokOtJ90FV1STLF1jtZs99eotnF1PubJI8jCg9+yTtbqWXTtQ Bi/MEdX5Gh0qDCuZh575RDwUnhFga0ZVb80R5Q1HTMiyvhvlyJzFq+Uc3UAQHfpT2wE1 4OixvMTeJ846y1v/FoHqKX+ff48SQwNjoVqRIDIlJxTKcBZqoYmIZIPA8sZaYE/Dtuhu KR1E9yDO/HcAZk7dUeV+RwdQyKiuOg2OThcpLE4kg0vbCry9i9Wc8YdJgD5onIjQVAOh yXPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oznZk5Br; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a23si16920538plm.334.2018.11.22.11.52.54; Thu, 22 Nov 2018 11:52:55 -0800 (PST) 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=@kernel.org header.s=default header.b=oznZk5Br; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406771AbeKWGdo (ORCPT + 32 others); Fri, 23 Nov 2018 01:33:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:32774 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389357AbeKWGdn (ORCPT ); Fri, 23 Nov 2018 01:33:43 -0500 Received: from sasha-vm.mshome.net (unknown [37.142.5.207]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 62DAD20864; Thu, 22 Nov 2018 19:52:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542916371; bh=KO6Zkh1Omo4L3T/9tIcwzhQ8EyfxKWBTyso3Ea3NpMc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oznZk5BrfS4rdcmvBo3yi93xoIaPtpsLw6Fqm5t0FM+udplRLqm+Pa/z3gdCCVXA6 vkrtYFLM2Is9peKp+8kybrIQ+qJNN9hJsSg2keKcx+nP6k0SjhYot0bus/PBwmfhNN cPK4WgQtgiGDYUcxY2TYxWDRsJEYHEH0VL9Xn7xQ= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jerome Brunet , Linus Walleij , Sasha Levin , linux-gpio@vger.kernel.org, linux-amlogic@lists.infradead.org Subject: [PATCH AUTOSEL 4.19 03/36] pinctrl: meson: fix gxl ao pull register bits Date: Thu, 22 Nov 2018 14:52:07 -0500 Message-Id: <20181122195240.13123-3-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181122195240.13123-1-sashal@kernel.org> References: <20181122195240.13123-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jerome Brunet [ Upstream commit ed3a2b74f3eb34c84c8377353f4730f05acdfd05 ] AO pull register definition is inverted between pull (up/down) and pull enable. Fixing this allows to properly apply bias setting through pinconf Fixes: 0f15f500ff2c ("pinctrl: meson: Add GXL pinctrl definitions") Signed-off-by: Jerome Brunet Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/meson/pinctrl-meson-gxl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxl.c b/drivers/pinctrl/meson/pinctrl-meson-gxl.c index 7dae1d7bf6b0..158f618f1695 100644 --- a/drivers/pinctrl/meson/pinctrl-meson-gxl.c +++ b/drivers/pinctrl/meson/pinctrl-meson-gxl.c @@ -807,7 +807,7 @@ static struct meson_bank meson_gxl_periphs_banks[] = { static struct meson_bank meson_gxl_aobus_banks[] = { /* name first last irq pullen pull dir out in */ - BANK("AO", GPIOAO_0, GPIOAO_9, 0, 9, 0, 0, 0, 16, 0, 0, 0, 16, 1, 0), + BANK("AO", GPIOAO_0, GPIOAO_9, 0, 9, 0, 16, 0, 0, 0, 0, 0, 16, 1, 0), }; static struct meson_pinctrl_data meson_gxl_periphs_pinctrl_data = { From patchwork Thu Nov 22 19:52:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 151818 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1150428ljp; Thu, 22 Nov 2018 11:53:02 -0800 (PST) X-Google-Smtp-Source: AFSGD/WcAox9i/Emte/kHFYwTso8hGJkWOw85wHNZoAPV5fnikbbtzZFbKcVfiruXMYJgc7DhGSX X-Received: by 2002:a63:e20a:: with SMTP id q10mr10912788pgh.206.1542916381898; Thu, 22 Nov 2018 11:53:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542916381; cv=none; d=google.com; s=arc-20160816; b=H62UbAh1BWhCyYBZDQbaqKiMNgIkEi7lBAs/36U45++koQETKHrf0rSG9gkvTnzUG9 xoUwYPv0jEWcq7N0l7LNtuRnFRAwSkGH5nDOZ8cXoC5gCnVUFaROE2avrmKWr0TK0KDM bxzwh5l8S3u7DJ1W3hCV6BfkbDGgFXfT/IOxQo0zX+X3ydIouAycUakzCLEVhQjwhDqA hEiT6s3eLib5lJ3QX+HVkYaulbsfQBjFSF2D5Iv5QXMWf3mzetWUBNgtbFwbbETDI+Sk +1jszFKXg//+QRGxpendbjE2ZpOxVftb+X11nYS2NxslevzIN8TfEVIjps7DuALn5ubz 9XIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=2RWJEnoUQamYXj2AlMmSEVew9w7yG2CazvTRUdtDdqs=; b=KsuGM2ND14yPd7WgBeUwqh+fGLDwXP2c7C0n3TueledqJbhRCOEusp+a64O6TfGTH3 w3CbefXs/ndrSXb9TgLSJrNgOW7m1KPAV/zpaJ+a0f238+QYVBo6tfgozf6aEpEdxakV hlT6CJHRfOMuYI3pJRgi/qnnLXagT9jC95KNFXVD8WzLfX6ElUuvwLZTTOEWD5neGRdR U9fTyrzNdW1mF9eYx6cPP89z7N8QEb9Vu7XG4AEvQ8niStOGkd4rAdpN7YkDVNcB4/7M cMaqKaHLSq8RRW0c8rlBYSRKymKN7yOvW9PLIYzDnXS7uFBx1ihA3rJhS7OzBeY/+dl0 dIzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QgTAw9Iq; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5si15036944ple.387.2018.11.22.11.53.01; Thu, 22 Nov 2018 11:53:01 -0800 (PST) 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=@kernel.org header.s=default header.b=QgTAw9Iq; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406801AbeKWGdv (ORCPT + 32 others); Fri, 23 Nov 2018 01:33:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:32866 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406773AbeKWGds (ORCPT ); Fri, 23 Nov 2018 01:33:48 -0500 Received: from sasha-vm.mshome.net (unknown [37.142.5.207]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A9C7220838; Thu, 22 Nov 2018 19:52:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542916376; bh=+tHcz+v+gANGmpC/wiBpLqFR3B8mtUqKymnVyZw6zRs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QgTAw9IqOZ9V9JSLCx8I6TpwnBNPxi5SXoQHMNaHvDuPEFUnTzrNURP9jqt0EALQq Tv0CMfm99PfJXCvV+3rEyeDez7Ernla4smlvCv4GHhvdn77SXlWmHneZTyKBYcOYIx 01Mx+MEuM5fYHl/GCMI/Sz9bOXRIYxQq7N/pMxps= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jerome Brunet , Linus Walleij , Sasha Levin , linux-gpio@vger.kernel.org, linux-amlogic@lists.infradead.org Subject: [PATCH AUTOSEL 4.19 05/36] pinctrl: meson: fix meson8b ao pull register bits Date: Thu, 22 Nov 2018 14:52:09 -0500 Message-Id: <20181122195240.13123-5-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181122195240.13123-1-sashal@kernel.org> References: <20181122195240.13123-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jerome Brunet [ Upstream commit a1705f02704cd8a24d434bfd0141ee8142ad277a ] AO pull register definition is inverted between pull (up/down) and pull enable. Fixing this allows to properly apply bias setting through pinconf Fixes: 0fefcb6876d0 ("pinctrl: Add support for Meson8b") Signed-off-by: Jerome Brunet Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/meson/pinctrl-meson8b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/pinctrl/meson/pinctrl-meson8b.c b/drivers/pinctrl/meson/pinctrl-meson8b.c index bb2a30964fc6..647ad15d5c3c 100644 --- a/drivers/pinctrl/meson/pinctrl-meson8b.c +++ b/drivers/pinctrl/meson/pinctrl-meson8b.c @@ -906,7 +906,7 @@ static struct meson_bank meson8b_cbus_banks[] = { static struct meson_bank meson8b_aobus_banks[] = { /* name first lastc irq pullen pull dir out in */ - BANK("AO", GPIOAO_0, GPIO_TEST_N, 0, 13, 0, 0, 0, 16, 0, 0, 0, 16, 1, 0), + BANK("AO", GPIOAO_0, GPIO_TEST_N, 0, 13, 0, 16, 0, 0, 0, 0, 0, 16, 1, 0), }; static struct meson_pinctrl_data meson8b_cbus_pinctrl_data = { From patchwork Thu Nov 22 19:52:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 151819 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1150494ljp; Thu, 22 Nov 2018 11:53:07 -0800 (PST) X-Google-Smtp-Source: AFSGD/UhTCdq/VJVsoS9H3r0uEYG7y6qAt1VMWXyqUMxrSMKiPyISlAW78RIIZy3eZ2jLt97pDlG X-Received: by 2002:a17:902:6909:: with SMTP id j9mr12187010plk.196.1542916386998; Thu, 22 Nov 2018 11:53:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542916386; cv=none; d=google.com; s=arc-20160816; b=amPnHBDFy/+D8tGWDDFWy00Ekgaprgdfful4n44c1wZ9BJOM4oa62O3dIP9FI6RXBO mLASX1/NcP87s74f66Np8kqjeQlRVi8ELMVpGo+a+rw/Wh4wGHMK8pWhv7XBYuBSCSWS 3bOQAsWlH41a/3POjCimLeI/RBhqqmiXYFBBCvMFaw6ZyaihB2RcKfa+sAKlY9zZj4Tq IqFaafDC9Chfj1XFiw/7cFPnv1UePZ2lqVJlZC9CsQCQZ8XSREERm0NuFV8NImhlrTeu uSzL+Nsa6lTvA/a/r/GsxBnXAYOi8ZrcPBHNIM9WdLS+8vkk0KbXgL/D9aioQvHT9J7E Bz1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=b4HsiPv7yXNct09SJ/VPINKlmYqqe99p0s4knWduRoA=; b=fyb7s9yz5d0libTBxfdkFp08enyNHq6gE0pvpfj5Zi6/eh40q1V9N64wX7Xawt4POJ f8njx/HzhoI56t9nhaLhU851o2Ij3A421rTRkohzws7sWk2ecetwK0hJpRLUXM4ncZH9 SOiccNnnKG/Y3fDmwmMrlw1NtxKoTO6uAVcT0S9bmD0hVVx+lLncajYdKqxWTUbGwhhV 5/f0rWfoCJse2LVaYbYkjrllP44bX47fsjzF7kYJIfteBO83G3gLsXYp346LmfcXLAMv oD7Os3rzMM2R7U8q9Vp/sDtJhm5eLpzzSRNfiIyaMcVqAfZ/AqDsmFJW2xiPb9QLk5+2 A14w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BCW4YfJc; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j8si18029411plk.145.2018.11.22.11.53.06; Thu, 22 Nov 2018 11:53:06 -0800 (PST) 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=@kernel.org header.s=default header.b=BCW4YfJc; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406831AbeKWGd4 (ORCPT + 32 others); Fri, 23 Nov 2018 01:33:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:32980 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406810AbeKWGdz (ORCPT ); Fri, 23 Nov 2018 01:33:55 -0500 Received: from sasha-vm.mshome.net (unknown [37.142.5.207]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AFA2B20645; Thu, 22 Nov 2018 19:53:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542916383; bh=+3rM5jzdyw9D3Z3dXJaI+kXz2N0qo9OEd3GUZ2CRw9A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BCW4YfJc7GAGAhflBKW2rsCLFe0jeTUnbA8jzgvKn3Is2Bz67kM3B+XdffP81DDRq n051Qc4TXTVDLQvAWDrMY3gjXx0LpXbByaQwKPmsq0sYqzNw51Srk+7Xsyfa/IxJci c8Twq9EIVvasdYM8vGG04cAaY+RsrduVJJEDha2I= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Arnd Bergmann , "Martin K . Petersen" , Sasha Levin , linux-scsi@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 07/36] scsi: lpfc: fix remoteport access Date: Thu, 22 Nov 2018 14:52:11 -0500 Message-Id: <20181122195240.13123-7-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181122195240.13123-1-sashal@kernel.org> References: <20181122195240.13123-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit f8d294324598ec85bea2779512e48c94cbe4d7c6 ] The addition of a spinlock in lpfc_debugfs_nodelist_data() introduced a bug that lets us not skip NULL pointers correctly, as noticed by gcc-8: drivers/scsi/lpfc/lpfc_debugfs.c: In function 'lpfc_debugfs_nodelist_data.constprop': drivers/scsi/lpfc/lpfc_debugfs.c:728:13: error: 'nrport' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (nrport->port_role & FC_PORT_ROLE_NVME_INITIATOR) This changes the logic back to what it was, while keeping the added spinlock. Fixes: 9e210178267b ("scsi: lpfc: Synchronize access to remoteport via rport") Signed-off-by: Arnd Bergmann Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/lpfc/lpfc_debugfs.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c index aec5b10a8c85..ca6c3982548d 100644 --- a/drivers/scsi/lpfc/lpfc_debugfs.c +++ b/drivers/scsi/lpfc/lpfc_debugfs.c @@ -700,6 +700,8 @@ lpfc_debugfs_nodelist_data(struct lpfc_vport *vport, char *buf, int size) rport = lpfc_ndlp_get_nrport(ndlp); if (rport) nrport = rport->remoteport; + else + nrport = NULL; spin_unlock(&phba->hbalock); if (!nrport) continue; From patchwork Thu Nov 22 19:52:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 151821 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1151686ljp; Thu, 22 Nov 2018 11:54:37 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xy6PU1JRbfDv2PuLyaFDb67FUukfdE610D0Z6/VzvCSFyTXD4HcSUKQHygXf5jmIB//rd9 X-Received: by 2002:a63:e915:: with SMTP id i21mr10993612pgh.409.1542916476894; Thu, 22 Nov 2018 11:54:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542916476; cv=none; d=google.com; s=arc-20160816; b=PTD5ZvkS/DA/9oJjTBxFkW4PtZIZCj9yZwwUI2FQcLc/fWBh5r3Nl3uGPXjLcHuHWG OjgOx427Spcg+eKUFSpVrlWGIHbUlOdClmnw8jkX+JUsXHgodWN+AcTKHUxz7f26i44R TMQ+Gyk4hI//5eqhU0CMj3lUjmiHVlk1PhrQ9NcJHZ5wYBZe7ZYMWe3yr7VCI82StenT Le96URwzI7fR3SJwJTTRsCdLdUjzJNnRamhrEY4jb8V1X1/Rk/xA051XBFLJO7M7Btxb RazJccgDo60Hy3RAtpo5y5lLtDVouskj4F9c6FpMCTKxE47+vOQPluMSyt05oq7vSVHH jkgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=I7otAawzX1QjFeU1e+fle/7F7XyviOlhXV8cg5DPbFE=; b=gQM1R/21BHP8rT24j1WiS7pn2+7E3X765ABjtNCcXt+THA88ai5iSkhC/SwzP/XHz9 Ya7gdNkU9hmjTVvz6kNoxbjem45mMpEaYFbypBFkutVxioJ4opvgzrx4u1uZhSMmy4jQ JtY2et/BsquEzzNr8YUtcE9pXPVFkG9UlBDGSh6OGklgWH0sI98rTh5pol2kFGTnC8JF 873tcAKr3mlWpWVlX60epoCEAsIRTOCZBKKcADl2jDvlL0spYkz963WHyGusHyaDT86s 3Fdr93l3JCwcw5lSiZUAEb/tZj5Naa93NCjR8nhTOihv6zEyTQaU/YYz+pup447PPD1I WhQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=V6CXUC57; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e66si11760517plb.339.2018.11.22.11.54.36; Thu, 22 Nov 2018 11:54:36 -0800 (PST) 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=@kernel.org header.s=default header.b=V6CXUC57; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406950AbeKWGf0 (ORCPT + 32 others); Fri, 23 Nov 2018 01:35:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:34212 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389657AbeKWGf0 (ORCPT ); Fri, 23 Nov 2018 01:35:26 -0500 Received: from sasha-vm.mshome.net (unknown [37.142.5.207]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A63CF20865; Thu, 22 Nov 2018 19:54:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542916474; bh=HxEw090Tv3EJYsgycmQAilmkl3nHEFIXWc/EDchQ6G4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V6CXUC57jA2mtH5khNWBFWjBt5QREpvPwGXY5rTa66NyIphYYuZ0lOdrZlF7gFxvv zMdXqKLFozPRmoMvMl/wJoCsTZw5Ps470TNf521BoJL/OyV04UYIoi/V/r3kINlGY6 fZu6bMA7ec0aYKsFfjfZ2mhH/wFw/n/kKI1qPBJo= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ard Biesheuvel , Linus Torvalds , Peter Zijlstra , Thomas Gleixner , linux-efi@vger.kernel.org, Ingo Molnar , Sasha Levin Subject: [PATCH AUTOSEL 4.19 32/36] efi/arm: Revert deferred unmap of early memmap mapping Date: Thu, 22 Nov 2018 14:52:36 -0500 Message-Id: <20181122195240.13123-32-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181122195240.13123-1-sashal@kernel.org> References: <20181122195240.13123-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ard Biesheuvel [ Upstream commit 33412b8673135b18ea42beb7f5117ed0091798b6 ] Commit: 3ea86495aef2 ("efi/arm: preserve early mapping of UEFI memory map longer for BGRT") deferred the unmap of the early mapping of the UEFI memory map to accommodate the ACPI BGRT code, which looks up the memory type that backs the BGRT table to validate it against the requirements of the UEFI spec. Unfortunately, this causes problems on ARM, which does not permit early mappings to persist after paging_init() is called, resulting in a WARN() splat. Since we don't support the BGRT table on ARM anway, let's revert ARM to the old behaviour, which is to take down the early mapping at the end of efi_init(). Signed-off-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Fixes: 3ea86495aef2 ("efi/arm: preserve early mapping of UEFI memory ...") Link: http://lkml.kernel.org/r/20181114175544.12860-3-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar Signed-off-by: Sasha Levin --- drivers/firmware/efi/arm-init.c | 4 ++++ drivers/firmware/efi/arm-runtime.c | 2 +- drivers/firmware/efi/memmap.c | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/firmware/efi/arm-init.c b/drivers/firmware/efi/arm-init.c index 388a929baf95..1a6a77df8a5e 100644 --- a/drivers/firmware/efi/arm-init.c +++ b/drivers/firmware/efi/arm-init.c @@ -265,6 +265,10 @@ void __init efi_init(void) (params.mmap & ~PAGE_MASK))); init_screen_info(); + + /* ARM does not permit early mappings to persist across paging_init() */ + if (IS_ENABLED(CONFIG_ARM)) + efi_memmap_unmap(); } static int __init register_gop_device(void) diff --git a/drivers/firmware/efi/arm-runtime.c b/drivers/firmware/efi/arm-runtime.c index 922cfb813109..a00934d263c5 100644 --- a/drivers/firmware/efi/arm-runtime.c +++ b/drivers/firmware/efi/arm-runtime.c @@ -110,7 +110,7 @@ static int __init arm_enable_runtime_services(void) { u64 mapsize; - if (!efi_enabled(EFI_BOOT) || !efi_enabled(EFI_MEMMAP)) { + if (!efi_enabled(EFI_BOOT)) { pr_info("EFI services will not be available.\n"); return 0; } diff --git a/drivers/firmware/efi/memmap.c b/drivers/firmware/efi/memmap.c index 5fc70520e04c..1907db2b38d8 100644 --- a/drivers/firmware/efi/memmap.c +++ b/drivers/firmware/efi/memmap.c @@ -118,6 +118,9 @@ int __init efi_memmap_init_early(struct efi_memory_map_data *data) void __init efi_memmap_unmap(void) { + if (!efi_enabled(EFI_MEMMAP)) + return; + if (!efi.memmap.late) { unsigned long size;