From patchwork Fri Dec 16 03:58:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 88259 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp1180884qgi; Thu, 15 Dec 2016 20:04:33 -0800 (PST) X-Received: by 10.84.192.131 with SMTP id c3mr2273082pld.149.1481861073351; Thu, 15 Dec 2016 20:04:33 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m188si5482492pfc.211.2016.12.15.20.04.33; Thu, 15 Dec 2016 20:04:33 -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=neutral (body hash did not verify) header.i=@gmail.com; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753582AbcLPEEc (ORCPT + 3 others); Thu, 15 Dec 2016 23:04:32 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:36172 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752067AbcLPEEb (ORCPT ); Thu, 15 Dec 2016 23:04:31 -0500 Received: by mail-pg0-f68.google.com with SMTP id a1so1210546pgf.3 for ; Thu, 15 Dec 2016 20:04:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=AtJJVvgVQHKTv/1jdi9M/zwQODVmdyMghe1ham8T5WY=; b=be44ma33ZeTdExfyoaecK/QFcwEPYh0fNSRdLXEnZ124ijaCr5nHHg8lV2cyIpLsMr tQEj8ObNOCkBPw3+v3meUVNeL3Vvr/gwaEJuOGH4p8Ugae5xG8ECub8cWLag744g718s VINy0jKHR7E500ds0TYPC+/9dYobGTgjRd73kVKLakDX6uOQ7LdTlsrytk0BFtI7tkuF R92/qwW/yC63z/fo38CQCKVW0gbNziNpTpLi2kW6Ww5iIXvNEu75oaiW+oA6cMwBYcYL cy1/z2RZcNYXrbSxA7DR/OcbpQZRzvDKvXrc4hKMZp9KIQrUJOKkj9RADaM2JHQkZwR9 Sr+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=AtJJVvgVQHKTv/1jdi9M/zwQODVmdyMghe1ham8T5WY=; b=WAAdigY8OL6dCZP39+r8/OdwV8JRbeB9BZYxHz8rxt6XISzlZPyVW3nme4RDDA2PNM ucXfznkgaMhbIJzwOebqY53LQBtruxUy2dqPW4eMjxSit+MtrRMaPjnSaTiUzOpcWogN avycA/vx14Yj5ViFE52GRQ630o7wnvkJh8BUH3hCWLk+6JwseZG3gGRngsYrHiUVacpr R7Nh9ny8BRA/Td2/0vCB4M6uGtQiDRrQvZTXbwxiY27RQNTObCxQX7mo/8jsQQuyBael +/6gFU/tSY5I+T6CzjeJ3IBm0WW/WEV8R4hDpfvx+aN3naYvpIBfwjSsgjODS3cK4LYC VF1Q== X-Gm-Message-State: AKaTC01W0N2RhjwGkmyieBw6wFUh3FtlpkHgy2e3DuwXAvxkDj6rzjuJuBD/xp76UWXMAQ== X-Received: by 10.98.158.90 with SMTP id s87mr1060418pfd.62.1481860698423; Thu, 15 Dec 2016 19:58:18 -0800 (PST) Received: from aurora.jms.id.au ([203.0.153.9]) by smtp.gmail.com with ESMTPSA id e11sm7679818pgp.10.2016.12.15.19.58.14 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 15 Dec 2016 19:58:17 -0800 (PST) Received: by aurora.jms.id.au (sSMTP sendmail emulation); Fri, 16 Dec 2016 14:28:11 +1030 From: Joel Stanley To: stable@vger.kernel.org Cc: Segher Boessenkool , Michael Ellerman Subject: [PATCH] powerpc: Convert cmp to cmpd in idle enter sequence Date: Fri, 16 Dec 2016 14:28:01 +1030 Message-Id: <20161216035801.11233-1-joel@jms.id.au> X-Mailer: git-send-email 2.11.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Segher Boessenkool Commit 80f23935cadb1c654e81951f5a8b7ceae0acc1b4 upstream, backported to 4.4. This patch is required to build the powerpc kernel with modern toolchains. Please apply to 4.4. PowerPC's "cmp" instruction has four operands. Normally people write "cmpw" or "cmpd" for the second cmp operand 0 or 1. But, frequently people forget, and write "cmp" with just three operands. With older binutils this is silently accepted as if this was "cmpw", while often "cmpd" is wanted. With newer binutils GAS will complain about this for 64-bit code. For 32-bit code it still silently assumes "cmpw" is what is meant. In this instance the code comes directly from ISA v2.07, including the cmp, but cmpd is correct. Backport to stable so that new toolchains can build old kernels. Fixes: 948cf67c4726 ("powerpc: Add NAP mode support on Power7 in HV mode") Cc: stable@vger.kernel.org # v3.0 Reviewed-by: Vaidyanathan Srinivasan Signed-off-by: Segher Boessenkool Signed-off-by: Michael Ellerman Signed-off-by: Joel Stanley --- arch/powerpc/kernel/idle_power7.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/powerpc/kernel/idle_power7.S b/arch/powerpc/kernel/idle_power7.S index 112ccf497562..73f638789a38 100644 --- a/arch/powerpc/kernel/idle_power7.S +++ b/arch/powerpc/kernel/idle_power7.S @@ -44,7 +44,7 @@ std r0,0(r1); \ ptesync; \ ld r0,0(r1); \ -1: cmp cr0,r0,r0; \ +1: cmpd cr0,r0,r0; \ bne 1b; \ IDLE_INST; \ b .