Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2040538rdh; Tue, 26 Sep 2023 10:27:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF8xvCaNBd5E48i1TkazjQQMpS7GscduLpJ97adG7Ud4kIZyV/Ifw6tnZGqJE9WTrjQ3noW X-Received: by 2002:a05:6a20:244a:b0:14c:5fa6:e308 with SMTP id t10-20020a056a20244a00b0014c5fa6e308mr9304080pzc.43.1695749220886; Tue, 26 Sep 2023 10:27:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695749220; cv=none; d=google.com; s=arc-20160816; b=zDfFpaLj1iSbu6wf2xi/SmBPTHkGc5WpZmN9UpwNzxNgyhNzOfuCi06w1JseNQ7emZ uPhl4XAhx6RS5QHwTAtDojbWkP35vg7RHmZ6oqJoYFaUgN3P72eY6WcqNWeo3W/QsQPk iJtggJlcvhs3S4umoqmJJughhY9Y9ES9VLNnHoAu/EBd//oN4P6rhfqs12WdgSkXjR7M xa/bY3GsaHrz6kLzoeIQOODVSFLANhv20uh1nO2AN+IUp0GwemMF4M2FmLsS+qwcR7YE cB7c8XQyG6zlV2qcgLztKyKJjx4hZn4kYAqcdP+Mzjn0gslUVkrf/Ak334B10FcWuGIH 4DgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Dq9EAQg02DSZXRh0k7r7rcTsyj7tYA3Sib+6gHTQtFw=; fh=t2SPPfTSCl3Gg9zjlciSf5Z5yj2b9ZKOLcHC79FxYgc=; b=aIp4WC5kPigntAh+rYKHR3zxX0OGVOGUmx6D1IkvK6thJ8dTxmEhOMcGFkeBZa3vMM 84RGpV408VCFUbpklCuLFju08GmzhDaT2iwMlEHL/5ZmgP7u7y3AKfoMrHqSvYoxgwU/ tMc0I9ypF0qTja7e5u/1GYXpkiaJ0qr253kpBCaNorUaDD+2Kne0qIO/g/mgVGyl5qLt mukOH1N3qN0uhPt9ZEIKlceMLIWDR6puFOR0bBmAXaos8OSWvH4Tg2Z+zrMym1VK18pv 9yHYck0Idpc4uEB/Mpf5VmdoZYDGuHNGWlax0JpE/tTpS0xH0T1pHcijBl/Ql/L7kAdW 2wDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hBLd32l3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id o8-20020a056a001bc800b00690d02ac9acsi12733274pfw.77.2023.09.26.10.27.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 10:27:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hBLd32l3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 717088227404; Tue, 26 Sep 2023 10:23:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233489AbjIZRXI (ORCPT + 99 others); Tue, 26 Sep 2023 13:23:08 -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: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 26 Sep 2023 10:23:13 -0700 (PDT) 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 #ifndef __ASSEMBLY__ +#include #include -#include #endif /* 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 +#include +#include #include 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 -- 2.39.2