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 D5542C4345F for ; Tue, 30 Apr 2024 15:30:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 16A756B00A7; Tue, 30 Apr 2024 11:30:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0CD286B00A8; Tue, 30 Apr 2024 11:30:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DE9516B00AA; Tue, 30 Apr 2024 11:30:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id B8EBE6B00A7 for ; Tue, 30 Apr 2024 11:30:01 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 764A5A14EA for ; Tue, 30 Apr 2024 15:30:01 +0000 (UTC) X-FDA: 82066583802.13.DD6DEEB Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) by imf04.hostedemail.com (Postfix) with ESMTP id 9AE6C40020 for ; Tue, 30 Apr 2024 15:29:59 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=ionos.com header.s=google header.b=HlUlSPYN; spf=pass (imf04.hostedemail.com: domain of max.kellermann@ionos.com designates 209.85.208.48 as permitted sender) smtp.mailfrom=max.kellermann@ionos.com; dmarc=pass (policy=quarantine) header.from=ionos.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714490999; 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=zmTw1fgf4V6Kt/hU40fj2rViCghREVZa56h5T5XnfTE=; b=UbXwYoynr+S/5GWBStgmsKShIZVghUbLSugGCF15Mh3D/SPZbhFoMMPHoZ1zmfwY2xX41r TSeEpEHpMMKe0sgN7R9xQplPOD12fGEEpAVgeawZsTbPLez5EbKT70n9ebLPyH2tGYGXCt urPrWocFd3PButvByEdfFBu79Bd6B0E= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=ionos.com header.s=google header.b=HlUlSPYN; spf=pass (imf04.hostedemail.com: domain of max.kellermann@ionos.com designates 209.85.208.48 as permitted sender) smtp.mailfrom=max.kellermann@ionos.com; dmarc=pass (policy=quarantine) header.from=ionos.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714490999; a=rsa-sha256; cv=none; b=S5XkocRvWD491tcOEsR318not8sZmPEZhmtzwxAXFX/6Ay68F1l0vAhNn8nEsfYS+BlNYj 2deFKvSb7rdfeBI2GF+ZBzJwZUAVUbiYEdIWVFYmFx7GFGed9qFmsgCxnSgQ0nZ1vpK1fY 5nHwI2NrqNEfKilMXdTAa8YLwSOrJgw= Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-56e78970853so11321019a12.0 for ; Tue, 30 Apr 2024 08:29:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1714490998; x=1715095798; 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=zmTw1fgf4V6Kt/hU40fj2rViCghREVZa56h5T5XnfTE=; b=HlUlSPYNccU3+f4sdV6fNFOq55wFsda4jFNwBngq3fT3siRP12XYoKYFIXWTSHeFkE QpETJG+xeMjsOGJbPVu+VtLoxgZX2WEoIUGdcyxgpazfvQ7SA+3T57EmkrjopJFxfCcR MAPJ/c4ZK6hA4ouWSGZAlRzP1Y679CoKNaHvPpL1AZooaSZ43EvZRfa/XYMJD+q5fmpN mNr3kU4/UGNvMJxNpmY1HqoCeO18BjkHO9eQt6gLO5aGU5ieWVfHfFP5JeZkh2Lczso7 zMCSvJYuc9xVT8g7Krpw5cfHQd/b5vVfoC9HuTrXJkdav5loFxwwx+QpQvD5FPLGXaQT J+rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714490998; x=1715095798; 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=zmTw1fgf4V6Kt/hU40fj2rViCghREVZa56h5T5XnfTE=; b=S0UpEWs5EqrhVcPcn4CjWjmhg5S2F0SjZvVzzV7anTNaLTzaYU7kDie8wVai9mLeVt 2BW7lvynAjD9u5q7BSBChq4m0bPKvrTYj/0YE56bI8lZOgiSfHEeB8sypBYXdBykLt8b 0Kw96XTXDcL629e10UAJnGZcTiZRmxHja1tPNAKZi+yeiUb6PBfnrQeFWWfoYhcO4Mcu 86O4Jpub7cUTRXk7+QQ3qWCMD79TSoMjtBuNm9xQRKGQwnUx9pGGi8V7YYPSG2gN0L/w KPFFQ48HjRpZuaKNLNeQvRW1DrBr6i33f27v4gZX25skbVkEqkt7T9tH1NbPiX09GiAF 5UTg== X-Forwarded-Encrypted: i=1; AJvYcCUsVg4xDxa9E7i9bioi5yj+4qQCzXyWs5cQlFho3/36GHkYHudCiwyXJhhSiWWDk1AWa6gDof/6O11uQ8mSZAAg2Wc= X-Gm-Message-State: AOJu0YxgDM8NMiNMMOhh8r0bHcUNzI8QlyjonCJ+4oJcYiyI+sxtVgDd Dh9XBdxs6bhgsymtK4eSHs4sQTgyGpljj7hfnuq/n4EG2gGS/4XLeUgdc+5R0ik= X-Google-Smtp-Source: AGHT+IFD66p0xJw0Q/JpPxUfYiq2Gl0hHWlUSUDJyAX2bmA9f0IipRbf65AqBkjk79FfuWXnDQdU3A== X-Received: by 2002:a17:906:c791:b0:a58:eac2:a54f with SMTP id cw17-20020a170906c79100b00a58eac2a54fmr99871ejb.18.1714490998231; Tue, 30 Apr 2024 08:29:58 -0700 (PDT) Received: from raven.intern.cm-ag (p200300dc6f06e100023064fffe740809.dip0.t-ipconnect.de. [2003:dc:6f06:e100:230:64ff:fe74:809]) by smtp.gmail.com with ESMTPSA id a10-20020a1709066d4a00b00a52567ca1b6sm15278137ejt.94.2024.04.30.08.29.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 08:29:57 -0700 (PDT) From: Max Kellermann To: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: willy@infradead.org, sfr@canb.auug.org, david@redhat.com.au, Max Kellermann Subject: [PATCH v5 14/15] linux/mm.h: move high_memory to mm/high_memory.h Date: Tue, 30 Apr 2024 17:29:30 +0200 Message-Id: <20240430152931.1137975-15-max.kellermann@ionos.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240430152931.1137975-1-max.kellermann@ionos.com> References: <20240430152931.1137975-1-max.kellermann@ionos.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Stat-Signature: admf8ud1o719tma6bq5hzce45qzp8itw X-Rspamd-Queue-Id: 9AE6C40020 X-Rspamd-Server: rspam10 X-Rspam-User: X-HE-Tag: 1714490999-351002 X-HE-Meta: U2FsdGVkX19g8Wz3lIjcRpa+7QTv4bBRz4jhhFoh6u2Ve9dxZXfRXwo4f2DvP0cVcpUuWqfTLIA49n45zQ/kI1UrvDp8f91cGIJMeSmdUngWa5FYJiMplH5t3GCDHfdqfK0XQHUi5r20UD19qW0r4iTNHkPsQQCfNT7F5btLlUI4fIHOPs8jya50Yp/j+L25TBT8yiVjNIiTXflIjz+HOb2S/nv1yHj/y8XoZmeAq7dYOs1BPDOHLMCUnQC8Yct63H31p+VOX/4hRYeLyMGlhN2I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7yehryJXVGnj0ZP0oezTvcxGrEwxEh3R30LyDP9pYOcvI4CqQ= 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 ++++ drivers/mtd/nand/onenand/onenand_samsung.c | 1 + include/linux/mm.h | 2 +- include/linux/mm/high_memory.h | 7 +++++++ 15 files changed, 34 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 0ca6c408c07f..17ccc91c3cd6 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 e411e5a70ea3..9ae87fc2c648 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/drivers/mtd/nand/onenand/onenand_samsung.c b/drivers/mtd/nand/onenand/onenand_samsung.c index fd6890a03d55..7c3cc270386d 100644 --- a/drivers/mtd/nand/onenand/onenand_samsung.c +++ b/drivers/mtd/nand/onenand/onenand_samsung.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/include/linux/mm.h b/include/linux/mm.h index 5681fd5dbbbe..db6cc1e0900b 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -83,7 +84,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