From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.41 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796181411; b=zDJ/CQZ8GYeaEqVNl0DVtUZ42tpB1EUxh1FeEoEX2a/SW7cPmkFi9j76seMxrqCW+zAY 1tklyMA2WQOJ8tvwrydlIYp9NG0CwBq3yxt6J5MyP1hDOW710jmQfmNci6xvb13eRYqh9 RaHxSW/TMZ0auOoW08OtpaVRnSIHpjZutTP/eenreQB0+DY1RvPpEIlbo6VZKSSwu6Pm8 5FJoGyWPbGqPg+NWhr28wBaoXyFU76M+EKElVbg6A3NxDHDkWEcu/NERDtQgBarrE8De5 Pavg4nDL6Wiogt685jDaHQYybHCf83zAmIwjDEU5q8FRyq8nblv5+7V2yHTezkLYMLw== 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-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=TiEQYKs89VMnlsLJawzpm5E8nJivK8KcBHhRdawmm0tEyKCT5lgIpv0uv4heUZoBY6EV 6HuK3NkzGTftfZ8ThkHhVeNAiz9d2mCkAwCxCbmiTtuFJHURo+2w2zJaDPou2KacoscA6 iIJXJxJvDueM8KNwl2Nu8yS9brt+s46PZNw5A952GDkJH2A4WtnJSwwU16rqasAnqwGa0 AEMONINGHFJ/9Fg4zFSFcxf5Ft0GtrZZ2JfnQFS6zjZQ1DcW03JPE2Ubrm6pi9RILsvpj OzOnlhUm7ZbWIx6q5rw/Uu3XtzT3AycM5KVWYYUXMKhA1mWXCDgKket5mFEeNXDvAVg== 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.41 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 21C38606A32D for ; Wed, 2 Dec 2026 03:16:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 21C38606A32D 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-f41.google.com with SMTP id 5b1f17b1804b1-4bb9d8e8e90so94050725e9.3 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=ib86fhbd+bLB6MgzGsohlu3gtbuupmD17gl1lox6MuXIwjgyi6tJfQdZdq3U5f9vfU pD4tfpqjlNkkZaUVaFDa7wHOtU2UzghZZgOPHkfBamHyKxIVtbH1GDjPk5c2+4p0Btsn KL3QOU04PmxRzYk8iXj5Btf49YZIyzMGwZHYflAtdo2qy1Av/cYEOGT58L14GWRsSKzG Jej1c+bScSqBSgU7erMEcYOgdawtRWVt/dJTd0GS+S83dK5o3t4eXSO3d5hIRUCr7bri vVIn1l2biagSUQvEpwpGqYj8RiQzL2IrLj8Bvg5YQkHwnDjfcy4tH4BQdLH9Dpe1GdTP d3xw== X-Forwarded-Encrypted: i=1; AL+hErEgf+qCQni4ike5sfoEikziiNJBepdkGC9NlutdY/mHUSjinkLk2juh9M41M5lavF/HGR/250jM@vger.kernel.org X-Gm-Message-State: APuU4Z/F/PQlh7tH6e2sQ3bTVDY6WqoIrlQCPwX4S5KjlRM5RZPe5h7Q jL+QSq1SGXWDKA1rCg2Sw+TMTpaBORdA9pNq3tbgGEwFVkCYUSHhMpEE X-Gm-Gg: AZFdTZfmRczxeQ9YlK6pikX1ieUuYxYphFiPDKJGH+IxhHGuLTQndi+jDtXdFPZlg4n aPwWR1liD8rnVtouQ7VSNvR0MYo0WgXBe9s7xuh0uiaUCqIlBsqwEJY3vmVzNViwx8PgIreFJcq BGbKs06Ipzfa1+zN8XWx2dU9GwNraRMMS4UcN6V9Y2QEVOYjSFRgG3xTzYg/IVML3yNnW9334eT 6ZcmszxSV5h7O38yRiJWfMShE6WjRP0UifQzusbBzIKsbM37ObLaj8TQ70KER7fNG4SIbYOJuCc 6j2AaspnjD7eUD+TBvkxs9HIPLnAdqvlAKdtuO88iotzSPGLOWTz9BBZyBsvNUolYngj8XrBZVl EnaQD3iQLy2Moqu86vNRN+uKVNgSf+x/g3G5UgInw+5vXn3JidfVmfn7LltxbDZX8K94d56UlWO Le86A+bC9W6iVBwqCg7otRAZ9rfEvKRLqHnUd0VmqmE20VVLgyeMJTyryhllXeQMfYBPg3W8r6J RJdp66bNhlvQQOUmBJimLJGJDQZxWM24PGfForrGRJcqpyHo2ll502/d55AOiVgzDqP+q1TwE3n ixQwpVgI+t4vp026TMfDYg8qCDMwUsXUCJDLuQ== 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: cgroups@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