From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.49 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796181411; b=3cL5p7Vc4EZ4n7EJL8MUC+U4laaFt/VMkyKyPrUpsbbS25fpYRQbqNvDb43XobkCxdN/ juF7gkaqrtbwk75MIIRpk10dx6YhwlviVE4OqkE+wYhWyHlTggLnnoPxZfzGkiOkHuTTn mhGRHlIaOadRPsfnmhSeV++jZUR6kYadVrTDwmcODEO7MdoF/XnHJ3ml2ymNtwHIVI6Xh W2VnJeSJfmelDyuKvfNnStA7ooaps1tLHVldLQxZJxzWAUApWzpILN/dN3OGQ2c6/qWmS X0htwfrdneqUlCLvZfwgJLAVQpCKn8gPxh3krohFVyj9FoHeVc2klAe4/qKdVO0cvNA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796181411; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding; bh=anbj8MIubAtaiBl0sEyXuUkhPEE+I0s4nxPUThhwesI=; b=UFkvmEtCPlxFqXT4Rz7KeUGgVSJ3UHjdQOsYRMTNs2SujAkZYZGwXAfGU1zAY9OXEPdi AznF1v8mIoMnppk/F0Cq1Shc92i982jE+BNLhp3FxKspvTAN41+Ik/S1rktHwhl8n+30K uEw/HR4SDgFEe6qpxqg5zY8va/VwsghOpJX5PM15Fdz/FbyEu+6lAFRRYkSnBiuYOmw9a Kf/0/mOm+v2AKetEXZfEhZbl38o5q1L5Ujv/jWqfejXGvNGdAknV5NuFlOZdni7YZhh4H KHkCI2ulzdUiw6hHESc93KNCOeZgttMXkstxaPLIhLrww4lX+8MoePx1k6K4y2tllMg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=wbqZRlOm; arc=none smtp.remote-ip=209.85.128.49 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 395CD606A336 for ; Wed, 2 Dec 2026 03:16:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 395CD606A336 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=wbqZRlOm Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4bba60271d7so63867625e9.2 for ; Tue, 01 Dec 2026 19:16:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796181410; x=1796786210; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=anbj8MIubAtaiBl0sEyXuUkhPEE+I0s4nxPUThhwesI=; b=wbqZRlOmGI3Et/7Kde11goBqZoshwgqX+8fTQbLkysREZXL4xsNuVjQxcroAIsWioG UaL1OfZrGCXkNL+w8/jrGBZVmv0HPLED12RitroPe2A31tT1qptBXIu6bwWAG0wtkrQn eSvi74Gc2KVf/0ELZOoQAS0pB0iOd9hw5MtTC43VuGtZ1UrLaL8YPFcM12gI1fp5j92Z sHi1Tx+c5wCPWvYHx8JtlUx/GEMQjubQIbX4t3OHGLrVFEDzgRFFtTSTtkk/vP3V6N52 cmzE4ZY3wqviFHheaU0W/GOuo3pN2I3i5eA489rAnSfYvjS8co7XqndaaNM7TV3e4XmP hDeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796181410; x=1796786210; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=anbj8MIubAtaiBl0sEyXuUkhPEE+I0s4nxPUThhwesI=; b=KIYKwSy5ke+KcvEmaHWcK+YMAbuHRwX13Oq8KPv44sb9XqQ3j5EqNp+BntIDZmlEdf +3xNlsigPcjFuGvjzKGLX/a4j1CJY/TagHFSwpT5UBFOYm7N8JVMCGA219JemLMLRX1E 9RaKTHOYNWt2giAJNY5BtVjio5JtFvJo6JDStF83QIZDEenWnL+omwgaC7m6V3VM9f/y fo0E/iKsJC39YqdBIh4VA7gkj9v3W4Jvs5S9U0W+EZGr6Hs+cHc376MpgeC4muM/y7ZL vKVx2+06o6lTm79F4KT8zV6TeSQPfwQ1YlNtsik/9za0Toh65OQfO1WCXyWPFeWoW5hi 8kgQ== X-Gm-Message-State: APuU4Z+R5XtBVPU4NDhkW9GTavzQlEyw5Wz3rpjRE8pa2Ba8e8iNva7h WZMFVfN2OJ1swZS1ibKdFTxyTukYWuKmQeQ2OplXwxKCBID3XIO2o1EUVfuzAmUQatJT18Z+ X-Gm-Gg: AZFdTZePfISIXF1JUJYypusqm+0D7n8y7lmwzawM914sXLNUbENTXmQoe194qDq0JBT 9yLRIpPM11c6YDHJHhkjEinIBAlGKXC6zG6Xqiu5vOXvedIK7pHyiKtYQF4GlJ10XG9Nks8ECw+ bKvqORsPAGFLYJrNyGZWkKp88lpz/o3QEi3ceSTtfENtk4H+bSfNxsduewYY9bFoRSRp2YN1wu8 KyxENMAE1h7cJ1U1TrN67pp5u/0oo05hEO08A1tEAu7xbe8DKkcwnlQMsF5i7rL0M+DoF4yWQ2w hDHsALsUVIIQa5W1EnJr/055wcoRsDM4mp942t5ujlzd93FGZ0PEpkGqFggAM9IgKh0r1nDACQd APtV6HPJIZF80b3oebOf1q2V7hntxLrEBPP29uYBxmqEBhcVLK08MxacWBFifhfShL19xFVosl8 GJVD3BtTVUkwojFb7lHCME/YV166eKsNk2pt01TcvLYmfzNij92Z0kYW7HsK6/Nyrmt63YBvTUu mq0GheihcoQ7njT7holq6Qf/VL+SKBvg4GenN2KoTcFa+hCXY/7Uex4MML4xcGmV46P8zgZXFLF z9kUYd+CMpcvm8ZphJi87WUpeIA2CbWLKOITMw== X-Received: by 2002:a05:600d:8402:b0:4a3:5a91:5f61 with SMTP id 5b1f17b1804b1-4bb88806287mr629318895e9.14.1796181409549; Tue, 01 Dec 2026 19:16:49 -0800 (PST) Received: from NULL.Home.net ([2001:8a0:7280:4000:12d:c3b9:cecc:8966]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4b34e9c3ffesm61468691f8f.19.2026.12.01.19.16.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 19:16:49 -0800 (PST) From: Eric Curtin To: linux-kernel@vger.kernel.org Cc: Eric Curtin , Ryan Roberts , cgroups@vger.kernel.org, dm-devel@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-ide@vger.kernel.org, linux-mm@kvack.org, linux-mtd@lists.infradead.org, nvdimm@lists.linux.dev, v9fs@lists.linux.dev, virtualization@lists.linux.dev Subject: [RFC PATCH v2 00/13] block/storage: Prepare for boot-time page size selection on arm64 Date: Wed, 2 Dec 2026 03:16:21 +0000 Message-ID: <20261202031647.1690622-1-ericcurtin17@gmail.com> X-Mailer: git-send-email 2.56.1 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Eric Curtin This series is part of the boot-time page size selection work for arm64, posted as RFC [1]. With CONFIG_ARM64_BOOT_TIME_PAGE_SIZE=y, PAGE_SIZE, PAGE_SHIFT and PAGE_MASK are variables chosen at boot with arm64.pagesize=, so code that needs a compile-time constant (array sizes, struct layouts, static initialisers, BUILD_BUG_ON(), case labels, #if) has to use the new PAGE_SIZE_MIN/PAGE_SIZE_MAX limits or a run-time value instead. For fixed page sizes both limits equal PAGE_SIZE, so behaviour should not change. The patches here convert block, MD, NVMe, SCSI, ATA, MTD and MMC code. They apply on top of the core series [1], whose patch 1 adds PAGE_SIZE_MIN/MAX, and are otherwise independent of each other. Patches authored by Ryan Roberts come from his v1 [2], updated for v7.4-rc5. The full tree is at: https://github.com/ericcurtin/linux/tree/boot-time-page-size-v2 Testing: allmodconfig with the option enabled builds cleanly on arm64 with all of these applied, and the defconfig kernel boots to userspace with 4K, 16K and 64K pages under QEMU/KVM (details in [1]). The code in this series is not otherwise exercised on hardware. Tool use: these conversions were prepared with an LLM coding assistant (opencode with Claude Sonnet), driven by build errors and followed by an automated review pass. I have not hand-audited every patch, so please review with that in mind and tell me where you would prefer a different approach for your subsystem. [1] https://lore.kernel.org/all/20261201015240.1017259-1-ericcurtin17@gmail.com/ [2] https://lore.kernel.org/all/20241014105514.3206191-1-ryan.roberts@arm.com/ Eric Curtin (8): scsi: core: Add dma_boundary_page for page-size DMA boundaries mtd: mtdswap: Initialise mtdswap_ops with a page size variable mmc: mmc_test: Allocate the scratch buffer with the test buffer md: Remove compile-time PAGE_SIZE use in md, dm and bcache zram: Remove PAGE_SIZE use in preprocessor conditionals xen/blkback: Size indirect_pages for the largest page size null_blk: Size the nullb_page bitmap for PAGE_SIZE_MAX drbd: Use PAGE_SHIFT_MIN in preprocessor checks Ryan Roberts (5): nvme: Check the DSM range buffer against PAGE_SIZE_MIN dm: Initialise swap_bios from the runtime PAGE_SIZE virtio: Handle boot-time PAGE_SIZE in balloon, blk and 9p transport ata: sata_sil24: Use flexible arrays for the command block SGEs mm: Use PAGE_SIZE_MIN/MAX where a compile-time constant is required