From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.54 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796181412; b=knoLWpicbBVKeG/o8RG0eZ8jKPs/7MrnRds23dkPNPLDavLaKkMm9kZOhTCHT9S1wG3K mzEPOyUxjaHGgoSlaeC62nv123io2yoU8Q39vN6SLgWdzpScuFi3EW7xNJBxbReGZTjyU X0Ulb3PCpuuYVnExlQn7ADCTPh21XLlMn8atCuKiyuxVhkols6jSc4ZEQcvD8U1KeCoAL iTlTOYsefXIDW731NrK6Cfq0IDtQxC6gQZP4QjEOSmV69d+KYhMmzv4Xr+c7qyzELqPR2 4/9/5RpCzrIM0gGIYYDxmd8O1C5GGapfmA9rPDRUupK4zZ6o4N0r4n4QhxfF2hRmJJA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796181412; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted: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=QF6JWJbDJPn+v9z+7A/J4+dqV2lM+1YZvmAt2U3DHrL4mmnabUiPkD5iHqxDUAtQDCo9 ZWpcWnqcd1yjjO1GW0DLgkdiZ/eL2pZbl0K/MevPX2jBaz1kWAHTjA+3b5N7su95jjrtf 70IocWP+Edu0woD0lgO/mJu2hZAC0CSDyyWrsztfN49fuDqwWOUc0ZwkcA6btWJLTbLsz 44W2U7hTzoBw5kQPf1jQrMh3sex/AMbam/EP17svs3o93SHs+yOXj6+1i+dtWPhrdRuDf hVLv1BUXk/nq1652W7QBqK2+2ED7LzU19DFWuCnDAq6leOaWZ9mClHjlZtN4tjHKllw== 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=kKy6hzPR; arc=none smtp.remote-ip=209.85.128.54 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (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 36A24606A334 for ; Wed, 2 Dec 2026 03:16:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 36A24606A334 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=kKy6hzPR Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-4bb85e07aadso153532385e9.1 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=lists.linux.dev; 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=kKy6hzPR/XHR08R8RkSQedxH1ZYrpeKvl2UhZpWbbINC/LscBwgLMmfxvsM4WWiCIV e107DkQ2SzFw/6x8spDUiq7LIb0YhE/5Fjf66C5FbylMfO5ErOqNZn4FO97rIHj82AuB iU0yZTT4MURIhjhJwwfYsEqqQR3+x5gIY4uqnsrdffltr4b+OD8ym8+ylrAsguZeQ8+g iyAMxFPamm1WNk2KI5u8VnFxxFE/NR1NyGv4EjNMGmldssz/NzFjAaSUJtYmJ+mkCgbu kHj8CO0RhHOkEMcnEh5Y8lcrSduflRVYGeQecsDg2YVItyJeilIQOX7LRd8lV3J8gT+V Bsdg== 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=e6ruDtdxwcKPF6Q3ePXEbdcxCNjFVr3oRiULaAdgvAs6y7EydpCfs221KLflkydwW8 uWL7lZ65O3zrY/F3cblfJU+fWUTAS5VuHcXnbAiR5fbxIqKImjG78pqlSNiO6Rc9XT3N RIc22RXH7xcZ1lL0fsXhDNLsK3iqIUqFL/fwpDrZ1XFTaMf2z5qJxjQH1iXnbpgQuZKh yewDPnyuVlBekZXwMxGuDZju59wjd5jkS2viSl+5GOjCSFAHVWwlCAVBadq0SwKhlu0K 2m7IJt/9Ww0w924P8NVm0PMYL95wFprX31Cw1GM0vqzU2PhTAk9SzUMHSCYZ54j7wxzw iq+A== X-Forwarded-Encrypted: i=1; AL+hErH8tEvch1CyyAAiCA4CGWjgYm+Dj1BXx4zEehfJaCVZSH1+4Qxgj6VNiemCcwV1UvQY8caIo5GcnPhb5uihbQ==@lists.linux.dev X-Gm-Message-State: APuU4Z+hCbqXwdyW2YtQ+gAXdm4TESTkssL3bxaTP7osGrSI6/9wdfMa 4t7UXJ5mYrpamjHupSOwHQPnsM6FDgywlQrUrTQicddABvnGN57FgYYP X-Gm-Gg: AZFdTZfm+teS5iDk6h7QzsveyANlEfzjRUh2Sr603Nr77L1wSzVIdacokCBCWK0dfew zy1j0C70OuCAqPcPSeGRpyei4I2v5tlh3CX9JRS/VTN5REPvghIKvDeduDcU8v/I9gyToNzOzpG mjUQmUqMDjtoCZyqhooovFJqBf2kvNpyEOdwKW4DIXg8wBe/Nw1R2aHi8n4G8FtLSmoq7P7guEl QBvdC8zk0GbM3q8FoBbKqbGuDXx2qa3jFrIzHrmfTSBueWFO5EYBtd/IsMNt8ReHkgEX7q3JfPy i7uSuUIF+alisjgmncYwAQNGKLZ4FeXZIBVk436sWsuANOQqGD67lnII8gKEmgG8P9408tA8o69 ScJuXVpXgZ6WOoMde8rBkBazTV3ohAyTPeV079dRMG0MSyO1tkNrZ3hts4VGWV7pzDR8LCt8pPq BSJY4ABqRIcoYeCEhZXruzAdAS9zCTHa7gkHugctbngledjLNt/hyDLm/ik6EE9GOlKVuL1kydt sU+IHqPw2TJIdJmpSM2NfRVcluzX/gPPi/OSp0UK+2sTdR2SS1m2IPazJNjg8dcK1UaPcK4rMR5 x0dLP/69BHfmcnK9Ps7hfsPr7MNmC52WGNgOVA== 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: virtualization@lists.linux.dev 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