Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp3122394ybj; Mon, 23 Sep 2019 15:15:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqy0rM2Zhx6YlYXU6CJP1DrYK67a3By+jdClj+tkdCT0ACpTUcV6wLuz5n3xvyDZRwt2RphZ X-Received: by 2002:aa7:c40c:: with SMTP id j12mr2537244edq.284.1569276936112; Mon, 23 Sep 2019 15:15:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569276936; cv=none; d=google.com; s=arc-20160816; b=hIlP4N/qNUb1j5iM/6k7bXhcZP6CspHlcQuQjSQwYILeUWYg73UTaxNKQWW3ffbCo+ vPFxFdCx5kV69uFzcwnp1mQvdRKaTNU0imI+I3eTvCL0dip7hPvIAe2g+1ML6wICZ3Q6 xZoCwpyS5itFOcGabG+jymD1jHe7zJq+hOOKhUerNuSh1dJO+oqwn/p4w4t1H0N/ZyWO TgExXlcHVSRxqm4dtEm5in/NslaPeLE+nBM8XV1cQ4TL+TyECUn7X8qXBXNSBbgNWwBo bEN5uZbKPhc4YFqjV1Rlc8OOz9jJZT+T2OBbi1pem+LCGmf/7AHoHufObiwxSZCQp50m DS6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7XXrWKnWOfuvCbouUJ/la6zAIYZWWa8QqF4yxWdJ2AE=; b=cYLoZZB/bZ2yNMwMfvI6Iw0R2CV9ZdsmHOPwQ8Juyx/lNNquwwSzrnzEbnG25KP1gv y4zvzyESQWf0WSvMuYBJE4Fb/CYadCXFsde1oV7haK7pKENhHgpriwmJh/nCXq2OQrDy Hmk1lMrk0PuhnQ73qThQ8MZpHd9bJdg6zPpNjCxiFqfkCbqC93OCyuE5a2Rb9SYg1rqj dSWQwzPgW3gnQiaoEkaStiEKnigs9R5kHWnb7YG89qhy1h937EmwvhNs4sY0CoSt3UMQ Xnc20yYXVFaRlIfTH5XC8bRIKTuIwjuNN31heJX5ciEQ+6bkIbBhpINCUs2mpnbyDZeW /bzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aUUvrQou; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id jx20si5519657ejb.291.2019.09.23.15.15.12; Mon, 23 Sep 2019 15:15:36 -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; dkim=pass header.i=@kernel.org header.s=default header.b=aUUvrQou; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391332AbfIVSsC (ORCPT + 99 others); Sun, 22 Sep 2019 14:48:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:44572 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391269AbfIVSr5 (ORCPT ); Sun, 22 Sep 2019 14:47:57 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7A6C121BE5; Sun, 22 Sep 2019 18:47:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569178077; bh=L1K4pFSWiGXddrGuntvqMf6aFH0zGkbfckIzZT0ushM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aUUvrQoufL/fRPFcT7+fvLDJcdyyjuUwiy6RhXPCBri+3/bZzSBjL2fqOPndpXjjh Z3vLPfdHzPHUWgYnqBdHE+lEeRfMDrCD21/HoSXcNbX87FOXFevoQUGL0aImuvzbvs wBn6s6srkied7N6u9A6UF/81fQ9IjWwU6ZoxyliA= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Will Deacon , Andrew Murray , Sasha Levin Subject: [PATCH AUTOSEL 5.3 148/203] arm64: lse: Make ARM64_LSE_ATOMICS depend on JUMP_LABEL Date: Sun, 22 Sep 2019 14:42:54 -0400 Message-Id: <20190922184350.30563-148-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190922184350.30563-1-sashal@kernel.org> References: <20190922184350.30563-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Will Deacon [ Upstream commit b32baf91f60fb9c7010bff87e68132f2ce31d9a8 ] Support for LSE atomic instructions (CONFIG_ARM64_LSE_ATOMICS) relies on a static key to select between the legacy LL/SC implementation which is available on all arm64 CPUs and the super-duper LSE implementation which is available on CPUs implementing v8.1 and later. Unfortunately, when building a kernel with CONFIG_JUMP_LABEL disabled (e.g. because the toolchain doesn't support 'asm goto'), the static key inside the atomics code tries to use atomics itself. This results in a mess of circular includes and a build failure: In file included from ./arch/arm64/include/asm/lse.h:11, from ./arch/arm64/include/asm/atomic.h:16, from ./include/linux/atomic.h:7, from ./include/asm-generic/bitops/atomic.h:5, from ./arch/arm64/include/asm/bitops.h:26, from ./include/linux/bitops.h:19, from ./include/linux/kernel.h:12, from ./include/asm-generic/bug.h:18, from ./arch/arm64/include/asm/bug.h:26, from ./include/linux/bug.h:5, from ./include/linux/page-flags.h:10, from kernel/bounds.c:10: ./include/linux/jump_label.h: In function ‘static_key_count’: ./include/linux/jump_label.h:254:9: error: implicit declaration of function ‘atomic_read’ [-Werror=implicit-function-declaration] return atomic_read(&key->enabled); ^~~~~~~~~~~ [ ... more of the same ... ] Since LSE atomic instructions are not critical to the operation of the kernel, make them depend on JUMP_LABEL at compile time. Reviewed-by: Andrew Murray Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 3adcec05b1f67..27405ac94228b 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -1263,6 +1263,7 @@ config ARM64_PAN config ARM64_LSE_ATOMICS bool "Atomic instructions" + depends on JUMP_LABEL default y help As part of the Large System Extensions, ARMv8.1 introduces new -- 2.20.1