From nobody Fri Feb 13 09:29:27 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 8440CE7E657 for ; Tue, 26 Sep 2023 17:23:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233096AbjIZRXJ (ORCPT ); Tue, 26 Sep 2023 13:23:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232053AbjIZRXG (ORCPT ); Tue, 26 Sep 2023 13:23:06 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A74E1124 for ; Tue, 26 Sep 2023 10:22:59 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06493C433C7; Tue, 26 Sep 2023 17:22:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695748979; bh=de4PaIe+gi6uEbnNSfbPH0YnkVx5n1zdlOSbQRUr3R0=; h=From:To:Cc:Subject:Date:From; b=hBLd32l3ouSF4pP2Rfe6jGzyEY4zTZRNbyPjNq7hLseYmzVm3j2mIUM080MmsQVXB Y3qIu2vb44eRdlLzw4FbbydqVtacnC79Z8gVDEuhIvvPoBKOGPYTr44ud9D/sI2YOw UDRMIGZQnKhqjGjt1U8SB5wHI7g/nSl4bw5byXzjrSiH7x0rDmx/Vr4eYzxSJJXPQq h4itxT41PNAfrYanOcTwQO5windtKNu6XVTGV+iyLJIecsiHPoYV9hzgSKd422/aLO DZPyDai3P+nm9c9EN7oKhGJPMNis3CE7uiXHvgvrNUuOjJs8aLyYULQVA9m69EnOLT FXpL4whjGsjeg== 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: Wed, 27 Sep 2023 02:22:53 +0900 Message-Id: <20230926172253.73204-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 them, make some asm headers self-contained: 1. In arch/arm/include/asm/traps.h, include for __init, and for asmlinkage. 2. In arch/arm/include/asm/domain.h, include for current_thread_info(). 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 | 2 ++ arch/arm/include/asm/uaccess.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) 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..d44df9eac170 100644 --- a/arch/arm/include/asm/traps.h +++ b/arch/arm/include/asm/traps.h @@ -2,6 +2,8 @@ #ifndef _ASMARM_TRAP_H #define _ASMARM_TRAP_H =20 +#include +#include #include =20 struct pt_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