From patchwork Sat Sep 15 01:30:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 146740 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1311234ljw; Fri, 14 Sep 2018 18:31:33 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaOc6KzpdtsgBBShaLhwgwTUwgvX1d8iaskccqbn5UPAlHs/Pkclzq6pKECTzsNif3ZU6Lj X-Received: by 2002:a17:902:4601:: with SMTP id o1-v6mr14658233pld.202.1536975093044; Fri, 14 Sep 2018 18:31:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536975093; cv=none; d=google.com; s=arc-20160816; b=xfuFFKtwYGIga3K87hNnZgbcNLKLS3Wy4hq6dNe+y0zd3fEWdz7UII+6+tKmu+ntqN Kgioj9PAVveQxMoQcFFf9SVrHVKzC6qxg1sAC8Sp+dPrXwwWADmCSTNPMCLTYn5NNyi2 TyP3DqGYPXAPw6OjBLA0I42ToXrj4ntlTwUZMul5xGoQwdnKwWgZtBbaEWpGlIaRiZ19 pPIam4WZ234J9RwqRT/Oim/9Yji72huUQm38C9UrgbkTvcFKPi4+kzOWYiXjqYzwASdz gvrdYf2kVbAvosS281wWdJi8IsJZn4J57BFTjjKCX/YicHtxo7BMXjN+h0wKYxl0E1r+ MzSQ== 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=Syb++/azLVlLREBVeFeTRDadf0WvnsJs4n9FENSk8IQ=; b=RVlnjPEh8MorYUp5zNX5CHwmGE/izDQGlDP2EFnxn7nNRRkSJr+O6LdXDNFFCQELNF DRwbOoSXOHjE2gMbEDFaX+qqS3rnVr5bI5t6+rfaI63w2mjRIspUfWB9q5sG6S+7EUx2 PTzC9UfYpIfZm7oJkPhviKKdAQV/FiaU+S9990w/MV+IVdGoq97pMQur9Z2l2cb4MvBd WbIl8dubzpsL1cvtXJOAtgLGQZ9qox2ua2nKUORQA/jWKEf0Fm61PS1OIIVAPmHpVHNo aDKJsOGu4Ivc0reXa834hQvNqU4d1oDalvWh2n53GjVniX4EZIkAf7KinVaF3OT5/lft Z13w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=SEyv0o+n; 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 t89-v6si8616552pfe.59.2018.09.14.18.31.32; Fri, 14 Sep 2018 18:31:33 -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=SEyv0o+n; 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 S1728715AbeIOGs2 (ORCPT + 32 others); Sat, 15 Sep 2018 02:48:28 -0400 Received: from mail-cys01nam02on0090.outbound.protection.outlook.com ([104.47.37.90]:32953 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728584AbeIOGsC (ORCPT ); Sat, 15 Sep 2018 02:48:02 -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=Syb++/azLVlLREBVeFeTRDadf0WvnsJs4n9FENSk8IQ=; b=SEyv0o+nOZ8NWO3cFFJbEtmki275dy9Da5ejVT/D7ufOWqBRBc9PwXxSI3eGLtpg/TPGBHJg1MhpkyTeCm78lz3SSUkMnLVpOyT35/yQYqZqzllqzHbfI44OtmbRi4BkFUh2rUlgkR70+OH5QMBlWE6R6d321aRmu+qJ0enY5bw= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0741.namprd21.prod.outlook.com (10.173.189.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1164.11; Sat, 15 Sep 2018 01:30:58 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::151:b6fe:32c8:cccd]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::151:b6fe:32c8:cccd%9]) with mapi id 15.20.1164.008; Sat, 15 Sep 2018 01:30:58 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Linus Walleij , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL 4.18 59/92] net: gemini: Allow multiple ports to instantiate Thread-Topic: [PATCH AUTOSEL 4.18 59/92] net: gemini: Allow multiple ports to instantiate Thread-Index: AQHUTJOwJfiEfbvox0SRNTDASpGt/w== Date: Sat, 15 Sep 2018 01:30:30 +0000 Message-ID: <20180915012944.179481-58-alexander.levin@microsoft.com> References: <20180915012944.179481-1-alexander.levin@microsoft.com> In-Reply-To: <20180915012944.179481-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; CY4PR21MB0741; 6:0QK4IoT8CFWQHm9joxu/4oElwSS5sOrO58vDQIdcy6J//eJu2KsafQrFCFv+OfSlZB8ljiNpJCmhxtdwm5am8Xrg6Jn/9VdwhLoGvPzo1ZvhEp7rPmziwwRq6ZLkTPWn7gNAYks6fqMt4TxZXHZKHovyzALt3L2mO63oJjEW8KYu/lyeyqGMvsqa195dMepwYqYzNYcbRyfDitP7Ret6PutadA1uUqkMEE4td9WhBuJxuXxS7jjD6UoBb95asZL+3IzFOkFnM7Nf2alGi/+YeLyCi6SrOBjHIdfu5kjm4VF8QiuACp4R/pZjRquy6zkitcD539uZS5y1vsCIbECFs8VFx3/SrjsY1UhDaDC2Se8l7cu2XMicHXYgMKqPjps9OCPWychr9c9qu88zYlUe9ysTYbiAMq3buQVzPB5G09osvdXmD+MyT2VVYDa/WZwOiWJPdZRBgPOlFx4O9zPUzQ==; 5:T3+6zfKCpZaLcO5aAPiHQQ5qGs9QoGbn5GFEBLnhDaUwmBgjXfPvnlitt26wpzI8NpjRn2eFZ16LRuzG05eXxMuWqzuwSmCVrRduysXaogmAB+Hw9Z1HxpFxnrn03bfnuhwYTi1rmV957b2AxWetyDkONicUvdlC36ihZhjKcXk=; 7:BKr8PRalYrZ52OEDDURRV0zjFpcMfs24UDRxYCvWjobqPTZQxfouDVdIyRUq6WRnDuWG3zzPCg3TyLTHHx9yngNt0VAhC7GzhDwE1HHdFNClovycGMSlEwVJuk2PRFvgr+GpAEFWzWr4gOWFc2dFaotZl+okcxwZu1pnGo/PjsK0M1KZ12ydiQ9a0uWBhAa05agwo2d/H92LnLMd7rDbLScQg0ugXYxm/rNRgAvYbMk6/exBHRNd4bBXNvyyM69p x-ms-office365-filtering-correlation-id: db86a5a0-b88c-4b66-7647-08d61aaae37d 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:CY4PR21MB0741; x-ms-traffictypediagnostic: CY4PR21MB0741: 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)(3231353)(944501410)(52105095)(2018427008)(93006095)(93001095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(201708071742011)(7699050)(76991041); SRVR:CY4PR21MB0741; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0741; x-forefront-prvs: 0796EBEDE1 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(136003)(366004)(376002)(396003)(346002)(189003)(199004)(186003)(106356001)(25786009)(6346003)(6486002)(6436002)(476003)(102836004)(11346002)(5660300001)(2616005)(26005)(217873002)(105586002)(486006)(446003)(4326008)(53936002)(5250100002)(14454004)(10090500001)(14444005)(2900100001)(256004)(6666003)(2501003)(10290500003)(6512007)(22452003)(72206003)(8676002)(478600001)(110136005)(97736004)(68736007)(66066001)(81156014)(81166006)(2906002)(99286004)(86362001)(86612001)(6506007)(76176011)(8936002)(6116002)(3846002)(1076002)(54906003)(305945005)(36756003)(7736002)(316002)(107886003); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0741; 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) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: 0Z4KCftOL9KrBUcTYaUvn1McLpSlOBg8etb7ljJ55LqD+IaCD92HkTgPlQC+7qfzK4MQ6UdT3Hj3sfAdksk0vrWdRg6Qe9oy31AQzAB+QJTIBtK3Or+5TrP++nHdBKzcEVpH9GjJsebm52lFKLoJSKxUV8zoIe7nbhdf0IXEOky4Gg18lxoENO6i22Cp5//OHXbyIxg4T9bKIRVH9l1biVtfOQGrLUhdof1DoY7iGkdN2RYqZYrsSvEfKW4/I/svrBeE3oZDN57l9uvMWJTqWATmGIIshKEzcppslfyHT28BO/a5OHy6hRvMb/oOOWZnO9YkNAMX17jaj+tAVfuV8J+gDcytjXgFjW044Bdpu/o= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: db86a5a0-b88c-4b66-7647-08d61aaae37d X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Sep 2018 01:30:30.9793 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0741 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Linus Walleij [ Upstream commit 60cc7767b901dd1e3f70755c3d2505556ba487c2 ] The code was not tested with two ports actually in use at the same time. (I blame this on lack of actual hardware using that feature.) Now after locating a system using both ports, add necessary fix to make both ports come up. Signed-off-by: Linus Walleij Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/cortina/gemini.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/net/ethernet/cortina/gemini.c b/drivers/net/ethernet/cortina/gemini.c index 6d7404f66f84..c9a061e707c4 100644 --- a/drivers/net/ethernet/cortina/gemini.c +++ b/drivers/net/ethernet/cortina/gemini.c @@ -1753,7 +1753,10 @@ static int gmac_open(struct net_device *netdev) phy_start(netdev->phydev); err = geth_resize_freeq(port); - if (err) { + /* It's fine if it's just busy, the other port has set up + * the freeq in that case. + */ + if (err && (err != -EBUSY)) { netdev_err(netdev, "could not resize freeq\n"); goto err_stop_phy; } From patchwork Sat Sep 15 01:30: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: 146739 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1310930ljw; Fri, 14 Sep 2018 18:31:10 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZfX4IkaIue2FjTIwj/1W2wMaoRiSuOIgyKOn9xXRIKK4AjjIIwypiw1en0GWBb+kOMfFCf X-Received: by 2002:a17:902:292b:: with SMTP id g40-v6mr14367490plb.223.1536975070143; Fri, 14 Sep 2018 18:31:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536975070; cv=none; d=google.com; s=arc-20160816; b=arqw1Nm7w/P1sO6X4klUXSuxnHWPlGN2BuGVZyMOngWr3MxYWZYqk3vA7QbBb402jC vTotcu5ZEQiBzb6YD7VlJLyAdgiXUoRxZhijGW/15rVYTnv2rLwJIMHvb5ahbwAcjkMJ /Tr3FKPm8uokE0uFhZSMudTD7tqChcjoyw6b9NXsyBD7HuiszO9c1fdbZSsBmxX9rWar gDX3Vn8oZqchULHbEdYzzvxkJ/tLd7tgdwHGk0xl6I5okErWVEdompN9vz4u/uuVYEp3 6IzdBPhIX5BvmrqzvLtmxIjYnP/i2AQqxZxJ7VKe5Dz3cwx92Ucb1RNIhNOiV5/xzcp7 HHhQ== 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=MHBJB7WHeIUPgb2pxzBz0KFtSz5Uo73m3jnRjLsGat0=; b=z1afz6xu6qL2754IJzQlwEzF+HnUTdXORh+WSlKaBdV504mlLw0H/l2NxguA7Clbsz bNSyVpWoLuYyXF6BGIsgOPD8poMt+hzchOoDTbkWIZeADCdXbQNwRWhAVgEwMMZoq8ms CdbEqblR27f/DGu0TQP8tBkwzng91ukxM1daucmmaq4eJFlMRQYSsZzeTB7mYpwSTb1r q4SwalzdOlcOGahNyS668pElOVdrv8rsW0xa1SvgJHN4+zHpX3ZImMULYNMTQzNdSjGX uElDyEs2gjRUDcKeHCvxFRMq07qd3yJZ7Bat3gThs4af8BnpdtPyuzJIYKT+8/MW8J3O NkYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=VFkaXQyT; 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 m18-v6si8641704pgb.136.2018.09.14.18.31.09; Fri, 14 Sep 2018 18:31:10 -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=VFkaXQyT; 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 S1728687AbeIOGsF (ORCPT + 32 others); Sat, 15 Sep 2018 02:48:05 -0400 Received: from mail-cys01nam02on0123.outbound.protection.outlook.com ([104.47.37.123]:39088 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726216AbeIOGsE (ORCPT ); Sat, 15 Sep 2018 02:48:04 -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=MHBJB7WHeIUPgb2pxzBz0KFtSz5Uo73m3jnRjLsGat0=; b=VFkaXQyTsqHmVOypXfw5EtvukkjDYY2vg6EdkuKDpzsZ8r6dbGXs8Bfk0zMohg4XtNgtOEaNABOIaW1tIEUTLZNenkbDo93KHs2HXkw9GQQr1mKIZbLW7oHMEd4wcxie0pWokvmu60wdGnAWWPKYkUeSB0RPD2vMq9A1uUJPzQs= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0741.namprd21.prod.outlook.com (10.173.189.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1164.11; Sat, 15 Sep 2018 01:30:59 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::151:b6fe:32c8:cccd]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::151:b6fe:32c8:cccd%9]) with mapi id 15.20.1164.008; Sat, 15 Sep 2018 01:30:59 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Arnd Bergmann , "Paul E . McKenney" , Sasha Levin Subject: [PATCH AUTOSEL 4.18 61/92] rcutorture: Use monotonic timestamp for stall detection Thread-Topic: [PATCH AUTOSEL 4.18 61/92] rcutorture: Use monotonic timestamp for stall detection Thread-Index: AQHUTJOxPbaLDJQmX0y3RNAUxl+7kw== Date: Sat, 15 Sep 2018 01:30:32 +0000 Message-ID: <20180915012944.179481-60-alexander.levin@microsoft.com> References: <20180915012944.179481-1-alexander.levin@microsoft.com> In-Reply-To: <20180915012944.179481-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; CY4PR21MB0741; 6:DAIG7fRoHRLtVebqVGliTKaz8F6wlIShkG+qS6F2V9Gfi/J7v1R2t3aGfRn1xLWOfGNfESxR/eLx/GNVwImHEWyJlAHeASubsPRH6Ce412vkNrW6aQ4pSF4z22OKzJ/x/khh20IfzeSxhEGKkUqqK3tKURpVlc97jlLpB2F1YbBltX1LtqJZlfedhJZ2ec1dnMHkyF0yKnT01+6fSEf/9qg/07WskRF2kSMbFDIG36GSHRqYr/8mAXpDiyTIIhhlOdNBcAepg96iauD7JZfDuXiULo6mampgwK85Yg8Elbkls/3Z3kvzhI+VClaCkR9imQ7j5vmSpo7FX+Dp65qURPXG8JWgfkFEcTpnII6/OpJrXK+3UV2QpScDPO0p4I3T5mYe8kfZdC+1LAzqfXlTHX+OK8L/d5ZlDz8WAOw5HCG22qOLgNpuRnoa/fDYTOGB5PzInS9Vt29sBwdYTcrcvQ==; 5:kUGfFP6Vc7fB8TezP3dVIGEs0USRYymCJgCTP88O1xKV8KTjTxbkDyV8futYYcqHgnEhlpYmpW02EP98/nithYD2P3yxXnIdmsBtbN/TT13bp6bsQNmcH8J9XgiWptzhpHZjD+ib8ykjjFHXn5btr2Oq+vZCbSRz6jLyCL4xwrQ=; 7:PUQoLvVXaL0vnQVAYts61ToEv79fIyEBB/oPkh/TSJk6IiJGubfC6CqcU4EL+dI83T7eweVM4xLRoBhhnHk6BcMOD1ok1YDWsp0T/D4vH1TptGsXm9xnU8Gqsu4B//WqEBl44GMParmsrSZOVZtEjum/siMEDKxSXqh4IlMh0LrhLXYgGKLGBJooloRBS5ty4fnQraVvrG3OljYSpOMk+L9jE3LyLvSjwTUA80+tYDKAnIlYeG91kI/jW2UBv6uo x-ms-office365-filtering-correlation-id: da7f37a8-6220-4517-cce9-08d61aaae477 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:CY4PR21MB0741; x-ms-traffictypediagnostic: CY4PR21MB0741: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(104084551191319); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231353)(944501410)(52105095)(2018427008)(93006095)(93001095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(201708071742011)(7699050)(76991041); SRVR:CY4PR21MB0741; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0741; x-forefront-prvs: 0796EBEDE1 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(136003)(366004)(376002)(396003)(346002)(189003)(199004)(186003)(106356001)(25786009)(6346003)(6486002)(6436002)(476003)(102836004)(11346002)(5660300001)(2616005)(26005)(217873002)(105586002)(486006)(446003)(4326008)(53936002)(5250100002)(14454004)(10090500001)(14444005)(2900100001)(256004)(6666003)(2501003)(10290500003)(6512007)(22452003)(72206003)(8676002)(478600001)(110136005)(97736004)(68736007)(66066001)(81156014)(81166006)(2906002)(99286004)(86362001)(86612001)(6506007)(76176011)(8936002)(6116002)(3846002)(1076002)(54906003)(305945005)(36756003)(7736002)(316002)(107886003); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0741; 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) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: JrH3tDxvr8K+KzQV/fPQCJO39kPSUFDjgcdKTof0iqPf47cgov5cE0jHkcFB8LXzVErYW3oeT3dpJSma2bKnXCJYjv63vxXVXdgbpJd7n1uD6sC2OwFESHp64/1id1PXexZ5abKdg/7a/TerRxR0/ytpR+awNNbBugjxbxrDUcGUZtxClQFM+wjFLDhFi7o1v4Ln8fK7LE60y61zVUuRfUESXkCXDPqbrhtteN2FtVFOLQP0UDbITnB1zKXjfsAewI5sVrST9Y+qW5wGs+BoczvmYqZz+snNUtFopwea679a9ucNA7xioCoUvrP1EncZOESKWKtRtK6m9cibP8VBXyU2CT5VUyWfcAuXcKBCXWQ= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: da7f37a8-6220-4517-cce9-08d61aaae477 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Sep 2018 01:30:32.1980 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0741 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 622be33fcbc93e9b672b99ed338369eb5e843ac3 ] The get_seconds() call is deprecated because it overflows on 32-bit architectures. The algorithm in rcu_torture_stall() can deal with the overflow, but another problem here is that using a CLOCK_REALTIME stamp can lead to a false-positive stall warning when a settimeofday() happens concurrently. Using ktime_get_seconds() instead avoids those issues and will never overflow. The added cast to 'unsigned long' however is necessary to make ULONG_CMP_LT() work correctly. Signed-off-by: Arnd Bergmann Signed-off-by: Paul E. McKenney Signed-off-by: Sasha Levin --- kernel/rcu/rcutorture.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index 42fcb7f05fac..f42cf69ef539 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c @@ -1446,7 +1446,7 @@ static int rcu_torture_stall(void *args) VERBOSE_TOROUT_STRING("rcu_torture_stall end holdoff"); } if (!kthread_should_stop()) { - stop_at = get_seconds() + stall_cpu; + stop_at = ktime_get_seconds() + stall_cpu; /* RCU CPU stall is expected behavior in following code. */ rcu_read_lock(); if (stall_cpu_irqsoff) @@ -1455,7 +1455,8 @@ static int rcu_torture_stall(void *args) preempt_disable(); pr_alert("rcu_torture_stall start on CPU %d.\n", smp_processor_id()); - while (ULONG_CMP_LT(get_seconds(), stop_at)) + while (ULONG_CMP_LT((unsigned long)ktime_get_seconds(), + stop_at)) continue; /* Induce RCU CPU stall warning. */ if (stall_cpu_irqsoff) local_irq_enable();