From patchwork Tue Mar 13 11:41:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 131433 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp619398ljb; Tue, 13 Mar 2018 04:42:33 -0700 (PDT) X-Google-Smtp-Source: AG47ELv6vKmsRK/2TypOjQC0mmqzGbEM0L2fEDLW4UQX5+mwuJaKyAceYU+7u9dcPpJxUXQh3J2s X-Received: by 10.101.98.137 with SMTP id f9mr261437pgv.6.1520941353104; Tue, 13 Mar 2018 04:42:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520941353; cv=none; d=google.com; s=arc-20160816; b=TfKaKehFADN8LcFkK2kui86wfo+x3VyrpyIczJbxL4ccLPXVl/2TVVyJq7Ea3UmQFn ERcDLGTmGpg0k2zRtOu06hZVTpbzYaVMDTbGzrpw5rrBshTAFByqEZnykwxia57vZMaI WYwgGu+bItqkbLWBRC+jex8qbj8QW/IwQoPrNU9HeSavODc8bYCiTkAlf8LoOvgYxyAK Az5FpW7Y4PRga26KqTZo00U0Frdz07UKp4G9z0iS+nHa4cTaIAIks7qVsV9gvLDSfzeR hpQfE6ZPnjdDILcCouLhJEXWhjm8GkTsPrF+Uzzk+EOPV6YYDbsVtAKa962VYVkgq3k8 aCEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Guoop69E3nmOdjJLu/A3p3I31xzX0mwAwjsAwQ3qicE=; b=cdzdiQukAgOnJ0jY/kbXyoKzSR4D790YDXKUQR6FxCWn9DH8NjUvZAu0759dTX0tK+ WmZE0SngX/eDNUXMpPEBtJ6OBMWnbiWMzHFLzSfLWyJyWB/2UD5hDlfY4C8ZWQHvWjiy c/jtC5VOj4FWhcoKEoywrME2mxYBJuLFJdCmiToQj/rxoOeQFRbZokZaUeA+7qIcZCUy HxjIQOQal51RSdCVEFbbNY/4kePNh0Nhz7Yv49571SR/Ws90zs4JRY2VbqmaSey4qiFX hz09njKDswJlGfo0bsflfFInUl4vFHPVTr9LZJb4BjSFRYiBthu8GdOlHdEK5ZNKZ8JP YWGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4si1996pgp.516.2018.03.13.04.42.32; Tue, 13 Mar 2018 04:42:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933070AbeCMLm2 (ORCPT + 28 others); Tue, 13 Mar 2018 07:42:28 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:54127 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933034AbeCMLmX (ORCPT ); Tue, 13 Mar 2018 07:42:23 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.129]) with ESMTPA (Nemesis) id 0MCk6A-1emKfB2A4I-009Rgi; Tue, 13 Mar 2018 12:42:03 +0100 From: Arnd Bergmann To: Catalin Marinas , Will Deacon Cc: Arnd Bergmann , Ard Biesheuvel , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] arm64: fix undefined reference to 'printk' Date: Tue, 13 Mar 2018 12:41:41 +0100 Message-Id: <20180313114202.1977512-1-arnd@arndb.de> X-Mail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ujvGA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The printk symbol was intended as a generic address that is always exported, however that turned out to be false with CONFIG_PRINTK=n: ERROR: "printk" [arch/arm64/kernel/arm64-reloc-test.ko] undefined! This changes the references to memstart_addr, which should be there regardless of configuration. Fixes: a257e02579e4 ("arm64/kernel: don't ban ADRP to work around Cortex-A53 erratum #843419") Ard Biesheuvel Signed-off-by: Arnd Bergmann --- arch/arm64/kernel/reloc_test_core.c | 2 +- arch/arm64/kernel/reloc_test_syms.S | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.9.0 Acked-by: ^^^ diff --git a/arch/arm64/kernel/reloc_test_core.c b/arch/arm64/kernel/reloc_test_core.c index a70489c584c7..5915ce5759cc 100644 --- a/arch/arm64/kernel/reloc_test_core.c +++ b/arch/arm64/kernel/reloc_test_core.c @@ -45,7 +45,7 @@ static struct { { "R_AARCH64_MOVW_SABS_Gn", signed_movw, UL(SYM64_ABS_VAL) }, { "R_AARCH64_MOVW_UABS_Gn", unsigned_movw, UL(SYM64_ABS_VAL) }, { "R_AARCH64_ADR_PREL_PG_HI21", relative_adrp, (u64)&sym64_rel }, - { "R_AARCH64_ADR_PREL_PG_HI21", relative_adrp_far, (u64)&printk }, + { "R_AARCH64_ADR_PREL_PG_HI21", relative_adrp_far, (u64)&memstart_addr }, { "R_AARCH64_ADR_PREL_LO21", relative_adr, (u64)&sym64_rel }, { "R_AARCH64_PREL64", relative_data64, (u64)&sym64_rel }, { "R_AARCH64_PREL32", relative_data32, (u64)&sym64_rel }, diff --git a/arch/arm64/kernel/reloc_test_syms.S b/arch/arm64/kernel/reloc_test_syms.S index f333b4b7880d..2b8d9cb8b078 100644 --- a/arch/arm64/kernel/reloc_test_syms.S +++ b/arch/arm64/kernel/reloc_test_syms.S @@ -54,8 +54,8 @@ ENDPROC(relative_adrp) .align 12 .space 0xffc ENTRY(relative_adrp_far) - adrp x0, printk - add x0, x0, #:lo12:printk + adrp x0, memstart_addr + add x0, x0, #:lo12:memstart_addr ret ENDPROC(relative_adrp_far)