From nobody Fri Feb 13 07:52:09 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BBEA3E82CAE for ; Wed, 27 Sep 2023 17:06:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229539AbjI0RGP (ORCPT ); Wed, 27 Sep 2023 13:06:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbjI0RGO (ORCPT ); Wed, 27 Sep 2023 13:06:14 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5B7F92 for ; Wed, 27 Sep 2023 10:06:10 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1830FC433CA; Wed, 27 Sep 2023 17:06:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695834370; bh=+UG/yWZqZo1iV8TUQE3qhdJF0S1Q3YjrzyQjZVd6NL0=; h=From:To:Cc:Subject:Date:From; b=Qdfg391W2W7NBMk+m/EKVEc4PsWoYHrPd94/b7LiJLUlRCDPTFoJAq+2Ka3b9Blhf 45CmO9z2n7DEOGLXApOAnZ2gUZ2+8B1zF6dqIUmbkpyTaq5cSvTofUNxgGt5orqHsE RcM28LrsljFT1hdyyDuVn9f3G9JEajNh8ZTx5Yadl0IT1wJ209uJa69+R324nBzKgk n6u31bLwSv+SrbrlPc9VyCfNcCn3yrololUBn4y58e4Aor0/NosIGwmMlThKmzaOmY EW+z8ksqq1DVLgr02f3JuA6c7q6eMTEVVQW5qSVfJZ2fRnf1rYozlWD+DGYX49CS0D aVroXOfNICTjw== From: Masahiro Yamada To: patches@armlinux.org.uk Cc: linux-kernel@vger.kernel.org, Russell King , Masahiro Yamada , linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: make self-contained for ARM Date: Thu, 28 Sep 2023 02:06:00 +0900 Message-Id: <20230927170600.286183-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" When I compiled the following code for ARM, I encountered numerous errors. [Test Code] #include #include int foo(int *x, int __user *ptr) { return get_user(*x, ptr); } To fix the errors, make some asm headers self-contained: 1. In arch/arm/include/asm/domain.h, include for current_thread_info(). 2. In arch/arm/include/asm/traps.h, remove unneeded __init, and include for asmlinkage. 3. In arch/arm/include/asm/uaccess.h, include for might_fault(). Signed-off-by: Masahiro Yamada --- KernelVersion: v6.6-rc1 arch/arm/include/asm/domain.h | 2 +- arch/arm/include/asm/traps.h | 3 ++- arch/arm/include/asm/uaccess.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/domain.h b/arch/arm/include/asm/domain.h index 41536feb4392..d48859fdf32c 100644 --- a/arch/arm/include/asm/domain.h +++ b/arch/arm/include/asm/domain.h @@ -8,8 +8,8 @@ #define __ASM_PROC_DOMAIN_H =20 #ifndef __ASSEMBLY__ +#include #include -#include #endif =20 /* diff --git a/arch/arm/include/asm/traps.h b/arch/arm/include/asm/traps.h index 0aaefe3e1700..2621b9fb9b19 100644 --- a/arch/arm/include/asm/traps.h +++ b/arch/arm/include/asm/traps.h @@ -2,6 +2,7 @@ #ifndef _ASMARM_TRAP_H #define _ASMARM_TRAP_H =20 +#include #include =20 struct pt_regs; @@ -28,7 +29,7 @@ static inline int __in_irqentry_text(unsigned long ptr) ptr < (unsigned long)&__irqentry_text_end; } =20 -extern void __init early_trap_init(void *); +extern void early_trap_init(void *); extern void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long frame, const char *loglvl); extern void ptrace_break(struct pt_regs *regs); diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h index bb5c81823117..6a2cc57f015a 100644 --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h @@ -8,6 +8,7 @@ /* * User space memory access functions */ +#include #include #include #include --=20 2.39.2