From patchwork Mon Sep 17 03:02:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 146826 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3269836ljw; Sun, 16 Sep 2018 20:03:42 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYXnu7CaUmyoYPlLz9quTxX9Q1DLCQ56oNFZQcFwBNy59xdXUULfp4ajj/y+Wj7pKo5rlUB X-Received: by 2002:a17:902:82c5:: with SMTP id u5-v6mr22643882plz.83.1537153422721; Sun, 16 Sep 2018 20:03:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537153422; cv=none; d=google.com; s=arc-20160816; b=d8+xMSSGWVdpw9Ylwvlde69humJXN49Jij0XXYpY7KhiHSs7Kg3HNr6TI+hBbiip/b Mj5QAnAsTKNSqaFHHXmIfoFgOVasxQVUYw7VIaANPUli/NRRjyd+z1cNuKElija+Ee2F +jwrFbEMIeE7+hn7O1eiKfNX0M7DS8OicylbLAygnBq5nVU1LWzmVjAkYQ5ioXkStMSd F6MwN/8vTF2eVxJ/rrpSxzOLkodMMNVf1Sb0+j+uhaQTuQS9VkJItScQFfespd0QrBH9 oGLLUemY45kcb998wMl5DRQbFOUSbPMqaf9LC1omxSGrzp599JBVBDTx7BvK/Zpuzobv 83Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=Z0ncOjyrafHCJq+/q7ztZPu7s7yrwhopdsbKhZMQ/mo=; b=OkmzTEiwGTV/MlfsxFRmGaD+0jQQeLfhBaEWU5p4spDlUDRHp/eaYYtmMquBqfo7LU kmCsG/sIBPzX8oDLtdieU1vDhkS4FbZxKB0WD/fG16hIy8CfMhR2CQx4xgu//TDIdqbC Ui14psUYyCmZoRTiz/oGEHc6ROEj62k03PkEmqqYesl10XKHBhsm9DE46BFvNd4vvZx1 E/5kwrlriHAGgUE4Fv/nt7y26/VnKKP3Baw0w9ZFiBP7i6duMZBzHhzQRwxWphL7d0Oi qJZQMrEjx631wdNf7esZuoeIrsMRtTUZSEQPdG5zrV8izgAb8EVfS5zQs7OyYC7wpJ8a tAnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b="kt5YXi/y"; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 9-v6si14274139pgf.599.2018.09.16.20.03.42; Sun, 16 Sep 2018 20:03:42 -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=@microsoft.com header.s=selector1 header.b="kt5YXi/y"; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729907AbeIQI2y (ORCPT + 32 others); Mon, 17 Sep 2018 04:28:54 -0400 Received: from mail-dm3nam03on0101.outbound.protection.outlook.com ([104.47.41.101]:50080 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729856AbeIQI2x (ORCPT ); Mon, 17 Sep 2018 04:28:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z0ncOjyrafHCJq+/q7ztZPu7s7yrwhopdsbKhZMQ/mo=; b=kt5YXi/yb0/+dej0XVknBNm7sQGaUQCItNvDRWHTUvADdUhCxWh0viYsQUTDDcpenuEUgackKMpGXd7HRtN7Ot9Svu9Wzlgql9FSELlJVmjVbiAHhyIr4WSFSwxKARKI94t336MTubG71sf20reSw766ZOxL40x8YkJaxEh799o= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0855.namprd21.prod.outlook.com (10.173.192.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.4; Mon, 17 Sep 2018 03:03:33 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::54e2:88e0:b622:b36]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::54e2:88e0:b622:b36%5]) with mapi id 15.20.1185.003; Mon, 17 Sep 2018 03:03:33 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Sudeep Holla , Sebastian Reichel , Sebastian Reichel , Sasha Levin Subject: [PATCH AUTOSEL 4.14 11/87] power: vexpress: fix corruption in notifier registration Thread-Topic: [PATCH AUTOSEL 4.14 11/87] power: vexpress: fix corruption in notifier registration Thread-Index: AQHUTjLgR02SHI1GEkGQQhY+BDpR0g== Date: Mon, 17 Sep 2018 03:02:31 +0000 Message-ID: <20180917030220.245686-11-alexander.levin@microsoft.com> References: <20180917030220.245686-1-alexander.levin@microsoft.com> In-Reply-To: <20180917030220.245686-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR21MB0855; 6://xvVmIeE4aHzHp4LN0uoDza0Hixkonkh61ZbBYK0Mv3z8xM7IJjNERRvzMtYuGCHAEt8vpd/LCyRKf8z9A6zvYtKhb+fP/xRYYqt10gtUZLg+6JHdctCsSIeJBcEOTig+kA+W/gtHfRSgRASiM/6UHYXaeT+we9M6fTvkU1ITKJ7dWlbtp8iFW+fgGHaxfmoC+/oq4i7pA2+sX6upj988OBSdJWoXCT3D6PN96XqInAGZjhgz2IvboH+ycosbf9RdClm5zfwldI+apdyqj174h86P/thtlIdLFcbI48fjAG0m6bvZ7YEMGIae/5jqErIxEgo90ffoiswjsiuw7jq6sbKS6Gm+K4Avf73bzB/eiHhxel8IAwQLZ54bJOC5zGY7wTRWpUuiO9YRENyEzbZ29UzCClAX8kixfI6SNHEj5HaiPGu2E7zXub562fdT6TzSQsWXPcIKRvdoQ0hli3+w==; 5:VXtGelZo20tFIhYJnsu06g8SiocmvNZEdXL2+HsMFjiEkXque2z7mcL1t3yXwUbJ3wbNmuRUf4lmJveuPrFg9V51Py72QMxFXO7skuPAOeznsJNaK87fmrX+SBmtva6V7oPt5iE41KA2ZKnOAqUJRRQZNtxTiao6ohUBEF7SLCg=; 7:jJgEH1XTX/LZShBUw6ix/Uwu1nwckrJx2l/5LGGbTqAYw27+L5WjiXgxyQn55O4qFSM9fLZyNTOgkmYhctCI3YmtFdcEQWhAELfL9jMgI4UJ7eO6iQuOGaitMu3vKyEo4/usgPMp2WwtUhjMF6X+N2rAySeUd0HFc86ca0K0ieN82TKe9GrArIixUNjZWquH23Ktr7MNP9tSgnh98XUPTp7jkcFBEK2oS8LTseox+qWBRM4gEhPvTOCKRuhQvI14 x-ms-office365-filtering-correlation-id: c6d4d61d-2438-4055-fc24-08d61c4a2763 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:CY4PR21MB0855; x-ms-traffictypediagnostic: CY4PR21MB0855: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917)(28532068793085)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(3231355)(944501410)(52105095)(2018427008)(10201501046)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(201708071742011)(7699050)(76991041); SRVR:CY4PR21MB0855; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0855; x-forefront-prvs: 0798146F16 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(979002)(346002)(39860400002)(376002)(396003)(136003)(366004)(199004)(189003)(6436002)(99286004)(7736002)(110136005)(54906003)(97736004)(5660300001)(66066001)(446003)(72206003)(76176011)(86362001)(86612001)(81166006)(81156014)(2906002)(478600001)(305945005)(68736007)(105586002)(2616005)(106356001)(476003)(11346002)(22452003)(575784001)(6486002)(10090500001)(10290500003)(8676002)(36756003)(6346003)(6116002)(6506007)(3846002)(102836004)(107886003)(6512007)(1076002)(25786009)(217873002)(4326008)(14454004)(26005)(256004)(14444005)(486006)(186003)(316002)(2900100001)(8936002)(53936002)(5250100002)(2501003)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0855; H:CY4PR21MB0776.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: 8ODFQwU20lTDPyNK8BrjY8PsreR/cAFN73SfZWTQB423edKMam9jQSlP+lRJOk1BQByzRfOey3BkZvAGUQlm0feTShtD+9VNWE6pfNqbo2QQHAJpaGmNTSzyHHe7iOMCxGc2M0a9VK/JgV7RBB3UwyW6+5o2juvFqqwbuwUsu0tT+XbsRhhaMidwMpUOWDDQuIbz0SLL/WO1LEHnzutN1GinfQqbtXjVe9lxWpyN/hmD13CpDz/S/7lDv8qinOcLcH5IQnO1MoCZOgsiM55QUh/EqOhlwKnHAcBasHKYQah2pheob2NP0wOTWeFuDAtZ3jC9w1+oD1c+ZDtcAaFLdyxNrRJ56HEJfMh6762PPj8= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: c6d4d61d-2438-4055-fc24-08d61c4a2763 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Sep 2018 03:02:31.7751 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0855 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sudeep Holla [ Upstream commit 09bebb1adb21ecd04adf7ccb3b06f73e3a851e93 ] Vexpress platforms provide two different restart handlers: SYS_REBOOT that restart the entire system, while DB_RESET only restarts the daughter board containing the CPU. DB_RESET is overridden by SYS_REBOOT if it exists. notifier_chain_register used in register_restart_handler by design relies on notifiers to be registered once only, however vexpress restart notifier can get registered twice. When this happen it corrupts list of notifiers, as result some notifiers can be not called on proper event, traverse on list can be cycled forever, and second unregister can access already freed memory. So far, since this was the only restart handler in the system, no issue was observed even if the same notifier was registered twice. However commit 6c5c0d48b686 ("watchdog: sp805: add restart handler") added support for SP805 restart handlers and since the system under test contains two vexpress restart and two SP805 watchdog instances, it was observed that during the boot traversing the restart handler list looped forever as there's a cycle in that list resulting in boot hang. This patch fixes the issues by ensuring that the notifier is installed only once. Cc: Sebastian Reichel Signed-off-by: Sudeep Holla Fixes: 46c99ac66222 ("power/reset: vexpress: Register with kernel restart handler") Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin --- drivers/power/reset/vexpress-poweroff.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) -- 2.17.1 diff --git a/drivers/power/reset/vexpress-poweroff.c b/drivers/power/reset/vexpress-poweroff.c index 102f95a09460..e9e749f87517 100644 --- a/drivers/power/reset/vexpress-poweroff.c +++ b/drivers/power/reset/vexpress-poweroff.c @@ -35,6 +35,7 @@ static void vexpress_reset_do(struct device *dev, const char *what) } static struct device *vexpress_power_off_device; +static atomic_t vexpress_restart_nb_refcnt = ATOMIC_INIT(0); static void vexpress_power_off(void) { @@ -99,10 +100,13 @@ static int _vexpress_register_restart_handler(struct device *dev) int err; vexpress_restart_device = dev; - err = register_restart_handler(&vexpress_restart_nb); - if (err) { - dev_err(dev, "cannot register restart handler (err=%d)\n", err); - return err; + if (atomic_inc_return(&vexpress_restart_nb_refcnt) == 1) { + err = register_restart_handler(&vexpress_restart_nb); + if (err) { + dev_err(dev, "cannot register restart handler (err=%d)\n", err); + atomic_dec(&vexpress_restart_nb_refcnt); + return err; + } } device_create_file(dev, &dev_attr_active); From patchwork Mon Sep 17 03:02:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 146835 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3284373ljw; Sun, 16 Sep 2018 20:25:58 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbLhtNWB5KKcbZkC5eimDO8Oee0ynL1ctR6uJoJL5CYGJYGKEgzCYt1GY15QQ4e+J41WE2s X-Received: by 2002:a62:f0d:: with SMTP id x13-v6mr23731470pfi.221.1537154758602; Sun, 16 Sep 2018 20:25:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537154758; cv=none; d=google.com; s=arc-20160816; b=hJNy8LIZh4AhXPPyJq8+InOz2/8gQ6xVatKQsjSX8pKll+pj9jA6yZnekdmKli2nNM /dvXDTSAver8wCAM+eu2++FKRncHIQ4YRWzQ/vgmOkSQJNsav11EsjlVogzp6co8nlgP TpKY+JTp89WuvEmsKEmml6e4Ey9MG7daorilRORYt4Pc0gVV4vAtZFDIaUso19uH+ssC DEEi+0N9lkZbNqX+5h7r++J1zKzYl9SCVGeMMVRwr5SMFi0h5zOkADVkaL9/HL5Obmg9 3ZK3pi8uUafxLoG5WqDUy+Rl2FMATjkU4tjhDCEeMFp0p6lHC36oLT7n8NUD4yewv1Yg yZiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=tmxb2Kvuspo+88uKCu57S6v63gUG2PgZIUeT+J7uDtM=; b=LKgPlzj+r1zMIb3ImNrV+shqkjd+wpUCl//K654B45uRJh8eHGOBOjC//CAcF981iC pV6vRGhwJcNgm9UdOAr753gBjS2EN6npY8DHFurnAcwkDI3e/52DxxFX+BpNNpU497Co MyhbcQQ07a17VsFc4srGhaJjs2YJFdZV5bIzDienOMXe4yDJIXt0tN82sHjMdjq8+Kh0 s9d/RS0m6Mt4CR9lWC/Fbj6UYsNxVJXOp48Qwz5yomRlHohgo/5ZTXoucQUCZ/+fFrWE mx37d2FmUH59tzTyYFq8NeKSbyykOR+vXettTjDneoRLe6ZnNqXy7zZGSP/4nLj4BlFa TwVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b="llNfJ/Lb"; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r39-v6si14248143pld.218.2018.09.16.20.25.58; Sun, 16 Sep 2018 20:25:58 -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=@microsoft.com header.s=selector1 header.b="llNfJ/Lb"; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729893AbeIQI2y (ORCPT + 32 others); Mon, 17 Sep 2018 04:28:54 -0400 Received: from mail-by2nam03on0130.outbound.protection.outlook.com ([104.47.42.130]:60384 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729820AbeIQI2w (ORCPT ); Mon, 17 Sep 2018 04:28:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tmxb2Kvuspo+88uKCu57S6v63gUG2PgZIUeT+J7uDtM=; b=llNfJ/LbndItuCbl5YEFMJEuTBGLMlDr2jFtbFFS537uU3Ad3Ow/ONaqXNNyQqLw9XtFviKcx3CQFcAeW3M26vQ/AVajoYRnlpiHCokXERq8ZDeTm4j3SKdgI680Jet1BaBBunXJMORKijVx5lfkafp9HwO8Bcb/2MlTpJcGnuE= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0855.namprd21.prod.outlook.com (10.173.192.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.4; Mon, 17 Sep 2018 03:03:33 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::54e2:88e0:b622:b36]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::54e2:88e0:b622:b36%5]) with mapi id 15.20.1185.003; Mon, 17 Sep 2018 03:03:33 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Zhen Lei , Joerg Roedel , Sasha Levin Subject: [PATCH AUTOSEL 4.14 12/87] iommu/amd: make sure TLB to be flushed before IOVA freed Thread-Topic: [PATCH AUTOSEL 4.14 12/87] iommu/amd: make sure TLB to be flushed before IOVA freed Thread-Index: AQHUTjLg4fCFdIM2ZUGIUG3umeZNpQ== Date: Mon, 17 Sep 2018 03:02:32 +0000 Message-ID: <20180917030220.245686-12-alexander.levin@microsoft.com> References: <20180917030220.245686-1-alexander.levin@microsoft.com> In-Reply-To: <20180917030220.245686-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR21MB0855; 6:aQZOOnGBI/EJS+hSyyW1dKgQqjpt8FbNPudK7/BPyGdCWCJOUROZdH7/qoQjn2qIOeoanLeCaVRRbs2vOyZ0fXnoh5rgwM9+RQ1DrLYo/9LMo+iZb4AP2ioZ/Bzs4RPljBGd7sLrLLpZeSWdctYdcNddo2WkXWk3Tnt9ilT5p73bxS0HS9uwJ1OzJsErlNPTHvNydhsOIIeDucnwSv/1BZk0PeMjSQ44sgIfYvMLlabO6WdYCG7/yc+UqM7kaAI54UQpsJwHcIDJbHAxWzU9cG8qpDybTuHBDxgphoV3UazgkRhq38MEIiIQ2mZJ+5a7efJASeRLP76M43rnX78yGi6wmzaU6+Xrwn0VjinH+E2X/fSz7J9XQWGcBXEej+aVOpV5FWYPCxNJAiNtp/bTVukzNw82knWo08NeZYwRMDJ4AhEzq9Qh0htqpO9+FSPbNndXH9TYlGC1motmv6b34A==; 5:kKSoBWMhW++yJJ/19dHAF0Unj7jlrCF4itYRixPdG79K/8zsuSy2Y9d0QcJTvUXSXyQj3Snlvla3e6BoUgjVXs+uTT5h8UOdaePrw44S65HzNBYGVUzWBwIjG5Xz+QxHEZ3lzL3pHcdypqy1rZiAUCk6e95d7qSTeBM4YHLaSXA=; 7:Ttew2WEXbunKHCSU9WGaeZ61WMZoztWotQ9dfkTyYOMChl1vZpbloPUzcNgKEXnR3LcYHdSu31KGVYtNTZrS2WRxjGkH5ZPBcmIHA1O2gukURTwWImDOdWP+W8jhjRMIV5dKuJS8WYDN8TZdSOQnbBpA6Gxf2PQYKq4ob7RcxdOSd7I+bR12GdS6xy4II+caAOgOLy0/BuTZc/gHplfQOvkEO5me4tFTSKIUbljq4DmOCSW9LK4St0qC0rlH52wn x-ms-office365-filtering-correlation-id: aa9b6f83-2662-406f-5b67-08d61c4a27a4 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:CY4PR21MB0855; x-ms-traffictypediagnostic: CY4PR21MB0855: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(269456686620040)(50582790962513)(28532068793085)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(3231355)(944501410)(52105095)(2018427008)(10201501046)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(201708071742011)(7699050)(76991041); SRVR:CY4PR21MB0855; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0855; x-forefront-prvs: 0798146F16 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(39860400002)(376002)(396003)(136003)(366004)(199004)(189003)(6436002)(99286004)(7736002)(110136005)(54906003)(97736004)(5660300001)(66066001)(446003)(72206003)(76176011)(86362001)(86612001)(81166006)(81156014)(2906002)(478600001)(305945005)(68736007)(105586002)(2616005)(106356001)(476003)(11346002)(22452003)(6486002)(10090500001)(10290500003)(8676002)(36756003)(6346003)(6116002)(6506007)(3846002)(102836004)(107886003)(6512007)(1076002)(25786009)(217873002)(4326008)(14454004)(26005)(256004)(14444005)(486006)(186003)(316002)(2900100001)(8936002)(53936002)(5250100002)(2501003); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0855; H:CY4PR21MB0776.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: SJWJdzwxMm+K7+BleSYiIYvSmlzz4xtjK0984xuVX2yQsD+/ofBw/XWpwN5V6gfMyFi+Zd9KVUW80U4Kh/b/uJxBo2v7aNUha3qb7DJgZO/qUTrT85oRsXevbGJDtLGqUoAoY8Ua9/ouR/gOwFSZUCeQGbYkII5hX0Jpmaz6Y+ygXbZMF4yb0gkjWKBByhlE/TWn3J4uJM4CTjJ4kQo3/CXiNDGu9CroKCKIvPrywHFuLqgisV/4INcr8Xl65hU6BdNszCiFxKiFust9XDUJ9WW3o/230qsfKbQ5TZaSijlq3LfXbUN4Z4nKi7v5YVzn4SC/u4bSH9b+Dmn+oTJ+7AkW+KhkN/vKpGqtDGU9Zmk= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: aa9b6f83-2662-406f-5b67-08d61c4a27a4 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Sep 2018 03:02:32.3220 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0855 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zhen Lei [ Upstream commit 3c120143f584360a13614787e23ae2cdcb5e5ccd ] Although the mapping has already been removed in the page table, it maybe still exist in TLB. Suppose the freed IOVAs is reused by others before the flush operation completed, the new user can not correctly access to its meomory. Signed-off-by: Zhen Lei Fixes: b1516a14657a ('iommu/amd: Implement flush queue') Signed-off-by: Joerg Roedel Signed-off-by: Sasha Levin --- drivers/iommu/amd_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 10190e361a13..01746e7b90de 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -2400,9 +2400,9 @@ static void __unmap_single(struct dma_ops_domain *dma_dom, } if (amd_iommu_unmap_flush) { - dma_ops_free_iova(dma_dom, dma_addr, pages); domain_flush_tlb(&dma_dom->domain); domain_flush_complete(&dma_dom->domain); + dma_ops_free_iova(dma_dom, dma_addr, pages); } else { pages = __roundup_pow_of_two(pages); queue_iova(&dma_dom->iovad, dma_addr >> PAGE_SHIFT, pages, 0); From patchwork Mon Sep 17 03:02:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 146834 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3284214ljw; Sun, 16 Sep 2018 20:25:43 -0700 (PDT) X-Google-Smtp-Source: ANB0VdalAzEpHE8RTDzvKzpO15RqIiWxkhVfQBjsyVOuo2x8dGa84ZvtrPGP0A1c+RdTpMHio+Lj X-Received: by 2002:a63:6485:: with SMTP id y127-v6mr21307513pgb.393.1537154743098; Sun, 16 Sep 2018 20:25:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537154743; cv=none; d=google.com; s=arc-20160816; b=dRtrB0vLuxvOEq1SXBHq/9Lr1FlhDMYUHzxsEdyUd/sukHEb9Mbp+aFQdZRzckofAU 3mIVH/TM4pEjUTPqddmeZjDH6VTbEgyFowNTaX/b19cjfXXN8DFJOKT3/P7Mq0+x50QF kM6pVVvXrFFlkym2rUPLXiL7r5QZfpqTiEAZykTs5+hFbgy9gg+znep1dGCfCUX8+KZK YqIKvPoAIwAoqJoIss6sbNnEg2lVzit/Tr7bttLu9D2r6SuH9yVbmham9Dy9xjILDFIl 32jZ24wdEoO5lWIgIOD3RVZfiRqfc6z2gOlfUikBoSfgSlBrYScDRHEXKkgxyskXpJJM 70eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=hHhQw2Hsj08jJSNACwYkFjw3GXTC6SojFZf5DEdNyO0=; b=0Ozw2P/IABcvOxEqd42B9SSEGwcix0jwS7nnhNCVFyQhkNWhuUUrQ9UOHPEae1NYk0 pFPBr+k4NfVVq9/ymRz8Pub5pMN3nD+I/42lDSib/NkC/UPk0qFSHiROmUcaR1fB+aR5 ZG5My9oAAg7rTYJAcoNGxHOnFs5er1vYOT/yVHRRJmuw+InVM8S05xxSpkn1yWSSnIRp hC6SJbEFvRDgRKDaxppruxcsq1bYQNgnQCR2RSqCZVMKOsGbxBmFeUU9RqR3OfovTSbY gcpFu4lz0s41jtaHR7UMRq0EfKm2kMuYJRAjjT2sJDhQs69egDuFCRZdm7ugK5dOw6Fv vExw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=csE9psKt; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p22-v6si15571064pli.289.2018.09.16.20.25.42; Sun, 16 Sep 2018 20:25:43 -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=@microsoft.com header.s=selector1 header.b=csE9psKt; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729922AbeIQI2z (ORCPT + 32 others); Mon, 17 Sep 2018 04:28:55 -0400 Received: from mail-dm3nam03on0101.outbound.protection.outlook.com ([104.47.41.101]:50080 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729820AbeIQI2y (ORCPT ); Mon, 17 Sep 2018 04:28:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hHhQw2Hsj08jJSNACwYkFjw3GXTC6SojFZf5DEdNyO0=; b=csE9psKtkRWEuelSrbvIiU1BwIbwFcgq6ETm4Bq9MQAcwkviiFkV0L9PIeCzu4F5cxnzpPjHg0UwagZkPMhFXL5hzsOl/yNoNBnlm+urV29e8Xh7XAzmBw0M57i9N6Nq0ELvYxSDo3qbyLGJjbjKHElHn9oNQHurKG4N56gCOn4= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0855.namprd21.prod.outlook.com (10.173.192.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.4; Mon, 17 Sep 2018 03:03:35 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::54e2:88e0:b622:b36]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::54e2:88e0:b622:b36%5]) with mapi id 15.20.1185.003; Mon, 17 Sep 2018 03:03:35 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Niklas Cassel , Joerg Roedel , Sasha Levin Subject: [PATCH AUTOSEL 4.14 16/87] iommu/msm: Don't call iommu_device_{,un}link from atomic context Thread-Topic: [PATCH AUTOSEL 4.14 16/87] iommu/msm: Don't call iommu_device_{,un}link from atomic context Thread-Index: AQHUTjLhhE8umt2jFEKqG8kktIrXNg== Date: Mon, 17 Sep 2018 03:02:34 +0000 Message-ID: <20180917030220.245686-16-alexander.levin@microsoft.com> References: <20180917030220.245686-1-alexander.levin@microsoft.com> In-Reply-To: <20180917030220.245686-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR21MB0855; 6:oy69AxWpn1gobdqvK6CxLrCE3KTu+4PlKU1SCUt1CQEbxg2tsT8M5k+WiIEo1KCRgNKkcXczXZfuxStf3IXc/KuQ8qX+TbKtVtNVsWwrcE/hDJtp6LJlUREN1gQonKXBddMZtbdR9ZIdbStPMh3e0q3vBrZwrYw4iU61qJhDNaXdZz1YvP0pcnWCKUBIbb9I+AsWgAA99TLF5rbn9x4MB0k+MDPEP68ElyiExzqyjdCK9UYH+HgcHSC0YvpTm5YLIkiwSf+cFUWUVc8R9OmaUeN5NK74gnJ4TnXPc4g+0jlbJDhD7RAuPLnS5ZS+oXo+bQS8oPkcgW+eojrL3hM0nrtIv4PpkdAaoptdO0GC1769sxbahAHU4loUYFi4gk5A12Okd2hdxEl7RU5ATIiUivznkI/2YDIRWwV+1LD8+Knj5filPeysfJuAe0DXQX7i6H0xpJN/wSlSqOW+JGcebA==; 5:9EtfTdJZqI2upobsKM9W39xdIwjTXf8ZtA45p0JvBnDZfgrcZ6f1q0EpSusqbOzX9s27b+XhxTgFkVo1hTyxXHhS5EoPgzuRV2IJQP9sXJ+As1BOEAjGwHsGRS1nWxSg+KiAXsIer2DWu5SDYdnftYUi1AoZrDyfHsU/1H7aJPM=; 7:PXUQ9KVPu3KxZNHjjYCvRirCSx03wXVjhKKyx/GFG1YZ+VIPTkxQYwuZD6qZPpIfgz5D6ursyqRrjwosKXkmyeLGpTKegTGVLSKia9y7BdiTwyOazQTLsfOR3p6hZypv343/x5ulgzFu0INWZ1Hfmi21WCqaAf8FaUspcTktz6pMIELLggXkaSrRSSRUjMGDGq0BaXaOAgiCqRpRzxLZS2hCXPgrK+FBVob0v7ndO749xk1SPYNXrQHQy4eKEOci x-ms-office365-filtering-correlation-id: f29fad0a-3e84-4588-77c8-08d61c4a2884 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:CY4PR21MB0855; x-ms-traffictypediagnostic: CY4PR21MB0855: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(3231355)(944501410)(52105095)(2018427008)(10201501046)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(201708071742011)(7699050)(76991041); SRVR:CY4PR21MB0855; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0855; x-forefront-prvs: 0798146F16 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(39860400002)(376002)(396003)(136003)(366004)(199004)(189003)(51234002)(6436002)(99286004)(7736002)(110136005)(54906003)(97736004)(5660300001)(66066001)(446003)(72206003)(76176011)(86362001)(86612001)(81166006)(81156014)(2906002)(478600001)(305945005)(68736007)(105586002)(2616005)(106356001)(476003)(11346002)(22452003)(6486002)(10090500001)(10290500003)(8676002)(36756003)(6346003)(6116002)(6506007)(3846002)(102836004)(107886003)(6512007)(1076002)(25786009)(217873002)(4326008)(14454004)(26005)(256004)(14444005)(5024004)(486006)(186003)(316002)(2900100001)(8936002)(53936002)(5250100002)(2501003); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0855; H:CY4PR21MB0776.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: OnyiknYvvl1WRP3oFVRpftKAA8JffGxkFH5QYWWi1+71dchwvATaQOGzcT8uTkn2de937fSMCqURCu6SXdO1GwlSpQLSqpPICTZcKd2x8wyqDwZzFQxOsH5xOqq/B4vIhHGk2Djrwla40BaH/h+mTYrBlxSobp/NC5ShHxTdNmg3QdwV6peMOF4+HlQ42s3NdgueZ64hBhefYFzGw97ABgORJXV3vrWobq2l169qOzG1NTt7A2zGKwLwnyGMQGLSoYhqDxfHi8NfPw8GnCm/7MToOxLCdA2tbzHC8mbPn0eWunSCPtgQCqMOO4zRrVa+UZ4G11zoF4wd/Lt+6tFBmdRsfAuzaWmgTw94Fw5+qcA= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: f29fad0a-3e84-4588-77c8-08d61c4a2884 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Sep 2018 03:02:34.5563 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0855 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Niklas Cassel [ Upstream commit 379521462e4add27f3514da8e4ab1fd7a54fe1c7 ] Fixes the following splat during boot: BUG: sleeping function called from invalid context at kernel/locking/mutex.c:747 in_atomic(): 1, irqs_disabled(): 128, pid: 77, name: kworker/2:1 4 locks held by kworker/2:1/77: #0: (ptrval) ((wq_completion)"events"){+.+.}, at: process_one_work+0x1fc/0x8fc #1: (ptrval) (deferred_probe_work){+.+.}, at: process_one_work+0x1fc/0x8fc #2: (ptrval) (&dev->mutex){....}, at: __device_attach+0x40/0x178 #3: (ptrval) (msm_iommu_lock){....}, at: msm_iommu_add_device+0x28/0xcc irq event stamp: 348 hardirqs last enabled at (347): [] kfree+0xe0/0x3c0 hardirqs last disabled at (348): [] _raw_spin_lock_irqsave+0x2c/0x68 softirqs last enabled at (0): [] copy_process.part.5+0x280/0x1a68 softirqs last disabled at (0): [<00000000>] (null) Preemption disabled at: [<00000000>] (null) CPU: 2 PID: 77 Comm: kworker/2:1 Not tainted 4.17.0-rc5-wt-ath-01075-gaca0516bb4cf #239 Hardware name: Generic DT based system Workqueue: events deferred_probe_work_func [] (unwind_backtrace) from [] (show_stack+0x20/0x24) [] (show_stack) from [] (dump_stack+0xa0/0xcc) [] (dump_stack) from [] (___might_sleep+0x1f8/0x2d4) ath10k_sdio mmc2:0001:1: Direct firmware load for ath10k/QCA9377/hw1.0/board-2.bin failed with error -2 [] (___might_sleep) from [] (__might_sleep+0x70/0xa8) [] (__might_sleep) from [] (__mutex_lock+0x50/0xb28) [] (__mutex_lock) from [] (mutex_lock_nested+0x2c/0x34) ath10k_sdio mmc2:0001:1: board_file api 1 bmi_id N/A crc32 544289f7 [] (mutex_lock_nested) from [] (kernfs_find_and_get_ns+0x30/0x5c) [] (kernfs_find_and_get_ns) from [] (sysfs_add_link_to_group+0x28/0x58) [] (sysfs_add_link_to_group) from [] (iommu_device_link+0x50/0xb4) [] (iommu_device_link) from [] (msm_iommu_add_device+0xa0/0xcc) [] (msm_iommu_add_device) from [] (add_iommu_group+0x3c/0x64) [] (add_iommu_group) from [] (bus_for_each_dev+0x84/0xc4) [] (bus_for_each_dev) from [] (bus_set_iommu+0xd0/0x10c) [] (bus_set_iommu) from [] (msm_iommu_probe+0x5b8/0x66c) [] (msm_iommu_probe) from [] (platform_drv_probe+0x60/0xbc) [] (platform_drv_probe) from [] (driver_probe_device+0x30c/0x4cc) [] (driver_probe_device) from [] (__device_attach_driver+0xac/0x14c) [] (__device_attach_driver) from [] (bus_for_each_drv+0x68/0xc8) [] (bus_for_each_drv) from [] (__device_attach+0xe4/0x178) [] (__device_attach) from [] (device_initial_probe+0x1c/0x20) [] (device_initial_probe) from [] (bus_probe_device+0x98/0xa0) [] (bus_probe_device) from [] (deferred_probe_work_func+0x74/0x198) [] (deferred_probe_work_func) from [] (process_one_work+0x2c4/0x8fc) [] (process_one_work) from [] (worker_thread+0x2c4/0x5cc) [] (worker_thread) from [] (kthread+0x180/0x188) [] (kthread) from [] (ret_from_fork+0x14/0x20) Fixes: 42df43b36163 ("iommu/msm: Make use of iommu_device_register interface") Signed-off-by: Niklas Cassel Reviewed-by: Vivek Gautam Signed-off-by: Joerg Roedel Signed-off-by: Sasha Levin --- drivers/iommu/msm_iommu.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) -- 2.17.1 diff --git a/drivers/iommu/msm_iommu.c b/drivers/iommu/msm_iommu.c index 04f4d51ffacb..92c8c83ce38c 100644 --- a/drivers/iommu/msm_iommu.c +++ b/drivers/iommu/msm_iommu.c @@ -395,20 +395,15 @@ static int msm_iommu_add_device(struct device *dev) struct msm_iommu_dev *iommu; struct iommu_group *group; unsigned long flags; - int ret = 0; spin_lock_irqsave(&msm_iommu_lock, flags); - iommu = find_iommu_for_dev(dev); + spin_unlock_irqrestore(&msm_iommu_lock, flags); + if (iommu) iommu_device_link(&iommu->iommu, dev); else - ret = -ENODEV; - - spin_unlock_irqrestore(&msm_iommu_lock, flags); - - if (ret) - return ret; + return -ENODEV; group = iommu_group_get_for_dev(dev); if (IS_ERR(group)) @@ -425,13 +420,12 @@ static void msm_iommu_remove_device(struct device *dev) unsigned long flags; spin_lock_irqsave(&msm_iommu_lock, flags); - iommu = find_iommu_for_dev(dev); + spin_unlock_irqrestore(&msm_iommu_lock, flags); + if (iommu) iommu_device_unlink(&iommu->iommu, dev); - spin_unlock_irqrestore(&msm_iommu_lock, flags); - iommu_group_remove_device(dev); } From patchwork Mon Sep 17 03:02:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 146827 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3270250ljw; Sun, 16 Sep 2018 20:04:20 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYoVkacZRLKxbCJ+RF8fa+ss16fOHglH2bP+aT50y0cgGpXT73G+8q2/jOf4y1qntKobB0e X-Received: by 2002:a17:902:6806:: with SMTP id h6-v6mr23151288plk.304.1537153460814; Sun, 16 Sep 2018 20:04:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537153460; cv=none; d=google.com; s=arc-20160816; b=hQdv5DgDafIqSRbkq3ltuftyJ19ySPfpJhgPXoReqgVISLLD3uiM6ykgrOLPzAts1G hmSXXCNvXDa9kucBPtKK1aZZcJlreMzYAVviN3juD1cPDN0xAm9kCRe29a4DLNp6ZTO2 g5zn6ofSaANZKcJb2ksQOVXl1c07p4L+XqweVoUQrVB11KShXFde6bc99N13/IXiIBi8 LXeKXisPciL7MLaXKZI9WDX7EdfR96RTLZ4d8NL3XZWwOUsL68I0GsU8LoMlbkBsCbt5 UCciM7tbenJxDk18hHAJFYLN5mcLq0lk4U7vnCnAS+/2mPRI0KBEnh6Hsl458wYpDZkv ZNhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=eCTeZoIzuO/1UB42JOzPd8KBk8g5ZRNGFyj/7EpVYOM=; b=g/1/Rvrpsk1hjATJLXsx/OC4RmPAAn76Myc2WBkcP527dWG2UkbRHjovkrV/AP8Ggy Vka5MC+YzWQg1F67+0W6/lNLuKYaxq66rgemx2RD/8WOkY6a9CG008WndaA8j1fM2pa6 J18U1AK5bpDBDlNAxN0HaUX0GsgXYcbxc6nL+79YPlgt4y2qx/uv7fGtXUKj+KOIs0Nk jYFuJLtqkug5x5IRg31gMxA4/ibE9zlBDiE5cyh0pQoJDeVUp4DCQRj9r8tHJ0Uw0bdA /6YmhDTtlb+k3MNZN71GSEIswen0MlkjCZ1jKkPEZgGkU4V3YBEP1NdHB6ayTnzSkKor lRug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=flXbwF94; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p2-v6si14997865pfd.76.2018.09.16.20.04.20; Sun, 16 Sep 2018 20:04:20 -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=@microsoft.com header.s=selector1 header.b=flXbwF94; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730158AbeIQI3c (ORCPT + 32 others); Mon, 17 Sep 2018 04:29:32 -0400 Received: from mail-eopbgr710114.outbound.protection.outlook.com ([40.107.71.114]:1680 "EHLO NAM05-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728969AbeIQI3b (ORCPT ); Mon, 17 Sep 2018 04:29:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eCTeZoIzuO/1UB42JOzPd8KBk8g5ZRNGFyj/7EpVYOM=; b=flXbwF94nN+WvXfTOLTiaYdodyZ3oJHmZh92QQTMQ+weXU0o/s6N++4Qc1MODb77vAWmS9NEh5OlNZzxSPeqHa/5VqC6305Enqsh9RoGVQSNfqYEE0JETZCSU2XsmkRRUkad3MMnwTIf2hJ4thQ8d/Sx/G56XLHgU9o8YKw10mo= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.5; Mon, 17 Sep 2018 03:04:12 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::54e2:88e0:b622:b36]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::54e2:88e0:b622:b36%5]) with mapi id 15.20.1185.003; Mon, 17 Sep 2018 03:04:12 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Viresh Kumar , Shawn Guo , Sasha Levin Subject: [PATCH AUTOSEL 4.14 33/87] ARM: dts: ls1021a: Add missing cooling device properties for CPUs Thread-Topic: [PATCH AUTOSEL 4.14 33/87] ARM: dts: ls1021a: Add missing cooling device properties for CPUs Thread-Index: AQHUTjLoQ8S9MQWzUUW1Fgv2mjE+pw== Date: Mon, 17 Sep 2018 03:02:44 +0000 Message-ID: <20180917030220.245686-33-alexander.levin@microsoft.com> References: <20180917030220.245686-1-alexander.levin@microsoft.com> In-Reply-To: <20180917030220.245686-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR21MB0776; 6:tr4b7MFO5adM2MNXlJXoCKXU/0GlRfRHKNGef5zoZ+slmqCHNCPdNfCUdScPeKixMu8d3fbJjpRnDSnK9f0PCdlCHcu8mG3FZKjTf4t5fmhS/LSqDS7aZDavxAZ2tT+laxD3farYtweEafMigQZqr2E6D41oF85gdQeHw3d/fUgAUfBxRNqlPS27Beae1Ecd7pr4Two0HFReBGWhdeWbTI4pTLGoLGGVFvRH1S3eBUp/xRm2xtTxSSlcdfPsB9c37kaAwzLsuwsWPGFQo5L7gmMon6T46zs/Ibjg1EtaDVQoUWLCWDqeZ9yv+4GOOrBFZBCKF60uU/pefML161C58nqRjEooW9poohsjhigjjN7RJgMj3pwb5MlhXSVAhtPycsvJq69HyM0c80Cu799XQrrhjIqP1zf81V2aV+3L+NSUVR5VarCyF8k2SoluBvsK5CL48dg0JPteR2lvQEYOLg==; 5:ojpSL3lFO05s4+ccVB7HQXVRTYfEAtogdA3FtcZ1GHqQxAa7yMGqZH90WKd7keA2Em4guVqfh1scMV31T+qGo7eSRFcrlN8E2wXdbpbBeVi0p8M3hqyJrKVSYCXKKpZndQS79EvGr8OcrzRUvnAWUAsv/xPbPtmToTl3FBS47+I=; 7:OL0tSW1ZCgT8RWRfXMvCT4w+Q4+UUVer/mokrO3Z8ZtxiC5IXr7Wkho7xlYvuatVgvLqUOlZoujoLAOvaBJSD9EJ0OlxalP3q1tht73fOXvYKeIJAMAT8p7UUls6/Su0Cmqp0qIAjxl7QBII4pyc76QbKEAmeLvJZmYsL47SRCl2demEIEFEVF6+R8ECBYcNxZkr4wd+BzGzXjg13jjL6Rzi5gBW0dfw0Ylc3jHvZuJ+lg/PfyUsT6tNsjkfg9S5 x-ms-office365-filtering-correlation-id: 00142819-656c-4f55-3b42-08d61c4a3e86 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:CY4PR21MB0776; x-ms-traffictypediagnostic: CY4PR21MB0776: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(209352067349851)(28532068793085)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231355)(944501410)(52105095)(2018427008)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(201708071742011)(7699050)(76991041); SRVR:CY4PR21MB0776; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0776; x-forefront-prvs: 0798146F16 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(366004)(136003)(346002)(376002)(396003)(199004)(189003)(5250100002)(53936002)(72206003)(14454004)(102836004)(478600001)(4326008)(6346003)(2501003)(25786009)(6666003)(10290500003)(110136005)(54906003)(6436002)(66066001)(8936002)(316002)(107886003)(76176011)(2906002)(217873002)(6116002)(3846002)(22452003)(14444005)(6506007)(486006)(5660300001)(7736002)(2616005)(11346002)(446003)(97736004)(476003)(6486002)(105586002)(81166006)(99286004)(186003)(81156014)(2900100001)(8676002)(86612001)(68736007)(86362001)(26005)(36756003)(305945005)(256004)(106356001)(6512007)(1076002)(10090500001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0776; H:CY4PR21MB0776.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: +Vm3DOQFr+FvgBgKv7B0yXEnes+f/1fZUQnPQhZmeFu3kEoz2CCJoxu5TdyCvWnrohLRwBPRR8DhvK7ykvKE50ttX88y4Yfp4DZVBtcegLqJJFW6ojoOLHu5nIhovucT1zPIcufXO/NEsrJ9P3XeJKjyJnJ4jCQUXVBi23OU/7AiS3rJ2jdpUty5uso/8bQ272HzejsN6iIG4Sh3gbWTvpTya2yarWf70wTd+y0fChIlthSlHPblfGAvVyDNem4DnJMoTWz5vL2WhWIGXEfhNXDp8baIjYqSzlykjuwZS/ZlFq8ngS/9mv6knjTEsS4BtcqaIzaQ31mbZBf0V7I5AT00gb54WGPQ9MMhvdbnLGw= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 00142819-656c-4f55-3b42-08d61c4a3e86 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Sep 2018 03:02:44.8687 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0776 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Viresh Kumar [ Upstream commit 47768f372eae030db6fab5225f9504a820d2c07f ] The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device. Add such missing properties. Signed-off-by: Viresh Kumar Signed-off-by: Shawn Guo Signed-off-by: Sasha Levin --- arch/arm/boot/dts/ls1021a.dtsi | 1 + 1 file changed, 1 insertion(+) -- 2.17.1 diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi index 379b4a03cfe2..2d20f60947b9 100644 --- a/arch/arm/boot/dts/ls1021a.dtsi +++ b/arch/arm/boot/dts/ls1021a.dtsi @@ -84,6 +84,7 @@ device_type = "cpu"; reg = <0xf01>; clocks = <&clockgen 1 0>; + #cooling-cells = <2>; }; }; From patchwork Mon Sep 17 03:03:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 146833 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3281065ljw; Sun, 16 Sep 2018 20:20:43 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbkS1DTIlMctW0Mz/8JaW0cEuIx9VR4cFPMWxkcShwuNkDJR0yDaZCHqXQF1SLbelartiCk X-Received: by 2002:a63:a919:: with SMTP id u25-v6mr19253424pge.211.1537154442748; Sun, 16 Sep 2018 20:20:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537154442; cv=none; d=google.com; s=arc-20160816; b=z66dyTFi51eKqqX6hUiWt4qoXAiW0xI/XfKb8PUlLjcRcGsGzvsb5WPLCaf5VCfkTA CWWv1BkA6mT+WPlInTA6fCJfXxouKA+49aOdfJ9xPG1U0vfRH7df+Nc9l7eIR2zCbgqW KHjLGuzRBiE51CqZmSrbjaRpoYL24I/yX359sWnxOfTZFJpB+Ljvl3R2gcusEE+aADUK nV8a0N3tyHu5BTVxUTpbjqzM1UkE1rWzaP7r2Dd9+dDgZ6hiBXAdz05+TqhxFm+z2eFo Usa49wk6hqRSEDYGzVEnmyi2X6ET4tZPQdwavUpZ7cvb3o7BKj9UHl7htB2mzvAfur8Q 6E9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=5rS9JH16We9CZS4dw6iOpgzZJ9bgZRotVycKZOIqCEw=; b=Apo4QfSKHIHgx1zGhZi05RoSbH+XKftJ9oLSQQ15TRV6mI8/WNNDIUqnSxKPhapCLa Bq6F3qt/MonOG6tu4Qt5RspncuX6DdJ294NNpZITEjE9dFN2pV9WIHhmjIS/MU/WUgiL oTFuGb15qAdOsXmS6V5G7SEAVQOwHBTLaynojIrdAa/Sjb8hRndQ08GRAnQqy9msC9/H YmcqqGMRrcvVZLtF5dupN7rhJKwdgbYdhjqKNsWTGgat5QWjvQmtqBFUWSL6C/QDTl3V FRRIV/ZTt5ROabQVpQw3iG7i7QJ3/BczdEoygqBYX8pw8C9YYDBEiQNHph7Afu6og7iC YUvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=RaxzGn2V; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k18-v6si14291321pgl.364.2018.09.16.20.20.42; Sun, 16 Sep 2018 20:20:42 -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=@microsoft.com header.s=selector1 header.b=RaxzGn2V; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730438AbeIQIaU (ORCPT + 32 others); Mon, 17 Sep 2018 04:30:20 -0400 Received: from mail-dm3nam03on0099.outbound.protection.outlook.com ([104.47.41.99]:12736 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730392AbeIQIaR (ORCPT ); Mon, 17 Sep 2018 04:30:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5rS9JH16We9CZS4dw6iOpgzZJ9bgZRotVycKZOIqCEw=; b=RaxzGn2VZ+tlsfV3QPeX0c1ttV/o1UD+uO/EsxRPpwjkUZ8G1sRsGhNlE9MyoUKqF23hyRmFWPulnu3CdGXjq5UwijL119f1tzc21WFWLLNwFpTBxb3ALsm95xxo6rhxoVFWaaI5uP4vsFG3c8sDABWHInDJfhHlBFlc8ARqujs= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0774.namprd21.prod.outlook.com (10.173.192.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.5; Mon, 17 Sep 2018 03:04:55 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::54e2:88e0:b622:b36]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::54e2:88e0:b622:b36%5]) with mapi id 15.20.1185.003; Mon, 17 Sep 2018 03:04:55 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Niklas Cassel , Kalle Valo , Sasha Levin Subject: [PATCH AUTOSEL 4.14 64/87] ath10k: transmit queued frames after processing rx packets Thread-Topic: [PATCH AUTOSEL 4.14 64/87] ath10k: transmit queued frames after processing rx packets Thread-Index: AQHUTjL0QD3pwFtI/ki594ZEq13sDA== Date: Mon, 17 Sep 2018 03:03:05 +0000 Message-ID: <20180917030220.245686-64-alexander.levin@microsoft.com> References: <20180917030220.245686-1-alexander.levin@microsoft.com> In-Reply-To: <20180917030220.245686-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR21MB0774; 6:LAUuc6eQDYTmtZBexnWgjwJb0R/6yZxR2nBAlFAEKCEX4jHZd+lWsGNhV1p57QaqquB8YVd9LCJe28d0X/IwuTXpwkQ3eAzl+VUkjhMekN5aElkENrAAnTUC8K/N1YpfZdWR2n73RhCWKKAWWO/G6qeLTVMOSCYHiIoE/0j3oc1MnfgsfVxjvS+Pt9QM0Rz6H1JhGeqcYMXuRzgUx7HNhLWk4tB5NJtzSQ2vhO6Wpjog17DH/1mtAR2sOfY1Q6e3eg8B6XcwvakVjVWpvjWD5Q5IhwKwokPz+7/p4bQtYW83VOaprLBK6CfWx4yr/ncFP+HSJ0f/TvtnHTFE84x2/lUtyeVeDMDkvMCeb/34hBlwVHd3e0eQlTBioSSQ/KPBmCSyDwEIByqByk661TskMA0gcQNZW4o/h0PNAkyuun2AdqxP1kVAMyicEtxXcVPinbT9+wAf3qgJ4FpKRH6Jug==; 5:xWzypzgtaHixymuhqNDAhRo9YfBmcmt0SZxUHayB3S/NGjELEtM7Y6z2u/5zZIzlRX+pjkistGCJQns2sx4Uef93hXTlJbjmVfZAA3br/m1MHrC4R8ocFPd6J1/GY1HIsEJDmgkDR5t2FIsnMLdlnjCu/9L5tbIbDwcnOz/5olI=; 7:Bl2FiH/1ey+U2B8p51mdyZ2khojszG5+JF9tblwV/FDhexGoC1D6XZAdp1d/0vc49pjHMsdQfLFM4wCLJgx5k1+5LbpuE6SzPM711nlBhC9p2VVU76VX3TuYck+iOj7kZftDelsKwCvzdZnMXpx1tHXazHu3mAybrRemGL9e69a2pjVM85Wl6MwVu6WQMJzPj+Xq/HrYNfU9k1VqMIRbwWeS/IJSd8vHy9ZopS1LzXI6b0g25Z+qeK+QMrfsrp55 x-ms-office365-filtering-correlation-id: 30b47b0a-ce5e-4197-3ab9-08d61c4a584b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:CY4PR21MB0774; x-ms-traffictypediagnostic: CY4PR21MB0774: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(116097685857584)(28532068793085)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231355)(944501410)(52105095)(2018427008)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(201708071742011)(7699050)(76991041); SRVR:CY4PR21MB0774; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0774; x-forefront-prvs: 0798146F16 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(136003)(376002)(396003)(39860400002)(346002)(199004)(189003)(54906003)(105586002)(316002)(4326008)(6116002)(1076002)(14454004)(305945005)(7736002)(22452003)(81156014)(66066001)(81166006)(99286004)(8936002)(8676002)(3846002)(478600001)(72206003)(53936002)(10290500003)(68736007)(106356001)(6512007)(25786009)(76176011)(110136005)(11346002)(476003)(2616005)(446003)(6436002)(486006)(6506007)(86612001)(10090500001)(102836004)(86362001)(6346003)(186003)(26005)(36756003)(97736004)(2906002)(256004)(14444005)(2900100001)(6486002)(217873002)(107886003)(2501003)(6666003)(5250100002)(5660300001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0774; H:CY4PR21MB0776.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: Zu9m/bBY3C1zBCD1h+ZBWDWtM+aHzRn8n/EE01hh+nOSfYFdZ98FkEW9Hczjo9oleNydMUW3nQYz//mKP/1B0RyV7gznk6VFTyMfkj/n0gTS0n92rLIOlYd3rRKZydZMaScYQtwZ1Jvv0p9/et/e327tFlJFaO2tCDx5bQosbhfQC5JetKINynBclkUuuBpnbZrV21p9zljkCNcKaqkJMAFiAKnqdBgT7JMTK1n/SXRZhZt2rAyylv76x9yXfWTKM/7P71I4m/DtdvdLuNrG/qYUehDj40+YrWsYFt+c+nuLyo0D0q/+LWZYggL77ppeQk15QfvbrHOpUCBzm61ai5t4wRPbjfie39bjGKATSKk= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 30b47b0a-ce5e-4197-3ab9-08d61c4a584b X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Sep 2018 03:03:05.4778 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0774 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Niklas Cassel [ Upstream commit 3f04950f32d5d592ab4fcaecac2178558a6f7437 ] When running iperf on ath10k SDIO, TX can stop working: iperf -c 192.168.1.1 -i 1 -t 20 -w 10K [ 3] 0.0- 1.0 sec 2.00 MBytes 16.8 Mbits/sec [ 3] 1.0- 2.0 sec 3.12 MBytes 26.2 Mbits/sec [ 3] 2.0- 3.0 sec 3.25 MBytes 27.3 Mbits/sec [ 3] 3.0- 4.0 sec 655 KBytes 5.36 Mbits/sec [ 3] 4.0- 5.0 sec 0.00 Bytes 0.00 bits/sec [ 3] 5.0- 6.0 sec 0.00 Bytes 0.00 bits/sec [ 3] 6.0- 7.0 sec 0.00 Bytes 0.00 bits/sec [ 3] 7.0- 8.0 sec 0.00 Bytes 0.00 bits/sec [ 3] 8.0- 9.0 sec 0.00 Bytes 0.00 bits/sec [ 3] 9.0-10.0 sec 0.00 Bytes 0.00 bits/sec [ 3] 0.0-10.3 sec 9.01 MBytes 7.32 Mbits/sec There are frames in the ieee80211_txq and there are frames that have been removed from from this queue, but haven't yet been sent on the wire (num_pending_tx). When num_pending_tx reaches max_num_pending_tx, we will stop the queues by calling ieee80211_stop_queues(). As frames that have previously been sent for transmission (num_pending_tx) are completed, we will decrease num_pending_tx and wake the queues by calling ieee80211_wake_queue(). ieee80211_wake_queue() does not call wake_tx_queue, so we might still have frames in the queue at this point. While the queues were stopped, the socket buffer might have filled up, and in order for user space to write more, we need to free the frames in the queue, since they are accounted to the socket. In order to free them, we first need to transmit them. This problem cannot be reproduced on low-latency devices, e.g. pci, since they call ath10k_mac_tx_push_pending() from ath10k_htt_txrx_compl_task(). ath10k_htt_txrx_compl_task() is not called on high-latency devices. Fix the problem by calling ath10k_mac_tx_push_pending(), after processing rx packets, just like for low-latency devices, also in the SDIO case. Since we are calling ath10k_mac_tx_push_pending() directly, we also need to export it. Signed-off-by: Niklas Cassel Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath10k/mac.c | 1 + drivers/net/wireless/ath/ath10k/sdio.c | 3 +++ 2 files changed, 4 insertions(+) -- 2.17.1 diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 52ebed1f55a1..556e44454ed8 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -4008,6 +4008,7 @@ void ath10k_mac_tx_push_pending(struct ath10k *ar) rcu_read_unlock(); spin_unlock_bh(&ar->txqs_lock); } +EXPORT_SYMBOL(ath10k_mac_tx_push_pending); /************/ /* Scanning */ diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c index c5e6f4254e49..da9dbf3ddaa5 100644 --- a/drivers/net/wireless/ath/ath10k/sdio.c +++ b/drivers/net/wireless/ath/ath10k/sdio.c @@ -30,6 +30,7 @@ #include "debug.h" #include "hif.h" #include "htc.h" +#include "mac.h" #include "targaddrs.h" #include "trace.h" #include "sdio.h" @@ -1346,6 +1347,8 @@ static void ath10k_sdio_irq_handler(struct sdio_func *func) break; } while (time_before(jiffies, timeout) && !done); + ath10k_mac_tx_push_pending(ar); + sdio_claim_host(ar_sdio->func); if (ret && ret != -ECANCELED) From patchwork Mon Sep 17 03:03:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 146828 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3270746ljw; Sun, 16 Sep 2018 20:05:05 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda2iqkOiBLXW3bFTg1r5mvsRx01btiTUJNiV/Thn3O0axceMnxdaL00mtUcJ8xFItY2v5yk X-Received: by 2002:a62:2c53:: with SMTP id s80-v6mr23456678pfs.154.1537153504875; Sun, 16 Sep 2018 20:05:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537153504; cv=none; d=google.com; s=arc-20160816; b=pzzh/HtvQFAU76KfwfBd1jdXsoWH1V5QBbDYZFoB0rTBBOe0dn202K/GH1Yx/+KErA blXT6DNA9N8iYB2NNoY96a9lQz0aPo1I173m+DTzrGj4T01RIDG4eAooTiwA57kRp67W 8cUbP/fYYef5j2/4x8UnZkxKQ/4mej/fDNqn77bAdkqVSnjwS3K7gn3EqGkQJ/r0GYns XEdTWu9Xmlbl9986VvGW5o/57cdSrmLycvVds+TIcjxlpBvMFQiz6/gna2YTpxKobjJa IerMqevYlfAMWGeY+4CK21mu711LXLc/zVfJeRphL1TOL/RzsokDNFk9Jzw4UrVyHZz0 4/rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=V2TwQsNOQSN+B0042PY3lDADrP4y6S0zkeN7XK2B+KY=; b=cxFZ823HlZuuO2yd8ESYKufe5RgY91nGQkLgzWFq0SJnqcVQeNsSxO8x24esS7DOxi cJCbJ4cdBFEF7npJ5ElHm8OJqIPnqYbAK2RiQOOm+yhk7+N6b9Jx36EtGX1KCcu6M0gc h8m95KQxlBwnNH5gVtTuZEC0R+P/xhGgii4hi+WDJa0KLvzSgG+BoCSjLxiN9l5uTbhl wedL6LcBxcPHecMhocuClVPZtxIIXxEEulQrPArHWIOjYubS0pZOCWramFAm/d+hmPUn /73MT6dQbfJZqrg06VrxKYo/GtZlGfws+gMoLgQIS7bmCWQPEQi9kDpJH+USa6CNGH7m n+LA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=F3Uby4kB; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h36-v6si15024516pgm.125.2018.09.16.20.05.04; Sun, 16 Sep 2018 20:05:04 -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=@microsoft.com header.s=selector1 header.b=F3Uby4kB; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730421AbeIQIaR (ORCPT + 32 others); Mon, 17 Sep 2018 04:30:17 -0400 Received: from mail-bl2nam02on0103.outbound.protection.outlook.com ([104.47.38.103]:18657 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729508AbeIQIaP (ORCPT ); Mon, 17 Sep 2018 04:30:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=V2TwQsNOQSN+B0042PY3lDADrP4y6S0zkeN7XK2B+KY=; b=F3Uby4kBHU+Y4BsMY1KQJ3Pp55cvH8vavOYbuMB5+fV/QsB4wtvGt1XyVjoLOp1xlYyVt9bqARermItW+kTZxM9z4Cz8LAWUGpZLEFDWfutrCYA1pe4QVoIKLpo4Kc/eft6Y9GAZvVRCiRMHxvEswQEcwyIwbQqMFpTm0XGxm+Q= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0133.namprd21.prod.outlook.com (10.173.189.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1164.11; Mon, 17 Sep 2018 03:04:57 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::54e2:88e0:b622:b36]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::54e2:88e0:b622:b36%5]) with mapi id 15.20.1185.003; Mon, 17 Sep 2018 03:04:57 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Viresh Kumar , Matthias Brugger , Sasha Levin Subject: [PATCH AUTOSEL 4.14 69/87] arm: dts: mediatek: Add missing cooling device properties for CPUs Thread-Topic: [PATCH AUTOSEL 4.14 69/87] arm: dts: mediatek: Add missing cooling device properties for CPUs Thread-Index: AQHUTjL2zJXXVqC/PUSG5VPk/IY5MA== Date: Mon, 17 Sep 2018 03:03:08 +0000 Message-ID: <20180917030220.245686-69-alexander.levin@microsoft.com> References: <20180917030220.245686-1-alexander.levin@microsoft.com> In-Reply-To: <20180917030220.245686-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR21MB0133; 6:HY4hSrebNwQRgtP89NPO9ChldWz6zFykk1U16Ou1AINioQwh/eIu7f1PrQrQvMju6unB0J5m1T56LptOS/8VW1LvKHhz0uzVWHJDSaw8Vl+lfZ1thDQya8Y/o5qtrIgeyNU+4MXHFhuc5sHKJ0C/eL/hOFE6RR8Ej8ZPS7Zo/Ug1fL4aIVhMSRP8+wnvJUPX5ttWzPnNsokui7cCNSArqcooX3p8OOiIsNjCHeVASWnb20VW0fRk6dVTcQqAAaOPoR1nCDJcSuN/67e57Z0poYlGcPLZ/ZEBQDp+8RCXxT0ExEwEKhHhexsTA9UVYqPB5qL0OLRjZmhWBNUYqdled4Zt3+yWeFUw1vrmNSzJc/8DKF0YK6sR4OkeFq98ToOemVjzGjoKIiujFffTAsbx3B3GCQ/Y3p+dksp3zp+7Xo98c5ycroydS5jmk9At8rCE077hqW31uLDrXqgJSijxcg==; 5:xhF8kJ41Pe2BfMScyJhF+Qq7HkQdQLMxd9n+6XZWildOMUlSeas28Bhjf0UK5H42XFYITbfU1WMKj5CPzJVGM6Q3VifgE9exPeM8wSdVAU5hQAxBESzPeEFdliF56SrXL6U37o15SC2y8BnSnpi7nY0stuWdp9t8bJ2VP436U3o=; 7:QGhB+BSAkrMXlQfkGJWcsE4MRa3CdkiAgmDW8MUDyoUrsNOTCh3vz+27VxvaNuQ2Uz9IU/bOkNwBsf5o2WPrJT+8YPON67Vya3RSnKD62ukEnsfU2wJsEKrIK5FGkM4GRKOAiTnAS4gNtYbo/yID5r+1xJIek2TbZsA+OqSrB6lSDmjkxeNMMVZjkFSXVHGfkPvCqY8uwlT2DxoqOJKuXJsqgD3rIqjk+lWf5VkAimh/kCQI45GMw2vFee7tCWV2 x-ms-office365-filtering-correlation-id: e8274b86-ff17-4f55-66db-08d61c4a597c x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:CY4PR21MB0133; x-ms-traffictypediagnostic: CY4PR21MB0133: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(209352067349851)(85827821059158)(28532068793085)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3231355)(944501410)(52105095)(2018427008)(3002001)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(201708071742011)(7699050)(76991041); SRVR:CY4PR21MB0133; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0133; x-forefront-prvs: 0798146F16 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(136003)(396003)(39860400002)(376002)(346002)(189003)(199004)(102836004)(53936002)(8676002)(486006)(476003)(3846002)(6116002)(76176011)(10290500003)(97736004)(217873002)(256004)(5660300001)(107886003)(6506007)(478600001)(39060400002)(110136005)(2501003)(10090500001)(14444005)(305945005)(7736002)(446003)(11346002)(36756003)(2906002)(1076002)(22452003)(5250100002)(2616005)(26005)(316002)(106356001)(25786009)(68736007)(86362001)(575784001)(14454004)(72206003)(105586002)(99286004)(6486002)(6436002)(6512007)(86612001)(6666003)(81166006)(81156014)(186003)(2900100001)(54906003)(8936002)(4326008)(66066001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0133; H:CY4PR21MB0776.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: M9B3GE2RinAn75tMpc4sAwleLqor3i6ZngU4RW2Ok+nmK42qUrHWQlyN8npg6mFKR8EvfnYeDgbRmLDlDv2O5TQzwB9xMN1FpW6ZrDxH1EwnvnCDbEtFIBrv9pWRVUvKmbWu8UE+unUvWaxi/OUYUa7ZATcrI9AkitS9+DIi8PDRZFoISjkQMfNsh4FUHrXojhtehzO8fDuT8T0K00cfYF5wRv4DfqbOK9QlK+z+cvWAbDZBjKWtMiG+7Dgh24FTwE47zRyWgnnEIRko+z0j/jf/glt5XGk8WGm8gJD8EQnwxQM1X0vcmYZQR0rLn6HFBFAqev7JAvLso8yGhIhSE9ismHZ/gkxm8ZV6GCoryVw= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: e8274b86-ff17-4f55-66db-08d61c4a597c X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Sep 2018 03:03:08.7903 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0133 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Viresh Kumar [ Upstream commit 0c7f7a5150023f3c6f0b27c4d4940ce3dfaf62cc ] The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device. Add such missing properties. Signed-off-by: Viresh Kumar Signed-off-by: Matthias Brugger Signed-off-by: Sasha Levin --- arch/arm/boot/dts/mt7623.dtsi | 3 +++ 1 file changed, 3 insertions(+) -- 2.17.1 diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi index 185357323572..028cf4a5887f 100644 --- a/arch/arm/boot/dts/mt7623.dtsi +++ b/arch/arm/boot/dts/mt7623.dtsi @@ -98,6 +98,7 @@ compatible = "arm,cortex-a7"; reg = <0x1>; operating-points-v2 = <&cpu_opp_table>; + #cooling-cells = <2>; clock-frequency = <1300000000>; }; @@ -106,6 +107,7 @@ compatible = "arm,cortex-a7"; reg = <0x2>; operating-points-v2 = <&cpu_opp_table>; + #cooling-cells = <2>; clock-frequency = <1300000000>; }; @@ -114,6 +116,7 @@ compatible = "arm,cortex-a7"; reg = <0x3>; operating-points-v2 = <&cpu_opp_table>; + #cooling-cells = <2>; clock-frequency = <1300000000>; }; }; From patchwork Mon Sep 17 03:03: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: 146829 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3270787ljw; Sun, 16 Sep 2018 20:05:09 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda8kFEi4rzgWu5pbnoTpZGBwhGzfVmVM+xaFYdG2m6Am8WzlBmTCXcKHyRMTdyZpp4oSoL5 X-Received: by 2002:a63:2106:: with SMTP id h6-v6mr21347470pgh.161.1537153508960; Sun, 16 Sep 2018 20:05:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537153508; cv=none; d=google.com; s=arc-20160816; b=enfvbfo2ECBn+tkKpKvttGatuiemAsL8HEES3lDDszv8n8zQBqRlrQfuEmEAsZLtw/ LzCIFXyExucXTBHQyz9TPWjDPBHmxS3PLbJu230WK6AeSmat+5EgI37ykmk8wc8GtvMH NijmXN8vtLy6b/TVKtZFFYoSJtyoy5nynRXEpz0+Mtj2ZZtmPEj/0r3CB5m7ybO2GPXE u7RdZbTKy5322lkWRMPGlE3H8oNH92zTQs4GoGkb9VxOzjVy6KXhPnQMGelNMhrJ5735 UqI7K38obPqaPH114hnuwSvtrjH+gfDpNqeqvNHmFoeC8xlWJFXB/AllGWb0o9awaxfZ 2KPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=40EZXziYlPlrJFV7rMzAsBF/USvmDzs+gAtcNDr2CKM=; b=NzQJ2TtmTcnnR5K+XYzjbPKWUTdf9ug7RsYbcFl18WH0k2wQacjuwyGmvFq66WBW7R lO607GUGEFgQbvj90s82LToWRksm5QqzyJsUsEjbWoHZA54uYxf2vbArctShcTUqUvq0 z22dGTHxptvMrYL0fBM1fV+VKmYcDJ+636Ed5VqIi1EQMERRI2gKNyDr97zS2YsAZTI0 mC8FF6gNJYcrAnsoSIwtfUKWaKWibBQYodv3ZqAHcsG8r1BelA6xoMwvTl4VjPrDgLxo +elCa6MVmUp4qfikm8JfV8DFYMMXVk/reD4XJ8h2jRITEutAWnBKkWYsGNmYnXyl6ufH us4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b="CEk/o/+/"; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 7-v6si13975157pll.369.2018.09.16.20.05.08; Sun, 16 Sep 2018 20:05:08 -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=@microsoft.com header.s=selector1 header.b="CEk/o/+/"; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730452AbeIQIaV (ORCPT + 32 others); Mon, 17 Sep 2018 04:30:21 -0400 Received: from mail-bl2nam02on0103.outbound.protection.outlook.com ([104.47.38.103]:18657 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729645AbeIQIaU (ORCPT ); Mon, 17 Sep 2018 04:30:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=40EZXziYlPlrJFV7rMzAsBF/USvmDzs+gAtcNDr2CKM=; b=CEk/o/+/epMu3Jp7vHfE0zOZgrZlKgJQZ4Xy2PSc55OnpUmFqcqtthUdBLLTZROJC1DbB8VyptHTUAG0OBvggnH0WrFy1puRwBWDFDNlK5UjIAbPfFPTXCHA0lUyEvyoMz2UYSMC4mnxs/MgwPKFQiNiijMBiihtcWCxV1i0hB8= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0133.namprd21.prod.outlook.com (10.173.189.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1164.11; Mon, 17 Sep 2018 03:04:58 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::54e2:88e0:b622:b36]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::54e2:88e0:b622:b36%5]) with mapi id 15.20.1185.003; Mon, 17 Sep 2018 03:04:58 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Masahiro Yamada , Paul Burton , Kees Cook , Sasha Levin Subject: [PATCH AUTOSEL 4.14 71/87] MIPS: boot: fix build rule of vmlinux.its.S Thread-Topic: [PATCH AUTOSEL 4.14 71/87] MIPS: boot: fix build rule of vmlinux.its.S Thread-Index: AQHUTjL2VX5JMOkVP0CcXehZ06TEaQ== Date: Mon, 17 Sep 2018 03:03:09 +0000 Message-ID: <20180917030220.245686-71-alexander.levin@microsoft.com> References: <20180917030220.245686-1-alexander.levin@microsoft.com> In-Reply-To: <20180917030220.245686-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR21MB0133; 6:ogoRStjPqCFt2IKqpPSY4JQb7ID/A7htzLheQSC7eM0I+Y5pEqppY8ymxicCJnt/+wqy4dYwlcBy9lPjenwD0zq6ymlFxG202F4XCSKymYxzo6atYopPdnJzuLrTuHsf2rcXJZVqrF+HBXZ4U1eT2shfci52LBtyaVcMfaHJyysquIfZ4DzDM0P5nto2y4cyzk+bR8A/JAhse5AAU95Ehs85M4F2KwvAQZH+kdUSFBPPCBp8ie/UURVE/SOL3or/DisoX1N/a7Y00u8tHsGrw8SYbAetd2DoIBrfLRXJOMx/R6W5YbHMUN0jCj7AhDdNmKQ5wGezNeeTowe6oj/ETyQ4Xm4fLCcUfYiWCxWFTUKxRIwxQtxCoMBetijCK3stWV51iqMAk31D0T8EYxa5+TuiEXuzDCmkxA7LrgzvTabE0VTF7p2svwJdkP+tE0oeCJEdqeqH3Qmrf5t8VQKGeA==; 5:e1674xYQCSROGI72tDtB8b4TL535fk6z9KE+qZ68mcRg9m/uC4UhfRO6M25C/Me5sSOhg1EHJGzj0O29lTeHUeb1WoXWcEanovXFbW22Fqzob6cTRVbiXsLbF7Qpz4AMrBpOYAty43n3VZUzUw3C9AK1Sgmi68TdUPNDWAwhgY8=; 7:F1plcaqfQn5rX1FrYC3ca1zYqpV5ZOcKJ2SPOFpYJpaE74Azh37cIYF5Mugg1nz+Ra78XCVLuqw77fjX7S1AAeTNbCZmTte59AV9oVD/3ociaf8MZtffuh8mgheZiSdCIl+t+560ffamMe0G4jfVlpUdeJS+R7m3+on0BOzu94D9V5zekcijscscYRX6/yfhYALpVOEmWi7z7+kHEIsFp2tGxEgfB2qC2BwQ8lj9QFmHOb7xjiTmy+NeD6jCo7QL x-ms-office365-filtering-correlation-id: 2ae7fa6c-78c9-4b53-4c6e-08d61c4a5a04 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:CY4PR21MB0133; x-ms-traffictypediagnostic: CY4PR21MB0133: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(28532068793085)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3231355)(944501410)(52105095)(2018427008)(3002001)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(201708071742011)(7699050)(76991041); SRVR:CY4PR21MB0133; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0133; x-forefront-prvs: 0798146F16 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(136003)(396003)(39860400002)(376002)(346002)(189003)(199004)(102836004)(53936002)(8676002)(486006)(476003)(3846002)(6116002)(76176011)(10290500003)(97736004)(217873002)(256004)(5660300001)(107886003)(6506007)(478600001)(110136005)(2501003)(10090500001)(305945005)(7736002)(446003)(11346002)(36756003)(2906002)(1076002)(22452003)(5250100002)(2616005)(26005)(316002)(106356001)(25786009)(68736007)(86362001)(14454004)(966005)(72206003)(105586002)(99286004)(6486002)(6306002)(6436002)(6512007)(86612001)(6666003)(81166006)(81156014)(186003)(2900100001)(54906003)(8936002)(4326008)(66066001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0133; H:CY4PR21MB0776.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: cCXyLjsZGKxutPE7MmsuRTqRPBNDtCAPRihvBhCi/JtSq1AZeC2dg9Xk0zxLGtE6up4eNBBIkXvoLajJ1nz7G1DvadRTszvr0nUgsO+dK99BqmnZMFMoDKJMoq1gae6ioVzIHdFf8P76jS4bFF0+ZWDcIZBbYr+Np9K2Kou7DdyEHVHuhx1CmiEdpgvpeV3bmrOLgvW4iWVKL2oBpmS//4FsBdrgk4/8LgsAfUrz7DhXcGrem+chJsXqZe4HbzTMYeoHbo2H+Vit+Jx70r43tcb2EtZOvvDUGjzvNhRZTnojOMtZmWQrhOnqPdNSHb4YDib5yiToKz9eKgfQhJnJolqQkKI3bHoUEoOk2VS3vE8= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2ae7fa6c-78c9-4b53-4c6e-08d61c4a5a04 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Sep 2018 03:03:09.9153 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0133 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masahiro Yamada [ Upstream commit 67e09db507db3e1642ddce512a4313d20addd6e5 ] As Documentation/kbuild/makefile.txt says, it is a typical mistake to forget the FORCE prerequisite for the rule invoked by if_changed. Add the FORCE to the prerequisite, but it must be filtered-out from the files passed to the 'cat' command. Because this rule generates .vmlinux.its.S.cmd, vmlinux.its.S must be specified as targets so that the .cmd file is included. Signed-off-by: Masahiro Yamada Patchwork: https://patchwork.linux-mips.org/patch/19097/ Signed-off-by: Paul Burton Cc: Kees Cook Cc: linux-kernel@vger.kernel.org Signed-off-by: Sasha Levin --- arch/mips/boot/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile index c22da16d67b8..5c7bfa8478e7 100644 --- a/arch/mips/boot/Makefile +++ b/arch/mips/boot/Makefile @@ -118,10 +118,12 @@ ifeq ($(ADDR_BITS),64) itb_addr_cells = 2 endif +targets += vmlinux.its.S + quiet_cmd_its_cat = CAT $@ - cmd_its_cat = cat $^ >$@ + cmd_its_cat = cat $(filter-out $(PHONY), $^) >$@ -$(obj)/vmlinux.its.S: $(addprefix $(srctree)/arch/mips/$(PLATFORM)/,$(ITS_INPUTS)) +$(obj)/vmlinux.its.S: $(addprefix $(srctree)/arch/mips/$(PLATFORM)/,$(ITS_INPUTS)) FORCE $(call if_changed,its_cat) quiet_cmd_cpp_its_S = ITS $@