From patchwork Thu Jan 18 21:02:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 125053 Delivered-To: patch@linaro.org Received: by 10.46.64.27 with SMTP id n27csp298134lja; Thu, 18 Jan 2018 13:08:40 -0800 (PST) X-Google-Smtp-Source: ACJfBoty5sSbaHVDzj/nUq6xQeKWLYLvKemzWU7gIIBmiTn9zCoozC80GOL4aa+SqwFQD83IqB8R X-Received: by 10.98.215.70 with SMTP id v6mr16139956pfl.83.1516309720213; Thu, 18 Jan 2018 13:08:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516309720; cv=none; d=google.com; s=arc-20160816; b=e03sYfHGYQpRHK/N9UF2OFJj6wCuxUAx7nVHjmrXUuTboVCZf1k9MJjvpuyKqVVuog LgN4bl8eall7A9Ljw0Dw5GSWEwJansAiWQEaNNsZIEUTch1ftogir76EPrFIpoqQlMd0 Bda1TOeRmIyvwNYfSH6Hwandew2gAa00QiD+lZUDTupGLJfKPVY5NEQIcu4G2O/lPjHr /327jyTNylTQRN7vguj9hFOaPc3miU+IUMTo8/MI35+utx8496ODdJzMDgeiVcmts7yQ O9odNQzFSyF8KRwfPktZ1W/mIm9eiNLsgfvWdxI/aGSaRE06IYAJzaw75A5Q4eBoSZsz x3gQ== 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=DSCMjH3w88Qf23do7+H4yFMQWcHgaS+kXt7532pFTKE=; b=zAbErQYbTUE5ntwkLSfafjQiOhHRJS0mi0TxDbW34qKMnCl7Ry5r12oda95hsEk+Jj SyIexZFaTtQasrE5r9mjLQ0WE537yi0uH1S/F4XBZSe6n9DNVqdRnm7U2p9/WKU7XRQ0 cGXyrIUpyTow6L5Eo9dhGaDh2YuK6Cgxxwgk2khSzUyZKvtRQOhjVwrwa+X6ygg2V+1+ MgP6y8l20EybFN2AwU6czB0n+9rP2ZfTwU5Y012qnJgr3IM3i+Rlh3vYYs26bG/eYOmt lNjfksi4k2EjupH8n4ZpuIpXueV/dn9F7kpEMsi4yQz3cj5iZSarEr5155DwTNgwHfdv qEAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=WxAHYXR9; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; 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 i1si6559673pgq.829.2018.01.18.13.08.39; Thu, 18 Jan 2018 13:08:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=WxAHYXR9; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750977AbeARVIj (ORCPT + 10 others); Thu, 18 Jan 2018 16:08:39 -0500 Received: from mail-co1nam03on0096.outbound.protection.outlook.com ([104.47.40.96]:4313 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932138AbeARVHX (ORCPT ); Thu, 18 Jan 2018 16:07:23 -0500 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=DSCMjH3w88Qf23do7+H4yFMQWcHgaS+kXt7532pFTKE=; b=WxAHYXR9LmGNBrQjyVJ1rR1mfDjrVQhpE/QdQBiZ+X0cdUvbnxknnOADLu4eXwNljcoyBjGvRDbuzIL/3UXfp2yKHMFRtHq/3nIzprycbeEE2Q5YBKJ0WcV7cErN9lz6bXdm9p9FYEzlXZ8aejs5lqmHNzaYju8l8KN29oQAJZ8= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0885.namprd21.prod.outlook.com (52.132.132.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.428.9; Thu, 18 Jan 2018 21:07:10 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::6485:b98:d15e:9da7]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::6485:b98:d15e:9da7%2]) with mapi id 15.20.0428.008; Thu, 18 Jan 2018 21:07:10 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "stable-commits@vger.kernel.org" CC: Arnd Bergmann , Linus Walleij , Sasha Levin Subject: [added to the 4.1 stable tree] ARM: ux500: fix prcmu_is_cpu_in_wfi() calculation Thread-Topic: [added to the 4.1 stable tree] ARM: ux500: fix prcmu_is_cpu_in_wfi() calculation Thread-Index: AQHTkJ+W7cxjv2S1GUmEZ36Fas5sxA== Date: Thu, 18 Jan 2018 21:02:02 +0000 Message-ID: <20180118205908.3220-295-alexander.levin@microsoft.com> References: <20180118205908.3220-1-alexander.levin@microsoft.com> In-Reply-To: <20180118205908.3220-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [167.220.60.9] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB0885; 7:u8bjGCHcoYcZzHh4tK1IReetFR2A/J14WB4oZyZ/DyqLp+2YV0MBptTWrGTBpfO0m6tlODZVm9E0X6cRsLZ0Wv5cfI/SZBkKP0CPNZsOv114QYS+GdIoG60OvW+O7DZE2c7sB5NzYaKx9tOx6R3q6NejlYKJ7MHQ0VdlMrKF0c5vF5d5Oq4fg7B5+633oe4V2Aw8rHhheBg2votfbqgqwPNgkE+vfGMQQgCRumkLLMBicwMmmvOqyv0Kra9d/Rgd x-ms-office365-filtering-correlation-id: f833108f-b070-43cf-962a-08d55eb77079 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(3008032)(4534125)(4602075)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603307)(7193020); SRVR:DM5PR2101MB0885; x-ms-traffictypediagnostic: DM5PR2101MB0885: 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:(61425038)(6040495)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231046)(2400067)(944501161)(6055026)(61426038)(61427038)(6041282)(20161123564045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:DM5PR2101MB0885; BCL:0; PCL:0; RULEID:(100000803126)(100110400120); SRVR:DM5PR2101MB0885; x-forefront-prvs: 05568D1FF7 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(346002)(39860400002)(39380400002)(376002)(366004)(199004)(189003)(316002)(76176011)(106356001)(8676002)(8936002)(3660700001)(6506007)(25786009)(105586002)(14454004)(68736007)(3280700002)(36756003)(2501003)(110136005)(54906003)(81166006)(81156014)(5250100002)(6486002)(26005)(305945005)(7736002)(478600001)(99286004)(102836004)(6666003)(2950100002)(59450400001)(66066001)(3846002)(10090500001)(22452003)(86612001)(2906002)(1076002)(10290500003)(5660300001)(6116002)(575784001)(86362001)(2900100001)(107886003)(6512007)(6436002)(97736004)(4326008)(53936002)(72206003)(22906009); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB0885; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: gFnfGtHJOKKhbnZyHKZ+L7P3SIoLoyr4Uzik/9m0CIs20CipQGLqQPYW0ds12kU+IWjOe9E4F/k+NmZ1/JN42w== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: f833108f-b070-43cf-962a-08d55eb77079 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jan 2018 21:02:02.8204 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0885 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann This patch has been added to the stable tree. If you have any objections, please let us know. -- 2.11.0 =============== [ Upstream commit f0e8faa7a5e894b0fc99d24be1b18685a92ea466 ] This function clearly never worked and always returns true, as pointed out by gcc-7: arch/arm/mach-ux500/pm.c: In function 'prcmu_is_cpu_in_wfi': arch/arm/mach-ux500/pm.c:137:212: error: ?: using integer constants in boolean context, the expression will always evaluate to 'true' [-Werror=int-in-bool-context] With the added braces, the condition actually makes sense. Fixes: 34fe6f107eab ("mfd : Check if the other db8500 core is in WFI") Signed-off-by: Arnd Bergmann Acked-by: Daniel Lezcano Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- arch/arm/mach-ux500/pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-ux500/pm.c b/arch/arm/mach-ux500/pm.c index 2cb587b50905..7ae4f94db1e8 100644 --- a/arch/arm/mach-ux500/pm.c +++ b/arch/arm/mach-ux500/pm.c @@ -132,8 +132,8 @@ bool prcmu_pending_irq(void) */ bool prcmu_is_cpu_in_wfi(int cpu) { - return readl(PRCM_ARM_WFI_STANDBY) & cpu ? PRCM_ARM_WFI_STANDBY_WFI1 : - PRCM_ARM_WFI_STANDBY_WFI0; + return readl(PRCM_ARM_WFI_STANDBY) & + (cpu ? PRCM_ARM_WFI_STANDBY_WFI1 : PRCM_ARM_WFI_STANDBY_WFI0); } /*