From patchwork Tue Nov 8 06:28:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugh Dickins X-Patchwork-Id: 692155 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tCfYd3YXHz9t5m for ; Tue, 8 Nov 2016 17:29:57 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="fsrvRsjN"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3tCfYd2Wc5zDvgt for ; Tue, 8 Nov 2016 17:29:57 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="fsrvRsjN"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pf0-x235.google.com (mail-pf0-x235.google.com [IPv6:2607:f8b0:400e:c00::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3tCfX20XbzzDt1l for ; Tue, 8 Nov 2016 17:28:34 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="fsrvRsjN"; dkim-atps=neutral Received: by mail-pf0-x235.google.com with SMTP id n85so102366128pfi.1 for ; Mon, 07 Nov 2016 22:28:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=97i9LhlZ/Mox4ZmKkPl4BYsrrdiqYeol78Oz+1uZS+A=; b=fsrvRsjNYY7vDPXZuPTrfNdNLwGjc04TAZ1YKNZPt+dJjupaJ2X5lacUU2X0oRlUqM acHW5ypNWlOBDg0aCxxBDIQQI32rr+41km5U6fq/2gehdkJtiUlocNPZ4F2VR6qfGueH cb8uP/TdHI39IKRuUy7F1iC3fAAcMfdcW89WVi9WPctkj/r/EEqelvmuOQfan11a3Emr GGEsMSqhfHkSwT303Fx4tE2PXsGwAGc2G1H71dFnDxbKJGinlCUsMwBqXiZIA63E6mYM UMqvFOyB6Bo81Ghm8iEykili+jFcBYZbb2jXbFIMf2xhzcR0W1zpj1Y8HZ6bNGVVU+9r t3XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=97i9LhlZ/Mox4ZmKkPl4BYsrrdiqYeol78Oz+1uZS+A=; b=gNCVC1FFe8tVTLI17RehFTON9+JAuUzxSbpvQSMJu8zrWKr4d90Ut/nmvOdznPd91o M2nU3G1ImBIFnKKk3Du7xVclna/iIJsUf3kPHhD8Zu1lnVGok9rbbf8I8lwl0KbT5li2 Q0pFpoHMlfuam7foO/4LX7NMPyvvXjke5MsBAEh9bwQ5gbrJYlC/kh3Ef3/0yxoG0II7 bIPYwh8f5N7hNAjRBwjRuHt9FUlZ9TJzRf1XDrvBFiEGCQ/GFa6DwW5/ALLjZ4jQtdXz K1nQlYToUSeqW3f03mj3YHolqQgLyf1/IXJsyl+4ql83E3afOP46c7twzNONGacPhzgj GHIQ== X-Gm-Message-State: ABUngvd2rk81DdcbFABG2cdOAsWKPU2askjS8QtryK9xqSfmZCyNyUxA3qZnegBvQKPyVsQK X-Received: by 10.98.19.137 with SMTP id 9mr20281170pft.150.1478586511820; Mon, 07 Nov 2016 22:28:31 -0800 (PST) Received: from eggly.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id v10sm45178936pag.44.2016.11.07.22.28.30 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 07 Nov 2016 22:28:31 -0800 (PST) Date: Mon, 7 Nov 2016 22:28:21 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Michael Ellerman Subject: Re: 4.9-rc G5 build broken with a 2.23 binutils In-Reply-To: <87bmxqlfrw.fsf@concordia.ellerman.id.au> Message-ID: References: <87bmxqlfrw.fsf@concordia.ellerman.id.au> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linuxppc-dev@lists.ozlabs.org, Hugh Dickins , Nicholas Piggin Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Tue, 8 Nov 2016, Michael Ellerman wrote: > Hugh Dickins writes: > > > Hi Nick, > > > > I've not been able to build 4.9-rc kernels for the PowerMac G5, getting > > > > arch/powerpc/kernel/exceptions-64s.S: > > Assembler messages: > > arch/powerpc/kernel/exceptions-64s.S:770: Error: operand out of range > > (0xffffffffffff8100 is not between 0x0000000000000000 and 0x000000000000ffff) > > and 20 more similar before > > arch/powerpc/kernel/exceptions-64s.S:1024: Error: operand out of range > > (0xffffffffffff9180 is not between 0x0000000000000000 and 0x000000000000ffff) > > make[1]: *** [arch/powerpc/kernel/head_64.o] Error 1 > > > > That's with the binutils-2.23.2-8.1.4.ppc64 from openSUSE 13.1. > > > > But yesterday your comment on @l in > > a24553dd02dc ("powerpc/pseries: Remove unnecessary syscall trampoline") > > helped me to the patch below (removing @l from LOAD_HANDLER, but leaving > > @l in __LOAD_HANDLER), which gets the build working again (and produces > > a good kernel). For me. But to judge by your comment, this would break > > the build for someone else? I don't mind keeping this as a local patch > > if I'm the only one affected, so haven't signed off on it; but thought > > I'd better inform you. > > Thanks for the report Hugh. > > We added the @l recently to keep binutils 2.22 happy, in commit a24553dd02dc: > > https://git.kernel.org/torvalds/c/a24553dd02dc > > > We needed it because we were using LOAD_HANDLER() for systemcall_common, > which is in a separate .S. But since then we've split that out into a > separate macro, meaning we no longer need the @l in LOAD_HANDLER(). > > Why binutils 2.23 can't cope with the @l I'm not sure, and I don't > really care. Dropping the @l is more correct, ie. > > So I'll merge this as a fix, do you want to send me a SOB? Thanks a lot, Michael, that's nice if the same works for everyone. Yes, I couldn't build without keeping the @l in __LOAD_HANDLER(). Same patch below, with SOB and trimmed comment - but edit it or add to it in whatever way you wish. [PATCH] powerpc: fix build with a 2.23 binutils I've not been able to build 4.9-rc kernels for the PowerMac G5, getting arch/powerpc/kernel/exceptions-64s.S: Assembler messages: arch/powerpc/kernel/exceptions-64s.S:770: Error: operand out of range (0xffffffffffff8100 is not between 0x0000000000000000 and 0x000000000000ffff) and 20 more similar before arch/powerpc/kernel/exceptions-64s.S:1024: Error: operand out of range (0xffffffffffff9180 is not between 0x0000000000000000 and 0x000000000000ffff) make[1]: *** [arch/powerpc/kernel/head_64.o] Error 1 That's with the binutils-2.23.2-8.1.4.ppc64 from openSUSE 13.1. But the comment on @l in a24553dd02dc ("powerpc/pseries: Remove unnecessary syscall trampoline") helped me to the patch below (removing @l from LOAD_HANDLER, but leaving @l in __LOAD_HANDLER), which gets the build working again for me. Signed-off-by: Hugh Dickins --- arch/powerpc/include/asm/exception-64s.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- 4.9-rc4/arch/powerpc/include/asm/exception-64s.h 2016-10-29 15:02:42.921203905 -0700 +++ linux/arch/powerpc/include/asm/exception-64s.h 2016-11-05 16:26:34.250133166 -0700 @@ -91,7 +91,7 @@ */ #define LOAD_HANDLER(reg, label) \ ld reg,PACAKBASE(r13); /* get high part of &label */ \ - ori reg,reg,(FIXED_SYMBOL_ABS_ADDR(label))@l; + ori reg,reg,FIXED_SYMBOL_ABS_ADDR(label); #define __LOAD_HANDLER(reg, label) \ ld reg,PACAKBASE(r13); \