From patchwork Thu May 11 15:56:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 761231 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 ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wNybV3v9mz9s7j for ; Fri, 12 May 2017 02:04:22 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="nwoCPFB+"; 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 3wNybV2rsjzDqcM for ; Fri, 12 May 2017 02:04:22 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="nwoCPFB+"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) (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 3wNyRM6HJyzDqZX for ; Fri, 12 May 2017 01:57:19 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="nwoCPFB+"; dkim-atps=neutral Received: by mail-pg0-x241.google.com with SMTP id u187so4042166pgb.1 for ; Thu, 11 May 2017 08:57:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=t3LSv5q/EwKWL9mvJqFAX+ejPN00PafNe9eClfCW0UM=; b=nwoCPFB+bp0wkiD4F7vFXRBN44OmjZ+884L67DW5e7jii1/HGV24fKLaPJOo+pKRlB N5tPN2qQ8cdCFszcPKbSYNLx8dPivFPWbxKa/f73FwN9uXwfZ91pragFF0Canm6X6Dg6 R6oNMef9vd1T+s2GIwY1PKyGvhmQ3Vd27ER/PJ69CUupKm4bVI8XJ2our9Qrafz/Ujxs hFTxVqUPohJHH9zPaTVwu26Gu+iNOK8Jhgdvfxm4THTF9x9UAj59+f5YK8vmFtCwmzla ApBnx+D4qP2lcsIUz3OxgdYaNDABPiItY88PG07T0HpnnIRTJLuLsOIBcR0OuTSt8OYD XERA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=t3LSv5q/EwKWL9mvJqFAX+ejPN00PafNe9eClfCW0UM=; b=cdb/KZ+YnPJUSnM+iUNw+AUEB08GeqXcRz8J1/nKpErlitB9VUAxO8lAkfEhx5mF3A vawOyhBnkEEqCrkLK+eph+QNTanxlxZSa5q50hgm3Kah+hUUbc8w+ZJ7DpZ10qKQfhaY MCNQPZqKnobPtXKF3+wWOFS4eCmanvFSrNiPX6J1EF+cNh5hoeFGY7axJu4wvERmXK0u EgFo0CGyRNJBao1wkYQ5lZVmPnuc0hCIDI/bWUO1B3ZTeWoQc/x4IdDXTCyGzho4EPjh Jjz1q+GBNfErbmMfc9tSiThoL/t8DGcLp72uaXuuPG1t0aBJ7i3MHODLicwDwFoMUU/T JYFQ== X-Gm-Message-State: AODbwcBpY3kyW0aCKD/WWaMX1c+cKQMK2tgbCfHd+fq4fT2LR8cVUD+F c9iFM/PAsxcYKc1c X-Received: by 10.99.54.137 with SMTP id d131mr1156651pga.72.1494518237871; Thu, 11 May 2017 08:57:17 -0700 (PDT) Received: from roar.au.ibm.com ([210.185.118.93]) by smtp.gmail.com with ESMTPSA id c7sm1194002pfk.103.2017.05.11.08.57.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 May 2017 08:57:16 -0700 (PDT) From: Nicholas Piggin To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH 3/5] powerpc/64: do not link crtsaveres.o in boot Date: Fri, 12 May 2017 01:56:50 +1000 Message-Id: <20170511155652.8287-4-npiggin@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170511155652.8287-1-npiggin@gmail.com> References: <20170511155652.8287-1-npiggin@gmail.com> 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: Nicholas Piggin Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" crtsaveres.S is empty with 64-bit builds already, so just don't build and link it to match the vmlinux build. Signed-off-by: Nicholas Piggin --- arch/powerpc/boot/Makefile | 3 ++- arch/powerpc/boot/crtsavres.S | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index e82f333cc84a..305d4d6b0ce0 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -95,13 +95,14 @@ libfdtheader := fdt.h libfdt.h libfdt_internal.h $(addprefix $(obj)/,$(libfdt) libfdt-wrapper.o simpleboot.o epapr.o opal.o): \ $(addprefix $(obj)/,$(libfdtheader)) -src-wlib-y := string.S crt0.S crtsavres.S stdio.c decompress.c main.c \ +src-wlib-y := string.S crt0.S stdio.c decompress.c main.c \ $(libfdt) libfdt-wrapper.c \ ns16550.c serial.c simple_alloc.c div64.S util.S \ elf_util.c $(zlib-y) devtree.c stdlib.c \ oflib.c ofconsole.c cuboot.c mpsc.c cpm-serial.c \ uartlite.c mpc52xx-psc.c opal.c src-wlib-$(CONFIG_PPC64_BOOT_WRAPPER) += opal-calls.S +src-wlib-$(CONFIG_PPC32) += crtsavres.S src-wlib-$(CONFIG_40x) += 4xx.c planetcore.c src-wlib-$(CONFIG_44x) += 4xx.c ebony.c bamboo.c src-wlib-$(CONFIG_8xx) += mpc8xx.c planetcore.c fsl-soc.c diff --git a/arch/powerpc/boot/crtsavres.S b/arch/powerpc/boot/crtsavres.S index f3d9b35c07d4..085fb2b9a8b8 100644 --- a/arch/powerpc/boot/crtsavres.S +++ b/arch/powerpc/boot/crtsavres.S @@ -37,12 +37,13 @@ * the executable file might be covered by the GNU General Public License. */ +#ifdef __powerpc64__ +#error "On PPC64, FPR save/restore functions are provided by the linker." +#endif + .file "crtsavres.S" .section ".text" -/* On PowerPC64 Linux, these functions are provided by the linker. */ -#ifndef __powerpc64__ - #define _GLOBAL(name) \ .type name,@function; \ .globl name; \ @@ -230,4 +231,3 @@ _GLOBAL(_rest32gpr_31_x) mtlr 0 mr 1,11 blr -#endif