Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp266247lqs; Tue, 5 Mar 2024 01:03:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXQuAtq0enqmebwkYXDgQnOJCQDTCn7+AVlBfHbXKFST/G6arb62GwQMaHHL2GX92nykrd1wKbmMwwydsWjaqkh0RpBcASbGj8791ghvw== X-Google-Smtp-Source: AGHT+IHT2y89rKhwcxUZpiVUYwWdJ3CtMLTJ8VRgxZBBeQrY25Q7LFGn8EGURn3CFserCAqX2b7n X-Received: by 2002:a17:906:792:b0:a45:ab1a:4c31 with SMTP id l18-20020a170906079200b00a45ab1a4c31mr608851ejc.56.1709629392008; Tue, 05 Mar 2024 01:03:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709629391; cv=pass; d=google.com; s=arc-20160816; b=bMGjAqyyHWy+AWT/cOGarok1uXQ9Cb82PbS3XDF/N+Pc3xawXaLhPy5t1e6ElliSr4 UpqEeU2hXLevtjEwXixgpbyghjanxfq/ILPKoAI+5DXXqLOp11lya5WwViFF3cNEvcLc +uJ0qZpfXJHMzIFc5kTNNOhZWtiLPLqnRX1Le23KvGbKGl5KjWswc5OFpBksZr5gcLuI lpmom4XtLclSh55aqi7d2Qz/w9z2NL84olfP6JscxrUoXPIkxSaNE9ai2sObNgTuutnz rHeJhsbhkhxZFpo3jVKsS7m4oXEO/xaMuUpfOCFBL2OIrnpiDzXdAbkhmDNNRZi5NKou h3ng== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=rAj7+x69ZY+4IfKY/7bKK9Eao6rfkUHshm8TstoFK2I=; fh=2Uj9Ryf8Jg9Jt65FtGcRDMx4r/TajOJ4++vUG3DJyng=; b=tRCrIfi32TNveYQ1W42HjKbr52NgzLhnML6qEA+xMf2Hvc0QIl1X7Q/ZrqG6Q8q7dU f6ZeLNHH8jiqd4EkJ2Y5Zxhl0gl5WGAwNkG2BYIzLQ1JmURkoHJ6LjuVZk5b8j/kcCWu JNT6BYr1uGMtn320NwvE03PGAy/khMx3WsN+IRay69sy+gDNolcISfsB7F/1K+wqfRkj SYiCBq8aiD30jR34Rg481mZr8RY9ij37qq72SiWNoHleq7cUZqKD0NjdIwg5LPQk82K+ Du70cckBedhUKolwu4kaQ1P2exkWPzW4omykKa2nbKn6hlGwJ+HJ73ZHlFyBTYTF7FR9 XpPg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=gl+sJLCC; arc=pass (i=1 spf=pass spfdomain=ionos.com dkim=pass dkdomain=ionos.com dmarc=pass fromdomain=ionos.com); spf=pass (google.com: domain of linux-kernel+bounces-91945-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91945-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id h27-20020a17090619db00b00a3e66a477bbsi4686742ejd.660.2024.03.05.01.03.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 01:03:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-91945-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=gl+sJLCC; arc=pass (i=1 spf=pass spfdomain=ionos.com dkim=pass dkdomain=ionos.com dmarc=pass fromdomain=ionos.com); spf=pass (google.com: domain of linux-kernel+bounces-91945-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91945-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8C7741F23039 for ; Tue, 5 Mar 2024 09:03:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9D07850A60; Tue, 5 Mar 2024 08:59:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b="gl+sJLCC" Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6186E5676E for ; Tue, 5 Mar 2024 08:59:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709629193; cv=none; b=LF5jOCMaazoLxDHEjeTdyLxaM3cirgsyj91cTecfpqpO/8yk5hIw4Iq0WYdVb5iRsYACx78Wz/CHMtT8c49KXr6urCeo8FV0HDxkHWvshvSQ0yaHmugcPPOmS4qgAOzrp440ve6LE9CP21SzjT4sqfF9iauNHPM5prXjsdO/tnE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709629193; c=relaxed/simple; bh=P1j230muQbkNjSYF4M1Cq6qrXTdqj73dTqv5lqd1keg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=pVi2FtwetVn7bRnyGX6gvd+IYaCFICER75kLEhqze7aGbJ8eamvo+fep1LjiIPa+aJDtH40Frlj1cKNo5IPJxc6V7G0SEnvckXO1XjsPSzXZgCuh7rDGL+Dj4SI59eYIiVuIMKZzYcynnW9//n4VgIE3s86jq+wtdoRZNA7aR9M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ionos.com; spf=pass smtp.mailfrom=ionos.com; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b=gl+sJLCC; arc=none smtp.client-ip=209.85.208.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ionos.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ionos.com Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-5654f700705so7369534a12.1 for ; Tue, 05 Mar 2024 00:59:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1709629190; x=1710233990; darn=vger.kernel.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=rAj7+x69ZY+4IfKY/7bKK9Eao6rfkUHshm8TstoFK2I=; b=gl+sJLCCduZrFUrrnxee8U1ik1wPnJKhGT1Rn4Xe6XbNStJmzHiPjg/Mc4fIh1CJ2N igW3Zzs9ZlxLz+OTXm4VXrxzqvqa09znHBQOlQF13TwVhqHyGxjfXMD3nWVOBlkd4O5s YQpSfTSJYa+E8EUV9XVVtWxp9Iw0lSQ9mYLIne3KMFyi0hUdMF1eFfKNElRyAuWBCexK rNng+rgDgkzuqLq1IJQtvfVg0e3NqzmzP7xWWOM9kYacM4mZwTB3cRPG8oE8gylq77Jh gRmDAqwfUJgumlmjiSTf3bi5VcobaX0zZgj2ZDqX5OA4yoAd6PAOFell2/VKYIfqriVk 6FwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709629190; x=1710233990; 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=rAj7+x69ZY+4IfKY/7bKK9Eao6rfkUHshm8TstoFK2I=; b=VKeGnzyuB1EXxCkUftgObMqyyUYte3os2RSCdJryIqfonNXriyrZLoPqMtKlJutOHd +8HkD0799LAlkG9eF/kD0lQ+rEX0FC+B83203Lnu5v7FgZQ3MNMmtDbeUuTrJS/i+SPC x/lNh9xyFGs679ty4iawnpdnxVnmAc5ZnL+Vx1G6RbExiU1asH+nuyi0jvAHuaJ0QbM2 XVX5E0zqzbNW04U56lj7cEvgEyl1QRTsZJprB6HHm8q2pbA+tJI+kFWXUxUCMFSKyHvI Gqa9z+s6/LVPdCPF+885da064LGzJaRCceBSxJt/v738HZLjW4xyQ4gffB3MGZ0GOmtH va4A== X-Forwarded-Encrypted: i=1; AJvYcCWNAZM4dgrSGf/2m9xoJPHEhF1ix2Uo3F9YIl0ZMQjhBQu+cEetGvvlzf354JtuEzz67UCTMJgXrQGn6gFTlo9Q0eFuUDKGK9pQmtAU X-Gm-Message-State: AOJu0YyFivsXL1/MzDvsItJCaKsXocd5yUtvoXQfrgTqihIBHjHDNaT8 BcG5j5M595FHy547gv916B5Ltnx2FkAG16IAJjlMCnYe1FF+khOVZeDi5HUZfwJh2zNtvwdNXxS f X-Received: by 2002:a17:906:b893:b0:a45:5cd9:81ac with SMTP id hb19-20020a170906b89300b00a455cd981acmr3215788ejb.22.1709629189950; Tue, 05 Mar 2024 00:59:49 -0800 (PST) Received: from raven.blarg.de (p200300dc6f010900023064fffe740809.dip0.t-ipconnect.de. [2003:dc:6f01:900:230:64ff:fe74:809]) by smtp.gmail.com with ESMTPSA id gs4-20020a170906f18400b00a449d12cdc5sm4453005ejb.119.2024.03.05.00.59.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 00:59:49 -0800 (PST) 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.au, Max Kellermann Subject: [PATCH v3 13/14] linux/mm.h: move high_memory to mm/high_memory.h Date: Tue, 5 Mar 2024 09:59:18 +0100 Message-Id: <20240305085919.1601395-14-max.kellermann@ionos.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240305085919.1601395-1-max.kellermann@ionos.com> References: <20240305085919.1601395-1-max.kellermann@ionos.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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/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 80fc7df2856a..1d7b4c781995 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -82,7 +83,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