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 80410C48BEB for ; Thu, 22 Feb 2024 11:51:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7E9276B006E; Thu, 22 Feb 2024 06:51:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7723F6B0071; Thu, 22 Feb 2024 06:51:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5EBDB6B0072; Thu, 22 Feb 2024 06:51:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 494896B006E for ; Thu, 22 Feb 2024 06:51:06 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 707531C0F4D for ; Thu, 22 Feb 2024 11:51:05 +0000 (UTC) X-FDA: 81819273690.09.AA9C73D Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by imf17.hostedemail.com (Postfix) with ESMTP id 99CFC40021 for ; Thu, 22 Feb 2024 11:51:03 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=ionos.com header.s=google header.b=Uq9stSe0; spf=pass (imf17.hostedemail.com: domain of max.kellermann@ionos.com designates 209.85.128.51 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=1708602663; a=rsa-sha256; cv=none; b=HApZV27i11p88Pc+Pj+2GShvsCfcwxV94rjYsMr0BSOcoQE92OQDScMuu0HLy9A+3+oEpp ncwXEWHbqZ1ICvua3kWxy52JP40IiP+1QiserVxuVjd5MtFEcJVZfpG/+FQuLOzsZI+0j7 gw9aeu6b+5GPYOa7H2v43XJNswOc1gY= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=ionos.com header.s=google header.b=Uq9stSe0; spf=pass (imf17.hostedemail.com: domain of max.kellermann@ionos.com designates 209.85.128.51 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=1708602663; 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-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=Z9uOmaPJWXMSPVMWYlCkc7A6Acu0xg6yxtT4dMRJGg8=; b=ho6eYdhVj7WIQj3ftLvggD76KjPxh81xdpmSrX1O+2mjONmlyKkGPfvQQJUwEFv0WCiBMb 2ZQEyHntcyV5ofN8GAFittOdFFcwLmz/d/rlikXVB24vwYpHCBejJl/wWk3bCt1xnbIy0W IGdX308bDZVveIE2t8yGdeTdMzvG3Yc= Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-4127a0d8ae1so8292695e9.2 for ; Thu, 22 Feb 2024 03:51:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1708602662; x=1709207462; darn=kvack.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Z9uOmaPJWXMSPVMWYlCkc7A6Acu0xg6yxtT4dMRJGg8=; b=Uq9stSe0nGE8odGSzvWPhweR3PECWV7sO+kmOU0tPeCm6t2yQNSo0RtQdwgyPDnIDM +cTzD5W099J05xxZL9Xqti5t3wouKtfhF9HsIUko2m3u46PJRajndJCsuHv9OGx6V+KS zFC2Kskc23kzXAJAHZ1W4fQ2zToC7p8EWp974bjO4OFGA4WveclXhusf4vs8mJ7CEgP0 8C1eU2LZ4xbKG1gHIeiu52AyrJCFuDjyu86poGdVd328Fg10DRg+aJuCcO7D8E/dKSou 5BCNwmZtLolDXzedmMP+dW3cI7rB46wokMaNA3HC65NrMlT6Q5w4/MV9hlESYlQEsJt5 lw1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708602662; x=1709207462; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Z9uOmaPJWXMSPVMWYlCkc7A6Acu0xg6yxtT4dMRJGg8=; b=CGtsVoni6S9r4WF6q++uCnjvpu4vigFjtryoLKp34wZm11h9HikQ7g0TMGwi+JbdzL fBZO2w9Cmoua4cWIiENpYDzY+e2RisM+B1E6PPr0R/R4O50yCBQG2HZcB34VWujIPTio FdBfKI/THuE/CGBLfogNxVFKWA4vvFu59G/g91DALfqGU2Rj8jbLXFJdkI22UeB0XI3t gBC5vtthGRVz9+4HDRwmcoWmwZesqNeeNZasOpaiH2G2TnfzAxgo4MzC/aN+u7BbD7hu wKslpJJpqKKGVxXWnLzBUXooX5pbqbDt//Dd+4SYXbDrPTr9NHMTy/ymQbOojl6w3Tae MgoQ== X-Forwarded-Encrypted: i=1; AJvYcCV1F+yKmL6U8Nie/Gkn8uqV2jJIz0p/WLjx7+8jF0V3G5lKJsQDezgk13dPbO2lDkJFxnWzTQdOopARh+/mkZfcJ0U= X-Gm-Message-State: AOJu0Yxqbo8U6K3JxdBCD2fZBOGQldEGxKydqiUqc26lnGqEOjjPag5J LPEpb5xE4XcUvnKtQSEXhmyLzmfFdiZAXfKHSQa4+DOaF5s7LQ480zAbTgh4N+4= X-Google-Smtp-Source: AGHT+IEvgIk/Nhw4gHfWzlO4k4QZfJ6Qjd2Y1lzMwtCvAEareQW2/qL8s/GuxCbB/x+Rr0gr6jsmVQ== X-Received: by 2002:adf:eeca:0:b0:33a:ff66:fecc with SMTP id a10-20020adfeeca000000b0033aff66feccmr14741847wrp.26.1708602661906; Thu, 22 Feb 2024 03:51:01 -0800 (PST) Received: from raven.intern.cm-ag (p200300dc6f010900023064fffe740809.dip0.t-ipconnect.de. [2003:dc:6f01:900:230:64ff:fe74:809]) by smtp.gmail.com with ESMTPSA id co18-20020a0560000a1200b0033d4c3b0beesm15044920wrb.19.2024.02.22.03.51.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 03:51:01 -0800 (PST) From: Max Kellermann To: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: willy@infradead.org, Max Kellermann Subject: [PATCH v2 00/14] Fast kernel headers: split linux/mm.h Date: Thu, 22 Feb 2024 12:50:41 +0100 Message-Id: <20240222115055.1172877-1-max.kellermann@ionos.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 99CFC40021 X-Stat-Signature: njo6gb9n8ikwpa3isetxqr85iez9fu8x X-Rspam-User: X-HE-Tag: 1708602663-718822 X-HE-Meta: U2FsdGVkX1896gFDrjueT4ZiTkGDg8PNuG9aebPhHC9AMle1Q35pMG4/aPwAs17Cdb8OFyI4cxHDSf34NYae7DRfPdMDtTx9yNNC7IFkI7PM+CPh2/RMJVDWjqHcfWHSG1l5lBUxhOGoehY8LzPbH+Ajn4IA5rDmf4gs4s/70a/lYe3pXw9fMDr2BjZ21qDRi+z1QtH2s4zYU4nQLhPfOMHJ/+SM2m5xB4gZnFzVrsFtmCZ6aIGH8pCWdxyRft5GI1IpQAEbaNcXCeO9tUJfT+Ukxy3pfPLWmjZf8FCr6l8/j14Q0D4/X7MWrPgWsZ7X9lujaA/U/6kYt50ZXHio7dasmi3nXvGZOIZds2gIHYNUfUT+5pB9yn+U4BFojIMRPloio/JKmoxGCr4wunaFRcyJvACpFKZa32bQytWIuwSWER+QHhIj5ilqs7ADUidHPXLmFvvG7ke9UOM5fMAo07zsIm9LfRdu2ig5++IK1RaIPktNqOlUXL8uERMKvnDp4ThPer/0hxO7UKvkomL9FEq1s799l7y9wvbdmULS+LFd0kigTxBZf5QH2NOsVPSfXnxYsE9Ou5T+5fGDDUk6VBaDR/o69L5H+SFSgH7iJLHWFHKDIHbZTwRR7GlrUu1g43yPKYZBFFppaIb20+vBVBkrsPAnUqjCMjEfxOBBQVIVbvMbB5pN+xNuu06wkx9UK7YSubICaApvS34v5mlnT2utroZC+k7sXCdSyLo+FHATnt4ZOeNLRAHgGlmIA9gBKuGIWGzA4gkc2D8WyVXsf6fpi5bSXcsbQ0wWnuV1bjI1JpOSxSZwleBY2O1G/1GZLlmjBxeOjqGHhRQDppjBLvIOxmi+qskdsc2QRYZT2P+4+JdKbEbzOIQw8kJn2mLUgysCdYG0+/xAXnRDAfcbKTHaH+EY3xhrVNfxwOlPeczbKG5FWlisWTD3g27YiIZTNyspsPQn94fOBz6JcUH 5nIdcg2u whu19x3w8RdaEG0tOSfdPhU9hZcrmCWJW6+qx5URFD10ciOrHcbmwBZCuSL1BAbbQYhFChUw1NqNLwVc= 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 patch set aims to clean up the linux/mm.h header and reduce dependencies on it by moving parts out. The goal was to eliminate dependencies on linux/mm.h from other popular headers such as highmem.h and dma-mapping.h, and I started by checking which symbols were really used and moved those declarations to separate slim headers. --- v1 -> v2: added more explanations to commit messages; renamed several new headers from page_*.h to folio_*.h as suggested by Matthew Wilcox; rebase on linux-next; fix build failures on architectures um,nios2,hexagon by adding more missing includes Max Kellermann (14): drivers: add missing includes on linux/mm.h (and others) include/drm/drm_gem.h: add poll_table_struct forward declaration linux/mm.h: move page_kasan_tag() to mm/page_kasan_tag.h linux/mm.h: move section functions to mm/page_section.h linux/mm.h: move page_address() and others to mm/page_address.h linux/mm.h: move folio_size(), ... to mm/folio_size.h linux/mm.h: move folio_next() to mm/folio_next.h linux/mm.h: move devmap-related declarations to mm/devmap_managed.h linux/mm.h: move usage count functions to mm/folio_usage.h linux/mm.h: move page_zone_id() and more to mm/folio_zone.h linux/mm.h: move pfmemalloc-related functions to pfmemalloc.h linux/mm.h: move is_vmalloc_addr() to mm/vmalloc_addr.h linux/mm.h: move high_memory to mm/high_memory.h include: reduce dependencies on linux/mm.h MAINTAINERS | 1 + arch/arm/include/asm/memory.h | 4 + arch/arm/include/asm/pgtable.h | 2 + arch/arm/mm/iomap.c | 3 + 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/comedi/comedi_buf.c | 1 + .../qat/qat_common/adf_gen4_pm_debugfs.c | 1 + drivers/dma/dma-axi-dmac.c | 1 + drivers/dma/sh/rcar-dmac.c | 1 + drivers/firmware/qcom/qcom_scm-legacy.c | 1 + drivers/firmware/qcom/qcom_scm-smc.c | 1 + drivers/firmware/raspberrypi.c | 1 + drivers/iio/buffer/industrialio-buffer-dma.c | 1 + drivers/iommu/iommufd/ioas.c | 2 + drivers/iommu/iommufd/selftest.c | 1 + drivers/media/platform/mediatek/vpu/mtk_vpu.c | 1 + drivers/media/platform/ti/omap/omap_voutlib.c | 1 + drivers/misc/bcm-vk/bcm_vk_dev.c | 1 + drivers/misc/fastrpc.c | 1 + drivers/misc/genwqe/card_dev.c | 1 + drivers/misc/uacce/uacce.c | 1 + drivers/mtd/nand/onenand/onenand_samsung.c | 1 + drivers/mtd/spi-nor/core.h | 2 + drivers/pci/p2pdma.c | 1 + drivers/pci/pci.c | 1 + drivers/remoteproc/remoteproc_core.c | 1 + drivers/soc/qcom/rmtfs_mem.c | 1 + drivers/spi/spi-aspeed-smc.c | 1 + drivers/spi/spi-bcm2835.c | 2 + drivers/spi/spi-intel.c | 1 + drivers/virtio/virtio_ring.c | 1 + include/drm/drm_file.h | 1 + include/linux/bio.h | 2 + include/linux/dma-mapping.h | 1 + include/linux/highmem-internal.h | 2 + include/linux/highmem.h | 4 +- include/linux/huge_mm.h | 2 + include/linux/iommu.h | 1 + include/linux/mm.h | 582 +----------------- include/linux/mm/devmap_managed.h | 37 ++ include/linux/mm/folio_next.h | 27 + include/linux/mm/folio_size.h | 150 +++++ include/linux/mm/folio_usage.h | 177 ++++++ include/linux/mm/folio_zone.h | 38 ++ include/linux/mm/high_memory.h | 7 + include/linux/mm/page_address.h | 71 +++ include/linux/mm/page_kasan_tag.h | 66 ++ include/linux/mm/page_section.h | 23 + include/linux/mm/pfmemalloc.h | 52 ++ include/linux/mm/vmalloc_addr.h | 33 + include/linux/nvme-keyring.h | 2 + include/linux/scatterlist.h | 8 +- include/linux/skbuff.h | 4 + kernel/dma/ops_helpers.c | 1 + kernel/dma/remap.c | 1 + lib/scatterlist.c | 1 + mm/dmapool.c | 1 + 66 files changed, 777 insertions(+), 575 deletions(-) create mode 100644 include/linux/mm/devmap_managed.h create mode 100644 include/linux/mm/folio_next.h create mode 100644 include/linux/mm/folio_size.h create mode 100644 include/linux/mm/folio_usage.h create mode 100644 include/linux/mm/folio_zone.h create mode 100644 include/linux/mm/high_memory.h create mode 100644 include/linux/mm/page_address.h create mode 100644 include/linux/mm/page_kasan_tag.h create mode 100644 include/linux/mm/page_section.h create mode 100644 include/linux/mm/pfmemalloc.h create mode 100644 include/linux/mm/vmalloc_addr.h -- 2.39.2