From mboxrd@z Thu Jan 1 00:00:00 1970 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9FC9C48BC4 for ; Thu, 15 Feb 2024 14:56:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6B9976B008A; Thu, 15 Feb 2024 09:56:27 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 641D68D002B; Thu, 15 Feb 2024 09:56:27 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 495828D0029; Thu, 15 Feb 2024 09:56:27 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 30AA06B008A for ; Thu, 15 Feb 2024 09:56:27 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 0E7B0C0885 for ; Thu, 15 Feb 2024 14:56:27 +0000 (UTC) X-FDA: 81794339214.06.56EAEE4 Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) by imf13.hostedemail.com (Postfix) with ESMTP id 48FD220019 for ; Thu, 15 Feb 2024 14:56:24 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=ionos.com header.s=google header.b=jAt54UuE; dmarc=pass (policy=quarantine) header.from=ionos.com; spf=pass (imf13.hostedemail.com: domain of max.kellermann@ionos.com designates 209.85.167.54 as permitted sender) smtp.mailfrom=max.kellermann@ionos.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1708008985; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=UMOhGrGj8ZKb8QpbixTkN6L6ZFBU6wOv0Z5Y6TlRvLQ=; b=zyW2IFijGZ5Dlu+dpsHWKnhGb2vTCNfbef9NpaVQOL72zZvqzo9fJ672sShtpZHbxiDltO dRrmrbSLkDnc5EO1dYiMiZb4c+QE4MRkzzNL0M+ilt+pXxnnuAtnSVbNA2b6f2uYvIi49r ZG7lv8GTf4ZhCGPyiKkMNTYKM14HQek= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=ionos.com header.s=google header.b=jAt54UuE; dmarc=pass (policy=quarantine) header.from=ionos.com; spf=pass (imf13.hostedemail.com: domain of max.kellermann@ionos.com designates 209.85.167.54 as permitted sender) smtp.mailfrom=max.kellermann@ionos.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708008985; a=rsa-sha256; cv=none; b=zMW4Yq971DshT3LeTcBazBrit5YbG5OtXsxoiuK4liCckJQTckUCSIM7/S+kbm3D7eCC66 g4yijPHOPb3X4O32qem5Z7EV3dJtMh0VoyAea3RnQ6phSL4nTiW/l0XdMycNzrxbffGJfl NIpWhOHm+H02bRZ+hRwvbZ3kYHMKiCY= Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-511acd26c2bso1352107e87.2 for ; Thu, 15 Feb 2024 06:56:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1708008983; x=1708613783; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UMOhGrGj8ZKb8QpbixTkN6L6ZFBU6wOv0Z5Y6TlRvLQ=; b=jAt54UuE8NuqoXysbN/bg6MxUS7lNsH2pqDykXYI3VtI/6zsnGeUelN9XOiEhqu3iH agGUC2lqmliivGfDWE+Fz2thd5fJEWjwceYSQDZNm4OZmNPsKHmaTJEPmJKOXP1b8xwD y7ngi8m5x3byJcM52hmzPJaWOOAHEk2uXbw+0gBuOce8wbBsWquF+s7U5xjoHLIw1j3A VdCiynBStoRi+xr0OyzJrU7zQ2sEzaAwEgooDcGAM2ox823LpHERGF1J+XyVfYFv2EYx F5AXbVDAZEMhFaGNPIbiET+5w7tMlI8VYbb/DvBlBMVuQhaVxIyONW9EoEaRRTFOXW80 hEzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708008983; x=1708613783; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UMOhGrGj8ZKb8QpbixTkN6L6ZFBU6wOv0Z5Y6TlRvLQ=; b=ijda4TLxQOfw48aHkGSA5BgMV8vi9t/fkOJcX6SrHFAxTz6+4SMWEM6HYvouNDgCDp cBT6ynKqSEscAIaMw88pDgEvbngjxq0dDLHGDt8n6NXWmmBQRVZ6PNjOkXTAWBV7Upbj JSbDLenwsVmozRlm7EVotb5BrW0gbmioVEE6C+WXZIAQQ7WGWPlKK/A0okJwRq92S/9B urePppGGOpqXJugErI3jP5zgcIulEYPoFtp1coEUGs5ofrGjbyUGVgIzBTOb/xI1Ih9o lmNkAF9QNU2OArkwWShxwcbR8DASKVa6yYFakQrJqzDIJpHCBPT2hFwWQUUc6b7osTG9 7/og== X-Forwarded-Encrypted: i=1; AJvYcCVwKtVJ5A47IyWMBs57DX8u+g6l1EmrysDimXDU6oVQoPP1ha9ajvBMwRU6b80Qypx3gIGbC2djSS+MP/9b1EmPftI= X-Gm-Message-State: AOJu0Yz5PU/ow73cY9ETOmKSZLvaQ/LNvZwMeZV6VUy9yVLjioASwOrc E2xOZOBdAig4YjIg2nZvlmMw/80UrSmQMvcD99ylwdUwx9Ne9bsixBbDDb28TkU= X-Google-Smtp-Source: AGHT+IGssagBUW9WG3R8udwSe8E59JAyI3n0tWwsK5KvLhyaYjenK+BbQ5sQbNFHE9hVJClBWwkozA== X-Received: by 2002:a19:5e12:0:b0:511:7746:5687 with SMTP id s18-20020a195e12000000b0051177465687mr1519101lfb.24.1708008983414; Thu, 15 Feb 2024 06:56:23 -0800 (PST) Received: from raven.intern.cm-ag (p200300dc6f267100023064fffe740809.dip0.t-ipconnect.de. [2003:dc:6f26:7100:230:64ff:fe74:809]) by smtp.gmail.com with ESMTPSA id s18-20020a170906169200b00a3d1897ab68sm631175ejd.113.2024.02.15.06.56.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 06:56:23 -0800 (PST) From: Max Kellermann To: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Max Kellermann Subject: [PATCH v1 13/14] linux/mm.h: move high_memory to mm/high_memory.h Date: Thu, 15 Feb 2024 15:56:01 +0100 Message-Id: <20240215145602.1371274-14-max.kellermann@ionos.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240215145602.1371274-1-max.kellermann@ionos.com> References: <20240215145602.1371274-1-max.kellermann@ionos.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 48FD220019 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: grpo5b4ixskgnt9y1mipuatxqegrwiin X-HE-Tag: 1708008984-425086 X-HE-Meta: U2FsdGVkX19v2nkN6Ct4/mSVbIV9D9ywcz6QT0DwYTaFBTalGQO03Fdz6nyTKetb93PYUUS2VkGgGCh4DIjMu8l4Tg/Sn4/LSEIDPXzUmKhBP2JJXLwHcJawTTaAzoj6HGlQkfrOJNKNrgaCHYUsJcRdUgRF18D9z09VwQ1AIPonJNM0CdI9Uo1d3ZkDopkY81sWlZlI8WdU4nIpJlKoo1RcYSr+WD0o5C95jzchgcXSc6AgzoTSPIJtZiMJMUuLkyd2GGd9HUA5uiqUQ+za9FSXn9oHS758yYNDP7CtQa/3Dl6XzSuVrEFbEX4TcvQFl3znn//sTT27N/CK3CaXJXOz3yAQ0qK8AvabUZVFSDP4Wh0nOJsSz5wJK8bt4kib5tn3Yr0AcMPRbUCsNB53Pj5753gCtOKDg8clwkfImj6Dbi/pzW3RrZ+u+U5WKBs2BLTmwIybA5VKPVKo/YvT758s0xQfn7Grs03UUkYKfbdpK4ocG4siBvoVafVxciVxtEbviEb9L9dIVKyuT/de8rH5M5utzSyk83dUM1dCxDqguNv/5kezVNrUIk1CJhVOOCaBqsq/Y6d13ijK++xGGiSMEv0bCMz6/MYzWnFu+Y6Q4tkONANKGOyW/8j+bLNPuKseN8Lu/kZA3xw7XifNEIwc5c0i3POZZSqQ/Fs6GEvtcZjrA+Trmi3z1FtdxJwvPPu+L8Se95V/4zYJeOllpZwBKUh6NMqsvqlBXoOZz4ng41qd+lH7hP/YZxmKfZyF0FGsjGDxTYm+SQUEYEv2gWGyu508OZR3Og0VQEkeYPtOJXLlkjYUE1BdXzOmCO3jhbXhz90P2s0fHfBaE70YDEmai3GhNh/2eqjt6V9LOCbqKPGReKvnIlRLOndyltdzmaetGAg02QYZY07Nd6Lrsc9jYelCrabGXh95IIIKEgHY70/eTFg1fBfi5Qlg2iQskBbo5xV0q7JvjwhdlL8 66bNfwDY faAMu2vWnyVK/5E85QKZvVQIRAvVskqdJ3LOgG4SyXoSgtXhZH5c71IHqWEUSQZLZsGZO/y0cY6/CrgkOA2X9yAeJBkg8gP6YF54mDmY1YfUm4WflC6+z8r9mhvHE6z/ARrJHgm0H9fZHAfBatyQdvTRnae8sEDXEyoS2 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This variable is used by lots of arch/*/include/asm/ headers, but these do not (and should not) include the huge linux/mm.h header. Let's move this "extern" variable to a separate header and include this one in arch/. Signed-off-by: Max Kellermann --- arch/arm/include/asm/memory.h | 4 ++++ arch/arm/include/asm/pgtable.h | 2 ++ arch/csky/include/asm/page.h | 1 + arch/hexagon/include/asm/mem-layout.h | 4 ++++ arch/m68k/include/asm/page_mm.h | 1 + arch/m68k/include/asm/pgtable_mm.h | 1 + arch/parisc/include/asm/floppy.h | 1 + arch/powerpc/include/asm/book3s/32/pgtable.h | 4 ++++ arch/powerpc/include/asm/nohash/32/pgtable.h | 1 + arch/powerpc/include/asm/page.h | 1 + arch/x86/include/asm/floppy.h | 1 + arch/x86/include/asm/pgtable_32_areas.h | 4 ++++ include/linux/mm.h | 2 +- include/linux/mm/high_memory.h | 7 +++++++ 14 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 include/linux/mm/high_memory.h diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index ef2aa79ece5a..a67afb213e2e 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h @@ -387,6 +387,10 @@ static inline unsigned long __virt_to_idmap(unsigned long x) */ #define ARCH_PFN_OFFSET PHYS_PFN_OFFSET +#ifndef __ASSEMBLY__ +#include +#endif + #define virt_to_page(kaddr) pfn_to_page(virt_to_pfn(kaddr)) #define virt_addr_valid(kaddr) (((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory) \ && pfn_valid(virt_to_pfn(kaddr))) diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index be91e376df79..eb80f6a65619 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h @@ -11,6 +11,8 @@ #include #ifndef __ASSEMBLY__ +#include + /* * ZERO_PAGE is a global shared page that is always zero: used * for zero-mapped memory areas etc.. diff --git a/arch/csky/include/asm/page.h b/arch/csky/include/asm/page.h index 4a0502e324a6..016f722fbe43 100644 --- a/arch/csky/include/asm/page.h +++ b/arch/csky/include/asm/page.h @@ -32,6 +32,7 @@ #ifndef __ASSEMBLY__ +#include #include #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && \ diff --git a/arch/hexagon/include/asm/mem-layout.h b/arch/hexagon/include/asm/mem-layout.h index e2f99413fe56..a09116c50043 100644 --- a/arch/hexagon/include/asm/mem-layout.h +++ b/arch/hexagon/include/asm/mem-layout.h @@ -10,6 +10,10 @@ #include +#ifndef __ASSEMBLY__ +#include +#endif + /* * Have to do this for ginormous numbers, else they get printed as * negative numbers, which the linker no likey when you try to diff --git a/arch/m68k/include/asm/page_mm.h b/arch/m68k/include/asm/page_mm.h index e0ae4d5fc985..f958655d1931 100644 --- a/arch/m68k/include/asm/page_mm.h +++ b/arch/m68k/include/asm/page_mm.h @@ -5,6 +5,7 @@ #ifndef __ASSEMBLY__ #include +#include #include /* diff --git a/arch/m68k/include/asm/pgtable_mm.h b/arch/m68k/include/asm/pgtable_mm.h index dbdf1c2b2f66..ec593656bdc5 100644 --- a/arch/m68k/include/asm/pgtable_mm.h +++ b/arch/m68k/include/asm/pgtable_mm.h @@ -13,6 +13,7 @@ #ifndef __ASSEMBLY__ #include +#include #include #include diff --git a/arch/parisc/include/asm/floppy.h b/arch/parisc/include/asm/floppy.h index b318a7df52f6..98ed37c5dc59 100644 --- a/arch/parisc/include/asm/floppy.h +++ b/arch/parisc/include/asm/floppy.h @@ -8,6 +8,7 @@ #ifndef __ASM_PARISC_FLOPPY_H #define __ASM_PARISC_FLOPPY_H +#include #include diff --git a/arch/powerpc/include/asm/book3s/32/pgtable.h b/arch/powerpc/include/asm/book3s/32/pgtable.h index 52971ee30717..03e0a32e1c2c 100644 --- a/arch/powerpc/include/asm/book3s/32/pgtable.h +++ b/arch/powerpc/include/asm/book3s/32/pgtable.h @@ -4,6 +4,10 @@ #include +#ifndef __ASSEMBLY__ +#include +#endif + /* * The "classic" 32-bit implementation of the PowerPC MMU uses a hash * table containing PTEs, together with a set of 16 segment registers, diff --git a/arch/powerpc/include/asm/nohash/32/pgtable.h b/arch/powerpc/include/asm/nohash/32/pgtable.h index 9164a9e41b02..8a9f5b546e4a 100644 --- a/arch/powerpc/include/asm/nohash/32/pgtable.h +++ b/arch/powerpc/include/asm/nohash/32/pgtable.h @@ -5,6 +5,7 @@ #include #ifndef __ASSEMBLY__ +#include #include #include #include /* For sub-arch specific PPC_PIN_SIZE */ diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h index e5fcc79b5bfb..c541e71d3d5c 100644 --- a/arch/powerpc/include/asm/page.h +++ b/arch/powerpc/include/asm/page.h @@ -7,6 +7,7 @@ */ #ifndef __ASSEMBLY__ +#include #include #include #include diff --git a/arch/x86/include/asm/floppy.h b/arch/x86/include/asm/floppy.h index 6ec3fc969ad5..7756e984f146 100644 --- a/arch/x86/include/asm/floppy.h +++ b/arch/x86/include/asm/floppy.h @@ -10,6 +10,7 @@ #ifndef _ASM_X86_FLOPPY_H #define _ASM_X86_FLOPPY_H +#include #include /* diff --git a/arch/x86/include/asm/pgtable_32_areas.h b/arch/x86/include/asm/pgtable_32_areas.h index b6355416a15a..b339137b4f4e 100644 --- a/arch/x86/include/asm/pgtable_32_areas.h +++ b/arch/x86/include/asm/pgtable_32_areas.h @@ -3,6 +3,10 @@ #include +#ifndef __ASSEMBLY__ +#include +#endif + /* * Just any arbitrary offset to the start of the vmalloc VM area: the * current 8MB value just means that there will be a 8MB "hole" after the diff --git a/include/linux/mm.h b/include/linux/mm.h index d4624940923f..75ab0144656c 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -3,6 +3,7 @@ #define _LINUX_MM_H #include +#include #include #include #include @@ -81,7 +82,6 @@ static inline void totalram_pages_add(long count) atomic_long_add(count, &_totalram_pages); } -extern void * high_memory; extern int page_cluster; extern const int page_cluster_max; diff --git a/include/linux/mm/high_memory.h b/include/linux/mm/high_memory.h new file mode 100644 index 000000000000..e504aafd0d48 --- /dev/null +++ b/include/linux/mm/high_memory.h @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_MM_HIGH_MEMORY_H +#define _LINUX_MM_HIGH_MEMORY_H + +extern void * high_memory; + +#endif /* _LINUX_MM_HIGH_MEMORY_H */ -- 2.39.2