From patchwork Wed Nov 27 20:28:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180329 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp6642185ilf; Wed, 27 Nov 2019 12:56:15 -0800 (PST) X-Google-Smtp-Source: APXvYqw0fVVLf3x5d31ZURJHuya2PLkUtbNh7MpqLRkuQ2ngI99Cj9mG83HFwkkcN8t179ZasqQb X-Received: by 2002:a50:f081:: with SMTP id v1mr34348255edl.131.1574888175495; Wed, 27 Nov 2019 12:56:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574888175; cv=none; d=google.com; s=arc-20160816; b=xA0hI5mmNIJ/ZkIVgwE3V+Vs2R4gY6N3Tjon9vkkE4hcjq0U1WqPq1gtGf0Dtp8HWk eFugavoONBNu0rCqWyIHNOKnhRJFhrphAL2UloapzjTHiZW6iw4y5VIg43pTqWZnKzIN tlT/UrjONtMmeV3OQg1XqHRmbVqnSp/ygygYQ7XbBieul99/mS1lXsIr4PV2OBeCU5FI 8Uyr2CFiC/5IEbAA2sGZd1pfsQV+BK7rws7tWS0/a5LCSl92P4GZnoPrNJtCwLqWlZRI 4+AaBPjU9+bZ0htmVl6OMUzJLtHdihXlnCcarad2fQGqkyjWQEulQmPAqEU6lligP3DJ VIxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1+S1qWJhzI32ZqWafA6IcLhUe8RREaZz4cwOj9x1YvA=; b=RYgCc3dsU/zWP8YuE0m0rh3yzTpw1/Cscf7O5o08imltSQGMmtaC9Acnz4ukcyxJal W5eC5qLurI8VBQ2ZIer4Dyf6ruwzLO6q5md1Nk7Rs3z9VCRYPt3L3zy3H6G0tMruyzV1 sl22FxYYSK7JaSryS913p2g+REwx6StNNmNMi6NhzBtGySt8I/jOiocQA2lzWhW8RGIi F/+0tGsZdcQqNgg4OeAQrb4vQyPW6qNtzAv1QIJ1AmagQPHwbwdY0N5KaBwfXLD8O/j6 ZbM/DROzCvXfFp4PEOSOK4EnntuBSqS96vvll0M3rE4N+lH9JtxHFHMP5KKEUrQ4bAsZ /QbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=T7EgxXbL; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h6si9963545ejt.227.2019.11.27.12.56.15; Wed, 27 Nov 2019 12:56:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=T7EgxXbL; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731037AbfK0U4N (ORCPT + 15 others); Wed, 27 Nov 2019 15:56:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:47000 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730746AbfK0U4N (ORCPT ); Wed, 27 Nov 2019 15:56:13 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EB057215F1; Wed, 27 Nov 2019 20:56:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888172; bh=4Bq9zUx7ceP48+ET5OQc8d7++KgI10SHReEseY/1MN0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T7EgxXbLx+BN8oZ4RBi7M08M4v5bVTFntMVsO5UxlxF6YW+IBvUFkGDdHE/zHVqsp fzM2tRET1FE4BbRr4c9S/B6gL5aRnyn4EoXMApyP9+zMtIKc+VG/Chze71uveAPfr1 bqIzkKT84ldLXefJeWQ7gn0duJDboci1Q5ufSEBg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Joel Stanley , Michael Ellerman , Sasha Levin Subject: [PATCH 4.19 032/306] powerpc/boot: Fix opal console in boot wrapper Date: Wed, 27 Nov 2019 21:28:02 +0100 Message-Id: <20191127203117.097130733@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Joel Stanley [ Upstream commit 1a855eaccf353f7ed1d51a3d4b3af727ccbd81ca ] As of commit 10c77dba40ff ("powerpc/boot: Fix build failure in 32-bit boot wrapper") the opal code is hidden behind CONFIG_PPC64_BOOT_WRAPPER, but the boot wrapper avoids include/linux, so it does not get the normal Kconfig flags. We can drop the guard entirely as in commit f8e8e69cea49 ("powerpc/boot: Only build OPAL code when necessary") the makefile only includes opal.c in the build if CONFIG_PPC64_BOOT_WRAPPER is set. Fixes: 10c77dba40ff ("powerpc/boot: Fix build failure in 32-bit boot wrapper") Signed-off-by: Joel Stanley Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin --- arch/powerpc/boot/opal.c | 8 -------- 1 file changed, 8 deletions(-) -- 2.20.1 diff --git a/arch/powerpc/boot/opal.c b/arch/powerpc/boot/opal.c index 0272570d02de1..dfb199ef5b949 100644 --- a/arch/powerpc/boot/opal.c +++ b/arch/powerpc/boot/opal.c @@ -13,8 +13,6 @@ #include #include "../include/asm/opal-api.h" -#ifdef CONFIG_PPC64_BOOT_WRAPPER - /* Global OPAL struct used by opal-call.S */ struct opal { u64 base; @@ -101,9 +99,3 @@ int opal_console_init(void *devp, struct serial_console_data *scdp) return 0; } -#else -int opal_console_init(void *devp, struct serial_console_data *scdp) -{ - return -1; -} -#endif /* __powerpc64__ */ From patchwork Wed Nov 27 20:28:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180330 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp6642311ilf; Wed, 27 Nov 2019 12:56:24 -0800 (PST) X-Google-Smtp-Source: APXvYqzutucUUKFw19qD+kFC/UQfc9UK/5vZL7pgBhMxH3ecGtWY1uyUn+4OQYusVnxmEWcs7mar X-Received: by 2002:aa7:d7d7:: with SMTP id e23mr33269609eds.236.1574888184148; Wed, 27 Nov 2019 12:56:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574888184; cv=none; d=google.com; s=arc-20160816; b=CcUDRWEOGkQVzwQlyNVB8+osccV84zXkd88drwlFUqV4vF4dHRlbbKSCmNgLMYbFsu PD3XcQah2pdPWJWeygCsq1s13aJf0CEZ3jq47MtB8OYlQnQnsLKkXAtGnOuAI8UTEs/m OmVCCYqrxjlvMQH9rW/h+iPjs5kcUBQkDCAQTcN8BY4me4RKVSZO8/LTqja4RbIu7hTj qf18JMM4I702yS5SSctvY8P6e1UijPoOTqiXsNNoA13k8u2B8oir/R8cXZw0d986jH3c VKCIe0S6S6i3dkMcECzd8hoJTp3DTYotEVk09uHZ9CkqeBE/V+6fB2q9YbTupG6YMXIf gGww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aOtdjKN4HHSnn3c2PxH1aowndSgdR9hOaDyxg/nBEE0=; b=iTMOolSYJ4Shyh0vikQUhxaIc3mb4q1XW+h51CGyiOei1p+KcRVUq9SyJFxPwrWR/a 7OQX3FZGCY6VA8k3ysCZaxkmiiRE4xEDt0QVJaO2+l6vp652Ar7Rnzxx8yzhrdojEYq7 pfZl0sxuQ4GaOPRCWjgJtIEflRZ1UT/UO/JvHcwOhoWyO0WMp8KHi2uqx2/NeZWjSOFa C+QBEE+c35XbHJBnAzXh3vrx1nPWSRaLFn4MR8n6XdinxzUqm54Fkkng50psY0R/peeL QXE2Nj/+oeOha302LPD0oAYBZXvY2EYc/+4P89LU1/guuW8uIsSTkhKzNS4X0uaFwnvp aHsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=A4Hzr4hV; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g22si12815285edw.338.2019.11.27.12.56.23; Wed, 27 Nov 2019 12:56:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=A4Hzr4hV; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730277AbfK0U4T (ORCPT + 15 others); Wed, 27 Nov 2019 15:56:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:47060 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729650AbfK0U4P (ORCPT ); Wed, 27 Nov 2019 15:56:15 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5DFDE2084D; Wed, 27 Nov 2019 20:56:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888174; bh=wtjYU+nHjHQOYZA/U7nBjkeTi8Gils3V5XygPliyQmI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A4Hzr4hVt7pmCSDIFWHlCmYO23nFWaWbWbQULrVdr4ldDH84y3Wsj+d40G7FtqNwG D2hmVIifi+LFj+ZtVxPeSB5ZBLXvb6bM607J6K9qdvW7aYkvhM4qVFq3Bg/GFZG5vQ 3TjSM3ZuUDtoGbScbSmxkJtkGACBejr+QN1iEHQI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Joel Stanley , Michael Ellerman , Sasha Levin Subject: [PATCH 4.19 033/306] powerpc/boot: Disable vector instructions Date: Wed, 27 Nov 2019 21:28:03 +0100 Message-Id: <20191127203117.194632825@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Joel Stanley [ Upstream commit e8e132e6885962582784b6fa16a80d07ea739c0f ] This will avoid auto-vectorisation when building with higher optimisation levels. We don't know if the machine can support VSX and even if it's present it's probably not going to be enabled at this point in boot. These flag were both added prior to GCC 4.6 which is the minimum compiler version supported by upstream, thanks to Segher for the details. Signed-off-by: Joel Stanley Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin --- arch/powerpc/boot/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 25e3184f11f78..7d5ddf53750ce 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -32,8 +32,8 @@ else endif BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ - -fno-strict-aliasing -Os -msoft-float -pipe \ - -fomit-frame-pointer -fno-builtin -fPIC -nostdinc \ + -fno-strict-aliasing -Os -msoft-float -mno-altivec -mno-vsx \ + -pipe -fomit-frame-pointer -fno-builtin -fPIC -nostdinc \ -D$(compress-y) ifdef CONFIG_PPC64_BOOT_WRAPPER From patchwork Wed Nov 27 20:29:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180333 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp6646295ilf; Wed, 27 Nov 2019 13:00:42 -0800 (PST) X-Google-Smtp-Source: APXvYqyzr6pXdF0rZ9uKXr7LkERf2kET/DSsi9Ygwle3yec5fBFgdIpnqvZ4smWpEgeVmHoZ+ugK X-Received: by 2002:aa7:c453:: with SMTP id n19mr17181916edr.103.1574888442343; Wed, 27 Nov 2019 13:00:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574888442; cv=none; d=google.com; s=arc-20160816; b=qEDyNWpOrvQQrpvuo4DzJX2I2EYbCVDSywxEwymy9OSOX5nXRELq2C3WQl+yn6C4c/ W1YdLYdy+HxANkfet8F2Jnn8EK4P7/54TUOo3Y8gFzqsMELirl3V5AWgwki2/yc0T/C6 5dsr3zyV4sd9PI/L3v3RoPEDnS9Anh/JJHwherTFN2auI03RblZrf/NTwYdqPP3r8Tsq Ug9aEExGMMrCFurzNrnLP5fpD+cHx12nUGenxNvFrdyQjPwUWLODiSGVEuQmnSfCulv5 wU8O6ZvtSEIITZ/F/9o9141xjLa0t4I2nNjcofH+ur/zb5N9pM7anF9QDXaE2Wh4pdz0 g5XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Tlzb2NcnVwCcy2hPlKKauvQrb82bb9KH6k0y6tzBXcc=; b=MngvX2n7IASBoYYSSKBL1X9aV9dbnfbYSwtgTVns6BulQKnIgWFJbKrhMd8hlGIgOj fTGSaY10a3rRamIbLCQlEoSEenqQhmjj6SRPIY+9RqrFZMdyYDZ8ivKRMDamzGel5ei6 KXASl8ky1JU9uCUIX155NOTqYTiJ6Vr5/P2k++pmb6PkSx+qL8HFIwsR8TuCie+tdLUG yksiQAvXAcK4MlH5N5HPvfEB4HdOmw6IJMjo+ZrziYBQsjWtP+oWW17hr8IptYE+b3gu jIh6Ib/1I+/B+ewLSWATFFT0OHfsXnYtkwZoYqo4epKdxBf+bffAsIosfzPEvjs440ZT 9/bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=T4XTPtnO; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s46si13050154edd.336.2019.11.27.13.00.42; Wed, 27 Nov 2019 13:00:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=T4XTPtnO; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728391AbfK0VAj (ORCPT + 15 others); Wed, 27 Nov 2019 16:00:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:52594 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731589AbfK0VAj (ORCPT ); Wed, 27 Nov 2019 16:00:39 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CC66A21555; Wed, 27 Nov 2019 21:00:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888438; bh=v07zbc7vShP28g0iL9bjsCC4WxDrC1Mp4bhpHU4L4qA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T4XTPtnORpz2IE5GL9VsQwxlIQwea/ox6Lx1m+2g8zcr6B3wqBoGv6FLNj6tbW/Qn iJCaGed6Htw9rV6eQ2SWIMhxqN0OsYEZMBbO8d08K4V+sn5qKmVvSfWRrB6/3DI7Wa nMwXS9Yr5A8QyWwemSvxlDXv12GlCC5APJSd8Qsg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Keiji Hayashibara , Mark Brown , Sasha Levin Subject: [PATCH 4.19 133/306] spi: uniphier: fix incorrect property items Date: Wed, 27 Nov 2019 21:29:43 +0100 Message-Id: <20191127203124.787458611@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Keiji Hayashibara [ Upstream commit 3511ba7d4ca6f39e2d060bb94e42a41ad1fee7bf ] This commit fixes incorrect property because it was different from the actual. The parameters of '#address-cells' and '#size-cells' were removed, and 'interrupts', 'pinctrl-names' and 'pinctrl-0' were added. Fixes: 4dcd5c2781f3 ("spi: add DT bindings for UniPhier SPI controller") Signed-off-by: Keiji Hayashibara Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- .../devicetree/bindings/spi/spi-uniphier.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) -- 2.20.1 diff --git a/Documentation/devicetree/bindings/spi/spi-uniphier.txt b/Documentation/devicetree/bindings/spi/spi-uniphier.txt index 504a4ecfc7b16..b04e66a52de5d 100644 --- a/Documentation/devicetree/bindings/spi/spi-uniphier.txt +++ b/Documentation/devicetree/bindings/spi/spi-uniphier.txt @@ -5,18 +5,20 @@ UniPhier SoCs have SCSSI which supports SPI single channel. Required properties: - compatible: should be "socionext,uniphier-scssi" - reg: address and length of the spi master registers - - #address-cells: must be <1>, see spi-bus.txt - - #size-cells: must be <0>, see spi-bus.txt - - clocks: A phandle to the clock for the device. - - resets: A phandle to the reset control for the device. + - interrupts: a single interrupt specifier + - pinctrl-names: should be "default" + - pinctrl-0: pin control state for the default mode + - clocks: a phandle to the clock for the device + - resets: a phandle to the reset control for the device Example: spi0: spi@54006000 { compatible = "socionext,uniphier-scssi"; reg = <0x54006000 0x100>; - #address-cells = <1>; - #size-cells = <0>; + interrupts = <0 39 4>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_spi0>; clocks = <&peri_clk 11>; resets = <&peri_rst 11>; }; From patchwork Wed Nov 27 20:30:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180334 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp6647292ilf; Wed, 27 Nov 2019 13:01:32 -0800 (PST) X-Google-Smtp-Source: APXvYqx09qsI/NjOEhfqj/Wrw1F9ULK37lYU3e0AbwsZWQvJZ4mDRoaPrlR55B6/mY2rMqLgc6pw X-Received: by 2002:a50:e70f:: with SMTP id a15mr34856271edn.287.1574888492869; Wed, 27 Nov 2019 13:01:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574888492; cv=none; d=google.com; s=arc-20160816; b=Zllbu4BJWJ0FzD4dVBCPEy0TbpKoNMW6Azr9IhTTLUrUY0YyVg7O03S3HgRhIUFOjK h6Yzk5tosr9zAdSCrwK1rCzjooN48gzwNYu5d0IkwNFaiP04l/fyaq7NXfXyBrCIpfNL zZbDIyIXNGwiahFfVCnObVx2KS6CAjoUKmqh0DczMYPlZ/Hk/NB5jy91LjCykY20rr+A r4U5kRuHD2rtqW5UlYYYxl+jkH9Uw8UGsQ6z0OgSy3Zzgl4UXlYjzULzyo5DpJqjwTfc fMME8C4E8pk2ZNCjwVmhUoPKR9O5fY9phLDkHnnCfAHFKULgrSiYK+Ig73dS+NPc3ADP nLKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Gx8GNryAqMhcp9rQxWJ7Dr2v9lOzGytuizQybMF5Juk=; b=sF+MbzY0hLdy5t/gCHlKYFtCJmdCc0sJzvK4Oa67vQhvRyuALaeKNmrSkhAfxfrYns LcRP6i7t808w7Y51wRXtHdyXiaJneeH0oV5zMk3vQENvVEFCbFtQZ7PnKiO57OINQITN Bahw5mYfLQmUoblmCXZ79+CUvt91sR/Ullz8M9b4V5ftHi53761vW45gPvQsbCLHRyiR kiVeCSLd4D2nkbJ9vlXQHPV1qaTpoPhH4Ty0+i6+KyvmA8IvOy/Enf7GfaITO3EkMUGa 8nHiOPgQC+mgKCCh5+ji4EcnKdNR1XQmpk2JMLELv11k2LCoKzZWpDmq8c1/B8rgtZac 3L8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nZyP1g5u; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h11si13023330ede.45.2019.11.27.13.01.32; Wed, 27 Nov 2019 13:01:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=nZyP1g5u; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731734AbfK0VBa (ORCPT + 15 others); Wed, 27 Nov 2019 16:01:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:53752 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727329AbfK0VBa (ORCPT ); Wed, 27 Nov 2019 16:01:30 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8543D2158C; Wed, 27 Nov 2019 21:01:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888489; bh=aTkknpA7PYRoAKFfak6Ht2aOudN4LbMl57GR686Cthc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nZyP1g5uwM/mta4H3103ZQFV1GUx4WwddE+Nv0qNOw00XH2zMIlnllRervVUgNKUK /DND3W7u9z+FkHgatEg3sI8TysjZLiGAcn9Rh76R2X+pdOhQORBsmVnzPe7KlwKLdL HL8GIse5iLFLELISFRppFA+YHwfHyf5qVfT5yEP8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada , Wolfram Sang , Sasha Levin Subject: [PATCH 4.19 155/306] i2c: uniphier-f: fix occasional timeout error Date: Wed, 27 Nov 2019 21:30:05 +0100 Message-Id: <20191127203126.948990786@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Masahiro Yamada [ Upstream commit 39226aaa85f002d695e3cafade3309e12ffdaecd ] Currently, a timeout error could happen at a repeated START condition. For a (non-repeated) START condition, the controller starts sending data when the UNIPHIER_FI2C_CR_STA bit is set. However, for a repeated START condition, the hardware starts running when the slave address is written to the TX FIFO - the write to the UNIPHIER_FI2C_CR register is actually unneeded. Because the hardware is already running before the IRQ is enabled for a repeated START, the driver may miss the IRQ event. In most cases, this problem does not show up since modern CPUs are much faster than the I2C transfer. However, it is still possible that a context switch happens after the controller starts, but before the IRQ register is set up. To fix this, - Do not write UNIPHIER_FI2C_CR for repeated START conditions. - Enable IRQ *before* writing the slave address to the TX FIFO. - Disable IRQ for the current CPU while queuing up the TX FIFO; If the CPU is interrupted by some task, the interrupt handler might be invoked due to the empty TX FIFO before completing the setup. Fixes: 6a62974b667f ("i2c: uniphier_f: add UniPhier FIFO-builtin I2C driver") Signed-off-by: Masahiro Yamada Signed-off-by: Wolfram Sang Signed-off-by: Sasha Levin --- drivers/i2c/busses/i2c-uniphier-f.c | 33 ++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 8 deletions(-) -- 2.20.1 diff --git a/drivers/i2c/busses/i2c-uniphier-f.c b/drivers/i2c/busses/i2c-uniphier-f.c index b9a0690b4fd73..bbd5b137aa216 100644 --- a/drivers/i2c/busses/i2c-uniphier-f.c +++ b/drivers/i2c/busses/i2c-uniphier-f.c @@ -260,6 +260,8 @@ static irqreturn_t uniphier_fi2c_interrupt(int irq, void *dev_id) static void uniphier_fi2c_tx_init(struct uniphier_fi2c_priv *priv, u16 addr) { priv->enabled_irqs |= UNIPHIER_FI2C_INT_TE; + uniphier_fi2c_set_irqs(priv); + /* do not use TX byte counter */ writel(0, priv->membase + UNIPHIER_FI2C_TBC); /* set slave address */ @@ -292,6 +294,8 @@ static void uniphier_fi2c_rx_init(struct uniphier_fi2c_priv *priv, u16 addr) priv->enabled_irqs |= UNIPHIER_FI2C_INT_RF; } + uniphier_fi2c_set_irqs(priv); + /* set slave address with RD bit */ writel(UNIPHIER_FI2C_DTTX_CMD | UNIPHIER_FI2C_DTTX_RD | addr << 1, priv->membase + UNIPHIER_FI2C_DTTX); @@ -315,14 +319,16 @@ static void uniphier_fi2c_recover(struct uniphier_fi2c_priv *priv) } static int uniphier_fi2c_master_xfer_one(struct i2c_adapter *adap, - struct i2c_msg *msg, bool stop) + struct i2c_msg *msg, bool repeat, + bool stop) { struct uniphier_fi2c_priv *priv = i2c_get_adapdata(adap); bool is_read = msg->flags & I2C_M_RD; unsigned long time_left, flags; - dev_dbg(&adap->dev, "%s: addr=0x%02x, len=%d, stop=%d\n", - is_read ? "receive" : "transmit", msg->addr, msg->len, stop); + dev_dbg(&adap->dev, "%s: addr=0x%02x, len=%d, repeat=%d, stop=%d\n", + is_read ? "receive" : "transmit", msg->addr, msg->len, + repeat, stop); priv->len = msg->len; priv->buf = msg->buf; @@ -338,16 +344,24 @@ static int uniphier_fi2c_master_xfer_one(struct i2c_adapter *adap, writel(UNIPHIER_FI2C_RST_TBRST | UNIPHIER_FI2C_RST_RBRST, priv->membase + UNIPHIER_FI2C_RST); /* reset TX/RX FIFO */ + spin_lock_irqsave(&priv->lock, flags); + if (is_read) uniphier_fi2c_rx_init(priv, msg->addr); else uniphier_fi2c_tx_init(priv, msg->addr); - uniphier_fi2c_set_irqs(priv); - dev_dbg(&adap->dev, "start condition\n"); - writel(UNIPHIER_FI2C_CR_MST | UNIPHIER_FI2C_CR_STA, - priv->membase + UNIPHIER_FI2C_CR); + /* + * For a repeated START condition, writing a slave address to the FIFO + * kicks the controller. So, the UNIPHIER_FI2C_CR register should be + * written only for a non-repeated START condition. + */ + if (!repeat) + writel(UNIPHIER_FI2C_CR_MST | UNIPHIER_FI2C_CR_STA, + priv->membase + UNIPHIER_FI2C_CR); + + spin_unlock_irqrestore(&priv->lock, flags); time_left = wait_for_completion_timeout(&priv->comp, adap->timeout); @@ -408,6 +422,7 @@ static int uniphier_fi2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) { struct i2c_msg *msg, *emsg = msgs + num; + bool repeat = false; int ret; ret = uniphier_fi2c_check_bus_busy(adap); @@ -418,9 +433,11 @@ static int uniphier_fi2c_master_xfer(struct i2c_adapter *adap, /* Emit STOP if it is the last message or I2C_M_STOP is set. */ bool stop = (msg + 1 == emsg) || (msg->flags & I2C_M_STOP); - ret = uniphier_fi2c_master_xfer_one(adap, msg, stop); + ret = uniphier_fi2c_master_xfer_one(adap, msg, repeat, stop); if (ret) return ret; + + repeat = !stop; } return num; From patchwork Wed Nov 27 20:30:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180346 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp6673312ilf; Wed, 27 Nov 2019 13:25:26 -0800 (PST) X-Google-Smtp-Source: APXvYqzIiaoXf13QZFUdK9IYDmh4Hm35dN+aY6yJbxUxNeR67yAaXV+s2VYovNwblJ6NkqCZPF9D X-Received: by 2002:aa7:c54a:: with SMTP id s10mr28610574edr.5.1574889926149; Wed, 27 Nov 2019 13:25:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574889926; cv=none; d=google.com; s=arc-20160816; b=NpKHK1FWTF3g1SSQVLuKNf9IDvtxlK3kM7AFV38IWrrONA8UqJ5dclDv6Fw9PbFJKB fsLFjBcxOOv49wjsMsq+L+irscNWz3XKFY+HsZgy/ej5An1X8ylBvOvDPiI4nYyxdPnd iV8NXhTkbOKVqEYEcjkekZkRb6hcqyYHMX/uMp4mjCcMfyR/NBpn9/kY6QUiqou/D6ly 7oG4Oc1R8u7sUbICFSWvWn2oyBXYxnTidtvyhTnEkJXIH0+eCdODrrmEBRVDz/UOTB0K DSZBsknyaCiyNJxBlrrhUY6Z6gW+QgvZneo7SYn6xWS7GOQqVHxQg76eBssEMrIySaAs cR+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Mxdtb8HSF0ZRCZUpniABSnvtbJK6m8s8oBP+mfHbUfU=; b=SjDWvGIBuBTG6oxSKrwXgzFrIeDbeC7ewvdlIJIg5pAmZtuPZzdDQL1oGqc7lwN1zA j/667cchWKUH6a6Qjsh+DAGuRvNt0fj4pT2bVGNv1pJtnRWXL6MGNO0xgX33Tw75OHHF EskNOB3EGzFz2gSLLiN1Ue9apOxu/8On+SYtuLAsQpocGtGZrOsDBZrqh5H2jeXMwOSO Zvt2zyrm+CS+j+SdXfxnXObynqGiABH51+e0p6XZhc8DvSVeC10fBipm9aC+d9wyMPiP Zb6DLAUsQkr92ABT62REEL5mSb2C7569AngvHAZMN6vc4DWqIX0VEiH6DxH7XSZbHnuw c3mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CQ8rZ9Z4; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gu7si10262900ejb.405.2019.11.27.13.25.25; Wed, 27 Nov 2019 13:25:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=CQ8rZ9Z4; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727354AbfK0VZY (ORCPT + 15 others); Wed, 27 Nov 2019 16:25:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:54196 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731205AbfK0VBp (ORCPT ); Wed, 27 Nov 2019 16:01:45 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 61532215A5; Wed, 27 Nov 2019 21:01:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888504; bh=8NzhWQdmgAYi75Syl7w/F0X2VA0psKoEI0KYAzgnHuw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CQ8rZ9Z4zFWHNHbmyEe8S4g8m+1Jwfhrl4GDhMgqhpNVjJ6Xw0R41dxSp25Gobpqz CMIIEq6lhoEgLyjmLLl39PBf+w5zH1TaKYoSptWfI8fs299ZKls5oOT8tXBdjXEOre zJSjAHKeogJlUDWcDA69dcA4xVweLIYJqHcC58b0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Joel Stanley , Michael Ellerman , Sasha Levin Subject: [PATCH 4.19 161/306] selftests/powerpc/ptrace: Fix out-of-tree build Date: Wed, 27 Nov 2019 21:30:11 +0100 Message-Id: <20191127203127.258270925@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Joel Stanley [ Upstream commit c39b79082a38a4f8c801790edecbbb4d62ed2992 ] We should use TEST_GEN_PROGS, not TEST_PROGS. That tells the selftests makefile (lib.mk) that those tests are generated (built), and so it adds the $(OUTPUT) prefix for us, making the out-of-tree build work correctly. It also means we don't need our own clean rule, lib.mk does it. We also have to update the ptrace-pkey and core-pkey rules to use $(OUTPUT). Signed-off-by: Joel Stanley Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin --- tools/testing/selftests/powerpc/ptrace/Makefile | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) -- 2.20.1 diff --git a/tools/testing/selftests/powerpc/ptrace/Makefile b/tools/testing/selftests/powerpc/ptrace/Makefile index 923d531265f8c..9f9423430059e 100644 --- a/tools/testing/selftests/powerpc/ptrace/Makefile +++ b/tools/testing/selftests/powerpc/ptrace/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -TEST_PROGS := ptrace-gpr ptrace-tm-gpr ptrace-tm-spd-gpr \ +TEST_GEN_PROGS := ptrace-gpr ptrace-tm-gpr ptrace-tm-spd-gpr \ ptrace-tar ptrace-tm-tar ptrace-tm-spd-tar ptrace-vsx ptrace-tm-vsx \ ptrace-tm-spd-vsx ptrace-tm-spr ptrace-hwbreak ptrace-pkey core-pkey \ perf-hwbreak @@ -7,14 +7,9 @@ TEST_PROGS := ptrace-gpr ptrace-tm-gpr ptrace-tm-spd-gpr \ top_srcdir = ../../../../.. include ../../lib.mk -all: $(TEST_PROGS) - CFLAGS += -m64 -I../../../../../usr/include -I../tm -mhtm -fno-pie -ptrace-pkey core-pkey: child.h -ptrace-pkey core-pkey: LDLIBS += -pthread - -$(TEST_PROGS): ../harness.c ../utils.c ../lib/reg.S ptrace.h +$(OUTPUT)/ptrace-pkey $(OUTPUT)/core-pkey: child.h +$(OUTPUT)/ptrace-pkey $(OUTPUT)/core-pkey: LDLIBS += -pthread -clean: - rm -f $(TEST_PROGS) *.o +$(TEST_GEN_PROGS): ../harness.c ../utils.c ../lib/reg.S ptrace.h From patchwork Wed Nov 27 20:31:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180339 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp6650324ilf; Wed, 27 Nov 2019 13:04:03 -0800 (PST) X-Google-Smtp-Source: APXvYqz7RK7uJgpQQAQjFsfbxK9oU5htSbDjJyO9SNNWH+pRV1fWXpvnCLplJj/AHpzIUPCTHDFB X-Received: by 2002:a17:906:da04:: with SMTP id fi4mr31823828ejb.24.1574888643290; Wed, 27 Nov 2019 13:04:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574888643; cv=none; d=google.com; s=arc-20160816; b=b6UBFVnKHTqzlhiy6luHrkCFjM++6slSiMqS4Z3CvTZ4XKiO/eHt+SDA6CMLS0xJ1a +COpBJPJk3UTvm1R0YZo7ro13i/B+7j238sg/WCEMgmgDy+N1tCHPEURn7f6rCYyGxLA PWrJY83UREZUlTKsItjQ0CVZB2pvziWE5oLgHjGQCc4MatisEVz41sfX1SlKo4Axb+1c yzRjL5HDM70I5z7sa6iNdVGobY/tpz1uYDwW/5hsUOiE5NSize+tY699N7r/9E+CbXRc tfzLufgjqsm+uSwTxm4Q5c+Nyw7/8LbmJ3Gvvn0RJDe/9RFR2s9TvStV/H7BIBYTH1tT nEgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=g/2cQ3CxpAsB7+q2aJoGe9Z6yulTN7EvbNz+TlQ1EBI=; b=UrESQMrK8xDLXVB7C0b+KwSIVEER+MAAyDpQ1yhhPDmIrI/USIJ5Kgth6W5CW3Xht4 avu7yKvxelrexGTZe5OnPhnbFoceC5+AFXAlAVoTbxGK/Abelnh4LqemDMGV88kydA28 RLFErhsCJhgVN11xJR4NxuSmcy+MGw8pFdGVFSZTfCXjGC6n7WGyr4JOZKNMyL6BEmgX YX1/edIH5H0rFlEwImvYSUgQosOB86rFaNFpsQDnwqrOj1kEwHLRlwBzRX/DwXTdcyze 3/LKrUh6h2LupHp6HwhkhU1iE0nGLy314gvgmgBeJ5EmL6Y43BLguhMKkO8pr5mO/M3j RYHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=T2X+sYAB; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f25si4359378ejq.362.2019.11.27.13.04.03; Wed, 27 Nov 2019 13:04:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=T2X+sYAB; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731484AbfK0VEB (ORCPT + 15 others); Wed, 27 Nov 2019 16:04:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:57346 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732106AbfK0VEA (ORCPT ); Wed, 27 Nov 2019 16:04:00 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 41F01215A5; Wed, 27 Nov 2019 21:03:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888639; bh=QvQ27XNzzcAgPS7U8JGTJIggurF2PvKbrINkZNsf99U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T2X+sYABJYhsQ0qu1LA59mEwj9eulIJA7PGeuinpNtVLYZ3R9W69DcPzbmm3CJNSu n+UL3lHPxVol6nlX5MMmxzej7Wq+Nl6TUzGdHmurpryha/fwHc/lIoY9k4/KirEUyA JQuEkmO+mP3DOuhC98n8UQsKL5/yzaq0ZgCbGugA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nikolay Borisov , Changbin Du , Arnd Bergmann , David Sterba , Sasha Levin Subject: [PATCH 4.19 212/306] btrfs: avoid link error with CONFIG_NO_AUTO_INLINE Date: Wed, 27 Nov 2019 21:31:02 +0100 Message-Id: <20191127203130.607067431@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann [ Upstream commit 7e17916b35797396f681a3270245fd29c1e4c250 ] Note: this patch fixes a problem in a feature outside of btrfs ("kernel hacking: add a config option to disable compiler auto-inlining") and is applied ahead of time due to cross-subsystem dependencies. On 32-bit ARM with gcc-8, I see a link error with the addition of the CONFIG_NO_AUTO_INLINE option: fs/btrfs/super.o: In function `btrfs_statfs': super.c:(.text+0x67b8): undefined reference to `__aeabi_uldivmod' super.c:(.text+0x67fc): undefined reference to `__aeabi_uldivmod' super.c:(.text+0x6858): undefined reference to `__aeabi_uldivmod' super.c:(.text+0x6920): undefined reference to `__aeabi_uldivmod' super.c:(.text+0x693c): undefined reference to `__aeabi_uldivmod' fs/btrfs/super.o:super.c:(.text+0x6958): more undefined references to `__aeabi_uldivmod' follow So far this is the only file that shows the behavior, so I'd propose to just work around it by marking the functions as 'static inline' that normally get inlined here. The reference to __aeabi_uldivmod comes from a div_u64() which has an optimization for a constant division that uses a straight '/' operator when the result should be known to the compiler. My interpretation is that as we turn off inlining, gcc still expects the result to be constant but fails to use that constant value. Link: https://lkml.kernel.org/r/20181103153941.1881966-1-arnd@arndb.de Reviewed-by: Nikolay Borisov Reviewed-by: Changbin Du Signed-off-by: Arnd Bergmann [ add the note ] Signed-off-by: David Sterba Signed-off-by: Sasha Levin --- fs/btrfs/super.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.20.1 diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 8888337a95b64..ddbad8d509490 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -1919,7 +1919,7 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data) } /* Used to sort the devices by max_avail(descending sort) */ -static int btrfs_cmp_device_free_bytes(const void *dev_info1, +static inline int btrfs_cmp_device_free_bytes(const void *dev_info1, const void *dev_info2) { if (((struct btrfs_device_info *)dev_info1)->max_avail > @@ -1948,8 +1948,8 @@ static inline void btrfs_descending_sort_devices( * The helper to calc the free space on the devices that can be used to store * file data. */ -static int btrfs_calc_avail_data_space(struct btrfs_fs_info *fs_info, - u64 *free_bytes) +static inline int btrfs_calc_avail_data_space(struct btrfs_fs_info *fs_info, + u64 *free_bytes) { struct btrfs_device_info *devices_info; struct btrfs_fs_devices *fs_devices = fs_info->fs_devices; From patchwork Wed Nov 27 20:31:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180340 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp6652263ilf; Wed, 27 Nov 2019 13:05:34 -0800 (PST) X-Google-Smtp-Source: APXvYqzCMCOHujqfA834OyNwblObK/jf8jBBYuIUuIB72XtzzzIysw2gXT7BIgUAO6j3WyK7Dsj2 X-Received: by 2002:a50:9b1a:: with SMTP id o26mr33871793edi.208.1574888734380; Wed, 27 Nov 2019 13:05:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574888734; cv=none; d=google.com; s=arc-20160816; b=oVwvpgvYwou3AEriC2p0NvGlqDoFtv/ygWWuOtq34lFWiPYc933A2h6w7qaXyh/XcP SQXsZh97SEiHoKyGJNPDWwz1/l1vtZx3Aux/1uH+Uh5v2LhKR5TVveCtgL6t6Le7/a5A IIt68iG+xiAGT8+taQoTKqGBB688GZimwJOM4u7kjvNYb9aYar9zTITNQ749XxNHdl7f 4axv+TzQesBcOhNFGr1hUif9I2XwtAZLpksXOPttOxibImWSix7Vn94fjVP+XGC+C/A7 lwxnnE4BqPg3BAYNZu/WZRUInoIH4bzGToCMVQdF4uNu77U9BCplGMiYTR9ZN9nVHz9k +zZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=l8g7OZpanZ5lmJS2c04LXST/25kq4mPXwUsA+g0xfCY=; b=xvpCk9YUlC7T6mJtd5JMylWEL+O7dsViheq8zIM+NYKccLQygWphrGrYHPWVyI8fcN 6IcMR8xkDC61DfRnwwz+IlXB4VetLZ8iXPwkINlX/ZRLFg7QPy55vdbkaO9GMLOH05gL 3TfDC6tID2khQrcuewqqr+MZy6YhvVCt9bx5NeRlmvLBdjUUt3j/7GU5S0GIhm2/Z0a8 OMS6vzvcTEL6quM6OAwan97Y3yT+nYvq4xDMiGqNQveEInQGhiXKu7B2GRkoZgkqmiAl 2k7BSmCTKJZ1vVORS+8IH6dsDT9cGUtzHCFLIZl0D91q34kPlQeNBg7FyVdiI/F2PCv4 uZEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=e1XgCzfa; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 9si10259580eju.352.2019.11.27.13.05.34; Wed, 27 Nov 2019 13:05:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=e1XgCzfa; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731403AbfK0VFc (ORCPT + 15 others); Wed, 27 Nov 2019 16:05:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:59258 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732295AbfK0VFa (ORCPT ); Wed, 27 Nov 2019 16:05:30 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C1EB521741; Wed, 27 Nov 2019 21:05:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888730; bh=9OXAevLG4BgzRbZksXQkB08q/O8Khxr4GuRBGW5lZdM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e1XgCzfasZOKGXBrSvi4Nubr1Wg3CfPSNT465GtSCC7y7I2DB53IjO5QOBlBWl3KB 6eHJ0jZf2LLW5cCWKfx3LZf5mUvNBOjbr7hhxGml8OWpHqqSrTuMYlRZhyNkwk+uuG Nz8bOqtw/usHxMDx4/UyApi+bm28WRfIEE4asIo8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kishon Vijay Abraham I , Lorenzo Pieralisi , Sasha Levin Subject: [PATCH 4.19 248/306] PCI: keystone: Use quirk to limit MRRS for K2G Date: Wed, 27 Nov 2019 21:31:38 +0100 Message-Id: <20191127203133.038833312@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Kishon Vijay Abraham I [ Upstream commit 148e340c0696369fadbbddc8f4bef801ed247d71 ] PCI controller in K2G also has a limitation that memory read request size (MRRS) must not exceed 256 bytes. Use the quirk to limit MRRS (added for K2HK, K2L and K2E) for K2G as well. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi Signed-off-by: Sasha Levin --- drivers/pci/controller/dwc/pci-keystone.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.20.1 diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c index 5e199e7d2d4fd..765357b87ff69 100644 --- a/drivers/pci/controller/dwc/pci-keystone.c +++ b/drivers/pci/controller/dwc/pci-keystone.c @@ -36,6 +36,7 @@ #define PCIE_RC_K2HK 0xb008 #define PCIE_RC_K2E 0xb009 #define PCIE_RC_K2L 0xb00a +#define PCIE_RC_K2G 0xb00b #define to_keystone_pcie(x) dev_get_drvdata((x)->dev) @@ -50,6 +51,8 @@ static void quirk_limit_mrrs(struct pci_dev *dev) .class = PCI_CLASS_BRIDGE_PCI << 8, .class_mask = ~0, }, { PCI_DEVICE(PCI_VENDOR_ID_TI, PCIE_RC_K2L), .class = PCI_CLASS_BRIDGE_PCI << 8, .class_mask = ~0, }, + { PCI_DEVICE(PCI_VENDOR_ID_TI, PCIE_RC_K2G), + .class = PCI_CLASS_BRIDGE_PCI << 8, .class_mask = ~0, }, { 0, }, };