Received: by 10.213.65.68 with SMTP id h4csp1680829imn; Mon, 19 Mar 2018 10:23:25 -0700 (PDT) X-Google-Smtp-Source: AG47ELuDaGpc2/iOhWFBjhqruWwO06ySVTzoTSLAsCEHCEawVnq75qff+DGIE1+sxje6hNF4To0D X-Received: by 2002:a17:902:8c91:: with SMTP id t17-v6mr13359206plo.233.1521480205920; Mon, 19 Mar 2018 10:23:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521480205; cv=none; d=google.com; s=arc-20160816; b=sZAwZFr1uiSh8jAuwRUEcbMvQMiAYNl7wmEraHAJE+CxN5HJ9qznPEsCLpPBphgTVE Yc21Skux8EAWCZPDH48p1EiWOKGEpgCuadfGey49tHDsZP5isqf7DmZ0SyAUJaPoa5vQ 4xBhEHb2X6rliiRlx8zyKHPueanJG0LmkMP62Ak4go1ElvBmFoB1EGOTd/ceaKJQPoKq Atw55X62LjzUwhMyjUJ5WHb2NV3jYCFD8tYAFhbUsE9syGca1IOFxZuLsCNN+nXuY6AR NF0If05Nv7E/Oopn60fjdw/SnAxET8X5ReOfDK+66ybTiiyWUv7GFY/ecD5rZaR+dRmL pisQ== 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 :arc-authentication-results; bh=xNiJbWYAQYmeRsDdeRJ8nhzpU4oLvJfd+P/XBk080Xs=; b=ru+rD5QMJXBA1/VYy3Nt9o8d6VvIu/5Trz4ron9Bxki6LGccS+al9DRmRGCxvaye0K APFEDaq19oDuQaz2GkFRYVVOHkdvMfzwMDYngBtCZldYXikxOKuc4PDHOqWvgsu109wU Z5Z7U0EGy0Zc2kcoBEZU/ZaRErM6M6XRvdYqTPZhw4o0eT5pEasoSrxy+ZvwnegpQJ+Y vfN+e1D0wwtmFtGdiHSDreN1G20aah3pr4IRpTIG8oS/e6KmMKgRUfReUzVuJkQdtZCy qPDi/7noxxi1dDpNXCfuSGpZBOpUtv2j0hQEKuPuFuye6Z1XGOEsUgoVgceqfL1micQC +oBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=gP7jgAed; 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 t9si279560pfh.101.2018.03.19.10.23.11; Mon, 19 Mar 2018 10:23:25 -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=gP7jgAed; 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 S965834AbeCSQJC (ORCPT + 99 others); Mon, 19 Mar 2018 12:09:02 -0400 Received: from mail-by2nam01on0120.outbound.protection.outlook.com ([104.47.34.120]:3328 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S966300AbeCSQI3 (ORCPT ); Mon, 19 Mar 2018 12:08: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; bh=xNiJbWYAQYmeRsDdeRJ8nhzpU4oLvJfd+P/XBk080Xs=; b=gP7jgAed+k16kOb/ULqS/l6x0p9wu951SOjLMJH3GQRTxj/wYvGQgcmGjYIxeVrIOf7K8oBngpBz1yApVfJM4ciBuoWy3F4E00PG+5GFttHWcshve9YEIlaMUBxPcn+NLAdqPRRy/+SuCw3r1BTfo362RDDErb2I8KS0AfXSOes= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1094.namprd21.prod.outlook.com (52.132.130.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.631.0; Mon, 19 Mar 2018 16:08:20 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62%5]) with mapi id 15.20.0631.004; Mon, 19 Mar 2018 16:08:20 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Michael Ellerman , Sasha Levin Subject: [PATCH AUTOSEL for 4.4 054/167] selftests/powerpc: Fix TM resched DSCR test with some compilers Thread-Topic: [PATCH AUTOSEL for 4.4 054/167] selftests/powerpc: Fix TM resched DSCR test with some compilers Thread-Index: AQHTv5w8HXaldXpgBESwNOXfz6KagA== Date: Mon, 19 Mar 2018 16:06:28 +0000 Message-ID: <20180319160513.16384-54-alexander.levin@microsoft.com> References: <20180319160513.16384-1-alexander.levin@microsoft.com> In-Reply-To: <20180319160513.16384-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;DM5PR2101MB1094;7:frvVdBLAm2PB4N++dqKKpvlCGXR03gBFaVFtFh686AbxRkEQiuUIr+ZTCW5L26PBzkFNWjETdfaijXuIQltOxdOBFHi/BeOEMO70c5owS0qf6HHYW9bP2LOJscScnZ8eGt1wT5wjSpmFTk+IK/0UTBdoaGdSkhYxxNrL8UHoUjdymg6a6yJuBNUey0wCBiOEx9U6wTTN0EW7jridyHQTK97GeU+13b6M1YEjBUfJipC3eN1PcJqxcyBBKCvvERX8;20:z0BFaxVOWHea6U+ylpgDINiH3RXmBwxTMNT6VxFxm9293piOzhBh5W3FRTDOOTTsNj0SC+KCHY8IZUuXzwLXFl/SqvsmCDx7NVuK7lclYGhCGUlrS7G26jq+CwZQ4oRx5T0H0k9R2UE5TC67/IpBm3oBBBWbq4Zi/jqRwUODonw= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 06237dcd-eac1-49cf-8b17-08d58db3a280 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1094; x-ms-traffictypediagnostic: DM5PR2101MB1094: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501300)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:DM5PR2101MB1094;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1094; x-forefront-prvs: 06167FAD59 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(39860400002)(366004)(396003)(376002)(39380400002)(199004)(189003)(106356001)(10290500003)(110136005)(22452003)(3280700002)(478600001)(54906003)(2906002)(551934003)(2900100001)(2950100002)(10090500001)(186003)(26005)(97736004)(5660300001)(72206003)(66066001)(107886003)(102836004)(53936002)(59450400001)(6506007)(6512007)(316002)(7736002)(305945005)(1076002)(6436002)(36756003)(3846002)(6116002)(6486002)(105586002)(8676002)(8936002)(86612001)(68736007)(3660700001)(86362001)(575784001)(81166006)(81156014)(25786009)(2501003)(4326008)(76176011)(5250100002)(14454004)(99286004)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1094;H:DM5PR2101MB1032.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) x-microsoft-antispam-message-info: C4kUrMUNFxJO8JqVZD0rM4SE2T4wjtRf3cc6VWaZiol3CPNzNHI9p5f5FSUT1pl0GQ+95sSdhQAY5QtesBCdnJgXXSgkUfmZ1gZ0uHBxc6pq891bzs3BjEQJMj0IXNfIFYSySz5dMzx34YAJO/cMn4VXG0Pobaj0lCz5nGNbDZ+KouQJS5XpOzPevXR7+mogs90rIuUnQE6JIrVvWNdqrHeh7Mi4u9kU8ESPYe+RcwLihMksCr5/ZERTaGO6El0F0i8SrqO4s0C6abzIdwlG9xuFfExDqAq4vsKr8aExBRCxCBVGS0t1d4XrsZ7lB6yiDftnITiOVlpB75f3Vu9TQA== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 06237dcd-eac1-49cf-8b17-08d58db3a280 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2018 16:06:28.0570 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1094 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michael Ellerman [ Upstream commit fe06fe860250a4f01d0eaf70a2563b1997174a74 ] The tm-resched-dscr test has started failing sometimes, depending on what compiler it's built with, eg: test: tm_resched_dscr Check DSCR TM context switch: tm-resched-dscr: tm-resched-dscr.c:76: test= _body: Assertion `rv' failed. !! child died by signal 6 When it fails we see that the compiler doesn't initialise rv to 1 before entering the inline asm block. Although that's counter intuitive, it is allowed because we tell the compiler that the inline asm will write to rv (using "=3Dr"), meaning the original value is irrelevant. Marking it as a read/write parameter would presumably work, but it seems simpler to fix it by setting the initial value of rv in the inline asm. Fixes: 96d016108640 ("powerpc: Correct DSCR during TM context switch") Signed-off-by: Michael Ellerman Acked-by: Michael Neuling Signed-off-by: Sasha Levin --- tools/testing/selftests/powerpc/tm/tm-resched-dscr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/powerpc/tm/tm-resched-dscr.c b/tools/t= esting/selftests/powerpc/tm/tm-resched-dscr.c index 42d4c8caad81..de8dc82e2567 100644 --- a/tools/testing/selftests/powerpc/tm/tm-resched-dscr.c +++ b/tools/testing/selftests/powerpc/tm/tm-resched-dscr.c @@ -45,12 +45,12 @@ int test_body(void) printf("Check DSCR TM context switch: "); fflush(stdout); for (;;) { - rv =3D 1; asm __volatile__ ( /* set a known value into the DSCR */ "ld 3, %[dscr1];" "mtspr %[sprn_dscr], 3;" =20 + "li %[rv], 1;" /* start and suspend a transaction */ TBEGIN "beq 1f;" --=20 2.14.1