Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3828625ybt; Tue, 30 Jun 2020 12:00:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuggYc4NAV4ht5H+8ykOvP/3n1XDvTGi5RQCRHkwFh66IYObIkhu8famo4lb7Jo72C5G2T X-Received: by 2002:a50:afe1:: with SMTP id h88mr24508105edd.295.1593543270057; Tue, 30 Jun 2020 11:54:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593543270; cv=none; d=google.com; s=arc-20160816; b=ts+KrxwNCdpEBcPZ+Z6gT4KHjrt2XKozczClZDc+p/NMid+Tj8VPXUdqYnmSFD7BRO 40GO6Zj8m8SaZgAkvM/7PE6DSpPILRwlYW95AdEXX1CzRZKNqCFtA+Jikh2k+dtAiYlW 9jFnlRkKJoz5GepLTXkAtql61InOGR+2fZUuLy8FOcNLibyAlLZMkXqeX5DxDz3a12s0 ppcBs+rLQ9Jk2HJHfPliV4+aWa3vHeDcn6c0lp8en6LhIqdRKJqBpTqZdvLdpXb7CA8D F7AbZmLHcvS8wKJ5XQWc7mDs+O9gEwCE4XTkZckR6yEQuCFCNpWHhxWXCheUTSATQLRC /bHg== 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=hwLuWrsLzON8v/dFESeEbwgEZgScV1PSf0CzCu7VVOM=; b=Zq4SMgyMyNnnM+pD1+avq8p1Anhn/OQWVOL7WsO9E+G5nY0ouiMqFClu7bJMOMr2xp pMtwnratrJzfiUXnKwkslFwBcDYJhjqwm93sHfgpxsOSb7R5lJv7kvMCg+QfLogqBgrG DGzXeSsv2W9Q8UTgJR4k0vli2mI2FSqpjLVp0FUc0Qh//GkNpzGJ+NJZlb/laaGd4lTM 3PSp6IENMJ8hR2Qspm/dMDfqhOzsbBu88GTWKN3XfD5X1Suplk5bNt4qTAq9S9dVjiKw t1IG4SIbHiZsF8/5Zco6LhfgHwudQBJLFQvnCiKCcoTRNGfXEYpY30BsGJAzp0uxZQkN CF8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=q6yYtsjb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id w24si2285347edv.318.2020.06.30.11.54.07; Tue, 30 Jun 2020 11:54:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=q6yYtsjb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2390450AbgF3Rip (ORCPT + 99 others); Tue, 30 Jun 2020 13:38:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:51892 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390427AbgF3Rin (ORCPT ); Tue, 30 Jun 2020 13:38:43 -0400 Received: from localhost.localdomain (236.31.169.217.in-addr.arpa [217.169.31.236]) (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 C732320885; Tue, 30 Jun 2020 17:38:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593538722; bh=Nj4BN+7NnXhh61WQDEI6UbIUFYmU1fy6kUCipohTCBw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q6yYtsjbY8R1ClJ3fY+7A7bbvC/aZHA1hUFoAbMbyuIq/syGV9xhTj3PJm0G6VSla nwocC351b9y0ZourX74cQDGe/IlY2yw9QWoOA/o5IHFN/STBYBJOiX3HhSPTH6MAle Ae8qGQc8EkaQmft9biQIUeKHE6kUJlNgX5R/mtvM= From: Will Deacon To: linux-kernel@vger.kernel.org Cc: Will Deacon , Sami Tolvanen , Nick Desaulniers , Kees Cook , Marco Elver , "Paul E. McKenney" , Josh Triplett , Matt Turner , Ivan Kokshaysky , Richard Henderson , Peter Zijlstra , Alan Stern , "Michael S. Tsirkin" , Jason Wang , Arnd Bergmann , Boqun Feng , Catalin Marinas , Mark Rutland , linux-arm-kernel@lists.infradead.org, linux-alpha@vger.kernel.org, virtualization@lists.linux-foundation.org, kernel-team@android.com Subject: [PATCH 14/18] arm64: Reduce the number of header files pulled into vmlinux.lds.S Date: Tue, 30 Jun 2020 18:37:30 +0100 Message-Id: <20200630173734.14057-15-will@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200630173734.14057-1-will@kernel.org> References: <20200630173734.14057-1-will@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Although vmlinux.lds.S smells like an assembly file and is compiled with __ASSEMBLY__ defined, it's actually just fed to the preprocessor to create our linker script. This means that any assembly macros defined by headers that it includes will result in a helpful link error: | aarch64-linux-gnu-ld:./arch/arm64/kernel/vmlinux.lds:1: syntax error In preparation for an arm64-private asm/rwonce.h implementation, which will end up pulling assembly macros into linux/compiler.h, reduce the number of headers we include directly and transitively in vmlinux.lds.S Signed-off-by: Will Deacon --- arch/arm64/include/asm/kernel-pgtable.h | 2 +- arch/arm64/include/asm/memory.h | 11 ++++++----- arch/arm64/include/asm/uaccess.h | 1 + arch/arm64/kernel/entry.S | 1 + arch/arm64/kernel/vmlinux.lds.S | 1 - arch/arm64/kvm/hyp-init.S | 1 + 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/arch/arm64/include/asm/kernel-pgtable.h b/arch/arm64/include/asm/kernel-pgtable.h index 3bf626f6fe0c..329fb15f6bac 100644 --- a/arch/arm64/include/asm/kernel-pgtable.h +++ b/arch/arm64/include/asm/kernel-pgtable.h @@ -8,7 +8,7 @@ #ifndef __ASM_KERNEL_PGTABLE_H #define __ASM_KERNEL_PGTABLE_H -#include +#include #include /* diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h index a1871bb32bb1..9d4bf58cf7b3 100644 --- a/arch/arm64/include/asm/memory.h +++ b/arch/arm64/include/asm/memory.h @@ -10,11 +10,8 @@ #ifndef __ASM_MEMORY_H #define __ASM_MEMORY_H -#include #include #include -#include -#include #include /* @@ -157,11 +154,15 @@ #endif #ifndef __ASSEMBLY__ -extern u64 vabits_actual; -#define PAGE_END (_PAGE_END(vabits_actual)) #include +#include #include +#include +#include + +extern u64 vabits_actual; +#define PAGE_END (_PAGE_END(vabits_actual)) extern s64 physvirt_offset; extern s64 memstart_addr; diff --git a/arch/arm64/include/asm/uaccess.h b/arch/arm64/include/asm/uaccess.h index bc5c7b091152..8d7c466f809b 100644 --- a/arch/arm64/include/asm/uaccess.h +++ b/arch/arm64/include/asm/uaccess.h @@ -19,6 +19,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index 5304d193c79d..b668aad3b762 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S index 6827da7f3aa5..e1e7c0431b4d 100644 --- a/arch/arm64/kernel/vmlinux.lds.S +++ b/arch/arm64/kernel/vmlinux.lds.S @@ -10,7 +10,6 @@ #include #include #include -#include #include #include diff --git a/arch/arm64/kvm/hyp-init.S b/arch/arm64/kvm/hyp-init.S index 6e6ed5581eed..076544393c3c 100644 --- a/arch/arm64/kvm/hyp-init.S +++ b/arch/arm64/kvm/hyp-init.S @@ -6,6 +6,7 @@ #include +#include #include #include #include -- 2.27.0.212.ge8ba1cc988-goog