From patchwork Mon Sep 17 03:00:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 146837 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3290162ljw; Sun, 16 Sep 2018 20:34:59 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda7mX8N9UXgYs8Z9vCZNLRgR+XXMyaIsz86myVO/b2Ru+h3nutJCuAjJ+zg6bUkqoIG8hue X-Received: by 2002:a63:6b03:: with SMTP id g3-v6mr21704410pgc.57.1537155299355; Sun, 16 Sep 2018 20:34:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537155299; cv=none; d=google.com; s=arc-20160816; b=HGt6l202h1++EqCDGuT/PFAr6H9ySa+6bA+QVAPxoCputmA6e6GwS7oJ5EHHIBJdg+ 5apYkt4FTqtbGw9rrOJ7WKSHeT731LEFm+/vkXtZ6/bSopdZgOlf/wiSN88/7Tpj7Trm mJygBw9GQt9oIFIkTAbBx2EbOJQI4rponE6XQAYn6BMaRnPkZ3Rxkrwr8aFXjzhYniXW tjB20ChTQ6NgnKLo9SGiRrSsO6c/SP7hYdjzbqjuBvvXkuF0Clt345MB65GN1ivCCwQQ Zi7Lr44s+4INga4zdlnzFDAFaxFygkLtAPCSTHZ+c83YSA+haTvqwdhPoN88PPG7GckH rOfA== 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=s4bqzIIVgZizipukNuOqGIuCmplEQNr1YvYZCfBx6ZorvW/Z4d7EDWBPzZ/pj00k4i GU9x4n9TNdHJUcBx+Y4RHwCbQNG7rvrH8O5HA/G6pDyBJ1IImFUYSh+w8P8L+hWk0RF9 Z0cQ8gzvD9Q7GMbMO6ygVUo2VyXblp5XJgI9K1HOy+sDVGsWPR1AnB4mqA6iw2chi6Zm zySCBFv2WcXyq1BU5cg0bT3ym9QmWoiL/9JeLP34/mSASnON3x0PqKTt1btvty3spXBG PgAAiknhqN2UgQ/9NCIE46gOx2XbTQZ83KxprHRqIKB3e/ElqisRjlHhG5hd08dc/eKf GqNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b="AGO/IFUW"; 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 u4-v6si11583822pgr.475.2018.09.16.20.34.58; Sun, 16 Sep 2018 20:34:59 -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="AGO/IFUW"; 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 S1729264AbeIQJAU (ORCPT + 32 others); Mon, 17 Sep 2018 05:00:20 -0400 Received: from mail-by2nam03on0105.outbound.protection.outlook.com ([104.47.42.105]:52843 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728585AbeIQI0Z (ORCPT ); Mon, 17 Sep 2018 04:26:25 -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=AGO/IFUWhY4K4Qk/bLlG5PnvSSUjQeZVAtCYoS32WAdA/3K/ijAlc85hhBycJ5xp0+egwglRpGCepMoOk5Z0bMzfpjJTTvD44QTK7hBWnYx23V/G0BAHtQdENfINwh130tuqmiGqQub/xTwMMOE9BNR97Kt3RnBC8925fHWZVGI= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0277.namprd21.prod.outlook.com (10.173.193.143) 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:00:24 +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:00:24 +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.18 017/136] power: vexpress: fix corruption in notifier registration Thread-Topic: [PATCH AUTOSEL 4.18 017/136] power: vexpress: fix corruption in notifier registration Thread-Index: AQHUTjKSO61cwmS7+kSPgaPldbggnA== Date: Mon, 17 Sep 2018 03:00:21 +0000 Message-ID: <20180917030006.245495-17-alexander.levin@microsoft.com> References: <20180917030006.245495-1-alexander.levin@microsoft.com> In-Reply-To: <20180917030006.245495-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; CY4PR21MB0277; 6:ZGVebXhxV3p2i9+hnhhyuKKK5BE/KMHcj+eFAXYwidlCa7Kf/afKLdxRZ74FTi3A4mGWyGD1cF47OfQJ/VMPAyiOotogcFkeHWgjihEfPS8q9nDI1ArJr/AM0OjGMMBli8FaFwhN6ZjVqHT96CtVrH/DqIkPESCXVoWANHpXEwB1LjxtEIx8G2J4oFRowQRCBfnrBOpJSZEckjivKrN4RamFGwXk/oEZa4ywhMregZmUnyrOSF2OSIJ8U9pZ9bLnIeQ2hNY4Yw8siNYrcCAGu1ETcOkKHItpmNnGWqwvj2KgxaJCDJVQPAugsfrETxC/6XeU/712PVIpl2doCUCNCxCw6Ak7vrbS8cvWEldgqWbKABpgO26tfz7CztPmlbzYYbIA/YCM9/HyfoUrP/T6BSgP23vUjPBuoMG1wz2lU9+tLFVJq+djFcCImpj+VcwICzJDY47B0kVS5lWQI4C8jA==; 5:P+h7Ywg/fLdkLIXUghj/vHZjs4qbod7HD+AZTB+lrM5OKAE70RTbxFu7FJwBb2Z2QrSH7+wIEnGfRkJSAKUWjsbroQddojNIHnOYfdkC42fV33TMFKAoYcG4fKAQ8QN4ccH1GD6tjIT5PMlT4vHZuEeslnspSKNgveSHl3Byl2c=; 7:EUPb0J3bxv2KP1I8H0nGtnqtEbhA4NraFodQU8KVEuAeXAOILau+RMCyVGgmGUBZt+xi9xPfrRu0hQJQnpKW3DmhLDND1c/Ql6G69YoknRr5bmVX+QIC3h0UDeyv1YGPoAFqfuXZqG/oVGY+jQsHI/gX2KnXePu7Wv9sz0Z0ENIAI+JNiwt/Y9DWNeWdU9ZQYNjbPDG2cLKzXtxmNVAgcAH9iZorTBvaF9AfeGI5T0EqeTJae7ZAgz/PjA5u7pjx x-ms-office365-filtering-correlation-id: e8397a30-9af1-4bac-6eaa-08d61c49b715 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:CY4PR21MB0277; x-ms-traffictypediagnostic: CY4PR21MB0277: 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)(10201501046)(3002001)(3231355)(944501410)(52105095)(2018427008)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(201708071742011)(7699050)(76991041); SRVR:CY4PR21MB0277; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0277; x-forefront-prvs: 0798146F16 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(366004)(396003)(376002)(136003)(39860400002)(199004)(189003)(446003)(4326008)(2616005)(53936002)(107886003)(11346002)(22452003)(68736007)(486006)(316002)(14454004)(106356001)(476003)(217873002)(25786009)(105586002)(10290500003)(14444005)(97736004)(66066001)(6486002)(6436002)(5660300001)(256004)(5250100002)(6512007)(6666003)(2906002)(2501003)(6346003)(99286004)(72206003)(2900100001)(26005)(6116002)(186003)(1076002)(36756003)(81166006)(6506007)(10090500001)(81156014)(86612001)(102836004)(575784001)(86362001)(8676002)(54906003)(8936002)(110136005)(305945005)(76176011)(478600001)(7736002)(3846002); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0277; 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: UVnN7iV+o1At4CcB8W9NSU1SZcUgBglwzbucAFy05PPzEhwMwYuD3zSEmi0mVSJjcFjoTPj5TTZfTr1wsxdRcX/ntrGUrztpOowemFnuz9bh9YrdIZm+dkY6wWdf5aAqC6XUulSROpqdotaerIy3FRaZfb3BBvMK5/QoZgmpt0IKupj6Ctnfsma6hyKz5nJCi5kpUXskF6b/rc4z6VpkYV4rj30cj7wdlkomCJ8WqFj4x7ctAORgP7RiGpn546g+WAUhSi9vIJX33dR1bKOsX8SnCtvNrf434GZx/iRfHMJedid+W/krfrbBDhBdU24uf94BDHh729hFimA66A0R9iHownB1q+JdGW7Inv0hYsA= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: e8397a30-9af1-4bac-6eaa-08d61c49b715 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Sep 2018 03:00:21.8235 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0277 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:00:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 146838 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3291520ljw; Sun, 16 Sep 2018 20:37:07 -0700 (PDT) X-Google-Smtp-Source: ANB0VdamEUATmC6G359ae5544O4b2D5nzLMJ338WkMeEb+++M2QVt+GOUJrp/wav4DfP7P3EZT/7 X-Received: by 2002:a17:902:1025:: with SMTP id b34-v6mr22977224pla.291.1537155427381; Sun, 16 Sep 2018 20:37:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537155427; cv=none; d=google.com; s=arc-20160816; b=dlikPZ57oyf+RM0/qJwmZHpoKPiLk8l19l3QoqAJ3wgh1EZ/g4WnMa0LRDoLSyj5Ax FW06QenZze7qMNWh/fIGqij6GIPsWn7DNiEbxwrs0D0cJjVFR0w7gyGwHspho+OOegLh P+PtxEq/a4Z/4Op/5PVMgUuSHLE5+1TdwGwanMGz6oh+tufDNFmjKJ8k/jQMf12rX2Hy rVSuzT8qrQSMFk9sNrj/pziGIns7/aZoTaeQH8FpUhCk9FQq9ZBu2iezGkuoo49X+SSq IFI5m9RR9FS3aQuWgA3VszjAbnrPcEYU8nS2Rhl2wCUOnEajPoni5eU+Xxeedjqk2dKB Mv8A== 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=ciPo0ldZg9nIK/F4gHqvYeVF+u1L47ID0bZ8v8DkrsM=; b=q1VGlXBUixQ3aTBElfTQc+rBNZlPJnGsn0d8oT44KimvgQvXmqBLHWjVeRQJm05qHP pKdMxJ9A5MsCoegyLGvTFdVusSUgDAEsus13lo9CWnVM+kemCBO4AthBVF2xjg0JkToy mW1kj9if3YL02eMWc9nEPp3shVJL38r4vlbyx9ME3zZ1gmACo3lhRHsOFwehK51IYVdn lKjDWqhrZxbAmA2cl1/Y/q/Af6gBpe18zEpjR8sWEGsbPKG5oIFED3by1dXOrdepvvfW OvVLJLHyujdnKCcqVWyTeDrB7xuOUUX09AR2pWByRRES9quo+ZQLF0s8Co9gp4k+WLwh /9Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=agSdntIl; 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 a5-v6si13959709plh.312.2018.09.16.20.37.07; Sun, 16 Sep 2018 20:37:07 -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=agSdntIl; 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 S1728955AbeIQJCW (ORCPT + 32 others); Mon, 17 Sep 2018 05:02:22 -0400 Received: from mail-by2nam03on0137.outbound.protection.outlook.com ([104.47.42.137]:35861 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728587AbeIQIZq (ORCPT ); Mon, 17 Sep 2018 04:25:46 -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=ciPo0ldZg9nIK/F4gHqvYeVF+u1L47ID0bZ8v8DkrsM=; b=agSdntIly9tKMzvWbNljcBvOh7Ij0tyDiN9IgP1qqTrRXMfx+/GEJrr52GYTvSmrhe0xM5qDFQhSUqxMm736+hn1BiwcafxoA6WAiOLpuJxO0ktpXYIbDt4dZkCASb36tJg24bhktzkq5sPPB/JryTaOnGSuVak3rV32bpCOWRc= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0277.namprd21.prod.outlook.com (10.173.193.143) 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:00:25 +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:00:25 +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.18 018/136] iommu/amd: make sure TLB to be flushed before IOVA freed Thread-Topic: [PATCH AUTOSEL 4.18 018/136] iommu/amd: make sure TLB to be flushed before IOVA freed Thread-Index: AQHUTjKTZYWsALGKCkCcF+pzJEJW+Q== Date: Mon, 17 Sep 2018 03:00:22 +0000 Message-ID: <20180917030006.245495-18-alexander.levin@microsoft.com> References: <20180917030006.245495-1-alexander.levin@microsoft.com> In-Reply-To: <20180917030006.245495-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; CY4PR21MB0277; 6:+78TmlLGqQBpRg3x9WcVTDbRqLjai+OOSf9fZJpsExdBngUjuwiqHCPL7cbClczbIuACGYUsbJ47KN0KBid02W5fqqO/5dEaZDihPP4zcfjGL2sVUh8WLrsTs1KbGA3o3nhC1NuffH2GWVjEZ4eMG72tBHZyip5M2SVzPcitsXPanChVldlhF+ygSVdAo6Nfb3U0hoVu/T7ZBc9O8qH/MDYNKLXGhHnjjxl8+wecCf3rN38f0CG9I8WzFtTfGBKw8vAYZXfGd4N6Op15ZFRDKSdNQ5jhLvyIMs6tShZmrmq4IUHY58fWB4KFnE1KHit3fuf3iahea49P7L89hQX3xgcGL9S4vYQ64YqbzF4xxnCOvoSnbD+Hmn9PDpfTYiMeh7Rb8FcK1SrMrLrqkbr5Tdc6H1TljmkaVX8GLyWBh+1SgRIA5ySNg/JftKciYvcljRj3/jKwODDEZVYfYpDgpw==; 5:FMJaamXt9o9XYEOmjuWRRDjpViP+x8vEi4b8woK10bPLqgL4dtPo8q0K1kmfCnJQdUNoS/vAN9U+CcX3eJTQ9+qOA1RVmDnxPjdYOoXuELRWsa9X0VV/BSYsDDnFUMBGUFWayL4FH1SbKUWUG7o17CQQ8LKAAZKdAQcNemd5puQ=; 7:tz6eJS0Z2vC7kt0K3AV902N3JxyUIsE2qPSdW6GyrufQN3WSAHOGa/lq+t2LVltfb9Sf5/71K0janUIM0xr3+ZjsxPw0pfYPSnyO/wo7IiSCGh2yOwsERHM31AlqIFgBukbagfS7immGpGlzOBsT5L4A3y5Kud5c/MCcsLbTXgxF/IzbTC6PLGvsR3DW2YVh92gmb6UXrc7OEHwVYiUM3Q5KxVEdNhVIGUUsErrk8H6nI1y9QwhIQmDxNKTHGfFi x-ms-office365-filtering-correlation-id: 4e5701a2-79eb-469a-7fdc-08d61c49b747 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:CY4PR21MB0277; x-ms-traffictypediagnostic: CY4PR21MB0277: 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)(10201501046)(3002001)(3231355)(944501410)(52105095)(2018427008)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(201708071742011)(7699050)(76991041); SRVR:CY4PR21MB0277; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0277; x-forefront-prvs: 0798146F16 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(366004)(396003)(376002)(136003)(39860400002)(199004)(189003)(446003)(4326008)(2616005)(53936002)(107886003)(11346002)(22452003)(68736007)(486006)(316002)(14454004)(106356001)(476003)(217873002)(25786009)(105586002)(10290500003)(14444005)(97736004)(66066001)(6486002)(6436002)(5660300001)(256004)(5250100002)(6512007)(6666003)(2906002)(2501003)(6346003)(99286004)(72206003)(2900100001)(26005)(6116002)(186003)(1076002)(36756003)(81166006)(6506007)(10090500001)(81156014)(86612001)(102836004)(86362001)(8676002)(54906003)(8936002)(110136005)(305945005)(76176011)(478600001)(7736002)(3846002); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0277; 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: /fyUrKcoD6nejZPWatacP0hvy5vDgMJ2ejeAdt79rjVVUTF7QGCApNkIwHXLlfdjflzjlSj/eYw1krBMpvABeBkIk76jkYjc4DeStSGPBbWvH4oi86LU2ZQ4xVGv9vEQq8k7m7lBwerord+jDnKS/T1Ii/64pdmZTwA81pXjqoQlQHOwWG7CGDFZC9kA/PkgGvdiY96kkYikd1feizWxonJ1dKCwU2Tq1KcRPZf2ZepR4zP9LYwIa26WntNRs77WtM90CVBRk5q0LzfHXph285qCYJPmrFymAftJ1x0nTZCkU5JgOYJZnFU12kZXOJEd9jdYQmNa3m+RnomphohgUxrUkkR2A7pby91b1R1pceE= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4e5701a2-79eb-469a-7fdc-08d61c49b747 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Sep 2018 03:00:22.4485 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0277 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 596b95c50051..d77c97fe4a23 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -2405,9 +2405,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:00:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 146823 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3267962ljw; Sun, 16 Sep 2018 20:01:19 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaOibcSJ+gXsbYqnXZZaGpcUnzRJqbidS+qkBlspkhxoJZ21y5H0cr0nbDXWFKHcQc7TjfS X-Received: by 2002:a63:fd06:: with SMTP id d6-v6mr21203528pgh.348.1537153279358; Sun, 16 Sep 2018 20:01:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537153279; cv=none; d=google.com; s=arc-20160816; b=d8M1Ddmb5kIFRG11kOkjJBi7XUsYFyKDRXC/0xJDs7xhtWie+KXVkryia8LTfnBHme ZoIuvyW+iZRQL8Nckx0lOBQoLcsqbNz+aqVz64u9MKRn6cTxxJyI6JfZQmDAmQsRjtun pDOzMD5VytwswFqWeFpkym+PMFf7M+gkFmtGG1/JU7iGHXS75lu9bfNZEF/Og0mkhx77 JnF1XjbD5NgAOUjBA9POphRdLQh1gEjoLVQv7LFqrOZh14RCxeG4wBRWYM7oEP6lk9zb 3DyqDlW8EUYGiXzawg02cigQk0HSEeu5g9/vZ1YFPZT98HjZK2A2oEgWFIiHca5StQ3m HBxw== 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=Z50XFkbwIpnCLv1O0Z7xyho5i4qKdtDFmznpz9/kZ78=; b=jn6rko3BdlbIdYklJGb7mcP/3USDwsi7Gdiw+s9Vlziy9fdoBefjFL1jhgzs+hpN/E Kc87UYXs3SQw1K7bTMIzNg3BIphxD/3kAk1VVJHX9vMhXHgylvMQo9bDl/TTCPUNcvo4 Boi5NywTXtXfPnQIodYXADagMT5qLV8/Wqi+S3WdJ5inor2deLt6F7qba4juAZnDQdFK L3k1xJZDFLBClWbKcWkQLm6uicJ5QFrbx+r0vhX0YMM0R0ZccL7nVSrUj5q2zNvuGIGn 4u6375N1a/RDdimea9t9o/Q+9h1qVgo9MkM/+KC3bDJ4cMoYANtazpH/D92Mw6jKp7M+ Sl2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=dtCvzvES; 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 j3-v6si13788114pld.402.2018.09.16.20.01.18; Sun, 16 Sep 2018 20:01:19 -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=dtCvzvES; 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 S1728961AbeIQI0a (ORCPT + 32 others); Mon, 17 Sep 2018 04:26:30 -0400 Received: from mail-eopbgr710095.outbound.protection.outlook.com ([40.107.71.95]:52685 "EHLO NAM05-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728945AbeIQI03 (ORCPT ); Mon, 17 Sep 2018 04:26:29 -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=Z50XFkbwIpnCLv1O0Z7xyho5i4qKdtDFmznpz9/kZ78=; b=dtCvzvESEOTMKNT0Mv9v9iEDRvFyUV23mI1FRobiDVwL8w587PtsM1yhAGF238b04Z61c6Lmo+PnqmjTDxJpUAQWWqApaqkzBk1BaLDae5MsBv68jumgQc/VmmwDvAKeGC0WZ9p9HAkV67lss9py278uzl5qLuRBabZw9JUzeCQ= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0167.namprd21.prod.outlook.com (10.173.192.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1164.12; Mon, 17 Sep 2018 03:01:10 +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:01:10 +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.18 046/136] ARM: dts: ls1021a: Add missing cooling device properties for CPUs Thread-Topic: [PATCH AUTOSEL 4.18 046/136] ARM: dts: ls1021a: Add missing cooling device properties for CPUs Thread-Index: AQHUTjKeTB1u9AtegUWtUwnu4cq+hw== Date: Mon, 17 Sep 2018 03:00:41 +0000 Message-ID: <20180917030006.245495-46-alexander.levin@microsoft.com> References: <20180917030006.245495-1-alexander.levin@microsoft.com> In-Reply-To: <20180917030006.245495-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; CY4PR21MB0167; 6:wwl2MSh3Xl7Eomy2BAioEeEtAlgXYHKXmhyiRpUnURNMusY+uTL1oJMv+4xF+KC7P+x2E8qA/akQP1gAuYeay18dBJTAdRAavNJzVHM4RHWwXMA/nCEk+f5YxQdaHddhFw7Nm7ZKe3yx4WbwefRZ57HzEG2pVfERBIe8gs55kQhNCfnXxduTc8lwn3tj3j6YB/mw+NL11VUvKGxLc2uhVSX33VwWZ4cXEMM5GOUbFpTdt4F/HOlbT0MfwLitMPqV88iSdi4Pqw8H/H3F8UDz9TgLXtwWqKClz4Zd0w9SkvGgEgjMmuHC1f1aTE/oSH6yQQZlUeXH+7GLoGOP4F6VDwtR68kWR+OdCBNGLA8/O2aOspu2tW5EfrKYxiGqvaLB66KK0djZnlq4b2Cl3eEibCtusarKDqg0aoMzmHsGITEESQKxdgeTomTVlQ+ae1+nWGw99HUi6MZidfn/dHEXEA==; 5:b/eV+qJ7Sg4pF8EiVLry3YOdranHyTppZIAUEzAQPSPLg8pkJL3IuZhwz4CNJLK+B7o6BWAA183BqUsVqA/j7arnBwXRnvcA5RloVg2Wik53Vfwwlovuf1WSMPMdHTaeTOUQ9tsPGzHe9Io7U3QIvyBx7erIw4ZxPkGPuAWdcAc=; 7:bpE8xmmUfhGvq6iDUATytOFfC1Wrpxkt9fkx2OJb0cjxyE5/mFqG2GM6U0PnkSDB/yHuNkt1m2m4r0jyJrUhrMVluNNIWb1L4j0uRTSjEpz8CMK0d/yqROXYE0pf44hu8yw7SwxA7dPdy/AXYZw81XVRdrk7RX6E58dhLXXE8uhCvw/kNtMnNZoTsuWZKOvHglsOt4fwRhsygksx7X04nyhJt8cauHW/1x+qIqJT3G6GG3HErkjXp/vYUsRpfyfK x-ms-office365-filtering-correlation-id: f45b2ecb-0728-4ebc-3d1f-08d61c49d279 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:CY4PR21MB0167; x-ms-traffictypediagnostic: CY4PR21MB0167: 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)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231355)(944501410)(52105095)(2018427008)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123560045)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699050)(76991041); SRVR:CY4PR21MB0167; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0167; x-forefront-prvs: 0798146F16 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(376002)(366004)(346002)(136003)(39860400002)(199004)(189003)(6116002)(1076002)(86612001)(4326008)(97736004)(53936002)(2900100001)(7736002)(107886003)(106356001)(10290500003)(81166006)(105586002)(68736007)(3846002)(99286004)(305945005)(36756003)(8936002)(2906002)(217873002)(54906003)(86362001)(110136005)(25786009)(316002)(5660300001)(102836004)(66066001)(76176011)(478600001)(446003)(11346002)(2616005)(8676002)(486006)(476003)(6346003)(186003)(26005)(6666003)(6506007)(6512007)(5250100002)(6436002)(10090500001)(6486002)(72206003)(14454004)(256004)(2501003)(22452003)(81156014)(14444005); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0167; 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: Q21VhgQGXSH9dfcbkbuz63tUpZgO3xmvHNWCptNvj3zh5g20YKl3hrMLwX+5Da7F/MpyAkTY7FYRb/kbT4Nbqhkvp5b/e21lM4AbVnb05tzCEO938lHI9D4iCOjTU9bS89FT2rYYW5TjVHoTrlsggCDYckhymeksRK01BPFA5A5vyUCb7nMsqmaSWDLC0poMiJNbugk54QuYmsVnC8d5aw7LGwD9m5LFSVf5REAUqpeWvZomN3ayR6a2n3Cp2gtMBjnVIyxbchb4TR6dt2TdWVF2LBPNfwDHfru141oPCG95x/hs3lhNb9OnjJWLm3GIki8RZopFu2y/HGySU7n0mksgdv++O/8nVtf3ut1QeXY= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: f45b2ecb-0728-4ebc-3d1f-08d61c49d279 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Sep 2018 03:00:41.3077 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0167 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 c55d479971cc..f18490548c78 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:01: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: 146824 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3268780ljw; Sun, 16 Sep 2018 20:02:22 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdalm5bj/QHY5kIfGRgIavyQpwiiXIfIQbQaZjNDzM3e2nhV2cclYNB5C+/dqESLFRtkzaCp X-Received: by 2002:a63:dc53:: with SMTP id f19-v6mr21517547pgj.56.1537153342723; Sun, 16 Sep 2018 20:02:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537153342; cv=none; d=google.com; s=arc-20160816; b=mryehZkfBqccw0RfYnmvjqSw7g0xZpfCnvwRBgpCI8GingqsA1JcguhWojop7H9bv7 8CJ8rzGVmsYzgNZALxYEOZHjycXbPFNeYk1yVySnT0bb5vhvr58ar+cVwqQZNfnO+Csh EI9t0pipYTsov3q9bNzBf1EdkK+8/3KPS4RU+djkExFsTL1ySVU5/JM3fQfUtujht84j 0tiDg2qLmXr8a/fFMRkr4bg0k0yn76XKKpxdVO23cW0Lyp2P9f1brZsEk9Pgcna0mmHb AIuToWi4uUb+bY5PLfTQM3UP9U/BO1tGffQAJcZvARZag3uHv3wqlDWOoCZAgZ5Q+NyU GRsQ== 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=H0yqqrx6rQ2rBgZSZ81e8RtCIkdE3p8L0fHxovUcfwI=; b=Z6CGBMTmxb2y+1ml0A8FkH6SIRRmv9Qm7EIRexiBzAY+8Zd3ceeMzPHUz8Teji5IA7 19gZk6H6mYV3YNP9VFxa4DGpfw37WapR9vDmGm7Kzi5UFLdLDHORXiWJbcLjlmF/9vN6 p27pXx4oZjpHZ3p4u9iZdRMjM4lV3cUu+lmZ40VtUbvsSKupjjkfu7vf1QJ/WRX4kQr7 6EGQiSHeiZ+7pGR+SAbzeCcaC7sKfqpN9FItjvATZQdDekZ5Mj60LUl0WT7I0pEWdrin uHp7cHU8ZLSlCnJ7v3XFtvrXFKrX1G+cBIKREr4M8EWwIRWxD80fcHF7KWA1YfRH7HGF covA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=mN7r3fiu; 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 e12-v6si13758335pfn.322.2018.09.16.20.02.22; Sun, 16 Sep 2018 20:02:22 -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=mN7r3fiu; 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 S1729422AbeIQI11 (ORCPT + 32 others); Mon, 17 Sep 2018 04:27:27 -0400 Received: from mail-eopbgr720118.outbound.protection.outlook.com ([40.107.72.118]:6704 "EHLO NAM05-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729354AbeIQI11 (ORCPT ); Mon, 17 Sep 2018 04:27:27 -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=H0yqqrx6rQ2rBgZSZ81e8RtCIkdE3p8L0fHxovUcfwI=; b=mN7r3fiuc5pnNyEdOLscZydEWQdWMv+1Cf3rCf4TkOUV1CiNE3rF6/Zxv6Wny+IdWsrrJGdNE9a9hPkE0CS+5dlFhVDMejaN4BdMv3DxYRQKxGYikKfw1cvVyKADgh9UsS3Cx90kLy9sa2rrqcFLdq2qLOCCeOfLIyXW2TzOYkM= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0790.namprd21.prod.outlook.com (10.175.121.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1164.9; Mon, 17 Sep 2018 03:02:03 +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:02:03 +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.18 090/136] ath10k: transmit queued frames after processing rx packets Thread-Topic: [PATCH AUTOSEL 4.18 090/136] ath10k: transmit queued frames after processing rx packets Thread-Index: AQHUTjKuBZBy7hVoh0SSewsP52Zc9Q== Date: Mon, 17 Sep 2018 03:01:08 +0000 Message-ID: <20180917030006.245495-90-alexander.levin@microsoft.com> References: <20180917030006.245495-1-alexander.levin@microsoft.com> In-Reply-To: <20180917030006.245495-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; CY4PR21MB0790; 6:nVyns4xE0C9SlYVvN66r4SZFtALF34u3LpXylG0mH3J/4WydqNqtsCQzXJuCHLp5YSAxfiGZXds1mtAvQ+6hqtDy4v+oz4jngxgzeBz90ljlCvtUHIm3BItgU9C8zcDetEUaYLw1Mz9KYYxQY8jw6SvRoIJViRCSey17RaivoDP9mhi+CgGH54sYyatEBTE13Lq1czCIAdRpde+VC4BQwRJezO8e9a5/B3NXewtJvtqnO+en7ot3/P9MMXicsCQFYw+RTeEeeUsWTxh8hCOSxIx3eWk3bKpLfRE7jG4CmwxH5kRHU8rm8qQFHz68AoMmALqdVyMKLBqnzJRXxvhpl7pTSEdXKxpJlAKVteBK3lMPHNRcezHP5tafQnOcJ/M5XQ0xAbDdhHdzPPxoyIyW3uzjrpnKrFU7yvWbGqm6HKNSezQVFRlKRcsVzvl9mZ4heoUiIEobANFDaZEHuo4tvA==; 5:SsMpZqGezYrOrfbuNxhBw1Yifvd9I1tp76Ry+lQx3LdTJc/gJhdvvsNchh8HwahIBvBR0BXpT35/uwXM/3nThxZB1j8RepPwUFznst9ryjLL+pj6XBixkIca8SC74Cte1YhnmaaFcdZKBCjpimSjDQgN4N4ZEXyMOezF7KZEW+s=; 7:dlYtt8XNQWlGfl5DUoSsmBuDCeG5ug1LFWz/j0dO0HaRz4OPJKRYG6PtUPZgHWyXsdLCFyqQ8dHJtgyYUGnp2Gow+12JcwTLtVK1MH32652ce39mlH14EA541quS0eUn5ljVa9qbdggG9Ce3VsGRMFydgK7V+i/VpjoRyurvZ3EIigM8n5ZOu1ylpxqhark3+u8sax8shbuXM18InwLbH1InDeN/VGaPOb8CEQ65YFqFWgAtGRSZCNckceXL1z71 x-ms-office365-filtering-correlation-id: 31f0c25b-d7a6-42f3-d7bf-08d61c49f1fa 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:CY4PR21MB0790; x-ms-traffictypediagnostic: CY4PR21MB0790: 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)(10201501046)(3002001)(93006095)(93001095)(3231355)(944501410)(52105095)(2018427008)(6055026)(149027)(150027)(6041310)(20161123562045)(20161123564045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699050)(76991041); SRVR:CY4PR21MB0790; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0790; x-forefront-prvs: 0798146F16 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(39860400002)(136003)(396003)(376002)(366004)(199004)(189003)(76176011)(22452003)(110136005)(99286004)(6436002)(6486002)(2900100001)(2906002)(54906003)(6346003)(10090500001)(5660300001)(7736002)(6512007)(14444005)(217873002)(316002)(256004)(53936002)(36756003)(6506007)(25786009)(106356001)(26005)(86612001)(10290500003)(1076002)(68736007)(476003)(6116002)(3846002)(478600001)(5250100002)(11346002)(446003)(72206003)(2501003)(81156014)(81166006)(8676002)(14454004)(102836004)(107886003)(186003)(2616005)(575784001)(97736004)(86362001)(66066001)(305945005)(486006)(8936002)(4326008)(105586002); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0790; 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: BaQravjF4kjC1ajAGDHIH8Pnb/VD4Xj9aoW1KuteJjqW7g8LMND8F8hT8Smpm7bq2HACEri9tgHo2h2NgrIrSGHR6mMmdtv8kwp+uvK58HqVRK7aGYPX6OHwEGCdTqSH6q/0ydtmSpd9ZdEo63FdKWYz3cg6v0mzNh4rnEX+YuGQ3zmPFg9JRLGGRyV/3nC5Ztxh02pSWlbzl0iRnXNvoMhdBpXE/eTTBSBc99VnYiEZvPrqhB/or94M8uzfj5ugZOZIVJf/F/GMYBAZ6dOMWi5hVQ4xKtdW88oKlq3u7lE4OENm4zsqIEqQ+lLiVeTEDMAMnI242kgnY+4ihn1MRQg1FoKp6gaZHyFBGAUGSZs= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 31f0c25b-d7a6-42f3-d7bf-08d61c49f1fa X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Sep 2018 03:01:08.9792 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0790 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 836e0a47b94a..b8ef919daa6b 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -4047,6 +4047,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 aebdf99068e7..299db8b1c9ba 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:01:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 146836 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3287229ljw; Sun, 16 Sep 2018 20:30:31 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda8l2HGrjDyFqv3hLBdf4w4Q3WwAMmH5yRnwSddEEFl009vkEOcQjmSdAxR51gzRk6u7H1v X-Received: by 2002:a62:6f87:: with SMTP id k129-v6mr23670369pfc.26.1537155031106; Sun, 16 Sep 2018 20:30:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537155031; cv=none; d=google.com; s=arc-20160816; b=JQ5OyOvRYHaG6iJpxoz4LyLObCeYQGIRcDIvOzdnQF60EJ/KOl7uqup05q4ttkR23s K3DzdEMEtH/lcuPPzuHg/qq8+dN6OlHnPfoWHumZJqyILmXGSKv2qbzMX4eX3PYPlon4 lhJA93D3LxsYTnXusCZ21dpjdUz9ufWlcWDy2x/6U5NOCoutty7lOEd12bCJ8NbJlpUk gguCL+g2bzXxoGSdxK+1XCvrOomvRRAvAGIcOSEjNnLPR+F6P2A0+Vg0+K0KW2iNdQUw 52p1T6Fuj1VcB0W5m+38d5FKabvxYgCFLXfgpsnugRyuHY664hX0TSQpMSWPPqfi3fEy a2tw== 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=PxVIYrQzmeuxbRdJqexAkcNNJNOyeSDB3AyEVK0Xg1k=; b=OQCJXk2840YZjDURYSbGeiIu+/tJu4PQFVP6HlJp4HBjGI0K8huMe+7LnhTGW8J1vS Ozo8y8Jh3XO79v9bT4Nk2azbZwYGQH2iYRYkOZm6arlT47VsV+VMzSUaXRVM8Jv/miE6 z4FQ0/gQgiZnoQZ7vbrrq5lS8QMkagdQAnUQyVAgD/ItnNtzvBVzaqI/h82Qjp5GtDZL ht04/y9QPOLArJ+Zr/vEncY3tke0OaUbMV3WVtyt+C/OodWJjeIsd4WfkIVlGIRTJLAq ylFZliw5s9JSL7JZw1z8koYqi0IL7GM0kgVxKj8luAfBLhqhgKsKwTd2NVVBrcq9fyD2 JsAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=QnC68U4s; 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 d2-v6si14109304pla.307.2018.09.16.20.30.30; Sun, 16 Sep 2018 20:30:31 -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=QnC68U4s; 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 S1729883AbeIQIzv (ORCPT + 32 others); Mon, 17 Sep 2018 04:55:51 -0400 Received: from mail-by2nam03on0129.outbound.protection.outlook.com ([104.47.42.129]:47904 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729459AbeIQI1y (ORCPT ); Mon, 17 Sep 2018 04:27: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=PxVIYrQzmeuxbRdJqexAkcNNJNOyeSDB3AyEVK0Xg1k=; b=QnC68U4sZoGomTqY0r+kxxCOAhOP2Va07dAMZwA3an9/UfXCxhRL/S0i8tEo1hoC4jw+FDwjqi0CSPBFCHSz02+eC9F43OddvnrRw+pu3dRrLxdTAIS6fO+r0h5eN+HuIPBnrLNd9bFXIaSBaSARPPx+Xez4CKBOsvOLcU0HiFM= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0168.namprd21.prod.outlook.com (10.173.192.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1164.12; Mon, 17 Sep 2018 03:02:38 +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:02:38 +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.18 101/136] arm: dts: mediatek: Add missing cooling device properties for CPUs Thread-Topic: [PATCH AUTOSEL 4.18 101/136] arm: dts: mediatek: Add missing cooling device properties for CPUs Thread-Index: AQHUTjKz5AeCIkCNVUiXWW9FPWUq1Q== Date: Mon, 17 Sep 2018 03:01:16 +0000 Message-ID: <20180917030006.245495-101-alexander.levin@microsoft.com> References: <20180917030006.245495-1-alexander.levin@microsoft.com> In-Reply-To: <20180917030006.245495-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; CY4PR21MB0168; 6:QKulYuiij2MAWDYktvHmzJB1G047Uiiti1hKAwiLBo/Tm9W48KcQlbvyBovwCifkh33sTgA8/qjDYJmkUNGW6lkxZpJCbVhUYv5z6YSZ+gLs9Bv5iKMFUR8riPimaaaiGNTyc7dvHQw1xfYzdqrDh6byxa8hgOlTPi8Z3bi+s5ZxmBxOSekuQjCR92MtL+26rSIxoY6pgU0AIe7kgfpuGmXed8QFEEUT+HS5k8+jQhj8wx3l9/M0seAvFrZhXlcKX69DJtIoknxV9i1nL0PdJVuckJqtGO7ih94KutBjZ+Fy0df21QAUMK+trWjPVaxvTOFFKhUYe3/7lYwvJAHyr4fjo05okSDw3n6DGYDRCSEQU2Dalu9URbBYoJl3U2f+IsDgCLJZ9R8/yDLPwmyUTQc1xRhJ3WmNwLWTvu51/IJcolquAzhdcvLQ7L+5ioh8qy5iRLT+pVaLFx1NENEG9Q==; 5:x+vo7Rge8XaoDAEvPtZa/OFR21f7Qoy9iZKcpJyephMJRYiDeeAjCAOZiroZLZQkvnGOuJ9y10IQlo4G9eByNHsvwsVzong62RVOspVigIAF4JViSuttEolegzMBewVpNI6GDBB27TsWh+q3hbapiZ32RoGwwecNrBt5JKtf3xQ=; 7:GhGNEPJGcjn+OQAkTJTVlnWtyBATwrkZVcNh6EJpCwDxrzUQipon5ALSbEfzMkS4fMqh6B5yNzuxNsFGBRy5PB0GI8jwDwskS5krds1lWuYxNzRjYUeYlrU8C4B/ETN14HXoUidGN6d4z3ZG2GLIKP03OLGw9c9KqF3REEpB1zXkaFGyUryvzNTdVQrnAzMFUFuiKYUJhjmK2Sx57XD+3fjM5XI73iWgbFtCrYrKJuTzjbHJXxfRv6r3feBT65mn x-ms-office365-filtering-correlation-id: 032ec712-468e-4a05-fd20-08d61c4a0677 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:CY4PR21MB0168; x-ms-traffictypediagnostic: CY4PR21MB0168: 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)(5005006)(8121501046)(93006095)(93001095)(3231355)(944501410)(52105095)(2018427008)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123560045)(201708071742011)(7699050)(76991041); SRVR:CY4PR21MB0168; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0168; x-forefront-prvs: 0798146F16 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(376002)(396003)(366004)(39860400002)(346002)(136003)(199004)(189003)(11346002)(4326008)(105586002)(106356001)(486006)(446003)(6436002)(2616005)(22452003)(39060400002)(107886003)(10090500001)(25786009)(476003)(14454004)(110136005)(54906003)(316002)(2906002)(76176011)(99286004)(575784001)(36756003)(186003)(26005)(6346003)(5660300001)(7736002)(305945005)(10290500003)(8676002)(81156014)(81166006)(6486002)(68736007)(6666003)(102836004)(6116002)(3846002)(1076002)(53936002)(217873002)(72206003)(97736004)(6506007)(8936002)(86362001)(256004)(6512007)(2501003)(5250100002)(2900100001)(14444005)(478600001)(66066001)(86612001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0168; 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: 7LRNU6ALZmTvOXL2j5SwrcPxY4RxMneHaF8NH0SF4zA68h4IDhL+avm50/bDORO2yVo6KQrnyP8QUzEnfidhqAexaAVrMARWdE5niKQy8U87qzGhHBIKwe7B1cQR1SkoKP5L1Zssn2Cm0NN2jguzTQLW4IUf8loVtDVdhHrCEGmI0qGbXD8Dh2mDq+hxvFxvxtb2sHDH/n4b2tiapPdVyNkVrVHKalZqwhopIgDoV2dLbRUTPF5nCSRfUjOvnooGV1iUiieKNPgvCSFJPfHG2XruFIedDgTtx4E11xOTg3KAkwkism3U+eU1T3AfVqXopIV8YDK9P5aHUAfcw7hhYlt1mBNwrHHbBSDl5+NK+Nc= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 032ec712-468e-4a05-fd20-08d61c4a0677 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Sep 2018 03:01:16.1666 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0168 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 d1eb123bc73b..1cdc346a05e8 100644 --- a/arch/arm/boot/dts/mt7623.dtsi +++ b/arch/arm/boot/dts/mt7623.dtsi @@ -92,6 +92,7 @@ <&apmixedsys CLK_APMIXED_MAINPLL>; clock-names = "cpu", "intermediate"; operating-points-v2 = <&cpu_opp_table>; + #cooling-cells = <2>; clock-frequency = <1300000000>; }; @@ -103,6 +104,7 @@ <&apmixedsys CLK_APMIXED_MAINPLL>; clock-names = "cpu", "intermediate"; operating-points-v2 = <&cpu_opp_table>; + #cooling-cells = <2>; clock-frequency = <1300000000>; }; @@ -114,6 +116,7 @@ <&apmixedsys CLK_APMIXED_MAINPLL>; clock-names = "cpu", "intermediate"; operating-points-v2 = <&cpu_opp_table>; + #cooling-cells = <2>; clock-frequency = <1300000000>; }; }; From patchwork Mon Sep 17 03:01:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 146825 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3269122ljw; Sun, 16 Sep 2018 20:02:47 -0700 (PDT) X-Google-Smtp-Source: ANB0VdamfkczeyBGttUlz7uKM3AGDZsuQ6GkexAspHDTKCiPUSRlxMKLmwhy9a+nsNnKDdcjajZL X-Received: by 2002:a17:902:d808:: with SMTP id a8-v6mr22885571plz.68.1537153367844; Sun, 16 Sep 2018 20:02:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537153367; cv=none; d=google.com; s=arc-20160816; b=DTcX9Snjo4V6aSZNtEvV0N7S6rwe/jwzaCxyBtUCvq/ZSigbCdrHM0Z+PLTdrkVWcL lwwPd7N0MkB/Bst3DmFBHbGn/WY25s+Km93WfiXvE85XNhqCXWbYVo2Mo5UMkVqYnSI1 8zZHWqmj6KeNsQhWauXoa04OE3pmU1bxRIwVCo/QKQ9e3imTlR56tsuyMzY9U73DFTN6 7v6UtKnnVbzCNJa3qMiZTE7XL1TRz4kIOTvA/ZxAz3WsseOFaJ+X3RTvtcusWn0TQf7i oTwPpS6EEG7qZj1Hmm/j1bTdAsSQlqPpfUBsHjWMBzSOlR6BOZvxp4+viHh+yS9r4ydc T7Lw== 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=wUAtO5HmU3zq4Mt0M3TLFNpDXSLHhruJKi2Dt8IHn7JY9ns0Flb9l0o2VW+7m3j8tp e61eglEfsyfd36J7G6OQ/f2Pze9LCuSMISoqHjIEKl7lPX+Q05W8IqMu3SSejCOjsm62 2zF6rQDBUXbh8H3TiMmjeK8SYIxd5XnIJySw2c/SEntfVzPJ59NZqpHMaYr2gHN22kFq q6iP7ccFSjCb1m+NiawCdqJhx/lBYK1x0WSNV+K9nplGmRxQqqvCGioJ/RuawO1EQIY3 a9k/8KMOaDBtEmky6Gmy6iHdidAYkeHCPGk4mtcc4AwzUdOwxG2gkQ1L2+2QzucS+1bl wK2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=bFh0JjtF; 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 a3-v6si12137378pgq.438.2018.09.16.20.02.47; Sun, 16 Sep 2018 20:02:47 -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=bFh0JjtF; 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 S1729544AbeIQI17 (ORCPT + 32 others); Mon, 17 Sep 2018 04:27:59 -0400 Received: from mail-by2nam03on0117.outbound.protection.outlook.com ([104.47.42.117]:22121 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729493AbeIQI16 (ORCPT ); Mon, 17 Sep 2018 04:27:58 -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=bFh0JjtFyxS8itQbDsyWl6VOYmOve6sBFk1vHNgS2zVmZPzJlaoIAE7ZVngHrJcWJYw+5W9Ic1D3xhDCEjTGTXvqRahZ2UgIi6/AVjwcRgwtpD2SiMRVGWpony9Hlot98zK1OYQo4sFNGzYg1M211l6D5m2PcGGYVzin8qq9N3A= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0168.namprd21.prod.outlook.com (10.173.192.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1164.12; Mon, 17 Sep 2018 03:02:40 +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:02:40 +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.18 104/136] MIPS: boot: fix build rule of vmlinux.its.S Thread-Topic: [PATCH AUTOSEL 4.18 104/136] MIPS: boot: fix build rule of vmlinux.its.S Thread-Index: AQHUTjK0cLS3e4wxGEGLVeIkhuESDQ== Date: Mon, 17 Sep 2018 03:01:17 +0000 Message-ID: <20180917030006.245495-104-alexander.levin@microsoft.com> References: <20180917030006.245495-1-alexander.levin@microsoft.com> In-Reply-To: <20180917030006.245495-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; CY4PR21MB0168; 6:dlsAe/dPzq4A6WkIFs/Bsy5bEz5zHk/MUWsrQ4d/8l3wzRNewzptOZM20UVyIfCiaDuf0omHrs1OSG3nrIVa3cWUjp00PczXvBi1Kj8ejz/eiw5DMXPzNH78oF5drIK9yAlgnaXf/bUNJNiE3fESjQlsrg/1LGosl1pY1WDIzU18A6BptiXCQBqxy9GjvJcqpDTU2VkVdOCNb3S2P42llizDuXMjPrHnM6ixFYrlWUgLpHt3JRk45HjOfhLC6ZW6iKZ9jb9oAzCeRUoEE98HWRPM5i3qbjXXFZ7sm+XsDK1XugGcLGJz4HvnaF8ylFVwHkJxUVNLBcnBPBiVdGv0ZboWRqefqNQ9AdzetR5SjLJ9zON1is802oe6nPKsJtEuoqLCQMtKjWCUnng0SCWD1Kj7F+Z4R9kyKkX6FDMXEegX/5RIpaTfMdX2TF03eTq3rdwPYgcHYcAIZ5UVGCmX/w==; 5:2PrAWWrL87ZN3P7qvVkhmVAYVRTUwxjC1y8zV7MYwBvsp+l5fjvCJ1vV5+4/bh8VXeECncaMK5IZEl9fM9PcZACD5/N2Cue1ndQ5qsS3jp5mEYFtxZK2tPUXCiS81Z3AEdx/gMPeDuITCOm1WwIZwZv5T0jNzJh1qNTnAP/n+wY=; 7:PHeVdf7vqx+0iPhtlnGTLiRlCUGwsVlvW8sQpZWYyzFTRyuwzcwPZDF3Btx4UyWtKj4lEQMa2G0iNE6/lrYgLRtY101GjD9cNnrDl6B7XLxEh2AbarALjgxaY/OiH/vbFX24yKVU21jYbgN3lyjjpVJghCZh5iI1zYYdnggjatg6w3gzuYsiUyrZmjzb67dXyDkNvXpaW5LefQf4WIbO97Adv/ljSh/n6UI0NBwKaN6pVXOkw0LMM4nyETIlvbBV x-ms-office365-filtering-correlation-id: 118095b9-e590-45e8-78cc-08d61c4a0798 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:CY4PR21MB0168; x-ms-traffictypediagnostic: CY4PR21MB0168: 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)(5005006)(8121501046)(93006095)(93001095)(3231355)(944501410)(52105095)(2018427008)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123560045)(201708071742011)(7699050)(76991041); SRVR:CY4PR21MB0168; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0168; x-forefront-prvs: 0798146F16 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(376002)(396003)(366004)(39860400002)(346002)(136003)(199004)(189003)(11346002)(4326008)(105586002)(106356001)(486006)(446003)(6436002)(2616005)(22452003)(966005)(107886003)(10090500001)(25786009)(476003)(14454004)(110136005)(54906003)(316002)(2906002)(76176011)(99286004)(36756003)(186003)(26005)(6346003)(5660300001)(7736002)(305945005)(10290500003)(8676002)(81156014)(81166006)(6486002)(68736007)(6666003)(102836004)(6116002)(3846002)(1076002)(53936002)(217873002)(72206003)(97736004)(6506007)(8936002)(86362001)(256004)(6306002)(6512007)(2501003)(5250100002)(2900100001)(478600001)(66066001)(86612001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0168; 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: BUD1wzWl4hBq65wV2FiEYf2zB9slsjPjm3nUoZO8aSpKhhOXFnIO+i2fIUcBPAKLXQzYgbTsNPID5MXdO5FGLq2os7P1JGRfk6C90qduh8xnL4s9Lqfho4yjzacqV5M87JtDKARKoTIWbFLXup5EVZjvBhKf1BcAyEQq0N6NXEmwWDcI6wXdHNK6Aq909OqMjXYbgOEEETN7TIF1xUZJQiDMPwSoE/pUPQW4VjDH3y9cawwq8hTx/PK4U0gLflBJX7XvzQWjXEz4ZLeUUZnz9potRKbS7wOmupRe98aUIbB7CTV1vaRpooNmyrEDZVDSzxe8ALLP8G+hwCEzIYfcOXusVmGyF2YnzLdB/z/HRiY= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 118095b9-e590-45e8-78cc-08d61c4a0798 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Sep 2018 03:01:17.9947 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0168 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 $@