From patchwork Wed Oct 21 22:57:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 11849939 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7C27C4363A for ; Wed, 21 Oct 2020 23:03:41 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 29A66221FB for ; Wed, 21 Oct 2020 23:03:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mGDM7/qG"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AAwAXUqN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 29A66221FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References:List-Owner; bh=6jzrfDqUVqkYN14ZsPxNdmdKG1KbqRUQuE1anD6c1YY=; b=mGDM7/qGJOrBupN4mgmg0vG+td znjWLXC1AUP9ie6ZRIjUdC97oxxAnbZCtXCV9zSdQud/whdK0Pjdkl/zR5SjCOqRnqo14o/fbrzcI 7Eh/g2gUk9U7Q1vg9rSAQEkaUImHtoGZrapfRtWc1yjpUTHkhHAnnYqyEOialrxmPQAZ85wHyvt8Z QEqoxij/SRoT+Ivak3D2gslmMaQ6sbqtWuWBzIh5/z8bNyx8gmjxzwER6Z8tJGizI65K/oFvPh8Qm OF5Y/NqxPNGeYlPWpmIZJ6kxs50j17D92Mt8j23ifUZ74/HB4jPkpF87+QmORsN1jexcfuKC9aRIl rL3qVkfA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kVN7T-0008IN-N3; Wed, 21 Oct 2020 23:02:11 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kVN7R-0008Hg-9S for linux-arm-kernel@lists.infradead.org; Wed, 21 Oct 2020 23:02:10 +0000 Received: by mail-wr1-x441.google.com with SMTP id e17so4890670wru.12 for ; Wed, 21 Oct 2020 16:02:05 -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:mime-version :content-transfer-encoding; bh=jGdInkciuraxCObjCq4PSMBKIp6zsKH4I8SuIMPE9Zk=; b=AAwAXUqN9gjf8RPzGGH/2ISx8DmBKTgBggHLY5b5tASJHU3avDG/ZnOAgMDElULgSm T59Fu6WCOszK9oyWkgbYKoOWswNWQ+Z9l2j7qey19J70mNdDorIuL37GTd3c9iho1QGd xWu47O6BBkbp2ptRA0tCDMiPyUxkdic1FD/SMY6KJ5eiopl/qxB4A69Re+eSkrLpENFg 0aZ5CsEdmFgU+k166rICYKRK55hKRLoU6XwpaTVvAnK8+eF20ZCTFOGzXOEr/jPK9WZz YwXnLjKnuC4bYN185joLIxCrI7kBaqHS0BAPO2EiNCRFqBSwKGD8oOMzBg1ZT5pgRmVz RU5w== 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:mime-version :content-transfer-encoding; bh=jGdInkciuraxCObjCq4PSMBKIp6zsKH4I8SuIMPE9Zk=; b=M03CTO++mVrxfQh5O8lTNTbyeaN6rad1JvtJGrSuEzPHkmznp4ZTf0jkFRt7ffDOlL Zral+ZGGVxeUSfj1UgGHyQhL2TF/eMiHNQ/mVEjvOe+wwg5ZY8CIrThScFm3WIoX2e3h 6PWg/8viy9Guz+A+Un2n+ZkwLaQXUJp5/dhU3/NvvL4cbbtpgNPrhlKJDrtk5Kgh/91i tJW4WOGKpvg98iYSVv7R0Wr2jCoz/5c0U4H1PepFm/gUBUaLWwQfq3w01DDx+HQRXrbf 91HxFWm5GYXFBeRGI6B8DXayKRBDeTLWM/ZyGvZg0xWtANOFNu4nf1BJUNAl8vAKrqHG 5VvA== X-Gm-Message-State: AOAM532xjrGfGkLocy14wJuML2vjVvC7Nzx1Uzt3r9GLEUTHPCIkROYk MC1TqoGO676UvRCe+fbsf+KjfE/i4yU= X-Google-Smtp-Source: ABdhPJzcRi0tEGKPaq+nPEfJC/eKvHR7Aug0gdH2/i73DOWJzSRgOLFjKDuvH4kfWy3SauZhs33IXA== X-Received: by 2002:adf:9f0a:: with SMTP id l10mr6614763wrf.427.1603321324750; Wed, 21 Oct 2020 16:02:04 -0700 (PDT) Received: from localhost.localdomain (109-252-193-186.dynamic.spd-mgts.ru. [109.252.193.186]) by smtp.gmail.com with ESMTPSA id d30sm6458263wrc.19.2020.10.21.16.02.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Oct 2020 16:02:04 -0700 (PDT) From: Dmitry Osipenko To: Russell King , Kees Cook , Nick Desaulniers , Ingo Molnar Subject: [PATCH v1] ARM: vfp: Use long jump to fix THUMB2 kernel compilation error Date: Thu, 22 Oct 2020 01:57:37 +0300 Message-Id: <20201021225737.739-1-digetx@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201021_190209_346444_B4BB3C55 X-CRM114-Status: GOOD ( 15.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The vfp_kmode_exception() function now is unreachable using relative branching in THUMB2 kernel configuration, resulting in a "relocation truncated to fit: R_ARM_THM_JUMP19 against symbol `vfp_kmode_exception'" linker error. Let's use long jump in order to fix the issue. Fixes: eff8728fe698 ("vmlinux.lds.h: Add PGO and AutoFDO input sections") Signed-off-by: Dmitry Osipenko --- arch/arm/vfp/vfphw.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S index 4fcff9f59947..6e2b29f0c48d 100644 --- a/arch/arm/vfp/vfphw.S +++ b/arch/arm/vfp/vfphw.S @@ -82,7 +82,8 @@ ENTRY(vfp_support_entry) ldr r3, [sp, #S_PSR] @ Neither lazy restore nor FP exceptions and r3, r3, #MODE_MASK @ are supported in kernel mode teq r3, #USR_MODE - bne vfp_kmode_exception @ Returns through lr + ldr r1, =vfp_kmode_exception + bxne r1 @ Returns through lr VFPFMRX r1, FPEXC @ Is the VFP enabled? DBGSTR1 "fpexc %08x", r1