From patchwork Mon Nov 5 18:44:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 10668925 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 648E61709 for ; Mon, 5 Nov 2018 18:46:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 553D6295E2 for ; Mon, 5 Nov 2018 18:46:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 494DE29976; Mon, 5 Nov 2018 18:46:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E9A01295E2 for ; Mon, 5 Nov 2018 18:46:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8Ot/7X6BZh1gIbYkXPDISEknkurA5uVZ55KSYr17TG8=; b=t4pACfrsuCFQLu LLyuUkpAVrUtgNT3tDm1JeYGP+01cRMrNG/N0jT8dRpDxtd2vfZ36l6kW+mpgxnGpxNkqp2i2Lwys 0apqPhHAFlYZFh2+HLt+vxOw6nviruat1wkvvA4JXXxIQey3BZGLU5JRkP0pk2QZCyj2pTd5mZGkS VOS0tRrJfR4Hm3tJLNiqbyGyLTCF/qhEYkv36CeIDG3C/UdjU6mZtCdO1wo+QD1w+fcL7ajkunr8R MXqwN5xDeijb4VeQhzvea3QU3nsAHScnYLowvKV+0rBZ5JswGi4pkrK8Tg9C5SHZwmtiPu45tlw0G mT+n9V3hR4P4oi1Yi75g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gJjsz-0004Mp-Fn; Mon, 05 Nov 2018 18:46:05 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gJjs4-0001uV-Hk for linux-arm-kernel@lists.infradead.org; Mon, 05 Nov 2018 18:45:13 +0000 Received: by mail-wr1-x444.google.com with SMTP id i17-v6so10683759wre.7 for ; Mon, 05 Nov 2018 10:44:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ng0pTj3s6z1mmU5r9dmpBe9Kz+JLJ5SPM+CBRaGljR8=; b=IfXIxgQgtRcYTvdOpEMKL7UFSdOgc9PnkwlXj1KqTHbsKKkIGFpgDlvruVwGjubQJN RNVN+KvXJj9GSecoyNQKeRdguDTCY9KTXxY8XPqzrKbl49Gy07tZ6aXwDZ2cgxSWxDY8 6Bm9u5Hh4bdJEauRr6nKM9fIAYDQaE2TjkhSw= 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:mime-version:content-transfer-encoding; bh=ng0pTj3s6z1mmU5r9dmpBe9Kz+JLJ5SPM+CBRaGljR8=; b=RYpnHYgAlJs3rniA+kFJT8QMufjqgS6TSoWtSq0amYdDURKlR3dwb2g9Ijqf0eJ+2W SR/dAmHY/rAMq2SQi+b77Kvq3DNEmbWCyQrh4FA98YcPwic7qJkJ8P34mqdW33+MI25y 40XxyXAJM4EmbkFp3q2ayFYrIzhyTxyNY1ww4D2dON6RgVO7+tQL0CCECAsNAQCKL5o2 0fpiLQxQkjShixshSffZMWZKC+D3dg+LfDz8VSJsKUD5/vXY7fFBBLj9ULNDVWbzGk0n FXr8BbF81Uy8fv/g6/r7Tg4W0kuLyGTKHYxI7XQwVLVv2DRPOkEw/ElSJnDi21PZtqXp SdQQ== X-Gm-Message-State: AGRZ1gJ0NjmbqBcSAlGNYeGS20CstzSk/YAQ+N2vH6kOF6lVNJB9McGm F4dFrh9Wgp9bIIqYzgkADP0fdXP+7Kk= X-Google-Smtp-Source: AJdET5dLjiY6rd1mgkOv5LhSOovj1JA+SwJ181iD4Cn9orMVbmyNXtnPwm6WHVmjsn6+/wOGXc9Usw== X-Received: by 2002:adf:f748:: with SMTP id z8-v6mr11896362wrp.237.1541443494638; Mon, 05 Nov 2018 10:44:54 -0800 (PST) Received: from harold.home ([2a01:cb1d:112:6f00:3117:2b29:5ef7:a9e5]) by smtp.gmail.com with ESMTPSA id y21-v6sm19329761wma.36.2018.11.05.10.44.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Nov 2018 10:44:53 -0800 (PST) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/6] ARM: compressed: move sa1100 startup code into subroutine Date: Mon, 5 Nov 2018 19:44:34 +0100 Message-Id: <20181105184438.19494-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181105184438.19494-1-ard.biesheuvel@linaro.org> References: <20181105184438.19494-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181105_104508_704319_81F26651 X-CRM114-Status: GOOD ( 12.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nicolas.pitre@linaro.org, linux@armlinux.org.uk, Ard Biesheuvel Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Instead of relying on unspecified linker behavior, move the SA1100 startup code into a subroutine and call it from the location we expect the linker to put the code. Signed-off-by: Ard Biesheuvel --- arch/arm/boot/compressed/head-sa1100.S | 9 +++++---- arch/arm/boot/compressed/head.S | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/compressed/head-sa1100.S b/arch/arm/boot/compressed/head-sa1100.S index 95abdd850fe3..89a7e9dfd5c0 100644 --- a/arch/arm/boot/compressed/head-sa1100.S +++ b/arch/arm/boot/compressed/head-sa1100.S @@ -4,18 +4,17 @@ * * Copyright (C) 1999 Nicolas Pitre * - * SA1100 specific tweaks. This is merged into head.S by the linker. + * SA1100 specific tweaks. * */ #include #include - .section ".start", "ax" + .text .arch armv4 -__SA1100_start: - +ENTRY(__SA1100_start) @ Preserve r8/r7 i.e. kernel entry values #ifdef CONFIG_SA1100_COLLIE mov r7, #MACH_TYPE_COLLIE @@ -47,3 +46,5 @@ __SA1100_start: bic r0, r0, #0x1000 @ clear Icache mcr p15, 0, r0, c1, c0, 0 99: + mov pc, lr +ENDPROC(__SA1100_start) diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 5067f287fa5a..c5355f929cee 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S @@ -216,6 +216,9 @@ not_angel: #ifdef CONFIG_PXA_SHARPSL_DETECT_MACH_ID bl __SharpSL_start #endif +#ifdef CONFIG_ARCH_SA1100 + bl __SA1100_start +#endif #ifdef CONFIG_AUTO_ZRELADDR /*