data_type
large_stringclasses
3 values
source
large_stringclasses
29 values
code
large_stringlengths
98
49.4M
filepath
large_stringlengths
5
161
message
large_stringclasses
234 values
commit
large_stringclasses
234 values
subject
large_stringclasses
418 values
critique
large_stringlengths
101
1.26M
metadata
dict
lkml_critique
lkml
Hi, Some endpoint platforms cannot use a GIC ITS-backed MSI domain for EP-side doorbells. In those cases, endpoint function (EPF) drivers cannot provide a doorbell to the root complex (RC), and features such as vNTB may fall back to polling with significantly higher latency. This series adds an alternate doorbell backend based on the DesignWare PCIe controller's integrated eDMA interrupt-emulation feature. The RC rings the doorbell by doing a single 32-bit MMIO write to an eDMA doorbell location exposed in a BAR window. The EP side receives a Linux IRQ that EPF drivers can use as a doorbell interrupt, without relying on MSI message writes reaching the ITS. To support this, the series: - Adds an EPC auxiliary resource query API so EPF drivers can discover controller-integrated resources (DMA MMIO, doorbell MMIO, and DMA LL memory). - Updates DesignWare EP controllers to report integrated eDMA resources via the new API. - Updates dw-edma to provide a dedicated virtual IRQ for interrupt emulation and to perform the core-specific deassert sequence. - Updates pci-epf-test and pci-epf-vntb to reuse a pre-exposed BAR/offset and to honor per-doorbell IRQ flags. Many thanks to Frank and Niklas for their continued review and valuable feedback throughout the development of this series. The Reviewed-by tags for the last two patches are dropped due to the additional changes following Niklas' review in the v8 threads. Since the diff is small, I'd appreciate it if Frank could re-check them. Dependencies ------------ The following three series are prerequisites for this series: (1). [PATCH v2 0/4] PCI: endpoint: Doorbell-related fixes https://lore.kernel.org/linux-pci/20260217063856.3759713-1-den@valinux.co.jp/ (2). [PATCH 0/2] dmaengine: dw-edma: Interrupt-emulation doorbell support https://lore.kernel.org/dmaengine/20260215152216.3393561-1-den@valinux.co.jp/ (3). [PATCH 0/9] PCI: endpoint differentiate between disabled and reserved BARs https://lore.kernel.org/linux-pci/20260217212707.2450423-11-cassel@kernel.org/ Regarding (3): - [PATCH 2/9] and [PATCH 3/9] are strictly the prerequisites for this v9 series. In fact, they are split out from v8 series. - With [PATCH 6/9], this v9 series should allow the embedded doorbell fallback path to pass on RK3588 from the beginning. Given that, picking up the whole (3) series earlier should be the most streamlined choice. Tested on --------- I re-tested the embedded (DMA) doorbell fallback path (via pci-epf-test) on R-Car Spider boards (with this v9 series): $ ./pci_endpoint_test -t DOORBELL_TEST TAP version 13 1..1 # Starting 1 tests from 1 test cases. # RUN pcie_ep_doorbell.DOORBELL_TEST ... # OK pcie_ep_doorbell.DOORBELL_TEST ok 1 pcie_ep_doorbell.DOORBELL_TEST # PASSED: 1 / 1 tests passed. # Totals: pass:1 fail:0 xfail:0 xpass:0 skip:0 error:0 with the following message observed on the EP side: [ 82.043715] pci_epf_test pci_epf_test.0: Can't find MSI domain for EPC [ 82.044382] pci_epf_test pci_epf_test.0: Using embedded (DMA) doorbell fallback (Note: for the test to pass on R-Car Spider, one of the following was required: - echo 1048576 > functions/pci_epf_test/func1/pci_epf_test.0/bar2_size - apply https://lore.kernel.org/linux-pci/20260210160315.2272930-1-den@valinux.co.jp/) Performance test: vNTB ping latency ----------------------------------- Setup: - configfs (R-Car Spider in EP mode): cd /sys/kernel/config/pci_ep/ mkdir functions/pci_epf_vntb/func1 echo 0x1912 > functions/pci_epf_vntb/func1/vendorid echo 0x0030 > functions/pci_epf_vntb/func1/deviceid echo 32 > functions/pci_epf_vntb/func1/msi_interrupts echo 4 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/db_count echo 128 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/spad_count echo 1 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/num_mws echo 0x100000 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/mw1 echo 0x1912 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/vntb_vid echo 0x0030 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/vntb_pid echo 0x10 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/vbus_number echo 0 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/ctrl_bar echo 4 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/db_bar [*] echo 2 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/mw1_bar ln -s controllers/e65d0000.pcie-ep functions/pci_epf_vntb/func1/primary/ echo 1 > controllers/e65d0000.pcie-ep/start [*]: On R-Car Spider, a hack is currently needed to use BAR4 for the doorbell. I'll consider posting a patch for that separately. - ensure ntb_transport/ntb_netdev are loaded on both sides Results: - Without this series (pci.git main) $ ping -c 10 10.0.0.11 PING 10.0.0.11 (10.0.0.11) 56(84) bytes of data. 64 bytes from 10.0.0.11: icmp_seq=1 ttl=64 time=6.04 ms 64 bytes from 10.0.0.11: icmp_seq=2 ttl=64 time=12.6 ms 64 bytes from 10.0.0.11: icmp_seq=3 ttl=64 time=7.40 ms 64 bytes from 10.0.0.11: icmp_seq=4 ttl=64 time=5.38 ms 64 bytes from 10.0.0.11: icmp_seq=5 ttl=64 time=11.4 ms 64 bytes from 10.0.0.11: icmp_seq=6 ttl=64 time=9.42 ms 64 bytes from 10.0.0.11: icmp_seq=7 ttl=64 time=3.36 ms 64 bytes from 10.0.0.11: icmp_seq=8 ttl=64 time=9.48 ms 64 bytes from 10.0.0.11: icmp_seq=9 ttl=64 time=4.24 ms 64 bytes from 10.0.0.11: icmp_seq=10 ttl=64 time=10.4 ms - With this series (on top of pci.git main + Dependency (1), (2) and (3)) $ ping -c 10 10.0.0.11 PING 10.0.0.11 (10.0.0.11) 56(84) bytes of data. 64 bytes from 10.0.0.11: icmp_seq=1 ttl=64 time=0.845 ms 64 bytes from 10.0.0.11: icmp_seq=2 ttl=64 time=0.742 ms 64 bytes from 10.0.0.11: icmp_seq=3 ttl=64 time=0.868 ms 64 bytes from 10.0.0.11: icmp_seq=4 ttl=64 time=0.806 ms 64 bytes from 10.0.0.11: icmp_seq=5 ttl=64 time=0.951 ms 64 bytes from 10.0.0.11: icmp_seq=6 ttl=64 time=0.965 ms 64 bytes from 10.0.0.11: icmp_seq=7 ttl=64 time=0.871 ms 64 bytes from 10.0.0.11: icmp_seq=8 ttl=64 time=0.877 ms 64 bytes from 10.0.0.11: icmp_seq=9 ttl=64 time=0.938 ms 64 bytes from 10.0.0.11: icmp_seq=10 ttl=64 time=0.960 ms --- Changelog --------- * v8->v9 changes: - Add a new dependency series (3), which moved the BAR reserved-subregion framework + the RK3588 BAR4 example out of v8 (dropping the corresponding patches from this series). - pci-epf-vntb: rename the duplicate-IRQ helper and invert the return value, per Frank's review. - pci-epf-test: drop the extra size_add() doorbell-offset check, per Niklas' review. - pci-ep-msi: add a DWORD alignment check for DOORBELL_MMIO, per Niklas's review. - Carry over Reviewed-by tags for unchanged patches + drop Reviewed-by tags where code changed. - Rename the last patch subject (drop 'eDMA' word). * v7->v8 changes: - Deduplicate request_irq()/free_irq() calls based on virq (shared IRQ) rather than doorbell type, as suggested during review of v7 Patch #7. - Clean up the pci_epf_alloc_doorbell() error path, as suggested during review of v7 Patch #9. - Use range_end_overflows_t() instead of an open-coded overflow check, following discussion during review of v7 Patch #5. - Add a write-data field to the DOORBELL_MMIO aux-resource metadata and plumb it through to the embedded doorbell backend (DesignWare uses data=0). * v6->v7 changes: - Split out preparatory patches to keep the series below 10 patches. - Add support for platforms where the eDMA register block is fixed within a reserved BAR window (e.g. RK3588 BAR4) and must be reused as-is. - Introduce a dedicated virtual IRQ and irq_chip (using handle_level_irq) for interrupt-emulation doorbells instead of reusing per-channel IRQs. This avoids delivery via different IRQs on platforms with chip->nr_irqs > 1. * v5->v6 changes: - Fix a double-free in v5 Patch 8/8 caused by mixing __free(kfree) with an explicit kfree(). This is a functional bug (detectable by KASAN), hence the respin solely for this fix. Sorry for the noise. No other changes. * v4->v5 changes: - Change the series subject now that the series has evolved into a consumer-driven set focused on the embedded doorbell fallback and its in-tree users (epf-test and epf-vntb). - Drop [PATCH v4 01/09] (dw-edma per-channel interrupt routing control) from this series for now, so the series focuses on what's needed by the current consumer (i.e. the doorbell fallback implementation). - Replace the v4 embedded-doorbell "test variant + host/kselftest plumbing" with a generic embedded-doorbell fallback in pci_epf_alloc_doorbell(), including exposing required IRQ request flags to EPF drivers. - Two preparatory fix patches (Patch 6/8 and 7/8) to clean up error handling and state management ahead of Patch 8/8. - Rename *_get_remote_resource() to *_get_aux_resources() and adjust relevant variable namings and kernel docs. Discussion may continue. - Rework dw-edma per-channel metadata exposure to cache the needed info in dw_edma_chip (IRQ number + emulation doorbell offset) and consume it from the DesignWare EPC auxiliary resource provider without calling back to dw-edma. * v3->v4 changes: - Drop dma_slave_caps.hw_id and the dmaengine selfirq callback registration API. Instead, add a dw-edma specific dw_edma_chan_info() helper and extend the EPC remote resource metadata accordingly. - Add explicit acking for eDMA interrupt emulation and adjust the dw-edma IRQ path for embedded-doorbell usage. - Replace the previous EPC API smoke test with an embedded doorbell test variant (pci-epf-test + pci_endpoint_test/selftests). - Rebase onto pci.git controller/dwc commit 43d324eeb08c. * v2->v3 changes: - Replace DWC-specific helpers with a generic EPC remote resource query API. - Add pci-epf-test smoke test and host/kselftest support for the new API. - Drop the dw-edma-specific notify-only channel and polling approach ([PATCH v2 4/7] and [PATCH v2 5/7]), and rework notification handling around a generic dmaengine_(un)register_selfirq() API implemented by dw-edma. * v1->v2 changes: - Combine the two previously posted series into a single set (per Frank's suggestion). Order dmaengine/dw-edma patches first so hw_id support lands before the PCI LL-region helper, which assumes dma_slave_caps.hw_id availability. v8: https://lore.kernel.org/linux-pci/20260217080601.3808847-1-den@valinux.co.jp/ v7: https://lore.kernel.org/linux-pci/20260215163847.3522572-1-den@valinux.co.jp/ v6: https://lore.kernel.org/all/20260209125316.2132589-1-den@valinux.co.jp/ v5: https://lore.kernel.org/all/20260209062952.2049053-1-den@valinux.co.jp/ v4: https://lore.kernel.org/all/20260206172646.1556847-1-den@valinux.co.jp/ v3: https://lore.kernel.org/all/20260204145440.950609-1-den@valinux.co.jp/ v2: https://lore.kernel.org/all/20260127033420.3460579-1-den@valinux.co.jp/ v1: https://lore.kernel.org/dmaengine/20260126073652.3293564-1-den@valinux.co.jp/ + https://lore.kernel.org/linux-pci/20260126071550.3233631-1-den@valinux.co.jp/ Thanks for reviewing. Koichiro Den (7): PCI: endpoint: Add auxiliary resource query API PCI: dwc: Record integrated eDMA register window PCI: dwc: ep: Expose integrated eDMA resources via EPC aux-resource API PCI: endpoint: pci-ep-msi: Refactor doorbell allocation for new backends PCI: endpoint: pci-epf-vntb: Reuse pre-exposed doorbells and IRQ flags PCI: endpoint: pci-epf-test: Reuse pre-exposed doorbell targets PCI: endpoint: pci-ep-msi: Add embedded doorbell fallback .../pci/controller/dwc/pcie-designware-ep.c | 151 ++++++++++++++++++ drivers/pci/controller/dwc/pcie-designware.c | 4 + drivers/pci/controller/dwc/pcie-designware.h | 2 + drivers/pci/endpoint/functions/pci-epf-test.c | 84 ++++++---- drivers/pci/endpoint/functions/pci-epf-vntb.c | 61 ++++++- drivers/pci/endpoint/pci-ep-msi.c | 149 +++++++++++++++-- drivers/pci/endpoint/pci-epc-core.c | 41 +++++ include/linux/pci-epc.h | 52 ++++++ include/linux/pci-epf.h | 23 ++- 9 files changed, 520 insertions(+), 47 deletions(-) -- 2.51.0
null
null
null
[PATCH v9 0/7] PCI: endpoint: pci-ep-msi: Add embedded doorbell fallback
On Fri, Feb 20, 2026 at 11:27:05AM +0100, Niklas Cassel wrote: Niklas, agreed, I had the same thought (ie. bind-time check could be sufficient). Thanks for the follow-up. Alok, thanks for picking it up. Best regards, Koichiro
{ "author": "Koichiro Den <den@valinux.co.jp>", "date": "Sat, 21 Feb 2026 02:53:17 +0900", "is_openbsd": false, "thread_id": "aaG5asXVV5sxRbnQ@ryzen.mbox.gz" }
lkml_critique
lkml
Hi, Some endpoint platforms cannot use a GIC ITS-backed MSI domain for EP-side doorbells. In those cases, endpoint function (EPF) drivers cannot provide a doorbell to the root complex (RC), and features such as vNTB may fall back to polling with significantly higher latency. This series adds an alternate doorbell backend based on the DesignWare PCIe controller's integrated eDMA interrupt-emulation feature. The RC rings the doorbell by doing a single 32-bit MMIO write to an eDMA doorbell location exposed in a BAR window. The EP side receives a Linux IRQ that EPF drivers can use as a doorbell interrupt, without relying on MSI message writes reaching the ITS. To support this, the series: - Adds an EPC auxiliary resource query API so EPF drivers can discover controller-integrated resources (DMA MMIO, doorbell MMIO, and DMA LL memory). - Updates DesignWare EP controllers to report integrated eDMA resources via the new API. - Updates dw-edma to provide a dedicated virtual IRQ for interrupt emulation and to perform the core-specific deassert sequence. - Updates pci-epf-test and pci-epf-vntb to reuse a pre-exposed BAR/offset and to honor per-doorbell IRQ flags. Many thanks to Frank and Niklas for their continued review and valuable feedback throughout the development of this series. The Reviewed-by tags for the last two patches are dropped due to the additional changes following Niklas' review in the v8 threads. Since the diff is small, I'd appreciate it if Frank could re-check them. Dependencies ------------ The following three series are prerequisites for this series: (1). [PATCH v2 0/4] PCI: endpoint: Doorbell-related fixes https://lore.kernel.org/linux-pci/20260217063856.3759713-1-den@valinux.co.jp/ (2). [PATCH 0/2] dmaengine: dw-edma: Interrupt-emulation doorbell support https://lore.kernel.org/dmaengine/20260215152216.3393561-1-den@valinux.co.jp/ (3). [PATCH 0/9] PCI: endpoint differentiate between disabled and reserved BARs https://lore.kernel.org/linux-pci/20260217212707.2450423-11-cassel@kernel.org/ Regarding (3): - [PATCH 2/9] and [PATCH 3/9] are strictly the prerequisites for this v9 series. In fact, they are split out from v8 series. - With [PATCH 6/9], this v9 series should allow the embedded doorbell fallback path to pass on RK3588 from the beginning. Given that, picking up the whole (3) series earlier should be the most streamlined choice. Tested on --------- I re-tested the embedded (DMA) doorbell fallback path (via pci-epf-test) on R-Car Spider boards (with this v9 series): $ ./pci_endpoint_test -t DOORBELL_TEST TAP version 13 1..1 # Starting 1 tests from 1 test cases. # RUN pcie_ep_doorbell.DOORBELL_TEST ... # OK pcie_ep_doorbell.DOORBELL_TEST ok 1 pcie_ep_doorbell.DOORBELL_TEST # PASSED: 1 / 1 tests passed. # Totals: pass:1 fail:0 xfail:0 xpass:0 skip:0 error:0 with the following message observed on the EP side: [ 82.043715] pci_epf_test pci_epf_test.0: Can't find MSI domain for EPC [ 82.044382] pci_epf_test pci_epf_test.0: Using embedded (DMA) doorbell fallback (Note: for the test to pass on R-Car Spider, one of the following was required: - echo 1048576 > functions/pci_epf_test/func1/pci_epf_test.0/bar2_size - apply https://lore.kernel.org/linux-pci/20260210160315.2272930-1-den@valinux.co.jp/) Performance test: vNTB ping latency ----------------------------------- Setup: - configfs (R-Car Spider in EP mode): cd /sys/kernel/config/pci_ep/ mkdir functions/pci_epf_vntb/func1 echo 0x1912 > functions/pci_epf_vntb/func1/vendorid echo 0x0030 > functions/pci_epf_vntb/func1/deviceid echo 32 > functions/pci_epf_vntb/func1/msi_interrupts echo 4 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/db_count echo 128 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/spad_count echo 1 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/num_mws echo 0x100000 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/mw1 echo 0x1912 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/vntb_vid echo 0x0030 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/vntb_pid echo 0x10 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/vbus_number echo 0 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/ctrl_bar echo 4 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/db_bar [*] echo 2 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/mw1_bar ln -s controllers/e65d0000.pcie-ep functions/pci_epf_vntb/func1/primary/ echo 1 > controllers/e65d0000.pcie-ep/start [*]: On R-Car Spider, a hack is currently needed to use BAR4 for the doorbell. I'll consider posting a patch for that separately. - ensure ntb_transport/ntb_netdev are loaded on both sides Results: - Without this series (pci.git main) $ ping -c 10 10.0.0.11 PING 10.0.0.11 (10.0.0.11) 56(84) bytes of data. 64 bytes from 10.0.0.11: icmp_seq=1 ttl=64 time=6.04 ms 64 bytes from 10.0.0.11: icmp_seq=2 ttl=64 time=12.6 ms 64 bytes from 10.0.0.11: icmp_seq=3 ttl=64 time=7.40 ms 64 bytes from 10.0.0.11: icmp_seq=4 ttl=64 time=5.38 ms 64 bytes from 10.0.0.11: icmp_seq=5 ttl=64 time=11.4 ms 64 bytes from 10.0.0.11: icmp_seq=6 ttl=64 time=9.42 ms 64 bytes from 10.0.0.11: icmp_seq=7 ttl=64 time=3.36 ms 64 bytes from 10.0.0.11: icmp_seq=8 ttl=64 time=9.48 ms 64 bytes from 10.0.0.11: icmp_seq=9 ttl=64 time=4.24 ms 64 bytes from 10.0.0.11: icmp_seq=10 ttl=64 time=10.4 ms - With this series (on top of pci.git main + Dependency (1), (2) and (3)) $ ping -c 10 10.0.0.11 PING 10.0.0.11 (10.0.0.11) 56(84) bytes of data. 64 bytes from 10.0.0.11: icmp_seq=1 ttl=64 time=0.845 ms 64 bytes from 10.0.0.11: icmp_seq=2 ttl=64 time=0.742 ms 64 bytes from 10.0.0.11: icmp_seq=3 ttl=64 time=0.868 ms 64 bytes from 10.0.0.11: icmp_seq=4 ttl=64 time=0.806 ms 64 bytes from 10.0.0.11: icmp_seq=5 ttl=64 time=0.951 ms 64 bytes from 10.0.0.11: icmp_seq=6 ttl=64 time=0.965 ms 64 bytes from 10.0.0.11: icmp_seq=7 ttl=64 time=0.871 ms 64 bytes from 10.0.0.11: icmp_seq=8 ttl=64 time=0.877 ms 64 bytes from 10.0.0.11: icmp_seq=9 ttl=64 time=0.938 ms 64 bytes from 10.0.0.11: icmp_seq=10 ttl=64 time=0.960 ms --- Changelog --------- * v8->v9 changes: - Add a new dependency series (3), which moved the BAR reserved-subregion framework + the RK3588 BAR4 example out of v8 (dropping the corresponding patches from this series). - pci-epf-vntb: rename the duplicate-IRQ helper and invert the return value, per Frank's review. - pci-epf-test: drop the extra size_add() doorbell-offset check, per Niklas' review. - pci-ep-msi: add a DWORD alignment check for DOORBELL_MMIO, per Niklas's review. - Carry over Reviewed-by tags for unchanged patches + drop Reviewed-by tags where code changed. - Rename the last patch subject (drop 'eDMA' word). * v7->v8 changes: - Deduplicate request_irq()/free_irq() calls based on virq (shared IRQ) rather than doorbell type, as suggested during review of v7 Patch #7. - Clean up the pci_epf_alloc_doorbell() error path, as suggested during review of v7 Patch #9. - Use range_end_overflows_t() instead of an open-coded overflow check, following discussion during review of v7 Patch #5. - Add a write-data field to the DOORBELL_MMIO aux-resource metadata and plumb it through to the embedded doorbell backend (DesignWare uses data=0). * v6->v7 changes: - Split out preparatory patches to keep the series below 10 patches. - Add support for platforms where the eDMA register block is fixed within a reserved BAR window (e.g. RK3588 BAR4) and must be reused as-is. - Introduce a dedicated virtual IRQ and irq_chip (using handle_level_irq) for interrupt-emulation doorbells instead of reusing per-channel IRQs. This avoids delivery via different IRQs on platforms with chip->nr_irqs > 1. * v5->v6 changes: - Fix a double-free in v5 Patch 8/8 caused by mixing __free(kfree) with an explicit kfree(). This is a functional bug (detectable by KASAN), hence the respin solely for this fix. Sorry for the noise. No other changes. * v4->v5 changes: - Change the series subject now that the series has evolved into a consumer-driven set focused on the embedded doorbell fallback and its in-tree users (epf-test and epf-vntb). - Drop [PATCH v4 01/09] (dw-edma per-channel interrupt routing control) from this series for now, so the series focuses on what's needed by the current consumer (i.e. the doorbell fallback implementation). - Replace the v4 embedded-doorbell "test variant + host/kselftest plumbing" with a generic embedded-doorbell fallback in pci_epf_alloc_doorbell(), including exposing required IRQ request flags to EPF drivers. - Two preparatory fix patches (Patch 6/8 and 7/8) to clean up error handling and state management ahead of Patch 8/8. - Rename *_get_remote_resource() to *_get_aux_resources() and adjust relevant variable namings and kernel docs. Discussion may continue. - Rework dw-edma per-channel metadata exposure to cache the needed info in dw_edma_chip (IRQ number + emulation doorbell offset) and consume it from the DesignWare EPC auxiliary resource provider without calling back to dw-edma. * v3->v4 changes: - Drop dma_slave_caps.hw_id and the dmaengine selfirq callback registration API. Instead, add a dw-edma specific dw_edma_chan_info() helper and extend the EPC remote resource metadata accordingly. - Add explicit acking for eDMA interrupt emulation and adjust the dw-edma IRQ path for embedded-doorbell usage. - Replace the previous EPC API smoke test with an embedded doorbell test variant (pci-epf-test + pci_endpoint_test/selftests). - Rebase onto pci.git controller/dwc commit 43d324eeb08c. * v2->v3 changes: - Replace DWC-specific helpers with a generic EPC remote resource query API. - Add pci-epf-test smoke test and host/kselftest support for the new API. - Drop the dw-edma-specific notify-only channel and polling approach ([PATCH v2 4/7] and [PATCH v2 5/7]), and rework notification handling around a generic dmaengine_(un)register_selfirq() API implemented by dw-edma. * v1->v2 changes: - Combine the two previously posted series into a single set (per Frank's suggestion). Order dmaengine/dw-edma patches first so hw_id support lands before the PCI LL-region helper, which assumes dma_slave_caps.hw_id availability. v8: https://lore.kernel.org/linux-pci/20260217080601.3808847-1-den@valinux.co.jp/ v7: https://lore.kernel.org/linux-pci/20260215163847.3522572-1-den@valinux.co.jp/ v6: https://lore.kernel.org/all/20260209125316.2132589-1-den@valinux.co.jp/ v5: https://lore.kernel.org/all/20260209062952.2049053-1-den@valinux.co.jp/ v4: https://lore.kernel.org/all/20260206172646.1556847-1-den@valinux.co.jp/ v3: https://lore.kernel.org/all/20260204145440.950609-1-den@valinux.co.jp/ v2: https://lore.kernel.org/all/20260127033420.3460579-1-den@valinux.co.jp/ v1: https://lore.kernel.org/dmaengine/20260126073652.3293564-1-den@valinux.co.jp/ + https://lore.kernel.org/linux-pci/20260126071550.3233631-1-den@valinux.co.jp/ Thanks for reviewing. Koichiro Den (7): PCI: endpoint: Add auxiliary resource query API PCI: dwc: Record integrated eDMA register window PCI: dwc: ep: Expose integrated eDMA resources via EPC aux-resource API PCI: endpoint: pci-ep-msi: Refactor doorbell allocation for new backends PCI: endpoint: pci-epf-vntb: Reuse pre-exposed doorbells and IRQ flags PCI: endpoint: pci-epf-test: Reuse pre-exposed doorbell targets PCI: endpoint: pci-ep-msi: Add embedded doorbell fallback .../pci/controller/dwc/pcie-designware-ep.c | 151 ++++++++++++++++++ drivers/pci/controller/dwc/pcie-designware.c | 4 + drivers/pci/controller/dwc/pcie-designware.h | 2 + drivers/pci/endpoint/functions/pci-epf-test.c | 84 ++++++---- drivers/pci/endpoint/functions/pci-epf-vntb.c | 61 ++++++- drivers/pci/endpoint/pci-ep-msi.c | 149 +++++++++++++++-- drivers/pci/endpoint/pci-epc-core.c | 41 +++++ include/linux/pci-epc.h | 52 ++++++ include/linux/pci-epf.h | 23 ++- 9 files changed, 520 insertions(+), 47 deletions(-) -- 2.51.0
null
null
null
[PATCH v9 0/7] PCI: endpoint: pci-ep-msi: Add embedded doorbell fallback
On Sat, Feb 21, 2026 at 02:42:37AM +0900, Koichiro Den wrote: (Not 9/9 but 7/7. Sorry for the confusion.) (Not 9/9 but 7/7. Same typo as above. Sorry.) Koichiro
{ "author": "Koichiro Den <den@valinux.co.jp>", "date": "Sat, 21 Feb 2026 02:59:34 +0900", "is_openbsd": false, "thread_id": "aaG5asXVV5sxRbnQ@ryzen.mbox.gz" }
lkml_critique
lkml
Hi, Some endpoint platforms cannot use a GIC ITS-backed MSI domain for EP-side doorbells. In those cases, endpoint function (EPF) drivers cannot provide a doorbell to the root complex (RC), and features such as vNTB may fall back to polling with significantly higher latency. This series adds an alternate doorbell backend based on the DesignWare PCIe controller's integrated eDMA interrupt-emulation feature. The RC rings the doorbell by doing a single 32-bit MMIO write to an eDMA doorbell location exposed in a BAR window. The EP side receives a Linux IRQ that EPF drivers can use as a doorbell interrupt, without relying on MSI message writes reaching the ITS. To support this, the series: - Adds an EPC auxiliary resource query API so EPF drivers can discover controller-integrated resources (DMA MMIO, doorbell MMIO, and DMA LL memory). - Updates DesignWare EP controllers to report integrated eDMA resources via the new API. - Updates dw-edma to provide a dedicated virtual IRQ for interrupt emulation and to perform the core-specific deassert sequence. - Updates pci-epf-test and pci-epf-vntb to reuse a pre-exposed BAR/offset and to honor per-doorbell IRQ flags. Many thanks to Frank and Niklas for their continued review and valuable feedback throughout the development of this series. The Reviewed-by tags for the last two patches are dropped due to the additional changes following Niklas' review in the v8 threads. Since the diff is small, I'd appreciate it if Frank could re-check them. Dependencies ------------ The following three series are prerequisites for this series: (1). [PATCH v2 0/4] PCI: endpoint: Doorbell-related fixes https://lore.kernel.org/linux-pci/20260217063856.3759713-1-den@valinux.co.jp/ (2). [PATCH 0/2] dmaengine: dw-edma: Interrupt-emulation doorbell support https://lore.kernel.org/dmaengine/20260215152216.3393561-1-den@valinux.co.jp/ (3). [PATCH 0/9] PCI: endpoint differentiate between disabled and reserved BARs https://lore.kernel.org/linux-pci/20260217212707.2450423-11-cassel@kernel.org/ Regarding (3): - [PATCH 2/9] and [PATCH 3/9] are strictly the prerequisites for this v9 series. In fact, they are split out from v8 series. - With [PATCH 6/9], this v9 series should allow the embedded doorbell fallback path to pass on RK3588 from the beginning. Given that, picking up the whole (3) series earlier should be the most streamlined choice. Tested on --------- I re-tested the embedded (DMA) doorbell fallback path (via pci-epf-test) on R-Car Spider boards (with this v9 series): $ ./pci_endpoint_test -t DOORBELL_TEST TAP version 13 1..1 # Starting 1 tests from 1 test cases. # RUN pcie_ep_doorbell.DOORBELL_TEST ... # OK pcie_ep_doorbell.DOORBELL_TEST ok 1 pcie_ep_doorbell.DOORBELL_TEST # PASSED: 1 / 1 tests passed. # Totals: pass:1 fail:0 xfail:0 xpass:0 skip:0 error:0 with the following message observed on the EP side: [ 82.043715] pci_epf_test pci_epf_test.0: Can't find MSI domain for EPC [ 82.044382] pci_epf_test pci_epf_test.0: Using embedded (DMA) doorbell fallback (Note: for the test to pass on R-Car Spider, one of the following was required: - echo 1048576 > functions/pci_epf_test/func1/pci_epf_test.0/bar2_size - apply https://lore.kernel.org/linux-pci/20260210160315.2272930-1-den@valinux.co.jp/) Performance test: vNTB ping latency ----------------------------------- Setup: - configfs (R-Car Spider in EP mode): cd /sys/kernel/config/pci_ep/ mkdir functions/pci_epf_vntb/func1 echo 0x1912 > functions/pci_epf_vntb/func1/vendorid echo 0x0030 > functions/pci_epf_vntb/func1/deviceid echo 32 > functions/pci_epf_vntb/func1/msi_interrupts echo 4 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/db_count echo 128 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/spad_count echo 1 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/num_mws echo 0x100000 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/mw1 echo 0x1912 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/vntb_vid echo 0x0030 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/vntb_pid echo 0x10 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/vbus_number echo 0 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/ctrl_bar echo 4 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/db_bar [*] echo 2 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/mw1_bar ln -s controllers/e65d0000.pcie-ep functions/pci_epf_vntb/func1/primary/ echo 1 > controllers/e65d0000.pcie-ep/start [*]: On R-Car Spider, a hack is currently needed to use BAR4 for the doorbell. I'll consider posting a patch for that separately. - ensure ntb_transport/ntb_netdev are loaded on both sides Results: - Without this series (pci.git main) $ ping -c 10 10.0.0.11 PING 10.0.0.11 (10.0.0.11) 56(84) bytes of data. 64 bytes from 10.0.0.11: icmp_seq=1 ttl=64 time=6.04 ms 64 bytes from 10.0.0.11: icmp_seq=2 ttl=64 time=12.6 ms 64 bytes from 10.0.0.11: icmp_seq=3 ttl=64 time=7.40 ms 64 bytes from 10.0.0.11: icmp_seq=4 ttl=64 time=5.38 ms 64 bytes from 10.0.0.11: icmp_seq=5 ttl=64 time=11.4 ms 64 bytes from 10.0.0.11: icmp_seq=6 ttl=64 time=9.42 ms 64 bytes from 10.0.0.11: icmp_seq=7 ttl=64 time=3.36 ms 64 bytes from 10.0.0.11: icmp_seq=8 ttl=64 time=9.48 ms 64 bytes from 10.0.0.11: icmp_seq=9 ttl=64 time=4.24 ms 64 bytes from 10.0.0.11: icmp_seq=10 ttl=64 time=10.4 ms - With this series (on top of pci.git main + Dependency (1), (2) and (3)) $ ping -c 10 10.0.0.11 PING 10.0.0.11 (10.0.0.11) 56(84) bytes of data. 64 bytes from 10.0.0.11: icmp_seq=1 ttl=64 time=0.845 ms 64 bytes from 10.0.0.11: icmp_seq=2 ttl=64 time=0.742 ms 64 bytes from 10.0.0.11: icmp_seq=3 ttl=64 time=0.868 ms 64 bytes from 10.0.0.11: icmp_seq=4 ttl=64 time=0.806 ms 64 bytes from 10.0.0.11: icmp_seq=5 ttl=64 time=0.951 ms 64 bytes from 10.0.0.11: icmp_seq=6 ttl=64 time=0.965 ms 64 bytes from 10.0.0.11: icmp_seq=7 ttl=64 time=0.871 ms 64 bytes from 10.0.0.11: icmp_seq=8 ttl=64 time=0.877 ms 64 bytes from 10.0.0.11: icmp_seq=9 ttl=64 time=0.938 ms 64 bytes from 10.0.0.11: icmp_seq=10 ttl=64 time=0.960 ms --- Changelog --------- * v8->v9 changes: - Add a new dependency series (3), which moved the BAR reserved-subregion framework + the RK3588 BAR4 example out of v8 (dropping the corresponding patches from this series). - pci-epf-vntb: rename the duplicate-IRQ helper and invert the return value, per Frank's review. - pci-epf-test: drop the extra size_add() doorbell-offset check, per Niklas' review. - pci-ep-msi: add a DWORD alignment check for DOORBELL_MMIO, per Niklas's review. - Carry over Reviewed-by tags for unchanged patches + drop Reviewed-by tags where code changed. - Rename the last patch subject (drop 'eDMA' word). * v7->v8 changes: - Deduplicate request_irq()/free_irq() calls based on virq (shared IRQ) rather than doorbell type, as suggested during review of v7 Patch #7. - Clean up the pci_epf_alloc_doorbell() error path, as suggested during review of v7 Patch #9. - Use range_end_overflows_t() instead of an open-coded overflow check, following discussion during review of v7 Patch #5. - Add a write-data field to the DOORBELL_MMIO aux-resource metadata and plumb it through to the embedded doorbell backend (DesignWare uses data=0). * v6->v7 changes: - Split out preparatory patches to keep the series below 10 patches. - Add support for platforms where the eDMA register block is fixed within a reserved BAR window (e.g. RK3588 BAR4) and must be reused as-is. - Introduce a dedicated virtual IRQ and irq_chip (using handle_level_irq) for interrupt-emulation doorbells instead of reusing per-channel IRQs. This avoids delivery via different IRQs on platforms with chip->nr_irqs > 1. * v5->v6 changes: - Fix a double-free in v5 Patch 8/8 caused by mixing __free(kfree) with an explicit kfree(). This is a functional bug (detectable by KASAN), hence the respin solely for this fix. Sorry for the noise. No other changes. * v4->v5 changes: - Change the series subject now that the series has evolved into a consumer-driven set focused on the embedded doorbell fallback and its in-tree users (epf-test and epf-vntb). - Drop [PATCH v4 01/09] (dw-edma per-channel interrupt routing control) from this series for now, so the series focuses on what's needed by the current consumer (i.e. the doorbell fallback implementation). - Replace the v4 embedded-doorbell "test variant + host/kselftest plumbing" with a generic embedded-doorbell fallback in pci_epf_alloc_doorbell(), including exposing required IRQ request flags to EPF drivers. - Two preparatory fix patches (Patch 6/8 and 7/8) to clean up error handling and state management ahead of Patch 8/8. - Rename *_get_remote_resource() to *_get_aux_resources() and adjust relevant variable namings and kernel docs. Discussion may continue. - Rework dw-edma per-channel metadata exposure to cache the needed info in dw_edma_chip (IRQ number + emulation doorbell offset) and consume it from the DesignWare EPC auxiliary resource provider without calling back to dw-edma. * v3->v4 changes: - Drop dma_slave_caps.hw_id and the dmaengine selfirq callback registration API. Instead, add a dw-edma specific dw_edma_chan_info() helper and extend the EPC remote resource metadata accordingly. - Add explicit acking for eDMA interrupt emulation and adjust the dw-edma IRQ path for embedded-doorbell usage. - Replace the previous EPC API smoke test with an embedded doorbell test variant (pci-epf-test + pci_endpoint_test/selftests). - Rebase onto pci.git controller/dwc commit 43d324eeb08c. * v2->v3 changes: - Replace DWC-specific helpers with a generic EPC remote resource query API. - Add pci-epf-test smoke test and host/kselftest support for the new API. - Drop the dw-edma-specific notify-only channel and polling approach ([PATCH v2 4/7] and [PATCH v2 5/7]), and rework notification handling around a generic dmaengine_(un)register_selfirq() API implemented by dw-edma. * v1->v2 changes: - Combine the two previously posted series into a single set (per Frank's suggestion). Order dmaengine/dw-edma patches first so hw_id support lands before the PCI LL-region helper, which assumes dma_slave_caps.hw_id availability. v8: https://lore.kernel.org/linux-pci/20260217080601.3808847-1-den@valinux.co.jp/ v7: https://lore.kernel.org/linux-pci/20260215163847.3522572-1-den@valinux.co.jp/ v6: https://lore.kernel.org/all/20260209125316.2132589-1-den@valinux.co.jp/ v5: https://lore.kernel.org/all/20260209062952.2049053-1-den@valinux.co.jp/ v4: https://lore.kernel.org/all/20260206172646.1556847-1-den@valinux.co.jp/ v3: https://lore.kernel.org/all/20260204145440.950609-1-den@valinux.co.jp/ v2: https://lore.kernel.org/all/20260127033420.3460579-1-den@valinux.co.jp/ v1: https://lore.kernel.org/dmaengine/20260126073652.3293564-1-den@valinux.co.jp/ + https://lore.kernel.org/linux-pci/20260126071550.3233631-1-den@valinux.co.jp/ Thanks for reviewing. Koichiro Den (7): PCI: endpoint: Add auxiliary resource query API PCI: dwc: Record integrated eDMA register window PCI: dwc: ep: Expose integrated eDMA resources via EPC aux-resource API PCI: endpoint: pci-ep-msi: Refactor doorbell allocation for new backends PCI: endpoint: pci-epf-vntb: Reuse pre-exposed doorbells and IRQ flags PCI: endpoint: pci-epf-test: Reuse pre-exposed doorbell targets PCI: endpoint: pci-ep-msi: Add embedded doorbell fallback .../pci/controller/dwc/pcie-designware-ep.c | 151 ++++++++++++++++++ drivers/pci/controller/dwc/pcie-designware.c | 4 + drivers/pci/controller/dwc/pcie-designware.h | 2 + drivers/pci/endpoint/functions/pci-epf-test.c | 84 ++++++---- drivers/pci/endpoint/functions/pci-epf-vntb.c | 61 ++++++- drivers/pci/endpoint/pci-ep-msi.c | 149 +++++++++++++++-- drivers/pci/endpoint/pci-epc-core.c | 41 +++++ include/linux/pci-epc.h | 52 ++++++ include/linux/pci-epf.h | 23 ++- 9 files changed, 520 insertions(+), 47 deletions(-) -- 2.51.0
null
null
null
[PATCH v9 0/7] PCI: endpoint: pci-ep-msi: Add embedded doorbell fallback
On Thu, Feb 19, 2026 at 05:13:11PM +0900, Koichiro Den wrote: (snip) For the series: Tested-by: Niklas Cassel <cassel@kernel.org>
{ "author": "Niklas Cassel <cassel@kernel.org>", "date": "Fri, 27 Feb 2026 16:06:21 +0100", "is_openbsd": false, "thread_id": "aaG5asXVV5sxRbnQ@ryzen.mbox.gz" }
lkml_critique
lkml
Hi, Some endpoint platforms cannot use a GIC ITS-backed MSI domain for EP-side doorbells. In those cases, endpoint function (EPF) drivers cannot provide a doorbell to the root complex (RC), and features such as vNTB may fall back to polling with significantly higher latency. This series adds an alternate doorbell backend based on the DesignWare PCIe controller's integrated eDMA interrupt-emulation feature. The RC rings the doorbell by doing a single 32-bit MMIO write to an eDMA doorbell location exposed in a BAR window. The EP side receives a Linux IRQ that EPF drivers can use as a doorbell interrupt, without relying on MSI message writes reaching the ITS. To support this, the series: - Adds an EPC auxiliary resource query API so EPF drivers can discover controller-integrated resources (DMA MMIO, doorbell MMIO, and DMA LL memory). - Updates DesignWare EP controllers to report integrated eDMA resources via the new API. - Updates dw-edma to provide a dedicated virtual IRQ for interrupt emulation and to perform the core-specific deassert sequence. - Updates pci-epf-test and pci-epf-vntb to reuse a pre-exposed BAR/offset and to honor per-doorbell IRQ flags. Many thanks to Frank and Niklas for their continued review and valuable feedback throughout the development of this series. The Reviewed-by tags for the last two patches are dropped due to the additional changes following Niklas' review in the v8 threads. Since the diff is small, I'd appreciate it if Frank could re-check them. Dependencies ------------ The following three series are prerequisites for this series: (1). [PATCH v2 0/4] PCI: endpoint: Doorbell-related fixes https://lore.kernel.org/linux-pci/20260217063856.3759713-1-den@valinux.co.jp/ (2). [PATCH 0/2] dmaengine: dw-edma: Interrupt-emulation doorbell support https://lore.kernel.org/dmaengine/20260215152216.3393561-1-den@valinux.co.jp/ (3). [PATCH 0/9] PCI: endpoint differentiate between disabled and reserved BARs https://lore.kernel.org/linux-pci/20260217212707.2450423-11-cassel@kernel.org/ Regarding (3): - [PATCH 2/9] and [PATCH 3/9] are strictly the prerequisites for this v9 series. In fact, they are split out from v8 series. - With [PATCH 6/9], this v9 series should allow the embedded doorbell fallback path to pass on RK3588 from the beginning. Given that, picking up the whole (3) series earlier should be the most streamlined choice. Tested on --------- I re-tested the embedded (DMA) doorbell fallback path (via pci-epf-test) on R-Car Spider boards (with this v9 series): $ ./pci_endpoint_test -t DOORBELL_TEST TAP version 13 1..1 # Starting 1 tests from 1 test cases. # RUN pcie_ep_doorbell.DOORBELL_TEST ... # OK pcie_ep_doorbell.DOORBELL_TEST ok 1 pcie_ep_doorbell.DOORBELL_TEST # PASSED: 1 / 1 tests passed. # Totals: pass:1 fail:0 xfail:0 xpass:0 skip:0 error:0 with the following message observed on the EP side: [ 82.043715] pci_epf_test pci_epf_test.0: Can't find MSI domain for EPC [ 82.044382] pci_epf_test pci_epf_test.0: Using embedded (DMA) doorbell fallback (Note: for the test to pass on R-Car Spider, one of the following was required: - echo 1048576 > functions/pci_epf_test/func1/pci_epf_test.0/bar2_size - apply https://lore.kernel.org/linux-pci/20260210160315.2272930-1-den@valinux.co.jp/) Performance test: vNTB ping latency ----------------------------------- Setup: - configfs (R-Car Spider in EP mode): cd /sys/kernel/config/pci_ep/ mkdir functions/pci_epf_vntb/func1 echo 0x1912 > functions/pci_epf_vntb/func1/vendorid echo 0x0030 > functions/pci_epf_vntb/func1/deviceid echo 32 > functions/pci_epf_vntb/func1/msi_interrupts echo 4 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/db_count echo 128 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/spad_count echo 1 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/num_mws echo 0x100000 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/mw1 echo 0x1912 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/vntb_vid echo 0x0030 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/vntb_pid echo 0x10 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/vbus_number echo 0 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/ctrl_bar echo 4 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/db_bar [*] echo 2 > functions/pci_epf_vntb/func1/pci_epf_vntb.0/mw1_bar ln -s controllers/e65d0000.pcie-ep functions/pci_epf_vntb/func1/primary/ echo 1 > controllers/e65d0000.pcie-ep/start [*]: On R-Car Spider, a hack is currently needed to use BAR4 for the doorbell. I'll consider posting a patch for that separately. - ensure ntb_transport/ntb_netdev are loaded on both sides Results: - Without this series (pci.git main) $ ping -c 10 10.0.0.11 PING 10.0.0.11 (10.0.0.11) 56(84) bytes of data. 64 bytes from 10.0.0.11: icmp_seq=1 ttl=64 time=6.04 ms 64 bytes from 10.0.0.11: icmp_seq=2 ttl=64 time=12.6 ms 64 bytes from 10.0.0.11: icmp_seq=3 ttl=64 time=7.40 ms 64 bytes from 10.0.0.11: icmp_seq=4 ttl=64 time=5.38 ms 64 bytes from 10.0.0.11: icmp_seq=5 ttl=64 time=11.4 ms 64 bytes from 10.0.0.11: icmp_seq=6 ttl=64 time=9.42 ms 64 bytes from 10.0.0.11: icmp_seq=7 ttl=64 time=3.36 ms 64 bytes from 10.0.0.11: icmp_seq=8 ttl=64 time=9.48 ms 64 bytes from 10.0.0.11: icmp_seq=9 ttl=64 time=4.24 ms 64 bytes from 10.0.0.11: icmp_seq=10 ttl=64 time=10.4 ms - With this series (on top of pci.git main + Dependency (1), (2) and (3)) $ ping -c 10 10.0.0.11 PING 10.0.0.11 (10.0.0.11) 56(84) bytes of data. 64 bytes from 10.0.0.11: icmp_seq=1 ttl=64 time=0.845 ms 64 bytes from 10.0.0.11: icmp_seq=2 ttl=64 time=0.742 ms 64 bytes from 10.0.0.11: icmp_seq=3 ttl=64 time=0.868 ms 64 bytes from 10.0.0.11: icmp_seq=4 ttl=64 time=0.806 ms 64 bytes from 10.0.0.11: icmp_seq=5 ttl=64 time=0.951 ms 64 bytes from 10.0.0.11: icmp_seq=6 ttl=64 time=0.965 ms 64 bytes from 10.0.0.11: icmp_seq=7 ttl=64 time=0.871 ms 64 bytes from 10.0.0.11: icmp_seq=8 ttl=64 time=0.877 ms 64 bytes from 10.0.0.11: icmp_seq=9 ttl=64 time=0.938 ms 64 bytes from 10.0.0.11: icmp_seq=10 ttl=64 time=0.960 ms --- Changelog --------- * v8->v9 changes: - Add a new dependency series (3), which moved the BAR reserved-subregion framework + the RK3588 BAR4 example out of v8 (dropping the corresponding patches from this series). - pci-epf-vntb: rename the duplicate-IRQ helper and invert the return value, per Frank's review. - pci-epf-test: drop the extra size_add() doorbell-offset check, per Niklas' review. - pci-ep-msi: add a DWORD alignment check for DOORBELL_MMIO, per Niklas's review. - Carry over Reviewed-by tags for unchanged patches + drop Reviewed-by tags where code changed. - Rename the last patch subject (drop 'eDMA' word). * v7->v8 changes: - Deduplicate request_irq()/free_irq() calls based on virq (shared IRQ) rather than doorbell type, as suggested during review of v7 Patch #7. - Clean up the pci_epf_alloc_doorbell() error path, as suggested during review of v7 Patch #9. - Use range_end_overflows_t() instead of an open-coded overflow check, following discussion during review of v7 Patch #5. - Add a write-data field to the DOORBELL_MMIO aux-resource metadata and plumb it through to the embedded doorbell backend (DesignWare uses data=0). * v6->v7 changes: - Split out preparatory patches to keep the series below 10 patches. - Add support for platforms where the eDMA register block is fixed within a reserved BAR window (e.g. RK3588 BAR4) and must be reused as-is. - Introduce a dedicated virtual IRQ and irq_chip (using handle_level_irq) for interrupt-emulation doorbells instead of reusing per-channel IRQs. This avoids delivery via different IRQs on platforms with chip->nr_irqs > 1. * v5->v6 changes: - Fix a double-free in v5 Patch 8/8 caused by mixing __free(kfree) with an explicit kfree(). This is a functional bug (detectable by KASAN), hence the respin solely for this fix. Sorry for the noise. No other changes. * v4->v5 changes: - Change the series subject now that the series has evolved into a consumer-driven set focused on the embedded doorbell fallback and its in-tree users (epf-test and epf-vntb). - Drop [PATCH v4 01/09] (dw-edma per-channel interrupt routing control) from this series for now, so the series focuses on what's needed by the current consumer (i.e. the doorbell fallback implementation). - Replace the v4 embedded-doorbell "test variant + host/kselftest plumbing" with a generic embedded-doorbell fallback in pci_epf_alloc_doorbell(), including exposing required IRQ request flags to EPF drivers. - Two preparatory fix patches (Patch 6/8 and 7/8) to clean up error handling and state management ahead of Patch 8/8. - Rename *_get_remote_resource() to *_get_aux_resources() and adjust relevant variable namings and kernel docs. Discussion may continue. - Rework dw-edma per-channel metadata exposure to cache the needed info in dw_edma_chip (IRQ number + emulation doorbell offset) and consume it from the DesignWare EPC auxiliary resource provider without calling back to dw-edma. * v3->v4 changes: - Drop dma_slave_caps.hw_id and the dmaengine selfirq callback registration API. Instead, add a dw-edma specific dw_edma_chan_info() helper and extend the EPC remote resource metadata accordingly. - Add explicit acking for eDMA interrupt emulation and adjust the dw-edma IRQ path for embedded-doorbell usage. - Replace the previous EPC API smoke test with an embedded doorbell test variant (pci-epf-test + pci_endpoint_test/selftests). - Rebase onto pci.git controller/dwc commit 43d324eeb08c. * v2->v3 changes: - Replace DWC-specific helpers with a generic EPC remote resource query API. - Add pci-epf-test smoke test and host/kselftest support for the new API. - Drop the dw-edma-specific notify-only channel and polling approach ([PATCH v2 4/7] and [PATCH v2 5/7]), and rework notification handling around a generic dmaengine_(un)register_selfirq() API implemented by dw-edma. * v1->v2 changes: - Combine the two previously posted series into a single set (per Frank's suggestion). Order dmaengine/dw-edma patches first so hw_id support lands before the PCI LL-region helper, which assumes dma_slave_caps.hw_id availability. v8: https://lore.kernel.org/linux-pci/20260217080601.3808847-1-den@valinux.co.jp/ v7: https://lore.kernel.org/linux-pci/20260215163847.3522572-1-den@valinux.co.jp/ v6: https://lore.kernel.org/all/20260209125316.2132589-1-den@valinux.co.jp/ v5: https://lore.kernel.org/all/20260209062952.2049053-1-den@valinux.co.jp/ v4: https://lore.kernel.org/all/20260206172646.1556847-1-den@valinux.co.jp/ v3: https://lore.kernel.org/all/20260204145440.950609-1-den@valinux.co.jp/ v2: https://lore.kernel.org/all/20260127033420.3460579-1-den@valinux.co.jp/ v1: https://lore.kernel.org/dmaengine/20260126073652.3293564-1-den@valinux.co.jp/ + https://lore.kernel.org/linux-pci/20260126071550.3233631-1-den@valinux.co.jp/ Thanks for reviewing. Koichiro Den (7): PCI: endpoint: Add auxiliary resource query API PCI: dwc: Record integrated eDMA register window PCI: dwc: ep: Expose integrated eDMA resources via EPC aux-resource API PCI: endpoint: pci-ep-msi: Refactor doorbell allocation for new backends PCI: endpoint: pci-epf-vntb: Reuse pre-exposed doorbells and IRQ flags PCI: endpoint: pci-epf-test: Reuse pre-exposed doorbell targets PCI: endpoint: pci-ep-msi: Add embedded doorbell fallback .../pci/controller/dwc/pcie-designware-ep.c | 151 ++++++++++++++++++ drivers/pci/controller/dwc/pcie-designware.c | 4 + drivers/pci/controller/dwc/pcie-designware.h | 2 + drivers/pci/endpoint/functions/pci-epf-test.c | 84 ++++++---- drivers/pci/endpoint/functions/pci-epf-vntb.c | 61 ++++++- drivers/pci/endpoint/pci-ep-msi.c | 149 +++++++++++++++-- drivers/pci/endpoint/pci-epc-core.c | 41 +++++ include/linux/pci-epc.h | 52 ++++++ include/linux/pci-epf.h | 23 ++- 9 files changed, 520 insertions(+), 47 deletions(-) -- 2.51.0
null
null
null
[PATCH v9 0/7] PCI: endpoint: pci-ep-msi: Add embedded doorbell fallback
On Sat, Feb 21, 2026 at 02:42:35AM +0900, Koichiro Den wrote: These patches are for NTB/vNTB: If the diff you pasted above is all you need for pci-epf-test to pass the doorbell test case when running against a PCI endpoint with IOMMU enabled, then I suggest you just send a v10 with those changes included, without any additional dependencies. I understand that you would need additional dependencies for vNTB to be able to use eDMA doorbell on a PCI endpoint with IOMMU enabled. Perhaps, drop the vNTB changes from this series, focus only on pci-epf-test, get this series merged, and then submit an follow up series that adds eDMA doorbells with IOMMU support for vNTB? Kind regards, Niklas
{ "author": "Niklas Cassel <cassel@kernel.org>", "date": "Fri, 27 Feb 2026 16:34:02 +0100", "is_openbsd": false, "thread_id": "aaG5asXVV5sxRbnQ@ryzen.mbox.gz" }
lkml_critique
lkml
From: Li RongQing <lirongqing@baidu.com> Currently, MTT (Memory Translation Table) buffers are allocated without NUMA awareness using kzalloc() and vzalloc(), which allocate memory on the NUMA node of the calling CPU. This can lead to cross-node memory access latencies if the erdma device is attached to a different NUMA socket. Switch to kzalloc_node() and vzalloc_node() to ensure MTT buffers are allocated on the local NUMA node of the PCIe device (dev->attrs.numa_node). This reduces latency for hardware access and improves performance. Signed-off-by: Li RongQing <lirongqing@baidu.com> --- drivers/infiniband/hw/erdma/erdma_verbs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/erdma/erdma_verbs.c b/drivers/infiniband/hw/erdma/erdma_verbs.c index 9f74aad..58da6ef 100644 --- a/drivers/infiniband/hw/erdma/erdma_verbs.c +++ b/drivers/infiniband/hw/erdma/erdma_verbs.c @@ -604,7 +604,7 @@ static struct erdma_mtt *erdma_create_cont_mtt(struct erdma_dev *dev, return ERR_PTR(-ENOMEM); mtt->size = size; - mtt->buf = kzalloc(mtt->size, GFP_KERNEL); + mtt->buf = kzalloc_node(mtt->size, GFP_KERNEL, dev->attrs.numa_node); if (!mtt->buf) goto err_free_mtt; @@ -729,7 +729,7 @@ static struct erdma_mtt *erdma_create_scatter_mtt(struct erdma_dev *dev, return ERR_PTR(-ENOMEM); mtt->size = ALIGN(size, PAGE_SIZE); - mtt->buf = vzalloc(mtt->size); + mtt->buf = vzalloc_node(mtt->size, dev->attrs.numa_node); mtt->continuous = false; if (!mtt->buf) goto err_free_mtt; -- 2.9.4
null
null
null
[PATCH][rdma-next] RDMA/erdma: Use NUMA-aware allocation for MTT tables
On 2/25/26 4:51 PM, lirongqing wrote: Hi, Li RongQing, Thanks for the patch. However, I think it is better to keep the current behavior, for the following reasons: 1. This path is in the control plane, so allocating memory from a remote NUMA node should not have a noticeable performance impact. 2. With this change, the driver may fail the allocation when the local NUMA node is out of memory, even if other nodes still have available memory. Thanks, Cheng Xu
{ "author": "Cheng Xu <chengyou@linux.alibaba.com>", "date": "Wed, 25 Feb 2026 19:33:49 +0800", "is_openbsd": false, "thread_id": "20260227145534.GL44359@ziepe.ca.mbox.gz" }
lkml_critique
lkml
From: Li RongQing <lirongqing@baidu.com> Currently, MTT (Memory Translation Table) buffers are allocated without NUMA awareness using kzalloc() and vzalloc(), which allocate memory on the NUMA node of the calling CPU. This can lead to cross-node memory access latencies if the erdma device is attached to a different NUMA socket. Switch to kzalloc_node() and vzalloc_node() to ensure MTT buffers are allocated on the local NUMA node of the PCIe device (dev->attrs.numa_node). This reduces latency for hardware access and improves performance. Signed-off-by: Li RongQing <lirongqing@baidu.com> --- drivers/infiniband/hw/erdma/erdma_verbs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/erdma/erdma_verbs.c b/drivers/infiniband/hw/erdma/erdma_verbs.c index 9f74aad..58da6ef 100644 --- a/drivers/infiniband/hw/erdma/erdma_verbs.c +++ b/drivers/infiniband/hw/erdma/erdma_verbs.c @@ -604,7 +604,7 @@ static struct erdma_mtt *erdma_create_cont_mtt(struct erdma_dev *dev, return ERR_PTR(-ENOMEM); mtt->size = size; - mtt->buf = kzalloc(mtt->size, GFP_KERNEL); + mtt->buf = kzalloc_node(mtt->size, GFP_KERNEL, dev->attrs.numa_node); if (!mtt->buf) goto err_free_mtt; @@ -729,7 +729,7 @@ static struct erdma_mtt *erdma_create_scatter_mtt(struct erdma_dev *dev, return ERR_PTR(-ENOMEM); mtt->size = ALIGN(size, PAGE_SIZE); - mtt->buf = vzalloc(mtt->size); + mtt->buf = vzalloc_node(mtt->size, dev->attrs.numa_node); mtt->continuous = false; if (!mtt->buf) goto err_free_mtt; -- 2.9.4
null
null
null
[PATCH][rdma-next] RDMA/erdma: Use NUMA-aware allocation for MTT tables
When kmalloc_node() is called without __GFP_THISNODE and the target node lacks sufficient memory, SLUB allocates a folio from a different node other than the requested node. So I think this is not a problem. [Li,Rongqing]
{ "author": "\"Li,Rongqing(ACG CCN)\" <lirongqing@baidu.com>", "date": "Wed, 25 Feb 2026 12:07:05 +0000", "is_openbsd": false, "thread_id": "20260227145534.GL44359@ziepe.ca.mbox.gz" }
lkml_critique
lkml
From: Li RongQing <lirongqing@baidu.com> Currently, MTT (Memory Translation Table) buffers are allocated without NUMA awareness using kzalloc() and vzalloc(), which allocate memory on the NUMA node of the calling CPU. This can lead to cross-node memory access latencies if the erdma device is attached to a different NUMA socket. Switch to kzalloc_node() and vzalloc_node() to ensure MTT buffers are allocated on the local NUMA node of the PCIe device (dev->attrs.numa_node). This reduces latency for hardware access and improves performance. Signed-off-by: Li RongQing <lirongqing@baidu.com> --- drivers/infiniband/hw/erdma/erdma_verbs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/erdma/erdma_verbs.c b/drivers/infiniband/hw/erdma/erdma_verbs.c index 9f74aad..58da6ef 100644 --- a/drivers/infiniband/hw/erdma/erdma_verbs.c +++ b/drivers/infiniband/hw/erdma/erdma_verbs.c @@ -604,7 +604,7 @@ static struct erdma_mtt *erdma_create_cont_mtt(struct erdma_dev *dev, return ERR_PTR(-ENOMEM); mtt->size = size; - mtt->buf = kzalloc(mtt->size, GFP_KERNEL); + mtt->buf = kzalloc_node(mtt->size, GFP_KERNEL, dev->attrs.numa_node); if (!mtt->buf) goto err_free_mtt; @@ -729,7 +729,7 @@ static struct erdma_mtt *erdma_create_scatter_mtt(struct erdma_dev *dev, return ERR_PTR(-ENOMEM); mtt->size = ALIGN(size, PAGE_SIZE); - mtt->buf = vzalloc(mtt->size); + mtt->buf = vzalloc_node(mtt->size, dev->attrs.numa_node); mtt->continuous = false; if (!mtt->buf) goto err_free_mtt; -- 2.9.4
null
null
null
[PATCH][rdma-next] RDMA/erdma: Use NUMA-aware allocation for MTT tables
On 2/25/26 8:07 PM, Li,Rongqing(ACG CCN) wrote: This is rarely happen in our chip. You are right, thank you for pointing out this. Cheng Xu
{ "author": "Cheng Xu <chengyou@linux.alibaba.com>", "date": "Thu, 26 Feb 2026 09:50:00 +0800", "is_openbsd": false, "thread_id": "20260227145534.GL44359@ziepe.ca.mbox.gz" }
lkml_critique
lkml
From: Li RongQing <lirongqing@baidu.com> Currently, MTT (Memory Translation Table) buffers are allocated without NUMA awareness using kzalloc() and vzalloc(), which allocate memory on the NUMA node of the calling CPU. This can lead to cross-node memory access latencies if the erdma device is attached to a different NUMA socket. Switch to kzalloc_node() and vzalloc_node() to ensure MTT buffers are allocated on the local NUMA node of the PCIe device (dev->attrs.numa_node). This reduces latency for hardware access and improves performance. Signed-off-by: Li RongQing <lirongqing@baidu.com> --- drivers/infiniband/hw/erdma/erdma_verbs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/erdma/erdma_verbs.c b/drivers/infiniband/hw/erdma/erdma_verbs.c index 9f74aad..58da6ef 100644 --- a/drivers/infiniband/hw/erdma/erdma_verbs.c +++ b/drivers/infiniband/hw/erdma/erdma_verbs.c @@ -604,7 +604,7 @@ static struct erdma_mtt *erdma_create_cont_mtt(struct erdma_dev *dev, return ERR_PTR(-ENOMEM); mtt->size = size; - mtt->buf = kzalloc(mtt->size, GFP_KERNEL); + mtt->buf = kzalloc_node(mtt->size, GFP_KERNEL, dev->attrs.numa_node); if (!mtt->buf) goto err_free_mtt; @@ -729,7 +729,7 @@ static struct erdma_mtt *erdma_create_scatter_mtt(struct erdma_dev *dev, return ERR_PTR(-ENOMEM); mtt->size = ALIGN(size, PAGE_SIZE); - mtt->buf = vzalloc(mtt->size); + mtt->buf = vzalloc_node(mtt->size, dev->attrs.numa_node); mtt->continuous = false; if (!mtt->buf) goto err_free_mtt; -- 2.9.4
null
null
null
[PATCH][rdma-next] RDMA/erdma: Use NUMA-aware allocation for MTT tables
On Thu, Feb 26, 2026 at 09:50:00AM +0800, Cheng Xu wrote: So why do we need this patch? The xxx_node() functions are useful when you need to force allocation on a specific NUMA node. In most cases, a plain kmalloc() will allocate memory on the same node as 'struct erdma_dev *dev', which typically matches the PCI device's NUMA node. Please avoid vague phrasing like 'potentially improves performance' in the commit message and responses. It adds no meaningful information. Also, please remove the dev->attrs.numa_node caching from erdma and rely on dev_to_node() instead. Thanks
{ "author": "Leon Romanovsky <leon@kernel.org>", "date": "Thu, 26 Feb 2026 09:09:54 +0200", "is_openbsd": false, "thread_id": "20260227145534.GL44359@ziepe.ca.mbox.gz" }
lkml_critique
lkml
From: Li RongQing <lirongqing@baidu.com> Currently, MTT (Memory Translation Table) buffers are allocated without NUMA awareness using kzalloc() and vzalloc(), which allocate memory on the NUMA node of the calling CPU. This can lead to cross-node memory access latencies if the erdma device is attached to a different NUMA socket. Switch to kzalloc_node() and vzalloc_node() to ensure MTT buffers are allocated on the local NUMA node of the PCIe device (dev->attrs.numa_node). This reduces latency for hardware access and improves performance. Signed-off-by: Li RongQing <lirongqing@baidu.com> --- drivers/infiniband/hw/erdma/erdma_verbs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/erdma/erdma_verbs.c b/drivers/infiniband/hw/erdma/erdma_verbs.c index 9f74aad..58da6ef 100644 --- a/drivers/infiniband/hw/erdma/erdma_verbs.c +++ b/drivers/infiniband/hw/erdma/erdma_verbs.c @@ -604,7 +604,7 @@ static struct erdma_mtt *erdma_create_cont_mtt(struct erdma_dev *dev, return ERR_PTR(-ENOMEM); mtt->size = size; - mtt->buf = kzalloc(mtt->size, GFP_KERNEL); + mtt->buf = kzalloc_node(mtt->size, GFP_KERNEL, dev->attrs.numa_node); if (!mtt->buf) goto err_free_mtt; @@ -729,7 +729,7 @@ static struct erdma_mtt *erdma_create_scatter_mtt(struct erdma_dev *dev, return ERR_PTR(-ENOMEM); mtt->size = ALIGN(size, PAGE_SIZE); - mtt->buf = vzalloc(mtt->size); + mtt->buf = vzalloc_node(mtt->size, dev->attrs.numa_node); mtt->continuous = false; if (!mtt->buf) goto err_free_mtt; -- 2.9.4
null
null
null
[PATCH][rdma-next] RDMA/erdma: Use NUMA-aware allocation for MTT tables
On 2/26/26 3:09 PM, Leon Romanovsky wrote: Thanks for the detailed explanation. Got it. OK, I will fix this. Thanks, Cheng Xu
{ "author": "Cheng Xu <chengyou@linux.alibaba.com>", "date": "Thu, 26 Feb 2026 15:59:54 +0800", "is_openbsd": false, "thread_id": "20260227145534.GL44359@ziepe.ca.mbox.gz" }
lkml_critique
lkml
From: Li RongQing <lirongqing@baidu.com> Currently, MTT (Memory Translation Table) buffers are allocated without NUMA awareness using kzalloc() and vzalloc(), which allocate memory on the NUMA node of the calling CPU. This can lead to cross-node memory access latencies if the erdma device is attached to a different NUMA socket. Switch to kzalloc_node() and vzalloc_node() to ensure MTT buffers are allocated on the local NUMA node of the PCIe device (dev->attrs.numa_node). This reduces latency for hardware access and improves performance. Signed-off-by: Li RongQing <lirongqing@baidu.com> --- drivers/infiniband/hw/erdma/erdma_verbs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/erdma/erdma_verbs.c b/drivers/infiniband/hw/erdma/erdma_verbs.c index 9f74aad..58da6ef 100644 --- a/drivers/infiniband/hw/erdma/erdma_verbs.c +++ b/drivers/infiniband/hw/erdma/erdma_verbs.c @@ -604,7 +604,7 @@ static struct erdma_mtt *erdma_create_cont_mtt(struct erdma_dev *dev, return ERR_PTR(-ENOMEM); mtt->size = size; - mtt->buf = kzalloc(mtt->size, GFP_KERNEL); + mtt->buf = kzalloc_node(mtt->size, GFP_KERNEL, dev->attrs.numa_node); if (!mtt->buf) goto err_free_mtt; @@ -729,7 +729,7 @@ static struct erdma_mtt *erdma_create_scatter_mtt(struct erdma_dev *dev, return ERR_PTR(-ENOMEM); mtt->size = ALIGN(size, PAGE_SIZE); - mtt->buf = vzalloc(mtt->size); + mtt->buf = vzalloc_node(mtt->size, dev->attrs.numa_node); mtt->continuous = false; if (!mtt->buf) goto err_free_mtt; -- 2.9.4
null
null
null
[PATCH][rdma-next] RDMA/erdma: Use NUMA-aware allocation for MTT tables
On Thu, Feb 26, 2026 at 09:09:54AM +0200, Leon Romanovsky wrote: I think a naked kmalloc allocates memory on the numa node of the thread that calls it, which is not the dev's node. IMHO it is best practice to allocate DMA'able memory from the NUMA node of the struct device. Jason
{ "author": "Jason Gunthorpe <jgg@ziepe.ca>", "date": "Fri, 27 Feb 2026 10:55:34 -0400", "is_openbsd": false, "thread_id": "20260227145534.GL44359@ziepe.ca.mbox.gz" }
lkml_critique
lkml
Add bitwise or operations between the flag value enum and the underlying type. This is useful when manipulating flags from C API without round tripping into the Rust flag container type: let mut lim: bindings::queue_limits = unsafe { core::mem::zeroed() }; ... if self.write_cache { lim.features |= request::Feature::WriteCache; } The above code would be needlessly verbose without this direct assignment option. Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org> --- rust/kernel/impl_flags.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/rust/kernel/impl_flags.rs b/rust/kernel/impl_flags.rs index f34ecbe870d80..f829be815885e 100644 --- a/rust/kernel/impl_flags.rs +++ b/rust/kernel/impl_flags.rs @@ -245,6 +245,22 @@ fn bitxor(self, rhs: $flag) -> Self::Output { } } + impl ::core::ops::BitOr<$flag> for $ty { + type Output = Self; + + #[inline] + fn bitor(self, rhs: $flag) -> Self::Output { + self | <$flag as Into<Self>>::into(rhs) + } + } + + impl ::core::ops::BitOrAssign<$flag> for $ty { + #[inline] + fn bitor_assign(&mut self, rhs: $flag) { + *self = *self | <$flag as Into<Self>>::into(rhs) + } + } + impl $flags { /// Returns an empty instance of `type` where no flags are set. #[inline] -- 2.51.2
null
null
null
[PATCH 2/2] rust: impl_flags: add bitwise operations with the underlying type
Add two conversion functions to the `impl_flags!` macro: - A `From<_>` implementation to convert from the flag value enum to underlying type. - A `TryFrom<_> implementation to convert from the underlying representation to flag container type. Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org> --- rust/kernel/impl_flags.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/rust/kernel/impl_flags.rs b/rust/kernel/impl_flags.rs index 9160e8ce2e126..f34ecbe870d80 100644 --- a/rust/kernel/impl_flags.rs +++ b/rust/kernel/impl_flags.rs @@ -102,6 +102,26 @@ fn from(value: $flags) -> Self { } } + impl ::core::convert::From<$flag> for $ty { + #[inline] + fn from(value: $flag) -> Self { + // SAFETY: All `$flag` values are valid for use as `$ty`. + unsafe { core::mem::transmute::<$flag, $ty>(value) } + } + } + + impl ::core::convert::TryFrom<$ty> for $flags { + type Error = ::kernel::error::Error; + + fn try_from(value: $ty) -> Result<Self, Self::Error> { + match value & !$flags::all_bits() == 0 { + // SAFETY: We checked above that `value` is a valid bit pattern for `$flags`. + true => Ok(unsafe {::core::mem::transmute::<$ty, $flags>(value)}), + false => Err(::kernel::error::code::EINVAL), + } + } + } + impl ::core::ops::BitOr for $flags { type Output = Self; #[inline] -- 2.51.2
{ "author": "Andreas Hindborg <a.hindborg@kernel.org>", "date": "Sun, 15 Feb 2026 21:22:57 +0100", "is_openbsd": false, "thread_id": "DGPT710WN25X.1B9P21BE6X8P4@garyguo.net.mbox.gz" }
lkml_critique
lkml
Add bitwise or operations between the flag value enum and the underlying type. This is useful when manipulating flags from C API without round tripping into the Rust flag container type: let mut lim: bindings::queue_limits = unsafe { core::mem::zeroed() }; ... if self.write_cache { lim.features |= request::Feature::WriteCache; } The above code would be needlessly verbose without this direct assignment option. Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org> --- rust/kernel/impl_flags.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/rust/kernel/impl_flags.rs b/rust/kernel/impl_flags.rs index f34ecbe870d80..f829be815885e 100644 --- a/rust/kernel/impl_flags.rs +++ b/rust/kernel/impl_flags.rs @@ -245,6 +245,22 @@ fn bitxor(self, rhs: $flag) -> Self::Output { } } + impl ::core::ops::BitOr<$flag> for $ty { + type Output = Self; + + #[inline] + fn bitor(self, rhs: $flag) -> Self::Output { + self | <$flag as Into<Self>>::into(rhs) + } + } + + impl ::core::ops::BitOrAssign<$flag> for $ty { + #[inline] + fn bitor_assign(&mut self, rhs: $flag) { + *self = *self | <$flag as Into<Self>>::into(rhs) + } + } + impl $flags { /// Returns an empty instance of `type` where no flags are set. #[inline] -- 2.51.2
null
null
null
[PATCH 2/2] rust: impl_flags: add bitwise operations with the underlying type
Add a few convenience functions that makes it easier to work with the `impl_flags` module and C APIs. Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org> --- Andreas Hindborg (2): rust: impl_flags: add conversion functions rust: impl_flags: add bitwise operations with the underlying type rust/kernel/impl_flags.rs | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) --- base-commit: e9ec05addd1a067fc7cb218f20ecdc1b1b0898c0 change-id: 20260215-impl-flags-additions-0340ffcba5b9 prerequisite-change-id: 20250304-feat-add-bitmask-macro-6424b1c317e2:v8 prerequisite-patch-id: 05dfcf648017dee65c356604e4f99959e76ff64d prerequisite-change-id: 20260212-impl-flags-inner-c61974b27b18:v1 prerequisite-patch-id: edebc37750dccd8d19db0b8fbd5f69f9877675a2 Best regards, -- Andreas Hindborg <a.hindborg@kernel.org>
{ "author": "Andreas Hindborg <a.hindborg@kernel.org>", "date": "Sun, 15 Feb 2026 21:22:56 +0100", "is_openbsd": false, "thread_id": "DGPT710WN25X.1B9P21BE6X8P4@garyguo.net.mbox.gz" }
lkml_critique
lkml
Add bitwise or operations between the flag value enum and the underlying type. This is useful when manipulating flags from C API without round tripping into the Rust flag container type: let mut lim: bindings::queue_limits = unsafe { core::mem::zeroed() }; ... if self.write_cache { lim.features |= request::Feature::WriteCache; } The above code would be needlessly verbose without this direct assignment option. Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org> --- rust/kernel/impl_flags.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/rust/kernel/impl_flags.rs b/rust/kernel/impl_flags.rs index f34ecbe870d80..f829be815885e 100644 --- a/rust/kernel/impl_flags.rs +++ b/rust/kernel/impl_flags.rs @@ -245,6 +245,22 @@ fn bitxor(self, rhs: $flag) -> Self::Output { } } + impl ::core::ops::BitOr<$flag> for $ty { + type Output = Self; + + #[inline] + fn bitor(self, rhs: $flag) -> Self::Output { + self | <$flag as Into<Self>>::into(rhs) + } + } + + impl ::core::ops::BitOrAssign<$flag> for $ty { + #[inline] + fn bitor_assign(&mut self, rhs: $flag) { + *self = *self | <$flag as Into<Self>>::into(rhs) + } + } + impl $flags { /// Returns an empty instance of `type` where no flags are set. #[inline] -- 2.51.2
null
null
null
[PATCH 2/2] rust: impl_flags: add bitwise operations with the underlying type
On Sun, Feb 15, 2026 at 9:23 PM Andreas Hindborg <a.hindborg@kernel.org> wrote: Why do we need the transmute instead of a cast? Did you notice a difference? Same in the other one -- why not constructing the object normally? Also, you can use `Self` for `$ty` and `$flags` to make it easier to read. In addition, I would suggest an early return with a simple `if`. Finally, it wouldn't hurt adding a one-liner example for each at the top. Thanks! Cheers, Miguel
{ "author": "Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>", "date": "Sun, 15 Feb 2026 21:53:36 +0100", "is_openbsd": false, "thread_id": "DGPT710WN25X.1B9P21BE6X8P4@garyguo.net.mbox.gz" }
lkml_critique
lkml
Add bitwise or operations between the flag value enum and the underlying type. This is useful when manipulating flags from C API without round tripping into the Rust flag container type: let mut lim: bindings::queue_limits = unsafe { core::mem::zeroed() }; ... if self.write_cache { lim.features |= request::Feature::WriteCache; } The above code would be needlessly verbose without this direct assignment option. Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org> --- rust/kernel/impl_flags.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/rust/kernel/impl_flags.rs b/rust/kernel/impl_flags.rs index f34ecbe870d80..f829be815885e 100644 --- a/rust/kernel/impl_flags.rs +++ b/rust/kernel/impl_flags.rs @@ -245,6 +245,22 @@ fn bitxor(self, rhs: $flag) -> Self::Output { } } + impl ::core::ops::BitOr<$flag> for $ty { + type Output = Self; + + #[inline] + fn bitor(self, rhs: $flag) -> Self::Output { + self | <$flag as Into<Self>>::into(rhs) + } + } + + impl ::core::ops::BitOrAssign<$flag> for $ty { + #[inline] + fn bitor_assign(&mut self, rhs: $flag) { + *self = *self | <$flag as Into<Self>>::into(rhs) + } + } + impl $flags { /// Returns an empty instance of `type` where no flags are set. #[inline] -- 2.51.2
null
null
null
[PATCH 2/2] rust: impl_flags: add bitwise operations with the underlying type
On Sun Feb 15, 2026 at 8:22 PM GMT, Andreas Hindborg wrote: I am not sure that we want to encourage direct manipulation of the underlying bits. Adding these impls would add a surface of misuse. Best, Gary
{ "author": "\"Gary Guo\" <gary@garyguo.net>", "date": "Fri, 27 Feb 2026 14:20:46 +0000", "is_openbsd": false, "thread_id": "DGPT710WN25X.1B9P21BE6X8P4@garyguo.net.mbox.gz" }
lkml_critique
lkml
V2 patch incorporating feedback from previous discussion: - per-inode atomic cursors to enforce stream sequentiality - per-CPU starting points to reduce contention - allocator isolation maintained; regular allocator untouched - name changed to rralloc to avoid confusion with "rotational" - preliminary tests confirm expected performance Files modified: - fs/ext4/ext4.h rralloc policy declared, per-CPU cursors & allocator vector - fs/ext4/ialloc.c initialize (zero) per-inode cursor - fs/ext4/mballoc.h expose allocator functions for vectoring in super.c - fs/ext4/super.c parse rralloc option, init per-CPU cursors and allocator vector - fs/ext4/mballoc.c add rotating allocator, vectored allocator Signed-off-by: Mario Lohajner <mario_lohajner@rocketmail.com> --- fs/ext4/ext4.h | 10 +++- fs/ext4/ialloc.c | 3 +- fs/ext4/mballoc.c | 115 ++++++++++++++++++++++++++++++++++++++++++++-- fs/ext4/mballoc.h | 3 ++ fs/ext4/super.c | 33 ++++++++++++- 5 files changed, 157 insertions(+), 7 deletions(-) diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 293f698b7042..210332affd47 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -229,6 +229,9 @@ struct ext4_allocation_request { unsigned int flags; }; +/* rralloc show pointer type to compiler */ +struct ext4_allocation_context; + /* * Logical to physical block mapping, used by ext4_map_blocks() * @@ -1032,7 +1035,8 @@ struct ext4_inode_info { __le32 i_data[15]; /* unconverted */ __u32 i_dtime; ext4_fsblk_t i_file_acl; - + /* rralloc per inode cursor */ + atomic_t cursor; /* * i_block_group is the number of the block group which contains * this file's inode. Constant across the lifetime of the inode, @@ -1217,6 +1221,7 @@ struct ext4_inode_info { * Mount flags set via mount options or defaults */ #define EXT4_MOUNT_NO_MBCACHE 0x00001 /* Do not use mbcache */ +#define EXT4_MOUNT_RRALLOC 0x00002 /* Use round-robin policy/allocator */ #define EXT4_MOUNT_GRPID 0x00004 /* Create files with directory's group */ #define EXT4_MOUNT_DEBUG 0x00008 /* Some debugging messages */ #define EXT4_MOUNT_ERRORS_CONT 0x00010 /* Continue on errors */ @@ -1546,6 +1551,9 @@ struct ext4_sb_info { unsigned long s_mount_flags; unsigned int s_def_mount_opt; unsigned int s_def_mount_opt2; + /* rralloc per-cpu cursors and allocator vector */ + ext4_group_t __percpu *s_rralloc_cursor; + int (*s_vectored_allocator)(struct ext4_allocation_context *ac); ext4_fsblk_t s_sb_block; atomic64_t s_resv_clusters; kuid_t s_resuid; diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index b20a1bf866ab..c72cee642eca 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -962,7 +962,8 @@ struct inode *__ext4_new_inode(struct mnt_idmap *idmap, if (!inode) return ERR_PTR(-ENOMEM); ei = EXT4_I(inode); - + /* Zero the rralloc per-inode cursor */ + atomic_set(&ei->cursor, 0); /* * Initialize owners and quota early so that we don't have to account * for quota initialization worst case in standard inode creating diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 20e9fdaf4301..df3805bb4a2f 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -2266,9 +2266,19 @@ static void ext4_mb_use_best_found(struct ext4_allocation_context *ac, folio_get(ac->ac_buddy_folio); /* store last allocated for subsequent stream allocation */ if (ac->ac_flags & EXT4_MB_STREAM_ALLOC) { - int hash = ac->ac_inode->i_ino % sbi->s_mb_nr_global_goals; + /* update global goals */ + if (!test_opt(ac->ac_sb, RRALLOC)) { + int hash = ac->ac_inode->i_ino % sbi->s_mb_nr_global_goals; + + WRITE_ONCE(sbi->s_mb_last_groups[hash], ac->ac_f_ex.fe_group); + } else { + /* update inode cursor and current per-cpu cursor */ + ext4_group_t cursor = ac->ac_f_ex.fe_group; + struct ext4_inode_info *ei = EXT4_I(ac->ac_inode); - WRITE_ONCE(sbi->s_mb_last_groups[hash], ac->ac_f_ex.fe_group); + atomic_set(&ei->cursor, cursor); + *this_cpu_ptr(sbi->s_rralloc_cursor) = cursor; + } } /* @@ -2991,7 +3001,7 @@ static int ext4_mb_scan_group(struct ext4_allocation_context *ac, return ret; } -static noinline_for_stack int +noinline_for_stack int ext4_mb_regular_allocator(struct ext4_allocation_context *ac) { ext4_group_t i; @@ -3111,6 +3121,102 @@ ext4_mb_regular_allocator(struct ext4_allocation_context *ac) return err; } +/* Rotating allocator (round-robin) */ +noinline_for_stack int +ext4_mb_rotating_allocator(struct ext4_allocation_context *ac) +{ + ext4_group_t goal; + int err = 0; + struct super_block *sb = ac->ac_sb; + struct ext4_sb_info *sbi = EXT4_SB(sb); + struct ext4_buddy e4b; + struct ext4_inode_info *ei = EXT4_I(ac->ac_inode); + ext4_group_t start = *this_cpu_ptr(sbi->s_rralloc_cursor); + + /* if inode cursor=0, use per-cpu cursor */ + goal = atomic_cmpxchg(&ei->cursor, 0, start); + if (!goal) + goal = start; + + ac->ac_g_ex.fe_group = goal; + + /* first, try the goal */ + err = ext4_mb_find_by_goal(ac, &e4b); + if (err || ac->ac_status == AC_STATUS_FOUND) + goto out; + + /* RRallocation promotes stream behavior */ + ac->ac_flags |= EXT4_MB_STREAM_ALLOC; + ac->ac_flags |= EXT4_MB_HINT_FIRST; + ac->ac_flags &= ~EXT4_MB_HINT_GOAL_ONLY; + ac->ac_g_ex.fe_group = goal; + ac->ac_g_ex.fe_start = -1; + ac->ac_2order = 0; + ac->ac_criteria = CR_ANY_FREE; + ac->ac_e4b = &e4b; + ac->ac_prefetch_ios = 0; + ac->ac_first_err = 0; +repeat: + while (ac->ac_criteria < EXT4_MB_NUM_CRS) { + err = ext4_mb_scan_groups(ac); + if (err) + goto out; + + if (ac->ac_status != AC_STATUS_CONTINUE) + break; + } + + if (ac->ac_b_ex.fe_len > 0 && ac->ac_status != AC_STATUS_FOUND && + !(ac->ac_flags & EXT4_MB_HINT_FIRST)) { + /* + * We've been searching too long. Let's try to allocate + * the best chunk we've found so far + */ + ext4_mb_try_best_found(ac, &e4b); + if (ac->ac_status != AC_STATUS_FOUND) { + int lost; + + /* + * Someone more lucky has already allocated it. + * The only thing we can do is just take first + * found block(s) + */ + lost = atomic_inc_return(&sbi->s_mb_lost_chunks); + mb_debug(sb, "lost chunk, group: %u, start: %d, len: %d, lost: %d\n", + ac->ac_b_ex.fe_group, ac->ac_b_ex.fe_start, + ac->ac_b_ex.fe_len, lost); + + ac->ac_b_ex.fe_group = 0; + ac->ac_b_ex.fe_start = 0; + ac->ac_b_ex.fe_len = 0; + ac->ac_status = AC_STATUS_CONTINUE; + ac->ac_flags |= EXT4_MB_HINT_FIRST; + ac->ac_criteria = CR_ANY_FREE; + goto repeat; + } + } + + if (sbi->s_mb_stats && ac->ac_status == AC_STATUS_FOUND) { + atomic64_inc(&sbi->s_bal_cX_hits[ac->ac_criteria]); + if (ac->ac_flags & EXT4_MB_STREAM_ALLOC && + ac->ac_b_ex.fe_group == ac->ac_g_ex.fe_group) + atomic_inc(&sbi->s_bal_stream_goals); + } + +out: + if (!err && ac->ac_status != AC_STATUS_FOUND && ac->ac_first_err) + err = ac->ac_first_err; + + mb_debug(sb, "Best len %d, origin len %d, ac_status %u, ac_flags 0x%x, cr %d ret %d\n", + ac->ac_b_ex.fe_len, ac->ac_o_ex.fe_len, ac->ac_status, + ac->ac_flags, ac->ac_criteria, err); + + if (ac->ac_prefetch_nr) + ext4_mb_prefetch_fini(sb, ac->ac_prefetch_grp, ac->ac_prefetch_nr); + + return err; +} + static void *ext4_mb_seq_groups_start(struct seq_file *seq, loff_t *pos) { struct super_block *sb = pde_data(file_inode(seq->file)); @@ -6313,7 +6419,8 @@ ext4_fsblk_t ext4_mb_new_blocks(handle_t *handle, goto errout; repeat: /* allocate space in core */ - *errp = ext4_mb_regular_allocator(ac); + /* use vector separation for rralloc allocator */ + *errp = sbi->s_vectored_allocator(ac); /* * pa allocated above is added to grp->bb_prealloc_list only * when we were able to allocate some block i.e. when diff --git a/fs/ext4/mballoc.h b/fs/ext4/mballoc.h index 15a049f05d04..27d7a7dd7044 100644 --- a/fs/ext4/mballoc.h +++ b/fs/ext4/mballoc.h @@ -270,4 +270,7 @@ ext4_mballoc_query_range( ext4_mballoc_query_range_fn formatter, void *priv); +/* Expose rotating & regular allocator for vectoring */ +int ext4_mb_rotating_allocator(struct ext4_allocation_context *ac); +int ext4_mb_regular_allocator(struct ext4_allocation_context *ac); #endif diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 43f680c750ae..1e4cf6a40c88 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1284,6 +1284,10 @@ static void ext4_put_super(struct super_block *sb) int aborted = 0; int err; + /* free per cpu cursors */ + if (sbi->s_rralloc_cursor) + free_percpu(sbi->s_rralloc_cursor); + /* * Unregister sysfs before destroying jbd2 journal. * Since we could still access attr_journal_task attribute via sysfs @@ -1683,7 +1687,7 @@ enum { Opt_dioread_nolock, Opt_dioread_lock, Opt_discard, Opt_nodiscard, Opt_init_itable, Opt_noinit_itable, Opt_max_dir_size_kb, Opt_nojournal_checksum, Opt_nombcache, - Opt_no_prefetch_block_bitmaps, Opt_mb_optimize_scan, + Opt_no_prefetch_block_bitmaps, Opt_mb_optimize_scan, Opt_rralloc, Opt_errors, Opt_data, Opt_data_err, Opt_jqfmt, Opt_dax_type, #ifdef CONFIG_EXT4_DEBUG Opt_fc_debug_max_replay, Opt_fc_debug_force @@ -1805,6 +1809,7 @@ static const struct fs_parameter_spec ext4_param_specs[] = { fsparam_u32 ("init_itable", Opt_init_itable), fsparam_flag ("init_itable", Opt_init_itable), fsparam_flag ("noinit_itable", Opt_noinit_itable), + fsparam_flag ("rralloc", Opt_rralloc), #ifdef CONFIG_EXT4_DEBUG fsparam_flag ("fc_debug_force", Opt_fc_debug_force), fsparam_u32 ("fc_debug_max_replay", Opt_fc_debug_max_replay), @@ -1886,6 +1891,7 @@ static const struct mount_opts { {Opt_noauto_da_alloc, EXT4_MOUNT_NO_AUTO_DA_ALLOC, MOPT_SET}, {Opt_auto_da_alloc, EXT4_MOUNT_NO_AUTO_DA_ALLOC, MOPT_CLEAR}, {Opt_noinit_itable, EXT4_MOUNT_INIT_INODE_TABLE, MOPT_CLEAR}, + {Opt_rralloc, EXT4_MOUNT_RRALLOC, MOPT_SET}, {Opt_dax_type, 0, MOPT_EXT4_ONLY}, {Opt_journal_dev, 0, MOPT_NO_EXT2}, {Opt_journal_path, 0, MOPT_NO_EXT2}, @@ -2272,6 +2278,9 @@ static int ext4_parse_param(struct fs_context *fc, struct fs_parameter *param) ctx->s_li_wait_mult = result.uint_32; ctx->spec |= EXT4_SPEC_s_li_wait_mult; return 0; + case Opt_rralloc: + ctx_set_mount_opt(ctx, EXT4_MOUNT_RRALLOC); + return 0; case Opt_max_dir_size_kb: ctx->s_max_dir_size_kb = result.uint_32; ctx->spec |= EXT4_SPEC_s_max_dir_size_kb; @@ -5311,6 +5320,9 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb) struct ext4_fs_context *ctx = fc->fs_private; int silent = fc->sb_flags & SB_SILENT; + /* Unconditional default regular allocator (rralloc separation) */ + sbi->s_vectored_allocator = ext4_mb_regular_allocator; + /* Set defaults for the variables that will be set during parsing */ if (!(ctx->spec & EXT4_SPEC_JOURNAL_IOPRIO)) ctx->journal_ioprio = EXT4_DEF_JOURNAL_IOPRIO; @@ -5522,6 +5534,25 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb) } } + /* rralloc: initialize per-cpu cursors and rotational allocator */ + if (test_opt(sb, RRALLOC)) { + sbi->s_rralloc_cursor = alloc_percpu(ext4_group_t); + if (!sbi->s_rralloc_cursor) + return -ENOMEM; + + int ncpus = num_possible_cpus(); + ext4_group_t total_groups = ext4_get_groups_count(sb); + ext4_group_t groups_per_cpu = total_groups / ncpus; + int cpu; + + for_each_possible_cpu(cpu) { + *per_cpu_ptr(sbi->s_rralloc_cursor, cpu) = cpu * groups_per_cpu; + } + + /* Vectored allocator to round-robin allocator */ + sbi->s_vectored_allocator = ext4_mb_rotating_allocator; + } + /* * Get the # of file system overhead blocks from the * superblock if present. -- 2.53.0
null
null
null
[PATCH] ext4: rralloc - (former rotalloc) improved round-robin allocation policy
On Feb 25, 2026, at 13:15, Mario Lohajner <mario_lohajner@rocketmail.com> wrote: Mario, can you please include a summary of the performance test results into the commit message so that the effectiveness of the patch can be evaluated. This should include test(s) run and their arguments, along with table of before/after numbers. Cheers, Andreas
{ "author": "Andreas Dilger <adilger@dilger.ca>", "date": "Wed, 25 Feb 2026 16:49:30 -0700", "is_openbsd": false, "thread_id": "2af6328d-5a72-476d-9768-9398a9417ea6@rocketmail.com.mbox.gz" }
lkml_critique
lkml
V2 patch incorporating feedback from previous discussion: - per-inode atomic cursors to enforce stream sequentiality - per-CPU starting points to reduce contention - allocator isolation maintained; regular allocator untouched - name changed to rralloc to avoid confusion with "rotational" - preliminary tests confirm expected performance Files modified: - fs/ext4/ext4.h rralloc policy declared, per-CPU cursors & allocator vector - fs/ext4/ialloc.c initialize (zero) per-inode cursor - fs/ext4/mballoc.h expose allocator functions for vectoring in super.c - fs/ext4/super.c parse rralloc option, init per-CPU cursors and allocator vector - fs/ext4/mballoc.c add rotating allocator, vectored allocator Signed-off-by: Mario Lohajner <mario_lohajner@rocketmail.com> --- fs/ext4/ext4.h | 10 +++- fs/ext4/ialloc.c | 3 +- fs/ext4/mballoc.c | 115 ++++++++++++++++++++++++++++++++++++++++++++-- fs/ext4/mballoc.h | 3 ++ fs/ext4/super.c | 33 ++++++++++++- 5 files changed, 157 insertions(+), 7 deletions(-) diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 293f698b7042..210332affd47 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -229,6 +229,9 @@ struct ext4_allocation_request { unsigned int flags; }; +/* rralloc show pointer type to compiler */ +struct ext4_allocation_context; + /* * Logical to physical block mapping, used by ext4_map_blocks() * @@ -1032,7 +1035,8 @@ struct ext4_inode_info { __le32 i_data[15]; /* unconverted */ __u32 i_dtime; ext4_fsblk_t i_file_acl; - + /* rralloc per inode cursor */ + atomic_t cursor; /* * i_block_group is the number of the block group which contains * this file's inode. Constant across the lifetime of the inode, @@ -1217,6 +1221,7 @@ struct ext4_inode_info { * Mount flags set via mount options or defaults */ #define EXT4_MOUNT_NO_MBCACHE 0x00001 /* Do not use mbcache */ +#define EXT4_MOUNT_RRALLOC 0x00002 /* Use round-robin policy/allocator */ #define EXT4_MOUNT_GRPID 0x00004 /* Create files with directory's group */ #define EXT4_MOUNT_DEBUG 0x00008 /* Some debugging messages */ #define EXT4_MOUNT_ERRORS_CONT 0x00010 /* Continue on errors */ @@ -1546,6 +1551,9 @@ struct ext4_sb_info { unsigned long s_mount_flags; unsigned int s_def_mount_opt; unsigned int s_def_mount_opt2; + /* rralloc per-cpu cursors and allocator vector */ + ext4_group_t __percpu *s_rralloc_cursor; + int (*s_vectored_allocator)(struct ext4_allocation_context *ac); ext4_fsblk_t s_sb_block; atomic64_t s_resv_clusters; kuid_t s_resuid; diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index b20a1bf866ab..c72cee642eca 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -962,7 +962,8 @@ struct inode *__ext4_new_inode(struct mnt_idmap *idmap, if (!inode) return ERR_PTR(-ENOMEM); ei = EXT4_I(inode); - + /* Zero the rralloc per-inode cursor */ + atomic_set(&ei->cursor, 0); /* * Initialize owners and quota early so that we don't have to account * for quota initialization worst case in standard inode creating diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 20e9fdaf4301..df3805bb4a2f 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -2266,9 +2266,19 @@ static void ext4_mb_use_best_found(struct ext4_allocation_context *ac, folio_get(ac->ac_buddy_folio); /* store last allocated for subsequent stream allocation */ if (ac->ac_flags & EXT4_MB_STREAM_ALLOC) { - int hash = ac->ac_inode->i_ino % sbi->s_mb_nr_global_goals; + /* update global goals */ + if (!test_opt(ac->ac_sb, RRALLOC)) { + int hash = ac->ac_inode->i_ino % sbi->s_mb_nr_global_goals; + + WRITE_ONCE(sbi->s_mb_last_groups[hash], ac->ac_f_ex.fe_group); + } else { + /* update inode cursor and current per-cpu cursor */ + ext4_group_t cursor = ac->ac_f_ex.fe_group; + struct ext4_inode_info *ei = EXT4_I(ac->ac_inode); - WRITE_ONCE(sbi->s_mb_last_groups[hash], ac->ac_f_ex.fe_group); + atomic_set(&ei->cursor, cursor); + *this_cpu_ptr(sbi->s_rralloc_cursor) = cursor; + } } /* @@ -2991,7 +3001,7 @@ static int ext4_mb_scan_group(struct ext4_allocation_context *ac, return ret; } -static noinline_for_stack int +noinline_for_stack int ext4_mb_regular_allocator(struct ext4_allocation_context *ac) { ext4_group_t i; @@ -3111,6 +3121,102 @@ ext4_mb_regular_allocator(struct ext4_allocation_context *ac) return err; } +/* Rotating allocator (round-robin) */ +noinline_for_stack int +ext4_mb_rotating_allocator(struct ext4_allocation_context *ac) +{ + ext4_group_t goal; + int err = 0; + struct super_block *sb = ac->ac_sb; + struct ext4_sb_info *sbi = EXT4_SB(sb); + struct ext4_buddy e4b; + struct ext4_inode_info *ei = EXT4_I(ac->ac_inode); + ext4_group_t start = *this_cpu_ptr(sbi->s_rralloc_cursor); + + /* if inode cursor=0, use per-cpu cursor */ + goal = atomic_cmpxchg(&ei->cursor, 0, start); + if (!goal) + goal = start; + + ac->ac_g_ex.fe_group = goal; + + /* first, try the goal */ + err = ext4_mb_find_by_goal(ac, &e4b); + if (err || ac->ac_status == AC_STATUS_FOUND) + goto out; + + /* RRallocation promotes stream behavior */ + ac->ac_flags |= EXT4_MB_STREAM_ALLOC; + ac->ac_flags |= EXT4_MB_HINT_FIRST; + ac->ac_flags &= ~EXT4_MB_HINT_GOAL_ONLY; + ac->ac_g_ex.fe_group = goal; + ac->ac_g_ex.fe_start = -1; + ac->ac_2order = 0; + ac->ac_criteria = CR_ANY_FREE; + ac->ac_e4b = &e4b; + ac->ac_prefetch_ios = 0; + ac->ac_first_err = 0; +repeat: + while (ac->ac_criteria < EXT4_MB_NUM_CRS) { + err = ext4_mb_scan_groups(ac); + if (err) + goto out; + + if (ac->ac_status != AC_STATUS_CONTINUE) + break; + } + + if (ac->ac_b_ex.fe_len > 0 && ac->ac_status != AC_STATUS_FOUND && + !(ac->ac_flags & EXT4_MB_HINT_FIRST)) { + /* + * We've been searching too long. Let's try to allocate + * the best chunk we've found so far + */ + ext4_mb_try_best_found(ac, &e4b); + if (ac->ac_status != AC_STATUS_FOUND) { + int lost; + + /* + * Someone more lucky has already allocated it. + * The only thing we can do is just take first + * found block(s) + */ + lost = atomic_inc_return(&sbi->s_mb_lost_chunks); + mb_debug(sb, "lost chunk, group: %u, start: %d, len: %d, lost: %d\n", + ac->ac_b_ex.fe_group, ac->ac_b_ex.fe_start, + ac->ac_b_ex.fe_len, lost); + + ac->ac_b_ex.fe_group = 0; + ac->ac_b_ex.fe_start = 0; + ac->ac_b_ex.fe_len = 0; + ac->ac_status = AC_STATUS_CONTINUE; + ac->ac_flags |= EXT4_MB_HINT_FIRST; + ac->ac_criteria = CR_ANY_FREE; + goto repeat; + } + } + + if (sbi->s_mb_stats && ac->ac_status == AC_STATUS_FOUND) { + atomic64_inc(&sbi->s_bal_cX_hits[ac->ac_criteria]); + if (ac->ac_flags & EXT4_MB_STREAM_ALLOC && + ac->ac_b_ex.fe_group == ac->ac_g_ex.fe_group) + atomic_inc(&sbi->s_bal_stream_goals); + } + +out: + if (!err && ac->ac_status != AC_STATUS_FOUND && ac->ac_first_err) + err = ac->ac_first_err; + + mb_debug(sb, "Best len %d, origin len %d, ac_status %u, ac_flags 0x%x, cr %d ret %d\n", + ac->ac_b_ex.fe_len, ac->ac_o_ex.fe_len, ac->ac_status, + ac->ac_flags, ac->ac_criteria, err); + + if (ac->ac_prefetch_nr) + ext4_mb_prefetch_fini(sb, ac->ac_prefetch_grp, ac->ac_prefetch_nr); + + return err; +} + static void *ext4_mb_seq_groups_start(struct seq_file *seq, loff_t *pos) { struct super_block *sb = pde_data(file_inode(seq->file)); @@ -6313,7 +6419,8 @@ ext4_fsblk_t ext4_mb_new_blocks(handle_t *handle, goto errout; repeat: /* allocate space in core */ - *errp = ext4_mb_regular_allocator(ac); + /* use vector separation for rralloc allocator */ + *errp = sbi->s_vectored_allocator(ac); /* * pa allocated above is added to grp->bb_prealloc_list only * when we were able to allocate some block i.e. when diff --git a/fs/ext4/mballoc.h b/fs/ext4/mballoc.h index 15a049f05d04..27d7a7dd7044 100644 --- a/fs/ext4/mballoc.h +++ b/fs/ext4/mballoc.h @@ -270,4 +270,7 @@ ext4_mballoc_query_range( ext4_mballoc_query_range_fn formatter, void *priv); +/* Expose rotating & regular allocator for vectoring */ +int ext4_mb_rotating_allocator(struct ext4_allocation_context *ac); +int ext4_mb_regular_allocator(struct ext4_allocation_context *ac); #endif diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 43f680c750ae..1e4cf6a40c88 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1284,6 +1284,10 @@ static void ext4_put_super(struct super_block *sb) int aborted = 0; int err; + /* free per cpu cursors */ + if (sbi->s_rralloc_cursor) + free_percpu(sbi->s_rralloc_cursor); + /* * Unregister sysfs before destroying jbd2 journal. * Since we could still access attr_journal_task attribute via sysfs @@ -1683,7 +1687,7 @@ enum { Opt_dioread_nolock, Opt_dioread_lock, Opt_discard, Opt_nodiscard, Opt_init_itable, Opt_noinit_itable, Opt_max_dir_size_kb, Opt_nojournal_checksum, Opt_nombcache, - Opt_no_prefetch_block_bitmaps, Opt_mb_optimize_scan, + Opt_no_prefetch_block_bitmaps, Opt_mb_optimize_scan, Opt_rralloc, Opt_errors, Opt_data, Opt_data_err, Opt_jqfmt, Opt_dax_type, #ifdef CONFIG_EXT4_DEBUG Opt_fc_debug_max_replay, Opt_fc_debug_force @@ -1805,6 +1809,7 @@ static const struct fs_parameter_spec ext4_param_specs[] = { fsparam_u32 ("init_itable", Opt_init_itable), fsparam_flag ("init_itable", Opt_init_itable), fsparam_flag ("noinit_itable", Opt_noinit_itable), + fsparam_flag ("rralloc", Opt_rralloc), #ifdef CONFIG_EXT4_DEBUG fsparam_flag ("fc_debug_force", Opt_fc_debug_force), fsparam_u32 ("fc_debug_max_replay", Opt_fc_debug_max_replay), @@ -1886,6 +1891,7 @@ static const struct mount_opts { {Opt_noauto_da_alloc, EXT4_MOUNT_NO_AUTO_DA_ALLOC, MOPT_SET}, {Opt_auto_da_alloc, EXT4_MOUNT_NO_AUTO_DA_ALLOC, MOPT_CLEAR}, {Opt_noinit_itable, EXT4_MOUNT_INIT_INODE_TABLE, MOPT_CLEAR}, + {Opt_rralloc, EXT4_MOUNT_RRALLOC, MOPT_SET}, {Opt_dax_type, 0, MOPT_EXT4_ONLY}, {Opt_journal_dev, 0, MOPT_NO_EXT2}, {Opt_journal_path, 0, MOPT_NO_EXT2}, @@ -2272,6 +2278,9 @@ static int ext4_parse_param(struct fs_context *fc, struct fs_parameter *param) ctx->s_li_wait_mult = result.uint_32; ctx->spec |= EXT4_SPEC_s_li_wait_mult; return 0; + case Opt_rralloc: + ctx_set_mount_opt(ctx, EXT4_MOUNT_RRALLOC); + return 0; case Opt_max_dir_size_kb: ctx->s_max_dir_size_kb = result.uint_32; ctx->spec |= EXT4_SPEC_s_max_dir_size_kb; @@ -5311,6 +5320,9 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb) struct ext4_fs_context *ctx = fc->fs_private; int silent = fc->sb_flags & SB_SILENT; + /* Unconditional default regular allocator (rralloc separation) */ + sbi->s_vectored_allocator = ext4_mb_regular_allocator; + /* Set defaults for the variables that will be set during parsing */ if (!(ctx->spec & EXT4_SPEC_JOURNAL_IOPRIO)) ctx->journal_ioprio = EXT4_DEF_JOURNAL_IOPRIO; @@ -5522,6 +5534,25 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb) } } + /* rralloc: initialize per-cpu cursors and rotational allocator */ + if (test_opt(sb, RRALLOC)) { + sbi->s_rralloc_cursor = alloc_percpu(ext4_group_t); + if (!sbi->s_rralloc_cursor) + return -ENOMEM; + + int ncpus = num_possible_cpus(); + ext4_group_t total_groups = ext4_get_groups_count(sb); + ext4_group_t groups_per_cpu = total_groups / ncpus; + int cpu; + + for_each_possible_cpu(cpu) { + *per_cpu_ptr(sbi->s_rralloc_cursor, cpu) = cpu * groups_per_cpu; + } + + /* Vectored allocator to round-robin allocator */ + sbi->s_vectored_allocator = ext4_mb_rotating_allocator; + } + /* * Get the # of file system overhead blocks from the * superblock if present. -- 2.53.0
null
null
null
[PATCH] ext4: rralloc - (former rotalloc) improved round-robin allocation policy
On Wed, Feb 25, 2026 at 04:49:30PM -0700, Andreas Dilger wrote: The tests should also include an explanation of the hardware that you ran the test on. Some example of cover letters that include perforance improvement results: https://lore.kernel.org/all/20251025032221.2905818-1-libaokun@huaweicloud.com/ https://lore.kernel.org/all/20260105014522.1937690-1-yi.zhang@huaweicloud.com/ Cheers, - Ted
{ "author": "\"Theodore Tso\" <tytso@mit.edu>", "date": "Wed, 25 Feb 2026 21:48:19 -0500", "is_openbsd": false, "thread_id": "2af6328d-5a72-476d-9768-9398a9417ea6@rocketmail.com.mbox.gz" }
lkml_critique
lkml
V2 patch incorporating feedback from previous discussion: - per-inode atomic cursors to enforce stream sequentiality - per-CPU starting points to reduce contention - allocator isolation maintained; regular allocator untouched - name changed to rralloc to avoid confusion with "rotational" - preliminary tests confirm expected performance Files modified: - fs/ext4/ext4.h rralloc policy declared, per-CPU cursors & allocator vector - fs/ext4/ialloc.c initialize (zero) per-inode cursor - fs/ext4/mballoc.h expose allocator functions for vectoring in super.c - fs/ext4/super.c parse rralloc option, init per-CPU cursors and allocator vector - fs/ext4/mballoc.c add rotating allocator, vectored allocator Signed-off-by: Mario Lohajner <mario_lohajner@rocketmail.com> --- fs/ext4/ext4.h | 10 +++- fs/ext4/ialloc.c | 3 +- fs/ext4/mballoc.c | 115 ++++++++++++++++++++++++++++++++++++++++++++-- fs/ext4/mballoc.h | 3 ++ fs/ext4/super.c | 33 ++++++++++++- 5 files changed, 157 insertions(+), 7 deletions(-) diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 293f698b7042..210332affd47 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -229,6 +229,9 @@ struct ext4_allocation_request { unsigned int flags; }; +/* rralloc show pointer type to compiler */ +struct ext4_allocation_context; + /* * Logical to physical block mapping, used by ext4_map_blocks() * @@ -1032,7 +1035,8 @@ struct ext4_inode_info { __le32 i_data[15]; /* unconverted */ __u32 i_dtime; ext4_fsblk_t i_file_acl; - + /* rralloc per inode cursor */ + atomic_t cursor; /* * i_block_group is the number of the block group which contains * this file's inode. Constant across the lifetime of the inode, @@ -1217,6 +1221,7 @@ struct ext4_inode_info { * Mount flags set via mount options or defaults */ #define EXT4_MOUNT_NO_MBCACHE 0x00001 /* Do not use mbcache */ +#define EXT4_MOUNT_RRALLOC 0x00002 /* Use round-robin policy/allocator */ #define EXT4_MOUNT_GRPID 0x00004 /* Create files with directory's group */ #define EXT4_MOUNT_DEBUG 0x00008 /* Some debugging messages */ #define EXT4_MOUNT_ERRORS_CONT 0x00010 /* Continue on errors */ @@ -1546,6 +1551,9 @@ struct ext4_sb_info { unsigned long s_mount_flags; unsigned int s_def_mount_opt; unsigned int s_def_mount_opt2; + /* rralloc per-cpu cursors and allocator vector */ + ext4_group_t __percpu *s_rralloc_cursor; + int (*s_vectored_allocator)(struct ext4_allocation_context *ac); ext4_fsblk_t s_sb_block; atomic64_t s_resv_clusters; kuid_t s_resuid; diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index b20a1bf866ab..c72cee642eca 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -962,7 +962,8 @@ struct inode *__ext4_new_inode(struct mnt_idmap *idmap, if (!inode) return ERR_PTR(-ENOMEM); ei = EXT4_I(inode); - + /* Zero the rralloc per-inode cursor */ + atomic_set(&ei->cursor, 0); /* * Initialize owners and quota early so that we don't have to account * for quota initialization worst case in standard inode creating diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 20e9fdaf4301..df3805bb4a2f 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -2266,9 +2266,19 @@ static void ext4_mb_use_best_found(struct ext4_allocation_context *ac, folio_get(ac->ac_buddy_folio); /* store last allocated for subsequent stream allocation */ if (ac->ac_flags & EXT4_MB_STREAM_ALLOC) { - int hash = ac->ac_inode->i_ino % sbi->s_mb_nr_global_goals; + /* update global goals */ + if (!test_opt(ac->ac_sb, RRALLOC)) { + int hash = ac->ac_inode->i_ino % sbi->s_mb_nr_global_goals; + + WRITE_ONCE(sbi->s_mb_last_groups[hash], ac->ac_f_ex.fe_group); + } else { + /* update inode cursor and current per-cpu cursor */ + ext4_group_t cursor = ac->ac_f_ex.fe_group; + struct ext4_inode_info *ei = EXT4_I(ac->ac_inode); - WRITE_ONCE(sbi->s_mb_last_groups[hash], ac->ac_f_ex.fe_group); + atomic_set(&ei->cursor, cursor); + *this_cpu_ptr(sbi->s_rralloc_cursor) = cursor; + } } /* @@ -2991,7 +3001,7 @@ static int ext4_mb_scan_group(struct ext4_allocation_context *ac, return ret; } -static noinline_for_stack int +noinline_for_stack int ext4_mb_regular_allocator(struct ext4_allocation_context *ac) { ext4_group_t i; @@ -3111,6 +3121,102 @@ ext4_mb_regular_allocator(struct ext4_allocation_context *ac) return err; } +/* Rotating allocator (round-robin) */ +noinline_for_stack int +ext4_mb_rotating_allocator(struct ext4_allocation_context *ac) +{ + ext4_group_t goal; + int err = 0; + struct super_block *sb = ac->ac_sb; + struct ext4_sb_info *sbi = EXT4_SB(sb); + struct ext4_buddy e4b; + struct ext4_inode_info *ei = EXT4_I(ac->ac_inode); + ext4_group_t start = *this_cpu_ptr(sbi->s_rralloc_cursor); + + /* if inode cursor=0, use per-cpu cursor */ + goal = atomic_cmpxchg(&ei->cursor, 0, start); + if (!goal) + goal = start; + + ac->ac_g_ex.fe_group = goal; + + /* first, try the goal */ + err = ext4_mb_find_by_goal(ac, &e4b); + if (err || ac->ac_status == AC_STATUS_FOUND) + goto out; + + /* RRallocation promotes stream behavior */ + ac->ac_flags |= EXT4_MB_STREAM_ALLOC; + ac->ac_flags |= EXT4_MB_HINT_FIRST; + ac->ac_flags &= ~EXT4_MB_HINT_GOAL_ONLY; + ac->ac_g_ex.fe_group = goal; + ac->ac_g_ex.fe_start = -1; + ac->ac_2order = 0; + ac->ac_criteria = CR_ANY_FREE; + ac->ac_e4b = &e4b; + ac->ac_prefetch_ios = 0; + ac->ac_first_err = 0; +repeat: + while (ac->ac_criteria < EXT4_MB_NUM_CRS) { + err = ext4_mb_scan_groups(ac); + if (err) + goto out; + + if (ac->ac_status != AC_STATUS_CONTINUE) + break; + } + + if (ac->ac_b_ex.fe_len > 0 && ac->ac_status != AC_STATUS_FOUND && + !(ac->ac_flags & EXT4_MB_HINT_FIRST)) { + /* + * We've been searching too long. Let's try to allocate + * the best chunk we've found so far + */ + ext4_mb_try_best_found(ac, &e4b); + if (ac->ac_status != AC_STATUS_FOUND) { + int lost; + + /* + * Someone more lucky has already allocated it. + * The only thing we can do is just take first + * found block(s) + */ + lost = atomic_inc_return(&sbi->s_mb_lost_chunks); + mb_debug(sb, "lost chunk, group: %u, start: %d, len: %d, lost: %d\n", + ac->ac_b_ex.fe_group, ac->ac_b_ex.fe_start, + ac->ac_b_ex.fe_len, lost); + + ac->ac_b_ex.fe_group = 0; + ac->ac_b_ex.fe_start = 0; + ac->ac_b_ex.fe_len = 0; + ac->ac_status = AC_STATUS_CONTINUE; + ac->ac_flags |= EXT4_MB_HINT_FIRST; + ac->ac_criteria = CR_ANY_FREE; + goto repeat; + } + } + + if (sbi->s_mb_stats && ac->ac_status == AC_STATUS_FOUND) { + atomic64_inc(&sbi->s_bal_cX_hits[ac->ac_criteria]); + if (ac->ac_flags & EXT4_MB_STREAM_ALLOC && + ac->ac_b_ex.fe_group == ac->ac_g_ex.fe_group) + atomic_inc(&sbi->s_bal_stream_goals); + } + +out: + if (!err && ac->ac_status != AC_STATUS_FOUND && ac->ac_first_err) + err = ac->ac_first_err; + + mb_debug(sb, "Best len %d, origin len %d, ac_status %u, ac_flags 0x%x, cr %d ret %d\n", + ac->ac_b_ex.fe_len, ac->ac_o_ex.fe_len, ac->ac_status, + ac->ac_flags, ac->ac_criteria, err); + + if (ac->ac_prefetch_nr) + ext4_mb_prefetch_fini(sb, ac->ac_prefetch_grp, ac->ac_prefetch_nr); + + return err; +} + static void *ext4_mb_seq_groups_start(struct seq_file *seq, loff_t *pos) { struct super_block *sb = pde_data(file_inode(seq->file)); @@ -6313,7 +6419,8 @@ ext4_fsblk_t ext4_mb_new_blocks(handle_t *handle, goto errout; repeat: /* allocate space in core */ - *errp = ext4_mb_regular_allocator(ac); + /* use vector separation for rralloc allocator */ + *errp = sbi->s_vectored_allocator(ac); /* * pa allocated above is added to grp->bb_prealloc_list only * when we were able to allocate some block i.e. when diff --git a/fs/ext4/mballoc.h b/fs/ext4/mballoc.h index 15a049f05d04..27d7a7dd7044 100644 --- a/fs/ext4/mballoc.h +++ b/fs/ext4/mballoc.h @@ -270,4 +270,7 @@ ext4_mballoc_query_range( ext4_mballoc_query_range_fn formatter, void *priv); +/* Expose rotating & regular allocator for vectoring */ +int ext4_mb_rotating_allocator(struct ext4_allocation_context *ac); +int ext4_mb_regular_allocator(struct ext4_allocation_context *ac); #endif diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 43f680c750ae..1e4cf6a40c88 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1284,6 +1284,10 @@ static void ext4_put_super(struct super_block *sb) int aborted = 0; int err; + /* free per cpu cursors */ + if (sbi->s_rralloc_cursor) + free_percpu(sbi->s_rralloc_cursor); + /* * Unregister sysfs before destroying jbd2 journal. * Since we could still access attr_journal_task attribute via sysfs @@ -1683,7 +1687,7 @@ enum { Opt_dioread_nolock, Opt_dioread_lock, Opt_discard, Opt_nodiscard, Opt_init_itable, Opt_noinit_itable, Opt_max_dir_size_kb, Opt_nojournal_checksum, Opt_nombcache, - Opt_no_prefetch_block_bitmaps, Opt_mb_optimize_scan, + Opt_no_prefetch_block_bitmaps, Opt_mb_optimize_scan, Opt_rralloc, Opt_errors, Opt_data, Opt_data_err, Opt_jqfmt, Opt_dax_type, #ifdef CONFIG_EXT4_DEBUG Opt_fc_debug_max_replay, Opt_fc_debug_force @@ -1805,6 +1809,7 @@ static const struct fs_parameter_spec ext4_param_specs[] = { fsparam_u32 ("init_itable", Opt_init_itable), fsparam_flag ("init_itable", Opt_init_itable), fsparam_flag ("noinit_itable", Opt_noinit_itable), + fsparam_flag ("rralloc", Opt_rralloc), #ifdef CONFIG_EXT4_DEBUG fsparam_flag ("fc_debug_force", Opt_fc_debug_force), fsparam_u32 ("fc_debug_max_replay", Opt_fc_debug_max_replay), @@ -1886,6 +1891,7 @@ static const struct mount_opts { {Opt_noauto_da_alloc, EXT4_MOUNT_NO_AUTO_DA_ALLOC, MOPT_SET}, {Opt_auto_da_alloc, EXT4_MOUNT_NO_AUTO_DA_ALLOC, MOPT_CLEAR}, {Opt_noinit_itable, EXT4_MOUNT_INIT_INODE_TABLE, MOPT_CLEAR}, + {Opt_rralloc, EXT4_MOUNT_RRALLOC, MOPT_SET}, {Opt_dax_type, 0, MOPT_EXT4_ONLY}, {Opt_journal_dev, 0, MOPT_NO_EXT2}, {Opt_journal_path, 0, MOPT_NO_EXT2}, @@ -2272,6 +2278,9 @@ static int ext4_parse_param(struct fs_context *fc, struct fs_parameter *param) ctx->s_li_wait_mult = result.uint_32; ctx->spec |= EXT4_SPEC_s_li_wait_mult; return 0; + case Opt_rralloc: + ctx_set_mount_opt(ctx, EXT4_MOUNT_RRALLOC); + return 0; case Opt_max_dir_size_kb: ctx->s_max_dir_size_kb = result.uint_32; ctx->spec |= EXT4_SPEC_s_max_dir_size_kb; @@ -5311,6 +5320,9 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb) struct ext4_fs_context *ctx = fc->fs_private; int silent = fc->sb_flags & SB_SILENT; + /* Unconditional default regular allocator (rralloc separation) */ + sbi->s_vectored_allocator = ext4_mb_regular_allocator; + /* Set defaults for the variables that will be set during parsing */ if (!(ctx->spec & EXT4_SPEC_JOURNAL_IOPRIO)) ctx->journal_ioprio = EXT4_DEF_JOURNAL_IOPRIO; @@ -5522,6 +5534,25 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb) } } + /* rralloc: initialize per-cpu cursors and rotational allocator */ + if (test_opt(sb, RRALLOC)) { + sbi->s_rralloc_cursor = alloc_percpu(ext4_group_t); + if (!sbi->s_rralloc_cursor) + return -ENOMEM; + + int ncpus = num_possible_cpus(); + ext4_group_t total_groups = ext4_get_groups_count(sb); + ext4_group_t groups_per_cpu = total_groups / ncpus; + int cpu; + + for_each_possible_cpu(cpu) { + *per_cpu_ptr(sbi->s_rralloc_cursor, cpu) = cpu * groups_per_cpu; + } + + /* Vectored allocator to round-robin allocator */ + sbi->s_vectored_allocator = ext4_mb_rotating_allocator; + } + /* * Get the # of file system overhead blocks from the * superblock if present. -- 2.53.0
null
null
null
[PATCH] ext4: rralloc - (former rotalloc) improved round-robin allocation policy
On 26. 02. 2026. 03:48, Theodore Tso wrote: Hello Andreas, hello Theodore! These are the results of synthetic tests designed to evaluate whether the round-robin allocator (rralloc) maintains its allocation behavior without degrading performance, and to examine its behavior under high concurrency and stress conditions. The primary purpose of rralloc is to improve allocation distribution and avoid hotspotting. Performance improvements are not the goal here, throughput similar to regular allocator is considered favorable. # Workloads *** Large Sequential Files (Evaluates sequential write throughput with multi-job concurrency) fio --name=seqwrite --directory=. --rw=write --bs=1M --numjobs=6 \ --size=4G --runtime=300 --time_based --group_reporting *** Small Files (Validates allocator behavior and latency under small, random writes) fio --name=smallfiles --directory=. --rw=write --bs=4k --numjobs=6 \ --size=1G --ioengine=psync --time_based --runtime=180 --group_reporting *** Multi-core / Multi-task Stress (Tests high concurrency and stress conditions) fio --name=allocstress --directory=. --rw=write --bs=4k --numjobs=48 \ --size=2G --ioengine=psync --time_based --runtime=180 --group_reporting # Results summary: | Test | Allocator | BW (MiB/s) | IOPS | Avg lat | | ----------- | --------- | ---------- | ----- | ------- | | seqwrite | Regular | 497 | 496 | 9.19 ms | | | rralloc | 538 | 537 | 9.37 ms | | smallfiles | Regular | 707 | 181k | 2.03 µs | | | rralloc | 586 | 150k | 2.18 µs | | allocstress | Regular | 166 | 42.4k | 1.13 ms | | | rralloc | 283 | 72.5k | 0.66 ms | The results indicate that a round-robin allocation strategy can be introduced without compromising baseline I/O characteristics. Across tested workloads, rralloc preserves expected I/O behavior and does not introduce performance regressions of practical significance. | Test | Hardware | | -------- | ------------------------------------------ | | OS | Fedora Linux 42 Workstation x86_64 | | Host | 90HU007QGE ideacentre 510-15ICB | | Kernel | 6.18.9-dirty | | CPU | Intel i5-8400 (6 cores) @ 2.801GHz | | GPU1 | AMD Radeon RX 560 | | GPU2 | Intel CoffeeLake-S GT2 / UHD Graphics 630 | | Memory | 1379 MiB / 31,958 MiB | | NVMe | INTEL SSDPEKNW512G8H (HPS1) | | SATA SSD | Samsung SSD 860 PRO 256GB (RVM02B6Q) | Note: These results reflect synthetic tests on the described hardware. Independent reproduction and verification of these findings are welcome. Variations in hardware, kernel version, or workload configuration may affect absolute numbers, but the qualitative observation—that rralloc preserves baseline I/O behavior—remains valid. For more details (raw outputs) please refer to: https://github.com/mlohajner/RRALLOC Regards, Mario Lohajner (manjo)
{ "author": "Mario Lohajner <mario_lohajner@rocketmail.com>", "date": "Thu, 26 Feb 2026 22:50:29 +0100", "is_openbsd": false, "thread_id": "2af6328d-5a72-476d-9768-9398a9417ea6@rocketmail.com.mbox.gz" }
lkml_critique
lkml
V2 patch incorporating feedback from previous discussion: - per-inode atomic cursors to enforce stream sequentiality - per-CPU starting points to reduce contention - allocator isolation maintained; regular allocator untouched - name changed to rralloc to avoid confusion with "rotational" - preliminary tests confirm expected performance Files modified: - fs/ext4/ext4.h rralloc policy declared, per-CPU cursors & allocator vector - fs/ext4/ialloc.c initialize (zero) per-inode cursor - fs/ext4/mballoc.h expose allocator functions for vectoring in super.c - fs/ext4/super.c parse rralloc option, init per-CPU cursors and allocator vector - fs/ext4/mballoc.c add rotating allocator, vectored allocator Signed-off-by: Mario Lohajner <mario_lohajner@rocketmail.com> --- fs/ext4/ext4.h | 10 +++- fs/ext4/ialloc.c | 3 +- fs/ext4/mballoc.c | 115 ++++++++++++++++++++++++++++++++++++++++++++-- fs/ext4/mballoc.h | 3 ++ fs/ext4/super.c | 33 ++++++++++++- 5 files changed, 157 insertions(+), 7 deletions(-) diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 293f698b7042..210332affd47 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -229,6 +229,9 @@ struct ext4_allocation_request { unsigned int flags; }; +/* rralloc show pointer type to compiler */ +struct ext4_allocation_context; + /* * Logical to physical block mapping, used by ext4_map_blocks() * @@ -1032,7 +1035,8 @@ struct ext4_inode_info { __le32 i_data[15]; /* unconverted */ __u32 i_dtime; ext4_fsblk_t i_file_acl; - + /* rralloc per inode cursor */ + atomic_t cursor; /* * i_block_group is the number of the block group which contains * this file's inode. Constant across the lifetime of the inode, @@ -1217,6 +1221,7 @@ struct ext4_inode_info { * Mount flags set via mount options or defaults */ #define EXT4_MOUNT_NO_MBCACHE 0x00001 /* Do not use mbcache */ +#define EXT4_MOUNT_RRALLOC 0x00002 /* Use round-robin policy/allocator */ #define EXT4_MOUNT_GRPID 0x00004 /* Create files with directory's group */ #define EXT4_MOUNT_DEBUG 0x00008 /* Some debugging messages */ #define EXT4_MOUNT_ERRORS_CONT 0x00010 /* Continue on errors */ @@ -1546,6 +1551,9 @@ struct ext4_sb_info { unsigned long s_mount_flags; unsigned int s_def_mount_opt; unsigned int s_def_mount_opt2; + /* rralloc per-cpu cursors and allocator vector */ + ext4_group_t __percpu *s_rralloc_cursor; + int (*s_vectored_allocator)(struct ext4_allocation_context *ac); ext4_fsblk_t s_sb_block; atomic64_t s_resv_clusters; kuid_t s_resuid; diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index b20a1bf866ab..c72cee642eca 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -962,7 +962,8 @@ struct inode *__ext4_new_inode(struct mnt_idmap *idmap, if (!inode) return ERR_PTR(-ENOMEM); ei = EXT4_I(inode); - + /* Zero the rralloc per-inode cursor */ + atomic_set(&ei->cursor, 0); /* * Initialize owners and quota early so that we don't have to account * for quota initialization worst case in standard inode creating diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 20e9fdaf4301..df3805bb4a2f 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -2266,9 +2266,19 @@ static void ext4_mb_use_best_found(struct ext4_allocation_context *ac, folio_get(ac->ac_buddy_folio); /* store last allocated for subsequent stream allocation */ if (ac->ac_flags & EXT4_MB_STREAM_ALLOC) { - int hash = ac->ac_inode->i_ino % sbi->s_mb_nr_global_goals; + /* update global goals */ + if (!test_opt(ac->ac_sb, RRALLOC)) { + int hash = ac->ac_inode->i_ino % sbi->s_mb_nr_global_goals; + + WRITE_ONCE(sbi->s_mb_last_groups[hash], ac->ac_f_ex.fe_group); + } else { + /* update inode cursor and current per-cpu cursor */ + ext4_group_t cursor = ac->ac_f_ex.fe_group; + struct ext4_inode_info *ei = EXT4_I(ac->ac_inode); - WRITE_ONCE(sbi->s_mb_last_groups[hash], ac->ac_f_ex.fe_group); + atomic_set(&ei->cursor, cursor); + *this_cpu_ptr(sbi->s_rralloc_cursor) = cursor; + } } /* @@ -2991,7 +3001,7 @@ static int ext4_mb_scan_group(struct ext4_allocation_context *ac, return ret; } -static noinline_for_stack int +noinline_for_stack int ext4_mb_regular_allocator(struct ext4_allocation_context *ac) { ext4_group_t i; @@ -3111,6 +3121,102 @@ ext4_mb_regular_allocator(struct ext4_allocation_context *ac) return err; } +/* Rotating allocator (round-robin) */ +noinline_for_stack int +ext4_mb_rotating_allocator(struct ext4_allocation_context *ac) +{ + ext4_group_t goal; + int err = 0; + struct super_block *sb = ac->ac_sb; + struct ext4_sb_info *sbi = EXT4_SB(sb); + struct ext4_buddy e4b; + struct ext4_inode_info *ei = EXT4_I(ac->ac_inode); + ext4_group_t start = *this_cpu_ptr(sbi->s_rralloc_cursor); + + /* if inode cursor=0, use per-cpu cursor */ + goal = atomic_cmpxchg(&ei->cursor, 0, start); + if (!goal) + goal = start; + + ac->ac_g_ex.fe_group = goal; + + /* first, try the goal */ + err = ext4_mb_find_by_goal(ac, &e4b); + if (err || ac->ac_status == AC_STATUS_FOUND) + goto out; + + /* RRallocation promotes stream behavior */ + ac->ac_flags |= EXT4_MB_STREAM_ALLOC; + ac->ac_flags |= EXT4_MB_HINT_FIRST; + ac->ac_flags &= ~EXT4_MB_HINT_GOAL_ONLY; + ac->ac_g_ex.fe_group = goal; + ac->ac_g_ex.fe_start = -1; + ac->ac_2order = 0; + ac->ac_criteria = CR_ANY_FREE; + ac->ac_e4b = &e4b; + ac->ac_prefetch_ios = 0; + ac->ac_first_err = 0; +repeat: + while (ac->ac_criteria < EXT4_MB_NUM_CRS) { + err = ext4_mb_scan_groups(ac); + if (err) + goto out; + + if (ac->ac_status != AC_STATUS_CONTINUE) + break; + } + + if (ac->ac_b_ex.fe_len > 0 && ac->ac_status != AC_STATUS_FOUND && + !(ac->ac_flags & EXT4_MB_HINT_FIRST)) { + /* + * We've been searching too long. Let's try to allocate + * the best chunk we've found so far + */ + ext4_mb_try_best_found(ac, &e4b); + if (ac->ac_status != AC_STATUS_FOUND) { + int lost; + + /* + * Someone more lucky has already allocated it. + * The only thing we can do is just take first + * found block(s) + */ + lost = atomic_inc_return(&sbi->s_mb_lost_chunks); + mb_debug(sb, "lost chunk, group: %u, start: %d, len: %d, lost: %d\n", + ac->ac_b_ex.fe_group, ac->ac_b_ex.fe_start, + ac->ac_b_ex.fe_len, lost); + + ac->ac_b_ex.fe_group = 0; + ac->ac_b_ex.fe_start = 0; + ac->ac_b_ex.fe_len = 0; + ac->ac_status = AC_STATUS_CONTINUE; + ac->ac_flags |= EXT4_MB_HINT_FIRST; + ac->ac_criteria = CR_ANY_FREE; + goto repeat; + } + } + + if (sbi->s_mb_stats && ac->ac_status == AC_STATUS_FOUND) { + atomic64_inc(&sbi->s_bal_cX_hits[ac->ac_criteria]); + if (ac->ac_flags & EXT4_MB_STREAM_ALLOC && + ac->ac_b_ex.fe_group == ac->ac_g_ex.fe_group) + atomic_inc(&sbi->s_bal_stream_goals); + } + +out: + if (!err && ac->ac_status != AC_STATUS_FOUND && ac->ac_first_err) + err = ac->ac_first_err; + + mb_debug(sb, "Best len %d, origin len %d, ac_status %u, ac_flags 0x%x, cr %d ret %d\n", + ac->ac_b_ex.fe_len, ac->ac_o_ex.fe_len, ac->ac_status, + ac->ac_flags, ac->ac_criteria, err); + + if (ac->ac_prefetch_nr) + ext4_mb_prefetch_fini(sb, ac->ac_prefetch_grp, ac->ac_prefetch_nr); + + return err; +} + static void *ext4_mb_seq_groups_start(struct seq_file *seq, loff_t *pos) { struct super_block *sb = pde_data(file_inode(seq->file)); @@ -6313,7 +6419,8 @@ ext4_fsblk_t ext4_mb_new_blocks(handle_t *handle, goto errout; repeat: /* allocate space in core */ - *errp = ext4_mb_regular_allocator(ac); + /* use vector separation for rralloc allocator */ + *errp = sbi->s_vectored_allocator(ac); /* * pa allocated above is added to grp->bb_prealloc_list only * when we were able to allocate some block i.e. when diff --git a/fs/ext4/mballoc.h b/fs/ext4/mballoc.h index 15a049f05d04..27d7a7dd7044 100644 --- a/fs/ext4/mballoc.h +++ b/fs/ext4/mballoc.h @@ -270,4 +270,7 @@ ext4_mballoc_query_range( ext4_mballoc_query_range_fn formatter, void *priv); +/* Expose rotating & regular allocator for vectoring */ +int ext4_mb_rotating_allocator(struct ext4_allocation_context *ac); +int ext4_mb_regular_allocator(struct ext4_allocation_context *ac); #endif diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 43f680c750ae..1e4cf6a40c88 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1284,6 +1284,10 @@ static void ext4_put_super(struct super_block *sb) int aborted = 0; int err; + /* free per cpu cursors */ + if (sbi->s_rralloc_cursor) + free_percpu(sbi->s_rralloc_cursor); + /* * Unregister sysfs before destroying jbd2 journal. * Since we could still access attr_journal_task attribute via sysfs @@ -1683,7 +1687,7 @@ enum { Opt_dioread_nolock, Opt_dioread_lock, Opt_discard, Opt_nodiscard, Opt_init_itable, Opt_noinit_itable, Opt_max_dir_size_kb, Opt_nojournal_checksum, Opt_nombcache, - Opt_no_prefetch_block_bitmaps, Opt_mb_optimize_scan, + Opt_no_prefetch_block_bitmaps, Opt_mb_optimize_scan, Opt_rralloc, Opt_errors, Opt_data, Opt_data_err, Opt_jqfmt, Opt_dax_type, #ifdef CONFIG_EXT4_DEBUG Opt_fc_debug_max_replay, Opt_fc_debug_force @@ -1805,6 +1809,7 @@ static const struct fs_parameter_spec ext4_param_specs[] = { fsparam_u32 ("init_itable", Opt_init_itable), fsparam_flag ("init_itable", Opt_init_itable), fsparam_flag ("noinit_itable", Opt_noinit_itable), + fsparam_flag ("rralloc", Opt_rralloc), #ifdef CONFIG_EXT4_DEBUG fsparam_flag ("fc_debug_force", Opt_fc_debug_force), fsparam_u32 ("fc_debug_max_replay", Opt_fc_debug_max_replay), @@ -1886,6 +1891,7 @@ static const struct mount_opts { {Opt_noauto_da_alloc, EXT4_MOUNT_NO_AUTO_DA_ALLOC, MOPT_SET}, {Opt_auto_da_alloc, EXT4_MOUNT_NO_AUTO_DA_ALLOC, MOPT_CLEAR}, {Opt_noinit_itable, EXT4_MOUNT_INIT_INODE_TABLE, MOPT_CLEAR}, + {Opt_rralloc, EXT4_MOUNT_RRALLOC, MOPT_SET}, {Opt_dax_type, 0, MOPT_EXT4_ONLY}, {Opt_journal_dev, 0, MOPT_NO_EXT2}, {Opt_journal_path, 0, MOPT_NO_EXT2}, @@ -2272,6 +2278,9 @@ static int ext4_parse_param(struct fs_context *fc, struct fs_parameter *param) ctx->s_li_wait_mult = result.uint_32; ctx->spec |= EXT4_SPEC_s_li_wait_mult; return 0; + case Opt_rralloc: + ctx_set_mount_opt(ctx, EXT4_MOUNT_RRALLOC); + return 0; case Opt_max_dir_size_kb: ctx->s_max_dir_size_kb = result.uint_32; ctx->spec |= EXT4_SPEC_s_max_dir_size_kb; @@ -5311,6 +5320,9 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb) struct ext4_fs_context *ctx = fc->fs_private; int silent = fc->sb_flags & SB_SILENT; + /* Unconditional default regular allocator (rralloc separation) */ + sbi->s_vectored_allocator = ext4_mb_regular_allocator; + /* Set defaults for the variables that will be set during parsing */ if (!(ctx->spec & EXT4_SPEC_JOURNAL_IOPRIO)) ctx->journal_ioprio = EXT4_DEF_JOURNAL_IOPRIO; @@ -5522,6 +5534,25 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb) } } + /* rralloc: initialize per-cpu cursors and rotational allocator */ + if (test_opt(sb, RRALLOC)) { + sbi->s_rralloc_cursor = alloc_percpu(ext4_group_t); + if (!sbi->s_rralloc_cursor) + return -ENOMEM; + + int ncpus = num_possible_cpus(); + ext4_group_t total_groups = ext4_get_groups_count(sb); + ext4_group_t groups_per_cpu = total_groups / ncpus; + int cpu; + + for_each_possible_cpu(cpu) { + *per_cpu_ptr(sbi->s_rralloc_cursor, cpu) = cpu * groups_per_cpu; + } + + /* Vectored allocator to round-robin allocator */ + sbi->s_vectored_allocator = ext4_mb_rotating_allocator; + } + /* * Get the # of file system overhead blocks from the * superblock if present. -- 2.53.0
null
null
null
[PATCH] ext4: rralloc - (former rotalloc) improved round-robin allocation policy
On Thu, Feb 26, 2026 at 10:50:29PM +0100, Mario Lohajner wrote: You haven't explained *why* allocation distribution and avoiding hotspotting is something we should care about. If it's not performance, then why? How does reducing hotspotting improve things for the user? Why should we care about this goal that apparently is so important to you? - Ted
{ "author": "\"Theodore Tso\" <tytso@mit.edu>", "date": "Thu, 26 Feb 2026 20:12:00 -0500", "is_openbsd": false, "thread_id": "2af6328d-5a72-476d-9768-9398a9417ea6@rocketmail.com.mbox.gz" }
lkml_critique
lkml
V2 patch incorporating feedback from previous discussion: - per-inode atomic cursors to enforce stream sequentiality - per-CPU starting points to reduce contention - allocator isolation maintained; regular allocator untouched - name changed to rralloc to avoid confusion with "rotational" - preliminary tests confirm expected performance Files modified: - fs/ext4/ext4.h rralloc policy declared, per-CPU cursors & allocator vector - fs/ext4/ialloc.c initialize (zero) per-inode cursor - fs/ext4/mballoc.h expose allocator functions for vectoring in super.c - fs/ext4/super.c parse rralloc option, init per-CPU cursors and allocator vector - fs/ext4/mballoc.c add rotating allocator, vectored allocator Signed-off-by: Mario Lohajner <mario_lohajner@rocketmail.com> --- fs/ext4/ext4.h | 10 +++- fs/ext4/ialloc.c | 3 +- fs/ext4/mballoc.c | 115 ++++++++++++++++++++++++++++++++++++++++++++-- fs/ext4/mballoc.h | 3 ++ fs/ext4/super.c | 33 ++++++++++++- 5 files changed, 157 insertions(+), 7 deletions(-) diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 293f698b7042..210332affd47 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -229,6 +229,9 @@ struct ext4_allocation_request { unsigned int flags; }; +/* rralloc show pointer type to compiler */ +struct ext4_allocation_context; + /* * Logical to physical block mapping, used by ext4_map_blocks() * @@ -1032,7 +1035,8 @@ struct ext4_inode_info { __le32 i_data[15]; /* unconverted */ __u32 i_dtime; ext4_fsblk_t i_file_acl; - + /* rralloc per inode cursor */ + atomic_t cursor; /* * i_block_group is the number of the block group which contains * this file's inode. Constant across the lifetime of the inode, @@ -1217,6 +1221,7 @@ struct ext4_inode_info { * Mount flags set via mount options or defaults */ #define EXT4_MOUNT_NO_MBCACHE 0x00001 /* Do not use mbcache */ +#define EXT4_MOUNT_RRALLOC 0x00002 /* Use round-robin policy/allocator */ #define EXT4_MOUNT_GRPID 0x00004 /* Create files with directory's group */ #define EXT4_MOUNT_DEBUG 0x00008 /* Some debugging messages */ #define EXT4_MOUNT_ERRORS_CONT 0x00010 /* Continue on errors */ @@ -1546,6 +1551,9 @@ struct ext4_sb_info { unsigned long s_mount_flags; unsigned int s_def_mount_opt; unsigned int s_def_mount_opt2; + /* rralloc per-cpu cursors and allocator vector */ + ext4_group_t __percpu *s_rralloc_cursor; + int (*s_vectored_allocator)(struct ext4_allocation_context *ac); ext4_fsblk_t s_sb_block; atomic64_t s_resv_clusters; kuid_t s_resuid; diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index b20a1bf866ab..c72cee642eca 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -962,7 +962,8 @@ struct inode *__ext4_new_inode(struct mnt_idmap *idmap, if (!inode) return ERR_PTR(-ENOMEM); ei = EXT4_I(inode); - + /* Zero the rralloc per-inode cursor */ + atomic_set(&ei->cursor, 0); /* * Initialize owners and quota early so that we don't have to account * for quota initialization worst case in standard inode creating diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 20e9fdaf4301..df3805bb4a2f 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -2266,9 +2266,19 @@ static void ext4_mb_use_best_found(struct ext4_allocation_context *ac, folio_get(ac->ac_buddy_folio); /* store last allocated for subsequent stream allocation */ if (ac->ac_flags & EXT4_MB_STREAM_ALLOC) { - int hash = ac->ac_inode->i_ino % sbi->s_mb_nr_global_goals; + /* update global goals */ + if (!test_opt(ac->ac_sb, RRALLOC)) { + int hash = ac->ac_inode->i_ino % sbi->s_mb_nr_global_goals; + + WRITE_ONCE(sbi->s_mb_last_groups[hash], ac->ac_f_ex.fe_group); + } else { + /* update inode cursor and current per-cpu cursor */ + ext4_group_t cursor = ac->ac_f_ex.fe_group; + struct ext4_inode_info *ei = EXT4_I(ac->ac_inode); - WRITE_ONCE(sbi->s_mb_last_groups[hash], ac->ac_f_ex.fe_group); + atomic_set(&ei->cursor, cursor); + *this_cpu_ptr(sbi->s_rralloc_cursor) = cursor; + } } /* @@ -2991,7 +3001,7 @@ static int ext4_mb_scan_group(struct ext4_allocation_context *ac, return ret; } -static noinline_for_stack int +noinline_for_stack int ext4_mb_regular_allocator(struct ext4_allocation_context *ac) { ext4_group_t i; @@ -3111,6 +3121,102 @@ ext4_mb_regular_allocator(struct ext4_allocation_context *ac) return err; } +/* Rotating allocator (round-robin) */ +noinline_for_stack int +ext4_mb_rotating_allocator(struct ext4_allocation_context *ac) +{ + ext4_group_t goal; + int err = 0; + struct super_block *sb = ac->ac_sb; + struct ext4_sb_info *sbi = EXT4_SB(sb); + struct ext4_buddy e4b; + struct ext4_inode_info *ei = EXT4_I(ac->ac_inode); + ext4_group_t start = *this_cpu_ptr(sbi->s_rralloc_cursor); + + /* if inode cursor=0, use per-cpu cursor */ + goal = atomic_cmpxchg(&ei->cursor, 0, start); + if (!goal) + goal = start; + + ac->ac_g_ex.fe_group = goal; + + /* first, try the goal */ + err = ext4_mb_find_by_goal(ac, &e4b); + if (err || ac->ac_status == AC_STATUS_FOUND) + goto out; + + /* RRallocation promotes stream behavior */ + ac->ac_flags |= EXT4_MB_STREAM_ALLOC; + ac->ac_flags |= EXT4_MB_HINT_FIRST; + ac->ac_flags &= ~EXT4_MB_HINT_GOAL_ONLY; + ac->ac_g_ex.fe_group = goal; + ac->ac_g_ex.fe_start = -1; + ac->ac_2order = 0; + ac->ac_criteria = CR_ANY_FREE; + ac->ac_e4b = &e4b; + ac->ac_prefetch_ios = 0; + ac->ac_first_err = 0; +repeat: + while (ac->ac_criteria < EXT4_MB_NUM_CRS) { + err = ext4_mb_scan_groups(ac); + if (err) + goto out; + + if (ac->ac_status != AC_STATUS_CONTINUE) + break; + } + + if (ac->ac_b_ex.fe_len > 0 && ac->ac_status != AC_STATUS_FOUND && + !(ac->ac_flags & EXT4_MB_HINT_FIRST)) { + /* + * We've been searching too long. Let's try to allocate + * the best chunk we've found so far + */ + ext4_mb_try_best_found(ac, &e4b); + if (ac->ac_status != AC_STATUS_FOUND) { + int lost; + + /* + * Someone more lucky has already allocated it. + * The only thing we can do is just take first + * found block(s) + */ + lost = atomic_inc_return(&sbi->s_mb_lost_chunks); + mb_debug(sb, "lost chunk, group: %u, start: %d, len: %d, lost: %d\n", + ac->ac_b_ex.fe_group, ac->ac_b_ex.fe_start, + ac->ac_b_ex.fe_len, lost); + + ac->ac_b_ex.fe_group = 0; + ac->ac_b_ex.fe_start = 0; + ac->ac_b_ex.fe_len = 0; + ac->ac_status = AC_STATUS_CONTINUE; + ac->ac_flags |= EXT4_MB_HINT_FIRST; + ac->ac_criteria = CR_ANY_FREE; + goto repeat; + } + } + + if (sbi->s_mb_stats && ac->ac_status == AC_STATUS_FOUND) { + atomic64_inc(&sbi->s_bal_cX_hits[ac->ac_criteria]); + if (ac->ac_flags & EXT4_MB_STREAM_ALLOC && + ac->ac_b_ex.fe_group == ac->ac_g_ex.fe_group) + atomic_inc(&sbi->s_bal_stream_goals); + } + +out: + if (!err && ac->ac_status != AC_STATUS_FOUND && ac->ac_first_err) + err = ac->ac_first_err; + + mb_debug(sb, "Best len %d, origin len %d, ac_status %u, ac_flags 0x%x, cr %d ret %d\n", + ac->ac_b_ex.fe_len, ac->ac_o_ex.fe_len, ac->ac_status, + ac->ac_flags, ac->ac_criteria, err); + + if (ac->ac_prefetch_nr) + ext4_mb_prefetch_fini(sb, ac->ac_prefetch_grp, ac->ac_prefetch_nr); + + return err; +} + static void *ext4_mb_seq_groups_start(struct seq_file *seq, loff_t *pos) { struct super_block *sb = pde_data(file_inode(seq->file)); @@ -6313,7 +6419,8 @@ ext4_fsblk_t ext4_mb_new_blocks(handle_t *handle, goto errout; repeat: /* allocate space in core */ - *errp = ext4_mb_regular_allocator(ac); + /* use vector separation for rralloc allocator */ + *errp = sbi->s_vectored_allocator(ac); /* * pa allocated above is added to grp->bb_prealloc_list only * when we were able to allocate some block i.e. when diff --git a/fs/ext4/mballoc.h b/fs/ext4/mballoc.h index 15a049f05d04..27d7a7dd7044 100644 --- a/fs/ext4/mballoc.h +++ b/fs/ext4/mballoc.h @@ -270,4 +270,7 @@ ext4_mballoc_query_range( ext4_mballoc_query_range_fn formatter, void *priv); +/* Expose rotating & regular allocator for vectoring */ +int ext4_mb_rotating_allocator(struct ext4_allocation_context *ac); +int ext4_mb_regular_allocator(struct ext4_allocation_context *ac); #endif diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 43f680c750ae..1e4cf6a40c88 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1284,6 +1284,10 @@ static void ext4_put_super(struct super_block *sb) int aborted = 0; int err; + /* free per cpu cursors */ + if (sbi->s_rralloc_cursor) + free_percpu(sbi->s_rralloc_cursor); + /* * Unregister sysfs before destroying jbd2 journal. * Since we could still access attr_journal_task attribute via sysfs @@ -1683,7 +1687,7 @@ enum { Opt_dioread_nolock, Opt_dioread_lock, Opt_discard, Opt_nodiscard, Opt_init_itable, Opt_noinit_itable, Opt_max_dir_size_kb, Opt_nojournal_checksum, Opt_nombcache, - Opt_no_prefetch_block_bitmaps, Opt_mb_optimize_scan, + Opt_no_prefetch_block_bitmaps, Opt_mb_optimize_scan, Opt_rralloc, Opt_errors, Opt_data, Opt_data_err, Opt_jqfmt, Opt_dax_type, #ifdef CONFIG_EXT4_DEBUG Opt_fc_debug_max_replay, Opt_fc_debug_force @@ -1805,6 +1809,7 @@ static const struct fs_parameter_spec ext4_param_specs[] = { fsparam_u32 ("init_itable", Opt_init_itable), fsparam_flag ("init_itable", Opt_init_itable), fsparam_flag ("noinit_itable", Opt_noinit_itable), + fsparam_flag ("rralloc", Opt_rralloc), #ifdef CONFIG_EXT4_DEBUG fsparam_flag ("fc_debug_force", Opt_fc_debug_force), fsparam_u32 ("fc_debug_max_replay", Opt_fc_debug_max_replay), @@ -1886,6 +1891,7 @@ static const struct mount_opts { {Opt_noauto_da_alloc, EXT4_MOUNT_NO_AUTO_DA_ALLOC, MOPT_SET}, {Opt_auto_da_alloc, EXT4_MOUNT_NO_AUTO_DA_ALLOC, MOPT_CLEAR}, {Opt_noinit_itable, EXT4_MOUNT_INIT_INODE_TABLE, MOPT_CLEAR}, + {Opt_rralloc, EXT4_MOUNT_RRALLOC, MOPT_SET}, {Opt_dax_type, 0, MOPT_EXT4_ONLY}, {Opt_journal_dev, 0, MOPT_NO_EXT2}, {Opt_journal_path, 0, MOPT_NO_EXT2}, @@ -2272,6 +2278,9 @@ static int ext4_parse_param(struct fs_context *fc, struct fs_parameter *param) ctx->s_li_wait_mult = result.uint_32; ctx->spec |= EXT4_SPEC_s_li_wait_mult; return 0; + case Opt_rralloc: + ctx_set_mount_opt(ctx, EXT4_MOUNT_RRALLOC); + return 0; case Opt_max_dir_size_kb: ctx->s_max_dir_size_kb = result.uint_32; ctx->spec |= EXT4_SPEC_s_max_dir_size_kb; @@ -5311,6 +5320,9 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb) struct ext4_fs_context *ctx = fc->fs_private; int silent = fc->sb_flags & SB_SILENT; + /* Unconditional default regular allocator (rralloc separation) */ + sbi->s_vectored_allocator = ext4_mb_regular_allocator; + /* Set defaults for the variables that will be set during parsing */ if (!(ctx->spec & EXT4_SPEC_JOURNAL_IOPRIO)) ctx->journal_ioprio = EXT4_DEF_JOURNAL_IOPRIO; @@ -5522,6 +5534,25 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb) } } + /* rralloc: initialize per-cpu cursors and rotational allocator */ + if (test_opt(sb, RRALLOC)) { + sbi->s_rralloc_cursor = alloc_percpu(ext4_group_t); + if (!sbi->s_rralloc_cursor) + return -ENOMEM; + + int ncpus = num_possible_cpus(); + ext4_group_t total_groups = ext4_get_groups_count(sb); + ext4_group_t groups_per_cpu = total_groups / ncpus; + int cpu; + + for_each_possible_cpu(cpu) { + *per_cpu_ptr(sbi->s_rralloc_cursor, cpu) = cpu * groups_per_cpu; + } + + /* Vectored allocator to round-robin allocator */ + sbi->s_vectored_allocator = ext4_mb_rotating_allocator; + } + /* * Get the # of file system overhead blocks from the * superblock if present. -- 2.53.0
null
null
null
[PATCH] ext4: rralloc - (former rotalloc) improved round-robin allocation policy
On 27. 02. 2026. 02:12, Theodore Tso wrote: Hello Ted, The motivation behind rralloc is to promote even allocation across the available LBA under overwrite-heavy workloads. With the regular allocator, repeated allocations can concentrate the pressure in specific regions (e.g., in-place overwrites or LBA start). rralloc spreads allocations across the LBA, reducing localized contention while: * promoting existing stream allocation behavior * distributing LBA space per CPU * preserving intra-file locality and heuristics * using the entire LBA in a round-robin manner * minimizing contention and races * keeping the regular allocator isolated and intact Block group usage analysis confirms that rralloc distributes allocations evenly without degrading baseline throughput: * small/medium/large file fragmentation experiments * synthetic tests * real-world tests (kernel source tree copies) https://github.com/mlohajner/RRALLOC Why it matters: Concentrated allocation can create contention, write amplification, and uneven LBA utilization even on modern NVMe/SSD devices. rralloc promotes round-robin allocation across the entire LBA, with per-CPU zones, ensuring more even allocation distribution while leaving throughput and existing heuristics unchanged. Workloads include (but not limited to): * media files processing and rendering * builds/compilations * database workloads End user impact: Users can enable rralloc at mount to take advantage of this alternative allocation policy. Regular allocator behavior remains unchanged for those who prefer linear or traditional allocation. This approach is backward-compatible, non-intrusive, and preserves on-disk format and existing heuristics. Preliminary observations under heavy multi-threaded workloads suggest reduced contention effects, but this has not yet been fully characterized. Regards, Mario Lohajner (manjo)
{ "author": "Mario Lohajner <mario_lohajner@rocketmail.com>", "date": "Fri, 27 Feb 2026 15:46:59 +0100", "is_openbsd": false, "thread_id": "2af6328d-5a72-476d-9768-9398a9417ea6@rocketmail.com.mbox.gz" }
lkml_critique
lkml
Since Armv9.6, FEAT_LSUI supplies the load/store instructions for previleged level to access to access user memory without clearing PSTATE.PAN bit. This patchset support FEAT_LSUI and applies it mainly in futex atomic operation and others. This patch based on v7.0-rc1 Patch History ============== from v14 to v15: - replace caslt to cast - cleanup the patch - https://lore.kernel.org/all/20260225182708.3225211-1-yeoreum.yun@arm.com/ from v13 to v14: - add LSUI config check in cpucap_is_possible() - fix build failure with clang-19 - https://lore.kernel.org/all/20260223174802.458411-1-yeoreum.yun@arm.com/ from v12 to v13: - rebase to v7.0-rc1 - apply CASLT for swapping guest descriptor - remove has_lsui() for checking cpu feature. - simplify __lsui_cmpxchg32() according to @Catalin's suggestion. - use uaccess_ttbr0_enable()/disable() for LSUI instructions. - https://lore.kernel.org/all/aYWuqTqM5MvudI5V@e129823.arm.com/ from v11 to v12: - rebase to v6.19-rc6 - add CONFIG_ARM64_LSUI - enable LSUI when !CPU_BIG_ENDIAN and PAN presents. - drop the swp emulation with LSUI insns instead, disable it when LSUI presents. - some of small fixes (useless prefix and suffix and etc). - https://lore.kernel.org/all/20251214112248.901769-1-yeoreum.yun@arm.com/ from v10 to v11: - rebase to v6.19-rc1 - use cast instruction to emulate deprecated swpb instruction - https://lore.kernel.org/all/20251103163224.818353-1-yeoreum.yun@arm.com/ from v9 to v10: - apply FEAT_LSUI to user_swpX emulation. - add test coverage for LSUI bit in ID_AA64ISAR3_EL1 - rebase to v6.18-rc4 - https://lore.kernel.org/all/20250922102244.2068414-1-yeoreum.yun@arm.com/ from v8 to v9: - refotoring __lsui_cmpxchg64() - rebase to v6.17-rc7 - https://lore.kernel.org/all/20250917110838.917281-1-yeoreum.yun@arm.com/ from v7 to v8: - implements futex_atomic_eor() and futex_atomic_cmpxchg() with casalt with C helper. - Drop the small optimisation on ll/sc futex_atomic_set operation. - modify some commit message. - https://lore.kernel.org/all/20250816151929.197589-1-yeoreum.yun@arm.com/ from v6 to v7: - wrap FEAT_LSUI with CONFIG_AS_HAS_LSUI in cpufeature - remove unnecessary addition of indentation. - remove unnecessary mte_tco_enable()/disable() on LSUI operation. - https://lore.kernel.org/all/20250811163635.1562145-1-yeoreum.yun@arm.com/ from v5 to v6: - rebase to v6.17-rc1 - https://lore.kernel.org/all/20250722121956.1509403-1-yeoreum.yun@arm.com/ from v4 to v5: - remove futex_ll_sc.h futext_lsui and lsui.h and move them to futex.h - reorganize the patches. - https://lore.kernel.org/all/20250721083618.2743569-1-yeoreum.yun@arm.com/ from v3 to v4: - rebase to v6.16-rc7 - modify some patch's title. - https://lore.kernel.org/all/20250617183635.1266015-1-yeoreum.yun@arm.com/ from v2 to v3: - expose FEAT_LSUI to guest - add help section for LSUI Kconfig - https://lore.kernel.org/all/20250611151154.46362-1-yeoreum.yun@arm.com/ from v1 to v2: - remove empty v9.6 menu entry - locate HAS_LSUI in cpucaps in order - https://lore.kernel.org/all/20250611104916.10636-1-yeoreum.yun@arm.com/ Yeoreum Yun (8): arm64: cpufeature: add FEAT_LSUI KVM: arm64: expose FEAT_LSUI to guest KVM: arm64: kselftest: set_id_regs: add test for FEAT_LSUI arm64: futex: refactor futex atomic operation arm64: futex: support futex with FEAT_LSUI arm64: armv8_deprecated: disable swp emulation when FEAT_LSUI present KVM: arm64: use CAST instruction for swapping guest descriptor arm64: Kconfig: add support for LSUI arch/arm64/Kconfig | 20 ++ arch/arm64/include/asm/cpucaps.h | 2 + arch/arm64/include/asm/futex.h | 297 +++++++++++++++--- arch/arm64/include/asm/lsui.h | 27 ++ arch/arm64/kernel/armv8_deprecated.c | 16 + arch/arm64/kernel/cpufeature.c | 10 + arch/arm64/kvm/at.c | 42 ++- arch/arm64/kvm/sys_regs.c | 3 +- arch/arm64/tools/cpucaps | 1 + .../testing/selftests/kvm/arm64/set_id_regs.c | 1 + 10 files changed, 367 insertions(+), 52 deletions(-) create mode 100644 arch/arm64/include/asm/lsui.h -- LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}
null
null
null
[PATCH v15 0/8] support FEAT_LSUI
Since Armv9.6, FEAT_LSUI introduces load/store instructions that allow privileged code to access user memory without clearing the PSTATE.PAN bit. Add CPU feature detection for FEAT_LSUI and enable its use when FEAT_PAN is present so that removes the need for SW_PAN handling when using LSUI instructions. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com> --- arch/arm64/include/asm/cpucaps.h | 2 ++ arch/arm64/kernel/cpufeature.c | 10 ++++++++++ arch/arm64/tools/cpucaps | 1 + 3 files changed, 13 insertions(+) diff --git a/arch/arm64/include/asm/cpucaps.h b/arch/arm64/include/asm/cpucaps.h index 177c691914f8..6e3da333442e 100644 --- a/arch/arm64/include/asm/cpucaps.h +++ b/arch/arm64/include/asm/cpucaps.h @@ -71,6 +71,8 @@ cpucap_is_possible(const unsigned int cap) return true; case ARM64_HAS_PMUV3: return IS_ENABLED(CONFIG_HW_PERF_EVENTS); + case ARM64_HAS_LSUI: + return IS_ENABLED(CONFIG_ARM64_LSUI); } return true; diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index c31f8e17732a..5074ff32176f 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -281,6 +281,7 @@ static const struct arm64_ftr_bits ftr_id_aa64isar2[] = { static const struct arm64_ftr_bits ftr_id_aa64isar3[] = { ARM64_FTR_BITS(FTR_VISIBLE, FTR_NONSTRICT, FTR_LOWER_SAFE, ID_AA64ISAR3_EL1_FPRCVT_SHIFT, 4, 0), + ARM64_FTR_BITS(FTR_HIDDEN, FTR_NONSTRICT, FTR_LOWER_SAFE, ID_AA64ISAR3_EL1_LSUI_SHIFT, 4, ID_AA64ISAR3_EL1_LSUI_NI), ARM64_FTR_BITS(FTR_VISIBLE, FTR_NONSTRICT, FTR_LOWER_SAFE, ID_AA64ISAR3_EL1_LSFE_SHIFT, 4, 0), ARM64_FTR_BITS(FTR_VISIBLE, FTR_NONSTRICT, FTR_LOWER_SAFE, ID_AA64ISAR3_EL1_FAMINMAX_SHIFT, 4, 0), ARM64_FTR_END, @@ -3169,6 +3170,15 @@ static const struct arm64_cpu_capabilities arm64_features[] = { .cpu_enable = cpu_enable_ls64_v, ARM64_CPUID_FIELDS(ID_AA64ISAR1_EL1, LS64, LS64_V) }, +#ifdef CONFIG_ARM64_LSUI + { + .desc = "Unprivileged Load Store Instructions (LSUI)", + .capability = ARM64_HAS_LSUI, + .type = ARM64_CPUCAP_SYSTEM_FEATURE, + .matches = has_cpuid_feature, + ARM64_CPUID_FIELDS(ID_AA64ISAR3_EL1, LSUI, IMP) + }, +#endif {}, }; diff --git a/arch/arm64/tools/cpucaps b/arch/arm64/tools/cpucaps index 7261553b644b..b7286d977788 100644 --- a/arch/arm64/tools/cpucaps +++ b/arch/arm64/tools/cpucaps @@ -48,6 +48,7 @@ HAS_LPA2 HAS_LSE_ATOMICS HAS_LS64 HAS_LS64_V +HAS_LSUI HAS_MOPS HAS_NESTED_VIRT HAS_BBML2_NOABORT -- LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}
{ "author": "Yeoreum Yun <yeoreum.yun@arm.com>", "date": "Fri, 27 Feb 2026 15:16:58 +0000", "is_openbsd": false, "thread_id": "20260227151705.1275328-4-yeoreum.yun@arm.com.mbox.gz" }
lkml_critique
lkml
Since Armv9.6, FEAT_LSUI supplies the load/store instructions for previleged level to access to access user memory without clearing PSTATE.PAN bit. This patchset support FEAT_LSUI and applies it mainly in futex atomic operation and others. This patch based on v7.0-rc1 Patch History ============== from v14 to v15: - replace caslt to cast - cleanup the patch - https://lore.kernel.org/all/20260225182708.3225211-1-yeoreum.yun@arm.com/ from v13 to v14: - add LSUI config check in cpucap_is_possible() - fix build failure with clang-19 - https://lore.kernel.org/all/20260223174802.458411-1-yeoreum.yun@arm.com/ from v12 to v13: - rebase to v7.0-rc1 - apply CASLT for swapping guest descriptor - remove has_lsui() for checking cpu feature. - simplify __lsui_cmpxchg32() according to @Catalin's suggestion. - use uaccess_ttbr0_enable()/disable() for LSUI instructions. - https://lore.kernel.org/all/aYWuqTqM5MvudI5V@e129823.arm.com/ from v11 to v12: - rebase to v6.19-rc6 - add CONFIG_ARM64_LSUI - enable LSUI when !CPU_BIG_ENDIAN and PAN presents. - drop the swp emulation with LSUI insns instead, disable it when LSUI presents. - some of small fixes (useless prefix and suffix and etc). - https://lore.kernel.org/all/20251214112248.901769-1-yeoreum.yun@arm.com/ from v10 to v11: - rebase to v6.19-rc1 - use cast instruction to emulate deprecated swpb instruction - https://lore.kernel.org/all/20251103163224.818353-1-yeoreum.yun@arm.com/ from v9 to v10: - apply FEAT_LSUI to user_swpX emulation. - add test coverage for LSUI bit in ID_AA64ISAR3_EL1 - rebase to v6.18-rc4 - https://lore.kernel.org/all/20250922102244.2068414-1-yeoreum.yun@arm.com/ from v8 to v9: - refotoring __lsui_cmpxchg64() - rebase to v6.17-rc7 - https://lore.kernel.org/all/20250917110838.917281-1-yeoreum.yun@arm.com/ from v7 to v8: - implements futex_atomic_eor() and futex_atomic_cmpxchg() with casalt with C helper. - Drop the small optimisation on ll/sc futex_atomic_set operation. - modify some commit message. - https://lore.kernel.org/all/20250816151929.197589-1-yeoreum.yun@arm.com/ from v6 to v7: - wrap FEAT_LSUI with CONFIG_AS_HAS_LSUI in cpufeature - remove unnecessary addition of indentation. - remove unnecessary mte_tco_enable()/disable() on LSUI operation. - https://lore.kernel.org/all/20250811163635.1562145-1-yeoreum.yun@arm.com/ from v5 to v6: - rebase to v6.17-rc1 - https://lore.kernel.org/all/20250722121956.1509403-1-yeoreum.yun@arm.com/ from v4 to v5: - remove futex_ll_sc.h futext_lsui and lsui.h and move them to futex.h - reorganize the patches. - https://lore.kernel.org/all/20250721083618.2743569-1-yeoreum.yun@arm.com/ from v3 to v4: - rebase to v6.16-rc7 - modify some patch's title. - https://lore.kernel.org/all/20250617183635.1266015-1-yeoreum.yun@arm.com/ from v2 to v3: - expose FEAT_LSUI to guest - add help section for LSUI Kconfig - https://lore.kernel.org/all/20250611151154.46362-1-yeoreum.yun@arm.com/ from v1 to v2: - remove empty v9.6 menu entry - locate HAS_LSUI in cpucaps in order - https://lore.kernel.org/all/20250611104916.10636-1-yeoreum.yun@arm.com/ Yeoreum Yun (8): arm64: cpufeature: add FEAT_LSUI KVM: arm64: expose FEAT_LSUI to guest KVM: arm64: kselftest: set_id_regs: add test for FEAT_LSUI arm64: futex: refactor futex atomic operation arm64: futex: support futex with FEAT_LSUI arm64: armv8_deprecated: disable swp emulation when FEAT_LSUI present KVM: arm64: use CAST instruction for swapping guest descriptor arm64: Kconfig: add support for LSUI arch/arm64/Kconfig | 20 ++ arch/arm64/include/asm/cpucaps.h | 2 + arch/arm64/include/asm/futex.h | 297 +++++++++++++++--- arch/arm64/include/asm/lsui.h | 27 ++ arch/arm64/kernel/armv8_deprecated.c | 16 + arch/arm64/kernel/cpufeature.c | 10 + arch/arm64/kvm/at.c | 42 ++- arch/arm64/kvm/sys_regs.c | 3 +- arch/arm64/tools/cpucaps | 1 + .../testing/selftests/kvm/arm64/set_id_regs.c | 1 + 10 files changed, 367 insertions(+), 52 deletions(-) create mode 100644 arch/arm64/include/asm/lsui.h -- LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}
null
null
null
[PATCH v15 0/8] support FEAT_LSUI
expose FEAT_LSUI to guest. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com> Acked-by: Marc Zyngier <maz@kernel.org> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> --- arch/arm64/kvm/sys_regs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c index a7cd0badc20c..b43e2bec35db 100644 --- a/arch/arm64/kvm/sys_regs.c +++ b/arch/arm64/kvm/sys_regs.c @@ -1805,7 +1805,7 @@ static u64 __kvm_read_sanitised_id_reg(const struct kvm_vcpu *vcpu, break; case SYS_ID_AA64ISAR3_EL1: val &= ID_AA64ISAR3_EL1_FPRCVT | ID_AA64ISAR3_EL1_LSFE | - ID_AA64ISAR3_EL1_FAMINMAX; + ID_AA64ISAR3_EL1_FAMINMAX | ID_AA64ISAR3_EL1_LSUI; break; case SYS_ID_AA64MMFR2_EL1: val &= ~ID_AA64MMFR2_EL1_CCIDX_MASK; @@ -3249,6 +3249,7 @@ static const struct sys_reg_desc sys_reg_descs[] = { ID_AA64ISAR2_EL1_GPA3)), ID_WRITABLE(ID_AA64ISAR3_EL1, (ID_AA64ISAR3_EL1_FPRCVT | ID_AA64ISAR3_EL1_LSFE | + ID_AA64ISAR3_EL1_LSUI | ID_AA64ISAR3_EL1_FAMINMAX)), ID_UNALLOCATED(6,4), ID_UNALLOCATED(6,5), -- LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}
{ "author": "Yeoreum Yun <yeoreum.yun@arm.com>", "date": "Fri, 27 Feb 2026 15:16:59 +0000", "is_openbsd": false, "thread_id": "20260227151705.1275328-4-yeoreum.yun@arm.com.mbox.gz" }
lkml_critique
lkml
Since Armv9.6, FEAT_LSUI supplies the load/store instructions for previleged level to access to access user memory without clearing PSTATE.PAN bit. This patchset support FEAT_LSUI and applies it mainly in futex atomic operation and others. This patch based on v7.0-rc1 Patch History ============== from v14 to v15: - replace caslt to cast - cleanup the patch - https://lore.kernel.org/all/20260225182708.3225211-1-yeoreum.yun@arm.com/ from v13 to v14: - add LSUI config check in cpucap_is_possible() - fix build failure with clang-19 - https://lore.kernel.org/all/20260223174802.458411-1-yeoreum.yun@arm.com/ from v12 to v13: - rebase to v7.0-rc1 - apply CASLT for swapping guest descriptor - remove has_lsui() for checking cpu feature. - simplify __lsui_cmpxchg32() according to @Catalin's suggestion. - use uaccess_ttbr0_enable()/disable() for LSUI instructions. - https://lore.kernel.org/all/aYWuqTqM5MvudI5V@e129823.arm.com/ from v11 to v12: - rebase to v6.19-rc6 - add CONFIG_ARM64_LSUI - enable LSUI when !CPU_BIG_ENDIAN and PAN presents. - drop the swp emulation with LSUI insns instead, disable it when LSUI presents. - some of small fixes (useless prefix and suffix and etc). - https://lore.kernel.org/all/20251214112248.901769-1-yeoreum.yun@arm.com/ from v10 to v11: - rebase to v6.19-rc1 - use cast instruction to emulate deprecated swpb instruction - https://lore.kernel.org/all/20251103163224.818353-1-yeoreum.yun@arm.com/ from v9 to v10: - apply FEAT_LSUI to user_swpX emulation. - add test coverage for LSUI bit in ID_AA64ISAR3_EL1 - rebase to v6.18-rc4 - https://lore.kernel.org/all/20250922102244.2068414-1-yeoreum.yun@arm.com/ from v8 to v9: - refotoring __lsui_cmpxchg64() - rebase to v6.17-rc7 - https://lore.kernel.org/all/20250917110838.917281-1-yeoreum.yun@arm.com/ from v7 to v8: - implements futex_atomic_eor() and futex_atomic_cmpxchg() with casalt with C helper. - Drop the small optimisation on ll/sc futex_atomic_set operation. - modify some commit message. - https://lore.kernel.org/all/20250816151929.197589-1-yeoreum.yun@arm.com/ from v6 to v7: - wrap FEAT_LSUI with CONFIG_AS_HAS_LSUI in cpufeature - remove unnecessary addition of indentation. - remove unnecessary mte_tco_enable()/disable() on LSUI operation. - https://lore.kernel.org/all/20250811163635.1562145-1-yeoreum.yun@arm.com/ from v5 to v6: - rebase to v6.17-rc1 - https://lore.kernel.org/all/20250722121956.1509403-1-yeoreum.yun@arm.com/ from v4 to v5: - remove futex_ll_sc.h futext_lsui and lsui.h and move them to futex.h - reorganize the patches. - https://lore.kernel.org/all/20250721083618.2743569-1-yeoreum.yun@arm.com/ from v3 to v4: - rebase to v6.16-rc7 - modify some patch's title. - https://lore.kernel.org/all/20250617183635.1266015-1-yeoreum.yun@arm.com/ from v2 to v3: - expose FEAT_LSUI to guest - add help section for LSUI Kconfig - https://lore.kernel.org/all/20250611151154.46362-1-yeoreum.yun@arm.com/ from v1 to v2: - remove empty v9.6 menu entry - locate HAS_LSUI in cpucaps in order - https://lore.kernel.org/all/20250611104916.10636-1-yeoreum.yun@arm.com/ Yeoreum Yun (8): arm64: cpufeature: add FEAT_LSUI KVM: arm64: expose FEAT_LSUI to guest KVM: arm64: kselftest: set_id_regs: add test for FEAT_LSUI arm64: futex: refactor futex atomic operation arm64: futex: support futex with FEAT_LSUI arm64: armv8_deprecated: disable swp emulation when FEAT_LSUI present KVM: arm64: use CAST instruction for swapping guest descriptor arm64: Kconfig: add support for LSUI arch/arm64/Kconfig | 20 ++ arch/arm64/include/asm/cpucaps.h | 2 + arch/arm64/include/asm/futex.h | 297 +++++++++++++++--- arch/arm64/include/asm/lsui.h | 27 ++ arch/arm64/kernel/armv8_deprecated.c | 16 + arch/arm64/kernel/cpufeature.c | 10 + arch/arm64/kvm/at.c | 42 ++- arch/arm64/kvm/sys_regs.c | 3 +- arch/arm64/tools/cpucaps | 1 + .../testing/selftests/kvm/arm64/set_id_regs.c | 1 + 10 files changed, 367 insertions(+), 52 deletions(-) create mode 100644 arch/arm64/include/asm/lsui.h -- LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}
null
null
null
[PATCH v15 0/8] support FEAT_LSUI
Add test coverage for FEAT_LSUI. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com> Reviewed-by: Mark Brown <broonie@kernel.org> --- tools/testing/selftests/kvm/arm64/set_id_regs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/kvm/arm64/set_id_regs.c b/tools/testing/selftests/kvm/arm64/set_id_regs.c index 73de5be58bab..fa3478a6c914 100644 --- a/tools/testing/selftests/kvm/arm64/set_id_regs.c +++ b/tools/testing/selftests/kvm/arm64/set_id_regs.c @@ -124,6 +124,7 @@ static const struct reg_ftr_bits ftr_id_aa64isar2_el1[] = { static const struct reg_ftr_bits ftr_id_aa64isar3_el1[] = { REG_FTR_BITS(FTR_LOWER_SAFE, ID_AA64ISAR3_EL1, FPRCVT, 0), + REG_FTR_BITS(FTR_LOWER_SAFE, ID_AA64ISAR3_EL1, LSUI, 0), REG_FTR_BITS(FTR_LOWER_SAFE, ID_AA64ISAR3_EL1, LSFE, 0), REG_FTR_BITS(FTR_LOWER_SAFE, ID_AA64ISAR3_EL1, FAMINMAX, 0), REG_FTR_END, -- LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}
{ "author": "Yeoreum Yun <yeoreum.yun@arm.com>", "date": "Fri, 27 Feb 2026 15:17:00 +0000", "is_openbsd": false, "thread_id": "20260227151705.1275328-4-yeoreum.yun@arm.com.mbox.gz" }
lkml_critique
lkml
Since Armv9.6, FEAT_LSUI supplies the load/store instructions for previleged level to access to access user memory without clearing PSTATE.PAN bit. This patchset support FEAT_LSUI and applies it mainly in futex atomic operation and others. This patch based on v7.0-rc1 Patch History ============== from v14 to v15: - replace caslt to cast - cleanup the patch - https://lore.kernel.org/all/20260225182708.3225211-1-yeoreum.yun@arm.com/ from v13 to v14: - add LSUI config check in cpucap_is_possible() - fix build failure with clang-19 - https://lore.kernel.org/all/20260223174802.458411-1-yeoreum.yun@arm.com/ from v12 to v13: - rebase to v7.0-rc1 - apply CASLT for swapping guest descriptor - remove has_lsui() for checking cpu feature. - simplify __lsui_cmpxchg32() according to @Catalin's suggestion. - use uaccess_ttbr0_enable()/disable() for LSUI instructions. - https://lore.kernel.org/all/aYWuqTqM5MvudI5V@e129823.arm.com/ from v11 to v12: - rebase to v6.19-rc6 - add CONFIG_ARM64_LSUI - enable LSUI when !CPU_BIG_ENDIAN and PAN presents. - drop the swp emulation with LSUI insns instead, disable it when LSUI presents. - some of small fixes (useless prefix and suffix and etc). - https://lore.kernel.org/all/20251214112248.901769-1-yeoreum.yun@arm.com/ from v10 to v11: - rebase to v6.19-rc1 - use cast instruction to emulate deprecated swpb instruction - https://lore.kernel.org/all/20251103163224.818353-1-yeoreum.yun@arm.com/ from v9 to v10: - apply FEAT_LSUI to user_swpX emulation. - add test coverage for LSUI bit in ID_AA64ISAR3_EL1 - rebase to v6.18-rc4 - https://lore.kernel.org/all/20250922102244.2068414-1-yeoreum.yun@arm.com/ from v8 to v9: - refotoring __lsui_cmpxchg64() - rebase to v6.17-rc7 - https://lore.kernel.org/all/20250917110838.917281-1-yeoreum.yun@arm.com/ from v7 to v8: - implements futex_atomic_eor() and futex_atomic_cmpxchg() with casalt with C helper. - Drop the small optimisation on ll/sc futex_atomic_set operation. - modify some commit message. - https://lore.kernel.org/all/20250816151929.197589-1-yeoreum.yun@arm.com/ from v6 to v7: - wrap FEAT_LSUI with CONFIG_AS_HAS_LSUI in cpufeature - remove unnecessary addition of indentation. - remove unnecessary mte_tco_enable()/disable() on LSUI operation. - https://lore.kernel.org/all/20250811163635.1562145-1-yeoreum.yun@arm.com/ from v5 to v6: - rebase to v6.17-rc1 - https://lore.kernel.org/all/20250722121956.1509403-1-yeoreum.yun@arm.com/ from v4 to v5: - remove futex_ll_sc.h futext_lsui and lsui.h and move them to futex.h - reorganize the patches. - https://lore.kernel.org/all/20250721083618.2743569-1-yeoreum.yun@arm.com/ from v3 to v4: - rebase to v6.16-rc7 - modify some patch's title. - https://lore.kernel.org/all/20250617183635.1266015-1-yeoreum.yun@arm.com/ from v2 to v3: - expose FEAT_LSUI to guest - add help section for LSUI Kconfig - https://lore.kernel.org/all/20250611151154.46362-1-yeoreum.yun@arm.com/ from v1 to v2: - remove empty v9.6 menu entry - locate HAS_LSUI in cpucaps in order - https://lore.kernel.org/all/20250611104916.10636-1-yeoreum.yun@arm.com/ Yeoreum Yun (8): arm64: cpufeature: add FEAT_LSUI KVM: arm64: expose FEAT_LSUI to guest KVM: arm64: kselftest: set_id_regs: add test for FEAT_LSUI arm64: futex: refactor futex atomic operation arm64: futex: support futex with FEAT_LSUI arm64: armv8_deprecated: disable swp emulation when FEAT_LSUI present KVM: arm64: use CAST instruction for swapping guest descriptor arm64: Kconfig: add support for LSUI arch/arm64/Kconfig | 20 ++ arch/arm64/include/asm/cpucaps.h | 2 + arch/arm64/include/asm/futex.h | 297 +++++++++++++++--- arch/arm64/include/asm/lsui.h | 27 ++ arch/arm64/kernel/armv8_deprecated.c | 16 + arch/arm64/kernel/cpufeature.c | 10 + arch/arm64/kvm/at.c | 42 ++- arch/arm64/kvm/sys_regs.c | 3 +- arch/arm64/tools/cpucaps | 1 + .../testing/selftests/kvm/arm64/set_id_regs.c | 1 + 10 files changed, 367 insertions(+), 52 deletions(-) create mode 100644 arch/arm64/include/asm/lsui.h -- LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}
null
null
null
[PATCH v15 0/8] support FEAT_LSUI
Refactor futex atomic operations using ll/sc method with clearing PSTATE.PAN to prepare to apply FEAT_LSUI on them. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> --- arch/arm64/include/asm/futex.h | 137 +++++++++++++++++++++------------ 1 file changed, 87 insertions(+), 50 deletions(-) diff --git a/arch/arm64/include/asm/futex.h b/arch/arm64/include/asm/futex.h index bc06691d2062..9a0efed50743 100644 --- a/arch/arm64/include/asm/futex.h +++ b/arch/arm64/include/asm/futex.h @@ -7,21 +7,25 @@ #include <linux/futex.h> #include <linux/uaccess.h> +#include <linux/stringify.h> #include <asm/errno.h> #define FUTEX_MAX_LOOPS 128 /* What's the largest number you can think of? */ -#define __futex_atomic_op(insn, ret, oldval, uaddr, tmp, oparg) \ -do { \ +#define LLSC_FUTEX_ATOMIC_OP(op, insn) \ +static __always_inline int \ +__llsc_futex_atomic_##op(int oparg, u32 __user *uaddr, int *oval) \ +{ \ unsigned int loops = FUTEX_MAX_LOOPS; \ + int ret, oldval, newval; \ \ uaccess_enable_privileged(); \ - asm volatile( \ + asm volatile("// __llsc_futex_atomic_" #op "\n" \ " prfm pstl1strm, %2\n" \ -"1: ldxr %w1, %2\n" \ +"1: ldxr %w[oldval], %2\n" \ insn "\n" \ -"2: stlxr %w0, %w3, %2\n" \ +"2: stlxr %w0, %w[newval], %2\n" \ " cbz %w0, 3f\n" \ " sub %w4, %w4, %w0\n" \ " cbnz %w4, 1b\n" \ @@ -30,50 +34,109 @@ do { \ " dmb ish\n" \ _ASM_EXTABLE_UACCESS_ERR(1b, 3b, %w0) \ _ASM_EXTABLE_UACCESS_ERR(2b, 3b, %w0) \ - : "=&r" (ret), "=&r" (oldval), "+Q" (*uaddr), "=&r" (tmp), \ + : "=&r" (ret), [oldval] "=&r" (oldval), "+Q" (*uaddr), \ + [newval] "=&r" (newval), \ "+r" (loops) \ - : "r" (oparg), "Ir" (-EAGAIN) \ + : [oparg] "r" (oparg), "Ir" (-EAGAIN) \ : "memory"); \ uaccess_disable_privileged(); \ -} while (0) + \ + if (!ret) \ + *oval = oldval; \ + \ + return ret; \ +} + +LLSC_FUTEX_ATOMIC_OP(add, "add %w[newval], %w[oldval], %w[oparg]") +LLSC_FUTEX_ATOMIC_OP(or, "orr %w[newval], %w[oldval], %w[oparg]") +LLSC_FUTEX_ATOMIC_OP(and, "and %w[newval], %w[oldval], %w[oparg]") +LLSC_FUTEX_ATOMIC_OP(eor, "eor %w[newval], %w[oldval], %w[oparg]") +LLSC_FUTEX_ATOMIC_OP(set, "mov %w[newval], %w[oparg]") + +static __always_inline int +__llsc_futex_cmpxchg(u32 __user *uaddr, u32 oldval, u32 newval, u32 *oval) +{ + int ret = 0; + unsigned int loops = FUTEX_MAX_LOOPS; + u32 val, tmp; + + uaccess_enable_privileged(); + asm volatile("//__llsc_futex_cmpxchg\n" +" prfm pstl1strm, %2\n" +"1: ldxr %w1, %2\n" +" eor %w3, %w1, %w5\n" +" cbnz %w3, 4f\n" +"2: stlxr %w3, %w6, %2\n" +" cbz %w3, 3f\n" +" sub %w4, %w4, %w3\n" +" cbnz %w4, 1b\n" +" mov %w0, %w7\n" +"3:\n" +" dmb ish\n" +"4:\n" + _ASM_EXTABLE_UACCESS_ERR(1b, 4b, %w0) + _ASM_EXTABLE_UACCESS_ERR(2b, 4b, %w0) + : "+r" (ret), "=&r" (val), "+Q" (*uaddr), "=&r" (tmp), "+r" (loops) + : "r" (oldval), "r" (newval), "Ir" (-EAGAIN) + : "memory"); + uaccess_disable_privileged(); + + if (!ret) + *oval = val; + + return ret; +} + +#define FUTEX_ATOMIC_OP(op) \ +static __always_inline int \ +__futex_atomic_##op(int oparg, u32 __user *uaddr, int *oval) \ +{ \ + return __llsc_futex_atomic_##op(oparg, uaddr, oval); \ +} + +FUTEX_ATOMIC_OP(add) +FUTEX_ATOMIC_OP(or) +FUTEX_ATOMIC_OP(and) +FUTEX_ATOMIC_OP(eor) +FUTEX_ATOMIC_OP(set) + +static __always_inline int +__futex_cmpxchg(u32 __user *uaddr, u32 oldval, u32 newval, u32 *oval) +{ + return __llsc_futex_cmpxchg(uaddr, oldval, newval, oval); +} static inline int arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *_uaddr) { - int oldval = 0, ret, tmp; - u32 __user *uaddr = __uaccess_mask_ptr(_uaddr); + int ret; + u32 __user *uaddr; if (!access_ok(_uaddr, sizeof(u32))) return -EFAULT; + uaddr = __uaccess_mask_ptr(_uaddr); + switch (op) { case FUTEX_OP_SET: - __futex_atomic_op("mov %w3, %w5", - ret, oldval, uaddr, tmp, oparg); + ret = __futex_atomic_set(oparg, uaddr, oval); break; case FUTEX_OP_ADD: - __futex_atomic_op("add %w3, %w1, %w5", - ret, oldval, uaddr, tmp, oparg); + ret = __futex_atomic_add(oparg, uaddr, oval); break; case FUTEX_OP_OR: - __futex_atomic_op("orr %w3, %w1, %w5", - ret, oldval, uaddr, tmp, oparg); + ret = __futex_atomic_or(oparg, uaddr, oval); break; case FUTEX_OP_ANDN: - __futex_atomic_op("and %w3, %w1, %w5", - ret, oldval, uaddr, tmp, ~oparg); + ret = __futex_atomic_and(~oparg, uaddr, oval); break; case FUTEX_OP_XOR: - __futex_atomic_op("eor %w3, %w1, %w5", - ret, oldval, uaddr, tmp, oparg); + ret = __futex_atomic_eor(oparg, uaddr, oval); break; default: ret = -ENOSYS; } - if (!ret) - *oval = oldval; - return ret; } @@ -81,40 +144,14 @@ static inline int futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *_uaddr, u32 oldval, u32 newval) { - int ret = 0; - unsigned int loops = FUTEX_MAX_LOOPS; - u32 val, tmp; u32 __user *uaddr; if (!access_ok(_uaddr, sizeof(u32))) return -EFAULT; uaddr = __uaccess_mask_ptr(_uaddr); - uaccess_enable_privileged(); - asm volatile("// futex_atomic_cmpxchg_inatomic\n" -" prfm pstl1strm, %2\n" -"1: ldxr %w1, %2\n" -" sub %w3, %w1, %w5\n" -" cbnz %w3, 4f\n" -"2: stlxr %w3, %w6, %2\n" -" cbz %w3, 3f\n" -" sub %w4, %w4, %w3\n" -" cbnz %w4, 1b\n" -" mov %w0, %w7\n" -"3:\n" -" dmb ish\n" -"4:\n" - _ASM_EXTABLE_UACCESS_ERR(1b, 4b, %w0) - _ASM_EXTABLE_UACCESS_ERR(2b, 4b, %w0) - : "+r" (ret), "=&r" (val), "+Q" (*uaddr), "=&r" (tmp), "+r" (loops) - : "r" (oldval), "r" (newval), "Ir" (-EAGAIN) - : "memory"); - uaccess_disable_privileged(); - - if (!ret) - *uval = val; - return ret; + return __futex_cmpxchg(uaddr, oldval, newval, uval); } #endif /* __ASM_FUTEX_H */ -- LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}
{ "author": "Yeoreum Yun <yeoreum.yun@arm.com>", "date": "Fri, 27 Feb 2026 15:17:01 +0000", "is_openbsd": false, "thread_id": "20260227151705.1275328-4-yeoreum.yun@arm.com.mbox.gz" }
lkml_critique
lkml
Since Armv9.6, FEAT_LSUI supplies the load/store instructions for previleged level to access to access user memory without clearing PSTATE.PAN bit. This patchset support FEAT_LSUI and applies it mainly in futex atomic operation and others. This patch based on v7.0-rc1 Patch History ============== from v14 to v15: - replace caslt to cast - cleanup the patch - https://lore.kernel.org/all/20260225182708.3225211-1-yeoreum.yun@arm.com/ from v13 to v14: - add LSUI config check in cpucap_is_possible() - fix build failure with clang-19 - https://lore.kernel.org/all/20260223174802.458411-1-yeoreum.yun@arm.com/ from v12 to v13: - rebase to v7.0-rc1 - apply CASLT for swapping guest descriptor - remove has_lsui() for checking cpu feature. - simplify __lsui_cmpxchg32() according to @Catalin's suggestion. - use uaccess_ttbr0_enable()/disable() for LSUI instructions. - https://lore.kernel.org/all/aYWuqTqM5MvudI5V@e129823.arm.com/ from v11 to v12: - rebase to v6.19-rc6 - add CONFIG_ARM64_LSUI - enable LSUI when !CPU_BIG_ENDIAN and PAN presents. - drop the swp emulation with LSUI insns instead, disable it when LSUI presents. - some of small fixes (useless prefix and suffix and etc). - https://lore.kernel.org/all/20251214112248.901769-1-yeoreum.yun@arm.com/ from v10 to v11: - rebase to v6.19-rc1 - use cast instruction to emulate deprecated swpb instruction - https://lore.kernel.org/all/20251103163224.818353-1-yeoreum.yun@arm.com/ from v9 to v10: - apply FEAT_LSUI to user_swpX emulation. - add test coverage for LSUI bit in ID_AA64ISAR3_EL1 - rebase to v6.18-rc4 - https://lore.kernel.org/all/20250922102244.2068414-1-yeoreum.yun@arm.com/ from v8 to v9: - refotoring __lsui_cmpxchg64() - rebase to v6.17-rc7 - https://lore.kernel.org/all/20250917110838.917281-1-yeoreum.yun@arm.com/ from v7 to v8: - implements futex_atomic_eor() and futex_atomic_cmpxchg() with casalt with C helper. - Drop the small optimisation on ll/sc futex_atomic_set operation. - modify some commit message. - https://lore.kernel.org/all/20250816151929.197589-1-yeoreum.yun@arm.com/ from v6 to v7: - wrap FEAT_LSUI with CONFIG_AS_HAS_LSUI in cpufeature - remove unnecessary addition of indentation. - remove unnecessary mte_tco_enable()/disable() on LSUI operation. - https://lore.kernel.org/all/20250811163635.1562145-1-yeoreum.yun@arm.com/ from v5 to v6: - rebase to v6.17-rc1 - https://lore.kernel.org/all/20250722121956.1509403-1-yeoreum.yun@arm.com/ from v4 to v5: - remove futex_ll_sc.h futext_lsui and lsui.h and move them to futex.h - reorganize the patches. - https://lore.kernel.org/all/20250721083618.2743569-1-yeoreum.yun@arm.com/ from v3 to v4: - rebase to v6.16-rc7 - modify some patch's title. - https://lore.kernel.org/all/20250617183635.1266015-1-yeoreum.yun@arm.com/ from v2 to v3: - expose FEAT_LSUI to guest - add help section for LSUI Kconfig - https://lore.kernel.org/all/20250611151154.46362-1-yeoreum.yun@arm.com/ from v1 to v2: - remove empty v9.6 menu entry - locate HAS_LSUI in cpucaps in order - https://lore.kernel.org/all/20250611104916.10636-1-yeoreum.yun@arm.com/ Yeoreum Yun (8): arm64: cpufeature: add FEAT_LSUI KVM: arm64: expose FEAT_LSUI to guest KVM: arm64: kselftest: set_id_regs: add test for FEAT_LSUI arm64: futex: refactor futex atomic operation arm64: futex: support futex with FEAT_LSUI arm64: armv8_deprecated: disable swp emulation when FEAT_LSUI present KVM: arm64: use CAST instruction for swapping guest descriptor arm64: Kconfig: add support for LSUI arch/arm64/Kconfig | 20 ++ arch/arm64/include/asm/cpucaps.h | 2 + arch/arm64/include/asm/futex.h | 297 +++++++++++++++--- arch/arm64/include/asm/lsui.h | 27 ++ arch/arm64/kernel/armv8_deprecated.c | 16 + arch/arm64/kernel/cpufeature.c | 10 + arch/arm64/kvm/at.c | 42 ++- arch/arm64/kvm/sys_regs.c | 3 +- arch/arm64/tools/cpucaps | 1 + .../testing/selftests/kvm/arm64/set_id_regs.c | 1 + 10 files changed, 367 insertions(+), 52 deletions(-) create mode 100644 arch/arm64/include/asm/lsui.h -- LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}
null
null
null
[PATCH v15 0/8] support FEAT_LSUI
Current futex atomic operations are implemented with ll/sc instructions and clearing PSTATE.PAN. Since Armv9.6, FEAT_LSUI supplies not only load/store instructions but also atomic operation for user memory access in kernel it doesn't need to clear PSTATE.PAN bit anymore. With theses instructions some of futex atomic operations don't need to be implmented with ldxr/stlxr pair instead can be implmented with one atomic operation supplied by FEAT_LSUI and don't enable mto like ldtr*/sttr* instructions usage. However, some of futex atomic operation don't have matched instructuion i.e) eor or cmpxchg with word size. For those operation, uses cas{al}t to implement them. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com> --- arch/arm64/include/asm/futex.h | 166 ++++++++++++++++++++++++++++++++- arch/arm64/include/asm/lsui.h | 27 ++++++ 2 files changed, 190 insertions(+), 3 deletions(-) create mode 100644 arch/arm64/include/asm/lsui.h diff --git a/arch/arm64/include/asm/futex.h b/arch/arm64/include/asm/futex.h index 9a0efed50743..c89b45319c49 100644 --- a/arch/arm64/include/asm/futex.h +++ b/arch/arm64/include/asm/futex.h @@ -7,9 +7,9 @@ #include <linux/futex.h> #include <linux/uaccess.h> -#include <linux/stringify.h> #include <asm/errno.h> +#include <asm/lsui.h> #define FUTEX_MAX_LOOPS 128 /* What's the largest number you can think of? */ @@ -87,11 +87,171 @@ __llsc_futex_cmpxchg(u32 __user *uaddr, u32 oldval, u32 newval, u32 *oval) return ret; } +#ifdef CONFIG_ARM64_LSUI + +/* + * FEAT_LSUI is supported since Armv9.6, where FEAT_PAN is mandatory. + * However, this assumption may not always hold: + * + * - Some CPUs advertise FEAT_LSUI but lack FEAT_PAN. + * - Virtualisation or ID register overrides may expose invalid + * feature combinations. + * + * Rather than disabling FEAT_LSUI when FEAT_PAN is absent, wrap LSUI + * instructions with uaccess_ttbr0_enable()/disable() when + * ARM64_SW_TTBR0_PAN is enabled. + */ + +#define LSUI_FUTEX_ATOMIC_OP(op, asm_op) \ +static __always_inline int \ +__lsui_futex_atomic_##op(int oparg, u32 __user *uaddr, int *oval) \ +{ \ + int ret = 0; \ + int oldval; \ + \ + uaccess_ttbr0_enable(); \ + \ + asm volatile("// __lsui_futex_atomic_" #op "\n" \ + __LSUI_PREAMBLE \ +"1: " #asm_op "al %w3, %w2, %1\n" \ +"2:\n" \ + _ASM_EXTABLE_UACCESS_ERR(1b, 2b, %w0) \ + : "+r" (ret), "+Q" (*uaddr), "=r" (oldval) \ + : "r" (oparg) \ + : "memory"); \ + \ + uaccess_ttbr0_disable(); \ + \ + if (!ret) \ + *oval = oldval; \ + return ret; \ +} + +LSUI_FUTEX_ATOMIC_OP(add, ldtadd) +LSUI_FUTEX_ATOMIC_OP(or, ldtset) +LSUI_FUTEX_ATOMIC_OP(andnot, ldtclr) +LSUI_FUTEX_ATOMIC_OP(set, swpt) + +static __always_inline int +__lsui_cmpxchg64(u64 __user *uaddr, u64 *oldval, u64 newval) +{ + int ret = 0; + + uaccess_ttbr0_enable(); + + asm volatile("// __lsui_cmpxchg64\n" + __LSUI_PREAMBLE +"1: casalt %2, %3, %1\n" +"2:\n" + _ASM_EXTABLE_UACCESS_ERR(1b, 2b, %w0) + : "+r" (ret), "+Q" (*uaddr), "+r" (*oldval) + : "r" (newval) + : "memory"); + + uaccess_ttbr0_disable(); + + return ret; +} + +static __always_inline int +__lsui_cmpxchg32(u32 __user *uaddr, u32 oldval, u32 newval, u32 *oval) +{ + u64 __user *uaddr64; + bool futex_pos, other_pos; + int ret, i; + u32 other, orig_other; + union { + u32 futex[2]; + u64 raw; + } oval64, orig64, nval64; + + uaddr64 = (u64 __user *) PTR_ALIGN_DOWN(uaddr, sizeof(u64)); + futex_pos = !IS_ALIGNED((unsigned long)uaddr, sizeof(u64)); + other_pos = !futex_pos; + + oval64.futex[futex_pos] = oldval; + ret = get_user(oval64.futex[other_pos], (u32 __user *)uaddr64 + other_pos); + if (ret) + return -EFAULT; + + ret = -EAGAIN; + for (i = 0; i < FUTEX_MAX_LOOPS; i++) { + orig64.raw = nval64.raw = oval64.raw; + + nval64.futex[futex_pos] = newval; + + if (__lsui_cmpxchg64(uaddr64, &oval64.raw, nval64.raw)) + return -EFAULT; + + oldval = oval64.futex[futex_pos]; + other = oval64.futex[other_pos]; + orig_other = orig64.futex[other_pos]; + + if (other == orig_other) { + ret = 0; + break; + } + } + + if (!ret) + *oval = oldval; + + return ret; +} + +static __always_inline int +__lsui_futex_atomic_and(int oparg, u32 __user *uaddr, int *oval) +{ + /* + * Undo the bitwise negation applied to the oparg passed from + * arch_futex_atomic_op_inuser() with FUTEX_OP_ANDN. + */ + return __lsui_futex_atomic_andnot(~oparg, uaddr, oval); +} + +static __always_inline int +__lsui_futex_atomic_eor(int oparg, u32 __user *uaddr, int *oval) +{ + u32 oldval, newval, val; + int ret, i; + + if (get_user(oldval, uaddr)) + return -EFAULT; + + /* + * there are no ldteor/stteor instructions... + */ + for (i = 0; i < FUTEX_MAX_LOOPS; i++) { + newval = oldval ^ oparg; + + ret = __lsui_cmpxchg32(uaddr, oldval, newval, &val); + if (ret) + return ret; + + if (val == oldval) { + *oval = val; + return 0; + } + + oldval = val; + } + + return -EAGAIN; +} + +static __always_inline int +__lsui_futex_cmpxchg(u32 __user *uaddr, u32 oldval, u32 newval, u32 *oval) +{ + return __lsui_cmpxchg32(uaddr, oldval, newval, oval); +} +#endif /* CONFIG_ARM64_LSUI */ + + #define FUTEX_ATOMIC_OP(op) \ static __always_inline int \ __futex_atomic_##op(int oparg, u32 __user *uaddr, int *oval) \ { \ - return __llsc_futex_atomic_##op(oparg, uaddr, oval); \ + return __lsui_llsc_body(futex_atomic_##op, oparg, uaddr, oval); \ } FUTEX_ATOMIC_OP(add) @@ -103,7 +263,7 @@ FUTEX_ATOMIC_OP(set) static __always_inline int __futex_cmpxchg(u32 __user *uaddr, u32 oldval, u32 newval, u32 *oval) { - return __llsc_futex_cmpxchg(uaddr, oldval, newval, oval); + return __lsui_llsc_body(futex_cmpxchg, uaddr, oldval, newval, oval); } static inline int diff --git a/arch/arm64/include/asm/lsui.h b/arch/arm64/include/asm/lsui.h new file mode 100644 index 000000000000..8f0d81953eb6 --- /dev/null +++ b/arch/arm64/include/asm/lsui.h @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __ASM_LSUI_H +#define __ASM_LSUI_H + +#include <linux/compiler_types.h> +#include <linux/stringify.h> +#include <asm/alternative.h> +#include <asm/alternative-macros.h> +#include <asm/cpucaps.h> + +#define __LSUI_PREAMBLE ".arch_extension lsui\n" + +#ifdef CONFIG_ARM64_LSUI + +#define __lsui_llsc_body(op, ...) \ +({ \ + alternative_has_cap_unlikely(ARM64_HAS_LSUI) ? \ + __lsui_##op(__VA_ARGS__) : __llsc_##op(__VA_ARGS__); \ +}) + +#else /* CONFIG_ARM64_LSUI */ + +#define __lsui_llsc_body(op, ...) __llsc_##op(__VA_ARGS__) + +#endif /* CONFIG_ARM64_LSUI */ + +#endif /* __ASM_LSUI_H */ -- LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}
{ "author": "Yeoreum Yun <yeoreum.yun@arm.com>", "date": "Fri, 27 Feb 2026 15:17:02 +0000", "is_openbsd": false, "thread_id": "20260227151705.1275328-4-yeoreum.yun@arm.com.mbox.gz" }
lkml_critique
lkml
Since Armv9.6, FEAT_LSUI supplies the load/store instructions for previleged level to access to access user memory without clearing PSTATE.PAN bit. This patchset support FEAT_LSUI and applies it mainly in futex atomic operation and others. This patch based on v7.0-rc1 Patch History ============== from v14 to v15: - replace caslt to cast - cleanup the patch - https://lore.kernel.org/all/20260225182708.3225211-1-yeoreum.yun@arm.com/ from v13 to v14: - add LSUI config check in cpucap_is_possible() - fix build failure with clang-19 - https://lore.kernel.org/all/20260223174802.458411-1-yeoreum.yun@arm.com/ from v12 to v13: - rebase to v7.0-rc1 - apply CASLT for swapping guest descriptor - remove has_lsui() for checking cpu feature. - simplify __lsui_cmpxchg32() according to @Catalin's suggestion. - use uaccess_ttbr0_enable()/disable() for LSUI instructions. - https://lore.kernel.org/all/aYWuqTqM5MvudI5V@e129823.arm.com/ from v11 to v12: - rebase to v6.19-rc6 - add CONFIG_ARM64_LSUI - enable LSUI when !CPU_BIG_ENDIAN and PAN presents. - drop the swp emulation with LSUI insns instead, disable it when LSUI presents. - some of small fixes (useless prefix and suffix and etc). - https://lore.kernel.org/all/20251214112248.901769-1-yeoreum.yun@arm.com/ from v10 to v11: - rebase to v6.19-rc1 - use cast instruction to emulate deprecated swpb instruction - https://lore.kernel.org/all/20251103163224.818353-1-yeoreum.yun@arm.com/ from v9 to v10: - apply FEAT_LSUI to user_swpX emulation. - add test coverage for LSUI bit in ID_AA64ISAR3_EL1 - rebase to v6.18-rc4 - https://lore.kernel.org/all/20250922102244.2068414-1-yeoreum.yun@arm.com/ from v8 to v9: - refotoring __lsui_cmpxchg64() - rebase to v6.17-rc7 - https://lore.kernel.org/all/20250917110838.917281-1-yeoreum.yun@arm.com/ from v7 to v8: - implements futex_atomic_eor() and futex_atomic_cmpxchg() with casalt with C helper. - Drop the small optimisation on ll/sc futex_atomic_set operation. - modify some commit message. - https://lore.kernel.org/all/20250816151929.197589-1-yeoreum.yun@arm.com/ from v6 to v7: - wrap FEAT_LSUI with CONFIG_AS_HAS_LSUI in cpufeature - remove unnecessary addition of indentation. - remove unnecessary mte_tco_enable()/disable() on LSUI operation. - https://lore.kernel.org/all/20250811163635.1562145-1-yeoreum.yun@arm.com/ from v5 to v6: - rebase to v6.17-rc1 - https://lore.kernel.org/all/20250722121956.1509403-1-yeoreum.yun@arm.com/ from v4 to v5: - remove futex_ll_sc.h futext_lsui and lsui.h and move them to futex.h - reorganize the patches. - https://lore.kernel.org/all/20250721083618.2743569-1-yeoreum.yun@arm.com/ from v3 to v4: - rebase to v6.16-rc7 - modify some patch's title. - https://lore.kernel.org/all/20250617183635.1266015-1-yeoreum.yun@arm.com/ from v2 to v3: - expose FEAT_LSUI to guest - add help section for LSUI Kconfig - https://lore.kernel.org/all/20250611151154.46362-1-yeoreum.yun@arm.com/ from v1 to v2: - remove empty v9.6 menu entry - locate HAS_LSUI in cpucaps in order - https://lore.kernel.org/all/20250611104916.10636-1-yeoreum.yun@arm.com/ Yeoreum Yun (8): arm64: cpufeature: add FEAT_LSUI KVM: arm64: expose FEAT_LSUI to guest KVM: arm64: kselftest: set_id_regs: add test for FEAT_LSUI arm64: futex: refactor futex atomic operation arm64: futex: support futex with FEAT_LSUI arm64: armv8_deprecated: disable swp emulation when FEAT_LSUI present KVM: arm64: use CAST instruction for swapping guest descriptor arm64: Kconfig: add support for LSUI arch/arm64/Kconfig | 20 ++ arch/arm64/include/asm/cpucaps.h | 2 + arch/arm64/include/asm/futex.h | 297 +++++++++++++++--- arch/arm64/include/asm/lsui.h | 27 ++ arch/arm64/kernel/armv8_deprecated.c | 16 + arch/arm64/kernel/cpufeature.c | 10 + arch/arm64/kvm/at.c | 42 ++- arch/arm64/kvm/sys_regs.c | 3 +- arch/arm64/tools/cpucaps | 1 + .../testing/selftests/kvm/arm64/set_id_regs.c | 1 + 10 files changed, 367 insertions(+), 52 deletions(-) create mode 100644 arch/arm64/include/asm/lsui.h -- LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}
null
null
null
[PATCH v15 0/8] support FEAT_LSUI
The purpose of supporting LSUI is to eliminate PAN toggling. CPUs that support LSUI are unlikely to support a 32-bit runtime. Since environments that support both LSUI and a 32-bit runtimeare expected to be extremely rare, not to emulate the SWP instruction using LSUI instructions in order to remove PAN toggling, and instead simply disable SWP emulation. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com> --- arch/arm64/kernel/armv8_deprecated.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm64/kernel/armv8_deprecated.c b/arch/arm64/kernel/armv8_deprecated.c index e737c6295ec7..049754f7da36 100644 --- a/arch/arm64/kernel/armv8_deprecated.c +++ b/arch/arm64/kernel/armv8_deprecated.c @@ -610,6 +610,22 @@ static int __init armv8_deprecated_init(void) } #endif + +#ifdef CONFIG_SWP_EMULATION + /* + * The purpose of supporting LSUI is to eliminate PAN toggling. + * CPUs that support LSUI are unlikely to support a 32-bit runtime. + * Since environments that support both LSUI and a 32-bit runtime + * are expected to be extremely rare, we choose not to emulate + * the SWP instruction using LSUI instructions in order to remove PAN toggling, + * and instead simply disable SWP emulation. + */ + if (cpus_have_final_cap(ARM64_HAS_LSUI)) { + insn_swp.status = INSN_UNAVAILABLE; + pr_info("swp/swpb instruction emulation is not supported on this system\n"); + } +#endif + for (int i = 0; i < ARRAY_SIZE(insn_emulations); i++) { struct insn_emulation *ie = insn_emulations[i]; -- LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}
{ "author": "Yeoreum Yun <yeoreum.yun@arm.com>", "date": "Fri, 27 Feb 2026 15:17:03 +0000", "is_openbsd": false, "thread_id": "20260227151705.1275328-4-yeoreum.yun@arm.com.mbox.gz" }
lkml_critique
lkml
Since Armv9.6, FEAT_LSUI supplies the load/store instructions for previleged level to access to access user memory without clearing PSTATE.PAN bit. This patchset support FEAT_LSUI and applies it mainly in futex atomic operation and others. This patch based on v7.0-rc1 Patch History ============== from v14 to v15: - replace caslt to cast - cleanup the patch - https://lore.kernel.org/all/20260225182708.3225211-1-yeoreum.yun@arm.com/ from v13 to v14: - add LSUI config check in cpucap_is_possible() - fix build failure with clang-19 - https://lore.kernel.org/all/20260223174802.458411-1-yeoreum.yun@arm.com/ from v12 to v13: - rebase to v7.0-rc1 - apply CASLT for swapping guest descriptor - remove has_lsui() for checking cpu feature. - simplify __lsui_cmpxchg32() according to @Catalin's suggestion. - use uaccess_ttbr0_enable()/disable() for LSUI instructions. - https://lore.kernel.org/all/aYWuqTqM5MvudI5V@e129823.arm.com/ from v11 to v12: - rebase to v6.19-rc6 - add CONFIG_ARM64_LSUI - enable LSUI when !CPU_BIG_ENDIAN and PAN presents. - drop the swp emulation with LSUI insns instead, disable it when LSUI presents. - some of small fixes (useless prefix and suffix and etc). - https://lore.kernel.org/all/20251214112248.901769-1-yeoreum.yun@arm.com/ from v10 to v11: - rebase to v6.19-rc1 - use cast instruction to emulate deprecated swpb instruction - https://lore.kernel.org/all/20251103163224.818353-1-yeoreum.yun@arm.com/ from v9 to v10: - apply FEAT_LSUI to user_swpX emulation. - add test coverage for LSUI bit in ID_AA64ISAR3_EL1 - rebase to v6.18-rc4 - https://lore.kernel.org/all/20250922102244.2068414-1-yeoreum.yun@arm.com/ from v8 to v9: - refotoring __lsui_cmpxchg64() - rebase to v6.17-rc7 - https://lore.kernel.org/all/20250917110838.917281-1-yeoreum.yun@arm.com/ from v7 to v8: - implements futex_atomic_eor() and futex_atomic_cmpxchg() with casalt with C helper. - Drop the small optimisation on ll/sc futex_atomic_set operation. - modify some commit message. - https://lore.kernel.org/all/20250816151929.197589-1-yeoreum.yun@arm.com/ from v6 to v7: - wrap FEAT_LSUI with CONFIG_AS_HAS_LSUI in cpufeature - remove unnecessary addition of indentation. - remove unnecessary mte_tco_enable()/disable() on LSUI operation. - https://lore.kernel.org/all/20250811163635.1562145-1-yeoreum.yun@arm.com/ from v5 to v6: - rebase to v6.17-rc1 - https://lore.kernel.org/all/20250722121956.1509403-1-yeoreum.yun@arm.com/ from v4 to v5: - remove futex_ll_sc.h futext_lsui and lsui.h and move them to futex.h - reorganize the patches. - https://lore.kernel.org/all/20250721083618.2743569-1-yeoreum.yun@arm.com/ from v3 to v4: - rebase to v6.16-rc7 - modify some patch's title. - https://lore.kernel.org/all/20250617183635.1266015-1-yeoreum.yun@arm.com/ from v2 to v3: - expose FEAT_LSUI to guest - add help section for LSUI Kconfig - https://lore.kernel.org/all/20250611151154.46362-1-yeoreum.yun@arm.com/ from v1 to v2: - remove empty v9.6 menu entry - locate HAS_LSUI in cpucaps in order - https://lore.kernel.org/all/20250611104916.10636-1-yeoreum.yun@arm.com/ Yeoreum Yun (8): arm64: cpufeature: add FEAT_LSUI KVM: arm64: expose FEAT_LSUI to guest KVM: arm64: kselftest: set_id_regs: add test for FEAT_LSUI arm64: futex: refactor futex atomic operation arm64: futex: support futex with FEAT_LSUI arm64: armv8_deprecated: disable swp emulation when FEAT_LSUI present KVM: arm64: use CAST instruction for swapping guest descriptor arm64: Kconfig: add support for LSUI arch/arm64/Kconfig | 20 ++ arch/arm64/include/asm/cpucaps.h | 2 + arch/arm64/include/asm/futex.h | 297 +++++++++++++++--- arch/arm64/include/asm/lsui.h | 27 ++ arch/arm64/kernel/armv8_deprecated.c | 16 + arch/arm64/kernel/cpufeature.c | 10 + arch/arm64/kvm/at.c | 42 ++- arch/arm64/kvm/sys_regs.c | 3 +- arch/arm64/tools/cpucaps | 1 + .../testing/selftests/kvm/arm64/set_id_regs.c | 1 + 10 files changed, 367 insertions(+), 52 deletions(-) create mode 100644 arch/arm64/include/asm/lsui.h -- LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}
null
null
null
[PATCH v15 0/8] support FEAT_LSUI
Use the CAST instruction to swap the guest descriptor when FEAT_LSUI is enabled, avoiding the need to clear the PAN bit. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com> --- arch/arm64/kvm/at.c | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kvm/at.c b/arch/arm64/kvm/at.c index 885bd5bb2f41..e49d2742a3ab 100644 --- a/arch/arm64/kvm/at.c +++ b/arch/arm64/kvm/at.c @@ -9,6 +9,7 @@ #include <asm/esr.h> #include <asm/kvm_hyp.h> #include <asm/kvm_mmu.h> +#include <asm/lsui.h> static void fail_s1_walk(struct s1_walk_result *wr, u8 fst, bool s1ptw) { @@ -1704,6 +1705,43 @@ int __kvm_find_s1_desc_level(struct kvm_vcpu *vcpu, u64 va, u64 ipa, int *level) } } +static int __lsui_swap_desc(u64 __user *ptep, u64 old, u64 new) +{ + u64 tmp = old; + int ret = 0; + + /* + * FEAT_LSUI is supported since Armv9.6, where FEAT_PAN is mandatory. + * However, this assumption may not always hold: + * + * - Some CPUs advertise FEAT_LSUI but lack FEAT_PAN. + * - Virtualisation or ID register overrides may expose invalid + * feature combinations. + * + * Rather than disabling FEAT_LSUI when FEAT_PAN is absent, wrap LSUI + * instructions with uaccess_ttbr0_enable()/disable() when + * ARM64_SW_TTBR0_PAN is enabled. + */ + uaccess_ttbr0_enable(); + + asm volatile(__LSUI_PREAMBLE + "1: cast %[old], %[new], %[addr]\n" + "2:\n" + _ASM_EXTABLE_UACCESS_ERR(1b, 2b, %w[ret]) + : [old] "+r" (old), [addr] "+Q" (*ptep), [ret] "+r" (ret) + : [new] "r" (new) + : "memory"); + + uaccess_ttbr0_disable(); + + if (ret) + return ret; + if (tmp != old) + return -EAGAIN; + + return ret; +} + static int __lse_swap_desc(u64 __user *ptep, u64 old, u64 new) { u64 tmp = old; @@ -1779,7 +1817,9 @@ int __kvm_at_swap_desc(struct kvm *kvm, gpa_t ipa, u64 old, u64 new) return -EPERM; ptep = (u64 __user *)hva + offset; - if (cpus_have_final_cap(ARM64_HAS_LSE_ATOMICS)) + if (cpus_have_final_cap(ARM64_HAS_LSUI)) + r = __lsui_swap_desc(ptep, old, new); + else if (cpus_have_final_cap(ARM64_HAS_LSE_ATOMICS)) r = __lse_swap_desc(ptep, old, new); else r = __llsc_swap_desc(ptep, old, new); -- LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}
{ "author": "Yeoreum Yun <yeoreum.yun@arm.com>", "date": "Fri, 27 Feb 2026 15:17:04 +0000", "is_openbsd": false, "thread_id": "20260227151705.1275328-4-yeoreum.yun@arm.com.mbox.gz" }
lkml_critique
lkml
Since Armv9.6, FEAT_LSUI supplies the load/store instructions for previleged level to access to access user memory without clearing PSTATE.PAN bit. This patchset support FEAT_LSUI and applies it mainly in futex atomic operation and others. This patch based on v7.0-rc1 Patch History ============== from v14 to v15: - replace caslt to cast - cleanup the patch - https://lore.kernel.org/all/20260225182708.3225211-1-yeoreum.yun@arm.com/ from v13 to v14: - add LSUI config check in cpucap_is_possible() - fix build failure with clang-19 - https://lore.kernel.org/all/20260223174802.458411-1-yeoreum.yun@arm.com/ from v12 to v13: - rebase to v7.0-rc1 - apply CASLT for swapping guest descriptor - remove has_lsui() for checking cpu feature. - simplify __lsui_cmpxchg32() according to @Catalin's suggestion. - use uaccess_ttbr0_enable()/disable() for LSUI instructions. - https://lore.kernel.org/all/aYWuqTqM5MvudI5V@e129823.arm.com/ from v11 to v12: - rebase to v6.19-rc6 - add CONFIG_ARM64_LSUI - enable LSUI when !CPU_BIG_ENDIAN and PAN presents. - drop the swp emulation with LSUI insns instead, disable it when LSUI presents. - some of small fixes (useless prefix and suffix and etc). - https://lore.kernel.org/all/20251214112248.901769-1-yeoreum.yun@arm.com/ from v10 to v11: - rebase to v6.19-rc1 - use cast instruction to emulate deprecated swpb instruction - https://lore.kernel.org/all/20251103163224.818353-1-yeoreum.yun@arm.com/ from v9 to v10: - apply FEAT_LSUI to user_swpX emulation. - add test coverage for LSUI bit in ID_AA64ISAR3_EL1 - rebase to v6.18-rc4 - https://lore.kernel.org/all/20250922102244.2068414-1-yeoreum.yun@arm.com/ from v8 to v9: - refotoring __lsui_cmpxchg64() - rebase to v6.17-rc7 - https://lore.kernel.org/all/20250917110838.917281-1-yeoreum.yun@arm.com/ from v7 to v8: - implements futex_atomic_eor() and futex_atomic_cmpxchg() with casalt with C helper. - Drop the small optimisation on ll/sc futex_atomic_set operation. - modify some commit message. - https://lore.kernel.org/all/20250816151929.197589-1-yeoreum.yun@arm.com/ from v6 to v7: - wrap FEAT_LSUI with CONFIG_AS_HAS_LSUI in cpufeature - remove unnecessary addition of indentation. - remove unnecessary mte_tco_enable()/disable() on LSUI operation. - https://lore.kernel.org/all/20250811163635.1562145-1-yeoreum.yun@arm.com/ from v5 to v6: - rebase to v6.17-rc1 - https://lore.kernel.org/all/20250722121956.1509403-1-yeoreum.yun@arm.com/ from v4 to v5: - remove futex_ll_sc.h futext_lsui and lsui.h and move them to futex.h - reorganize the patches. - https://lore.kernel.org/all/20250721083618.2743569-1-yeoreum.yun@arm.com/ from v3 to v4: - rebase to v6.16-rc7 - modify some patch's title. - https://lore.kernel.org/all/20250617183635.1266015-1-yeoreum.yun@arm.com/ from v2 to v3: - expose FEAT_LSUI to guest - add help section for LSUI Kconfig - https://lore.kernel.org/all/20250611151154.46362-1-yeoreum.yun@arm.com/ from v1 to v2: - remove empty v9.6 menu entry - locate HAS_LSUI in cpucaps in order - https://lore.kernel.org/all/20250611104916.10636-1-yeoreum.yun@arm.com/ Yeoreum Yun (8): arm64: cpufeature: add FEAT_LSUI KVM: arm64: expose FEAT_LSUI to guest KVM: arm64: kselftest: set_id_regs: add test for FEAT_LSUI arm64: futex: refactor futex atomic operation arm64: futex: support futex with FEAT_LSUI arm64: armv8_deprecated: disable swp emulation when FEAT_LSUI present KVM: arm64: use CAST instruction for swapping guest descriptor arm64: Kconfig: add support for LSUI arch/arm64/Kconfig | 20 ++ arch/arm64/include/asm/cpucaps.h | 2 + arch/arm64/include/asm/futex.h | 297 +++++++++++++++--- arch/arm64/include/asm/lsui.h | 27 ++ arch/arm64/kernel/armv8_deprecated.c | 16 + arch/arm64/kernel/cpufeature.c | 10 + arch/arm64/kvm/at.c | 42 ++- arch/arm64/kvm/sys_regs.c | 3 +- arch/arm64/tools/cpucaps | 1 + .../testing/selftests/kvm/arm64/set_id_regs.c | 1 + 10 files changed, 367 insertions(+), 52 deletions(-) create mode 100644 arch/arm64/include/asm/lsui.h -- LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}
null
null
null
[PATCH v15 0/8] support FEAT_LSUI
Since Armv9.6, FEAT_LSUI supplies the load/store instructions for previleged level to access to access user memory without clearing PSTATE.PAN bit. Add Kconfig option entry for FEAT_LSUI. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> --- arch/arm64/Kconfig | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 38dba5f7e4d2..890a1bedbf4a 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -2215,6 +2215,26 @@ config ARM64_GCS endmenu # "ARMv9.4 architectural features" +config AS_HAS_LSUI + def_bool $(as-instr,.arch_extension lsui) + help + Supported by LLVM 20+ and binutils 2.45+. + +menu "ARMv9.6 architectural features" + +config ARM64_LSUI + bool "Support Unprivileged Load Store Instructions (LSUI)" + default y + depends on AS_HAS_LSUI && !CPU_BIG_ENDIAN + help + The Unprivileged Load Store Instructions (LSUI) provides + variants load/store instructions that access user-space memory + from the kernel without clearing PSTATE.PAN bit. + + This feature is supported by LLVM 20+ and binutils 2.45+. + +endmenu # "ARMv9.6 architectural feature" + config ARM64_SVE bool "ARM Scalable Vector Extension support" default y -- LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}
{ "author": "Yeoreum Yun <yeoreum.yun@arm.com>", "date": "Fri, 27 Feb 2026 15:17:05 +0000", "is_openbsd": false, "thread_id": "20260227151705.1275328-4-yeoreum.yun@arm.com.mbox.gz" }
lkml_critique
lkml
This fixes xfstests generic/451 (for both O_DIRECT and FOPEN_DIRECT_IO direct write). Commit b359af8275a9 ("fuse: Invalidate the page cache after FOPEN_DIRECT_IO write") tries to fix the similar issue for FOPEN_DIRECT_IO write, which can be reproduced by xfstests generic/209. It only fixes the issue for synchronous direct write, while omitting the case for asynchronous direct write (exactly targeted by generic/451). While for O_DIRECT direct write, it's somewhat more complicated. For synchronous direct write, generic_file_direct_write() will invalidate the page cache after the write, and thus it can pass generic/209. While for asynchronous direct write, the invalidation in generic_file_direct_write() is bypassed since the invalidation shall be done when the asynchronous IO completes. This is omitted in FUSE and generic/451 fails whereby. Fix this by conveying the invalidation for both synchronous and asynchronous write. - with FOPEN_DIRECT_IO - sync write, invalidate in fuse_send_write() - async write, invalidate in fuse_aio_complete() with FUSE_ASYNC_DIO, fuse_send_write() otherwise - without FOPEN_DIRECT_IO - sync write, invalidate in generic_file_direct_write() - async write, invalidate in fuse_aio_complete() with FUSE_ASYNC_DIO, generic_file_direct_write() otherwise Reviewed-by: Bernd Schubert <bschubert@ddn.com> Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com> --- changes: - drop "|| !ia->io->blocking" in fuse_send_write() (Bernd) --- fs/fuse/file.c | 43 ++++++++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 01bc894e9c2b..625d236b881b 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -667,6 +667,18 @@ static void fuse_aio_complete(struct fuse_io_priv *io, int err, ssize_t pos) struct inode *inode = file_inode(io->iocb->ki_filp); struct fuse_conn *fc = get_fuse_conn(inode); struct fuse_inode *fi = get_fuse_inode(inode); + struct address_space *mapping = io->iocb->ki_filp->f_mapping; + + /* + * As in generic_file_direct_write(), invalidate after the + * write, to invalidate read-ahead cache that may have competed + * with the write. + */ + if (io->write && res && mapping->nrpages) { + invalidate_inode_pages2_range(mapping, + io->offset >> PAGE_SHIFT, + (io->offset + res - 1) >> PAGE_SHIFT); + } spin_lock(&fi->lock); fi->attr_version = atomic64_inc_return(&fc->attr_version); @@ -1144,9 +1156,11 @@ static ssize_t fuse_send_write(struct fuse_io_args *ia, loff_t pos, { struct kiocb *iocb = ia->io->iocb; struct file *file = iocb->ki_filp; + struct address_space *mapping = file->f_mapping; struct fuse_file *ff = file->private_data; struct fuse_mount *fm = ff->fm; struct fuse_write_in *inarg = &ia->write.in; + ssize_t written; ssize_t err; fuse_write_args_fill(ia, ff, pos, count); @@ -1160,10 +1174,26 @@ static ssize_t fuse_send_write(struct fuse_io_args *ia, loff_t pos, return fuse_async_req_send(fm, ia, count); err = fuse_simple_request(fm, &ia->ap.args); - if (!err && ia->write.out.size > count) + written = ia->write.out.size; + if (!err && written > count) err = -EIO; - return err ?: ia->write.out.size; + /* + * Without FOPEN_DIRECT_IO, generic_file_direct_write() does the + * invalidation for us. + */ + if (!err && written && mapping->nrpages && + (ff->open_flags & FOPEN_DIRECT_IO)) { + /* + * As in generic_file_direct_write(), invalidate after the + * write, to invalidate read-ahead cache that may have competed + * with the write. + */ + invalidate_inode_pages2_range(mapping, pos >> PAGE_SHIFT, + (pos + written - 1) >> PAGE_SHIFT); + } + + return err ?: written; } bool fuse_write_update_attr(struct inode *inode, loff_t pos, ssize_t written) @@ -1738,15 +1768,6 @@ ssize_t fuse_direct_io(struct fuse_io_priv *io, struct iov_iter *iter, if (res > 0) *ppos = pos; - if (res > 0 && write && fopen_direct_io) { - /* - * As in generic_file_direct_write(), invalidate after the - * write, to invalidate read-ahead cache that may have competed - * with the write. - */ - invalidate_inode_pages2_range(mapping, idx_from, idx_to); - } - return res > 0 ? res : err; } EXPORT_SYMBOL_GPL(fuse_direct_io); -- 2.19.1.6.gb485710b
null
null
null
[PATCH v3] fuse: invalidate the page cache after direct write
… … … - return err ?: ia->write.out.size; … You may omit curly brackets at selected source code places. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v6.19-rc4#n197 Regards, Markus
{ "author": "Markus Elfring <Markus.Elfring@web.de>", "date": "Sun, 11 Jan 2026 09:18:46 +0100", "is_openbsd": false, "thread_id": "CAJfpegtS+rX37qLVPW+Ciso_+yqjTqGKNnvSacpd7HdniGXjAQ@mail.gmail.com.mbox.gz" }
lkml_critique
lkml
This fixes xfstests generic/451 (for both O_DIRECT and FOPEN_DIRECT_IO direct write). Commit b359af8275a9 ("fuse: Invalidate the page cache after FOPEN_DIRECT_IO write") tries to fix the similar issue for FOPEN_DIRECT_IO write, which can be reproduced by xfstests generic/209. It only fixes the issue for synchronous direct write, while omitting the case for asynchronous direct write (exactly targeted by generic/451). While for O_DIRECT direct write, it's somewhat more complicated. For synchronous direct write, generic_file_direct_write() will invalidate the page cache after the write, and thus it can pass generic/209. While for asynchronous direct write, the invalidation in generic_file_direct_write() is bypassed since the invalidation shall be done when the asynchronous IO completes. This is omitted in FUSE and generic/451 fails whereby. Fix this by conveying the invalidation for both synchronous and asynchronous write. - with FOPEN_DIRECT_IO - sync write, invalidate in fuse_send_write() - async write, invalidate in fuse_aio_complete() with FUSE_ASYNC_DIO, fuse_send_write() otherwise - without FOPEN_DIRECT_IO - sync write, invalidate in generic_file_direct_write() - async write, invalidate in fuse_aio_complete() with FUSE_ASYNC_DIO, generic_file_direct_write() otherwise Reviewed-by: Bernd Schubert <bschubert@ddn.com> Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com> --- changes: - drop "|| !ia->io->blocking" in fuse_send_write() (Bernd) --- fs/fuse/file.c | 43 ++++++++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 01bc894e9c2b..625d236b881b 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -667,6 +667,18 @@ static void fuse_aio_complete(struct fuse_io_priv *io, int err, ssize_t pos) struct inode *inode = file_inode(io->iocb->ki_filp); struct fuse_conn *fc = get_fuse_conn(inode); struct fuse_inode *fi = get_fuse_inode(inode); + struct address_space *mapping = io->iocb->ki_filp->f_mapping; + + /* + * As in generic_file_direct_write(), invalidate after the + * write, to invalidate read-ahead cache that may have competed + * with the write. + */ + if (io->write && res && mapping->nrpages) { + invalidate_inode_pages2_range(mapping, + io->offset >> PAGE_SHIFT, + (io->offset + res - 1) >> PAGE_SHIFT); + } spin_lock(&fi->lock); fi->attr_version = atomic64_inc_return(&fc->attr_version); @@ -1144,9 +1156,11 @@ static ssize_t fuse_send_write(struct fuse_io_args *ia, loff_t pos, { struct kiocb *iocb = ia->io->iocb; struct file *file = iocb->ki_filp; + struct address_space *mapping = file->f_mapping; struct fuse_file *ff = file->private_data; struct fuse_mount *fm = ff->fm; struct fuse_write_in *inarg = &ia->write.in; + ssize_t written; ssize_t err; fuse_write_args_fill(ia, ff, pos, count); @@ -1160,10 +1174,26 @@ static ssize_t fuse_send_write(struct fuse_io_args *ia, loff_t pos, return fuse_async_req_send(fm, ia, count); err = fuse_simple_request(fm, &ia->ap.args); - if (!err && ia->write.out.size > count) + written = ia->write.out.size; + if (!err && written > count) err = -EIO; - return err ?: ia->write.out.size; + /* + * Without FOPEN_DIRECT_IO, generic_file_direct_write() does the + * invalidation for us. + */ + if (!err && written && mapping->nrpages && + (ff->open_flags & FOPEN_DIRECT_IO)) { + /* + * As in generic_file_direct_write(), invalidate after the + * write, to invalidate read-ahead cache that may have competed + * with the write. + */ + invalidate_inode_pages2_range(mapping, pos >> PAGE_SHIFT, + (pos + written - 1) >> PAGE_SHIFT); + } + + return err ?: written; } bool fuse_write_update_attr(struct inode *inode, loff_t pos, ssize_t written) @@ -1738,15 +1768,6 @@ ssize_t fuse_direct_io(struct fuse_io_priv *io, struct iov_iter *iter, if (res > 0) *ppos = pos; - if (res > 0 && write && fopen_direct_io) { - /* - * As in generic_file_direct_write(), invalidate after the - * write, to invalidate read-ahead cache that may have competed - * with the write. - */ - invalidate_inode_pages2_range(mapping, idx_from, idx_to); - } - return res > 0 ? res : err; } EXPORT_SYMBOL_GPL(fuse_direct_io); -- 2.19.1.6.gb485710b
null
null
null
[PATCH v3] fuse: invalidate the page cache after direct write
On 1/11/26 09:18, Markus Elfring wrote: We could, but we could also concentrate on code correctness instead of nit-picky debatable code style. Thanks, Bernd
{ "author": "Bernd Schubert <bschubert@ddn.com>", "date": "Sun, 11 Jan 2026 10:43:43 +0100", "is_openbsd": false, "thread_id": "CAJfpegtS+rX37qLVPW+Ciso_+yqjTqGKNnvSacpd7HdniGXjAQ@mail.gmail.com.mbox.gz" }
lkml_critique
lkml
This fixes xfstests generic/451 (for both O_DIRECT and FOPEN_DIRECT_IO direct write). Commit b359af8275a9 ("fuse: Invalidate the page cache after FOPEN_DIRECT_IO write") tries to fix the similar issue for FOPEN_DIRECT_IO write, which can be reproduced by xfstests generic/209. It only fixes the issue for synchronous direct write, while omitting the case for asynchronous direct write (exactly targeted by generic/451). While for O_DIRECT direct write, it's somewhat more complicated. For synchronous direct write, generic_file_direct_write() will invalidate the page cache after the write, and thus it can pass generic/209. While for asynchronous direct write, the invalidation in generic_file_direct_write() is bypassed since the invalidation shall be done when the asynchronous IO completes. This is omitted in FUSE and generic/451 fails whereby. Fix this by conveying the invalidation for both synchronous and asynchronous write. - with FOPEN_DIRECT_IO - sync write, invalidate in fuse_send_write() - async write, invalidate in fuse_aio_complete() with FUSE_ASYNC_DIO, fuse_send_write() otherwise - without FOPEN_DIRECT_IO - sync write, invalidate in generic_file_direct_write() - async write, invalidate in fuse_aio_complete() with FUSE_ASYNC_DIO, generic_file_direct_write() otherwise Reviewed-by: Bernd Schubert <bschubert@ddn.com> Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com> --- changes: - drop "|| !ia->io->blocking" in fuse_send_write() (Bernd) --- fs/fuse/file.c | 43 ++++++++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 01bc894e9c2b..625d236b881b 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -667,6 +667,18 @@ static void fuse_aio_complete(struct fuse_io_priv *io, int err, ssize_t pos) struct inode *inode = file_inode(io->iocb->ki_filp); struct fuse_conn *fc = get_fuse_conn(inode); struct fuse_inode *fi = get_fuse_inode(inode); + struct address_space *mapping = io->iocb->ki_filp->f_mapping; + + /* + * As in generic_file_direct_write(), invalidate after the + * write, to invalidate read-ahead cache that may have competed + * with the write. + */ + if (io->write && res && mapping->nrpages) { + invalidate_inode_pages2_range(mapping, + io->offset >> PAGE_SHIFT, + (io->offset + res - 1) >> PAGE_SHIFT); + } spin_lock(&fi->lock); fi->attr_version = atomic64_inc_return(&fc->attr_version); @@ -1144,9 +1156,11 @@ static ssize_t fuse_send_write(struct fuse_io_args *ia, loff_t pos, { struct kiocb *iocb = ia->io->iocb; struct file *file = iocb->ki_filp; + struct address_space *mapping = file->f_mapping; struct fuse_file *ff = file->private_data; struct fuse_mount *fm = ff->fm; struct fuse_write_in *inarg = &ia->write.in; + ssize_t written; ssize_t err; fuse_write_args_fill(ia, ff, pos, count); @@ -1160,10 +1174,26 @@ static ssize_t fuse_send_write(struct fuse_io_args *ia, loff_t pos, return fuse_async_req_send(fm, ia, count); err = fuse_simple_request(fm, &ia->ap.args); - if (!err && ia->write.out.size > count) + written = ia->write.out.size; + if (!err && written > count) err = -EIO; - return err ?: ia->write.out.size; + /* + * Without FOPEN_DIRECT_IO, generic_file_direct_write() does the + * invalidation for us. + */ + if (!err && written && mapping->nrpages && + (ff->open_flags & FOPEN_DIRECT_IO)) { + /* + * As in generic_file_direct_write(), invalidate after the + * write, to invalidate read-ahead cache that may have competed + * with the write. + */ + invalidate_inode_pages2_range(mapping, pos >> PAGE_SHIFT, + (pos + written - 1) >> PAGE_SHIFT); + } + + return err ?: written; } bool fuse_write_update_attr(struct inode *inode, loff_t pos, ssize_t written) @@ -1738,15 +1768,6 @@ ssize_t fuse_direct_io(struct fuse_io_priv *io, struct iov_iter *iter, if (res > 0) *ppos = pos; - if (res > 0 && write && fopen_direct_io) { - /* - * As in generic_file_direct_write(), invalidate after the - * write, to invalidate read-ahead cache that may have competed - * with the write. - */ - invalidate_inode_pages2_range(mapping, idx_from, idx_to); - } - return res > 0 ? res : err; } EXPORT_SYMBOL_GPL(fuse_direct_io); -- 2.19.1.6.gb485710b
null
null
null
[PATCH v3] fuse: invalidate the page cache after direct write
On 1/11/26 4:18 PM, Markus Elfring wrote: It's generally true for **simple** single statement. I would prefer adding the braces as it's a multi-line statement with a comment block. -- Thanks, Jingbo
{ "author": "Jingbo Xu <jefflexu@linux.alibaba.com>", "date": "Mon, 12 Jan 2026 13:37:12 +0800", "is_openbsd": false, "thread_id": "CAJfpegtS+rX37qLVPW+Ciso_+yqjTqGKNnvSacpd7HdniGXjAQ@mail.gmail.com.mbox.gz" }
lkml_critique
lkml
This fixes xfstests generic/451 (for both O_DIRECT and FOPEN_DIRECT_IO direct write). Commit b359af8275a9 ("fuse: Invalidate the page cache after FOPEN_DIRECT_IO write") tries to fix the similar issue for FOPEN_DIRECT_IO write, which can be reproduced by xfstests generic/209. It only fixes the issue for synchronous direct write, while omitting the case for asynchronous direct write (exactly targeted by generic/451). While for O_DIRECT direct write, it's somewhat more complicated. For synchronous direct write, generic_file_direct_write() will invalidate the page cache after the write, and thus it can pass generic/209. While for asynchronous direct write, the invalidation in generic_file_direct_write() is bypassed since the invalidation shall be done when the asynchronous IO completes. This is omitted in FUSE and generic/451 fails whereby. Fix this by conveying the invalidation for both synchronous and asynchronous write. - with FOPEN_DIRECT_IO - sync write, invalidate in fuse_send_write() - async write, invalidate in fuse_aio_complete() with FUSE_ASYNC_DIO, fuse_send_write() otherwise - without FOPEN_DIRECT_IO - sync write, invalidate in generic_file_direct_write() - async write, invalidate in fuse_aio_complete() with FUSE_ASYNC_DIO, generic_file_direct_write() otherwise Reviewed-by: Bernd Schubert <bschubert@ddn.com> Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com> --- changes: - drop "|| !ia->io->blocking" in fuse_send_write() (Bernd) --- fs/fuse/file.c | 43 ++++++++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 01bc894e9c2b..625d236b881b 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -667,6 +667,18 @@ static void fuse_aio_complete(struct fuse_io_priv *io, int err, ssize_t pos) struct inode *inode = file_inode(io->iocb->ki_filp); struct fuse_conn *fc = get_fuse_conn(inode); struct fuse_inode *fi = get_fuse_inode(inode); + struct address_space *mapping = io->iocb->ki_filp->f_mapping; + + /* + * As in generic_file_direct_write(), invalidate after the + * write, to invalidate read-ahead cache that may have competed + * with the write. + */ + if (io->write && res && mapping->nrpages) { + invalidate_inode_pages2_range(mapping, + io->offset >> PAGE_SHIFT, + (io->offset + res - 1) >> PAGE_SHIFT); + } spin_lock(&fi->lock); fi->attr_version = atomic64_inc_return(&fc->attr_version); @@ -1144,9 +1156,11 @@ static ssize_t fuse_send_write(struct fuse_io_args *ia, loff_t pos, { struct kiocb *iocb = ia->io->iocb; struct file *file = iocb->ki_filp; + struct address_space *mapping = file->f_mapping; struct fuse_file *ff = file->private_data; struct fuse_mount *fm = ff->fm; struct fuse_write_in *inarg = &ia->write.in; + ssize_t written; ssize_t err; fuse_write_args_fill(ia, ff, pos, count); @@ -1160,10 +1174,26 @@ static ssize_t fuse_send_write(struct fuse_io_args *ia, loff_t pos, return fuse_async_req_send(fm, ia, count); err = fuse_simple_request(fm, &ia->ap.args); - if (!err && ia->write.out.size > count) + written = ia->write.out.size; + if (!err && written > count) err = -EIO; - return err ?: ia->write.out.size; + /* + * Without FOPEN_DIRECT_IO, generic_file_direct_write() does the + * invalidation for us. + */ + if (!err && written && mapping->nrpages && + (ff->open_flags & FOPEN_DIRECT_IO)) { + /* + * As in generic_file_direct_write(), invalidate after the + * write, to invalidate read-ahead cache that may have competed + * with the write. + */ + invalidate_inode_pages2_range(mapping, pos >> PAGE_SHIFT, + (pos + written - 1) >> PAGE_SHIFT); + } + + return err ?: written; } bool fuse_write_update_attr(struct inode *inode, loff_t pos, ssize_t written) @@ -1738,15 +1768,6 @@ ssize_t fuse_direct_io(struct fuse_io_priv *io, struct iov_iter *iter, if (res > 0) *ppos = pos; - if (res > 0 && write && fopen_direct_io) { - /* - * As in generic_file_direct_write(), invalidate after the - * write, to invalidate read-ahead cache that may have competed - * with the write. - */ - invalidate_inode_pages2_range(mapping, idx_from, idx_to); - } - return res > 0 ? res : err; } EXPORT_SYMBOL_GPL(fuse_direct_io); -- 2.19.1.6.gb485710b
null
null
null
[PATCH v3] fuse: invalidate the page cache after direct write
On Sun, 11 Jan 2026 at 08:37, Jingbo Xu <jefflexu@linux.alibaba.com> wrote: Applied, thanks. Miklos
{ "author": "Miklos Szeredi <miklos@szeredi.hu>", "date": "Fri, 27 Feb 2026 16:09:05 +0100", "is_openbsd": false, "thread_id": "CAJfpegtS+rX37qLVPW+Ciso_+yqjTqGKNnvSacpd7HdniGXjAQ@mail.gmail.com.mbox.gz" }
lkml_critique
lkml
This series addresses several compiler warnings found when building the kernel for RISC-V. The first patch fixes unused variable warnings in the NFS client (including nfs4proc and flexfilelayout) that occur in certain build configurations. The second patch fixes a format-truncation warning in the MACB ethernet driver by ensuring the snprintf output fits within the destination buffer. v4: - Refactor patch 1 to use no_printk() in sunrpc headers instead of marking variables as __maybe_unused. This provides a cleaner, global fix and enables compiler type checking. v3: - Expand commit descriptions to include technical details regarding macro expansion, as requested by Andrew Lunn. - Test the different platform, such as ARM, ARM64, X86_64. v2: - Split the original treewide patch into subsystem-specific commits. - Added more detailed commit descriptions to satisfy checkpatch. Sean Chang (2): sunrpc: fix unused variable warnings by using no_printk net: macb: use ethtool_sprintf to fill ethtool stats strings drivers/net/ethernet/cadence/macb_main.c | 7 ++----- include/linux/sunrpc/debug.h | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) -- 2.34.1
null
null
null
[PATCH v4 0/2] Fix warnings for RISC-V builds
When CONFIG_SUNRPC_DEBUG is disabled, the dfprintk() macros currently expand to empty do-while loops. This causes variables used solely within these calls to appear unused, triggering -Wunused-variable warnings. Instead of marking every affected variable with __maybe_unused, update the dfprintk and dfprintk_rcu stubs to use no_printk(). This allows the compiler to see the variables and perform type checking without emitting any code, thus silencing the warnings globally for these macros. Suggested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Sean Chang <seanwascoding@gmail.com> --- include/linux/sunrpc/debug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h index eb4bd62df319..55c54df8bc7d 100644 --- a/include/linux/sunrpc/debug.h +++ b/include/linux/sunrpc/debug.h @@ -52,8 +52,8 @@ do { \ # define RPC_IFDEBUG(x) x #else # define ifdebug(fac) if (0) -# define dfprintk(fac, fmt, ...) do {} while (0) -# define dfprintk_rcu(fac, fmt, ...) do {} while (0) +# define dfprintk(fac, fmt, ...) no_printk(fmt, ##__VA_ARGS__) +# define dfprintk_rcu(fac, fmt, ...) no_printk(fmt, ##__VA_ARGS__) # define RPC_IFDEBUG(x) #endif -- 2.34.1
{ "author": "Sean Chang <seanwascoding@gmail.com>", "date": "Fri, 27 Feb 2026 23:26:23 +0800", "is_openbsd": false, "thread_id": "20260227152624.164964-2-seanwascoding@gmail.com.mbox.gz" }
lkml_critique
lkml
This series addresses several compiler warnings found when building the kernel for RISC-V. The first patch fixes unused variable warnings in the NFS client (including nfs4proc and flexfilelayout) that occur in certain build configurations. The second patch fixes a format-truncation warning in the MACB ethernet driver by ensuring the snprintf output fits within the destination buffer. v4: - Refactor patch 1 to use no_printk() in sunrpc headers instead of marking variables as __maybe_unused. This provides a cleaner, global fix and enables compiler type checking. v3: - Expand commit descriptions to include technical details regarding macro expansion, as requested by Andrew Lunn. - Test the different platform, such as ARM, ARM64, X86_64. v2: - Split the original treewide patch into subsystem-specific commits. - Added more detailed commit descriptions to satisfy checkpatch. Sean Chang (2): sunrpc: fix unused variable warnings by using no_printk net: macb: use ethtool_sprintf to fill ethtool stats strings drivers/net/ethernet/cadence/macb_main.c | 7 ++----- include/linux/sunrpc/debug.h | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) -- 2.34.1
null
null
null
[PATCH v4 0/2] Fix warnings for RISC-V builds
The RISC-V toolchain triggers a stringop-truncation warning when using snprintf() with a fixed ETH_GSTRING_LEN (32 bytes) buffer. Convert the driver to use the modern ethtool_sprintf() API from linux/ethtool.h. This removes the need for manual snprintf() and memcpy() calls, handles the 32-byte padding automatically, and simplifies the logic by removing manual pointer arithmetic. Suggested-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Sean Chang <seanwascoding@gmail.com> --- drivers/net/ethernet/cadence/macb_main.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index 5bc35f651ebd..79ca19097b2d 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -3145,7 +3145,6 @@ static int gem_get_sset_count(struct net_device *dev, int sset) static void gem_get_ethtool_strings(struct net_device *dev, u32 sset, u8 *p) { - char stat_string[ETH_GSTRING_LEN]; struct macb *bp = netdev_priv(dev); struct macb_queue *queue; unsigned int i; @@ -3158,10 +3157,8 @@ static void gem_get_ethtool_strings(struct net_device *dev, u32 sset, u8 *p) ETH_GSTRING_LEN); for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) { - for (i = 0; i < QUEUE_STATS_LEN; i++, p += ETH_GSTRING_LEN) { - snprintf(stat_string, ETH_GSTRING_LEN, "q%d_%s", - q, queue_statistics[i].stat_string); - memcpy(p, stat_string, ETH_GSTRING_LEN); + for (i = 0; i < QUEUE_STATS_LEN; i++) { + ethtool_sprintf(&p, "q%u_%s", q, queue_statistics[i].stat_string); } } break; -- 2.34.1
{ "author": "Sean Chang <seanwascoding@gmail.com>", "date": "Fri, 27 Feb 2026 23:26:24 +0800", "is_openbsd": false, "thread_id": "20260227152624.164964-2-seanwascoding@gmail.com.mbox.gz" }
lkml_critique
lkml
Move netdev registration and notifier block registration from sparx5_start() to probe(). This allows proper cleanup via goto-based error labels in probe(). Also, remove the sparx5_cleanup_ports() helper as its functionality is now split between sparx5_unregister_netdevs() and sparx5_destroy_netdevs() called at appropriate points. Signed-off-by: Daniel Machon <daniel.machon@microchip.com> --- .../net/ethernet/microchip/sparx5/sparx5_main.c | 41 +++++++++++----------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c index 582145713cfd..0ca4001a3667 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c @@ -773,20 +773,11 @@ static int sparx5_start(struct sparx5 *sparx5) mutex_init(&sparx5->mdb_lock); INIT_LIST_HEAD(&sparx5->mdb_entries); - err = sparx5_register_netdevs(sparx5); - if (err) - return err; - sparx5_board_init(sparx5); - err = sparx5_register_notifier_blocks(sparx5); - if (err) - return err; err = sparx5_vcap_init(sparx5); - if (err) { - sparx5_unregister_notifier_blocks(sparx5); + if (err) return err; - } /* Start Frame DMA with fallback to register based INJ/XTR */ err = -ENXIO; @@ -835,12 +826,6 @@ static int sparx5_start(struct sparx5 *sparx5) return err; } -static void sparx5_cleanup_ports(struct sparx5 *sparx5) -{ - sparx5_unregister_netdevs(sparx5); - sparx5_destroy_netdevs(sparx5); -} - static int mchp_sparx5_probe(struct platform_device *pdev) { struct initial_port_config *configs, *config; @@ -1020,10 +1005,26 @@ static int mchp_sparx5_probe(struct platform_device *pdev) INIT_LIST_HEAD(&sparx5->mall_entries); + err = sparx5_register_netdevs(sparx5); + if (err) { + dev_err(sparx5->dev, "Failed to register net devices\n"); + goto cleanup_ptp; + } + + err = sparx5_register_notifier_blocks(sparx5); + if (err) { + dev_err(sparx5->dev, "Failed to register notifier blocks\n"); + goto cleanup_netdevs; + } + goto cleanup_config; +cleanup_netdevs: + sparx5_unregister_netdevs(sparx5); +cleanup_ptp: + sparx5_ptp_deinit(sparx5); cleanup_ports: - sparx5_cleanup_ports(sparx5); + sparx5_destroy_netdevs(sparx5); if (sparx5->mact_queue) destroy_workqueue(sparx5->mact_queue); cleanup_config: @@ -1047,12 +1048,12 @@ static void mchp_sparx5_remove(struct platform_device *pdev) disable_irq(sparx5->fdma_irq); sparx5->fdma_irq = -ENXIO; } + sparx5_unregister_notifier_blocks(sparx5); + sparx5_unregister_netdevs(sparx5); sparx5_ptp_deinit(sparx5); ops->fdma_deinit(sparx5); - sparx5_cleanup_ports(sparx5); sparx5_vcap_destroy(sparx5); - /* Unregister netdevs */ - sparx5_unregister_notifier_blocks(sparx5); + sparx5_destroy_netdevs(sparx5); destroy_workqueue(sparx5->mact_queue); } -- 2.34.1
null
null
null
[PATCH net-next v2 1/9] net: sparx5: move netdev and notifier block registration to probe
This series refactors the sparx5 init and deinit code out of sparx5_start() and into probe(), adding proper per-subsystem cleanup labels and deinit functions. Currently, the sparx5 driver initializes most subsystems inside sparx5_start(), which is called from probe(). This includes registering netdevs, starting worker threads for stats and MAC table polling, requesting PTP IRQs, and initializing VCAP. The function has grown to handle many unrelated subsystems, and has no granular error handling — it either succeeds entirely or returns an error, leaving cleanup to a single catch-all label in probe(). The remove() path has a similar problem: teardown is not structured as the reverse of initialization, and several subsystems lack proper deinit functions. For example, the stats workqueue has no corresponding cleanup, and the mact workqueue is destroyed without first cancelling its delayed work. Refactor this by moving each init function out of sparx5_start() and into probe(), with a corresponding goto-based cleanup label. Add deinit functions for subsystems that allocate resources, to properly cancel work and destroy workqueues. Ensure that cleanup order in both error paths and remove() follows the reverse of initialization order. sparx5_start() is eliminated entirely — its hardware register setup is renamed to sparx5_forwarding_init() and its FDMA/XTR setup is extracted to sparx5_frame_io_init(). Before this series, most init functions live inside sparx5_start() with no individual cleanup: probe(): sparx5_start(): <- no granular error handling sparx5_mact_init() sparx_stats_init() <- starts worker, no cleanup mact_queue setup <- no cancel on teardown sparx5_register_netdevs() sparx5_register_notifier_blocks() sparx5_vcap_init() sparx5_ptp_init() probe() error path: cleanup_ports: sparx5_cleanup_ports() destroy_workqueue(mact_queue) After this series, probe() initializes subsystems in order with matching cleanup labels, and remove() tears down in reverse: probe(): sparx5_pgid_init() sparx5_vlan_init() sparx5_board_init() sparx5_forwarding_init() sparx5_calendar_init() -> cleanup_ports sparx5_qos_init() -> cleanup_ports sparx5_vcap_init() -> cleanup_ports sparx5_mact_init() -> cleanup_vcap sparx5_stats_init() -> cleanup_mact sparx5_frame_io_init() -> cleanup_stats sparx5_ptp_init() -> cleanup_frame_io sparx5_register_netdevs() -> cleanup_ptp sparx5_register_notifier_blocks() -> cleanup_netdevs remove(): sparx5_unregister_notifier_blocks() sparx5_unregister_netdevs() sparx5_ptp_deinit() sparx5_frame_io_deinit() sparx5_stats_deinit() sparx5_mact_deinit() sparx5_vcap_deinit() sparx5_destroy_netdevs() Signed-off-by: Daniel Machon <daniel.machon@microchip.com> --- Changes in v2: v2 mainly addresses the comment from Russell on v1, saying that a minimal initialization should be done after netdev publication. This is now done by moving initialization in sparx5_start out to proper init functions. This also means that no initialization is done after netdev publication in v2. - Drop v1 patch 1 ("call sparx5_start() last in probe()"); PTP IRQ handling is now a separate commit and sparx5_start() is eliminated in the final patch. - Add patch to move PTP IRQ handling out of sparx5_start() into its own init/deinit with cleanup label. - Add patch to extract FDMA/XTR initialization from sparx5_start() into sparx5_frame_io_init() with cleanup label. - Add patch to rename sparx5_start() to sparx5_forwarding_init() and change return type to void, eliminating sparx5_start() entirely. Link to v1: https://lore.kernel.org/r/20260225-sparx5-init-deinit-v1-0-97036580b9f0@microchip.com --- Daniel Machon (9): net: sparx5: move netdev and notifier block registration to probe net: sparx5: move VCAP initialization to probe net: sparx5: move MAC table initialization and add deinit function net: sparx5: move stats initialization and add deinit function net: sparx5: move calendar initialization to probe net: sparx5: move remaining init functions from start() to probe() net: sparx5: move PTP IRQ handling out of sparx5_start() net: sparx5: move FDMA/XTR initialization out of sparx5_start() net: sparx5: replace sparx5_start() with sparx5_forwarding_init() .../ethernet/microchip/sparx5/sparx5_calendar.c | 15 +- .../net/ethernet/microchip/sparx5/sparx5_ethtool.c | 9 +- .../ethernet/microchip/sparx5/sparx5_mactable.c | 34 ++- .../net/ethernet/microchip/sparx5/sparx5_main.c | 253 ++++++++++----------- .../net/ethernet/microchip/sparx5/sparx5_main.h | 12 +- drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c | 18 ++ .../ethernet/microchip/sparx5/sparx5_vcap_impl.c | 2 +- 7 files changed, 196 insertions(+), 147 deletions(-) --- base-commit: 17d0056f71b13050317a662a505b1a36fb7009e5 change-id: 20260216-sparx5-init-deinit-037cf165c62e Best regards, -- Daniel Machon <daniel.machon@microchip.com>
{ "author": "Daniel Machon <daniel.machon@microchip.com>", "date": "Fri, 27 Feb 2026 15:56:38 +0100", "is_openbsd": false, "thread_id": "20260227-sparx5-init-deinit-v2-6-10ba54ccf005@microchip.com.mbox.gz" }
lkml_critique
lkml
Move netdev registration and notifier block registration from sparx5_start() to probe(). This allows proper cleanup via goto-based error labels in probe(). Also, remove the sparx5_cleanup_ports() helper as its functionality is now split between sparx5_unregister_netdevs() and sparx5_destroy_netdevs() called at appropriate points. Signed-off-by: Daniel Machon <daniel.machon@microchip.com> --- .../net/ethernet/microchip/sparx5/sparx5_main.c | 41 +++++++++++----------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c index 582145713cfd..0ca4001a3667 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c @@ -773,20 +773,11 @@ static int sparx5_start(struct sparx5 *sparx5) mutex_init(&sparx5->mdb_lock); INIT_LIST_HEAD(&sparx5->mdb_entries); - err = sparx5_register_netdevs(sparx5); - if (err) - return err; - sparx5_board_init(sparx5); - err = sparx5_register_notifier_blocks(sparx5); - if (err) - return err; err = sparx5_vcap_init(sparx5); - if (err) { - sparx5_unregister_notifier_blocks(sparx5); + if (err) return err; - } /* Start Frame DMA with fallback to register based INJ/XTR */ err = -ENXIO; @@ -835,12 +826,6 @@ static int sparx5_start(struct sparx5 *sparx5) return err; } -static void sparx5_cleanup_ports(struct sparx5 *sparx5) -{ - sparx5_unregister_netdevs(sparx5); - sparx5_destroy_netdevs(sparx5); -} - static int mchp_sparx5_probe(struct platform_device *pdev) { struct initial_port_config *configs, *config; @@ -1020,10 +1005,26 @@ static int mchp_sparx5_probe(struct platform_device *pdev) INIT_LIST_HEAD(&sparx5->mall_entries); + err = sparx5_register_netdevs(sparx5); + if (err) { + dev_err(sparx5->dev, "Failed to register net devices\n"); + goto cleanup_ptp; + } + + err = sparx5_register_notifier_blocks(sparx5); + if (err) { + dev_err(sparx5->dev, "Failed to register notifier blocks\n"); + goto cleanup_netdevs; + } + goto cleanup_config; +cleanup_netdevs: + sparx5_unregister_netdevs(sparx5); +cleanup_ptp: + sparx5_ptp_deinit(sparx5); cleanup_ports: - sparx5_cleanup_ports(sparx5); + sparx5_destroy_netdevs(sparx5); if (sparx5->mact_queue) destroy_workqueue(sparx5->mact_queue); cleanup_config: @@ -1047,12 +1048,12 @@ static void mchp_sparx5_remove(struct platform_device *pdev) disable_irq(sparx5->fdma_irq); sparx5->fdma_irq = -ENXIO; } + sparx5_unregister_notifier_blocks(sparx5); + sparx5_unregister_netdevs(sparx5); sparx5_ptp_deinit(sparx5); ops->fdma_deinit(sparx5); - sparx5_cleanup_ports(sparx5); sparx5_vcap_destroy(sparx5); - /* Unregister netdevs */ - sparx5_unregister_notifier_blocks(sparx5); + sparx5_destroy_netdevs(sparx5); destroy_workqueue(sparx5->mact_queue); } -- 2.34.1
null
null
null
[PATCH net-next v2 1/9] net: sparx5: move netdev and notifier block registration to probe
The sparx5_stats_init() function starts a worker thread which needs to be cleaned up. Move the initialization code to probe() and add a deinit() function for proper teardown. Also, rename sparx_stats_init() to sparx5_stats_init() to match the driver naming convention. Signed-off-by: Daniel Machon <daniel.machon@microchip.com> --- drivers/net/ethernet/microchip/sparx5/sparx5_ethtool.c | 9 ++++++++- drivers/net/ethernet/microchip/sparx5/sparx5_main.c | 16 ++++++++++------ drivers/net/ethernet/microchip/sparx5/sparx5_main.h | 3 ++- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_ethtool.c b/drivers/net/ethernet/microchip/sparx5/sparx5_ethtool.c index 049541eeaae0..d42c57bead89 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_ethtool.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_ethtool.c @@ -1244,7 +1244,7 @@ const struct ethtool_ops sparx5_ethtool_ops = { .set_pauseparam = sparx5_set_pauseparam, }; -int sparx_stats_init(struct sparx5 *sparx5) +int sparx5_stats_init(struct sparx5 *sparx5) { const struct sparx5_consts *consts = sparx5->data->consts; char queue_name[32]; @@ -1278,3 +1278,10 @@ int sparx_stats_init(struct sparx5 *sparx5) return 0; } + +void sparx5_stats_deinit(struct sparx5 *sparx5) +{ + cancel_delayed_work_sync(&sparx5->stats_work); + destroy_workqueue(sparx5->stats_queue); + mutex_destroy(&sparx5->queue_stats_lock); +} diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c index 4271f4a29cad..bcc7b895fad6 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c @@ -743,11 +743,6 @@ static int sparx5_start(struct sparx5 *sparx5) if (err) return err; - /* Init stats */ - err = sparx_stats_init(sparx5); - if (err) - return err; - sparx5_board_init(sparx5); /* Start Frame DMA with fallback to register based INJ/XTR */ @@ -986,12 +981,18 @@ static int mchp_sparx5_probe(struct platform_device *pdev) goto cleanup_vcap; } + err = sparx5_stats_init(sparx5); + if (err) { + dev_err(sparx5->dev, "Failed to initialize stats\n"); + goto cleanup_mact; + } + INIT_LIST_HEAD(&sparx5->mall_entries); err = sparx5_register_netdevs(sparx5); if (err) { dev_err(sparx5->dev, "Failed to register net devices\n"); - goto cleanup_mact; + goto cleanup_stats; } err = sparx5_register_notifier_blocks(sparx5); @@ -1004,6 +1005,8 @@ static int mchp_sparx5_probe(struct platform_device *pdev) cleanup_netdevs: sparx5_unregister_netdevs(sparx5); +cleanup_stats: + sparx5_stats_deinit(sparx5); cleanup_mact: sparx5_mact_deinit(sparx5); cleanup_vcap: @@ -1035,6 +1038,7 @@ static void mchp_sparx5_remove(struct platform_device *pdev) } sparx5_unregister_notifier_blocks(sparx5); sparx5_unregister_netdevs(sparx5); + sparx5_stats_deinit(sparx5); sparx5_mact_deinit(sparx5); sparx5_vcap_deinit(sparx5); sparx5_ptp_deinit(sparx5); diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.h b/drivers/net/ethernet/microchip/sparx5/sparx5_main.h index e4c39cca7b26..97d53e229ad6 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.h +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.h @@ -514,7 +514,8 @@ enum sparx5_cal_bw sparx5_get_port_cal_speed(struct sparx5 *sparx5, u32 portno); /* sparx5_ethtool.c */ void sparx5_get_stats64(struct net_device *ndev, struct rtnl_link_stats64 *stats); -int sparx_stats_init(struct sparx5 *sparx5); +int sparx5_stats_init(struct sparx5 *sparx5); +void sparx5_stats_deinit(struct sparx5 *sparx5); /* sparx5_dcb.c */ #ifdef CONFIG_SPARX5_DCB -- 2.34.1
{ "author": "Daniel Machon <daniel.machon@microchip.com>", "date": "Fri, 27 Feb 2026 15:56:42 +0100", "is_openbsd": false, "thread_id": "20260227-sparx5-init-deinit-v2-6-10ba54ccf005@microchip.com.mbox.gz" }
lkml_critique
lkml
Move netdev registration and notifier block registration from sparx5_start() to probe(). This allows proper cleanup via goto-based error labels in probe(). Also, remove the sparx5_cleanup_ports() helper as its functionality is now split between sparx5_unregister_netdevs() and sparx5_destroy_netdevs() called at appropriate points. Signed-off-by: Daniel Machon <daniel.machon@microchip.com> --- .../net/ethernet/microchip/sparx5/sparx5_main.c | 41 +++++++++++----------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c index 582145713cfd..0ca4001a3667 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c @@ -773,20 +773,11 @@ static int sparx5_start(struct sparx5 *sparx5) mutex_init(&sparx5->mdb_lock); INIT_LIST_HEAD(&sparx5->mdb_entries); - err = sparx5_register_netdevs(sparx5); - if (err) - return err; - sparx5_board_init(sparx5); - err = sparx5_register_notifier_blocks(sparx5); - if (err) - return err; err = sparx5_vcap_init(sparx5); - if (err) { - sparx5_unregister_notifier_blocks(sparx5); + if (err) return err; - } /* Start Frame DMA with fallback to register based INJ/XTR */ err = -ENXIO; @@ -835,12 +826,6 @@ static int sparx5_start(struct sparx5 *sparx5) return err; } -static void sparx5_cleanup_ports(struct sparx5 *sparx5) -{ - sparx5_unregister_netdevs(sparx5); - sparx5_destroy_netdevs(sparx5); -} - static int mchp_sparx5_probe(struct platform_device *pdev) { struct initial_port_config *configs, *config; @@ -1020,10 +1005,26 @@ static int mchp_sparx5_probe(struct platform_device *pdev) INIT_LIST_HEAD(&sparx5->mall_entries); + err = sparx5_register_netdevs(sparx5); + if (err) { + dev_err(sparx5->dev, "Failed to register net devices\n"); + goto cleanup_ptp; + } + + err = sparx5_register_notifier_blocks(sparx5); + if (err) { + dev_err(sparx5->dev, "Failed to register notifier blocks\n"); + goto cleanup_netdevs; + } + goto cleanup_config; +cleanup_netdevs: + sparx5_unregister_netdevs(sparx5); +cleanup_ptp: + sparx5_ptp_deinit(sparx5); cleanup_ports: - sparx5_cleanup_ports(sparx5); + sparx5_destroy_netdevs(sparx5); if (sparx5->mact_queue) destroy_workqueue(sparx5->mact_queue); cleanup_config: @@ -1047,12 +1048,12 @@ static void mchp_sparx5_remove(struct platform_device *pdev) disable_irq(sparx5->fdma_irq); sparx5->fdma_irq = -ENXIO; } + sparx5_unregister_notifier_blocks(sparx5); + sparx5_unregister_netdevs(sparx5); sparx5_ptp_deinit(sparx5); ops->fdma_deinit(sparx5); - sparx5_cleanup_ports(sparx5); sparx5_vcap_destroy(sparx5); - /* Unregister netdevs */ - sparx5_unregister_notifier_blocks(sparx5); + sparx5_destroy_netdevs(sparx5); destroy_workqueue(sparx5->mact_queue); } -- 2.34.1
null
null
null
[PATCH net-next v2 1/9] net: sparx5: move netdev and notifier block registration to probe
Move the calendar initialization from sparx5_start() to probe() by creating a new sparx5_calendar_init() wrapper function that calls both sparx5_config_auto_calendar() and sparx5_config_dsm_calendar(). Calendar initialization does not require cleanup. Also, make the individual calendar config functions static since they are now only called from within sparx5_calendar.c. Signed-off-by: Daniel Machon <daniel.machon@microchip.com> --- drivers/net/ethernet/microchip/sparx5/sparx5_calendar.c | 15 +++++++++++++-- drivers/net/ethernet/microchip/sparx5/sparx5_main.c | 14 ++++++-------- drivers/net/ethernet/microchip/sparx5/sparx5_main.h | 3 +-- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_calendar.c b/drivers/net/ethernet/microchip/sparx5/sparx5_calendar.c index 5c46d81de530..4ec95590a3c6 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_calendar.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_calendar.c @@ -151,7 +151,7 @@ enum sparx5_cal_bw sparx5_get_port_cal_speed(struct sparx5 *sparx5, u32 portno) } /* Auto configure the QSYS calendar based on port configuration */ -int sparx5_config_auto_calendar(struct sparx5 *sparx5) +static int sparx5_config_auto_calendar(struct sparx5 *sparx5) { const struct sparx5_consts *consts = sparx5->data->consts; u32 cal[7], value, idx, portno; @@ -578,7 +578,7 @@ static int sparx5_dsm_calendar_update(struct sparx5 *sparx5, u32 taxi, } /* Configure the DSM calendar based on port configuration */ -int sparx5_config_dsm_calendar(struct sparx5 *sparx5) +static int sparx5_config_dsm_calendar(struct sparx5 *sparx5) { const struct sparx5_ops *ops = sparx5->data->ops; int taxi; @@ -610,3 +610,14 @@ int sparx5_config_dsm_calendar(struct sparx5 *sparx5) kfree(data); return err; } + +int sparx5_calendar_init(struct sparx5 *sparx5) +{ + int err; + + err = sparx5_config_auto_calendar(sparx5); + if (err) + return err; + + return sparx5_config_dsm_calendar(sparx5); +} diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c index bcc7b895fad6..a58c79a6e873 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c @@ -735,14 +735,6 @@ static int sparx5_start(struct sparx5 *sparx5) /* Enable queue limitation watermarks */ sparx5_qlim_set(sparx5); - err = sparx5_config_auto_calendar(sparx5); - if (err) - return err; - - err = sparx5_config_dsm_calendar(sparx5); - if (err) - return err; - sparx5_board_init(sparx5); /* Start Frame DMA with fallback to register based INJ/XTR */ @@ -957,6 +949,12 @@ static int mchp_sparx5_probe(struct platform_device *pdev) goto cleanup_ports; } + err = sparx5_calendar_init(sparx5); + if (err) { + dev_err(sparx5->dev, "Failed to initialize calendar\n"); + goto cleanup_ports; + } + err = sparx5_qos_init(sparx5); if (err) { dev_err(sparx5->dev, "Failed to initialize QoS\n"); diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.h b/drivers/net/ethernet/microchip/sparx5/sparx5_main.h index 97d53e229ad6..6a745bb71b5c 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.h +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.h @@ -504,8 +504,7 @@ int sparx5_vlan_vid_del(struct sparx5_port *port, u16 vid); void sparx5_vlan_port_apply(struct sparx5 *sparx5, struct sparx5_port *port); /* sparx5_calendar.c */ -int sparx5_config_auto_calendar(struct sparx5 *sparx5); -int sparx5_config_dsm_calendar(struct sparx5 *sparx5); +int sparx5_calendar_init(struct sparx5 *sparx5); int sparx5_dsm_calendar_calc(struct sparx5 *sparx5, u32 taxi, struct sparx5_calendar_data *data); u32 sparx5_cal_speed_to_value(enum sparx5_cal_bw speed); -- 2.34.1
{ "author": "Daniel Machon <daniel.machon@microchip.com>", "date": "Fri, 27 Feb 2026 15:56:43 +0100", "is_openbsd": false, "thread_id": "20260227-sparx5-init-deinit-v2-6-10ba54ccf005@microchip.com.mbox.gz" }
lkml_critique
lkml
Move netdev registration and notifier block registration from sparx5_start() to probe(). This allows proper cleanup via goto-based error labels in probe(). Also, remove the sparx5_cleanup_ports() helper as its functionality is now split between sparx5_unregister_netdevs() and sparx5_destroy_netdevs() called at appropriate points. Signed-off-by: Daniel Machon <daniel.machon@microchip.com> --- .../net/ethernet/microchip/sparx5/sparx5_main.c | 41 +++++++++++----------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c index 582145713cfd..0ca4001a3667 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c @@ -773,20 +773,11 @@ static int sparx5_start(struct sparx5 *sparx5) mutex_init(&sparx5->mdb_lock); INIT_LIST_HEAD(&sparx5->mdb_entries); - err = sparx5_register_netdevs(sparx5); - if (err) - return err; - sparx5_board_init(sparx5); - err = sparx5_register_notifier_blocks(sparx5); - if (err) - return err; err = sparx5_vcap_init(sparx5); - if (err) { - sparx5_unregister_notifier_blocks(sparx5); + if (err) return err; - } /* Start Frame DMA with fallback to register based INJ/XTR */ err = -ENXIO; @@ -835,12 +826,6 @@ static int sparx5_start(struct sparx5 *sparx5) return err; } -static void sparx5_cleanup_ports(struct sparx5 *sparx5) -{ - sparx5_unregister_netdevs(sparx5); - sparx5_destroy_netdevs(sparx5); -} - static int mchp_sparx5_probe(struct platform_device *pdev) { struct initial_port_config *configs, *config; @@ -1020,10 +1005,26 @@ static int mchp_sparx5_probe(struct platform_device *pdev) INIT_LIST_HEAD(&sparx5->mall_entries); + err = sparx5_register_netdevs(sparx5); + if (err) { + dev_err(sparx5->dev, "Failed to register net devices\n"); + goto cleanup_ptp; + } + + err = sparx5_register_notifier_blocks(sparx5); + if (err) { + dev_err(sparx5->dev, "Failed to register notifier blocks\n"); + goto cleanup_netdevs; + } + goto cleanup_config; +cleanup_netdevs: + sparx5_unregister_netdevs(sparx5); +cleanup_ptp: + sparx5_ptp_deinit(sparx5); cleanup_ports: - sparx5_cleanup_ports(sparx5); + sparx5_destroy_netdevs(sparx5); if (sparx5->mact_queue) destroy_workqueue(sparx5->mact_queue); cleanup_config: @@ -1047,12 +1048,12 @@ static void mchp_sparx5_remove(struct platform_device *pdev) disable_irq(sparx5->fdma_irq); sparx5->fdma_irq = -ENXIO; } + sparx5_unregister_notifier_blocks(sparx5); + sparx5_unregister_netdevs(sparx5); sparx5_ptp_deinit(sparx5); ops->fdma_deinit(sparx5); - sparx5_cleanup_ports(sparx5); sparx5_vcap_destroy(sparx5); - /* Unregister netdevs */ - sparx5_unregister_notifier_blocks(sparx5); + sparx5_destroy_netdevs(sparx5); destroy_workqueue(sparx5->mact_queue); } -- 2.34.1
null
null
null
[PATCH net-next v2 1/9] net: sparx5: move netdev and notifier block registration to probe
Move the PTP IRQ request into sparx5_ptp_init() so all PTP setup is done in one place. Also move the sparx5_ptp_init() call to right before sparx5_register_netdevs() and add a cleanup_ptp label. Update remove() to disable the PTP IRQ and reorder ptp_deinit accordingly. Signed-off-by: Daniel Machon <daniel.machon@microchip.com> --- .../net/ethernet/microchip/sparx5/sparx5_main.c | 34 +++++++--------------- drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c | 18 ++++++++++++ 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c index d37f34197e84..f359008d2205 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c @@ -761,18 +761,6 @@ static int sparx5_start(struct sparx5 *sparx5) sparx5->xtr_irq = -ENXIO; } - if (sparx5->ptp_irq >= 0 && - sparx5_has_feature(sparx5, SPX5_FEATURE_PTP)) { - err = devm_request_threaded_irq(sparx5->dev, sparx5->ptp_irq, - NULL, ops->ptp_irq_handler, - IRQF_ONESHOT, "sparx5-ptp", - sparx5); - if (err) - sparx5->ptp_irq = -ENXIO; - - sparx5->ptp = 1; - } - return err; } @@ -957,16 +945,10 @@ static int mchp_sparx5_probe(struct platform_device *pdev) goto cleanup_ports; } - err = sparx5_ptp_init(sparx5); - if (err) { - dev_err(sparx5->dev, "PTP failed\n"); - goto cleanup_ports; - } - err = sparx5_vcap_init(sparx5); if (err) { dev_err(sparx5->dev, "Failed to initialize VCAP\n"); - goto cleanup_ptp; + goto cleanup_ports; } err = sparx5_mact_init(sparx5); @@ -983,10 +965,16 @@ static int mchp_sparx5_probe(struct platform_device *pdev) INIT_LIST_HEAD(&sparx5->mall_entries); + err = sparx5_ptp_init(sparx5); + if (err) { + dev_err(sparx5->dev, "Failed to initialize PTP\n"); + goto cleanup_stats; + } + err = sparx5_register_netdevs(sparx5); if (err) { dev_err(sparx5->dev, "Failed to register net devices\n"); - goto cleanup_stats; + goto cleanup_ptp; } err = sparx5_register_notifier_blocks(sparx5); @@ -999,14 +987,14 @@ static int mchp_sparx5_probe(struct platform_device *pdev) cleanup_netdevs: sparx5_unregister_netdevs(sparx5); +cleanup_ptp: + sparx5_ptp_deinit(sparx5); cleanup_stats: sparx5_stats_deinit(sparx5); cleanup_mact: sparx5_mact_deinit(sparx5); cleanup_vcap: sparx5_vcap_deinit(sparx5); -cleanup_ptp: - sparx5_ptp_deinit(sparx5); cleanup_ports: sparx5_destroy_netdevs(sparx5); cleanup_config: @@ -1032,10 +1020,10 @@ static void mchp_sparx5_remove(struct platform_device *pdev) } sparx5_unregister_notifier_blocks(sparx5); sparx5_unregister_netdevs(sparx5); + sparx5_ptp_deinit(sparx5); sparx5_stats_deinit(sparx5); sparx5_mact_deinit(sparx5); sparx5_vcap_deinit(sparx5); - sparx5_ptp_deinit(sparx5); ops->fdma_deinit(sparx5); sparx5_destroy_netdevs(sparx5); } diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c b/drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c index 8b2e07821a95..a16ec8136d6d 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c @@ -606,9 +606,22 @@ static int sparx5_ptp_phc_init(struct sparx5 *sparx5, int sparx5_ptp_init(struct sparx5 *sparx5) { u64 tod_adj = sparx5_ptp_get_nominal_value(sparx5); + const struct sparx5_ops *ops = sparx5->data->ops; struct sparx5_port *port; int err, i; + if (sparx5->ptp_irq >= 0 && + sparx5_has_feature(sparx5, SPX5_FEATURE_PTP)) { + err = devm_request_threaded_irq(sparx5->dev, sparx5->ptp_irq, + NULL, ops->ptp_irq_handler, + IRQF_ONESHOT, "sparx5-ptp", + sparx5); + if (err) + sparx5->ptp_irq = -ENXIO; + + sparx5->ptp = 1; + } + if (!sparx5->ptp) return 0; @@ -660,6 +673,11 @@ void sparx5_ptp_deinit(struct sparx5 *sparx5) struct sparx5_port *port; int i; + if (sparx5->ptp_irq >= 0) { + disable_irq(sparx5->ptp_irq); + sparx5->ptp_irq = -ENXIO; + } + for (i = 0; i < sparx5->data->consts->n_ports; i++) { port = sparx5->ports[i]; if (!port) -- 2.34.1
{ "author": "Daniel Machon <daniel.machon@microchip.com>", "date": "Fri, 27 Feb 2026 15:56:45 +0100", "is_openbsd": false, "thread_id": "20260227-sparx5-init-deinit-v2-6-10ba54ccf005@microchip.com.mbox.gz" }
lkml_critique
lkml
Move netdev registration and notifier block registration from sparx5_start() to probe(). This allows proper cleanup via goto-based error labels in probe(). Also, remove the sparx5_cleanup_ports() helper as its functionality is now split between sparx5_unregister_netdevs() and sparx5_destroy_netdevs() called at appropriate points. Signed-off-by: Daniel Machon <daniel.machon@microchip.com> --- .../net/ethernet/microchip/sparx5/sparx5_main.c | 41 +++++++++++----------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c index 582145713cfd..0ca4001a3667 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c @@ -773,20 +773,11 @@ static int sparx5_start(struct sparx5 *sparx5) mutex_init(&sparx5->mdb_lock); INIT_LIST_HEAD(&sparx5->mdb_entries); - err = sparx5_register_netdevs(sparx5); - if (err) - return err; - sparx5_board_init(sparx5); - err = sparx5_register_notifier_blocks(sparx5); - if (err) - return err; err = sparx5_vcap_init(sparx5); - if (err) { - sparx5_unregister_notifier_blocks(sparx5); + if (err) return err; - } /* Start Frame DMA with fallback to register based INJ/XTR */ err = -ENXIO; @@ -835,12 +826,6 @@ static int sparx5_start(struct sparx5 *sparx5) return err; } -static void sparx5_cleanup_ports(struct sparx5 *sparx5) -{ - sparx5_unregister_netdevs(sparx5); - sparx5_destroy_netdevs(sparx5); -} - static int mchp_sparx5_probe(struct platform_device *pdev) { struct initial_port_config *configs, *config; @@ -1020,10 +1005,26 @@ static int mchp_sparx5_probe(struct platform_device *pdev) INIT_LIST_HEAD(&sparx5->mall_entries); + err = sparx5_register_netdevs(sparx5); + if (err) { + dev_err(sparx5->dev, "Failed to register net devices\n"); + goto cleanup_ptp; + } + + err = sparx5_register_notifier_blocks(sparx5); + if (err) { + dev_err(sparx5->dev, "Failed to register notifier blocks\n"); + goto cleanup_netdevs; + } + goto cleanup_config; +cleanup_netdevs: + sparx5_unregister_netdevs(sparx5); +cleanup_ptp: + sparx5_ptp_deinit(sparx5); cleanup_ports: - sparx5_cleanup_ports(sparx5); + sparx5_destroy_netdevs(sparx5); if (sparx5->mact_queue) destroy_workqueue(sparx5->mact_queue); cleanup_config: @@ -1047,12 +1048,12 @@ static void mchp_sparx5_remove(struct platform_device *pdev) disable_irq(sparx5->fdma_irq); sparx5->fdma_irq = -ENXIO; } + sparx5_unregister_notifier_blocks(sparx5); + sparx5_unregister_netdevs(sparx5); sparx5_ptp_deinit(sparx5); ops->fdma_deinit(sparx5); - sparx5_cleanup_ports(sparx5); sparx5_vcap_destroy(sparx5); - /* Unregister netdevs */ - sparx5_unregister_notifier_blocks(sparx5); + sparx5_destroy_netdevs(sparx5); destroy_workqueue(sparx5->mact_queue); } -- 2.34.1
null
null
null
[PATCH net-next v2 1/9] net: sparx5: move netdev and notifier block registration to probe
Move the VCAP initialization code from sparx5_start() to probe(). Add proper error handling with a cleanup_vcap label and sparx5_vcap_deinit() call. Also, rename sparx5_vcap_destroy() to sparx5_vcap_deinit() to stay consistent with the naming. Signed-off-by: Daniel Machon <daniel.machon@microchip.com> --- drivers/net/ethernet/microchip/sparx5/sparx5_main.c | 16 ++++++++++------ drivers/net/ethernet/microchip/sparx5/sparx5_main.h | 2 +- drivers/net/ethernet/microchip/sparx5/sparx5_vcap_impl.c | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c index 0ca4001a3667..fbd75423f2a7 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c @@ -775,10 +775,6 @@ static int sparx5_start(struct sparx5 *sparx5) sparx5_board_init(sparx5); - err = sparx5_vcap_init(sparx5); - if (err) - return err; - /* Start Frame DMA with fallback to register based INJ/XTR */ err = -ENXIO; if (sparx5->fdma_irq >= 0) { @@ -1003,12 +999,18 @@ static int mchp_sparx5_probe(struct platform_device *pdev) goto cleanup_ports; } + err = sparx5_vcap_init(sparx5); + if (err) { + dev_err(sparx5->dev, "Failed to initialize VCAP\n"); + goto cleanup_ptp; + } + INIT_LIST_HEAD(&sparx5->mall_entries); err = sparx5_register_netdevs(sparx5); if (err) { dev_err(sparx5->dev, "Failed to register net devices\n"); - goto cleanup_ptp; + goto cleanup_vcap; } err = sparx5_register_notifier_blocks(sparx5); @@ -1021,6 +1023,8 @@ static int mchp_sparx5_probe(struct platform_device *pdev) cleanup_netdevs: sparx5_unregister_netdevs(sparx5); +cleanup_vcap: + sparx5_vcap_deinit(sparx5); cleanup_ptp: sparx5_ptp_deinit(sparx5); cleanup_ports: @@ -1050,9 +1054,9 @@ static void mchp_sparx5_remove(struct platform_device *pdev) } sparx5_unregister_notifier_blocks(sparx5); sparx5_unregister_netdevs(sparx5); + sparx5_vcap_deinit(sparx5); sparx5_ptp_deinit(sparx5); ops->fdma_deinit(sparx5); - sparx5_vcap_destroy(sparx5); sparx5_destroy_netdevs(sparx5); destroy_workqueue(sparx5->mact_queue); } diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.h b/drivers/net/ethernet/microchip/sparx5/sparx5_main.h index fe7d8bcc0cd9..6a069434fca6 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.h +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.h @@ -563,7 +563,7 @@ void sparx5_get_hwtimestamp(struct sparx5 *sparx5, /* sparx5_vcap_impl.c */ int sparx5_vcap_init(struct sparx5 *sparx5); -void sparx5_vcap_destroy(struct sparx5 *sparx5); +void sparx5_vcap_deinit(struct sparx5 *sparx5); /* sparx5_pgid.c */ enum sparx5_pgid_type { diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_vcap_impl.c b/drivers/net/ethernet/microchip/sparx5/sparx5_vcap_impl.c index 25066ddb8d4d..9b4ea3e22ef8 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_vcap_impl.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_vcap_impl.c @@ -2083,7 +2083,7 @@ int sparx5_vcap_init(struct sparx5 *sparx5) return err; } -void sparx5_vcap_destroy(struct sparx5 *sparx5) +void sparx5_vcap_deinit(struct sparx5 *sparx5) { struct vcap_control *ctrl = sparx5->vcap_ctrl; struct vcap_admin *admin, *admin_next; -- 2.34.1
{ "author": "Daniel Machon <daniel.machon@microchip.com>", "date": "Fri, 27 Feb 2026 15:56:40 +0100", "is_openbsd": false, "thread_id": "20260227-sparx5-init-deinit-v2-6-10ba54ccf005@microchip.com.mbox.gz" }
lkml_critique
lkml
Move netdev registration and notifier block registration from sparx5_start() to probe(). This allows proper cleanup via goto-based error labels in probe(). Also, remove the sparx5_cleanup_ports() helper as its functionality is now split between sparx5_unregister_netdevs() and sparx5_destroy_netdevs() called at appropriate points. Signed-off-by: Daniel Machon <daniel.machon@microchip.com> --- .../net/ethernet/microchip/sparx5/sparx5_main.c | 41 +++++++++++----------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c index 582145713cfd..0ca4001a3667 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c @@ -773,20 +773,11 @@ static int sparx5_start(struct sparx5 *sparx5) mutex_init(&sparx5->mdb_lock); INIT_LIST_HEAD(&sparx5->mdb_entries); - err = sparx5_register_netdevs(sparx5); - if (err) - return err; - sparx5_board_init(sparx5); - err = sparx5_register_notifier_blocks(sparx5); - if (err) - return err; err = sparx5_vcap_init(sparx5); - if (err) { - sparx5_unregister_notifier_blocks(sparx5); + if (err) return err; - } /* Start Frame DMA with fallback to register based INJ/XTR */ err = -ENXIO; @@ -835,12 +826,6 @@ static int sparx5_start(struct sparx5 *sparx5) return err; } -static void sparx5_cleanup_ports(struct sparx5 *sparx5) -{ - sparx5_unregister_netdevs(sparx5); - sparx5_destroy_netdevs(sparx5); -} - static int mchp_sparx5_probe(struct platform_device *pdev) { struct initial_port_config *configs, *config; @@ -1020,10 +1005,26 @@ static int mchp_sparx5_probe(struct platform_device *pdev) INIT_LIST_HEAD(&sparx5->mall_entries); + err = sparx5_register_netdevs(sparx5); + if (err) { + dev_err(sparx5->dev, "Failed to register net devices\n"); + goto cleanup_ptp; + } + + err = sparx5_register_notifier_blocks(sparx5); + if (err) { + dev_err(sparx5->dev, "Failed to register notifier blocks\n"); + goto cleanup_netdevs; + } + goto cleanup_config; +cleanup_netdevs: + sparx5_unregister_netdevs(sparx5); +cleanup_ptp: + sparx5_ptp_deinit(sparx5); cleanup_ports: - sparx5_cleanup_ports(sparx5); + sparx5_destroy_netdevs(sparx5); if (sparx5->mact_queue) destroy_workqueue(sparx5->mact_queue); cleanup_config: @@ -1047,12 +1048,12 @@ static void mchp_sparx5_remove(struct platform_device *pdev) disable_irq(sparx5->fdma_irq); sparx5->fdma_irq = -ENXIO; } + sparx5_unregister_notifier_blocks(sparx5); + sparx5_unregister_netdevs(sparx5); sparx5_ptp_deinit(sparx5); ops->fdma_deinit(sparx5); - sparx5_cleanup_ports(sparx5); sparx5_vcap_destroy(sparx5); - /* Unregister netdevs */ - sparx5_unregister_notifier_blocks(sparx5); + sparx5_destroy_netdevs(sparx5); destroy_workqueue(sparx5->mact_queue); } -- 2.34.1
null
null
null
[PATCH net-next v2 1/9] net: sparx5: move netdev and notifier block registration to probe
Move sparx5_pgid_init(), sparx5_vlan_init(), and sparx5_board_init() from sparx5_start() to probe(). These functions do not require cleanup. Signed-off-by: Daniel Machon <daniel.machon@microchip.com> --- drivers/net/ethernet/microchip/sparx5/sparx5_main.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c index a58c79a6e873..d37f34197e84 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c @@ -726,17 +726,9 @@ static int sparx5_start(struct sparx5 *sparx5) ANA_CL_FILTER_CTRL_FORCE_FCS_UPDATE_ENA, sparx5, ANA_CL_FILTER_CTRL(idx)); - /* Init PGID table arbitrator */ - sparx5_pgid_init(sparx5); - - /* Setup VLANs */ - sparx5_vlan_init(sparx5); - /* Enable queue limitation watermarks */ sparx5_qlim_set(sparx5); - sparx5_board_init(sparx5); - /* Start Frame DMA with fallback to register based INJ/XTR */ err = -ENXIO; if (sparx5->fdma_irq >= 0) { @@ -943,6 +935,10 @@ static int mchp_sparx5_probe(struct platform_device *pdev) } } + sparx5_pgid_init(sparx5); + sparx5_vlan_init(sparx5); + sparx5_board_init(sparx5); + err = sparx5_start(sparx5); if (err) { dev_err(sparx5->dev, "Start failed\n"); -- 2.34.1
{ "author": "Daniel Machon <daniel.machon@microchip.com>", "date": "Fri, 27 Feb 2026 15:56:44 +0100", "is_openbsd": false, "thread_id": "20260227-sparx5-init-deinit-v2-6-10ba54ccf005@microchip.com.mbox.gz" }
lkml_critique
lkml
Move netdev registration and notifier block registration from sparx5_start() to probe(). This allows proper cleanup via goto-based error labels in probe(). Also, remove the sparx5_cleanup_ports() helper as its functionality is now split between sparx5_unregister_netdevs() and sparx5_destroy_netdevs() called at appropriate points. Signed-off-by: Daniel Machon <daniel.machon@microchip.com> --- .../net/ethernet/microchip/sparx5/sparx5_main.c | 41 +++++++++++----------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c index 582145713cfd..0ca4001a3667 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c @@ -773,20 +773,11 @@ static int sparx5_start(struct sparx5 *sparx5) mutex_init(&sparx5->mdb_lock); INIT_LIST_HEAD(&sparx5->mdb_entries); - err = sparx5_register_netdevs(sparx5); - if (err) - return err; - sparx5_board_init(sparx5); - err = sparx5_register_notifier_blocks(sparx5); - if (err) - return err; err = sparx5_vcap_init(sparx5); - if (err) { - sparx5_unregister_notifier_blocks(sparx5); + if (err) return err; - } /* Start Frame DMA with fallback to register based INJ/XTR */ err = -ENXIO; @@ -835,12 +826,6 @@ static int sparx5_start(struct sparx5 *sparx5) return err; } -static void sparx5_cleanup_ports(struct sparx5 *sparx5) -{ - sparx5_unregister_netdevs(sparx5); - sparx5_destroy_netdevs(sparx5); -} - static int mchp_sparx5_probe(struct platform_device *pdev) { struct initial_port_config *configs, *config; @@ -1020,10 +1005,26 @@ static int mchp_sparx5_probe(struct platform_device *pdev) INIT_LIST_HEAD(&sparx5->mall_entries); + err = sparx5_register_netdevs(sparx5); + if (err) { + dev_err(sparx5->dev, "Failed to register net devices\n"); + goto cleanup_ptp; + } + + err = sparx5_register_notifier_blocks(sparx5); + if (err) { + dev_err(sparx5->dev, "Failed to register notifier blocks\n"); + goto cleanup_netdevs; + } + goto cleanup_config; +cleanup_netdevs: + sparx5_unregister_netdevs(sparx5); +cleanup_ptp: + sparx5_ptp_deinit(sparx5); cleanup_ports: - sparx5_cleanup_ports(sparx5); + sparx5_destroy_netdevs(sparx5); if (sparx5->mact_queue) destroy_workqueue(sparx5->mact_queue); cleanup_config: @@ -1047,12 +1048,12 @@ static void mchp_sparx5_remove(struct platform_device *pdev) disable_irq(sparx5->fdma_irq); sparx5->fdma_irq = -ENXIO; } + sparx5_unregister_notifier_blocks(sparx5); + sparx5_unregister_netdevs(sparx5); sparx5_ptp_deinit(sparx5); ops->fdma_deinit(sparx5); - sparx5_cleanup_ports(sparx5); sparx5_vcap_destroy(sparx5); - /* Unregister netdevs */ - sparx5_unregister_notifier_blocks(sparx5); + sparx5_destroy_netdevs(sparx5); destroy_workqueue(sparx5->mact_queue); } -- 2.34.1
null
null
null
[PATCH net-next v2 1/9] net: sparx5: move netdev and notifier block registration to probe
Move the Frame DMA and register-based extraction initialization out of sparx5_start() and into a new sparx5_frame_io_init() function, called from probe(). Also, add sparx5_frame_io_deinit() for the cleanup path. Signed-off-by: Daniel Machon <daniel.machon@microchip.com> --- .../net/ethernet/microchip/sparx5/sparx5_main.c | 109 ++++++++++++--------- 1 file changed, 63 insertions(+), 46 deletions(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c index f359008d2205..e4a448fd2b30 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c @@ -658,6 +658,58 @@ static int sparx5_qlim_set(struct sparx5 *sparx5) return 0; } +static int sparx5_frame_io_init(struct sparx5 *sparx5) +{ + const struct sparx5_ops *ops = sparx5->data->ops; + int err = -ENXIO; + + /* Start Frame DMA with fallback to register based INJ/XTR */ + if (sparx5->fdma_irq >= 0) { + if (GCB_CHIP_ID_REV_ID_GET(sparx5->chip_id) > 0 || + !is_sparx5(sparx5)) + err = devm_request_irq(sparx5->dev, + sparx5->fdma_irq, + sparx5_fdma_handler, + 0, + "sparx5-fdma", sparx5); + if (!err) { + err = ops->fdma_init(sparx5); + if (!err) + sparx5_fdma_start(sparx5); + } + if (err) + sparx5->fdma_irq = -ENXIO; + } else { + sparx5->fdma_irq = -ENXIO; + } + if (err && sparx5->xtr_irq >= 0) { + err = devm_request_irq(sparx5->dev, sparx5->xtr_irq, + sparx5_xtr_handler, IRQF_SHARED, + "sparx5-xtr", sparx5); + if (!err) + err = sparx5_manual_injection_mode(sparx5); + if (err) + sparx5->xtr_irq = -ENXIO; + } else { + sparx5->xtr_irq = -ENXIO; + } + + return err; +} + +static void sparx5_frame_io_deinit(struct sparx5 *sparx5) +{ + if (sparx5->xtr_irq >= 0) { + disable_irq(sparx5->xtr_irq); + sparx5->xtr_irq = -ENXIO; + } + if (sparx5->fdma_irq >= 0) { + disable_irq(sparx5->fdma_irq); + sparx5->data->ops->fdma_deinit(sparx5); + sparx5->fdma_irq = -ENXIO; + } +} + /* Some boards needs to map the SGPIO for signal detect explicitly to the * port module */ @@ -686,9 +738,7 @@ static void sparx5_board_init(struct sparx5 *sparx5) static int sparx5_start(struct sparx5 *sparx5) { const struct sparx5_consts *consts = sparx5->data->consts; - const struct sparx5_ops *ops = sparx5->data->ops; u32 idx; - int err; /* Setup own UPSIDs */ for (idx = 0; idx < consts->n_own_upsids; idx++) { @@ -729,39 +779,7 @@ static int sparx5_start(struct sparx5 *sparx5) /* Enable queue limitation watermarks */ sparx5_qlim_set(sparx5); - /* Start Frame DMA with fallback to register based INJ/XTR */ - err = -ENXIO; - if (sparx5->fdma_irq >= 0) { - if (GCB_CHIP_ID_REV_ID_GET(sparx5->chip_id) > 0 || - !is_sparx5(sparx5)) - err = devm_request_irq(sparx5->dev, - sparx5->fdma_irq, - sparx5_fdma_handler, - 0, - "sparx5-fdma", sparx5); - if (!err) { - err = ops->fdma_init(sparx5); - if (!err) - sparx5_fdma_start(sparx5); - } - if (err) - sparx5->fdma_irq = -ENXIO; - } else { - sparx5->fdma_irq = -ENXIO; - } - if (err && sparx5->xtr_irq >= 0) { - err = devm_request_irq(sparx5->dev, sparx5->xtr_irq, - sparx5_xtr_handler, IRQF_SHARED, - "sparx5-xtr", sparx5); - if (!err) - err = sparx5_manual_injection_mode(sparx5); - if (err) - sparx5->xtr_irq = -ENXIO; - } else { - sparx5->xtr_irq = -ENXIO; - } - - return err; + return 0; } static int mchp_sparx5_probe(struct platform_device *pdev) @@ -965,10 +983,16 @@ static int mchp_sparx5_probe(struct platform_device *pdev) INIT_LIST_HEAD(&sparx5->mall_entries); + err = sparx5_frame_io_init(sparx5); + if (err) { + dev_err(sparx5->dev, "Failed to initialize frame I/O\n"); + goto cleanup_stats; + } + err = sparx5_ptp_init(sparx5); if (err) { dev_err(sparx5->dev, "Failed to initialize PTP\n"); - goto cleanup_stats; + goto cleanup_frame_io; } err = sparx5_register_netdevs(sparx5); @@ -989,6 +1013,8 @@ static int mchp_sparx5_probe(struct platform_device *pdev) sparx5_unregister_netdevs(sparx5); cleanup_ptp: sparx5_ptp_deinit(sparx5); +cleanup_frame_io: + sparx5_frame_io_deinit(sparx5); cleanup_stats: sparx5_stats_deinit(sparx5); cleanup_mact: @@ -1007,24 +1033,15 @@ static int mchp_sparx5_probe(struct platform_device *pdev) static void mchp_sparx5_remove(struct platform_device *pdev) { struct sparx5 *sparx5 = platform_get_drvdata(pdev); - const struct sparx5_ops *ops = sparx5->data->ops; debugfs_remove_recursive(sparx5->debugfs_root); - if (sparx5->xtr_irq) { - disable_irq(sparx5->xtr_irq); - sparx5->xtr_irq = -ENXIO; - } - if (sparx5->fdma_irq) { - disable_irq(sparx5->fdma_irq); - sparx5->fdma_irq = -ENXIO; - } sparx5_unregister_notifier_blocks(sparx5); sparx5_unregister_netdevs(sparx5); sparx5_ptp_deinit(sparx5); + sparx5_frame_io_deinit(sparx5); sparx5_stats_deinit(sparx5); sparx5_mact_deinit(sparx5); sparx5_vcap_deinit(sparx5); - ops->fdma_deinit(sparx5); sparx5_destroy_netdevs(sparx5); } -- 2.34.1
{ "author": "Daniel Machon <daniel.machon@microchip.com>", "date": "Fri, 27 Feb 2026 15:56:46 +0100", "is_openbsd": false, "thread_id": "20260227-sparx5-init-deinit-v2-6-10ba54ccf005@microchip.com.mbox.gz" }
lkml_critique
lkml
Move netdev registration and notifier block registration from sparx5_start() to probe(). This allows proper cleanup via goto-based error labels in probe(). Also, remove the sparx5_cleanup_ports() helper as its functionality is now split between sparx5_unregister_netdevs() and sparx5_destroy_netdevs() called at appropriate points. Signed-off-by: Daniel Machon <daniel.machon@microchip.com> --- .../net/ethernet/microchip/sparx5/sparx5_main.c | 41 +++++++++++----------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c index 582145713cfd..0ca4001a3667 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c @@ -773,20 +773,11 @@ static int sparx5_start(struct sparx5 *sparx5) mutex_init(&sparx5->mdb_lock); INIT_LIST_HEAD(&sparx5->mdb_entries); - err = sparx5_register_netdevs(sparx5); - if (err) - return err; - sparx5_board_init(sparx5); - err = sparx5_register_notifier_blocks(sparx5); - if (err) - return err; err = sparx5_vcap_init(sparx5); - if (err) { - sparx5_unregister_notifier_blocks(sparx5); + if (err) return err; - } /* Start Frame DMA with fallback to register based INJ/XTR */ err = -ENXIO; @@ -835,12 +826,6 @@ static int sparx5_start(struct sparx5 *sparx5) return err; } -static void sparx5_cleanup_ports(struct sparx5 *sparx5) -{ - sparx5_unregister_netdevs(sparx5); - sparx5_destroy_netdevs(sparx5); -} - static int mchp_sparx5_probe(struct platform_device *pdev) { struct initial_port_config *configs, *config; @@ -1020,10 +1005,26 @@ static int mchp_sparx5_probe(struct platform_device *pdev) INIT_LIST_HEAD(&sparx5->mall_entries); + err = sparx5_register_netdevs(sparx5); + if (err) { + dev_err(sparx5->dev, "Failed to register net devices\n"); + goto cleanup_ptp; + } + + err = sparx5_register_notifier_blocks(sparx5); + if (err) { + dev_err(sparx5->dev, "Failed to register notifier blocks\n"); + goto cleanup_netdevs; + } + goto cleanup_config; +cleanup_netdevs: + sparx5_unregister_netdevs(sparx5); +cleanup_ptp: + sparx5_ptp_deinit(sparx5); cleanup_ports: - sparx5_cleanup_ports(sparx5); + sparx5_destroy_netdevs(sparx5); if (sparx5->mact_queue) destroy_workqueue(sparx5->mact_queue); cleanup_config: @@ -1047,12 +1048,12 @@ static void mchp_sparx5_remove(struct platform_device *pdev) disable_irq(sparx5->fdma_irq); sparx5->fdma_irq = -ENXIO; } + sparx5_unregister_notifier_blocks(sparx5); + sparx5_unregister_netdevs(sparx5); sparx5_ptp_deinit(sparx5); ops->fdma_deinit(sparx5); - sparx5_cleanup_ports(sparx5); sparx5_vcap_destroy(sparx5); - /* Unregister netdevs */ - sparx5_unregister_notifier_blocks(sparx5); + sparx5_destroy_netdevs(sparx5); destroy_workqueue(sparx5->mact_queue); } -- 2.34.1
null
null
null
[PATCH net-next v2 1/9] net: sparx5: move netdev and notifier block registration to probe
With all subsystem initializations moved out, sparx5_start() only sets up forwarding (UPSIDs, CPU ports, masks, PGIDs, FCS, watermarks). Rename it to sparx5_forwarding_init() and make it void since it cannot fail. This removes sparx5_start() entirely. Signed-off-by: Daniel Machon <daniel.machon@microchip.com> --- drivers/net/ethernet/microchip/sparx5/sparx5_main.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c index e4a448fd2b30..cab5daf265c2 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c @@ -735,7 +735,7 @@ static void sparx5_board_init(struct sparx5 *sparx5) GCB_HW_SGPIO_TO_SD_MAP_CFG(idx)); } -static int sparx5_start(struct sparx5 *sparx5) +static void sparx5_forwarding_init(struct sparx5 *sparx5) { const struct sparx5_consts *consts = sparx5->data->consts; u32 idx; @@ -779,7 +779,6 @@ static int sparx5_start(struct sparx5 *sparx5) /* Enable queue limitation watermarks */ sparx5_qlim_set(sparx5); - return 0; } static int mchp_sparx5_probe(struct platform_device *pdev) @@ -944,12 +943,7 @@ static int mchp_sparx5_probe(struct platform_device *pdev) sparx5_pgid_init(sparx5); sparx5_vlan_init(sparx5); sparx5_board_init(sparx5); - - err = sparx5_start(sparx5); - if (err) { - dev_err(sparx5->dev, "Start failed\n"); - goto cleanup_ports; - } + sparx5_forwarding_init(sparx5); err = sparx5_calendar_init(sparx5); if (err) { -- 2.34.1
{ "author": "Daniel Machon <daniel.machon@microchip.com>", "date": "Fri, 27 Feb 2026 15:56:47 +0100", "is_openbsd": false, "thread_id": "20260227-sparx5-init-deinit-v2-6-10ba54ccf005@microchip.com.mbox.gz" }
lkml_critique
lkml
Move netdev registration and notifier block registration from sparx5_start() to probe(). This allows proper cleanup via goto-based error labels in probe(). Also, remove the sparx5_cleanup_ports() helper as its functionality is now split between sparx5_unregister_netdevs() and sparx5_destroy_netdevs() called at appropriate points. Signed-off-by: Daniel Machon <daniel.machon@microchip.com> --- .../net/ethernet/microchip/sparx5/sparx5_main.c | 41 +++++++++++----------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c index 582145713cfd..0ca4001a3667 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c @@ -773,20 +773,11 @@ static int sparx5_start(struct sparx5 *sparx5) mutex_init(&sparx5->mdb_lock); INIT_LIST_HEAD(&sparx5->mdb_entries); - err = sparx5_register_netdevs(sparx5); - if (err) - return err; - sparx5_board_init(sparx5); - err = sparx5_register_notifier_blocks(sparx5); - if (err) - return err; err = sparx5_vcap_init(sparx5); - if (err) { - sparx5_unregister_notifier_blocks(sparx5); + if (err) return err; - } /* Start Frame DMA with fallback to register based INJ/XTR */ err = -ENXIO; @@ -835,12 +826,6 @@ static int sparx5_start(struct sparx5 *sparx5) return err; } -static void sparx5_cleanup_ports(struct sparx5 *sparx5) -{ - sparx5_unregister_netdevs(sparx5); - sparx5_destroy_netdevs(sparx5); -} - static int mchp_sparx5_probe(struct platform_device *pdev) { struct initial_port_config *configs, *config; @@ -1020,10 +1005,26 @@ static int mchp_sparx5_probe(struct platform_device *pdev) INIT_LIST_HEAD(&sparx5->mall_entries); + err = sparx5_register_netdevs(sparx5); + if (err) { + dev_err(sparx5->dev, "Failed to register net devices\n"); + goto cleanup_ptp; + } + + err = sparx5_register_notifier_blocks(sparx5); + if (err) { + dev_err(sparx5->dev, "Failed to register notifier blocks\n"); + goto cleanup_netdevs; + } + goto cleanup_config; +cleanup_netdevs: + sparx5_unregister_netdevs(sparx5); +cleanup_ptp: + sparx5_ptp_deinit(sparx5); cleanup_ports: - sparx5_cleanup_ports(sparx5); + sparx5_destroy_netdevs(sparx5); if (sparx5->mact_queue) destroy_workqueue(sparx5->mact_queue); cleanup_config: @@ -1047,12 +1048,12 @@ static void mchp_sparx5_remove(struct platform_device *pdev) disable_irq(sparx5->fdma_irq); sparx5->fdma_irq = -ENXIO; } + sparx5_unregister_notifier_blocks(sparx5); + sparx5_unregister_netdevs(sparx5); sparx5_ptp_deinit(sparx5); ops->fdma_deinit(sparx5); - sparx5_cleanup_ports(sparx5); sparx5_vcap_destroy(sparx5); - /* Unregister netdevs */ - sparx5_unregister_notifier_blocks(sparx5); + sparx5_destroy_netdevs(sparx5); destroy_workqueue(sparx5->mact_queue); } -- 2.34.1
null
null
null
[PATCH net-next v2 1/9] net: sparx5: move netdev and notifier block registration to probe
Consolidate all MAC table initialization from sparx5_start() into sparx5_mact_init(), move it to probe(), and add a deinit function for proper teardown. Also, make sparx5_mact_pull_work() static since it is only used within sparx5_mactable.c. Signed-off-by: Daniel Machon <daniel.machon@microchip.com> --- .../ethernet/microchip/sparx5/sparx5_mactable.c | 34 +++++++++++++++++-- .../net/ethernet/microchip/sparx5/sparx5_main.c | 39 ++++++---------------- .../net/ethernet/microchip/sparx5/sparx5_main.h | 4 +-- 3 files changed, 44 insertions(+), 33 deletions(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_mactable.c b/drivers/net/ethernet/microchip/sparx5/sparx5_mactable.c index f5584244612c..2bf9c5f64151 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_mactable.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_mactable.c @@ -419,7 +419,7 @@ static void sparx5_mact_handle_entry(struct sparx5 *sparx5, true); } -void sparx5_mact_pull_work(struct work_struct *work) +static void sparx5_mact_pull_work(struct work_struct *work) { struct delayed_work *del_work = to_delayed_work(work); struct sparx5 *sparx5 = container_of(del_work, struct sparx5, @@ -489,8 +489,10 @@ void sparx5_set_ageing(struct sparx5 *sparx5, int msecs) LRN_AUTOAGE_CFG(0)); } -void sparx5_mact_init(struct sparx5 *sparx5) +int sparx5_mact_init(struct sparx5 *sparx5) { + char queue_name[32]; + mutex_init(&sparx5->lock); /* Flush MAC table */ @@ -502,4 +504,32 @@ void sparx5_mact_init(struct sparx5 *sparx5) dev_warn(sparx5->dev, "MAC flush error\n"); sparx5_set_ageing(sparx5, BR_DEFAULT_AGEING_TIME / HZ * 1000); + + /* Add host mode BC address (points only to CPU) */ + sparx5_mact_learn(sparx5, sparx5_get_pgid(sparx5, PGID_CPU), + (unsigned char[]){0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, + NULL_VID); + + mutex_init(&sparx5->mdb_lock); + INIT_LIST_HEAD(&sparx5->mdb_entries); + mutex_init(&sparx5->mact_lock); + INIT_LIST_HEAD(&sparx5->mact_entries); + snprintf(queue_name, sizeof(queue_name), "%s-mact", + dev_name(sparx5->dev)); + sparx5->mact_queue = create_singlethread_workqueue(queue_name); + if (!sparx5->mact_queue) + return -ENOMEM; + + INIT_DELAYED_WORK(&sparx5->mact_work, sparx5_mact_pull_work); + queue_delayed_work(sparx5->mact_queue, &sparx5->mact_work, + SPX5_MACT_PULL_DELAY); + + return 0; +} + +void sparx5_mact_deinit(struct sparx5 *sparx5) +{ + cancel_delayed_work_sync(&sparx5->mact_work); + destroy_workqueue(sparx5->mact_queue); + mutex_destroy(&sparx5->mact_lock); } diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c index fbd75423f2a7..4271f4a29cad 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c @@ -685,10 +685,8 @@ static void sparx5_board_init(struct sparx5 *sparx5) static int sparx5_start(struct sparx5 *sparx5) { - u8 broadcast[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; const struct sparx5_consts *consts = sparx5->data->consts; const struct sparx5_ops *ops = sparx5->data->ops; - char queue_name[32]; u32 idx; int err; @@ -728,19 +726,12 @@ static int sparx5_start(struct sparx5 *sparx5) ANA_CL_FILTER_CTRL_FORCE_FCS_UPDATE_ENA, sparx5, ANA_CL_FILTER_CTRL(idx)); - /* Init MAC table, ageing */ - sparx5_mact_init(sparx5); - /* Init PGID table arbitrator */ sparx5_pgid_init(sparx5); /* Setup VLANs */ sparx5_vlan_init(sparx5); - /* Add host mode BC address (points only to CPU) */ - sparx5_mact_learn(sparx5, sparx5_get_pgid(sparx5, PGID_CPU), broadcast, - NULL_VID); - /* Enable queue limitation watermarks */ sparx5_qlim_set(sparx5); @@ -757,22 +748,6 @@ static int sparx5_start(struct sparx5 *sparx5) if (err) return err; - /* Init mact_sw struct */ - mutex_init(&sparx5->mact_lock); - INIT_LIST_HEAD(&sparx5->mact_entries); - snprintf(queue_name, sizeof(queue_name), "%s-mact", - dev_name(sparx5->dev)); - sparx5->mact_queue = create_singlethread_workqueue(queue_name); - if (!sparx5->mact_queue) - return -ENOMEM; - - INIT_DELAYED_WORK(&sparx5->mact_work, sparx5_mact_pull_work); - queue_delayed_work(sparx5->mact_queue, &sparx5->mact_work, - SPX5_MACT_PULL_DELAY); - - mutex_init(&sparx5->mdb_lock); - INIT_LIST_HEAD(&sparx5->mdb_entries); - sparx5_board_init(sparx5); /* Start Frame DMA with fallback to register based INJ/XTR */ @@ -1005,12 +980,18 @@ static int mchp_sparx5_probe(struct platform_device *pdev) goto cleanup_ptp; } + err = sparx5_mact_init(sparx5); + if (err) { + dev_err(sparx5->dev, "Failed to initialize MAC table\n"); + goto cleanup_vcap; + } + INIT_LIST_HEAD(&sparx5->mall_entries); err = sparx5_register_netdevs(sparx5); if (err) { dev_err(sparx5->dev, "Failed to register net devices\n"); - goto cleanup_vcap; + goto cleanup_mact; } err = sparx5_register_notifier_blocks(sparx5); @@ -1023,14 +1004,14 @@ static int mchp_sparx5_probe(struct platform_device *pdev) cleanup_netdevs: sparx5_unregister_netdevs(sparx5); +cleanup_mact: + sparx5_mact_deinit(sparx5); cleanup_vcap: sparx5_vcap_deinit(sparx5); cleanup_ptp: sparx5_ptp_deinit(sparx5); cleanup_ports: sparx5_destroy_netdevs(sparx5); - if (sparx5->mact_queue) - destroy_workqueue(sparx5->mact_queue); cleanup_config: kfree(configs); cleanup_pnode: @@ -1054,11 +1035,11 @@ static void mchp_sparx5_remove(struct platform_device *pdev) } sparx5_unregister_notifier_blocks(sparx5); sparx5_unregister_netdevs(sparx5); + sparx5_mact_deinit(sparx5); sparx5_vcap_deinit(sparx5); sparx5_ptp_deinit(sparx5); ops->fdma_deinit(sparx5); sparx5_destroy_netdevs(sparx5); - destroy_workqueue(sparx5->mact_queue); } static const struct sparx5_regs sparx5_regs = { diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.h b/drivers/net/ethernet/microchip/sparx5/sparx5_main.h index 6a069434fca6..e4c39cca7b26 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.h +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.h @@ -470,7 +470,6 @@ void sparx5_fdma_reload(struct sparx5 *sparx5, struct fdma *fdma); void sparx5_fdma_injection_mode(struct sparx5 *sparx5); /* sparx5_mactable.c */ -void sparx5_mact_pull_work(struct work_struct *work); int sparx5_mact_learn(struct sparx5 *sparx5, int port, const unsigned char mac[ETH_ALEN], u16 vid); bool sparx5_mact_getnext(struct sparx5 *sparx5, @@ -489,7 +488,8 @@ int sparx5_del_mact_entry(struct sparx5 *sparx5, int sparx5_mc_sync(struct net_device *dev, const unsigned char *addr); int sparx5_mc_unsync(struct net_device *dev, const unsigned char *addr); void sparx5_set_ageing(struct sparx5 *sparx5, int msecs); -void sparx5_mact_init(struct sparx5 *sparx5); +int sparx5_mact_init(struct sparx5 *sparx5); +void sparx5_mact_deinit(struct sparx5 *sparx5); /* sparx5_vlan.c */ void sparx5_pgid_update_mask(struct sparx5_port *port, int pgid, bool enable); -- 2.34.1
{ "author": "Daniel Machon <daniel.machon@microchip.com>", "date": "Fri, 27 Feb 2026 15:56:41 +0100", "is_openbsd": false, "thread_id": "20260227-sparx5-init-deinit-v2-6-10ba54ccf005@microchip.com.mbox.gz" }
lkml_critique
lkml
The LPS0 3/4 constants are part of a firmware notification called "Display on/off", in which the device enters a "Screen Off" state. The LPS0 7/8 constants are part of a firmware notification in which a Windows modern standby computer enters a "sleep" state where the CPU may still be active and maintain the radios. However, currently, the values are named as "Screen on/off" and "MS entry/exit", where Modern Standby is abbreviated as "MS". Therefore, perform a minor rename so that the values match their function. Then, fix the debug message to say that it executes notifications instead of entering states as it is otherwise confusing. Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> --- drivers/acpi/x86/s2idle.c | 54 +++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c index 6d4d06236f61..1f13c8b0ef83 100644 --- a/drivers/acpi/x86/s2idle.c +++ b/drivers/acpi/x86/s2idle.c @@ -39,19 +39,19 @@ static const struct acpi_device_id lps0_device_ids[] = { #define ACPI_LPS0_DSM_UUID "c4eb40a0-6cd2-11e2-bcfd-0800200c9a66" #define ACPI_LPS0_GET_DEVICE_CONSTRAINTS 1 -#define ACPI_LPS0_SCREEN_OFF 3 -#define ACPI_LPS0_SCREEN_ON 4 +#define ACPI_LPS0_DISPLAY_OFF 3 +#define ACPI_LPS0_DISPLAY_ON 4 #define ACPI_LPS0_ENTRY 5 #define ACPI_LPS0_EXIT 6 -#define ACPI_LPS0_MS_ENTRY 7 -#define ACPI_LPS0_MS_EXIT 8 +#define ACPI_LPS0_SLEEP_ENTRY 7 +#define ACPI_LPS0_SLEEP_EXIT 8 /* AMD */ #define ACPI_LPS0_DSM_UUID_AMD "e3f32452-febc-43ce-9039-932122d37721" #define ACPI_LPS0_ENTRY_AMD 2 #define ACPI_LPS0_EXIT_AMD 3 -#define ACPI_LPS0_SCREEN_OFF_AMD 4 -#define ACPI_LPS0_SCREEN_ON_AMD 5 +#define ACPI_LPS0_DISPLAY_OFF_AMD 4 +#define ACPI_LPS0_DISPLAY_ON_AMD 5 static acpi_handle lps0_device_handle; static guid_t lps0_dsm_guid; @@ -340,25 +340,25 @@ static const char *acpi_sleep_dsm_state_to_str(unsigned int state) { if (lps0_dsm_func_mask_microsoft || !acpi_s2idle_vendor_amd()) { switch (state) { - case ACPI_LPS0_SCREEN_OFF: - return "screen off"; - case ACPI_LPS0_SCREEN_ON: - return "screen on"; + case ACPI_LPS0_DISPLAY_OFF: + return "display off"; + case ACPI_LPS0_DISPLAY_ON: + return "display on"; case ACPI_LPS0_ENTRY: return "lps0 entry"; case ACPI_LPS0_EXIT: return "lps0 exit"; - case ACPI_LPS0_MS_ENTRY: - return "lps0 ms entry"; - case ACPI_LPS0_MS_EXIT: - return "lps0 ms exit"; + case ACPI_LPS0_SLEEP_ENTRY: + return "sleep entry"; + case ACPI_LPS0_SLEEP_EXIT: + return "sleep exit"; } } else { switch (state) { - case ACPI_LPS0_SCREEN_ON_AMD: - return "screen on"; - case ACPI_LPS0_SCREEN_OFF_AMD: - return "screen off"; + case ACPI_LPS0_DISPLAY_ON_AMD: + return "display on"; + case ACPI_LPS0_DISPLAY_OFF_AMD: + return "display off"; case ACPI_LPS0_ENTRY_AMD: return "lps0 entry"; case ACPI_LPS0_EXIT_AMD: @@ -383,7 +383,7 @@ static void acpi_sleep_run_lps0_dsm(unsigned int func, unsigned int func_mask, g lps0_dsm_state = func; if (pm_debug_messages_on) { acpi_handle_info(lps0_device_handle, - "%s transitioned to state %s\n", + "%s executed notification %s\n", out_obj ? "Successfully" : "Failed to", acpi_sleep_dsm_state_to_str(lps0_dsm_state)); } @@ -545,12 +545,12 @@ static int acpi_s2idle_prepare_late_lps0(void) /* Screen off */ if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_OFF_AMD : - ACPI_LPS0_SCREEN_OFF, + ACPI_LPS0_DISPLAY_OFF_AMD : + ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask, lps0_dsm_guid); if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_OFF, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* LPS0 entry */ @@ -560,7 +560,7 @@ static int acpi_s2idle_prepare_late_lps0(void) if (lps0_dsm_func_mask_microsoft > 0) { /* Modern Standby entry */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_ENTRY, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); @@ -613,18 +613,18 @@ static void acpi_s2idle_restore_early_lps0(void) acpi_sleep_run_lps0_dsm(ACPI_LPS0_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* Modern Standby exit */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_EXIT, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); } /* Screen on */ if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_ON, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_ON_AMD : - ACPI_LPS0_SCREEN_ON, + ACPI_LPS0_DISPLAY_ON_AMD : + ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask, lps0_dsm_guid); } -- 2.52.0
null
null
null
[RFC v1 2/8] acpi/x86: s2idle: Rename LPS0 constants so they mirror their function
Windows implements a DSM called "Turn On Display". This notification is sent to the hardware while on the sleep state if the user interacted with the device and caused it to wake up in such a way where the display should turn on. This allows the OEM to counter the effects of Sleep entry such as a reduced power envelope to allow for the device to wake up faster. Implement it as part of the "resume" state in the Microsoft-agnostic kernel ABI. Link: https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/modern-standby-firmware-notifications Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> --- drivers/acpi/x86/s2idle.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c index 7693162c68fd..965b78cc8bf5 100644 --- a/drivers/acpi/x86/s2idle.c +++ b/drivers/acpi/x86/s2idle.c @@ -39,12 +39,13 @@ static const struct acpi_device_id lps0_device_ids[] = { #define ACPI_LPS0_DSM_UUID "c4eb40a0-6cd2-11e2-bcfd-0800200c9a66" #define ACPI_LPS0_GET_DEVICE_CONSTRAINTS 1 -#define ACPI_LPS0_DISPLAY_OFF 3 -#define ACPI_LPS0_DISPLAY_ON 4 -#define ACPI_LPS0_ENTRY 5 -#define ACPI_LPS0_EXIT 6 -#define ACPI_LPS0_SLEEP_ENTRY 7 -#define ACPI_LPS0_SLEEP_EXIT 8 +#define ACPI_LPS0_DISPLAY_OFF 3 +#define ACPI_LPS0_DISPLAY_ON 4 +#define ACPI_LPS0_ENTRY 5 +#define ACPI_LPS0_EXIT 6 +#define ACPI_LPS0_SLEEP_ENTRY 7 +#define ACPI_LPS0_SLEEP_EXIT 8 +#define ACPI_LPS0_TURN_ON_DISPLAY 9 /* AMD */ #define ACPI_LPS0_DSM_UUID_AMD "e3f32452-febc-43ce-9039-932122d37721" @@ -352,6 +353,8 @@ static const char *acpi_sleep_dsm_state_to_str(unsigned int state) return "sleep entry"; case ACPI_LPS0_SLEEP_EXIT: return "sleep exit"; + case ACPI_LPS0_TURN_ON_DISPLAY: + return "turn on display"; } } else { switch (state) { @@ -528,6 +531,9 @@ static u8 acpi_s2idle_get_standby_states(void) if (lps0_dsm_func_mask_microsoft & (1 << ACPI_LPS0_SLEEP_ENTRY | 1 << ACPI_LPS0_SLEEP_EXIT)) states |= BIT(PM_STANDBY_SLEEP); + if (lps0_dsm_func_mask_microsoft & + (1 << ACPI_LPS0_TURN_ON_DISPLAY)) + states |= BIT(PM_STANDBY_RESUME); } if (lps0_dsm_func_mask > 0) { @@ -587,6 +593,12 @@ static int acpi_s2idle_do_notification(standby_notification_t state) lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); break; + case PM_SN_RESUME: + if (lps0_dsm_func_mask_microsoft > 0) + acpi_sleep_run_lps0_dsm(ACPI_LPS0_TURN_ON_DISPLAY, + lps0_dsm_func_mask_microsoft, + lps0_dsm_guid_microsoft); + break; default: return -EINVAL; } -- 2.52.0
{ "author": "Antheas Kapenekakis <lkml@antheas.dev>", "date": "Fri, 26 Dec 2025 12:26:44 +0200", "is_openbsd": false, "thread_id": "CAGwozwHE4DVCh79-523V5=a_fqR0gXnnkorGCPEsgHBDLYPtxA@mail.gmail.com.mbox.gz" }
lkml_critique
lkml
The LPS0 3/4 constants are part of a firmware notification called "Display on/off", in which the device enters a "Screen Off" state. The LPS0 7/8 constants are part of a firmware notification in which a Windows modern standby computer enters a "sleep" state where the CPU may still be active and maintain the radios. However, currently, the values are named as "Screen on/off" and "MS entry/exit", where Modern Standby is abbreviated as "MS". Therefore, perform a minor rename so that the values match their function. Then, fix the debug message to say that it executes notifications instead of entering states as it is otherwise confusing. Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> --- drivers/acpi/x86/s2idle.c | 54 +++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c index 6d4d06236f61..1f13c8b0ef83 100644 --- a/drivers/acpi/x86/s2idle.c +++ b/drivers/acpi/x86/s2idle.c @@ -39,19 +39,19 @@ static const struct acpi_device_id lps0_device_ids[] = { #define ACPI_LPS0_DSM_UUID "c4eb40a0-6cd2-11e2-bcfd-0800200c9a66" #define ACPI_LPS0_GET_DEVICE_CONSTRAINTS 1 -#define ACPI_LPS0_SCREEN_OFF 3 -#define ACPI_LPS0_SCREEN_ON 4 +#define ACPI_LPS0_DISPLAY_OFF 3 +#define ACPI_LPS0_DISPLAY_ON 4 #define ACPI_LPS0_ENTRY 5 #define ACPI_LPS0_EXIT 6 -#define ACPI_LPS0_MS_ENTRY 7 -#define ACPI_LPS0_MS_EXIT 8 +#define ACPI_LPS0_SLEEP_ENTRY 7 +#define ACPI_LPS0_SLEEP_EXIT 8 /* AMD */ #define ACPI_LPS0_DSM_UUID_AMD "e3f32452-febc-43ce-9039-932122d37721" #define ACPI_LPS0_ENTRY_AMD 2 #define ACPI_LPS0_EXIT_AMD 3 -#define ACPI_LPS0_SCREEN_OFF_AMD 4 -#define ACPI_LPS0_SCREEN_ON_AMD 5 +#define ACPI_LPS0_DISPLAY_OFF_AMD 4 +#define ACPI_LPS0_DISPLAY_ON_AMD 5 static acpi_handle lps0_device_handle; static guid_t lps0_dsm_guid; @@ -340,25 +340,25 @@ static const char *acpi_sleep_dsm_state_to_str(unsigned int state) { if (lps0_dsm_func_mask_microsoft || !acpi_s2idle_vendor_amd()) { switch (state) { - case ACPI_LPS0_SCREEN_OFF: - return "screen off"; - case ACPI_LPS0_SCREEN_ON: - return "screen on"; + case ACPI_LPS0_DISPLAY_OFF: + return "display off"; + case ACPI_LPS0_DISPLAY_ON: + return "display on"; case ACPI_LPS0_ENTRY: return "lps0 entry"; case ACPI_LPS0_EXIT: return "lps0 exit"; - case ACPI_LPS0_MS_ENTRY: - return "lps0 ms entry"; - case ACPI_LPS0_MS_EXIT: - return "lps0 ms exit"; + case ACPI_LPS0_SLEEP_ENTRY: + return "sleep entry"; + case ACPI_LPS0_SLEEP_EXIT: + return "sleep exit"; } } else { switch (state) { - case ACPI_LPS0_SCREEN_ON_AMD: - return "screen on"; - case ACPI_LPS0_SCREEN_OFF_AMD: - return "screen off"; + case ACPI_LPS0_DISPLAY_ON_AMD: + return "display on"; + case ACPI_LPS0_DISPLAY_OFF_AMD: + return "display off"; case ACPI_LPS0_ENTRY_AMD: return "lps0 entry"; case ACPI_LPS0_EXIT_AMD: @@ -383,7 +383,7 @@ static void acpi_sleep_run_lps0_dsm(unsigned int func, unsigned int func_mask, g lps0_dsm_state = func; if (pm_debug_messages_on) { acpi_handle_info(lps0_device_handle, - "%s transitioned to state %s\n", + "%s executed notification %s\n", out_obj ? "Successfully" : "Failed to", acpi_sleep_dsm_state_to_str(lps0_dsm_state)); } @@ -545,12 +545,12 @@ static int acpi_s2idle_prepare_late_lps0(void) /* Screen off */ if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_OFF_AMD : - ACPI_LPS0_SCREEN_OFF, + ACPI_LPS0_DISPLAY_OFF_AMD : + ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask, lps0_dsm_guid); if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_OFF, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* LPS0 entry */ @@ -560,7 +560,7 @@ static int acpi_s2idle_prepare_late_lps0(void) if (lps0_dsm_func_mask_microsoft > 0) { /* Modern Standby entry */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_ENTRY, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); @@ -613,18 +613,18 @@ static void acpi_s2idle_restore_early_lps0(void) acpi_sleep_run_lps0_dsm(ACPI_LPS0_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* Modern Standby exit */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_EXIT, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); } /* Screen on */ if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_ON, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_ON_AMD : - ACPI_LPS0_SCREEN_ON, + ACPI_LPS0_DISPLAY_ON_AMD : + ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask, lps0_dsm_guid); } -- 2.52.0
null
null
null
[RFC v1 2/8] acpi/x86: s2idle: Rename LPS0 constants so they mirror their function
Implement the standby states as part of hibernation. Specifically, ensure we are in the inactive state before hibernation entry, and sync the state as active after hibernation resume. In case of a failed hibernation, restore the previous standby state. Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> --- kernel/power/hibernate.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c index af8d07bafe02..85a5ca8f6537 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c @@ -787,7 +787,11 @@ static int load_image_and_restore(void) */ int hibernate(void) { +#ifdef CONFIG_SUSPEND + standby_state_t previous_standby; +#endif bool snapshot_test = false; + bool powered_down = false; unsigned int sleep_flags; int error; @@ -815,6 +819,13 @@ int hibernate(void) } pr_info("hibernation entry\n"); + +#if CONFIG_SUSPEND + /* Enter the standby screen off state in case userspace has not. */ + previous_standby = pm_standby_get_state(); + pm_standby_transition(PM_STANDBY_INACTIVE); +#endif + pm_prepare_console(); error = pm_notifier_call_chain_robust(PM_HIBERNATION_PREPARE, PM_POST_HIBERNATION); if (error) @@ -867,10 +878,12 @@ int hibernate(void) error = swsusp_write(flags); swsusp_free(); if (!error) { - if (hibernation_mode == HIBERNATION_TEST_RESUME) + if (hibernation_mode == HIBERNATION_TEST_RESUME) { snapshot_test = true; - else + } else { + powered_down = true; power_down(); + } } in_suspend = 0; pm_restore_gfp_mask(); @@ -897,6 +910,18 @@ int hibernate(void) Notify: pm_notifier_call_chain(PM_POST_HIBERNATION); Restore: +#if CONFIG_SUSPEND + /* + * If we resumed from S5, we are in the active standby state. However, + * the kernel restored a stale value. Sync it. Otherwise, in e.g., the + * case of a failed hibernation, transition to the previous value. + */ + if (powered_down) + pm_standby_set_state(PM_STANDBY_ACTIVE); + else + pm_standby_transition(previous_standby); +#endif + pm_restore_console(); hibernate_release(); Unlock: -- 2.52.0
{ "author": "Antheas Kapenekakis <lkml@antheas.dev>", "date": "Fri, 26 Dec 2025 12:26:45 +0200", "is_openbsd": false, "thread_id": "CAGwozwHE4DVCh79-523V5=a_fqR0gXnnkorGCPEsgHBDLYPtxA@mail.gmail.com.mbox.gz" }
lkml_critique
lkml
The LPS0 3/4 constants are part of a firmware notification called "Display on/off", in which the device enters a "Screen Off" state. The LPS0 7/8 constants are part of a firmware notification in which a Windows modern standby computer enters a "sleep" state where the CPU may still be active and maintain the radios. However, currently, the values are named as "Screen on/off" and "MS entry/exit", where Modern Standby is abbreviated as "MS". Therefore, perform a minor rename so that the values match their function. Then, fix the debug message to say that it executes notifications instead of entering states as it is otherwise confusing. Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> --- drivers/acpi/x86/s2idle.c | 54 +++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c index 6d4d06236f61..1f13c8b0ef83 100644 --- a/drivers/acpi/x86/s2idle.c +++ b/drivers/acpi/x86/s2idle.c @@ -39,19 +39,19 @@ static const struct acpi_device_id lps0_device_ids[] = { #define ACPI_LPS0_DSM_UUID "c4eb40a0-6cd2-11e2-bcfd-0800200c9a66" #define ACPI_LPS0_GET_DEVICE_CONSTRAINTS 1 -#define ACPI_LPS0_SCREEN_OFF 3 -#define ACPI_LPS0_SCREEN_ON 4 +#define ACPI_LPS0_DISPLAY_OFF 3 +#define ACPI_LPS0_DISPLAY_ON 4 #define ACPI_LPS0_ENTRY 5 #define ACPI_LPS0_EXIT 6 -#define ACPI_LPS0_MS_ENTRY 7 -#define ACPI_LPS0_MS_EXIT 8 +#define ACPI_LPS0_SLEEP_ENTRY 7 +#define ACPI_LPS0_SLEEP_EXIT 8 /* AMD */ #define ACPI_LPS0_DSM_UUID_AMD "e3f32452-febc-43ce-9039-932122d37721" #define ACPI_LPS0_ENTRY_AMD 2 #define ACPI_LPS0_EXIT_AMD 3 -#define ACPI_LPS0_SCREEN_OFF_AMD 4 -#define ACPI_LPS0_SCREEN_ON_AMD 5 +#define ACPI_LPS0_DISPLAY_OFF_AMD 4 +#define ACPI_LPS0_DISPLAY_ON_AMD 5 static acpi_handle lps0_device_handle; static guid_t lps0_dsm_guid; @@ -340,25 +340,25 @@ static const char *acpi_sleep_dsm_state_to_str(unsigned int state) { if (lps0_dsm_func_mask_microsoft || !acpi_s2idle_vendor_amd()) { switch (state) { - case ACPI_LPS0_SCREEN_OFF: - return "screen off"; - case ACPI_LPS0_SCREEN_ON: - return "screen on"; + case ACPI_LPS0_DISPLAY_OFF: + return "display off"; + case ACPI_LPS0_DISPLAY_ON: + return "display on"; case ACPI_LPS0_ENTRY: return "lps0 entry"; case ACPI_LPS0_EXIT: return "lps0 exit"; - case ACPI_LPS0_MS_ENTRY: - return "lps0 ms entry"; - case ACPI_LPS0_MS_EXIT: - return "lps0 ms exit"; + case ACPI_LPS0_SLEEP_ENTRY: + return "sleep entry"; + case ACPI_LPS0_SLEEP_EXIT: + return "sleep exit"; } } else { switch (state) { - case ACPI_LPS0_SCREEN_ON_AMD: - return "screen on"; - case ACPI_LPS0_SCREEN_OFF_AMD: - return "screen off"; + case ACPI_LPS0_DISPLAY_ON_AMD: + return "display on"; + case ACPI_LPS0_DISPLAY_OFF_AMD: + return "display off"; case ACPI_LPS0_ENTRY_AMD: return "lps0 entry"; case ACPI_LPS0_EXIT_AMD: @@ -383,7 +383,7 @@ static void acpi_sleep_run_lps0_dsm(unsigned int func, unsigned int func_mask, g lps0_dsm_state = func; if (pm_debug_messages_on) { acpi_handle_info(lps0_device_handle, - "%s transitioned to state %s\n", + "%s executed notification %s\n", out_obj ? "Successfully" : "Failed to", acpi_sleep_dsm_state_to_str(lps0_dsm_state)); } @@ -545,12 +545,12 @@ static int acpi_s2idle_prepare_late_lps0(void) /* Screen off */ if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_OFF_AMD : - ACPI_LPS0_SCREEN_OFF, + ACPI_LPS0_DISPLAY_OFF_AMD : + ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask, lps0_dsm_guid); if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_OFF, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* LPS0 entry */ @@ -560,7 +560,7 @@ static int acpi_s2idle_prepare_late_lps0(void) if (lps0_dsm_func_mask_microsoft > 0) { /* Modern Standby entry */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_ENTRY, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); @@ -613,18 +613,18 @@ static void acpi_s2idle_restore_early_lps0(void) acpi_sleep_run_lps0_dsm(ACPI_LPS0_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* Modern Standby exit */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_EXIT, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); } /* Screen on */ if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_ON, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_ON_AMD : - ACPI_LPS0_SCREEN_ON, + ACPI_LPS0_DISPLAY_ON_AMD : + ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask, lps0_dsm_guid); } -- 2.52.0
null
null
null
[RFC v1 2/8] acpi/x86: s2idle: Rename LPS0 constants so they mirror their function
Add a sysfs attribute to allow informing the kernel about the current standby state of the device depending on user involvement, those being: "active", "inactive", "sleep", and "resume" (in "sleep" but preparing for presenting to the user faster). Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> --- kernel/power/main.c | 84 ++++++++++++++++++++++++++++++++++++++++++++ kernel/power/power.h | 1 + 2 files changed, 85 insertions(+) diff --git a/kernel/power/main.c b/kernel/power/main.c index 03b2c5495c77..30494be41557 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c @@ -830,6 +830,89 @@ static ssize_t state_store(struct kobject *kobj, struct kobj_attribute *attr, power_attr(state); +#ifdef CONFIG_SUSPEND +/* + * standby - control system s2idle standby state. + * + * show() returns available standby states, which may be "active", "screen_off", + * "sleep" and "resume" (still in sleep but preparing to present to user). + * See Documentation/admin-guide/pm/standby-states.rst for a description of + * what they mean. + * + * store() accepts one of those strings and initiates a transition to that + * standby state. + * + * For backwards compatibility, when the system suspends, it first enters the + * state "sleep", regardless of what was written into store() and then during + * resume restores the previous value. + */ +static ssize_t standby_show(struct kobject *kobj, struct kobj_attribute *attr, + char *buf) +{ + unsigned int sleep_flags; + standby_state_t i, curr; + char *s = buf; + + sleep_flags = lock_system_sleep(); + pm_standby_refresh_states(); + curr = pm_standby_get_state(); + unlock_system_sleep(sleep_flags); + + if (curr < 0) + return -EBUSY; + + for (i = PM_STANDBY_MIN; i < PM_STANDBY_MAX; i++) + if (standby_states[i]) + s += sprintf(s, curr == i ? "[%s] " : "%s ", standby_states[i]); + + if (s != buf) + /* convert the last space to a newline */ + *(s - 1) = '\n'; + return (s - buf); +} + +static standby_state_t decode_standby_state(const char *buf, size_t n) +{ + standby_state_t state; + char *p; + int len; + + p = memchr(buf, '\n', n); + len = p ? p - buf : n; + + for (state = PM_STANDBY_MIN; state < PM_STANDBY_MAX; state++) { + const char *label = standby_states[state]; + + if (label && len == strlen(label) && !strncmp(buf, label, len)) + return state; + } + + return PM_STANDBY_MAX; +} + +static ssize_t standby_store(struct kobject *kobj, struct kobj_attribute *attr, + const char *buf, size_t n) +{ + unsigned int sleep_flags; + standby_state_t state; + int error; + + sleep_flags = lock_system_sleep(); + pm_standby_refresh_states(); + state = decode_standby_state(buf, n); + + if (state >= PM_STANDBY_MAX) + return -EINVAL; + + error = pm_standby_transition(state); + unlock_system_sleep(sleep_flags); + + return error ? error : n; +} + +power_attr(standby); +#endif + #ifdef CONFIG_PM_SLEEP /* * The 'wakeup_count' attribute, along with the functions defined in @@ -1084,6 +1167,7 @@ static struct attribute * g[] = { #ifdef CONFIG_SUSPEND &mem_sleep_attr.attr, &sync_on_suspend_attr.attr, + &standby_attr.attr, #endif #ifdef CONFIG_PM_AUTOSLEEP &autosleep_attr.attr, diff --git a/kernel/power/power.h b/kernel/power/power.h index 75b63843886e..2327a1ce2b05 100644 --- a/kernel/power/power.h +++ b/kernel/power/power.h @@ -216,6 +216,7 @@ extern void swsusp_show_speed(ktime_t, ktime_t, unsigned int, char *); extern const char * const pm_labels[]; extern const char *pm_states[]; extern const char *mem_sleep_states[]; +extern const char *standby_states[]; extern int suspend_devices_and_enter(suspend_state_t state); #else /* !CONFIG_SUSPEND */ -- 2.52.0
{ "author": "Antheas Kapenekakis <lkml@antheas.dev>", "date": "Fri, 26 Dec 2025 12:26:46 +0200", "is_openbsd": false, "thread_id": "CAGwozwHE4DVCh79-523V5=a_fqR0gXnnkorGCPEsgHBDLYPtxA@mail.gmail.com.mbox.gz" }
lkml_critique
lkml
The LPS0 3/4 constants are part of a firmware notification called "Display on/off", in which the device enters a "Screen Off" state. The LPS0 7/8 constants are part of a firmware notification in which a Windows modern standby computer enters a "sleep" state where the CPU may still be active and maintain the radios. However, currently, the values are named as "Screen on/off" and "MS entry/exit", where Modern Standby is abbreviated as "MS". Therefore, perform a minor rename so that the values match their function. Then, fix the debug message to say that it executes notifications instead of entering states as it is otherwise confusing. Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> --- drivers/acpi/x86/s2idle.c | 54 +++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c index 6d4d06236f61..1f13c8b0ef83 100644 --- a/drivers/acpi/x86/s2idle.c +++ b/drivers/acpi/x86/s2idle.c @@ -39,19 +39,19 @@ static const struct acpi_device_id lps0_device_ids[] = { #define ACPI_LPS0_DSM_UUID "c4eb40a0-6cd2-11e2-bcfd-0800200c9a66" #define ACPI_LPS0_GET_DEVICE_CONSTRAINTS 1 -#define ACPI_LPS0_SCREEN_OFF 3 -#define ACPI_LPS0_SCREEN_ON 4 +#define ACPI_LPS0_DISPLAY_OFF 3 +#define ACPI_LPS0_DISPLAY_ON 4 #define ACPI_LPS0_ENTRY 5 #define ACPI_LPS0_EXIT 6 -#define ACPI_LPS0_MS_ENTRY 7 -#define ACPI_LPS0_MS_EXIT 8 +#define ACPI_LPS0_SLEEP_ENTRY 7 +#define ACPI_LPS0_SLEEP_EXIT 8 /* AMD */ #define ACPI_LPS0_DSM_UUID_AMD "e3f32452-febc-43ce-9039-932122d37721" #define ACPI_LPS0_ENTRY_AMD 2 #define ACPI_LPS0_EXIT_AMD 3 -#define ACPI_LPS0_SCREEN_OFF_AMD 4 -#define ACPI_LPS0_SCREEN_ON_AMD 5 +#define ACPI_LPS0_DISPLAY_OFF_AMD 4 +#define ACPI_LPS0_DISPLAY_ON_AMD 5 static acpi_handle lps0_device_handle; static guid_t lps0_dsm_guid; @@ -340,25 +340,25 @@ static const char *acpi_sleep_dsm_state_to_str(unsigned int state) { if (lps0_dsm_func_mask_microsoft || !acpi_s2idle_vendor_amd()) { switch (state) { - case ACPI_LPS0_SCREEN_OFF: - return "screen off"; - case ACPI_LPS0_SCREEN_ON: - return "screen on"; + case ACPI_LPS0_DISPLAY_OFF: + return "display off"; + case ACPI_LPS0_DISPLAY_ON: + return "display on"; case ACPI_LPS0_ENTRY: return "lps0 entry"; case ACPI_LPS0_EXIT: return "lps0 exit"; - case ACPI_LPS0_MS_ENTRY: - return "lps0 ms entry"; - case ACPI_LPS0_MS_EXIT: - return "lps0 ms exit"; + case ACPI_LPS0_SLEEP_ENTRY: + return "sleep entry"; + case ACPI_LPS0_SLEEP_EXIT: + return "sleep exit"; } } else { switch (state) { - case ACPI_LPS0_SCREEN_ON_AMD: - return "screen on"; - case ACPI_LPS0_SCREEN_OFF_AMD: - return "screen off"; + case ACPI_LPS0_DISPLAY_ON_AMD: + return "display on"; + case ACPI_LPS0_DISPLAY_OFF_AMD: + return "display off"; case ACPI_LPS0_ENTRY_AMD: return "lps0 entry"; case ACPI_LPS0_EXIT_AMD: @@ -383,7 +383,7 @@ static void acpi_sleep_run_lps0_dsm(unsigned int func, unsigned int func_mask, g lps0_dsm_state = func; if (pm_debug_messages_on) { acpi_handle_info(lps0_device_handle, - "%s transitioned to state %s\n", + "%s executed notification %s\n", out_obj ? "Successfully" : "Failed to", acpi_sleep_dsm_state_to_str(lps0_dsm_state)); } @@ -545,12 +545,12 @@ static int acpi_s2idle_prepare_late_lps0(void) /* Screen off */ if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_OFF_AMD : - ACPI_LPS0_SCREEN_OFF, + ACPI_LPS0_DISPLAY_OFF_AMD : + ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask, lps0_dsm_guid); if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_OFF, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* LPS0 entry */ @@ -560,7 +560,7 @@ static int acpi_s2idle_prepare_late_lps0(void) if (lps0_dsm_func_mask_microsoft > 0) { /* Modern Standby entry */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_ENTRY, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); @@ -613,18 +613,18 @@ static void acpi_s2idle_restore_early_lps0(void) acpi_sleep_run_lps0_dsm(ACPI_LPS0_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* Modern Standby exit */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_EXIT, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); } /* Screen on */ if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_ON, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_ON_AMD : - ACPI_LPS0_SCREEN_ON, + ACPI_LPS0_DISPLAY_ON_AMD : + ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask, lps0_dsm_guid); } -- 2.52.0
null
null
null
[RFC v1 2/8] acpi/x86: s2idle: Rename LPS0 constants so they mirror their function
Implement the platform_s2idle_ops->get_standby_states() callback to query which modern standby states are supported by the platform based on the dsm func masks and expose those to the kernel as runtime standby states. Union the vendor specific AMD/Intel masks with the ones from Microsoft as some laptops implement both of them. Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> --- drivers/acpi/x86/s2idle.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c index 1f13c8b0ef83..08fa7841a484 100644 --- a/drivers/acpi/x86/s2idle.c +++ b/drivers/acpi/x86/s2idle.c @@ -513,6 +513,40 @@ static struct acpi_scan_handler lps0_handler = { .attach = lps0_device_attach, }; +static u8 acpi_s2idle_get_standby_states(void) +{ + u8 states = 0; + + if (!lps0_device_handle || sleep_no_lps0) + return 0; + + if (lps0_dsm_func_mask_microsoft > 0) { + states |= BIT(PM_STANDBY_ACTIVE); + if (lps0_dsm_func_mask_microsoft & + (1 << ACPI_LPS0_DISPLAY_OFF | 1 << ACPI_LPS0_DISPLAY_ON)) + states |= BIT(PM_STANDBY_INACTIVE); + if (lps0_dsm_func_mask_microsoft & + (1 << ACPI_LPS0_SLEEP_ENTRY | 1 << ACPI_LPS0_SLEEP_EXIT)) + states |= BIT(PM_STANDBY_SLEEP); + } + + if (lps0_dsm_func_mask > 0) { + states |= BIT(PM_STANDBY_ACTIVE); + if (acpi_s2idle_vendor_amd()) { + if (lps0_dsm_func_mask & + (1 << ACPI_LPS0_DISPLAY_OFF_AMD | + 1 << ACPI_LPS0_DISPLAY_ON_AMD)) + states |= BIT(PM_STANDBY_INACTIVE); + } else { + if (lps0_dsm_func_mask & (1 << ACPI_LPS0_DISPLAY_OFF | + 1 << ACPI_LPS0_DISPLAY_ON)) + states |= BIT(PM_STANDBY_INACTIVE); + } + } + + return states; +} + static int acpi_s2idle_begin_lps0(void) { if (pm_debug_messages_on && !lpi_constraints_table) { @@ -629,6 +663,7 @@ static void acpi_s2idle_restore_early_lps0(void) } static const struct platform_s2idle_ops acpi_s2idle_ops_lps0 = { + .get_standby_states = acpi_s2idle_get_standby_states, .begin = acpi_s2idle_begin_lps0, .prepare = acpi_s2idle_prepare, .prepare_late = acpi_s2idle_prepare_late_lps0, -- 2.52.0
{ "author": "Antheas Kapenekakis <lkml@antheas.dev>", "date": "Fri, 26 Dec 2025 12:26:42 +0200", "is_openbsd": false, "thread_id": "CAGwozwHE4DVCh79-523V5=a_fqR0gXnnkorGCPEsgHBDLYPtxA@mail.gmail.com.mbox.gz" }
lkml_critique
lkml
The LPS0 3/4 constants are part of a firmware notification called "Display on/off", in which the device enters a "Screen Off" state. The LPS0 7/8 constants are part of a firmware notification in which a Windows modern standby computer enters a "sleep" state where the CPU may still be active and maintain the radios. However, currently, the values are named as "Screen on/off" and "MS entry/exit", where Modern Standby is abbreviated as "MS". Therefore, perform a minor rename so that the values match their function. Then, fix the debug message to say that it executes notifications instead of entering states as it is otherwise confusing. Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> --- drivers/acpi/x86/s2idle.c | 54 +++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c index 6d4d06236f61..1f13c8b0ef83 100644 --- a/drivers/acpi/x86/s2idle.c +++ b/drivers/acpi/x86/s2idle.c @@ -39,19 +39,19 @@ static const struct acpi_device_id lps0_device_ids[] = { #define ACPI_LPS0_DSM_UUID "c4eb40a0-6cd2-11e2-bcfd-0800200c9a66" #define ACPI_LPS0_GET_DEVICE_CONSTRAINTS 1 -#define ACPI_LPS0_SCREEN_OFF 3 -#define ACPI_LPS0_SCREEN_ON 4 +#define ACPI_LPS0_DISPLAY_OFF 3 +#define ACPI_LPS0_DISPLAY_ON 4 #define ACPI_LPS0_ENTRY 5 #define ACPI_LPS0_EXIT 6 -#define ACPI_LPS0_MS_ENTRY 7 -#define ACPI_LPS0_MS_EXIT 8 +#define ACPI_LPS0_SLEEP_ENTRY 7 +#define ACPI_LPS0_SLEEP_EXIT 8 /* AMD */ #define ACPI_LPS0_DSM_UUID_AMD "e3f32452-febc-43ce-9039-932122d37721" #define ACPI_LPS0_ENTRY_AMD 2 #define ACPI_LPS0_EXIT_AMD 3 -#define ACPI_LPS0_SCREEN_OFF_AMD 4 -#define ACPI_LPS0_SCREEN_ON_AMD 5 +#define ACPI_LPS0_DISPLAY_OFF_AMD 4 +#define ACPI_LPS0_DISPLAY_ON_AMD 5 static acpi_handle lps0_device_handle; static guid_t lps0_dsm_guid; @@ -340,25 +340,25 @@ static const char *acpi_sleep_dsm_state_to_str(unsigned int state) { if (lps0_dsm_func_mask_microsoft || !acpi_s2idle_vendor_amd()) { switch (state) { - case ACPI_LPS0_SCREEN_OFF: - return "screen off"; - case ACPI_LPS0_SCREEN_ON: - return "screen on"; + case ACPI_LPS0_DISPLAY_OFF: + return "display off"; + case ACPI_LPS0_DISPLAY_ON: + return "display on"; case ACPI_LPS0_ENTRY: return "lps0 entry"; case ACPI_LPS0_EXIT: return "lps0 exit"; - case ACPI_LPS0_MS_ENTRY: - return "lps0 ms entry"; - case ACPI_LPS0_MS_EXIT: - return "lps0 ms exit"; + case ACPI_LPS0_SLEEP_ENTRY: + return "sleep entry"; + case ACPI_LPS0_SLEEP_EXIT: + return "sleep exit"; } } else { switch (state) { - case ACPI_LPS0_SCREEN_ON_AMD: - return "screen on"; - case ACPI_LPS0_SCREEN_OFF_AMD: - return "screen off"; + case ACPI_LPS0_DISPLAY_ON_AMD: + return "display on"; + case ACPI_LPS0_DISPLAY_OFF_AMD: + return "display off"; case ACPI_LPS0_ENTRY_AMD: return "lps0 entry"; case ACPI_LPS0_EXIT_AMD: @@ -383,7 +383,7 @@ static void acpi_sleep_run_lps0_dsm(unsigned int func, unsigned int func_mask, g lps0_dsm_state = func; if (pm_debug_messages_on) { acpi_handle_info(lps0_device_handle, - "%s transitioned to state %s\n", + "%s executed notification %s\n", out_obj ? "Successfully" : "Failed to", acpi_sleep_dsm_state_to_str(lps0_dsm_state)); } @@ -545,12 +545,12 @@ static int acpi_s2idle_prepare_late_lps0(void) /* Screen off */ if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_OFF_AMD : - ACPI_LPS0_SCREEN_OFF, + ACPI_LPS0_DISPLAY_OFF_AMD : + ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask, lps0_dsm_guid); if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_OFF, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* LPS0 entry */ @@ -560,7 +560,7 @@ static int acpi_s2idle_prepare_late_lps0(void) if (lps0_dsm_func_mask_microsoft > 0) { /* Modern Standby entry */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_ENTRY, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); @@ -613,18 +613,18 @@ static void acpi_s2idle_restore_early_lps0(void) acpi_sleep_run_lps0_dsm(ACPI_LPS0_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* Modern Standby exit */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_EXIT, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); } /* Screen on */ if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_ON, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_ON_AMD : - ACPI_LPS0_SCREEN_ON, + ACPI_LPS0_DISPLAY_ON_AMD : + ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask, lps0_dsm_guid); } -- 2.52.0
null
null
null
[RFC v1 2/8] acpi/x86: s2idle: Rename LPS0 constants so they mirror their function
This series introduces a new runtime standby ABI to allow firing Modern Standby firmware notifications that modify hardware appearance from userspace without suspending the kernel. This allows userspace to set the inactivity state of the device so that it looks like it is asleep (e.g., flashing the power button) while still being able to perform basic computations. It is a more fleshed out implementation of [1] and a rewritten version of [2] The first part of this series implements the plumbing that moves the existing DSMs from being called at the end of the suspend sequence to the beginning, where they are called through a transition function. Then, the last patch exposes this transition function through /sys/power/standby to allow userspace to interact with it. In this way, the core series can be tested while not exposing the new ABI to userspace until ensured to be stable. For more information, see the first patch in this series with documentation. Because this series is a major rewrite, I have not tested it much and there might be minor logic issues. In addition, due to confusion with the "screen off" terminology, I opted to rename the "screen off" state to "inactive". This way, it is applicable to devices that do not have screens. To test this series, it is recommended to enable logs with: sudo bash -c "cat > /sys/kernel/debug/dynamic_debug/control" << EOF file drivers/acpi/x86/s2idle.c +p file kernel/power/suspend.c +p EOF echo 1 | sudo tee /sys/power/pm_debug_messages Here are some commands afterwards: echo "active" | sudo tee /sys/power/standby; cat /sys/power/standby echo "inactive" | sudo tee /sys/power/standby; cat /sys/power/standby echo "sleep" | sudo tee /sys/power/standby; cat /sys/power/standby Merry Christmas PS. this series is made on v6.19-rc2, but you should probably test it on 6.18. My Wifi does not work, and neither does booting with a dock connected. Do not test it on an ROG Ally, let's get the basics first right :) The shims in asus-wmi/hid-asus should be removed once this series is merged otherwise they will conflict. [1] https://lore.kernel.org/lkml/20251202043416.2310677-1-dmitry.osipenko@collabora.com/ [2] https://lore.kernel.org/all/20241121172239.119590-1-lkml@antheas.dev/ Antheas Kapenekakis (8): Documentation: PM: Add documentation for Runtime Standby States acpi/x86: s2idle: Rename LPS0 constants so they mirror their function acpi/x86: s2idle: add runtime standby transition function acpi/x86: s2idle: add support for querying runtime standby state support acpi/x86: s2idle: move DSM notifications to do_notification callback acpi/x86: s2idle: implement turn on display DSM as resume notification PM: hibernate: Enter s2idle sleep state before hibernation PM: standby: Add sysfs attribute for runtime standby transitions Documentation/ABI/testing/sysfs-power | 20 ++ .../admin-guide/pm/standby-states.rst | 100 ++++++++++ Documentation/admin-guide/pm/system-wide.rst | 1 + drivers/acpi/x86/s2idle.c | 176 ++++++++++++------ include/linux/suspend.h | 26 +++ kernel/power/hibernate.c | 29 ++- kernel/power/main.c | 84 +++++++++ kernel/power/power.h | 1 + kernel/power/suspend.c | 153 +++++++++++++++ 9 files changed, 532 insertions(+), 58 deletions(-) create mode 100644 Documentation/admin-guide/pm/standby-states.rst base-commit: 9448598b22c50c8a5bb77a9103e2d49f134c9578 -- 2.52.0
{ "author": "Antheas Kapenekakis <lkml@antheas.dev>", "date": "Fri, 26 Dec 2025 12:26:38 +0200", "is_openbsd": false, "thread_id": "CAGwozwHE4DVCh79-523V5=a_fqR0gXnnkorGCPEsgHBDLYPtxA@mail.gmail.com.mbox.gz" }
lkml_critique
lkml
The LPS0 3/4 constants are part of a firmware notification called "Display on/off", in which the device enters a "Screen Off" state. The LPS0 7/8 constants are part of a firmware notification in which a Windows modern standby computer enters a "sleep" state where the CPU may still be active and maintain the radios. However, currently, the values are named as "Screen on/off" and "MS entry/exit", where Modern Standby is abbreviated as "MS". Therefore, perform a minor rename so that the values match their function. Then, fix the debug message to say that it executes notifications instead of entering states as it is otherwise confusing. Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> --- drivers/acpi/x86/s2idle.c | 54 +++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c index 6d4d06236f61..1f13c8b0ef83 100644 --- a/drivers/acpi/x86/s2idle.c +++ b/drivers/acpi/x86/s2idle.c @@ -39,19 +39,19 @@ static const struct acpi_device_id lps0_device_ids[] = { #define ACPI_LPS0_DSM_UUID "c4eb40a0-6cd2-11e2-bcfd-0800200c9a66" #define ACPI_LPS0_GET_DEVICE_CONSTRAINTS 1 -#define ACPI_LPS0_SCREEN_OFF 3 -#define ACPI_LPS0_SCREEN_ON 4 +#define ACPI_LPS0_DISPLAY_OFF 3 +#define ACPI_LPS0_DISPLAY_ON 4 #define ACPI_LPS0_ENTRY 5 #define ACPI_LPS0_EXIT 6 -#define ACPI_LPS0_MS_ENTRY 7 -#define ACPI_LPS0_MS_EXIT 8 +#define ACPI_LPS0_SLEEP_ENTRY 7 +#define ACPI_LPS0_SLEEP_EXIT 8 /* AMD */ #define ACPI_LPS0_DSM_UUID_AMD "e3f32452-febc-43ce-9039-932122d37721" #define ACPI_LPS0_ENTRY_AMD 2 #define ACPI_LPS0_EXIT_AMD 3 -#define ACPI_LPS0_SCREEN_OFF_AMD 4 -#define ACPI_LPS0_SCREEN_ON_AMD 5 +#define ACPI_LPS0_DISPLAY_OFF_AMD 4 +#define ACPI_LPS0_DISPLAY_ON_AMD 5 static acpi_handle lps0_device_handle; static guid_t lps0_dsm_guid; @@ -340,25 +340,25 @@ static const char *acpi_sleep_dsm_state_to_str(unsigned int state) { if (lps0_dsm_func_mask_microsoft || !acpi_s2idle_vendor_amd()) { switch (state) { - case ACPI_LPS0_SCREEN_OFF: - return "screen off"; - case ACPI_LPS0_SCREEN_ON: - return "screen on"; + case ACPI_LPS0_DISPLAY_OFF: + return "display off"; + case ACPI_LPS0_DISPLAY_ON: + return "display on"; case ACPI_LPS0_ENTRY: return "lps0 entry"; case ACPI_LPS0_EXIT: return "lps0 exit"; - case ACPI_LPS0_MS_ENTRY: - return "lps0 ms entry"; - case ACPI_LPS0_MS_EXIT: - return "lps0 ms exit"; + case ACPI_LPS0_SLEEP_ENTRY: + return "sleep entry"; + case ACPI_LPS0_SLEEP_EXIT: + return "sleep exit"; } } else { switch (state) { - case ACPI_LPS0_SCREEN_ON_AMD: - return "screen on"; - case ACPI_LPS0_SCREEN_OFF_AMD: - return "screen off"; + case ACPI_LPS0_DISPLAY_ON_AMD: + return "display on"; + case ACPI_LPS0_DISPLAY_OFF_AMD: + return "display off"; case ACPI_LPS0_ENTRY_AMD: return "lps0 entry"; case ACPI_LPS0_EXIT_AMD: @@ -383,7 +383,7 @@ static void acpi_sleep_run_lps0_dsm(unsigned int func, unsigned int func_mask, g lps0_dsm_state = func; if (pm_debug_messages_on) { acpi_handle_info(lps0_device_handle, - "%s transitioned to state %s\n", + "%s executed notification %s\n", out_obj ? "Successfully" : "Failed to", acpi_sleep_dsm_state_to_str(lps0_dsm_state)); } @@ -545,12 +545,12 @@ static int acpi_s2idle_prepare_late_lps0(void) /* Screen off */ if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_OFF_AMD : - ACPI_LPS0_SCREEN_OFF, + ACPI_LPS0_DISPLAY_OFF_AMD : + ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask, lps0_dsm_guid); if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_OFF, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* LPS0 entry */ @@ -560,7 +560,7 @@ static int acpi_s2idle_prepare_late_lps0(void) if (lps0_dsm_func_mask_microsoft > 0) { /* Modern Standby entry */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_ENTRY, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); @@ -613,18 +613,18 @@ static void acpi_s2idle_restore_early_lps0(void) acpi_sleep_run_lps0_dsm(ACPI_LPS0_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* Modern Standby exit */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_EXIT, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); } /* Screen on */ if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_ON, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_ON_AMD : - ACPI_LPS0_SCREEN_ON, + ACPI_LPS0_DISPLAY_ON_AMD : + ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask, lps0_dsm_guid); } -- 2.52.0
null
null
null
[RFC v1 2/8] acpi/x86: s2idle: Rename LPS0 constants so they mirror their function
Add pm_standby_transition() to allow transitioning between standby states during runtime and implement it as part of the s2idle suspend sequence. Update the platform_s2idle_ops structure to include a function to perform firmware notifications and a function to get supported states Standby states are a way for userspace to indicate the interactivity of the system at the current moment. Active means that the user is interacting with the device, inactive that a user is not actively interacting with the device, and sleep that the system should appear as if it is suspended to the user, but may still perform small background tasks. For modern ACPI s0ix laptops, the inactive state turns off the backlight and the sleep state may limit the thermal envelope of the device. Either may pulse the power light. This patch introduces an ACPI agnostic structure to handle these transitions, so they may implemented by other platforms, and does not implement them for ACPI. Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> --- include/linux/suspend.h | 26 +++++++ kernel/power/suspend.c | 153 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 179 insertions(+) diff --git a/include/linux/suspend.h b/include/linux/suspend.h index b02876f1ae38..916dee124758 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -40,6 +40,25 @@ typedef int __bitwise suspend_state_t; #define PM_SUSPEND_MIN PM_SUSPEND_TO_IDLE #define PM_SUSPEND_MAX ((__force suspend_state_t) 4) +typedef int __bitwise standby_state_t; + +#define PM_STANDBY_ACTIVE ((__force standby_state_t) 0) +#define PM_STANDBY_INACTIVE ((__force standby_state_t) 1) +#define PM_STANDBY_SLEEP ((__force standby_state_t) 2) +#define PM_STANDBY_RESUME ((__force standby_state_t) 3) +#define PM_STANDBY_MIN PM_STANDBY_ACTIVE +#define PM_STANDBY_MAX ((__force standby_state_t) 4) + +typedef int __bitwise standby_notification_t; + +#define PM_SN_INACTIVE_ENTRY ((__force standby_notification_t) 0) +#define PM_SN_INACTIVE_EXIT ((__force standby_notification_t) 1) +#define PM_SN_SLEEP_ENTRY ((__force standby_notification_t) 2) +#define PM_SN_SLEEP_EXIT ((__force standby_notification_t) 3) +#define PM_SN_RESUME ((__force standby_notification_t) 4) +#define PM_SN_MIN PM_STANDBY_DISPLAY_OFF +#define PM_SN_MAX ((__force standby_notification_t) 5) + /** * struct platform_suspend_ops - Callbacks for managing platform dependent * system sleep states. @@ -132,6 +151,8 @@ struct platform_suspend_ops { }; struct platform_s2idle_ops { + u8 (*get_standby_states)(void); + int (*do_notification)(standby_notification_t state); int (*begin)(void); int (*prepare)(void); int (*prepare_late)(void); @@ -276,6 +297,11 @@ extern void arch_suspend_enable_irqs(void); extern int pm_suspend(suspend_state_t state); extern bool sync_on_suspend_enabled; + +extern void pm_standby_refresh_states(void); +extern int pm_standby_transition(standby_state_t state); +extern void pm_standby_set_state(standby_state_t state); +extern int pm_standby_get_state(void); #else /* !CONFIG_SUSPEND */ #define suspend_valid_only_mem NULL diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c index 2da4482bb6eb..ede1ba483fa5 100644 --- a/kernel/power/suspend.c +++ b/kernel/power/suspend.c @@ -46,12 +46,21 @@ static const char * const mem_sleep_labels[] = { [PM_SUSPEND_MEM] = "deep", }; const char *mem_sleep_states[PM_SUSPEND_MAX]; +static const char * const standby_labels[] = { + [PM_STANDBY_ACTIVE] = "active", + [PM_STANDBY_INACTIVE] = "inactive", + [PM_STANDBY_SLEEP] = "sleep", + [PM_STANDBY_RESUME] = "resume", +}; +const char *standby_states[PM_STANDBY_MAX]; suspend_state_t mem_sleep_current = PM_SUSPEND_TO_IDLE; suspend_state_t mem_sleep_default = PM_SUSPEND_MAX; suspend_state_t pm_suspend_target_state; EXPORT_SYMBOL_GPL(pm_suspend_target_state); +standby_state_t standby_current = PM_STANDBY_ACTIVE; + unsigned int pm_suspend_global_flags; EXPORT_SYMBOL_GPL(pm_suspend_global_flags); @@ -195,6 +204,9 @@ void __init pm_states_init(void) * initialize mem_sleep_states[] accordingly here. */ mem_sleep_states[PM_SUSPEND_TO_IDLE] = mem_sleep_labels[PM_SUSPEND_TO_IDLE]; + + /* Always support the active runtime standby state. */ + standby_states[PM_STANDBY_ACTIVE] = standby_labels[PM_STANDBY_ACTIVE]; } static int __init mem_sleep_default_setup(char *str) @@ -334,6 +346,141 @@ static bool platform_suspend_again(suspend_state_t state) suspend_ops->suspend_again() : false; } +static int platform_standby_notify(standby_notification_t state) +{ + return s2idle_ops && s2idle_ops->do_notification ? + s2idle_ops->do_notification(state) : + 0; +} + +/** + * pm_standby_refresh_states - Refresh the supported runtime standby states + */ +void pm_standby_refresh_states(void) +{ + u8 standby_support = s2idle_ops && s2idle_ops->get_standby_states ? + s2idle_ops->get_standby_states() : + 0; + + standby_states[PM_STANDBY_INACTIVE] = + standby_support & BIT(PM_STANDBY_INACTIVE) ? + standby_labels[PM_STANDBY_INACTIVE] : + NULL; + standby_states[PM_STANDBY_SLEEP] = + standby_support & BIT(PM_STANDBY_SLEEP) ? + standby_labels[PM_STANDBY_SLEEP] : + NULL; + standby_states[PM_STANDBY_RESUME] = + standby_support & BIT(PM_STANDBY_RESUME) ? + standby_labels[PM_STANDBY_RESUME] : + NULL; +} +EXPORT_SYMBOL_GPL(pm_standby_refresh_states); + +/** + * pm_standby_transition - Transition between standby states + * + * Configure the runtime standby state of the system. Entering these states + * may change the appearance of the system (e.g., keyboard backlight) or limit + * the thermal envelope of the system (e.g., PLx to 5W). + * + * Returns an error if the transition fails. The function does not rollback. + */ +int pm_standby_transition(standby_state_t state) +{ + int error; + + if (state == standby_current) + return 0; + if (state > PM_STANDBY_MAX) + return -EINVAL; + + pm_standby_refresh_states(); + + pm_pr_dbg("Transitioning from standby state %s to %s\n", + standby_states[standby_current], standby_states[state]); + + /* Resume can only be entered if we are on the sleep state. */ + if (state == PM_STANDBY_RESUME) { + if (standby_current != PM_STANDBY_SLEEP) + return -EINVAL; + standby_current = PM_STANDBY_RESUME; + return platform_standby_notify(PM_SN_RESUME); + } + + /* + * The system should not be able to re-enter Sleep from resume as it + * is undefined behavior. As part of setting the state to "Resume", + * userspace promised a transition to "Inactive" or "Active". + */ + if (standby_current == PM_STANDBY_RESUME && state == PM_STANDBY_SLEEP) + return -EINVAL; + + /* Resume is the Sleep state logic-wise. */ + if (standby_current == PM_STANDBY_RESUME) + standby_current = PM_STANDBY_SLEEP; + + if (standby_current < state) { + for (; standby_current < state; standby_current++) { + switch (standby_current + 1) { + case PM_STANDBY_INACTIVE: + error = platform_standby_notify(PM_SN_INACTIVE_ENTRY); + break; + case PM_STANDBY_SLEEP: + error = platform_standby_notify(PM_SN_SLEEP_ENTRY); + break; + } + + if (error) { + /* Rollback to previous valid state */ + while (standby_current > PM_STANDBY_ACTIVE && + !standby_states[standby_current]) + standby_current--; + return error; + } + } + } else if (standby_current > state) { + for (; standby_current > state; standby_current--) { + switch (standby_current) { + case PM_STANDBY_SLEEP: + error = platform_standby_notify(PM_SN_SLEEP_EXIT); + break; + case PM_STANDBY_INACTIVE: + error = platform_standby_notify(PM_SN_INACTIVE_EXIT); + break; + } + + if (error) { + /* Rollback to previous valid state */ + while (standby_current < PM_STANDBY_SLEEP && + !standby_states[standby_current]) + standby_current++; + return error; + } + } + } + + return 0; +} + +/** + * pm_standby_set_state - Set the current standby state and skip the transition + */ +void pm_standby_set_state(standby_state_t state) +{ + standby_current = state; +} +EXPORT_SYMBOL_GPL(pm_standby_set_state); + +/** + * pm_standby_get_state - Returns the current standby state + */ +int pm_standby_get_state(void) +{ + return standby_current; +} +EXPORT_SYMBOL_GPL(pm_standby_get_state); + #ifdef CONFIG_PM_DEBUG static unsigned int pm_test_delay = 5; module_param(pm_test_delay, uint, 0644); @@ -572,6 +719,7 @@ static void suspend_finish(void) */ static int enter_state(suspend_state_t state) { + standby_state_t standby_prior; int error; trace_suspend_resume(TPS("suspend_enter"), state, true); @@ -588,6 +736,9 @@ static int enter_state(suspend_state_t state) if (!mutex_trylock(&system_transition_mutex)) return -EBUSY; + standby_prior = standby_current; + pm_standby_transition(PM_STANDBY_SLEEP); + if (state == PM_SUSPEND_TO_IDLE) s2idle_begin(); @@ -619,6 +770,8 @@ static int enter_state(suspend_state_t state) pm_pr_dbg("Finishing wakeup.\n"); suspend_finish(); Unlock: + pm_standby_transition(standby_prior); + mutex_unlock(&system_transition_mutex); return error; } -- 2.52.0
{ "author": "Antheas Kapenekakis <lkml@antheas.dev>", "date": "Fri, 26 Dec 2025 12:26:41 +0200", "is_openbsd": false, "thread_id": "CAGwozwHE4DVCh79-523V5=a_fqR0gXnnkorGCPEsgHBDLYPtxA@mail.gmail.com.mbox.gz" }
lkml_critique
lkml
The LPS0 3/4 constants are part of a firmware notification called "Display on/off", in which the device enters a "Screen Off" state. The LPS0 7/8 constants are part of a firmware notification in which a Windows modern standby computer enters a "sleep" state where the CPU may still be active and maintain the radios. However, currently, the values are named as "Screen on/off" and "MS entry/exit", where Modern Standby is abbreviated as "MS". Therefore, perform a minor rename so that the values match their function. Then, fix the debug message to say that it executes notifications instead of entering states as it is otherwise confusing. Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> --- drivers/acpi/x86/s2idle.c | 54 +++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c index 6d4d06236f61..1f13c8b0ef83 100644 --- a/drivers/acpi/x86/s2idle.c +++ b/drivers/acpi/x86/s2idle.c @@ -39,19 +39,19 @@ static const struct acpi_device_id lps0_device_ids[] = { #define ACPI_LPS0_DSM_UUID "c4eb40a0-6cd2-11e2-bcfd-0800200c9a66" #define ACPI_LPS0_GET_DEVICE_CONSTRAINTS 1 -#define ACPI_LPS0_SCREEN_OFF 3 -#define ACPI_LPS0_SCREEN_ON 4 +#define ACPI_LPS0_DISPLAY_OFF 3 +#define ACPI_LPS0_DISPLAY_ON 4 #define ACPI_LPS0_ENTRY 5 #define ACPI_LPS0_EXIT 6 -#define ACPI_LPS0_MS_ENTRY 7 -#define ACPI_LPS0_MS_EXIT 8 +#define ACPI_LPS0_SLEEP_ENTRY 7 +#define ACPI_LPS0_SLEEP_EXIT 8 /* AMD */ #define ACPI_LPS0_DSM_UUID_AMD "e3f32452-febc-43ce-9039-932122d37721" #define ACPI_LPS0_ENTRY_AMD 2 #define ACPI_LPS0_EXIT_AMD 3 -#define ACPI_LPS0_SCREEN_OFF_AMD 4 -#define ACPI_LPS0_SCREEN_ON_AMD 5 +#define ACPI_LPS0_DISPLAY_OFF_AMD 4 +#define ACPI_LPS0_DISPLAY_ON_AMD 5 static acpi_handle lps0_device_handle; static guid_t lps0_dsm_guid; @@ -340,25 +340,25 @@ static const char *acpi_sleep_dsm_state_to_str(unsigned int state) { if (lps0_dsm_func_mask_microsoft || !acpi_s2idle_vendor_amd()) { switch (state) { - case ACPI_LPS0_SCREEN_OFF: - return "screen off"; - case ACPI_LPS0_SCREEN_ON: - return "screen on"; + case ACPI_LPS0_DISPLAY_OFF: + return "display off"; + case ACPI_LPS0_DISPLAY_ON: + return "display on"; case ACPI_LPS0_ENTRY: return "lps0 entry"; case ACPI_LPS0_EXIT: return "lps0 exit"; - case ACPI_LPS0_MS_ENTRY: - return "lps0 ms entry"; - case ACPI_LPS0_MS_EXIT: - return "lps0 ms exit"; + case ACPI_LPS0_SLEEP_ENTRY: + return "sleep entry"; + case ACPI_LPS0_SLEEP_EXIT: + return "sleep exit"; } } else { switch (state) { - case ACPI_LPS0_SCREEN_ON_AMD: - return "screen on"; - case ACPI_LPS0_SCREEN_OFF_AMD: - return "screen off"; + case ACPI_LPS0_DISPLAY_ON_AMD: + return "display on"; + case ACPI_LPS0_DISPLAY_OFF_AMD: + return "display off"; case ACPI_LPS0_ENTRY_AMD: return "lps0 entry"; case ACPI_LPS0_EXIT_AMD: @@ -383,7 +383,7 @@ static void acpi_sleep_run_lps0_dsm(unsigned int func, unsigned int func_mask, g lps0_dsm_state = func; if (pm_debug_messages_on) { acpi_handle_info(lps0_device_handle, - "%s transitioned to state %s\n", + "%s executed notification %s\n", out_obj ? "Successfully" : "Failed to", acpi_sleep_dsm_state_to_str(lps0_dsm_state)); } @@ -545,12 +545,12 @@ static int acpi_s2idle_prepare_late_lps0(void) /* Screen off */ if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_OFF_AMD : - ACPI_LPS0_SCREEN_OFF, + ACPI_LPS0_DISPLAY_OFF_AMD : + ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask, lps0_dsm_guid); if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_OFF, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* LPS0 entry */ @@ -560,7 +560,7 @@ static int acpi_s2idle_prepare_late_lps0(void) if (lps0_dsm_func_mask_microsoft > 0) { /* Modern Standby entry */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_ENTRY, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); @@ -613,18 +613,18 @@ static void acpi_s2idle_restore_early_lps0(void) acpi_sleep_run_lps0_dsm(ACPI_LPS0_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* Modern Standby exit */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_EXIT, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); } /* Screen on */ if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_ON, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_ON_AMD : - ACPI_LPS0_SCREEN_ON, + ACPI_LPS0_DISPLAY_ON_AMD : + ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask, lps0_dsm_guid); } -- 2.52.0
null
null
null
[RFC v1 2/8] acpi/x86: s2idle: Rename LPS0 constants so they mirror their function
Currently, the DSM Sleep Entry/Exit/Display On/Off notifications fire during the suspend sequence. Move them to the new do_notification callback so they can be called during runtime as well. The kernel will still ensure that they are called during s2idle without userspace involvement. Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> --- drivers/acpi/x86/s2idle.c | 87 +++++++++++++++++++++++---------------- 1 file changed, 52 insertions(+), 35 deletions(-) diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c index 08fa7841a484..7693162c68fd 100644 --- a/drivers/acpi/x86/s2idle.c +++ b/drivers/acpi/x86/s2idle.c @@ -547,6 +547,53 @@ static u8 acpi_s2idle_get_standby_states(void) return states; } +static int acpi_s2idle_do_notification(standby_notification_t state) +{ + switch ((__force unsigned int)state) { + case PM_SN_INACTIVE_ENTRY: + if (lps0_dsm_func_mask > 0) + acpi_sleep_run_lps0_dsm( + acpi_s2idle_vendor_amd() ? + ACPI_LPS0_DISPLAY_OFF_AMD : + ACPI_LPS0_DISPLAY_OFF, + lps0_dsm_func_mask, lps0_dsm_guid); + + if (lps0_dsm_func_mask_microsoft > 0) + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_OFF, + lps0_dsm_func_mask_microsoft, + lps0_dsm_guid_microsoft); + break; + case PM_SN_INACTIVE_EXIT: + if (lps0_dsm_func_mask > 0) + acpi_sleep_run_lps0_dsm( + acpi_s2idle_vendor_amd() ? + ACPI_LPS0_DISPLAY_ON_AMD : + ACPI_LPS0_DISPLAY_ON, + lps0_dsm_func_mask, lps0_dsm_guid); + if (lps0_dsm_func_mask_microsoft > 0) + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_ON, + lps0_dsm_func_mask_microsoft, + lps0_dsm_guid_microsoft); + break; + case PM_SN_SLEEP_ENTRY: + if (lps0_dsm_func_mask_microsoft > 0) + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_ENTRY, + lps0_dsm_func_mask_microsoft, + lps0_dsm_guid_microsoft); + break; + case PM_SN_SLEEP_EXIT: + if (lps0_dsm_func_mask_microsoft > 0) + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_EXIT, + lps0_dsm_func_mask_microsoft, + lps0_dsm_guid_microsoft); + break; + default: + return -EINVAL; + } + + return 0; +} + static int acpi_s2idle_begin_lps0(void) { if (pm_debug_messages_on && !lpi_constraints_table) { @@ -576,33 +623,16 @@ static int acpi_s2idle_prepare_late_lps0(void) if (pm_debug_messages_on) lpi_check_constraints(); - /* Screen off */ + /* LPS0 entry */ if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_DISPLAY_OFF_AMD : - ACPI_LPS0_DISPLAY_OFF, + ACPI_LPS0_ENTRY_AMD : + ACPI_LPS0_ENTRY, lps0_dsm_func_mask, lps0_dsm_guid); if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_OFF, - lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); - - /* LPS0 entry */ - if (lps0_dsm_func_mask > 0 && acpi_s2idle_vendor_amd()) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY_AMD, - lps0_dsm_func_mask, lps0_dsm_guid); - - if (lps0_dsm_func_mask_microsoft > 0) { - /* Modern Standby entry */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_ENTRY, - lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); - } - - if (lps0_dsm_func_mask > 0 && !acpi_s2idle_vendor_amd()) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY, - lps0_dsm_func_mask, lps0_dsm_guid); list_for_each_entry(handler, &lps0_s2idle_devops_head, list_node) { if (handler->prepare) @@ -643,27 +673,14 @@ static void acpi_s2idle_restore_early_lps0(void) ACPI_LPS0_EXIT, lps0_dsm_func_mask, lps0_dsm_guid); - if (lps0_dsm_func_mask_microsoft > 0) { - acpi_sleep_run_lps0_dsm(ACPI_LPS0_EXIT, - lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); - /* Modern Standby exit */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_EXIT, - lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); - } - - /* Screen on */ if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_ON, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); - if (lps0_dsm_func_mask > 0) - acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_DISPLAY_ON_AMD : - ACPI_LPS0_DISPLAY_ON, - lps0_dsm_func_mask, lps0_dsm_guid); } static const struct platform_s2idle_ops acpi_s2idle_ops_lps0 = { .get_standby_states = acpi_s2idle_get_standby_states, + .do_notification = acpi_s2idle_do_notification, .begin = acpi_s2idle_begin_lps0, .prepare = acpi_s2idle_prepare, .prepare_late = acpi_s2idle_prepare_late_lps0, -- 2.52.0
{ "author": "Antheas Kapenekakis <lkml@antheas.dev>", "date": "Fri, 26 Dec 2025 12:26:43 +0200", "is_openbsd": false, "thread_id": "CAGwozwHE4DVCh79-523V5=a_fqR0gXnnkorGCPEsgHBDLYPtxA@mail.gmail.com.mbox.gz" }
lkml_critique
lkml
The LPS0 3/4 constants are part of a firmware notification called "Display on/off", in which the device enters a "Screen Off" state. The LPS0 7/8 constants are part of a firmware notification in which a Windows modern standby computer enters a "sleep" state where the CPU may still be active and maintain the radios. However, currently, the values are named as "Screen on/off" and "MS entry/exit", where Modern Standby is abbreviated as "MS". Therefore, perform a minor rename so that the values match their function. Then, fix the debug message to say that it executes notifications instead of entering states as it is otherwise confusing. Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> --- drivers/acpi/x86/s2idle.c | 54 +++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c index 6d4d06236f61..1f13c8b0ef83 100644 --- a/drivers/acpi/x86/s2idle.c +++ b/drivers/acpi/x86/s2idle.c @@ -39,19 +39,19 @@ static const struct acpi_device_id lps0_device_ids[] = { #define ACPI_LPS0_DSM_UUID "c4eb40a0-6cd2-11e2-bcfd-0800200c9a66" #define ACPI_LPS0_GET_DEVICE_CONSTRAINTS 1 -#define ACPI_LPS0_SCREEN_OFF 3 -#define ACPI_LPS0_SCREEN_ON 4 +#define ACPI_LPS0_DISPLAY_OFF 3 +#define ACPI_LPS0_DISPLAY_ON 4 #define ACPI_LPS0_ENTRY 5 #define ACPI_LPS0_EXIT 6 -#define ACPI_LPS0_MS_ENTRY 7 -#define ACPI_LPS0_MS_EXIT 8 +#define ACPI_LPS0_SLEEP_ENTRY 7 +#define ACPI_LPS0_SLEEP_EXIT 8 /* AMD */ #define ACPI_LPS0_DSM_UUID_AMD "e3f32452-febc-43ce-9039-932122d37721" #define ACPI_LPS0_ENTRY_AMD 2 #define ACPI_LPS0_EXIT_AMD 3 -#define ACPI_LPS0_SCREEN_OFF_AMD 4 -#define ACPI_LPS0_SCREEN_ON_AMD 5 +#define ACPI_LPS0_DISPLAY_OFF_AMD 4 +#define ACPI_LPS0_DISPLAY_ON_AMD 5 static acpi_handle lps0_device_handle; static guid_t lps0_dsm_guid; @@ -340,25 +340,25 @@ static const char *acpi_sleep_dsm_state_to_str(unsigned int state) { if (lps0_dsm_func_mask_microsoft || !acpi_s2idle_vendor_amd()) { switch (state) { - case ACPI_LPS0_SCREEN_OFF: - return "screen off"; - case ACPI_LPS0_SCREEN_ON: - return "screen on"; + case ACPI_LPS0_DISPLAY_OFF: + return "display off"; + case ACPI_LPS0_DISPLAY_ON: + return "display on"; case ACPI_LPS0_ENTRY: return "lps0 entry"; case ACPI_LPS0_EXIT: return "lps0 exit"; - case ACPI_LPS0_MS_ENTRY: - return "lps0 ms entry"; - case ACPI_LPS0_MS_EXIT: - return "lps0 ms exit"; + case ACPI_LPS0_SLEEP_ENTRY: + return "sleep entry"; + case ACPI_LPS0_SLEEP_EXIT: + return "sleep exit"; } } else { switch (state) { - case ACPI_LPS0_SCREEN_ON_AMD: - return "screen on"; - case ACPI_LPS0_SCREEN_OFF_AMD: - return "screen off"; + case ACPI_LPS0_DISPLAY_ON_AMD: + return "display on"; + case ACPI_LPS0_DISPLAY_OFF_AMD: + return "display off"; case ACPI_LPS0_ENTRY_AMD: return "lps0 entry"; case ACPI_LPS0_EXIT_AMD: @@ -383,7 +383,7 @@ static void acpi_sleep_run_lps0_dsm(unsigned int func, unsigned int func_mask, g lps0_dsm_state = func; if (pm_debug_messages_on) { acpi_handle_info(lps0_device_handle, - "%s transitioned to state %s\n", + "%s executed notification %s\n", out_obj ? "Successfully" : "Failed to", acpi_sleep_dsm_state_to_str(lps0_dsm_state)); } @@ -545,12 +545,12 @@ static int acpi_s2idle_prepare_late_lps0(void) /* Screen off */ if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_OFF_AMD : - ACPI_LPS0_SCREEN_OFF, + ACPI_LPS0_DISPLAY_OFF_AMD : + ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask, lps0_dsm_guid); if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_OFF, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* LPS0 entry */ @@ -560,7 +560,7 @@ static int acpi_s2idle_prepare_late_lps0(void) if (lps0_dsm_func_mask_microsoft > 0) { /* Modern Standby entry */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_ENTRY, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); @@ -613,18 +613,18 @@ static void acpi_s2idle_restore_early_lps0(void) acpi_sleep_run_lps0_dsm(ACPI_LPS0_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* Modern Standby exit */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_EXIT, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); } /* Screen on */ if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_ON, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_ON_AMD : - ACPI_LPS0_SCREEN_ON, + ACPI_LPS0_DISPLAY_ON_AMD : + ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask, lps0_dsm_guid); } -- 2.52.0
null
null
null
[RFC v1 2/8] acpi/x86: s2idle: Rename LPS0 constants so they mirror their function
Introduce the runtime standby state ABI, which allows for firing the Modern Standby firmware notifications found in Windows during runtime. These notifications allow to make systems that support them look suspended. Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> --- Documentation/ABI/testing/sysfs-power | 20 ++++ .../admin-guide/pm/standby-states.rst | 100 ++++++++++++++++++ Documentation/admin-guide/pm/system-wide.rst | 1 + 3 files changed, 121 insertions(+) create mode 100644 Documentation/admin-guide/pm/standby-states.rst diff --git a/Documentation/ABI/testing/sysfs-power b/Documentation/ABI/testing/sysfs-power index d38da077905a..16378be2dc13 100644 --- a/Documentation/ABI/testing/sysfs-power +++ b/Documentation/ABI/testing/sysfs-power @@ -39,6 +39,26 @@ Description: See Documentation/admin-guide/pm/sleep-states.rst for more information. +What: /sys/power/standby +Date: February 2026 +Contact: Antheas Kapenekakis <lkml@antheas.dev> +Description: + The /sys/power/standby file allows userspace to inform the + kernel of the current runtime standby mode depending on user + activity. The options are "active", "inactive", "sleep", + and "resume". Only the ones supported by the platform will be + available. Depending on the mode, the appearance of the device + will change (e.g., keyboard backlight will turn off as part of + "inactive"), and its thermal envelope might be affected. + + Reading from this file returns the available standby modes, + with the current one enclosed in square brackets. Writing one + of the above strings to this file causes the kernel to + transition to it. + + See Documentation/admin-guide/pm/standby-states.rst for more + information. + What: /sys/power/disk Date: September 2006 Contact: Rafael J. Wysocki <rafael@kernel.org> diff --git a/Documentation/admin-guide/pm/standby-states.rst b/Documentation/admin-guide/pm/standby-states.rst new file mode 100644 index 000000000000..af7f32721d1c --- /dev/null +++ b/Documentation/admin-guide/pm/standby-states.rst @@ -0,0 +1,100 @@ +.. SPDX-License-Identifier: GPL-2.0 +.. include:: <isonum.txt> + +===================== +Runtime Standby States +===================== + +:Copyright: |copy| 2026 Antheas Kapenekakis + +:Author: Antheas Kapenekakis <lkml@antheas.dev> + +This document describes the runtime standby states ABI available in the Linux +kernel, which is designed as a generic superset of the s0ix/Modern Standby +firmware notifications. Devices with these notifications support hardware states +where they look like they are asleep, while still performing basic computation. +Specifically, those are "Sleep", "Inactive", and "Active" states, with an +additional state "Resume". Transitioning between these states follows the +flowchart below. + +Runtime Standby States +================================== +The following runtime standby are supported:: + + <S2idle> ↔ <Sleep> ↔ <Inactive> ↔ <Active> + → → <Resume> ↑ + +.. _s2idle_drips: + + +.. _s2idle_active: + +Active +------ + +The "Active" state is the default state of the system and the one it has when +it is turned on. It is the state where the device is on, and the user is +interacting with it. + +.. _s2idle_screen_off: + +Inactive +---------- + +The "Inactive" state is a state in which users have stopped interacting with +the device, e.g., 5 seconds after the displays have turned off due to inactivity +or due to the user pressing the power button. It is the responsibility of +userspace to keep track of user interaction so it can inform the kernel to +transition to this state. The response to this state for devices that support +is to turn off their keyboard backlight, and some might pulse their power light. + +.. _s2idle_sleep: + +Sleep +----- + +In the sleep state, certain devices will limit their thermal envelope so it is +safe for them to be put into a bag and still perform basic computation such as +fetching email. Then, some devices will pulse their power light. Userspace can +use this state to perform basic tasks such as wake-up checks while maintaining +the appearance the device is asleep. + +.. _s2idle_resume: + +Resume +------ + +The resume state is a transient state that may only be entered from the sleep +state. It can be used to notify hardware that the device should boost its +thermal envelope as preparation for the user interacting with it. As in, it +undoes the thermal envelope effects of the "sleep" state while keeping its +appearance. + +S2idle +----- + +The "S2idle" state in the diagram corresponds to suspending normally by writing +``mem`` to ``/sys/power/state``. Userspace is fully frozen, and the kernel parks +the CPUs and turns off most devices. It is shown in the graph as a reference. +If the runtime standby state is not "sleep" when entering s2idle, the kernel +will first transition to "sleep" before entering s2idle. + +Basic ``sysfs`` Interface for runtime standby transitions +============================================================= + +The file :file:`/sys/power/standby` can be used to transition the system between +the different standby states. The file accepts the following values: ``active``, +``inactive``, ``sleep``, and ``resume``. File writes will block until the +transition completes. The system will cross all states shown in the flowchart +above to reach the desired state. It will return ``-EINVAL`` when asking for an +unsupported state or, e.g., requesting ``resume`` when not in the ``sleep`` +state. If there is an error during the transition, the transition will pause on +the last error-free state and return an error. + +The file can be read to retrieve the current state (and potential ones) with the +following format: ``[active] inactive sleep resume``. Only supported states +will be shown. + +Userspace may transition between all supported states including s2idle +arbitrarily, except for the ``resume`` state which may only be requested from +the ``sleep`` state. \ No newline at end of file diff --git a/Documentation/admin-guide/pm/system-wide.rst b/Documentation/admin-guide/pm/system-wide.rst index 1a1924d71006..411775fae4ac 100644 --- a/Documentation/admin-guide/pm/system-wide.rst +++ b/Documentation/admin-guide/pm/system-wide.rst @@ -8,4 +8,5 @@ System-Wide Power Management :maxdepth: 2 sleep-states + standby-states suspend-flows -- 2.52.0
{ "author": "Antheas Kapenekakis <lkml@antheas.dev>", "date": "Fri, 26 Dec 2025 12:26:39 +0200", "is_openbsd": false, "thread_id": "CAGwozwHE4DVCh79-523V5=a_fqR0gXnnkorGCPEsgHBDLYPtxA@mail.gmail.com.mbox.gz" }
lkml_critique
lkml
The LPS0 3/4 constants are part of a firmware notification called "Display on/off", in which the device enters a "Screen Off" state. The LPS0 7/8 constants are part of a firmware notification in which a Windows modern standby computer enters a "sleep" state where the CPU may still be active and maintain the radios. However, currently, the values are named as "Screen on/off" and "MS entry/exit", where Modern Standby is abbreviated as "MS". Therefore, perform a minor rename so that the values match their function. Then, fix the debug message to say that it executes notifications instead of entering states as it is otherwise confusing. Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> --- drivers/acpi/x86/s2idle.c | 54 +++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c index 6d4d06236f61..1f13c8b0ef83 100644 --- a/drivers/acpi/x86/s2idle.c +++ b/drivers/acpi/x86/s2idle.c @@ -39,19 +39,19 @@ static const struct acpi_device_id lps0_device_ids[] = { #define ACPI_LPS0_DSM_UUID "c4eb40a0-6cd2-11e2-bcfd-0800200c9a66" #define ACPI_LPS0_GET_DEVICE_CONSTRAINTS 1 -#define ACPI_LPS0_SCREEN_OFF 3 -#define ACPI_LPS0_SCREEN_ON 4 +#define ACPI_LPS0_DISPLAY_OFF 3 +#define ACPI_LPS0_DISPLAY_ON 4 #define ACPI_LPS0_ENTRY 5 #define ACPI_LPS0_EXIT 6 -#define ACPI_LPS0_MS_ENTRY 7 -#define ACPI_LPS0_MS_EXIT 8 +#define ACPI_LPS0_SLEEP_ENTRY 7 +#define ACPI_LPS0_SLEEP_EXIT 8 /* AMD */ #define ACPI_LPS0_DSM_UUID_AMD "e3f32452-febc-43ce-9039-932122d37721" #define ACPI_LPS0_ENTRY_AMD 2 #define ACPI_LPS0_EXIT_AMD 3 -#define ACPI_LPS0_SCREEN_OFF_AMD 4 -#define ACPI_LPS0_SCREEN_ON_AMD 5 +#define ACPI_LPS0_DISPLAY_OFF_AMD 4 +#define ACPI_LPS0_DISPLAY_ON_AMD 5 static acpi_handle lps0_device_handle; static guid_t lps0_dsm_guid; @@ -340,25 +340,25 @@ static const char *acpi_sleep_dsm_state_to_str(unsigned int state) { if (lps0_dsm_func_mask_microsoft || !acpi_s2idle_vendor_amd()) { switch (state) { - case ACPI_LPS0_SCREEN_OFF: - return "screen off"; - case ACPI_LPS0_SCREEN_ON: - return "screen on"; + case ACPI_LPS0_DISPLAY_OFF: + return "display off"; + case ACPI_LPS0_DISPLAY_ON: + return "display on"; case ACPI_LPS0_ENTRY: return "lps0 entry"; case ACPI_LPS0_EXIT: return "lps0 exit"; - case ACPI_LPS0_MS_ENTRY: - return "lps0 ms entry"; - case ACPI_LPS0_MS_EXIT: - return "lps0 ms exit"; + case ACPI_LPS0_SLEEP_ENTRY: + return "sleep entry"; + case ACPI_LPS0_SLEEP_EXIT: + return "sleep exit"; } } else { switch (state) { - case ACPI_LPS0_SCREEN_ON_AMD: - return "screen on"; - case ACPI_LPS0_SCREEN_OFF_AMD: - return "screen off"; + case ACPI_LPS0_DISPLAY_ON_AMD: + return "display on"; + case ACPI_LPS0_DISPLAY_OFF_AMD: + return "display off"; case ACPI_LPS0_ENTRY_AMD: return "lps0 entry"; case ACPI_LPS0_EXIT_AMD: @@ -383,7 +383,7 @@ static void acpi_sleep_run_lps0_dsm(unsigned int func, unsigned int func_mask, g lps0_dsm_state = func; if (pm_debug_messages_on) { acpi_handle_info(lps0_device_handle, - "%s transitioned to state %s\n", + "%s executed notification %s\n", out_obj ? "Successfully" : "Failed to", acpi_sleep_dsm_state_to_str(lps0_dsm_state)); } @@ -545,12 +545,12 @@ static int acpi_s2idle_prepare_late_lps0(void) /* Screen off */ if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_OFF_AMD : - ACPI_LPS0_SCREEN_OFF, + ACPI_LPS0_DISPLAY_OFF_AMD : + ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask, lps0_dsm_guid); if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_OFF, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* LPS0 entry */ @@ -560,7 +560,7 @@ static int acpi_s2idle_prepare_late_lps0(void) if (lps0_dsm_func_mask_microsoft > 0) { /* Modern Standby entry */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_ENTRY, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); @@ -613,18 +613,18 @@ static void acpi_s2idle_restore_early_lps0(void) acpi_sleep_run_lps0_dsm(ACPI_LPS0_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* Modern Standby exit */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_EXIT, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); } /* Screen on */ if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_ON, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_ON_AMD : - ACPI_LPS0_SCREEN_ON, + ACPI_LPS0_DISPLAY_ON_AMD : + ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask, lps0_dsm_guid); } -- 2.52.0
null
null
null
[RFC v1 2/8] acpi/x86: s2idle: Rename LPS0 constants so they mirror their function
On Fri, 26 Dec 2025 at 12:27, Antheas Kapenekakis <lkml@antheas.dev> wrote: Happy new year everyone Small bump on this as all of us are starting to get back from holidays I still have to bump an asus series before I get back to this. I would appreciate some feedback in the interim. I think targeting 6.20/7.0? is unrealistic so there is no rush from my side Antheas
{ "author": "Antheas Kapenekakis <lkml@antheas.dev>", "date": "Mon, 12 Jan 2026 22:33:06 +0200", "is_openbsd": false, "thread_id": "CAGwozwHE4DVCh79-523V5=a_fqR0gXnnkorGCPEsgHBDLYPtxA@mail.gmail.com.mbox.gz" }
lkml_critique
lkml
The LPS0 3/4 constants are part of a firmware notification called "Display on/off", in which the device enters a "Screen Off" state. The LPS0 7/8 constants are part of a firmware notification in which a Windows modern standby computer enters a "sleep" state where the CPU may still be active and maintain the radios. However, currently, the values are named as "Screen on/off" and "MS entry/exit", where Modern Standby is abbreviated as "MS". Therefore, perform a minor rename so that the values match their function. Then, fix the debug message to say that it executes notifications instead of entering states as it is otherwise confusing. Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> --- drivers/acpi/x86/s2idle.c | 54 +++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c index 6d4d06236f61..1f13c8b0ef83 100644 --- a/drivers/acpi/x86/s2idle.c +++ b/drivers/acpi/x86/s2idle.c @@ -39,19 +39,19 @@ static const struct acpi_device_id lps0_device_ids[] = { #define ACPI_LPS0_DSM_UUID "c4eb40a0-6cd2-11e2-bcfd-0800200c9a66" #define ACPI_LPS0_GET_DEVICE_CONSTRAINTS 1 -#define ACPI_LPS0_SCREEN_OFF 3 -#define ACPI_LPS0_SCREEN_ON 4 +#define ACPI_LPS0_DISPLAY_OFF 3 +#define ACPI_LPS0_DISPLAY_ON 4 #define ACPI_LPS0_ENTRY 5 #define ACPI_LPS0_EXIT 6 -#define ACPI_LPS0_MS_ENTRY 7 -#define ACPI_LPS0_MS_EXIT 8 +#define ACPI_LPS0_SLEEP_ENTRY 7 +#define ACPI_LPS0_SLEEP_EXIT 8 /* AMD */ #define ACPI_LPS0_DSM_UUID_AMD "e3f32452-febc-43ce-9039-932122d37721" #define ACPI_LPS0_ENTRY_AMD 2 #define ACPI_LPS0_EXIT_AMD 3 -#define ACPI_LPS0_SCREEN_OFF_AMD 4 -#define ACPI_LPS0_SCREEN_ON_AMD 5 +#define ACPI_LPS0_DISPLAY_OFF_AMD 4 +#define ACPI_LPS0_DISPLAY_ON_AMD 5 static acpi_handle lps0_device_handle; static guid_t lps0_dsm_guid; @@ -340,25 +340,25 @@ static const char *acpi_sleep_dsm_state_to_str(unsigned int state) { if (lps0_dsm_func_mask_microsoft || !acpi_s2idle_vendor_amd()) { switch (state) { - case ACPI_LPS0_SCREEN_OFF: - return "screen off"; - case ACPI_LPS0_SCREEN_ON: - return "screen on"; + case ACPI_LPS0_DISPLAY_OFF: + return "display off"; + case ACPI_LPS0_DISPLAY_ON: + return "display on"; case ACPI_LPS0_ENTRY: return "lps0 entry"; case ACPI_LPS0_EXIT: return "lps0 exit"; - case ACPI_LPS0_MS_ENTRY: - return "lps0 ms entry"; - case ACPI_LPS0_MS_EXIT: - return "lps0 ms exit"; + case ACPI_LPS0_SLEEP_ENTRY: + return "sleep entry"; + case ACPI_LPS0_SLEEP_EXIT: + return "sleep exit"; } } else { switch (state) { - case ACPI_LPS0_SCREEN_ON_AMD: - return "screen on"; - case ACPI_LPS0_SCREEN_OFF_AMD: - return "screen off"; + case ACPI_LPS0_DISPLAY_ON_AMD: + return "display on"; + case ACPI_LPS0_DISPLAY_OFF_AMD: + return "display off"; case ACPI_LPS0_ENTRY_AMD: return "lps0 entry"; case ACPI_LPS0_EXIT_AMD: @@ -383,7 +383,7 @@ static void acpi_sleep_run_lps0_dsm(unsigned int func, unsigned int func_mask, g lps0_dsm_state = func; if (pm_debug_messages_on) { acpi_handle_info(lps0_device_handle, - "%s transitioned to state %s\n", + "%s executed notification %s\n", out_obj ? "Successfully" : "Failed to", acpi_sleep_dsm_state_to_str(lps0_dsm_state)); } @@ -545,12 +545,12 @@ static int acpi_s2idle_prepare_late_lps0(void) /* Screen off */ if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_OFF_AMD : - ACPI_LPS0_SCREEN_OFF, + ACPI_LPS0_DISPLAY_OFF_AMD : + ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask, lps0_dsm_guid); if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_OFF, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* LPS0 entry */ @@ -560,7 +560,7 @@ static int acpi_s2idle_prepare_late_lps0(void) if (lps0_dsm_func_mask_microsoft > 0) { /* Modern Standby entry */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_ENTRY, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); @@ -613,18 +613,18 @@ static void acpi_s2idle_restore_early_lps0(void) acpi_sleep_run_lps0_dsm(ACPI_LPS0_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* Modern Standby exit */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_EXIT, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); } /* Screen on */ if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_ON, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_ON_AMD : - ACPI_LPS0_SCREEN_ON, + ACPI_LPS0_DISPLAY_ON_AMD : + ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask, lps0_dsm_guid); } -- 2.52.0
null
null
null
[RFC v1 2/8] acpi/x86: s2idle: Rename LPS0 constants so they mirror their function
Hello, On 1/12/26 23:33, Antheas Kapenekakis wrote: Thanks a lot for sending these patches! I briefly looked through them last week and will make another iteration soon. -- Best regards, Dmitry
{ "author": "Dmitry Osipenko <dmitry.osipenko@collabora.com>", "date": "Tue, 13 Jan 2026 12:48:30 +0300", "is_openbsd": false, "thread_id": "CAGwozwHE4DVCh79-523V5=a_fqR0gXnnkorGCPEsgHBDLYPtxA@mail.gmail.com.mbox.gz" }
lkml_critique
lkml
The LPS0 3/4 constants are part of a firmware notification called "Display on/off", in which the device enters a "Screen Off" state. The LPS0 7/8 constants are part of a firmware notification in which a Windows modern standby computer enters a "sleep" state where the CPU may still be active and maintain the radios. However, currently, the values are named as "Screen on/off" and "MS entry/exit", where Modern Standby is abbreviated as "MS". Therefore, perform a minor rename so that the values match their function. Then, fix the debug message to say that it executes notifications instead of entering states as it is otherwise confusing. Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> --- drivers/acpi/x86/s2idle.c | 54 +++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c index 6d4d06236f61..1f13c8b0ef83 100644 --- a/drivers/acpi/x86/s2idle.c +++ b/drivers/acpi/x86/s2idle.c @@ -39,19 +39,19 @@ static const struct acpi_device_id lps0_device_ids[] = { #define ACPI_LPS0_DSM_UUID "c4eb40a0-6cd2-11e2-bcfd-0800200c9a66" #define ACPI_LPS0_GET_DEVICE_CONSTRAINTS 1 -#define ACPI_LPS0_SCREEN_OFF 3 -#define ACPI_LPS0_SCREEN_ON 4 +#define ACPI_LPS0_DISPLAY_OFF 3 +#define ACPI_LPS0_DISPLAY_ON 4 #define ACPI_LPS0_ENTRY 5 #define ACPI_LPS0_EXIT 6 -#define ACPI_LPS0_MS_ENTRY 7 -#define ACPI_LPS0_MS_EXIT 8 +#define ACPI_LPS0_SLEEP_ENTRY 7 +#define ACPI_LPS0_SLEEP_EXIT 8 /* AMD */ #define ACPI_LPS0_DSM_UUID_AMD "e3f32452-febc-43ce-9039-932122d37721" #define ACPI_LPS0_ENTRY_AMD 2 #define ACPI_LPS0_EXIT_AMD 3 -#define ACPI_LPS0_SCREEN_OFF_AMD 4 -#define ACPI_LPS0_SCREEN_ON_AMD 5 +#define ACPI_LPS0_DISPLAY_OFF_AMD 4 +#define ACPI_LPS0_DISPLAY_ON_AMD 5 static acpi_handle lps0_device_handle; static guid_t lps0_dsm_guid; @@ -340,25 +340,25 @@ static const char *acpi_sleep_dsm_state_to_str(unsigned int state) { if (lps0_dsm_func_mask_microsoft || !acpi_s2idle_vendor_amd()) { switch (state) { - case ACPI_LPS0_SCREEN_OFF: - return "screen off"; - case ACPI_LPS0_SCREEN_ON: - return "screen on"; + case ACPI_LPS0_DISPLAY_OFF: + return "display off"; + case ACPI_LPS0_DISPLAY_ON: + return "display on"; case ACPI_LPS0_ENTRY: return "lps0 entry"; case ACPI_LPS0_EXIT: return "lps0 exit"; - case ACPI_LPS0_MS_ENTRY: - return "lps0 ms entry"; - case ACPI_LPS0_MS_EXIT: - return "lps0 ms exit"; + case ACPI_LPS0_SLEEP_ENTRY: + return "sleep entry"; + case ACPI_LPS0_SLEEP_EXIT: + return "sleep exit"; } } else { switch (state) { - case ACPI_LPS0_SCREEN_ON_AMD: - return "screen on"; - case ACPI_LPS0_SCREEN_OFF_AMD: - return "screen off"; + case ACPI_LPS0_DISPLAY_ON_AMD: + return "display on"; + case ACPI_LPS0_DISPLAY_OFF_AMD: + return "display off"; case ACPI_LPS0_ENTRY_AMD: return "lps0 entry"; case ACPI_LPS0_EXIT_AMD: @@ -383,7 +383,7 @@ static void acpi_sleep_run_lps0_dsm(unsigned int func, unsigned int func_mask, g lps0_dsm_state = func; if (pm_debug_messages_on) { acpi_handle_info(lps0_device_handle, - "%s transitioned to state %s\n", + "%s executed notification %s\n", out_obj ? "Successfully" : "Failed to", acpi_sleep_dsm_state_to_str(lps0_dsm_state)); } @@ -545,12 +545,12 @@ static int acpi_s2idle_prepare_late_lps0(void) /* Screen off */ if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_OFF_AMD : - ACPI_LPS0_SCREEN_OFF, + ACPI_LPS0_DISPLAY_OFF_AMD : + ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask, lps0_dsm_guid); if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_OFF, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* LPS0 entry */ @@ -560,7 +560,7 @@ static int acpi_s2idle_prepare_late_lps0(void) if (lps0_dsm_func_mask_microsoft > 0) { /* Modern Standby entry */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_ENTRY, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); @@ -613,18 +613,18 @@ static void acpi_s2idle_restore_early_lps0(void) acpi_sleep_run_lps0_dsm(ACPI_LPS0_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* Modern Standby exit */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_EXIT, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); } /* Screen on */ if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_ON, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_ON_AMD : - ACPI_LPS0_SCREEN_ON, + ACPI_LPS0_DISPLAY_ON_AMD : + ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask, lps0_dsm_guid); } -- 2.52.0
null
null
null
[RFC v1 2/8] acpi/x86: s2idle: Rename LPS0 constants so they mirror their function
On Tue, 13 Jan 2026 at 11:50, Dmitry Osipenko <dmitry.osipenko@collabora.com> wrote: Hi Dmitry, can you expand a bit on your use-case/KPIs/timeline for your series? Is it handhelds/laptops or what is the intended use-case? [2] before the rewrite had been tested on most handheld makes and SKUs (over 70 models) and laptop manufacturers and it performs as expected. As it is multiple months of research I'd like to get some credit for it. Happy to collaborate in any case, especially if you will log hours on this and can push a variant through faster. I am not sure if starting from scratch is worthwhile for either of us Best, Antheas
{ "author": "Antheas Kapenekakis <lkml@antheas.dev>", "date": "Tue, 13 Jan 2026 12:11:33 +0200", "is_openbsd": false, "thread_id": "CAGwozwHE4DVCh79-523V5=a_fqR0gXnnkorGCPEsgHBDLYPtxA@mail.gmail.com.mbox.gz" }
lkml_critique
lkml
The LPS0 3/4 constants are part of a firmware notification called "Display on/off", in which the device enters a "Screen Off" state. The LPS0 7/8 constants are part of a firmware notification in which a Windows modern standby computer enters a "sleep" state where the CPU may still be active and maintain the radios. However, currently, the values are named as "Screen on/off" and "MS entry/exit", where Modern Standby is abbreviated as "MS". Therefore, perform a minor rename so that the values match their function. Then, fix the debug message to say that it executes notifications instead of entering states as it is otherwise confusing. Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> --- drivers/acpi/x86/s2idle.c | 54 +++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c index 6d4d06236f61..1f13c8b0ef83 100644 --- a/drivers/acpi/x86/s2idle.c +++ b/drivers/acpi/x86/s2idle.c @@ -39,19 +39,19 @@ static const struct acpi_device_id lps0_device_ids[] = { #define ACPI_LPS0_DSM_UUID "c4eb40a0-6cd2-11e2-bcfd-0800200c9a66" #define ACPI_LPS0_GET_DEVICE_CONSTRAINTS 1 -#define ACPI_LPS0_SCREEN_OFF 3 -#define ACPI_LPS0_SCREEN_ON 4 +#define ACPI_LPS0_DISPLAY_OFF 3 +#define ACPI_LPS0_DISPLAY_ON 4 #define ACPI_LPS0_ENTRY 5 #define ACPI_LPS0_EXIT 6 -#define ACPI_LPS0_MS_ENTRY 7 -#define ACPI_LPS0_MS_EXIT 8 +#define ACPI_LPS0_SLEEP_ENTRY 7 +#define ACPI_LPS0_SLEEP_EXIT 8 /* AMD */ #define ACPI_LPS0_DSM_UUID_AMD "e3f32452-febc-43ce-9039-932122d37721" #define ACPI_LPS0_ENTRY_AMD 2 #define ACPI_LPS0_EXIT_AMD 3 -#define ACPI_LPS0_SCREEN_OFF_AMD 4 -#define ACPI_LPS0_SCREEN_ON_AMD 5 +#define ACPI_LPS0_DISPLAY_OFF_AMD 4 +#define ACPI_LPS0_DISPLAY_ON_AMD 5 static acpi_handle lps0_device_handle; static guid_t lps0_dsm_guid; @@ -340,25 +340,25 @@ static const char *acpi_sleep_dsm_state_to_str(unsigned int state) { if (lps0_dsm_func_mask_microsoft || !acpi_s2idle_vendor_amd()) { switch (state) { - case ACPI_LPS0_SCREEN_OFF: - return "screen off"; - case ACPI_LPS0_SCREEN_ON: - return "screen on"; + case ACPI_LPS0_DISPLAY_OFF: + return "display off"; + case ACPI_LPS0_DISPLAY_ON: + return "display on"; case ACPI_LPS0_ENTRY: return "lps0 entry"; case ACPI_LPS0_EXIT: return "lps0 exit"; - case ACPI_LPS0_MS_ENTRY: - return "lps0 ms entry"; - case ACPI_LPS0_MS_EXIT: - return "lps0 ms exit"; + case ACPI_LPS0_SLEEP_ENTRY: + return "sleep entry"; + case ACPI_LPS0_SLEEP_EXIT: + return "sleep exit"; } } else { switch (state) { - case ACPI_LPS0_SCREEN_ON_AMD: - return "screen on"; - case ACPI_LPS0_SCREEN_OFF_AMD: - return "screen off"; + case ACPI_LPS0_DISPLAY_ON_AMD: + return "display on"; + case ACPI_LPS0_DISPLAY_OFF_AMD: + return "display off"; case ACPI_LPS0_ENTRY_AMD: return "lps0 entry"; case ACPI_LPS0_EXIT_AMD: @@ -383,7 +383,7 @@ static void acpi_sleep_run_lps0_dsm(unsigned int func, unsigned int func_mask, g lps0_dsm_state = func; if (pm_debug_messages_on) { acpi_handle_info(lps0_device_handle, - "%s transitioned to state %s\n", + "%s executed notification %s\n", out_obj ? "Successfully" : "Failed to", acpi_sleep_dsm_state_to_str(lps0_dsm_state)); } @@ -545,12 +545,12 @@ static int acpi_s2idle_prepare_late_lps0(void) /* Screen off */ if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_OFF_AMD : - ACPI_LPS0_SCREEN_OFF, + ACPI_LPS0_DISPLAY_OFF_AMD : + ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask, lps0_dsm_guid); if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_OFF, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* LPS0 entry */ @@ -560,7 +560,7 @@ static int acpi_s2idle_prepare_late_lps0(void) if (lps0_dsm_func_mask_microsoft > 0) { /* Modern Standby entry */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_ENTRY, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); @@ -613,18 +613,18 @@ static void acpi_s2idle_restore_early_lps0(void) acpi_sleep_run_lps0_dsm(ACPI_LPS0_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* Modern Standby exit */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_EXIT, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); } /* Screen on */ if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_ON, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_ON_AMD : - ACPI_LPS0_SCREEN_ON, + ACPI_LPS0_DISPLAY_ON_AMD : + ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask, lps0_dsm_guid); } -- 2.52.0
null
null
null
[RFC v1 2/8] acpi/x86: s2idle: Rename LPS0 constants so they mirror their function
On 1/13/26 13:11, Antheas Kapenekakis wrote: The primary goal is to support screen-off DSM for a power-efficient background games downloading [1] and further resume-to-dark on Steam Deck and other handhelds. There is no strict timeline, usual "sooner the better". Downstreams will use customized WIP solution till upstream will get necessary generic interfaces. [1] https://store.steampowered.com/news/app/1675200/view/771930569635267984 A common approach for upstreaming is to divide problem into smaller manageable parts. That's what I'm planning to focus on now to see if we can start easy with a minimal changes. Please don't worry about the credit. You did a significant ground work that is well recognized by now. Thanks a lot for your efforts and help. Starting from scratch of course won't be a good approach with all the broad testing you've done. -- Best regards, Dmitry
{ "author": "Dmitry Osipenko <dmitry.osipenko@collabora.com>", "date": "Thu, 15 Jan 2026 02:07:02 +0300", "is_openbsd": false, "thread_id": "CAGwozwHE4DVCh79-523V5=a_fqR0gXnnkorGCPEsgHBDLYPtxA@mail.gmail.com.mbox.gz" }
lkml_critique
lkml
The LPS0 3/4 constants are part of a firmware notification called "Display on/off", in which the device enters a "Screen Off" state. The LPS0 7/8 constants are part of a firmware notification in which a Windows modern standby computer enters a "sleep" state where the CPU may still be active and maintain the radios. However, currently, the values are named as "Screen on/off" and "MS entry/exit", where Modern Standby is abbreviated as "MS". Therefore, perform a minor rename so that the values match their function. Then, fix the debug message to say that it executes notifications instead of entering states as it is otherwise confusing. Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> --- drivers/acpi/x86/s2idle.c | 54 +++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c index 6d4d06236f61..1f13c8b0ef83 100644 --- a/drivers/acpi/x86/s2idle.c +++ b/drivers/acpi/x86/s2idle.c @@ -39,19 +39,19 @@ static const struct acpi_device_id lps0_device_ids[] = { #define ACPI_LPS0_DSM_UUID "c4eb40a0-6cd2-11e2-bcfd-0800200c9a66" #define ACPI_LPS0_GET_DEVICE_CONSTRAINTS 1 -#define ACPI_LPS0_SCREEN_OFF 3 -#define ACPI_LPS0_SCREEN_ON 4 +#define ACPI_LPS0_DISPLAY_OFF 3 +#define ACPI_LPS0_DISPLAY_ON 4 #define ACPI_LPS0_ENTRY 5 #define ACPI_LPS0_EXIT 6 -#define ACPI_LPS0_MS_ENTRY 7 -#define ACPI_LPS0_MS_EXIT 8 +#define ACPI_LPS0_SLEEP_ENTRY 7 +#define ACPI_LPS0_SLEEP_EXIT 8 /* AMD */ #define ACPI_LPS0_DSM_UUID_AMD "e3f32452-febc-43ce-9039-932122d37721" #define ACPI_LPS0_ENTRY_AMD 2 #define ACPI_LPS0_EXIT_AMD 3 -#define ACPI_LPS0_SCREEN_OFF_AMD 4 -#define ACPI_LPS0_SCREEN_ON_AMD 5 +#define ACPI_LPS0_DISPLAY_OFF_AMD 4 +#define ACPI_LPS0_DISPLAY_ON_AMD 5 static acpi_handle lps0_device_handle; static guid_t lps0_dsm_guid; @@ -340,25 +340,25 @@ static const char *acpi_sleep_dsm_state_to_str(unsigned int state) { if (lps0_dsm_func_mask_microsoft || !acpi_s2idle_vendor_amd()) { switch (state) { - case ACPI_LPS0_SCREEN_OFF: - return "screen off"; - case ACPI_LPS0_SCREEN_ON: - return "screen on"; + case ACPI_LPS0_DISPLAY_OFF: + return "display off"; + case ACPI_LPS0_DISPLAY_ON: + return "display on"; case ACPI_LPS0_ENTRY: return "lps0 entry"; case ACPI_LPS0_EXIT: return "lps0 exit"; - case ACPI_LPS0_MS_ENTRY: - return "lps0 ms entry"; - case ACPI_LPS0_MS_EXIT: - return "lps0 ms exit"; + case ACPI_LPS0_SLEEP_ENTRY: + return "sleep entry"; + case ACPI_LPS0_SLEEP_EXIT: + return "sleep exit"; } } else { switch (state) { - case ACPI_LPS0_SCREEN_ON_AMD: - return "screen on"; - case ACPI_LPS0_SCREEN_OFF_AMD: - return "screen off"; + case ACPI_LPS0_DISPLAY_ON_AMD: + return "display on"; + case ACPI_LPS0_DISPLAY_OFF_AMD: + return "display off"; case ACPI_LPS0_ENTRY_AMD: return "lps0 entry"; case ACPI_LPS0_EXIT_AMD: @@ -383,7 +383,7 @@ static void acpi_sleep_run_lps0_dsm(unsigned int func, unsigned int func_mask, g lps0_dsm_state = func; if (pm_debug_messages_on) { acpi_handle_info(lps0_device_handle, - "%s transitioned to state %s\n", + "%s executed notification %s\n", out_obj ? "Successfully" : "Failed to", acpi_sleep_dsm_state_to_str(lps0_dsm_state)); } @@ -545,12 +545,12 @@ static int acpi_s2idle_prepare_late_lps0(void) /* Screen off */ if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_OFF_AMD : - ACPI_LPS0_SCREEN_OFF, + ACPI_LPS0_DISPLAY_OFF_AMD : + ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask, lps0_dsm_guid); if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_OFF, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* LPS0 entry */ @@ -560,7 +560,7 @@ static int acpi_s2idle_prepare_late_lps0(void) if (lps0_dsm_func_mask_microsoft > 0) { /* Modern Standby entry */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_ENTRY, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); @@ -613,18 +613,18 @@ static void acpi_s2idle_restore_early_lps0(void) acpi_sleep_run_lps0_dsm(ACPI_LPS0_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* Modern Standby exit */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_EXIT, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); } /* Screen on */ if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_ON, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_ON_AMD : - ACPI_LPS0_SCREEN_ON, + ACPI_LPS0_DISPLAY_ON_AMD : + ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask, lps0_dsm_guid); } -- 2.52.0
null
null
null
[RFC v1 2/8] acpi/x86: s2idle: Rename LPS0 constants so they mirror their function
On Thu, 15 Jan 2026 at 01:07, Dmitry Osipenko <dmitry.osipenko@collabora.com> wrote: Hi Dmitry, let me go inline. Ok, this makes things clearer. I had done some testing to see the viability of such approach. One big problem [1] had was that the compression algorithm that Steam used was very CPU intensive. However, it was announced that that changed, which makes low power downloads more viable. However, even so, I do not think the sleep DSM is designed for prolonged background use and certain devices might overheat. Specifically, I think the Go S disables its fan while in that DSM. Looking back to what Windows does, it only uses the Sleep state to do periodic polling, and if there are updates it transitions to display off. This is a fair approach for [1]. For example, device wakes up every two hours while connected to a charger, stays on sleep state, checks for updates, and if there are any and conditions are met, transitions to display off and starts downloading. However, this means you do not get a smaller tdp limit. Given you control the unfrozen userspace in that state though, such a limit does not help either. The device will use what it needs to for downloads. This makes the SD 5W low power mode puzzling, as it means downloads will potentially take longer and I would be punished as a user for using that mode. Instead, Steam should be optimized to use less than 5W or perhaps 10W when downloading from gigabit in some way. Two more considerations in this case are that a lot of devices will turn off their controllers when entering display off. And the rest when entering sleep. This is good because when you are in dark resume, the RGB of the device has turned off. But for [1] it is problematic because it assumes the controller works and is what is used to wake the device so the mode is broken. For Legion, Sleep is used to turn off the controller, and for other devices Sleep Entry/Exit. New in ROG Xbox Ally devices is that the controller no longer turns off, but it is muted. The other consideration is that three additional patches are needed for ROG Ally devices to work correctly with this series, 2 cleanup commits and 1 small delay. But after that it should be drop in. I cannot comment on the new hid drivers for Asus and Legion that are currently being developed. Particularly, hid-legion-go(?) has a reset_resume() cb where it should have used resume? Or not anything? The legion controllers save os mode until they disconnect, which they do with this series, so the driver would always re-initialize on wake-up. Sure. One potential approach for this is this series, where the first part does the plumbing and the second part the exposing. They can be merged independently. I also made sure to address Rafael's comments, so the ABI of this series is completely independent of ACPI, S0ix or whether the device has a display. I also removed all references to Intel, AMD specific power envelope terminology. Moreover, most of the logic now resides in suspend.c and the hooks are in platform_ calls, so it can be implemented for other platforms easily. However, the first part of this series does some refactorings which assume a favorable outcome. If we do not want to assume that, a simpler initial series would just move the MS/display on/off DSMs to .begin() in s2idle.c. If you think that would be easier to merge, you are welcome to start with that. Then this series would be refactored on top and merged as a single unit. Keep in mind the ROG Ally conflict would also arise in this case as well. Great. Sounds good to me. Antheas
{ "author": "Antheas Kapenekakis <lkml@antheas.dev>", "date": "Thu, 15 Jan 2026 09:49:15 +0200", "is_openbsd": false, "thread_id": "CAGwozwHE4DVCh79-523V5=a_fqR0gXnnkorGCPEsgHBDLYPtxA@mail.gmail.com.mbox.gz" }
lkml_critique
lkml
The LPS0 3/4 constants are part of a firmware notification called "Display on/off", in which the device enters a "Screen Off" state. The LPS0 7/8 constants are part of a firmware notification in which a Windows modern standby computer enters a "sleep" state where the CPU may still be active and maintain the radios. However, currently, the values are named as "Screen on/off" and "MS entry/exit", where Modern Standby is abbreviated as "MS". Therefore, perform a minor rename so that the values match their function. Then, fix the debug message to say that it executes notifications instead of entering states as it is otherwise confusing. Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev> --- drivers/acpi/x86/s2idle.c | 54 +++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c index 6d4d06236f61..1f13c8b0ef83 100644 --- a/drivers/acpi/x86/s2idle.c +++ b/drivers/acpi/x86/s2idle.c @@ -39,19 +39,19 @@ static const struct acpi_device_id lps0_device_ids[] = { #define ACPI_LPS0_DSM_UUID "c4eb40a0-6cd2-11e2-bcfd-0800200c9a66" #define ACPI_LPS0_GET_DEVICE_CONSTRAINTS 1 -#define ACPI_LPS0_SCREEN_OFF 3 -#define ACPI_LPS0_SCREEN_ON 4 +#define ACPI_LPS0_DISPLAY_OFF 3 +#define ACPI_LPS0_DISPLAY_ON 4 #define ACPI_LPS0_ENTRY 5 #define ACPI_LPS0_EXIT 6 -#define ACPI_LPS0_MS_ENTRY 7 -#define ACPI_LPS0_MS_EXIT 8 +#define ACPI_LPS0_SLEEP_ENTRY 7 +#define ACPI_LPS0_SLEEP_EXIT 8 /* AMD */ #define ACPI_LPS0_DSM_UUID_AMD "e3f32452-febc-43ce-9039-932122d37721" #define ACPI_LPS0_ENTRY_AMD 2 #define ACPI_LPS0_EXIT_AMD 3 -#define ACPI_LPS0_SCREEN_OFF_AMD 4 -#define ACPI_LPS0_SCREEN_ON_AMD 5 +#define ACPI_LPS0_DISPLAY_OFF_AMD 4 +#define ACPI_LPS0_DISPLAY_ON_AMD 5 static acpi_handle lps0_device_handle; static guid_t lps0_dsm_guid; @@ -340,25 +340,25 @@ static const char *acpi_sleep_dsm_state_to_str(unsigned int state) { if (lps0_dsm_func_mask_microsoft || !acpi_s2idle_vendor_amd()) { switch (state) { - case ACPI_LPS0_SCREEN_OFF: - return "screen off"; - case ACPI_LPS0_SCREEN_ON: - return "screen on"; + case ACPI_LPS0_DISPLAY_OFF: + return "display off"; + case ACPI_LPS0_DISPLAY_ON: + return "display on"; case ACPI_LPS0_ENTRY: return "lps0 entry"; case ACPI_LPS0_EXIT: return "lps0 exit"; - case ACPI_LPS0_MS_ENTRY: - return "lps0 ms entry"; - case ACPI_LPS0_MS_EXIT: - return "lps0 ms exit"; + case ACPI_LPS0_SLEEP_ENTRY: + return "sleep entry"; + case ACPI_LPS0_SLEEP_EXIT: + return "sleep exit"; } } else { switch (state) { - case ACPI_LPS0_SCREEN_ON_AMD: - return "screen on"; - case ACPI_LPS0_SCREEN_OFF_AMD: - return "screen off"; + case ACPI_LPS0_DISPLAY_ON_AMD: + return "display on"; + case ACPI_LPS0_DISPLAY_OFF_AMD: + return "display off"; case ACPI_LPS0_ENTRY_AMD: return "lps0 entry"; case ACPI_LPS0_EXIT_AMD: @@ -383,7 +383,7 @@ static void acpi_sleep_run_lps0_dsm(unsigned int func, unsigned int func_mask, g lps0_dsm_state = func; if (pm_debug_messages_on) { acpi_handle_info(lps0_device_handle, - "%s transitioned to state %s\n", + "%s executed notification %s\n", out_obj ? "Successfully" : "Failed to", acpi_sleep_dsm_state_to_str(lps0_dsm_state)); } @@ -545,12 +545,12 @@ static int acpi_s2idle_prepare_late_lps0(void) /* Screen off */ if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_OFF_AMD : - ACPI_LPS0_SCREEN_OFF, + ACPI_LPS0_DISPLAY_OFF_AMD : + ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask, lps0_dsm_guid); if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_OFF, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_OFF, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* LPS0 entry */ @@ -560,7 +560,7 @@ static int acpi_s2idle_prepare_late_lps0(void) if (lps0_dsm_func_mask_microsoft > 0) { /* Modern Standby entry */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_ENTRY, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); @@ -613,18 +613,18 @@ static void acpi_s2idle_restore_early_lps0(void) acpi_sleep_run_lps0_dsm(ACPI_LPS0_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); /* Modern Standby exit */ - acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_EXIT, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_SLEEP_EXIT, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); } /* Screen on */ if (lps0_dsm_func_mask_microsoft > 0) - acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_ON, + acpi_sleep_run_lps0_dsm(ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft); if (lps0_dsm_func_mask > 0) acpi_sleep_run_lps0_dsm(acpi_s2idle_vendor_amd() ? - ACPI_LPS0_SCREEN_ON_AMD : - ACPI_LPS0_SCREEN_ON, + ACPI_LPS0_DISPLAY_ON_AMD : + ACPI_LPS0_DISPLAY_ON, lps0_dsm_func_mask, lps0_dsm_guid); } -- 2.52.0
null
null
null
[RFC v1 2/8] acpi/x86: s2idle: Rename LPS0 constants so they mirror their function
Hi everyone, now that the kernel merge window is over, I will slowly get back to cleaning this series up I already have some feedback that I will address with V2. Specifically, we found out that the resume DSM needs to always be called and it merged with 7.0. So I will rebase on top of it, remove the patch that added it, and rework the logic to always call resume before sleep exit. I am not sure how I will tackle this or whether it will involve reshaping the FSM states. Then, there was a compilation warning reported by the kernel bot. Afterwards, I reviewed the feedback in the Phoronix article. People would like to have an option to turn this feature off, or perhaps force it off. We could add a Y/n Kconfig for the sysfs patch defaulting to Y that enables it, which will be the appropriate option for consumer kernels. Or a kernel command line parameter so that users do not need to produce their own kernel. Finally, there is the issue of the Ally devices, which will need a partial cleanup that needs to go through platform-x86 and hid core, which would make this series touch 3 subsystems. I would tend towards omitting it for V2 to keep a short(er) cc list, but I can produce it for testing as an addendum. I have my plate full for the next week, so if you would like for me to consider some feedback, next week would be a good time to review this series. Best, Antheas On Fri, 26 Dec 2025 at 11:27, Antheas Kapenekakis <lkml@antheas.dev> wrote:
{ "author": "Antheas Kapenekakis <lkml@antheas.dev>", "date": "Fri, 27 Feb 2026 15:59:46 +0100", "is_openbsd": false, "thread_id": "CAGwozwHE4DVCh79-523V5=a_fqR0gXnnkorGCPEsgHBDLYPtxA@mail.gmail.com.mbox.gz" }
lkml_critique
lkml
Add thin wrappers around zone lock acquire/release operations. This prepares the code for future tracepoint instrumentation without modifying individual call sites. Centralizing zone lock operations behind wrappers allows future instrumentation or debugging hooks to be added without touching all users. No functional change intended. The wrappers are introduced in preparation for subsequent patches and are not yet used. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> --- MAINTAINERS | 1 + include/linux/zone_lock.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/linux/zone_lock.h diff --git a/MAINTAINERS b/MAINTAINERS index 55af015174a5..61e3d1f5bf43 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16680,6 +16680,7 @@ F: include/linux/pgtable.h F: include/linux/ptdump.h F: include/linux/vmpressure.h F: include/linux/vmstat.h +F: include/linux/zone_lock.h F: kernel/fork.c F: mm/Kconfig F: mm/debug.c diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h new file mode 100644 index 000000000000..c531e26280e6 --- /dev/null +++ b/include/linux/zone_lock.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_ZONE_LOCK_H +#define _LINUX_ZONE_LOCK_H + +#include <linux/mmzone.h> +#include <linux/spinlock.h> + +static inline void zone_lock_init(struct zone *zone) +{ + spin_lock_init(&zone->lock); +} + +#define zone_lock_irqsave(zone, flags) \ +do { \ + spin_lock_irqsave(&(zone)->lock, flags); \ +} while (0) + +#define zone_trylock_irqsave(zone, flags) \ +({ \ + spin_trylock_irqsave(&(zone)->lock, flags); \ +}) + +static inline void zone_unlock_irqrestore(struct zone *zone, unsigned long flags) +{ + spin_unlock_irqrestore(&zone->lock, flags); +} + +static inline void zone_lock_irq(struct zone *zone) +{ + spin_lock_irq(&zone->lock); +} + +static inline void zone_unlock_irq(struct zone *zone) +{ + spin_unlock_irq(&zone->lock); +} + +#endif /* _LINUX_ZONE_LOCK_H */ -- 2.47.3
null
null
null
[PATCH v3 1/5] mm: introduce zone lock wrappers
Zone lock contention can significantly impact allocation and reclaim latency, as it is a central synchronization point in the page allocator and reclaim paths. Improved visibility into its behavior is therefore important for diagnosing performance issues in memory-intensive workloads. On some production workloads at Meta, we have observed noticeable zone lock contention. Deeper analysis of lock holders and waiters is currently difficult with existing instrumentation. While generic lock contention_begin/contention_end tracepoints cover the slow path, they do not provide sufficient visibility into lock hold times. In particular, the lack of a release-side event makes it difficult to identify long lock holders and correlate them with waiters. As a result, distinguishing between short bursts of contention and pathological long hold times requires additional instrumentation. This patch series adds dedicated tracepoint instrumentation to zone lock, following the existing mmap_lock tracing model. The goal is to enable detailed holder/waiter analysis and lock hold time measurements without affecting the fast path when tracing is disabled. The series is structured as follows: 1. Introduce zone lock wrappers. 2. Mechanically convert zone lock users to the wrappers. 3. Convert compaction to use the wrappers (requires minor restructuring of compact_lock_irqsave()). 4. Rename zone->lock to zone->_lock. 5. Add zone lock tracepoints. The tracepoints are added via lightweight inline helpers in the wrappers. When tracing is disabled, the fast path remains unchanged. Changes in v3: - Split compact_lock_irqsave() to compact_zone_lock_irqsave() and compact_lruvec_lock_irqsave(). - Rename zone->lock to zone->_lock. Changes in v2: - Move mecanical changes from mm/compaction.c to different commit. - Removed compact_do_zone_trylock() and compact_do_raw_trylock_irqsave(). v1: https://lore.kernel.org/all/cover.1770821420.git.d@ilvokhin.com/ v2: https://lore.kernel.org/all/cover.1772030186.git.d@ilvokhin.com/ Dmitry Ilvokhin (5): mm: introduce zone lock wrappers mm: convert zone lock users to wrappers mm: convert compaction to zone lock wrappers mm: rename zone->lock to zone->_lock mm: add tracepoints for zone lock MAINTAINERS | 3 + include/linux/mmzone.h | 7 ++- include/linux/zone_lock.h | 100 +++++++++++++++++++++++++++++++ include/trace/events/zone_lock.h | 64 ++++++++++++++++++++ mm/Makefile | 2 +- mm/compaction.c | 58 +++++++++++------- mm/internal.h | 2 +- mm/memory_hotplug.c | 9 +-- mm/mm_init.c | 3 +- mm/page_alloc.c | 89 +++++++++++++-------------- mm/page_isolation.c | 23 +++---- mm/page_owner.c | 2 +- mm/page_reporting.c | 13 ++-- mm/show_mem.c | 5 +- mm/vmscan.c | 5 +- mm/vmstat.c | 9 +-- mm/zone_lock.c | 31 ++++++++++ 17 files changed, 326 insertions(+), 99 deletions(-) create mode 100644 include/linux/zone_lock.h create mode 100644 include/trace/events/zone_lock.h create mode 100644 mm/zone_lock.c -- 2.47.3
{ "author": "Dmitry Ilvokhin <d@ilvokhin.com>", "date": "Thu, 26 Feb 2026 18:26:17 +0000", "is_openbsd": false, "thread_id": "aaGuQFaCij5hvw4N@shell.ilvokhin.com.mbox.gz" }
lkml_critique
lkml
Add thin wrappers around zone lock acquire/release operations. This prepares the code for future tracepoint instrumentation without modifying individual call sites. Centralizing zone lock operations behind wrappers allows future instrumentation or debugging hooks to be added without touching all users. No functional change intended. The wrappers are introduced in preparation for subsequent patches and are not yet used. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> --- MAINTAINERS | 1 + include/linux/zone_lock.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/linux/zone_lock.h diff --git a/MAINTAINERS b/MAINTAINERS index 55af015174a5..61e3d1f5bf43 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16680,6 +16680,7 @@ F: include/linux/pgtable.h F: include/linux/ptdump.h F: include/linux/vmpressure.h F: include/linux/vmstat.h +F: include/linux/zone_lock.h F: kernel/fork.c F: mm/Kconfig F: mm/debug.c diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h new file mode 100644 index 000000000000..c531e26280e6 --- /dev/null +++ b/include/linux/zone_lock.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_ZONE_LOCK_H +#define _LINUX_ZONE_LOCK_H + +#include <linux/mmzone.h> +#include <linux/spinlock.h> + +static inline void zone_lock_init(struct zone *zone) +{ + spin_lock_init(&zone->lock); +} + +#define zone_lock_irqsave(zone, flags) \ +do { \ + spin_lock_irqsave(&(zone)->lock, flags); \ +} while (0) + +#define zone_trylock_irqsave(zone, flags) \ +({ \ + spin_trylock_irqsave(&(zone)->lock, flags); \ +}) + +static inline void zone_unlock_irqrestore(struct zone *zone, unsigned long flags) +{ + spin_unlock_irqrestore(&zone->lock, flags); +} + +static inline void zone_lock_irq(struct zone *zone) +{ + spin_lock_irq(&zone->lock); +} + +static inline void zone_unlock_irq(struct zone *zone) +{ + spin_unlock_irq(&zone->lock); +} + +#endif /* _LINUX_ZONE_LOCK_H */ -- 2.47.3
null
null
null
[PATCH v3 1/5] mm: introduce zone lock wrappers
Compaction uses compact_lock_irqsave(), which currently operates on a raw spinlock_t pointer so it can be used for both zone->lock and lruvec->lru_lock. Since zone lock operations are now wrapped, compact_lock_irqsave() can no longer directly operate on a spinlock_t when the lock belongs to a zone. Split the helper into compact_zone_lock_irqsave() and compact_lruvec_lock_irqsave(), duplicating the small amount of shared logic. As there are only two call sites and both statically know the lock type, this avoids introducing additional abstraction or runtime dispatch in the compaction path. No functional change intended. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> --- mm/compaction.c | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/mm/compaction.c b/mm/compaction.c index 47b26187a5df..9f7997e827bd 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -503,19 +503,36 @@ static bool test_and_set_skip(struct compact_control *cc, struct page *page) * * Always returns true which makes it easier to track lock state in callers. */ -static bool compact_lock_irqsave(spinlock_t *lock, unsigned long *flags, - struct compact_control *cc) - __acquires(lock) +static bool compact_zone_lock_irqsave(struct zone *zone, + unsigned long *flags, + struct compact_control *cc) +__acquires(&zone->lock) { /* Track if the lock is contended in async mode */ if (cc->mode == MIGRATE_ASYNC && !cc->contended) { - if (spin_trylock_irqsave(lock, *flags)) + if (zone_trylock_irqsave(zone, *flags)) return true; cc->contended = true; } - spin_lock_irqsave(lock, *flags); + zone_lock_irqsave(zone, *flags); + return true; +} + +static bool compact_lruvec_lock_irqsave(struct lruvec *lruvec, + unsigned long *flags, + struct compact_control *cc) +__acquires(&lruvec->lru_lock) +{ + if (cc->mode == MIGRATE_ASYNC && !cc->contended) { + if (spin_trylock_irqsave(&lruvec->lru_lock, *flags)) + return true; + + cc->contended = true; + } + + spin_lock_irqsave(&lruvec->lru_lock, *flags); return true; } @@ -531,7 +548,6 @@ static bool compact_lock_irqsave(spinlock_t *lock, unsigned long *flags, * Returns true if compaction should abort due to fatal signal pending. * Returns false when compaction can continue. */ - static bool compact_unlock_should_abort(struct zone *zone, unsigned long flags, bool *locked, @@ -616,8 +632,7 @@ static unsigned long isolate_freepages_block(struct compact_control *cc, /* If we already hold the lock, we can skip some rechecking. */ if (!locked) { - locked = compact_lock_irqsave(&cc->zone->lock, - &flags, cc); + locked = compact_zone_lock_irqsave(cc->zone, &flags, cc); /* Recheck this is a buddy page under lock */ if (!PageBuddy(page)) @@ -1163,7 +1178,7 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn, if (locked) unlock_page_lruvec_irqrestore(locked, flags); - compact_lock_irqsave(&lruvec->lru_lock, &flags, cc); + compact_lruvec_lock_irqsave(lruvec, &flags, cc); locked = lruvec; lruvec_memcg_debug(lruvec, folio); -- 2.47.3
{ "author": "Dmitry Ilvokhin <d@ilvokhin.com>", "date": "Thu, 26 Feb 2026 18:26:20 +0000", "is_openbsd": false, "thread_id": "aaGuQFaCij5hvw4N@shell.ilvokhin.com.mbox.gz" }
lkml_critique
lkml
Add thin wrappers around zone lock acquire/release operations. This prepares the code for future tracepoint instrumentation without modifying individual call sites. Centralizing zone lock operations behind wrappers allows future instrumentation or debugging hooks to be added without touching all users. No functional change intended. The wrappers are introduced in preparation for subsequent patches and are not yet used. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> --- MAINTAINERS | 1 + include/linux/zone_lock.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/linux/zone_lock.h diff --git a/MAINTAINERS b/MAINTAINERS index 55af015174a5..61e3d1f5bf43 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16680,6 +16680,7 @@ F: include/linux/pgtable.h F: include/linux/ptdump.h F: include/linux/vmpressure.h F: include/linux/vmstat.h +F: include/linux/zone_lock.h F: kernel/fork.c F: mm/Kconfig F: mm/debug.c diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h new file mode 100644 index 000000000000..c531e26280e6 --- /dev/null +++ b/include/linux/zone_lock.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_ZONE_LOCK_H +#define _LINUX_ZONE_LOCK_H + +#include <linux/mmzone.h> +#include <linux/spinlock.h> + +static inline void zone_lock_init(struct zone *zone) +{ + spin_lock_init(&zone->lock); +} + +#define zone_lock_irqsave(zone, flags) \ +do { \ + spin_lock_irqsave(&(zone)->lock, flags); \ +} while (0) + +#define zone_trylock_irqsave(zone, flags) \ +({ \ + spin_trylock_irqsave(&(zone)->lock, flags); \ +}) + +static inline void zone_unlock_irqrestore(struct zone *zone, unsigned long flags) +{ + spin_unlock_irqrestore(&zone->lock, flags); +} + +static inline void zone_lock_irq(struct zone *zone) +{ + spin_lock_irq(&zone->lock); +} + +static inline void zone_unlock_irq(struct zone *zone) +{ + spin_unlock_irq(&zone->lock); +} + +#endif /* _LINUX_ZONE_LOCK_H */ -- 2.47.3
null
null
null
[PATCH v3 1/5] mm: introduce zone lock wrappers
This intentionally breaks direct users of zone->lock at compile time so all call sites are converted to the zone lock wrappers. Without the rename, present and future out-of-tree code could continue using spin_lock(&zone->lock) and bypass the wrappers and tracing infrastructure. No functional change intended. Suggested-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> --- include/linux/mmzone.h | 7 +++++-- include/linux/zone_lock.h | 12 ++++++------ mm/compaction.c | 4 ++-- mm/internal.h | 2 +- mm/page_alloc.c | 16 ++++++++-------- mm/page_isolation.c | 4 ++-- mm/page_owner.c | 2 +- 7 files changed, 25 insertions(+), 22 deletions(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 3e51190a55e4..32bca655fce5 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -1009,8 +1009,11 @@ struct zone { /* zone flags, see below */ unsigned long flags; - /* Primarily protects free_area */ - spinlock_t lock; + /* + * Primarily protects free_area. Should be accessed via zone_lock_* + * helpers. + */ + spinlock_t _lock; /* Pages to be freed when next trylock succeeds */ struct llist_head trylock_free_pages; diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h index c531e26280e6..5ce1aa38d500 100644 --- a/include/linux/zone_lock.h +++ b/include/linux/zone_lock.h @@ -7,32 +7,32 @@ static inline void zone_lock_init(struct zone *zone) { - spin_lock_init(&zone->lock); + spin_lock_init(&zone->_lock); } #define zone_lock_irqsave(zone, flags) \ do { \ - spin_lock_irqsave(&(zone)->lock, flags); \ + spin_lock_irqsave(&(zone)->_lock, flags); \ } while (0) #define zone_trylock_irqsave(zone, flags) \ ({ \ - spin_trylock_irqsave(&(zone)->lock, flags); \ + spin_trylock_irqsave(&(zone)->_lock, flags); \ }) static inline void zone_unlock_irqrestore(struct zone *zone, unsigned long flags) { - spin_unlock_irqrestore(&zone->lock, flags); + spin_unlock_irqrestore(&zone->_lock, flags); } static inline void zone_lock_irq(struct zone *zone) { - spin_lock_irq(&zone->lock); + spin_lock_irq(&zone->_lock); } static inline void zone_unlock_irq(struct zone *zone) { - spin_unlock_irq(&zone->lock); + spin_unlock_irq(&zone->_lock); } #endif /* _LINUX_ZONE_LOCK_H */ diff --git a/mm/compaction.c b/mm/compaction.c index 9f7997e827bd..aed5bf468fd3 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -506,7 +506,7 @@ static bool test_and_set_skip(struct compact_control *cc, struct page *page) static bool compact_zone_lock_irqsave(struct zone *zone, unsigned long *flags, struct compact_control *cc) -__acquires(&zone->lock) +__acquires(&zone->_lock) { /* Track if the lock is contended in async mode */ if (cc->mode == MIGRATE_ASYNC && !cc->contended) { @@ -1402,7 +1402,7 @@ static bool suitable_migration_target(struct compact_control *cc, int order = cc->order > 0 ? cc->order : pageblock_order; /* - * We are checking page_order without zone->lock taken. But + * We are checking page_order without zone->_lock taken. But * the only small danger is that we skip a potentially suitable * pageblock, so it's not worth to check order for valid range. */ diff --git a/mm/internal.h b/mm/internal.h index cb0af847d7d9..6cb06e21ce15 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -710,7 +710,7 @@ static inline unsigned int buddy_order(struct page *page) * (d) a page and its buddy are in the same zone. * * For recording whether a page is in the buddy system, we set PageBuddy. - * Setting, clearing, and testing PageBuddy is serialized by zone->lock. + * Setting, clearing, and testing PageBuddy is serialized by zone->_lock. * * For recording page's order, we use page_private(page). */ diff --git a/mm/page_alloc.c b/mm/page_alloc.c index c5d13fe9b79f..56ca27a07a62 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -815,7 +815,7 @@ compaction_capture(struct capture_control *capc, struct page *page, static inline void account_freepages(struct zone *zone, int nr_pages, int migratetype) { - lockdep_assert_held(&zone->lock); + lockdep_assert_held(&zone->_lock); if (is_migrate_isolate(migratetype)) return; @@ -2473,7 +2473,7 @@ enum rmqueue_mode { /* * Do the hard work of removing an element from the buddy allocator. - * Call me with the zone->lock already held. + * Call me with the zone->_lock already held. */ static __always_inline struct page * __rmqueue(struct zone *zone, unsigned int order, int migratetype, @@ -2501,7 +2501,7 @@ __rmqueue(struct zone *zone, unsigned int order, int migratetype, * fallbacks modes with increasing levels of fragmentation risk. * * The fallback logic is expensive and rmqueue_bulk() calls in - * a loop with the zone->lock held, meaning the freelists are + * a loop with the zone->_lock held, meaning the freelists are * not subject to any outside changes. Remember in *mode where * we found pay dirt, to save us the search on the next call. */ @@ -3203,7 +3203,7 @@ void __putback_isolated_page(struct page *page, unsigned int order, int mt) struct zone *zone = page_zone(page); /* zone lock should be held when this function is called */ - lockdep_assert_held(&zone->lock); + lockdep_assert_held(&zone->_lock); /* Return isolated page to tail of freelist. */ __free_one_page(page, page_to_pfn(page), zone, order, mt, @@ -7086,7 +7086,7 @@ int alloc_contig_frozen_range_noprof(unsigned long start, unsigned long end, * pages. Because of this, we reserve the bigger range and * once this is done free the pages we are not interested in. * - * We don't have to hold zone->lock here because the pages are + * We don't have to hold zone->_lock here because the pages are * isolated thus they won't get removed from buddy. */ outer_start = find_large_buddy(start); @@ -7655,7 +7655,7 @@ void accept_page(struct page *page) return; } - /* Unlocks zone->lock */ + /* Unlocks zone->_lock */ __accept_page(zone, &flags, page); } @@ -7672,7 +7672,7 @@ static bool try_to_accept_memory_one(struct zone *zone) return false; } - /* Unlocks zone->lock */ + /* Unlocks zone->_lock */ __accept_page(zone, &flags, page); return true; @@ -7813,7 +7813,7 @@ struct page *alloc_frozen_pages_nolock_noprof(gfp_t gfp_flags, int nid, unsigned /* * Best effort allocation from percpu free list. - * If it's empty attempt to spin_trylock zone->lock. + * If it's empty attempt to spin_trylock zone->_lock. */ page = get_page_from_freelist(alloc_gfp, order, alloc_flags, &ac); diff --git a/mm/page_isolation.c b/mm/page_isolation.c index 56a272f38b66..78b58dae2015 100644 --- a/mm/page_isolation.c +++ b/mm/page_isolation.c @@ -212,7 +212,7 @@ static int set_migratetype_isolate(struct page *page, enum pb_isolate_mode mode, zone_unlock_irqrestore(zone, flags); if (mode == PB_ISOLATE_MODE_MEM_OFFLINE) { /* - * printk() with zone->lock held will likely trigger a + * printk() with zone->_lock held will likely trigger a * lockdep splat, so defer it here. */ dump_page(unmovable, "unmovable page"); @@ -553,7 +553,7 @@ void undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn) /* * Test all pages in the range is free(means isolated) or not. * all pages in [start_pfn...end_pfn) must be in the same zone. - * zone->lock must be held before call this. + * zone->_lock must be held before call this. * * Returns the last tested pfn. */ diff --git a/mm/page_owner.c b/mm/page_owner.c index 8178e0be557f..54a4ba63b14f 100644 --- a/mm/page_owner.c +++ b/mm/page_owner.c @@ -799,7 +799,7 @@ static void init_pages_in_zone(struct zone *zone) continue; /* - * To avoid having to grab zone->lock, be a little + * To avoid having to grab zone->_lock, be a little * careful when reading buddy page order. The only * danger is that we skip too much and potentially miss * some early allocated pages, which is better than -- 2.47.3
{ "author": "Dmitry Ilvokhin <d@ilvokhin.com>", "date": "Thu, 26 Feb 2026 18:26:21 +0000", "is_openbsd": false, "thread_id": "aaGuQFaCij5hvw4N@shell.ilvokhin.com.mbox.gz" }
lkml_critique
lkml
Add thin wrappers around zone lock acquire/release operations. This prepares the code for future tracepoint instrumentation without modifying individual call sites. Centralizing zone lock operations behind wrappers allows future instrumentation or debugging hooks to be added without touching all users. No functional change intended. The wrappers are introduced in preparation for subsequent patches and are not yet used. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> --- MAINTAINERS | 1 + include/linux/zone_lock.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/linux/zone_lock.h diff --git a/MAINTAINERS b/MAINTAINERS index 55af015174a5..61e3d1f5bf43 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16680,6 +16680,7 @@ F: include/linux/pgtable.h F: include/linux/ptdump.h F: include/linux/vmpressure.h F: include/linux/vmstat.h +F: include/linux/zone_lock.h F: kernel/fork.c F: mm/Kconfig F: mm/debug.c diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h new file mode 100644 index 000000000000..c531e26280e6 --- /dev/null +++ b/include/linux/zone_lock.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_ZONE_LOCK_H +#define _LINUX_ZONE_LOCK_H + +#include <linux/mmzone.h> +#include <linux/spinlock.h> + +static inline void zone_lock_init(struct zone *zone) +{ + spin_lock_init(&zone->lock); +} + +#define zone_lock_irqsave(zone, flags) \ +do { \ + spin_lock_irqsave(&(zone)->lock, flags); \ +} while (0) + +#define zone_trylock_irqsave(zone, flags) \ +({ \ + spin_trylock_irqsave(&(zone)->lock, flags); \ +}) + +static inline void zone_unlock_irqrestore(struct zone *zone, unsigned long flags) +{ + spin_unlock_irqrestore(&zone->lock, flags); +} + +static inline void zone_lock_irq(struct zone *zone) +{ + spin_lock_irq(&zone->lock); +} + +static inline void zone_unlock_irq(struct zone *zone) +{ + spin_unlock_irq(&zone->lock); +} + +#endif /* _LINUX_ZONE_LOCK_H */ -- 2.47.3
null
null
null
[PATCH v3 1/5] mm: introduce zone lock wrappers
Add tracepoint instrumentation to zone lock acquire/release operations via the previously introduced wrappers. The implementation follows the mmap_lock tracepoint pattern: a lightweight inline helper checks whether the tracepoint is enabled and calls into an out-of-line helper when tracing is active. When CONFIG_TRACING is disabled, helpers compile to empty inline stubs. The fast path is unaffected when tracing is disabled. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> --- MAINTAINERS | 2 + include/linux/zone_lock.h | 64 +++++++++++++++++++++++++++++++- include/trace/events/zone_lock.h | 64 ++++++++++++++++++++++++++++++++ mm/Makefile | 2 +- mm/zone_lock.c | 31 ++++++++++++++++ 5 files changed, 161 insertions(+), 2 deletions(-) create mode 100644 include/trace/events/zone_lock.h create mode 100644 mm/zone_lock.c diff --git a/MAINTAINERS b/MAINTAINERS index 61e3d1f5bf43..b5aa2bb5d2ba 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16681,6 +16681,7 @@ F: include/linux/ptdump.h F: include/linux/vmpressure.h F: include/linux/vmstat.h F: include/linux/zone_lock.h +F: include/trace/events/zone_lock.h F: kernel/fork.c F: mm/Kconfig F: mm/debug.c @@ -16700,6 +16701,7 @@ F: mm/sparse.c F: mm/util.c F: mm/vmpressure.c F: mm/vmstat.c +F: mm/zone_lock.c N: include/linux/page[-_]* MEMORY MANAGEMENT - EXECMEM diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h index 5ce1aa38d500..f32ff0fae266 100644 --- a/include/linux/zone_lock.h +++ b/include/linux/zone_lock.h @@ -4,6 +4,53 @@ #include <linux/mmzone.h> #include <linux/spinlock.h> +#include <linux/tracepoint-defs.h> + +DECLARE_TRACEPOINT(zone_lock_start_locking); +DECLARE_TRACEPOINT(zone_lock_acquire_returned); +DECLARE_TRACEPOINT(zone_lock_released); + +#ifdef CONFIG_TRACING + +void __zone_lock_do_trace_start_locking(struct zone *zone); +void __zone_lock_do_trace_acquire_returned(struct zone *zone, bool success); +void __zone_lock_do_trace_released(struct zone *zone); + +static inline void __zone_lock_trace_start_locking(struct zone *zone) +{ + if (tracepoint_enabled(zone_lock_start_locking)) + __zone_lock_do_trace_start_locking(zone); +} + +static inline void __zone_lock_trace_acquire_returned(struct zone *zone, + bool success) +{ + if (tracepoint_enabled(zone_lock_acquire_returned)) + __zone_lock_do_trace_acquire_returned(zone, success); +} + +static inline void __zone_lock_trace_released(struct zone *zone) +{ + if (tracepoint_enabled(zone_lock_released)) + __zone_lock_do_trace_released(zone); +} + +#else /* !CONFIG_TRACING */ + +static inline void __zone_lock_trace_start_locking(struct zone *zone) +{ +} + +static inline void __zone_lock_trace_acquire_returned(struct zone *zone, + bool success) +{ +} + +static inline void __zone_lock_trace_released(struct zone *zone) +{ +} + +#endif /* CONFIG_TRACING */ static inline void zone_lock_init(struct zone *zone) { @@ -12,26 +59,41 @@ static inline void zone_lock_init(struct zone *zone) #define zone_lock_irqsave(zone, flags) \ do { \ + bool success = true; \ + \ + __zone_lock_trace_start_locking(zone); \ spin_lock_irqsave(&(zone)->_lock, flags); \ + __zone_lock_trace_acquire_returned(zone, success); \ } while (0) #define zone_trylock_irqsave(zone, flags) \ ({ \ - spin_trylock_irqsave(&(zone)->_lock, flags); \ + bool success; \ + \ + __zone_lock_trace_start_locking(zone); \ + success = spin_trylock_irqsave(&(zone)->_lock, flags); \ + __zone_lock_trace_acquire_returned(zone, success); \ + success; \ }) static inline void zone_unlock_irqrestore(struct zone *zone, unsigned long flags) { + __zone_lock_trace_released(zone); spin_unlock_irqrestore(&zone->_lock, flags); } static inline void zone_lock_irq(struct zone *zone) { + bool success = true; + + __zone_lock_trace_start_locking(zone); spin_lock_irq(&zone->_lock); + __zone_lock_trace_acquire_returned(zone, success); } static inline void zone_unlock_irq(struct zone *zone) { + __zone_lock_trace_released(zone); spin_unlock_irq(&zone->_lock); } diff --git a/include/trace/events/zone_lock.h b/include/trace/events/zone_lock.h new file mode 100644 index 000000000000..3df82a8c0160 --- /dev/null +++ b/include/trace/events/zone_lock.h @@ -0,0 +1,64 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM zone_lock + +#if !defined(_TRACE_ZONE_LOCK_H) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACE_ZONE_LOCK_H + +#include <linux/tracepoint.h> +#include <linux/types.h> + +struct zone; + +DECLARE_EVENT_CLASS(zone_lock, + + TP_PROTO(struct zone *zone), + + TP_ARGS(zone), + + TP_STRUCT__entry( + __field(struct zone *, zone) + ), + + TP_fast_assign( + __entry->zone = zone; + ), + + TP_printk("zone=%p", __entry->zone) +); + +#define DEFINE_ZONE_LOCK_EVENT(name) \ + DEFINE_EVENT(zone_lock, name, \ + TP_PROTO(struct zone *zone), \ + TP_ARGS(zone)) + +DEFINE_ZONE_LOCK_EVENT(zone_lock_start_locking); +DEFINE_ZONE_LOCK_EVENT(zone_lock_released); + +TRACE_EVENT(zone_lock_acquire_returned, + + TP_PROTO(struct zone *zone, bool success), + + TP_ARGS(zone, success), + + TP_STRUCT__entry( + __field(struct zone *, zone) + __field(bool, success) + ), + + TP_fast_assign( + __entry->zone = zone; + __entry->success = success; + ), + + TP_printk( + "zone=%p success=%s", + __entry->zone, + __entry->success ? "true" : "false" + ) +); + +#endif /* _TRACE_ZONE_LOCK_H */ + +/* This part must be outside protection */ +#include <trace/define_trace.h> diff --git a/mm/Makefile b/mm/Makefile index 8ad2ab08244e..ffd06cf7a04e 100644 --- a/mm/Makefile +++ b/mm/Makefile @@ -55,7 +55,7 @@ obj-y := filemap.o mempool.o oom_kill.o fadvise.o \ mm_init.o percpu.o slab_common.o \ compaction.o show_mem.o \ interval_tree.o list_lru.o workingset.o \ - debug.o gup.o mmap_lock.o vma_init.o $(mmu-y) + debug.o gup.o mmap_lock.o zone_lock.o vma_init.o $(mmu-y) # Give 'page_alloc' its own module-parameter namespace page-alloc-y := page_alloc.o diff --git a/mm/zone_lock.c b/mm/zone_lock.c new file mode 100644 index 000000000000..f647fd2aca48 --- /dev/null +++ b/mm/zone_lock.c @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: GPL-2.0 +#define CREATE_TRACE_POINTS +#include <trace/events/zone_lock.h> + +#include <linux/zone_lock.h> + +EXPORT_TRACEPOINT_SYMBOL(zone_lock_start_locking); +EXPORT_TRACEPOINT_SYMBOL(zone_lock_acquire_returned); +EXPORT_TRACEPOINT_SYMBOL(zone_lock_released); + +#ifdef CONFIG_TRACING + +void __zone_lock_do_trace_start_locking(struct zone *zone) +{ + trace_zone_lock_start_locking(zone); +} +EXPORT_SYMBOL(__zone_lock_do_trace_start_locking); + +void __zone_lock_do_trace_acquire_returned(struct zone *zone, bool success) +{ + trace_zone_lock_acquire_returned(zone, success); +} +EXPORT_SYMBOL(__zone_lock_do_trace_acquire_returned); + +void __zone_lock_do_trace_released(struct zone *zone) +{ + trace_zone_lock_released(zone); +} +EXPORT_SYMBOL(__zone_lock_do_trace_released); + +#endif /* CONFIG_TRACING */ -- 2.47.3
{ "author": "Dmitry Ilvokhin <d@ilvokhin.com>", "date": "Thu, 26 Feb 2026 18:26:22 +0000", "is_openbsd": false, "thread_id": "aaGuQFaCij5hvw4N@shell.ilvokhin.com.mbox.gz" }
lkml_critique
lkml
Add thin wrappers around zone lock acquire/release operations. This prepares the code for future tracepoint instrumentation without modifying individual call sites. Centralizing zone lock operations behind wrappers allows future instrumentation or debugging hooks to be added without touching all users. No functional change intended. The wrappers are introduced in preparation for subsequent patches and are not yet used. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> --- MAINTAINERS | 1 + include/linux/zone_lock.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/linux/zone_lock.h diff --git a/MAINTAINERS b/MAINTAINERS index 55af015174a5..61e3d1f5bf43 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16680,6 +16680,7 @@ F: include/linux/pgtable.h F: include/linux/ptdump.h F: include/linux/vmpressure.h F: include/linux/vmstat.h +F: include/linux/zone_lock.h F: kernel/fork.c F: mm/Kconfig F: mm/debug.c diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h new file mode 100644 index 000000000000..c531e26280e6 --- /dev/null +++ b/include/linux/zone_lock.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_ZONE_LOCK_H +#define _LINUX_ZONE_LOCK_H + +#include <linux/mmzone.h> +#include <linux/spinlock.h> + +static inline void zone_lock_init(struct zone *zone) +{ + spin_lock_init(&zone->lock); +} + +#define zone_lock_irqsave(zone, flags) \ +do { \ + spin_lock_irqsave(&(zone)->lock, flags); \ +} while (0) + +#define zone_trylock_irqsave(zone, flags) \ +({ \ + spin_trylock_irqsave(&(zone)->lock, flags); \ +}) + +static inline void zone_unlock_irqrestore(struct zone *zone, unsigned long flags) +{ + spin_unlock_irqrestore(&zone->lock, flags); +} + +static inline void zone_lock_irq(struct zone *zone) +{ + spin_lock_irq(&zone->lock); +} + +static inline void zone_unlock_irq(struct zone *zone) +{ + spin_unlock_irq(&zone->lock); +} + +#endif /* _LINUX_ZONE_LOCK_H */ -- 2.47.3
null
null
null
[PATCH v3 1/5] mm: introduce zone lock wrappers
Replace direct zone lock acquire/release operations with the newly introduced wrappers. The changes are purely mechanical substitutions. No functional change intended. Locking semantics and ordering remain unchanged. The compaction path is left unchanged for now and will be handled separately in the following patch due to additional non-trivial modifications. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> --- mm/compaction.c | 25 +++++++++------- mm/memory_hotplug.c | 9 +++--- mm/mm_init.c | 3 +- mm/page_alloc.c | 73 +++++++++++++++++++++++---------------------- mm/page_isolation.c | 19 ++++++------ mm/page_reporting.c | 13 ++++---- mm/show_mem.c | 5 ++-- mm/vmscan.c | 5 ++-- mm/vmstat.c | 9 +++--- 9 files changed, 86 insertions(+), 75 deletions(-) diff --git a/mm/compaction.c b/mm/compaction.c index 1e8f8eca318c..47b26187a5df 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -24,6 +24,7 @@ #include <linux/page_owner.h> #include <linux/psi.h> #include <linux/cpuset.h> +#include <linux/zone_lock.h> #include "internal.h" #ifdef CONFIG_COMPACTION @@ -530,11 +531,14 @@ static bool compact_lock_irqsave(spinlock_t *lock, unsigned long *flags, * Returns true if compaction should abort due to fatal signal pending. * Returns false when compaction can continue. */ -static bool compact_unlock_should_abort(spinlock_t *lock, - unsigned long flags, bool *locked, struct compact_control *cc) + +static bool compact_unlock_should_abort(struct zone *zone, + unsigned long flags, + bool *locked, + struct compact_control *cc) { if (*locked) { - spin_unlock_irqrestore(lock, flags); + zone_unlock_irqrestore(zone, flags); *locked = false; } @@ -582,9 +586,8 @@ static unsigned long isolate_freepages_block(struct compact_control *cc, * contention, to give chance to IRQs. Abort if fatal signal * pending. */ - if (!(blockpfn % COMPACT_CLUSTER_MAX) - && compact_unlock_should_abort(&cc->zone->lock, flags, - &locked, cc)) + if (!(blockpfn % COMPACT_CLUSTER_MAX) && + compact_unlock_should_abort(cc->zone, flags, &locked, cc)) break; nr_scanned++; @@ -649,7 +652,7 @@ static unsigned long isolate_freepages_block(struct compact_control *cc, } if (locked) - spin_unlock_irqrestore(&cc->zone->lock, flags); + zone_unlock_irqrestore(cc->zone, flags); /* * Be careful to not go outside of the pageblock. @@ -1555,7 +1558,7 @@ static void fast_isolate_freepages(struct compact_control *cc) if (!area->nr_free) continue; - spin_lock_irqsave(&cc->zone->lock, flags); + zone_lock_irqsave(cc->zone, flags); freelist = &area->free_list[MIGRATE_MOVABLE]; list_for_each_entry_reverse(freepage, freelist, buddy_list) { unsigned long pfn; @@ -1614,7 +1617,7 @@ static void fast_isolate_freepages(struct compact_control *cc) } } - spin_unlock_irqrestore(&cc->zone->lock, flags); + zone_unlock_irqrestore(cc->zone, flags); /* Skip fast search if enough freepages isolated */ if (cc->nr_freepages >= cc->nr_migratepages) @@ -1988,7 +1991,7 @@ static unsigned long fast_find_migrateblock(struct compact_control *cc) if (!area->nr_free) continue; - spin_lock_irqsave(&cc->zone->lock, flags); + zone_lock_irqsave(cc->zone, flags); freelist = &area->free_list[MIGRATE_MOVABLE]; list_for_each_entry(freepage, freelist, buddy_list) { unsigned long free_pfn; @@ -2021,7 +2024,7 @@ static unsigned long fast_find_migrateblock(struct compact_control *cc) break; } } - spin_unlock_irqrestore(&cc->zone->lock, flags); + zone_unlock_irqrestore(cc->zone, flags); } cc->total_migrate_scanned += nr_scanned; diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index bc805029da51..cfc0103fa50e 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -36,6 +36,7 @@ #include <linux/rmap.h> #include <linux/module.h> #include <linux/node.h> +#include <linux/zone_lock.h> #include <asm/tlbflush.h> @@ -1190,9 +1191,9 @@ int online_pages(unsigned long pfn, unsigned long nr_pages, * Fixup the number of isolated pageblocks before marking the sections * onlining, such that undo_isolate_page_range() works correctly. */ - spin_lock_irqsave(&zone->lock, flags); + zone_lock_irqsave(zone, flags); zone->nr_isolate_pageblock += nr_pages / pageblock_nr_pages; - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); /* * If this zone is not populated, then it is not in zonelist. @@ -2041,9 +2042,9 @@ int offline_pages(unsigned long start_pfn, unsigned long nr_pages, * effectively stale; nobody should be touching them. Fixup the number * of isolated pageblocks, memory onlining will properly revert this. */ - spin_lock_irqsave(&zone->lock, flags); + zone_lock_irqsave(zone, flags); zone->nr_isolate_pageblock -= nr_pages / pageblock_nr_pages; - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); lru_cache_enable(); zone_pcp_enable(zone); diff --git a/mm/mm_init.c b/mm/mm_init.c index 61d983d23f55..6dd37621248b 100644 --- a/mm/mm_init.c +++ b/mm/mm_init.c @@ -32,6 +32,7 @@ #include <linux/vmstat.h> #include <linux/kexec_handover.h> #include <linux/hugetlb.h> +#include <linux/zone_lock.h> #include "internal.h" #include "slab.h" #include "shuffle.h" @@ -1425,7 +1426,7 @@ static void __meminit zone_init_internals(struct zone *zone, enum zone_type idx, zone_set_nid(zone, nid); zone->name = zone_names[idx]; zone->zone_pgdat = NODE_DATA(nid); - spin_lock_init(&zone->lock); + zone_lock_init(zone); zone_seqlock_init(zone); zone_pcp_init(zone); } diff --git a/mm/page_alloc.c b/mm/page_alloc.c index fcc32737f451..c5d13fe9b79f 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -54,6 +54,7 @@ #include <linux/delayacct.h> #include <linux/cacheinfo.h> #include <linux/pgalloc_tag.h> +#include <linux/zone_lock.h> #include <asm/div64.h> #include "internal.h" #include "shuffle.h" @@ -1500,7 +1501,7 @@ static void free_pcppages_bulk(struct zone *zone, int count, /* Ensure requested pindex is drained first. */ pindex = pindex - 1; - spin_lock_irqsave(&zone->lock, flags); + zone_lock_irqsave(zone, flags); while (count > 0) { struct list_head *list; @@ -1533,7 +1534,7 @@ static void free_pcppages_bulk(struct zone *zone, int count, } while (count > 0 && !list_empty(list)); } - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); } /* Split a multi-block free page into its individual pageblocks. */ @@ -1577,12 +1578,12 @@ static void free_one_page(struct zone *zone, struct page *page, unsigned long flags; if (unlikely(fpi_flags & FPI_TRYLOCK)) { - if (!spin_trylock_irqsave(&zone->lock, flags)) { + if (!zone_trylock_irqsave(zone, flags)) { add_page_to_zone_llist(zone, page, order); return; } } else { - spin_lock_irqsave(&zone->lock, flags); + zone_lock_irqsave(zone, flags); } /* The lock succeeded. Process deferred pages. */ @@ -1600,7 +1601,7 @@ static void free_one_page(struct zone *zone, struct page *page, } } split_large_buddy(zone, page, pfn, order, fpi_flags); - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); __count_vm_events(PGFREE, 1 << order); } @@ -2553,10 +2554,10 @@ static int rmqueue_bulk(struct zone *zone, unsigned int order, int i; if (unlikely(alloc_flags & ALLOC_TRYLOCK)) { - if (!spin_trylock_irqsave(&zone->lock, flags)) + if (!zone_trylock_irqsave(zone, flags)) return 0; } else { - spin_lock_irqsave(&zone->lock, flags); + zone_lock_irqsave(zone, flags); } for (i = 0; i < count; ++i) { struct page *page = __rmqueue(zone, order, migratetype, @@ -2576,7 +2577,7 @@ static int rmqueue_bulk(struct zone *zone, unsigned int order, */ list_add_tail(&page->pcp_list, list); } - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); return i; } @@ -3246,10 +3247,10 @@ struct page *rmqueue_buddy(struct zone *preferred_zone, struct zone *zone, do { page = NULL; if (unlikely(alloc_flags & ALLOC_TRYLOCK)) { - if (!spin_trylock_irqsave(&zone->lock, flags)) + if (!zone_trylock_irqsave(zone, flags)) return NULL; } else { - spin_lock_irqsave(&zone->lock, flags); + zone_lock_irqsave(zone, flags); } if (alloc_flags & ALLOC_HIGHATOMIC) page = __rmqueue_smallest(zone, order, MIGRATE_HIGHATOMIC); @@ -3268,11 +3269,11 @@ struct page *rmqueue_buddy(struct zone *preferred_zone, struct zone *zone, page = __rmqueue_smallest(zone, order, MIGRATE_HIGHATOMIC); if (!page) { - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); return NULL; } } - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); } while (check_new_pages(page, order)); __count_zid_vm_events(PGALLOC, page_zonenum(page), 1 << order); @@ -3459,7 +3460,7 @@ static void reserve_highatomic_pageblock(struct page *page, int order, if (zone->nr_reserved_highatomic >= max_managed) return; - spin_lock_irqsave(&zone->lock, flags); + zone_lock_irqsave(zone, flags); /* Recheck the nr_reserved_highatomic limit under the lock */ if (zone->nr_reserved_highatomic >= max_managed) @@ -3481,7 +3482,7 @@ static void reserve_highatomic_pageblock(struct page *page, int order, } out_unlock: - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); } /* @@ -3514,7 +3515,7 @@ static bool unreserve_highatomic_pageblock(const struct alloc_context *ac, pageblock_nr_pages) continue; - spin_lock_irqsave(&zone->lock, flags); + zone_lock_irqsave(zone, flags); for (order = 0; order < NR_PAGE_ORDERS; order++) { struct free_area *area = &(zone->free_area[order]); unsigned long size; @@ -3562,11 +3563,11 @@ static bool unreserve_highatomic_pageblock(const struct alloc_context *ac, */ WARN_ON_ONCE(ret == -1); if (ret > 0) { - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); return ret; } } - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); } return false; @@ -6446,7 +6447,7 @@ static void __setup_per_zone_wmarks(void) for_each_zone(zone) { u64 tmp; - spin_lock_irqsave(&zone->lock, flags); + zone_lock_irqsave(zone, flags); tmp = (u64)pages_min * zone_managed_pages(zone); tmp = div64_ul(tmp, lowmem_pages); if (is_highmem(zone) || zone_idx(zone) == ZONE_MOVABLE) { @@ -6487,7 +6488,7 @@ static void __setup_per_zone_wmarks(void) zone->_watermark[WMARK_PROMO] = high_wmark_pages(zone) + tmp; trace_mm_setup_per_zone_wmarks(zone); - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); } /* update totalreserve_pages */ @@ -7257,7 +7258,7 @@ struct page *alloc_contig_frozen_pages_noprof(unsigned long nr_pages, zonelist = node_zonelist(nid, gfp_mask); for_each_zone_zonelist_nodemask(zone, z, zonelist, gfp_zone(gfp_mask), nodemask) { - spin_lock_irqsave(&zone->lock, flags); + zone_lock_irqsave(zone, flags); pfn = ALIGN(zone->zone_start_pfn, nr_pages); while (zone_spans_last_pfn(zone, pfn, nr_pages)) { @@ -7271,18 +7272,18 @@ struct page *alloc_contig_frozen_pages_noprof(unsigned long nr_pages, * allocation spinning on this lock, it may * win the race and cause allocation to fail. */ - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); ret = alloc_contig_frozen_range_noprof(pfn, pfn + nr_pages, ACR_FLAGS_NONE, gfp_mask); if (!ret) return pfn_to_page(pfn); - spin_lock_irqsave(&zone->lock, flags); + zone_lock_irqsave(zone, flags); } pfn += nr_pages; } - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); } /* * If we failed, retry the search, but treat regions with HugeTLB pages @@ -7436,7 +7437,7 @@ unsigned long __offline_isolated_pages(unsigned long start_pfn, offline_mem_sections(pfn, end_pfn); zone = page_zone(pfn_to_page(pfn)); - spin_lock_irqsave(&zone->lock, flags); + zone_lock_irqsave(zone, flags); while (pfn < end_pfn) { page = pfn_to_page(pfn); /* @@ -7466,7 +7467,7 @@ unsigned long __offline_isolated_pages(unsigned long start_pfn, del_page_from_free_list(page, zone, order, MIGRATE_ISOLATE); pfn += (1 << order); } - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); return end_pfn - start_pfn - already_offline; } @@ -7542,7 +7543,7 @@ bool take_page_off_buddy(struct page *page) unsigned int order; bool ret = false; - spin_lock_irqsave(&zone->lock, flags); + zone_lock_irqsave(zone, flags); for (order = 0; order < NR_PAGE_ORDERS; order++) { struct page *page_head = page - (pfn & ((1 << order) - 1)); int page_order = buddy_order(page_head); @@ -7563,7 +7564,7 @@ bool take_page_off_buddy(struct page *page) if (page_count(page_head) > 0) break; } - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); return ret; } @@ -7576,7 +7577,7 @@ bool put_page_back_buddy(struct page *page) unsigned long flags; bool ret = false; - spin_lock_irqsave(&zone->lock, flags); + zone_lock_irqsave(zone, flags); if (put_page_testzero(page)) { unsigned long pfn = page_to_pfn(page); int migratetype = get_pfnblock_migratetype(page, pfn); @@ -7587,7 +7588,7 @@ bool put_page_back_buddy(struct page *page) ret = true; } } - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); return ret; } @@ -7636,7 +7637,7 @@ static void __accept_page(struct zone *zone, unsigned long *flags, account_freepages(zone, -MAX_ORDER_NR_PAGES, MIGRATE_MOVABLE); __mod_zone_page_state(zone, NR_UNACCEPTED, -MAX_ORDER_NR_PAGES); __ClearPageUnaccepted(page); - spin_unlock_irqrestore(&zone->lock, *flags); + zone_unlock_irqrestore(zone, *flags); accept_memory(page_to_phys(page), PAGE_SIZE << MAX_PAGE_ORDER); @@ -7648,9 +7649,9 @@ void accept_page(struct page *page) struct zone *zone = page_zone(page); unsigned long flags; - spin_lock_irqsave(&zone->lock, flags); + zone_lock_irqsave(zone, flags); if (!PageUnaccepted(page)) { - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); return; } @@ -7663,11 +7664,11 @@ static bool try_to_accept_memory_one(struct zone *zone) unsigned long flags; struct page *page; - spin_lock_irqsave(&zone->lock, flags); + zone_lock_irqsave(zone, flags); page = list_first_entry_or_null(&zone->unaccepted_pages, struct page, lru); if (!page) { - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); return false; } @@ -7724,12 +7725,12 @@ static bool __free_unaccepted(struct page *page) if (!lazy_accept) return false; - spin_lock_irqsave(&zone->lock, flags); + zone_lock_irqsave(zone, flags); list_add_tail(&page->lru, &zone->unaccepted_pages); account_freepages(zone, MAX_ORDER_NR_PAGES, MIGRATE_MOVABLE); __mod_zone_page_state(zone, NR_UNACCEPTED, MAX_ORDER_NR_PAGES); __SetPageUnaccepted(page); - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); return true; } diff --git a/mm/page_isolation.c b/mm/page_isolation.c index c48ff5c00244..56a272f38b66 100644 --- a/mm/page_isolation.c +++ b/mm/page_isolation.c @@ -10,6 +10,7 @@ #include <linux/hugetlb.h> #include <linux/page_owner.h> #include <linux/migrate.h> +#include <linux/zone_lock.h> #include "internal.h" #define CREATE_TRACE_POINTS @@ -173,7 +174,7 @@ static int set_migratetype_isolate(struct page *page, enum pb_isolate_mode mode, if (PageUnaccepted(page)) accept_page(page); - spin_lock_irqsave(&zone->lock, flags); + zone_lock_irqsave(zone, flags); /* * We assume the caller intended to SET migrate type to isolate. @@ -181,7 +182,7 @@ static int set_migratetype_isolate(struct page *page, enum pb_isolate_mode mode, * set it before us. */ if (is_migrate_isolate_page(page)) { - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); return -EBUSY; } @@ -200,15 +201,15 @@ static int set_migratetype_isolate(struct page *page, enum pb_isolate_mode mode, mode); if (!unmovable) { if (!pageblock_isolate_and_move_free_pages(zone, page)) { - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); return -EBUSY; } zone->nr_isolate_pageblock++; - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); return 0; } - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); if (mode == PB_ISOLATE_MODE_MEM_OFFLINE) { /* * printk() with zone->lock held will likely trigger a @@ -229,7 +230,7 @@ static void unset_migratetype_isolate(struct page *page) struct page *buddy; zone = page_zone(page); - spin_lock_irqsave(&zone->lock, flags); + zone_lock_irqsave(zone, flags); if (!is_migrate_isolate_page(page)) goto out; @@ -280,7 +281,7 @@ static void unset_migratetype_isolate(struct page *page) } zone->nr_isolate_pageblock--; out: - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); } static inline struct page * @@ -641,9 +642,9 @@ int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn, /* Check all pages are free or marked as ISOLATED */ zone = page_zone(page); - spin_lock_irqsave(&zone->lock, flags); + zone_lock_irqsave(zone, flags); pfn = __test_page_isolated_in_pageblock(start_pfn, end_pfn, mode); - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); ret = pfn < end_pfn ? -EBUSY : 0; diff --git a/mm/page_reporting.c b/mm/page_reporting.c index f0042d5743af..37e54e16538b 100644 --- a/mm/page_reporting.c +++ b/mm/page_reporting.c @@ -7,6 +7,7 @@ #include <linux/module.h> #include <linux/delay.h> #include <linux/scatterlist.h> +#include <linux/zone_lock.h> #include "page_reporting.h" #include "internal.h" @@ -161,7 +162,7 @@ page_reporting_cycle(struct page_reporting_dev_info *prdev, struct zone *zone, if (list_empty(list)) return err; - spin_lock_irq(&zone->lock); + zone_lock_irq(zone); /* * Limit how many calls we will be making to the page reporting @@ -219,7 +220,7 @@ page_reporting_cycle(struct page_reporting_dev_info *prdev, struct zone *zone, list_rotate_to_front(&page->lru, list); /* release lock before waiting on report processing */ - spin_unlock_irq(&zone->lock); + zone_unlock_irq(zone); /* begin processing pages in local list */ err = prdev->report(prdev, sgl, PAGE_REPORTING_CAPACITY); @@ -231,7 +232,7 @@ page_reporting_cycle(struct page_reporting_dev_info *prdev, struct zone *zone, budget--; /* reacquire zone lock and resume processing */ - spin_lock_irq(&zone->lock); + zone_lock_irq(zone); /* flush reported pages from the sg list */ page_reporting_drain(prdev, sgl, PAGE_REPORTING_CAPACITY, !err); @@ -251,7 +252,7 @@ page_reporting_cycle(struct page_reporting_dev_info *prdev, struct zone *zone, if (!list_entry_is_head(next, list, lru) && !list_is_first(&next->lru, list)) list_rotate_to_front(&next->lru, list); - spin_unlock_irq(&zone->lock); + zone_unlock_irq(zone); return err; } @@ -296,9 +297,9 @@ page_reporting_process_zone(struct page_reporting_dev_info *prdev, err = prdev->report(prdev, sgl, leftover); /* flush any remaining pages out from the last report */ - spin_lock_irq(&zone->lock); + zone_lock_irq(zone); page_reporting_drain(prdev, sgl, leftover, !err); - spin_unlock_irq(&zone->lock); + zone_unlock_irq(zone); } return err; diff --git a/mm/show_mem.c b/mm/show_mem.c index 24078ac3e6bc..245beca127af 100644 --- a/mm/show_mem.c +++ b/mm/show_mem.c @@ -14,6 +14,7 @@ #include <linux/mmzone.h> #include <linux/swap.h> #include <linux/vmstat.h> +#include <linux/zone_lock.h> #include "internal.h" #include "swap.h" @@ -363,7 +364,7 @@ static void show_free_areas(unsigned int filter, nodemask_t *nodemask, int max_z show_node(zone); printk(KERN_CONT "%s: ", zone->name); - spin_lock_irqsave(&zone->lock, flags); + zone_lock_irqsave(zone, flags); for (order = 0; order < NR_PAGE_ORDERS; order++) { struct free_area *area = &zone->free_area[order]; int type; @@ -377,7 +378,7 @@ static void show_free_areas(unsigned int filter, nodemask_t *nodemask, int max_z types[order] |= 1 << type; } } - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); for (order = 0; order < NR_PAGE_ORDERS; order++) { printk(KERN_CONT "%lu*%lukB ", nr[order], K(1UL) << order); diff --git a/mm/vmscan.c b/mm/vmscan.c index 0fc9373e8251..b369e00e8415 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -58,6 +58,7 @@ #include <linux/random.h> #include <linux/mmu_notifier.h> #include <linux/parser.h> +#include <linux/zone_lock.h> #include <asm/tlbflush.h> #include <asm/div64.h> @@ -7139,9 +7140,9 @@ static int balance_pgdat(pg_data_t *pgdat, int order, int highest_zoneidx) /* Increments are under the zone lock */ zone = pgdat->node_zones + i; - spin_lock_irqsave(&zone->lock, flags); + zone_lock_irqsave(zone, flags); zone->watermark_boost -= min(zone->watermark_boost, zone_boosts[i]); - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); } /* diff --git a/mm/vmstat.c b/mm/vmstat.c index 86b14b0f77b5..299b461a6b4b 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -28,6 +28,7 @@ #include <linux/mm_inline.h> #include <linux/page_owner.h> #include <linux/sched/isolation.h> +#include <linux/zone_lock.h> #include "internal.h" @@ -1535,10 +1536,10 @@ static void walk_zones_in_node(struct seq_file *m, pg_data_t *pgdat, continue; if (!nolock) - spin_lock_irqsave(&zone->lock, flags); + zone_lock_irqsave(zone, flags); print(m, pgdat, zone); if (!nolock) - spin_unlock_irqrestore(&zone->lock, flags); + zone_unlock_irqrestore(zone, flags); } } #endif @@ -1603,9 +1604,9 @@ static void pagetypeinfo_showfree_print(struct seq_file *m, } } seq_printf(m, "%s%6lu ", overflow ? ">" : "", freecount); - spin_unlock_irq(&zone->lock); + zone_unlock_irq(zone); cond_resched(); - spin_lock_irq(&zone->lock); + zone_lock_irq(zone); } seq_putc(m, '\n'); } -- 2.47.3
{ "author": "Dmitry Ilvokhin <d@ilvokhin.com>", "date": "Thu, 26 Feb 2026 18:26:19 +0000", "is_openbsd": false, "thread_id": "aaGuQFaCij5hvw4N@shell.ilvokhin.com.mbox.gz" }
lkml_critique
lkml
Add thin wrappers around zone lock acquire/release operations. This prepares the code for future tracepoint instrumentation without modifying individual call sites. Centralizing zone lock operations behind wrappers allows future instrumentation or debugging hooks to be added without touching all users. No functional change intended. The wrappers are introduced in preparation for subsequent patches and are not yet used. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> --- MAINTAINERS | 1 + include/linux/zone_lock.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/linux/zone_lock.h diff --git a/MAINTAINERS b/MAINTAINERS index 55af015174a5..61e3d1f5bf43 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16680,6 +16680,7 @@ F: include/linux/pgtable.h F: include/linux/ptdump.h F: include/linux/vmpressure.h F: include/linux/vmstat.h +F: include/linux/zone_lock.h F: kernel/fork.c F: mm/Kconfig F: mm/debug.c diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h new file mode 100644 index 000000000000..c531e26280e6 --- /dev/null +++ b/include/linux/zone_lock.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_ZONE_LOCK_H +#define _LINUX_ZONE_LOCK_H + +#include <linux/mmzone.h> +#include <linux/spinlock.h> + +static inline void zone_lock_init(struct zone *zone) +{ + spin_lock_init(&zone->lock); +} + +#define zone_lock_irqsave(zone, flags) \ +do { \ + spin_lock_irqsave(&(zone)->lock, flags); \ +} while (0) + +#define zone_trylock_irqsave(zone, flags) \ +({ \ + spin_trylock_irqsave(&(zone)->lock, flags); \ +}) + +static inline void zone_unlock_irqrestore(struct zone *zone, unsigned long flags) +{ + spin_unlock_irqrestore(&zone->lock, flags); +} + +static inline void zone_lock_irq(struct zone *zone) +{ + spin_lock_irq(&zone->lock); +} + +static inline void zone_unlock_irq(struct zone *zone) +{ + spin_unlock_irq(&zone->lock); +} + +#endif /* _LINUX_ZONE_LOCK_H */ -- 2.47.3
null
null
null
[PATCH v3 1/5] mm: introduce zone lock wrappers
On Thu, Feb 26, 2026 at 06:26:20PM +0000, Dmitry Ilvokhin wrote: Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
{ "author": "Shakeel Butt <shakeel.butt@linux.dev>", "date": "Thu, 26 Feb 2026 11:07:47 -0800", "is_openbsd": false, "thread_id": "aaGuQFaCij5hvw4N@shell.ilvokhin.com.mbox.gz" }
lkml_critique
lkml
Add thin wrappers around zone lock acquire/release operations. This prepares the code for future tracepoint instrumentation without modifying individual call sites. Centralizing zone lock operations behind wrappers allows future instrumentation or debugging hooks to be added without touching all users. No functional change intended. The wrappers are introduced in preparation for subsequent patches and are not yet used. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> --- MAINTAINERS | 1 + include/linux/zone_lock.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/linux/zone_lock.h diff --git a/MAINTAINERS b/MAINTAINERS index 55af015174a5..61e3d1f5bf43 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16680,6 +16680,7 @@ F: include/linux/pgtable.h F: include/linux/ptdump.h F: include/linux/vmpressure.h F: include/linux/vmstat.h +F: include/linux/zone_lock.h F: kernel/fork.c F: mm/Kconfig F: mm/debug.c diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h new file mode 100644 index 000000000000..c531e26280e6 --- /dev/null +++ b/include/linux/zone_lock.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_ZONE_LOCK_H +#define _LINUX_ZONE_LOCK_H + +#include <linux/mmzone.h> +#include <linux/spinlock.h> + +static inline void zone_lock_init(struct zone *zone) +{ + spin_lock_init(&zone->lock); +} + +#define zone_lock_irqsave(zone, flags) \ +do { \ + spin_lock_irqsave(&(zone)->lock, flags); \ +} while (0) + +#define zone_trylock_irqsave(zone, flags) \ +({ \ + spin_trylock_irqsave(&(zone)->lock, flags); \ +}) + +static inline void zone_unlock_irqrestore(struct zone *zone, unsigned long flags) +{ + spin_unlock_irqrestore(&zone->lock, flags); +} + +static inline void zone_lock_irq(struct zone *zone) +{ + spin_lock_irq(&zone->lock); +} + +static inline void zone_unlock_irq(struct zone *zone) +{ + spin_unlock_irq(&zone->lock); +} + +#endif /* _LINUX_ZONE_LOCK_H */ -- 2.47.3
null
null
null
[PATCH v3 1/5] mm: introduce zone lock wrappers
On Thu, Feb 26, 2026 at 06:26:21PM +0000, Dmitry Ilvokhin wrote: Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
{ "author": "Shakeel Butt <shakeel.butt@linux.dev>", "date": "Thu, 26 Feb 2026 11:09:59 -0800", "is_openbsd": false, "thread_id": "aaGuQFaCij5hvw4N@shell.ilvokhin.com.mbox.gz" }
lkml_critique
lkml
Add thin wrappers around zone lock acquire/release operations. This prepares the code for future tracepoint instrumentation without modifying individual call sites. Centralizing zone lock operations behind wrappers allows future instrumentation or debugging hooks to be added without touching all users. No functional change intended. The wrappers are introduced in preparation for subsequent patches and are not yet used. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> --- MAINTAINERS | 1 + include/linux/zone_lock.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/linux/zone_lock.h diff --git a/MAINTAINERS b/MAINTAINERS index 55af015174a5..61e3d1f5bf43 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16680,6 +16680,7 @@ F: include/linux/pgtable.h F: include/linux/ptdump.h F: include/linux/vmpressure.h F: include/linux/vmstat.h +F: include/linux/zone_lock.h F: kernel/fork.c F: mm/Kconfig F: mm/debug.c diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h new file mode 100644 index 000000000000..c531e26280e6 --- /dev/null +++ b/include/linux/zone_lock.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_ZONE_LOCK_H +#define _LINUX_ZONE_LOCK_H + +#include <linux/mmzone.h> +#include <linux/spinlock.h> + +static inline void zone_lock_init(struct zone *zone) +{ + spin_lock_init(&zone->lock); +} + +#define zone_lock_irqsave(zone, flags) \ +do { \ + spin_lock_irqsave(&(zone)->lock, flags); \ +} while (0) + +#define zone_trylock_irqsave(zone, flags) \ +({ \ + spin_trylock_irqsave(&(zone)->lock, flags); \ +}) + +static inline void zone_unlock_irqrestore(struct zone *zone, unsigned long flags) +{ + spin_unlock_irqrestore(&zone->lock, flags); +} + +static inline void zone_lock_irq(struct zone *zone) +{ + spin_lock_irq(&zone->lock); +} + +static inline void zone_unlock_irq(struct zone *zone) +{ + spin_unlock_irq(&zone->lock); +} + +#endif /* _LINUX_ZONE_LOCK_H */ -- 2.47.3
null
null
null
[PATCH v3 1/5] mm: introduce zone lock wrappers
On Thu, Feb 26, 2026 at 06:26:22PM +0000, Dmitry Ilvokhin wrote: One nit below other than that: Acked-by: Shakeel Butt <shakeel.butt@linux.dev> [...] No reason to not have these as EXPORT_SYMBOL_GPL (& below)
{ "author": "Shakeel Butt <shakeel.butt@linux.dev>", "date": "Thu, 26 Feb 2026 11:14:52 -0800", "is_openbsd": false, "thread_id": "aaGuQFaCij5hvw4N@shell.ilvokhin.com.mbox.gz" }
lkml_critique
lkml
Add thin wrappers around zone lock acquire/release operations. This prepares the code for future tracepoint instrumentation without modifying individual call sites. Centralizing zone lock operations behind wrappers allows future instrumentation or debugging hooks to be added without touching all users. No functional change intended. The wrappers are introduced in preparation for subsequent patches and are not yet used. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> --- MAINTAINERS | 1 + include/linux/zone_lock.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/linux/zone_lock.h diff --git a/MAINTAINERS b/MAINTAINERS index 55af015174a5..61e3d1f5bf43 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16680,6 +16680,7 @@ F: include/linux/pgtable.h F: include/linux/ptdump.h F: include/linux/vmpressure.h F: include/linux/vmstat.h +F: include/linux/zone_lock.h F: kernel/fork.c F: mm/Kconfig F: mm/debug.c diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h new file mode 100644 index 000000000000..c531e26280e6 --- /dev/null +++ b/include/linux/zone_lock.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_ZONE_LOCK_H +#define _LINUX_ZONE_LOCK_H + +#include <linux/mmzone.h> +#include <linux/spinlock.h> + +static inline void zone_lock_init(struct zone *zone) +{ + spin_lock_init(&zone->lock); +} + +#define zone_lock_irqsave(zone, flags) \ +do { \ + spin_lock_irqsave(&(zone)->lock, flags); \ +} while (0) + +#define zone_trylock_irqsave(zone, flags) \ +({ \ + spin_trylock_irqsave(&(zone)->lock, flags); \ +}) + +static inline void zone_unlock_irqrestore(struct zone *zone, unsigned long flags) +{ + spin_unlock_irqrestore(&zone->lock, flags); +} + +static inline void zone_lock_irq(struct zone *zone) +{ + spin_lock_irq(&zone->lock); +} + +static inline void zone_unlock_irq(struct zone *zone) +{ + spin_unlock_irq(&zone->lock); +} + +#endif /* _LINUX_ZONE_LOCK_H */ -- 2.47.3
null
null
null
[PATCH v3 1/5] mm: introduce zone lock wrappers
On Thu, 26 Feb 2026 11:14:52 -0800 Shakeel Butt <shakeel.butt@linux.dev> wrote: Do we need the exports at all? include/linux/mmzone.h include/linux/zone_lock.h include/trace/events/zone_lock.h MAINTAINERS mm/compaction.c mm/internal.h mm/Makefile mm/memory_hotplug.c mm/mm_init.c mm/page_alloc.c mm/page_isolation.c mm/page_owner.c mm/page_reporting.c mm/show_mem.c mm/vmscan.c mm/vmstat.c mm/zone_lock.c
{ "author": "Andrew Morton <akpm@linux-foundation.org>", "date": "Thu, 26 Feb 2026 13:25:01 -0800", "is_openbsd": false, "thread_id": "aaGuQFaCij5hvw4N@shell.ilvokhin.com.mbox.gz" }
lkml_critique
lkml
Add thin wrappers around zone lock acquire/release operations. This prepares the code for future tracepoint instrumentation without modifying individual call sites. Centralizing zone lock operations behind wrappers allows future instrumentation or debugging hooks to be added without touching all users. No functional change intended. The wrappers are introduced in preparation for subsequent patches and are not yet used. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> --- MAINTAINERS | 1 + include/linux/zone_lock.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/linux/zone_lock.h diff --git a/MAINTAINERS b/MAINTAINERS index 55af015174a5..61e3d1f5bf43 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16680,6 +16680,7 @@ F: include/linux/pgtable.h F: include/linux/ptdump.h F: include/linux/vmpressure.h F: include/linux/vmstat.h +F: include/linux/zone_lock.h F: kernel/fork.c F: mm/Kconfig F: mm/debug.c diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h new file mode 100644 index 000000000000..c531e26280e6 --- /dev/null +++ b/include/linux/zone_lock.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_ZONE_LOCK_H +#define _LINUX_ZONE_LOCK_H + +#include <linux/mmzone.h> +#include <linux/spinlock.h> + +static inline void zone_lock_init(struct zone *zone) +{ + spin_lock_init(&zone->lock); +} + +#define zone_lock_irqsave(zone, flags) \ +do { \ + spin_lock_irqsave(&(zone)->lock, flags); \ +} while (0) + +#define zone_trylock_irqsave(zone, flags) \ +({ \ + spin_trylock_irqsave(&(zone)->lock, flags); \ +}) + +static inline void zone_unlock_irqrestore(struct zone *zone, unsigned long flags) +{ + spin_unlock_irqrestore(&zone->lock, flags); +} + +static inline void zone_lock_irq(struct zone *zone) +{ + spin_lock_irq(&zone->lock); +} + +static inline void zone_unlock_irq(struct zone *zone) +{ + spin_unlock_irq(&zone->lock); +} + +#endif /* _LINUX_ZONE_LOCK_H */ -- 2.47.3
null
null
null
[PATCH v3 1/5] mm: introduce zone lock wrappers
On Thu, Feb 26, 2026 at 01:25:01PM -0800, Andrew Morton wrote: Very good point and we don't. I think this might just be copying the mmap_lock tracepoint wrappers which might need the exports as some drivers might be taking the mmap_lock. Dmitry, please confirm (test) and let us know.
{ "author": "Shakeel Butt <shakeel.butt@linux.dev>", "date": "Thu, 26 Feb 2026 13:31:48 -0800", "is_openbsd": false, "thread_id": "aaGuQFaCij5hvw4N@shell.ilvokhin.com.mbox.gz" }
lkml_critique
lkml
Add thin wrappers around zone lock acquire/release operations. This prepares the code for future tracepoint instrumentation without modifying individual call sites. Centralizing zone lock operations behind wrappers allows future instrumentation or debugging hooks to be added without touching all users. No functional change intended. The wrappers are introduced in preparation for subsequent patches and are not yet used. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> --- MAINTAINERS | 1 + include/linux/zone_lock.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/linux/zone_lock.h diff --git a/MAINTAINERS b/MAINTAINERS index 55af015174a5..61e3d1f5bf43 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16680,6 +16680,7 @@ F: include/linux/pgtable.h F: include/linux/ptdump.h F: include/linux/vmpressure.h F: include/linux/vmstat.h +F: include/linux/zone_lock.h F: kernel/fork.c F: mm/Kconfig F: mm/debug.c diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h new file mode 100644 index 000000000000..c531e26280e6 --- /dev/null +++ b/include/linux/zone_lock.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_ZONE_LOCK_H +#define _LINUX_ZONE_LOCK_H + +#include <linux/mmzone.h> +#include <linux/spinlock.h> + +static inline void zone_lock_init(struct zone *zone) +{ + spin_lock_init(&zone->lock); +} + +#define zone_lock_irqsave(zone, flags) \ +do { \ + spin_lock_irqsave(&(zone)->lock, flags); \ +} while (0) + +#define zone_trylock_irqsave(zone, flags) \ +({ \ + spin_trylock_irqsave(&(zone)->lock, flags); \ +}) + +static inline void zone_unlock_irqrestore(struct zone *zone, unsigned long flags) +{ + spin_unlock_irqrestore(&zone->lock, flags); +} + +static inline void zone_lock_irq(struct zone *zone) +{ + spin_lock_irq(&zone->lock); +} + +static inline void zone_unlock_irq(struct zone *zone) +{ + spin_unlock_irq(&zone->lock); +} + +#endif /* _LINUX_ZONE_LOCK_H */ -- 2.47.3
null
null
null
[PATCH v3 1/5] mm: introduce zone lock wrappers
Hi Dmitry, kernel test robot noticed the following build errors: [auto build test ERROR on linus/master] [also build test ERROR on v7.0-rc1 next-20260226] [cannot apply to akpm-mm/mm-everything rppt-memblock/for-next rppt-memblock/fixes] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Dmitry-Ilvokhin/mm-introduce-zone-lock-wrappers/20260227-022914 base: linus/master patch link: https://lore.kernel.org/r/1221b8e7fa9f5694f3c4e411f01581b5aba9bc63.1772129168.git.d%40ilvokhin.com patch subject: [PATCH v3 4/5] mm: rename zone->lock to zone->_lock config: microblaze-randconfig-r073-20260227 (https://download.01.org/0day-ci/archive/20260227/202602270508.8MKXotxZ-lkp@intel.com/config) compiler: microblaze-linux-gcc (GCC) 11.5.0 smatch version: v0.5.0-8994-gd50c5a4c reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260227/202602270508.8MKXotxZ-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202602270508.8MKXotxZ-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from include/linux/mmzone.h:8, from include/linux/gfp.h:7, from include/linux/mm.h:8, from mm/shuffle.c:4: mm/shuffle.c: In function '__shuffle_zone': 88 | spin_lock_irqsave(&z->lock, flags); | ^~~~ include/linux/spinlock.h:244:48: note: in definition of macro 'raw_spin_lock_irqsave' 244 | flags = _raw_spin_lock_irqsave(lock); \ | ^~~~ mm/shuffle.c:88:9: note: in expansion of macro 'spin_lock_irqsave' 88 | spin_lock_irqsave(&z->lock, flags); | ^~~~~~~~~~~~~~~~~ mm/shuffle.c:141:52: error: 'struct zone' has no member named 'lock'; did you mean '_lock'? 141 | spin_unlock_irqrestore(&z->lock, flags); | ^~~~ | _lock In file included from include/linux/mmzone.h:8, from include/linux/gfp.h:7, from include/linux/mm.h:8, from mm/shuffle.c:4: mm/shuffle.c:143:47: error: 'struct zone' has no member named 'lock'; did you mean '_lock'? 143 | spin_lock_irqsave(&z->lock, flags); | ^~~~ include/linux/spinlock.h:244:48: note: in definition of macro 'raw_spin_lock_irqsave' 244 | flags = _raw_spin_lock_irqsave(lock); \ | ^~~~ mm/shuffle.c:143:25: note: in expansion of macro 'spin_lock_irqsave' 143 | spin_lock_irqsave(&z->lock, flags); | ^~~~~~~~~~~~~~~~~ mm/shuffle.c:146:36: error: 'struct zone' has no member named 'lock'; did you mean '_lock'? 146 | spin_unlock_irqrestore(&z->lock, flags); | ^~~~ | _lock vim +88 mm/shuffle.c e900a918b0984e Dan Williams 2019-05-14 3 e900a918b0984e Dan Williams 2019-05-14 @4 #include <linux/mm.h> e900a918b0984e Dan Williams 2019-05-14 5 #include <linux/init.h> e900a918b0984e Dan Williams 2019-05-14 6 #include <linux/mmzone.h> e900a918b0984e Dan Williams 2019-05-14 7 #include <linux/random.h> e900a918b0984e Dan Williams 2019-05-14 8 #include <linux/moduleparam.h> e900a918b0984e Dan Williams 2019-05-14 9 #include "internal.h" e900a918b0984e Dan Williams 2019-05-14 10 #include "shuffle.h" e900a918b0984e Dan Williams 2019-05-14 11 e900a918b0984e Dan Williams 2019-05-14 12 DEFINE_STATIC_KEY_FALSE(page_alloc_shuffle_key); e900a918b0984e Dan Williams 2019-05-14 13 e900a918b0984e Dan Williams 2019-05-14 14 static bool shuffle_param; e900a918b0984e Dan Williams 2019-05-14 15 85a34107eba913 Liu Shixin 2022-09-09 16 static __meminit int shuffle_param_set(const char *val, e900a918b0984e Dan Williams 2019-05-14 17 const struct kernel_param *kp) e900a918b0984e Dan Williams 2019-05-14 18 { 85a34107eba913 Liu Shixin 2022-09-09 19 if (param_set_bool(val, kp)) 85a34107eba913 Liu Shixin 2022-09-09 20 return -EINVAL; 85a34107eba913 Liu Shixin 2022-09-09 21 if (*(bool *)kp->arg) 839195352d8235 David Hildenbrand 2020-08-06 22 static_branch_enable(&page_alloc_shuffle_key); e900a918b0984e Dan Williams 2019-05-14 23 return 0; e900a918b0984e Dan Williams 2019-05-14 24 } 85a34107eba913 Liu Shixin 2022-09-09 25 85a34107eba913 Liu Shixin 2022-09-09 26 static const struct kernel_param_ops shuffle_param_ops = { 85a34107eba913 Liu Shixin 2022-09-09 27 .set = shuffle_param_set, 85a34107eba913 Liu Shixin 2022-09-09 28 .get = param_get_bool, 85a34107eba913 Liu Shixin 2022-09-09 29 }; 85a34107eba913 Liu Shixin 2022-09-09 30 module_param_cb(shuffle, &shuffle_param_ops, &shuffle_param, 0400); e900a918b0984e Dan Williams 2019-05-14 31 e900a918b0984e Dan Williams 2019-05-14 32 /* e900a918b0984e Dan Williams 2019-05-14 33 * For two pages to be swapped in the shuffle, they must be free (on a e900a918b0984e Dan Williams 2019-05-14 34 * 'free_area' lru), have the same order, and have the same migratetype. e900a918b0984e Dan Williams 2019-05-14 35 */ 4a93025cbe4a0b David Hildenbrand 2020-08-06 36 static struct page * __meminit shuffle_valid_page(struct zone *zone, 4a93025cbe4a0b David Hildenbrand 2020-08-06 37 unsigned long pfn, int order) e900a918b0984e Dan Williams 2019-05-14 38 { 4a93025cbe4a0b David Hildenbrand 2020-08-06 39 struct page *page = pfn_to_online_page(pfn); e900a918b0984e Dan Williams 2019-05-14 40 e900a918b0984e Dan Williams 2019-05-14 41 /* e900a918b0984e Dan Williams 2019-05-14 42 * Given we're dealing with randomly selected pfns in a zone we e900a918b0984e Dan Williams 2019-05-14 43 * need to ask questions like... e900a918b0984e Dan Williams 2019-05-14 44 */ e900a918b0984e Dan Williams 2019-05-14 45 4a93025cbe4a0b David Hildenbrand 2020-08-06 46 /* ... is the page managed by the buddy? */ 4a93025cbe4a0b David Hildenbrand 2020-08-06 47 if (!page) e900a918b0984e Dan Williams 2019-05-14 48 return NULL; e900a918b0984e Dan Williams 2019-05-14 49 4a93025cbe4a0b David Hildenbrand 2020-08-06 50 /* ... is the page assigned to the same zone? */ 4a93025cbe4a0b David Hildenbrand 2020-08-06 51 if (page_zone(page) != zone) e900a918b0984e Dan Williams 2019-05-14 52 return NULL; e900a918b0984e Dan Williams 2019-05-14 53 e900a918b0984e Dan Williams 2019-05-14 54 /* ...is the page free and currently on a free_area list? */ e900a918b0984e Dan Williams 2019-05-14 55 if (!PageBuddy(page)) e900a918b0984e Dan Williams 2019-05-14 56 return NULL; e900a918b0984e Dan Williams 2019-05-14 57 e900a918b0984e Dan Williams 2019-05-14 58 /* e900a918b0984e Dan Williams 2019-05-14 59 * ...is the page on the same list as the page we will e900a918b0984e Dan Williams 2019-05-14 60 * shuffle it with? e900a918b0984e Dan Williams 2019-05-14 61 */ ab130f9108dcf2 Matthew Wilcox (Oracle 2020-10-15 62) if (buddy_order(page) != order) e900a918b0984e Dan Williams 2019-05-14 63 return NULL; e900a918b0984e Dan Williams 2019-05-14 64 e900a918b0984e Dan Williams 2019-05-14 65 return page; e900a918b0984e Dan Williams 2019-05-14 66 } e900a918b0984e Dan Williams 2019-05-14 67 e900a918b0984e Dan Williams 2019-05-14 68 /* e900a918b0984e Dan Williams 2019-05-14 69 * Fisher-Yates shuffle the freelist which prescribes iterating through an e900a918b0984e Dan Williams 2019-05-14 70 * array, pfns in this case, and randomly swapping each entry with another in e900a918b0984e Dan Williams 2019-05-14 71 * the span, end_pfn - start_pfn. e900a918b0984e Dan Williams 2019-05-14 72 * e900a918b0984e Dan Williams 2019-05-14 73 * To keep the implementation simple it does not attempt to correct for sources e900a918b0984e Dan Williams 2019-05-14 74 * of bias in the distribution, like modulo bias or pseudo-random number e900a918b0984e Dan Williams 2019-05-14 75 * generator bias. I.e. the expectation is that this shuffling raises the bar e900a918b0984e Dan Williams 2019-05-14 76 * for attacks that exploit the predictability of page allocations, but need not e900a918b0984e Dan Williams 2019-05-14 77 * be a perfect shuffle. e900a918b0984e Dan Williams 2019-05-14 78 */ e900a918b0984e Dan Williams 2019-05-14 79 #define SHUFFLE_RETRY 10 e900a918b0984e Dan Williams 2019-05-14 80 void __meminit __shuffle_zone(struct zone *z) e900a918b0984e Dan Williams 2019-05-14 81 { e900a918b0984e Dan Williams 2019-05-14 82 unsigned long i, flags; e900a918b0984e Dan Williams 2019-05-14 83 unsigned long start_pfn = z->zone_start_pfn; e900a918b0984e Dan Williams 2019-05-14 84 unsigned long end_pfn = zone_end_pfn(z); e900a918b0984e Dan Williams 2019-05-14 85 const int order = SHUFFLE_ORDER; e900a918b0984e Dan Williams 2019-05-14 86 const int order_pages = 1 << order; e900a918b0984e Dan Williams 2019-05-14 87 e900a918b0984e Dan Williams 2019-05-14 @88 spin_lock_irqsave(&z->lock, flags); e900a918b0984e Dan Williams 2019-05-14 89 start_pfn = ALIGN(start_pfn, order_pages); e900a918b0984e Dan Williams 2019-05-14 90 for (i = start_pfn; i < end_pfn; i += order_pages) { e900a918b0984e Dan Williams 2019-05-14 91 unsigned long j; e900a918b0984e Dan Williams 2019-05-14 92 int migratetype, retry; e900a918b0984e Dan Williams 2019-05-14 93 struct page *page_i, *page_j; e900a918b0984e Dan Williams 2019-05-14 94 e900a918b0984e Dan Williams 2019-05-14 95 /* e900a918b0984e Dan Williams 2019-05-14 96 * We expect page_i, in the sub-range of a zone being added e900a918b0984e Dan Williams 2019-05-14 97 * (@start_pfn to @end_pfn), to more likely be valid compared to e900a918b0984e Dan Williams 2019-05-14 98 * page_j randomly selected in the span @zone_start_pfn to e900a918b0984e Dan Williams 2019-05-14 99 * @spanned_pages. e900a918b0984e Dan Williams 2019-05-14 100 */ 4a93025cbe4a0b David Hildenbrand 2020-08-06 101 page_i = shuffle_valid_page(z, i, order); e900a918b0984e Dan Williams 2019-05-14 102 if (!page_i) e900a918b0984e Dan Williams 2019-05-14 103 continue; e900a918b0984e Dan Williams 2019-05-14 104 e900a918b0984e Dan Williams 2019-05-14 105 for (retry = 0; retry < SHUFFLE_RETRY; retry++) { e900a918b0984e Dan Williams 2019-05-14 106 /* e900a918b0984e Dan Williams 2019-05-14 107 * Pick a random order aligned page in the zone span as e900a918b0984e Dan Williams 2019-05-14 108 * a swap target. If the selected pfn is a hole, retry e900a918b0984e Dan Williams 2019-05-14 109 * up to SHUFFLE_RETRY attempts find a random valid pfn e900a918b0984e Dan Williams 2019-05-14 110 * in the zone. e900a918b0984e Dan Williams 2019-05-14 111 */ e900a918b0984e Dan Williams 2019-05-14 112 j = z->zone_start_pfn + e900a918b0984e Dan Williams 2019-05-14 113 ALIGN_DOWN(get_random_long() % z->spanned_pages, e900a918b0984e Dan Williams 2019-05-14 114 order_pages); 4a93025cbe4a0b David Hildenbrand 2020-08-06 115 page_j = shuffle_valid_page(z, j, order); e900a918b0984e Dan Williams 2019-05-14 116 if (page_j && page_j != page_i) e900a918b0984e Dan Williams 2019-05-14 117 break; e900a918b0984e Dan Williams 2019-05-14 118 } e900a918b0984e Dan Williams 2019-05-14 119 if (retry >= SHUFFLE_RETRY) { e900a918b0984e Dan Williams 2019-05-14 120 pr_debug("%s: failed to swap %#lx\n", __func__, i); e900a918b0984e Dan Williams 2019-05-14 121 continue; e900a918b0984e Dan Williams 2019-05-14 122 } e900a918b0984e Dan Williams 2019-05-14 123 e900a918b0984e Dan Williams 2019-05-14 124 /* e900a918b0984e Dan Williams 2019-05-14 125 * Each migratetype corresponds to its own list, make sure the e900a918b0984e Dan Williams 2019-05-14 126 * types match otherwise we're moving pages to lists where they e900a918b0984e Dan Williams 2019-05-14 127 * do not belong. e900a918b0984e Dan Williams 2019-05-14 128 */ e900a918b0984e Dan Williams 2019-05-14 129 migratetype = get_pageblock_migratetype(page_i); e900a918b0984e Dan Williams 2019-05-14 130 if (get_pageblock_migratetype(page_j) != migratetype) { e900a918b0984e Dan Williams 2019-05-14 131 pr_debug("%s: migratetype mismatch %#lx\n", __func__, i); e900a918b0984e Dan Williams 2019-05-14 132 continue; e900a918b0984e Dan Williams 2019-05-14 133 } e900a918b0984e Dan Williams 2019-05-14 134 e900a918b0984e Dan Williams 2019-05-14 135 list_swap(&page_i->lru, &page_j->lru); e900a918b0984e Dan Williams 2019-05-14 136 e900a918b0984e Dan Williams 2019-05-14 137 pr_debug("%s: swap: %#lx -> %#lx\n", __func__, i, j); e900a918b0984e Dan Williams 2019-05-14 138 e900a918b0984e Dan Williams 2019-05-14 139 /* take it easy on the zone lock */ e900a918b0984e Dan Williams 2019-05-14 140 if ((i % (100 * order_pages)) == 0) { e900a918b0984e Dan Williams 2019-05-14 141 spin_unlock_irqrestore(&z->lock, flags); e900a918b0984e Dan Williams 2019-05-14 142 cond_resched(); e900a918b0984e Dan Williams 2019-05-14 143 spin_lock_irqsave(&z->lock, flags); e900a918b0984e Dan Williams 2019-05-14 144 } e900a918b0984e Dan Williams 2019-05-14 145 } e900a918b0984e Dan Williams 2019-05-14 146 spin_unlock_irqrestore(&z->lock, flags); e900a918b0984e Dan Williams 2019-05-14 147 } e900a918b0984e Dan Williams 2019-05-14 148 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
{ "author": "kernel test robot <lkp@intel.com>", "date": "Fri, 27 Feb 2026 05:48:05 +0800", "is_openbsd": false, "thread_id": "aaGuQFaCij5hvw4N@shell.ilvokhin.com.mbox.gz" }
lkml_critique
lkml
Add thin wrappers around zone lock acquire/release operations. This prepares the code for future tracepoint instrumentation without modifying individual call sites. Centralizing zone lock operations behind wrappers allows future instrumentation or debugging hooks to be added without touching all users. No functional change intended. The wrappers are introduced in preparation for subsequent patches and are not yet used. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> --- MAINTAINERS | 1 + include/linux/zone_lock.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/linux/zone_lock.h diff --git a/MAINTAINERS b/MAINTAINERS index 55af015174a5..61e3d1f5bf43 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16680,6 +16680,7 @@ F: include/linux/pgtable.h F: include/linux/ptdump.h F: include/linux/vmpressure.h F: include/linux/vmstat.h +F: include/linux/zone_lock.h F: kernel/fork.c F: mm/Kconfig F: mm/debug.c diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h new file mode 100644 index 000000000000..c531e26280e6 --- /dev/null +++ b/include/linux/zone_lock.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_ZONE_LOCK_H +#define _LINUX_ZONE_LOCK_H + +#include <linux/mmzone.h> +#include <linux/spinlock.h> + +static inline void zone_lock_init(struct zone *zone) +{ + spin_lock_init(&zone->lock); +} + +#define zone_lock_irqsave(zone, flags) \ +do { \ + spin_lock_irqsave(&(zone)->lock, flags); \ +} while (0) + +#define zone_trylock_irqsave(zone, flags) \ +({ \ + spin_trylock_irqsave(&(zone)->lock, flags); \ +}) + +static inline void zone_unlock_irqrestore(struct zone *zone, unsigned long flags) +{ + spin_unlock_irqrestore(&zone->lock, flags); +} + +static inline void zone_lock_irq(struct zone *zone) +{ + spin_lock_irq(&zone->lock); +} + +static inline void zone_unlock_irq(struct zone *zone) +{ + spin_unlock_irq(&zone->lock); +} + +#endif /* _LINUX_ZONE_LOCK_H */ -- 2.47.3
null
null
null
[PATCH v3 1/5] mm: introduce zone lock wrappers
On Fri, 27 Feb 2026 05:48:05 +0800 kernel test robot <lkp@intel.com> wrote: yep, thanks. And kernel/power/snapshot.c. I've added fixups.
{ "author": "Andrew Morton <akpm@linux-foundation.org>", "date": "Thu, 26 Feb 2026 14:08:46 -0800", "is_openbsd": false, "thread_id": "aaGuQFaCij5hvw4N@shell.ilvokhin.com.mbox.gz" }
lkml_critique
lkml
Add thin wrappers around zone lock acquire/release operations. This prepares the code for future tracepoint instrumentation without modifying individual call sites. Centralizing zone lock operations behind wrappers allows future instrumentation or debugging hooks to be added without touching all users. No functional change intended. The wrappers are introduced in preparation for subsequent patches and are not yet used. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> --- MAINTAINERS | 1 + include/linux/zone_lock.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/linux/zone_lock.h diff --git a/MAINTAINERS b/MAINTAINERS index 55af015174a5..61e3d1f5bf43 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16680,6 +16680,7 @@ F: include/linux/pgtable.h F: include/linux/ptdump.h F: include/linux/vmpressure.h F: include/linux/vmstat.h +F: include/linux/zone_lock.h F: kernel/fork.c F: mm/Kconfig F: mm/debug.c diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h new file mode 100644 index 000000000000..c531e26280e6 --- /dev/null +++ b/include/linux/zone_lock.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_ZONE_LOCK_H +#define _LINUX_ZONE_LOCK_H + +#include <linux/mmzone.h> +#include <linux/spinlock.h> + +static inline void zone_lock_init(struct zone *zone) +{ + spin_lock_init(&zone->lock); +} + +#define zone_lock_irqsave(zone, flags) \ +do { \ + spin_lock_irqsave(&(zone)->lock, flags); \ +} while (0) + +#define zone_trylock_irqsave(zone, flags) \ +({ \ + spin_trylock_irqsave(&(zone)->lock, flags); \ +}) + +static inline void zone_unlock_irqrestore(struct zone *zone, unsigned long flags) +{ + spin_unlock_irqrestore(&zone->lock, flags); +} + +static inline void zone_lock_irq(struct zone *zone) +{ + spin_lock_irq(&zone->lock); +} + +static inline void zone_unlock_irq(struct zone *zone) +{ + spin_unlock_irq(&zone->lock); +} + +#endif /* _LINUX_ZONE_LOCK_H */ -- 2.47.3
null
null
null
[PATCH v3 1/5] mm: introduce zone lock wrappers
Hi Dmitry, kernel test robot noticed the following build errors: [auto build test ERROR on linus/master] [also build test ERROR on v7.0-rc1 next-20260226] [cannot apply to akpm-mm/mm-everything rppt-memblock/for-next rppt-memblock/fixes] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Dmitry-Ilvokhin/mm-introduce-zone-lock-wrappers/20260227-022914 base: linus/master patch link: https://lore.kernel.org/r/1221b8e7fa9f5694f3c4e411f01581b5aba9bc63.1772129168.git.d%40ilvokhin.com patch subject: [PATCH v3 4/5] mm: rename zone->lock to zone->_lock config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20260227/202602270740.0RL1uwsV-lkp@intel.com/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260227/202602270740.0RL1uwsV-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202602270740.0RL1uwsV-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from include/linux/sched.h:37, from include/linux/percpu.h:12, from arch/x86/include/asm/msr.h:16, from arch/x86/include/asm/tsc.h:11, from arch/x86/include/asm/timex.h:6, from include/linux/timex.h:67, from include/linux/time32.h:13, from include/linux/time.h:60, from include/linux/stat.h:19, from include/linux/module.h:13, from kernel/power/snapshot.c:14: kernel/power/snapshot.c: In function 'mark_free_pages': 1254 | spin_lock_irqsave(&zone->lock, flags); | ^~~~ include/linux/spinlock.h:244:48: note: in definition of macro 'raw_spin_lock_irqsave' 244 | flags = _raw_spin_lock_irqsave(lock); \ | ^~~~ kernel/power/snapshot.c:1254:9: note: in expansion of macro 'spin_lock_irqsave' 1254 | spin_lock_irqsave(&zone->lock, flags); | ^~~~~~~~~~~~~~~~~ kernel/power/snapshot.c:1287:39: error: 'struct zone' has no member named 'lock'; did you mean '_lock'? 1287 | spin_unlock_irqrestore(&zone->lock, flags); | ^~~~ | _lock vim +1254 kernel/power/snapshot.c 31a1b9d7fe768d Kefeng Wang 2023-05-16 1243 31a1b9d7fe768d Kefeng Wang 2023-05-16 1244 static void mark_free_pages(struct zone *zone) 31a1b9d7fe768d Kefeng Wang 2023-05-16 1245 { 31a1b9d7fe768d Kefeng Wang 2023-05-16 1246 unsigned long pfn, max_zone_pfn, page_count = WD_PAGE_COUNT; 31a1b9d7fe768d Kefeng Wang 2023-05-16 1247 unsigned long flags; 31a1b9d7fe768d Kefeng Wang 2023-05-16 1248 unsigned int order, t; 31a1b9d7fe768d Kefeng Wang 2023-05-16 1249 struct page *page; 31a1b9d7fe768d Kefeng Wang 2023-05-16 1250 31a1b9d7fe768d Kefeng Wang 2023-05-16 1251 if (zone_is_empty(zone)) 31a1b9d7fe768d Kefeng Wang 2023-05-16 1252 return; 31a1b9d7fe768d Kefeng Wang 2023-05-16 1253 31a1b9d7fe768d Kefeng Wang 2023-05-16 @1254 spin_lock_irqsave(&zone->lock, flags); 31a1b9d7fe768d Kefeng Wang 2023-05-16 1255 31a1b9d7fe768d Kefeng Wang 2023-05-16 1256 max_zone_pfn = zone_end_pfn(zone); 312eca8a14c5f5 David Woodhouse 2025-04-23 1257 for_each_valid_pfn(pfn, zone->zone_start_pfn, max_zone_pfn) { 31a1b9d7fe768d Kefeng Wang 2023-05-16 1258 page = pfn_to_page(pfn); 31a1b9d7fe768d Kefeng Wang 2023-05-16 1259 31a1b9d7fe768d Kefeng Wang 2023-05-16 1260 if (!--page_count) { 31a1b9d7fe768d Kefeng Wang 2023-05-16 1261 touch_nmi_watchdog(); 31a1b9d7fe768d Kefeng Wang 2023-05-16 1262 page_count = WD_PAGE_COUNT; 31a1b9d7fe768d Kefeng Wang 2023-05-16 1263 } 31a1b9d7fe768d Kefeng Wang 2023-05-16 1264 31a1b9d7fe768d Kefeng Wang 2023-05-16 1265 if (page_zone(page) != zone) 31a1b9d7fe768d Kefeng Wang 2023-05-16 1266 continue; 31a1b9d7fe768d Kefeng Wang 2023-05-16 1267 31a1b9d7fe768d Kefeng Wang 2023-05-16 1268 if (!swsusp_page_is_forbidden(page)) 31a1b9d7fe768d Kefeng Wang 2023-05-16 1269 swsusp_unset_page_free(page); 31a1b9d7fe768d Kefeng Wang 2023-05-16 1270 } 31a1b9d7fe768d Kefeng Wang 2023-05-16 1271 31a1b9d7fe768d Kefeng Wang 2023-05-16 1272 for_each_migratetype_order(order, t) { 31a1b9d7fe768d Kefeng Wang 2023-05-16 1273 list_for_each_entry(page, 31a1b9d7fe768d Kefeng Wang 2023-05-16 1274 &zone->free_area[order].free_list[t], buddy_list) { 31a1b9d7fe768d Kefeng Wang 2023-05-16 1275 unsigned long i; 31a1b9d7fe768d Kefeng Wang 2023-05-16 1276 31a1b9d7fe768d Kefeng Wang 2023-05-16 1277 pfn = page_to_pfn(page); 31a1b9d7fe768d Kefeng Wang 2023-05-16 1278 for (i = 0; i < (1UL << order); i++) { 31a1b9d7fe768d Kefeng Wang 2023-05-16 1279 if (!--page_count) { 31a1b9d7fe768d Kefeng Wang 2023-05-16 1280 touch_nmi_watchdog(); 31a1b9d7fe768d Kefeng Wang 2023-05-16 1281 page_count = WD_PAGE_COUNT; 31a1b9d7fe768d Kefeng Wang 2023-05-16 1282 } 31a1b9d7fe768d Kefeng Wang 2023-05-16 1283 swsusp_set_page_free(pfn_to_page(pfn + i)); 31a1b9d7fe768d Kefeng Wang 2023-05-16 1284 } 31a1b9d7fe768d Kefeng Wang 2023-05-16 1285 } 31a1b9d7fe768d Kefeng Wang 2023-05-16 1286 } 31a1b9d7fe768d Kefeng Wang 2023-05-16 1287 spin_unlock_irqrestore(&zone->lock, flags); 31a1b9d7fe768d Kefeng Wang 2023-05-16 1288 } 31a1b9d7fe768d Kefeng Wang 2023-05-16 1289 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
{ "author": "kernel test robot <lkp@intel.com>", "date": "Fri, 27 Feb 2026 07:13:01 +0800", "is_openbsd": false, "thread_id": "aaGuQFaCij5hvw4N@shell.ilvokhin.com.mbox.gz" }
lkml_critique
lkml
Add thin wrappers around zone lock acquire/release operations. This prepares the code for future tracepoint instrumentation without modifying individual call sites. Centralizing zone lock operations behind wrappers allows future instrumentation or debugging hooks to be added without touching all users. No functional change intended. The wrappers are introduced in preparation for subsequent patches and are not yet used. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> --- MAINTAINERS | 1 + include/linux/zone_lock.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/linux/zone_lock.h diff --git a/MAINTAINERS b/MAINTAINERS index 55af015174a5..61e3d1f5bf43 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16680,6 +16680,7 @@ F: include/linux/pgtable.h F: include/linux/ptdump.h F: include/linux/vmpressure.h F: include/linux/vmstat.h +F: include/linux/zone_lock.h F: kernel/fork.c F: mm/Kconfig F: mm/debug.c diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h new file mode 100644 index 000000000000..c531e26280e6 --- /dev/null +++ b/include/linux/zone_lock.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_ZONE_LOCK_H +#define _LINUX_ZONE_LOCK_H + +#include <linux/mmzone.h> +#include <linux/spinlock.h> + +static inline void zone_lock_init(struct zone *zone) +{ + spin_lock_init(&zone->lock); +} + +#define zone_lock_irqsave(zone, flags) \ +do { \ + spin_lock_irqsave(&(zone)->lock, flags); \ +} while (0) + +#define zone_trylock_irqsave(zone, flags) \ +({ \ + spin_trylock_irqsave(&(zone)->lock, flags); \ +}) + +static inline void zone_unlock_irqrestore(struct zone *zone, unsigned long flags) +{ + spin_unlock_irqrestore(&zone->lock, flags); +} + +static inline void zone_lock_irq(struct zone *zone) +{ + spin_lock_irq(&zone->lock); +} + +static inline void zone_unlock_irq(struct zone *zone) +{ + spin_unlock_irq(&zone->lock); +} + +#endif /* _LINUX_ZONE_LOCK_H */ -- 2.47.3
null
null
null
[PATCH v3 1/5] mm: introduce zone lock wrappers
On Thu, 26 Feb 2026 18:26:18 +0000 Dmitry Ilvokhin <d@ilvokhin.com> wrote: I'm bit worried if I will think this as a file for another general locking, not the mm specific one. I hence think renaming it to more clearly saying the fact, say, mmzone_lock.h, might be less confusing. Or, putting things in mmzone.h might also be an option? What do you think? Thanks, SJ [...]
{ "author": "SeongJae Park <sj@kernel.org>", "date": "Thu, 26 Feb 2026 16:31:39 -0800", "is_openbsd": false, "thread_id": "aaGuQFaCij5hvw4N@shell.ilvokhin.com.mbox.gz" }
lkml_critique
lkml
Add thin wrappers around zone lock acquire/release operations. This prepares the code for future tracepoint instrumentation without modifying individual call sites. Centralizing zone lock operations behind wrappers allows future instrumentation or debugging hooks to be added without touching all users. No functional change intended. The wrappers are introduced in preparation for subsequent patches and are not yet used. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> --- MAINTAINERS | 1 + include/linux/zone_lock.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/linux/zone_lock.h diff --git a/MAINTAINERS b/MAINTAINERS index 55af015174a5..61e3d1f5bf43 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16680,6 +16680,7 @@ F: include/linux/pgtable.h F: include/linux/ptdump.h F: include/linux/vmpressure.h F: include/linux/vmstat.h +F: include/linux/zone_lock.h F: kernel/fork.c F: mm/Kconfig F: mm/debug.c diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h new file mode 100644 index 000000000000..c531e26280e6 --- /dev/null +++ b/include/linux/zone_lock.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_ZONE_LOCK_H +#define _LINUX_ZONE_LOCK_H + +#include <linux/mmzone.h> +#include <linux/spinlock.h> + +static inline void zone_lock_init(struct zone *zone) +{ + spin_lock_init(&zone->lock); +} + +#define zone_lock_irqsave(zone, flags) \ +do { \ + spin_lock_irqsave(&(zone)->lock, flags); \ +} while (0) + +#define zone_trylock_irqsave(zone, flags) \ +({ \ + spin_trylock_irqsave(&(zone)->lock, flags); \ +}) + +static inline void zone_unlock_irqrestore(struct zone *zone, unsigned long flags) +{ + spin_unlock_irqrestore(&zone->lock, flags); +} + +static inline void zone_lock_irq(struct zone *zone) +{ + spin_lock_irq(&zone->lock); +} + +static inline void zone_unlock_irq(struct zone *zone) +{ + spin_unlock_irq(&zone->lock); +} + +#endif /* _LINUX_ZONE_LOCK_H */ -- 2.47.3
null
null
null
[PATCH v3 1/5] mm: introduce zone lock wrappers
I should sent this together with the previous reply, but I forgot as usual, sorry. On Thu, 26 Feb 2026 18:26:18 +0000 Dmitry Ilvokhin <d@ilvokhin.com> wrote: [...] checkpatch.pl complains as below. Should be ok to ignore, but, may better to kindly make it silence? WARNING: Single statement macros should not use a do {} while (0) loop #116: FILE: include/linux/zone_lock.h:13: +#define zone_lock_irqsave(zone, flags) \ +do { \ + spin_lock_irqsave(&(zone)->lock, flags); \ +} while (0) Thanks, SJ [...]
{ "author": "SeongJae Park <sj@kernel.org>", "date": "Thu, 26 Feb 2026 16:38:55 -0800", "is_openbsd": false, "thread_id": "aaGuQFaCij5hvw4N@shell.ilvokhin.com.mbox.gz" }
lkml_critique
lkml
Add thin wrappers around zone lock acquire/release operations. This prepares the code for future tracepoint instrumentation without modifying individual call sites. Centralizing zone lock operations behind wrappers allows future instrumentation or debugging hooks to be added without touching all users. No functional change intended. The wrappers are introduced in preparation for subsequent patches and are not yet used. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> --- MAINTAINERS | 1 + include/linux/zone_lock.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/linux/zone_lock.h diff --git a/MAINTAINERS b/MAINTAINERS index 55af015174a5..61e3d1f5bf43 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16680,6 +16680,7 @@ F: include/linux/pgtable.h F: include/linux/ptdump.h F: include/linux/vmpressure.h F: include/linux/vmstat.h +F: include/linux/zone_lock.h F: kernel/fork.c F: mm/Kconfig F: mm/debug.c diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h new file mode 100644 index 000000000000..c531e26280e6 --- /dev/null +++ b/include/linux/zone_lock.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_ZONE_LOCK_H +#define _LINUX_ZONE_LOCK_H + +#include <linux/mmzone.h> +#include <linux/spinlock.h> + +static inline void zone_lock_init(struct zone *zone) +{ + spin_lock_init(&zone->lock); +} + +#define zone_lock_irqsave(zone, flags) \ +do { \ + spin_lock_irqsave(&(zone)->lock, flags); \ +} while (0) + +#define zone_trylock_irqsave(zone, flags) \ +({ \ + spin_trylock_irqsave(&(zone)->lock, flags); \ +}) + +static inline void zone_unlock_irqrestore(struct zone *zone, unsigned long flags) +{ + spin_unlock_irqrestore(&zone->lock, flags); +} + +static inline void zone_lock_irq(struct zone *zone) +{ + spin_lock_irq(&zone->lock); +} + +static inline void zone_unlock_irq(struct zone *zone) +{ + spin_unlock_irq(&zone->lock); +} + +#endif /* _LINUX_ZONE_LOCK_H */ -- 2.47.3
null
null
null
[PATCH v3 1/5] mm: introduce zone lock wrappers
On Thu, 26 Feb 2026 18:26:19 +0000 Dmitry Ilvokhin <d@ilvokhin.com> wrote: Reviewed-by: SeongJae Park <sj@kernel.org> Thanks, SJ [...]
{ "author": "SeongJae Park <sj@kernel.org>", "date": "Thu, 26 Feb 2026 16:40:02 -0800", "is_openbsd": false, "thread_id": "aaGuQFaCij5hvw4N@shell.ilvokhin.com.mbox.gz" }
lkml_critique
lkml
Add thin wrappers around zone lock acquire/release operations. This prepares the code for future tracepoint instrumentation without modifying individual call sites. Centralizing zone lock operations behind wrappers allows future instrumentation or debugging hooks to be added without touching all users. No functional change intended. The wrappers are introduced in preparation for subsequent patches and are not yet used. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> --- MAINTAINERS | 1 + include/linux/zone_lock.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/linux/zone_lock.h diff --git a/MAINTAINERS b/MAINTAINERS index 55af015174a5..61e3d1f5bf43 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16680,6 +16680,7 @@ F: include/linux/pgtable.h F: include/linux/ptdump.h F: include/linux/vmpressure.h F: include/linux/vmstat.h +F: include/linux/zone_lock.h F: kernel/fork.c F: mm/Kconfig F: mm/debug.c diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h new file mode 100644 index 000000000000..c531e26280e6 --- /dev/null +++ b/include/linux/zone_lock.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_ZONE_LOCK_H +#define _LINUX_ZONE_LOCK_H + +#include <linux/mmzone.h> +#include <linux/spinlock.h> + +static inline void zone_lock_init(struct zone *zone) +{ + spin_lock_init(&zone->lock); +} + +#define zone_lock_irqsave(zone, flags) \ +do { \ + spin_lock_irqsave(&(zone)->lock, flags); \ +} while (0) + +#define zone_trylock_irqsave(zone, flags) \ +({ \ + spin_trylock_irqsave(&(zone)->lock, flags); \ +}) + +static inline void zone_unlock_irqrestore(struct zone *zone, unsigned long flags) +{ + spin_unlock_irqrestore(&zone->lock, flags); +} + +static inline void zone_lock_irq(struct zone *zone) +{ + spin_lock_irq(&zone->lock); +} + +static inline void zone_unlock_irq(struct zone *zone) +{ + spin_unlock_irq(&zone->lock); +} + +#endif /* _LINUX_ZONE_LOCK_H */ -- 2.47.3
null
null
null
[PATCH v3 1/5] mm: introduce zone lock wrappers
On Thu, 26 Feb 2026 18:26:20 +0000 Dmitry Ilvokhin <d@ilvokhin.com> wrote: Nit. Why don't you keep the indentation? My impression based on below output is that mm code prefer indenting __acquires(). $ git grep __acquires mm mm/compaction.c:__acquires(&zone->_lock) mm/compaction.c:__acquires(&lruvec->lru_lock) mm/khugepaged.c: __acquires(&khugepaged_mm_lock) mm/userfaultfd.c: __acquires(ptl1) mm/userfaultfd.c: __acquires(ptl2) Thanks, SJ [...]
{ "author": "SeongJae Park <sj@kernel.org>", "date": "Thu, 26 Feb 2026 16:45:54 -0800", "is_openbsd": false, "thread_id": "aaGuQFaCij5hvw4N@shell.ilvokhin.com.mbox.gz" }
lkml_critique
lkml
Add thin wrappers around zone lock acquire/release operations. This prepares the code for future tracepoint instrumentation without modifying individual call sites. Centralizing zone lock operations behind wrappers allows future instrumentation or debugging hooks to be added without touching all users. No functional change intended. The wrappers are introduced in preparation for subsequent patches and are not yet used. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> --- MAINTAINERS | 1 + include/linux/zone_lock.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/linux/zone_lock.h diff --git a/MAINTAINERS b/MAINTAINERS index 55af015174a5..61e3d1f5bf43 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16680,6 +16680,7 @@ F: include/linux/pgtable.h F: include/linux/ptdump.h F: include/linux/vmpressure.h F: include/linux/vmstat.h +F: include/linux/zone_lock.h F: kernel/fork.c F: mm/Kconfig F: mm/debug.c diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h new file mode 100644 index 000000000000..c531e26280e6 --- /dev/null +++ b/include/linux/zone_lock.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_ZONE_LOCK_H +#define _LINUX_ZONE_LOCK_H + +#include <linux/mmzone.h> +#include <linux/spinlock.h> + +static inline void zone_lock_init(struct zone *zone) +{ + spin_lock_init(&zone->lock); +} + +#define zone_lock_irqsave(zone, flags) \ +do { \ + spin_lock_irqsave(&(zone)->lock, flags); \ +} while (0) + +#define zone_trylock_irqsave(zone, flags) \ +({ \ + spin_trylock_irqsave(&(zone)->lock, flags); \ +}) + +static inline void zone_unlock_irqrestore(struct zone *zone, unsigned long flags) +{ + spin_unlock_irqrestore(&zone->lock, flags); +} + +static inline void zone_lock_irq(struct zone *zone) +{ + spin_lock_irq(&zone->lock); +} + +static inline void zone_unlock_irq(struct zone *zone) +{ + spin_unlock_irq(&zone->lock); +} + +#endif /* _LINUX_ZONE_LOCK_H */ -- 2.47.3
null
null
null
[PATCH v3 1/5] mm: introduce zone lock wrappers
On Thu, 26 Feb 2026 18:26:21 +0000 Dmitry Ilvokhin <d@ilvokhin.com> wrote: Acked-by: SeongJae Park <sj@kernel.org> Thanks, SJ [...]
{ "author": "SeongJae Park <sj@kernel.org>", "date": "Thu, 26 Feb 2026 16:49:23 -0800", "is_openbsd": false, "thread_id": "aaGuQFaCij5hvw4N@shell.ilvokhin.com.mbox.gz" }
lkml_critique
lkml
Add thin wrappers around zone lock acquire/release operations. This prepares the code for future tracepoint instrumentation without modifying individual call sites. Centralizing zone lock operations behind wrappers allows future instrumentation or debugging hooks to be added without touching all users. No functional change intended. The wrappers are introduced in preparation for subsequent patches and are not yet used. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> --- MAINTAINERS | 1 + include/linux/zone_lock.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/linux/zone_lock.h diff --git a/MAINTAINERS b/MAINTAINERS index 55af015174a5..61e3d1f5bf43 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16680,6 +16680,7 @@ F: include/linux/pgtable.h F: include/linux/ptdump.h F: include/linux/vmpressure.h F: include/linux/vmstat.h +F: include/linux/zone_lock.h F: kernel/fork.c F: mm/Kconfig F: mm/debug.c diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h new file mode 100644 index 000000000000..c531e26280e6 --- /dev/null +++ b/include/linux/zone_lock.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_ZONE_LOCK_H +#define _LINUX_ZONE_LOCK_H + +#include <linux/mmzone.h> +#include <linux/spinlock.h> + +static inline void zone_lock_init(struct zone *zone) +{ + spin_lock_init(&zone->lock); +} + +#define zone_lock_irqsave(zone, flags) \ +do { \ + spin_lock_irqsave(&(zone)->lock, flags); \ +} while (0) + +#define zone_trylock_irqsave(zone, flags) \ +({ \ + spin_trylock_irqsave(&(zone)->lock, flags); \ +}) + +static inline void zone_unlock_irqrestore(struct zone *zone, unsigned long flags) +{ + spin_unlock_irqrestore(&zone->lock, flags); +} + +static inline void zone_lock_irq(struct zone *zone) +{ + spin_lock_irq(&zone->lock); +} + +static inline void zone_unlock_irq(struct zone *zone) +{ + spin_unlock_irq(&zone->lock); +} + +#endif /* _LINUX_ZONE_LOCK_H */ -- 2.47.3
null
null
null
[PATCH v3 1/5] mm: introduce zone lock wrappers
On Thu, 26 Feb 2026 16:38:55 -0800 SeongJae Park <sj@kernel.org> wrote: Hmm, why is this an issue? I know this is checkpatch and not you complaining about it, but I really think it's a useless complaint. I can see it better as a do { } while (0) because it is creating a "function" like feature but can't be inline due to flags. This is one of the reasons I still never use checkpatch.pl :-( -- Steve
{ "author": "Steven Rostedt <rostedt@goodmis.org>", "date": "Thu, 26 Feb 2026 19:53:55 -0500", "is_openbsd": false, "thread_id": "aaGuQFaCij5hvw4N@shell.ilvokhin.com.mbox.gz" }
lkml_critique
lkml
Add thin wrappers around zone lock acquire/release operations. This prepares the code for future tracepoint instrumentation without modifying individual call sites. Centralizing zone lock operations behind wrappers allows future instrumentation or debugging hooks to be added without touching all users. No functional change intended. The wrappers are introduced in preparation for subsequent patches and are not yet used. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> --- MAINTAINERS | 1 + include/linux/zone_lock.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/linux/zone_lock.h diff --git a/MAINTAINERS b/MAINTAINERS index 55af015174a5..61e3d1f5bf43 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16680,6 +16680,7 @@ F: include/linux/pgtable.h F: include/linux/ptdump.h F: include/linux/vmpressure.h F: include/linux/vmstat.h +F: include/linux/zone_lock.h F: kernel/fork.c F: mm/Kconfig F: mm/debug.c diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h new file mode 100644 index 000000000000..c531e26280e6 --- /dev/null +++ b/include/linux/zone_lock.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_ZONE_LOCK_H +#define _LINUX_ZONE_LOCK_H + +#include <linux/mmzone.h> +#include <linux/spinlock.h> + +static inline void zone_lock_init(struct zone *zone) +{ + spin_lock_init(&zone->lock); +} + +#define zone_lock_irqsave(zone, flags) \ +do { \ + spin_lock_irqsave(&(zone)->lock, flags); \ +} while (0) + +#define zone_trylock_irqsave(zone, flags) \ +({ \ + spin_trylock_irqsave(&(zone)->lock, flags); \ +}) + +static inline void zone_unlock_irqrestore(struct zone *zone, unsigned long flags) +{ + spin_unlock_irqrestore(&zone->lock, flags); +} + +static inline void zone_lock_irq(struct zone *zone) +{ + spin_lock_irq(&zone->lock); +} + +static inline void zone_unlock_irq(struct zone *zone) +{ + spin_unlock_irq(&zone->lock); +} + +#endif /* _LINUX_ZONE_LOCK_H */ -- 2.47.3
null
null
null
[PATCH v3 1/5] mm: introduce zone lock wrappers
On Thu, 26 Feb 2026 19:53:55 -0500 Steven Rostedt <rostedt@goodmis.org> wrote: Makes sense to me, thank you Steve :) Thanks, SJ [...]
{ "author": "SeongJae Park <sj@kernel.org>", "date": "Thu, 26 Feb 2026 17:01:01 -0800", "is_openbsd": false, "thread_id": "aaGuQFaCij5hvw4N@shell.ilvokhin.com.mbox.gz" }
lkml_critique
lkml
Add thin wrappers around zone lock acquire/release operations. This prepares the code for future tracepoint instrumentation without modifying individual call sites. Centralizing zone lock operations behind wrappers allows future instrumentation or debugging hooks to be added without touching all users. No functional change intended. The wrappers are introduced in preparation for subsequent patches and are not yet used. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> --- MAINTAINERS | 1 + include/linux/zone_lock.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/linux/zone_lock.h diff --git a/MAINTAINERS b/MAINTAINERS index 55af015174a5..61e3d1f5bf43 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16680,6 +16680,7 @@ F: include/linux/pgtable.h F: include/linux/ptdump.h F: include/linux/vmpressure.h F: include/linux/vmstat.h +F: include/linux/zone_lock.h F: kernel/fork.c F: mm/Kconfig F: mm/debug.c diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h new file mode 100644 index 000000000000..c531e26280e6 --- /dev/null +++ b/include/linux/zone_lock.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_ZONE_LOCK_H +#define _LINUX_ZONE_LOCK_H + +#include <linux/mmzone.h> +#include <linux/spinlock.h> + +static inline void zone_lock_init(struct zone *zone) +{ + spin_lock_init(&zone->lock); +} + +#define zone_lock_irqsave(zone, flags) \ +do { \ + spin_lock_irqsave(&(zone)->lock, flags); \ +} while (0) + +#define zone_trylock_irqsave(zone, flags) \ +({ \ + spin_trylock_irqsave(&(zone)->lock, flags); \ +}) + +static inline void zone_unlock_irqrestore(struct zone *zone, unsigned long flags) +{ + spin_unlock_irqrestore(&zone->lock, flags); +} + +static inline void zone_lock_irq(struct zone *zone) +{ + spin_lock_irq(&zone->lock); +} + +static inline void zone_unlock_irq(struct zone *zone) +{ + spin_unlock_irq(&zone->lock); +} + +#endif /* _LINUX_ZONE_LOCK_H */ -- 2.47.3
null
null
null
[PATCH v3 1/5] mm: introduce zone lock wrappers
On Thu, Feb 26, 2026 at 01:31:48PM -0800, Shakeel Butt wrote: This is a good catch, thank you. I don't think we need EXPORT_SYMBOL() here. Just verified it locally. I'll remove it in v4.
{ "author": "Dmitry Ilvokhin <d@ilvokhin.com>", "date": "Fri, 27 Feb 2026 12:39:00 +0000", "is_openbsd": false, "thread_id": "aaGuQFaCij5hvw4N@shell.ilvokhin.com.mbox.gz" }
lkml_critique
lkml
Add thin wrappers around zone lock acquire/release operations. This prepares the code for future tracepoint instrumentation without modifying individual call sites. Centralizing zone lock operations behind wrappers allows future instrumentation or debugging hooks to be added without touching all users. No functional change intended. The wrappers are introduced in preparation for subsequent patches and are not yet used. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> --- MAINTAINERS | 1 + include/linux/zone_lock.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/linux/zone_lock.h diff --git a/MAINTAINERS b/MAINTAINERS index 55af015174a5..61e3d1f5bf43 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16680,6 +16680,7 @@ F: include/linux/pgtable.h F: include/linux/ptdump.h F: include/linux/vmpressure.h F: include/linux/vmstat.h +F: include/linux/zone_lock.h F: kernel/fork.c F: mm/Kconfig F: mm/debug.c diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h new file mode 100644 index 000000000000..c531e26280e6 --- /dev/null +++ b/include/linux/zone_lock.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_ZONE_LOCK_H +#define _LINUX_ZONE_LOCK_H + +#include <linux/mmzone.h> +#include <linux/spinlock.h> + +static inline void zone_lock_init(struct zone *zone) +{ + spin_lock_init(&zone->lock); +} + +#define zone_lock_irqsave(zone, flags) \ +do { \ + spin_lock_irqsave(&(zone)->lock, flags); \ +} while (0) + +#define zone_trylock_irqsave(zone, flags) \ +({ \ + spin_trylock_irqsave(&(zone)->lock, flags); \ +}) + +static inline void zone_unlock_irqrestore(struct zone *zone, unsigned long flags) +{ + spin_unlock_irqrestore(&zone->lock, flags); +} + +static inline void zone_lock_irq(struct zone *zone) +{ + spin_lock_irq(&zone->lock); +} + +static inline void zone_unlock_irq(struct zone *zone) +{ + spin_unlock_irq(&zone->lock); +} + +#endif /* _LINUX_ZONE_LOCK_H */ -- 2.47.3
null
null
null
[PATCH v3 1/5] mm: introduce zone lock wrappers
On Thu, Feb 26, 2026 at 04:31:39PM -0800, SeongJae Park wrote: Thanks for the feedback, SJ. Good point. I agree the current name looks too generic. Putting it into mmzone.h would further overload that header, so renaming zone_lock.h to mmzone_lock.h seems like the clearest option. I'll make that change in v4.
{ "author": "Dmitry Ilvokhin <d@ilvokhin.com>", "date": "Fri, 27 Feb 2026 13:06:00 +0000", "is_openbsd": false, "thread_id": "aaGuQFaCij5hvw4N@shell.ilvokhin.com.mbox.gz" }
lkml_critique
lkml
Add thin wrappers around zone lock acquire/release operations. This prepares the code for future tracepoint instrumentation without modifying individual call sites. Centralizing zone lock operations behind wrappers allows future instrumentation or debugging hooks to be added without touching all users. No functional change intended. The wrappers are introduced in preparation for subsequent patches and are not yet used. Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> --- MAINTAINERS | 1 + include/linux/zone_lock.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/linux/zone_lock.h diff --git a/MAINTAINERS b/MAINTAINERS index 55af015174a5..61e3d1f5bf43 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16680,6 +16680,7 @@ F: include/linux/pgtable.h F: include/linux/ptdump.h F: include/linux/vmpressure.h F: include/linux/vmstat.h +F: include/linux/zone_lock.h F: kernel/fork.c F: mm/Kconfig F: mm/debug.c diff --git a/include/linux/zone_lock.h b/include/linux/zone_lock.h new file mode 100644 index 000000000000..c531e26280e6 --- /dev/null +++ b/include/linux/zone_lock.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_ZONE_LOCK_H +#define _LINUX_ZONE_LOCK_H + +#include <linux/mmzone.h> +#include <linux/spinlock.h> + +static inline void zone_lock_init(struct zone *zone) +{ + spin_lock_init(&zone->lock); +} + +#define zone_lock_irqsave(zone, flags) \ +do { \ + spin_lock_irqsave(&(zone)->lock, flags); \ +} while (0) + +#define zone_trylock_irqsave(zone, flags) \ +({ \ + spin_trylock_irqsave(&(zone)->lock, flags); \ +}) + +static inline void zone_unlock_irqrestore(struct zone *zone, unsigned long flags) +{ + spin_unlock_irqrestore(&zone->lock, flags); +} + +static inline void zone_lock_irq(struct zone *zone) +{ + spin_lock_irq(&zone->lock); +} + +static inline void zone_unlock_irq(struct zone *zone) +{ + spin_unlock_irq(&zone->lock); +} + +#endif /* _LINUX_ZONE_LOCK_H */ -- 2.47.3
null
null
null
[PATCH v3 1/5] mm: introduce zone lock wrappers
On Thu, Feb 26, 2026 at 04:45:54PM -0800, SeongJae Park wrote: Thanks for spotting it, will be fixed in v4.
{ "author": "Dmitry Ilvokhin <d@ilvokhin.com>", "date": "Fri, 27 Feb 2026 14:46:24 +0000", "is_openbsd": false, "thread_id": "aaGuQFaCij5hvw4N@shell.ilvokhin.com.mbox.gz" }
lkml_critique
lkml
GPU drivers often need to create their own workqueues for various reasons. Add the ability to do so. Signed-off-by: Alice Ryhl <aliceryhl@google.com> --- Changes in v3: - Switch to builder pattern. - Drop BH workqueues for now. - Mark delayed wq change as fix. - Link to v2: https://lore.kernel.org/r/20251113-create-workqueue-v2-0-8b45277119bc@google.com Changes in v2: - Redo how flagging works. - Restrict delayed work to not be usable on custom workqueues. - Link to v1: https://lore.kernel.org/r/20250411-create-workqueue-v1-1-f7dbe7f1e05f@google.com --- Alice Ryhl (2): rust: workqueue: restrict delayed work to global wqs rust: workqueue: add creation of workqueues rust/helpers/workqueue.c | 7 ++ rust/kernel/workqueue.rs | 199 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 202 insertions(+), 4 deletions(-) --- base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f change-id: 20250411-create-workqueue-d053158c7a4b Best regards, -- Alice Ryhl <aliceryhl@google.com>
null
null
null
[PATCH v3 0/2] Creation of workqueues in Rust
When a workqueue is shut down, delayed work that is pending but not scheduled does not get properly cleaned up, so it's not safe to use `enqueue_delayed` on a workqueue that might be destroyed. To fix this, restricted `enqueue_delayed` to static queues. Cc: stable@vger.kernel.org Fixes: 7c098cd5eaae ("workqueue: rust: add delayed work items") Reviewed-by: John Hubbard <jhubbard@nvidia.com> Signed-off-by: Alice Ryhl <aliceryhl@google.com> --- rust/kernel/workqueue.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rust/kernel/workqueue.rs b/rust/kernel/workqueue.rs index 706e833e9702..1acd113c04ee 100644 --- a/rust/kernel/workqueue.rs +++ b/rust/kernel/workqueue.rs @@ -296,8 +296,15 @@ pub fn enqueue<W, const ID: u64>(&self, w: W) -> W::EnqueueOutput /// /// This may fail if the work item is already enqueued in a workqueue. /// + /// This is only valid for global workqueues (with static lifetimes) because those are the only + /// ones that outlive all possible delayed work items. + /// /// The work item will be submitted using `WORK_CPU_UNBOUND`. - pub fn enqueue_delayed<W, const ID: u64>(&self, w: W, delay: Jiffies) -> W::EnqueueOutput + pub fn enqueue_delayed<W, const ID: u64>( + &'static self, + w: W, + delay: Jiffies, + ) -> W::EnqueueOutput where W: RawDelayedWorkItem<ID> + Send + 'static, { -- 2.53.0.473.g4a7958ca14-goog
{ "author": "Alice Ryhl <aliceryhl@google.com>", "date": "Fri, 27 Feb 2026 14:53:20 +0000", "is_openbsd": false, "thread_id": "DGPU8USGBKVH.2D5DH6NTL50U2@kernel.org.mbox.gz" }
lkml_critique
lkml
GPU drivers often need to create their own workqueues for various reasons. Add the ability to do so. Signed-off-by: Alice Ryhl <aliceryhl@google.com> --- Changes in v3: - Switch to builder pattern. - Drop BH workqueues for now. - Mark delayed wq change as fix. - Link to v2: https://lore.kernel.org/r/20251113-create-workqueue-v2-0-8b45277119bc@google.com Changes in v2: - Redo how flagging works. - Restrict delayed work to not be usable on custom workqueues. - Link to v1: https://lore.kernel.org/r/20250411-create-workqueue-v1-1-f7dbe7f1e05f@google.com --- Alice Ryhl (2): rust: workqueue: restrict delayed work to global wqs rust: workqueue: add creation of workqueues rust/helpers/workqueue.c | 7 ++ rust/kernel/workqueue.rs | 199 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 202 insertions(+), 4 deletions(-) --- base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f change-id: 20250411-create-workqueue-d053158c7a4b Best regards, -- Alice Ryhl <aliceryhl@google.com>
null
null
null
[PATCH v3 0/2] Creation of workqueues in Rust
Creating workqueues is needed by various GPU drivers. Not only does it give you better control over execution, it also allows devices to ensure that all tasks have exited before the device is unbound (or similar) by running the workqueue destructor. Signed-off-by: Alice Ryhl <aliceryhl@google.com> --- rust/helpers/workqueue.c | 7 ++ rust/kernel/workqueue.rs | 190 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 194 insertions(+), 3 deletions(-) diff --git a/rust/helpers/workqueue.c b/rust/helpers/workqueue.c index ce1c3a5b2150..e4b9d1b3d6bf 100644 --- a/rust/helpers/workqueue.c +++ b/rust/helpers/workqueue.c @@ -14,3 +14,10 @@ __rust_helper void rust_helper_init_work_with_key(struct work_struct *work, INIT_LIST_HEAD(&work->entry); work->func = func; } + +__rust_helper +struct workqueue_struct *rust_helper_alloc_workqueue(const char *fmt, unsigned int flags, + int max_active, const void *data) +{ + return alloc_workqueue(fmt, flags, max_active, data); +} diff --git a/rust/kernel/workqueue.rs b/rust/kernel/workqueue.rs index 1acd113c04ee..4ef02a537cd9 100644 --- a/rust/kernel/workqueue.rs +++ b/rust/kernel/workqueue.rs @@ -186,7 +186,10 @@ //! C header: [`include/linux/workqueue.h`](srctree/include/linux/workqueue.h) use crate::{ - alloc::{AllocError, Flags}, + alloc::{ + self, + AllocError, // + }, container_of, prelude::*, sync::Arc, @@ -194,7 +197,11 @@ time::Jiffies, types::Opaque, }; -use core::marker::PhantomData; +use core::{ + marker::PhantomData, + ops::Deref, + ptr::NonNull, // +}; /// Creates a [`Work`] initialiser with the given name and a newly-created lock class. #[macro_export] @@ -340,7 +347,7 @@ pub fn enqueue_delayed<W, const ID: u64>( /// This method can fail because it allocates memory to store the work item. pub fn try_spawn<T: 'static + Send + FnOnce()>( &self, - flags: Flags, + flags: alloc::Flags, func: T, ) -> Result<(), AllocError> { let init = pin_init!(ClosureWork { @@ -353,6 +360,183 @@ pub fn try_spawn<T: 'static + Send + FnOnce()>( } } +/// Workqueue builder. +/// +/// A valid combination of workqueue flags contains one of the base flags (`WQ_UNBOUND`, `WQ_BH`, +/// or `WQ_PERCPU`) and a combination of modifier flags that are compatible with the selected base +/// flag. +/// +/// For details, please refer to `Documentation/core-api/workqueue.rst`. +pub struct Builder { + flags: bindings::wq_flags, + max_active: i32, +} + +impl Builder { + /// Not bound to any cpu. + #[inline] + pub fn unbound() -> Builder { + Builder { + flags: bindings::wq_flags_WQ_UNBOUND, + max_active: 0, + } + } + + /// Bound to a specific cpu. + #[inline] + pub fn percpu() -> Builder { + Builder { + flags: bindings::wq_flags_WQ_PERCPU, + max_active: 0, + } + } + + /// Set the maximum number of active cpus. + /// + /// If not set, a reasonable default value is used. The maximum value is `WQ_MAX_ACTIVE`. + #[inline] + pub fn max_active(mut self, max_active: u32) -> Builder { + self.max_active = i32::try_from(max_active).unwrap_or(i32::MAX); + self + } + + /// Allow this workqueue to be frozen during suspend. + #[inline] + pub fn freezable(mut self) -> Self { + self.flags |= bindings::wq_flags_WQ_FREEZABLE; + self + } + + /// This workqueue may be used during memory reclaim. + #[inline] + pub fn mem_reclaim(mut self) -> Self { + self.flags |= bindings::wq_flags_WQ_MEM_RECLAIM; + self + } + + /// Mark this workqueue as cpu intensive. + #[inline] + pub fn cpu_intensive(mut self) -> Self { + self.flags |= bindings::wq_flags_WQ_CPU_INTENSIVE; + self + } + + /// Make this workqueue visible in sysfs. + #[inline] + pub fn sysfs(mut self) -> Self { + self.flags |= bindings::wq_flags_WQ_SYSFS; + self + } + + /// Mark this workqueue high priority. + #[inline] + pub fn highpri(mut self) -> Self { + self.flags |= bindings::wq_flags_WQ_HIGHPRI; + self + } + + /// Allocates a new workqueue. + /// + /// The provided name is used verbatim as the workqueue name. + /// + /// # Examples + /// + /// ``` + /// use kernel::workqueue; + /// + /// // create an unbound workqueue registered with sysfs + /// let wq = workqueue::Builder::unbound().sysfs().build(c"my-wq")?; + /// + /// // spawn a work item on it + /// wq.try_spawn( + /// GFP_KERNEL, + /// || pr_warn!("Printing from my-wq"), + /// )?; + /// # Ok::<(), Error>(()) + /// ``` + #[inline] + pub fn build(self, name: &CStr) -> Result<OwnedQueue, AllocError> { + // SAFETY: + // * c"%s" is compatible with passing the name as a c-string. + // * the builder only permits valid flag combinations + let ptr = unsafe { + bindings::alloc_workqueue( + c"%s".as_char_ptr(), + self.flags, + self.max_active, + name.as_char_ptr().cast::<c_void>(), + ) + }; + + Ok(OwnedQueue { + queue: NonNull::new(ptr).ok_or(AllocError)?.cast(), + }) + } + + /// Allocates a new workqueue. + /// + /// # Examples + /// + /// This example shows how to pass a Rust string formatter to the workqueue name, creating + /// workqueues with names such as `my-wq-1` and `my-wq-2`. + /// + /// ``` + /// use kernel::{ + /// alloc::AllocError, + /// workqueue::{self, OwnedQueue}, + /// }; + /// + /// fn my_wq(num: u32) -> Result<OwnedQueue, AllocError> { + /// // create a percpu workqueue called my-wq-{num} + /// workqueue::Builder::percpu().build_fmt(fmt!("my-wq-{num}")) + /// } + /// ``` + #[inline] + pub fn build_fmt(self, name: kernel::fmt::Arguments<'_>) -> Result<OwnedQueue, AllocError> { + // SAFETY: + // * c"%pA" is compatible with passing an `Arguments` pointer. + // * the builder only permits valid flag combinations + let ptr = unsafe { + bindings::alloc_workqueue( + c"%pA".as_char_ptr(), + self.flags, + self.max_active, + core::ptr::from_ref(&name).cast::<c_void>(), + ) + }; + + Ok(OwnedQueue { + queue: NonNull::new(ptr).ok_or(AllocError)?.cast(), + }) + } +} + +/// An owned kernel work queue. +/// +/// Dropping a workqueue blocks on all pending work. +/// +/// # Invariants +/// +/// `queue` points at a valid workqueue that is owned by this `OwnedQueue`. +pub struct OwnedQueue { + queue: NonNull<Queue>, +} + +impl Deref for OwnedQueue { + type Target = Queue; + fn deref(&self) -> &Queue { + // SAFETY: By the type invariants, this pointer references a valid queue. + unsafe { &*self.queue.as_ptr() } + } +} + +impl Drop for OwnedQueue { + fn drop(&mut self) { + // SAFETY: The `OwnedQueue` is being destroyed, so we can destroy the workqueue it owns. + unsafe { bindings::destroy_workqueue(self.queue.as_ptr().cast()) } + } +} + /// A helper type used in [`try_spawn`]. /// /// [`try_spawn`]: Queue::try_spawn -- 2.53.0.473.g4a7958ca14-goog
{ "author": "Alice Ryhl <aliceryhl@google.com>", "date": "Fri, 27 Feb 2026 14:53:21 +0000", "is_openbsd": false, "thread_id": "DGPU8USGBKVH.2D5DH6NTL50U2@kernel.org.mbox.gz" }
lkml_critique
lkml
GPU drivers often need to create their own workqueues for various reasons. Add the ability to do so. Signed-off-by: Alice Ryhl <aliceryhl@google.com> --- Changes in v3: - Switch to builder pattern. - Drop BH workqueues for now. - Mark delayed wq change as fix. - Link to v2: https://lore.kernel.org/r/20251113-create-workqueue-v2-0-8b45277119bc@google.com Changes in v2: - Redo how flagging works. - Restrict delayed work to not be usable on custom workqueues. - Link to v1: https://lore.kernel.org/r/20250411-create-workqueue-v1-1-f7dbe7f1e05f@google.com --- Alice Ryhl (2): rust: workqueue: restrict delayed work to global wqs rust: workqueue: add creation of workqueues rust/helpers/workqueue.c | 7 ++ rust/kernel/workqueue.rs | 199 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 202 insertions(+), 4 deletions(-) --- base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f change-id: 20250411-create-workqueue-d053158c7a4b Best regards, -- Alice Ryhl <aliceryhl@google.com>
null
null
null
[PATCH v3 0/2] Creation of workqueues in Rust
On Fri Feb 27, 2026 at 3:53 PM CET, Alice Ryhl wrote: :( Reviewed-by: Danilo Krummrich <dakr@kernel.org> We should probably add a FIXME comment pointing out that this should be fixed in the C code. Maybe also link your approach?
{ "author": "\"Danilo Krummrich\" <dakr@kernel.org>", "date": "Fri, 27 Feb 2026 16:10:11 +0100", "is_openbsd": false, "thread_id": "DGPU8USGBKVH.2D5DH6NTL50U2@kernel.org.mbox.gz" }
lkml_critique
lkml
GPU drivers often need to create their own workqueues for various reasons. Add the ability to do so. Signed-off-by: Alice Ryhl <aliceryhl@google.com> --- Changes in v3: - Switch to builder pattern. - Drop BH workqueues for now. - Mark delayed wq change as fix. - Link to v2: https://lore.kernel.org/r/20251113-create-workqueue-v2-0-8b45277119bc@google.com Changes in v2: - Redo how flagging works. - Restrict delayed work to not be usable on custom workqueues. - Link to v1: https://lore.kernel.org/r/20250411-create-workqueue-v1-1-f7dbe7f1e05f@google.com --- Alice Ryhl (2): rust: workqueue: restrict delayed work to global wqs rust: workqueue: add creation of workqueues rust/helpers/workqueue.c | 7 ++ rust/kernel/workqueue.rs | 199 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 202 insertions(+), 4 deletions(-) --- base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f change-id: 20250411-create-workqueue-d053158c7a4b Best regards, -- Alice Ryhl <aliceryhl@google.com>
null
null
null
[PATCH v3 0/2] Creation of workqueues in Rust
On Fri Feb 27, 2026 at 3:53 PM CET, Alice Ryhl wrote: Should we just mention the default value? The workqueue code prints a warning for max_active > WQ_MAX_ACTIVE. Maybe use debug_assert()? It's also a bit unfortunate that alloc_ordered_workqueue() becomes .max_active(1). At the same time having a separate ordered() method competes with max_active(). Mybe a type state, i.e. Builder<Ordered> that doesn't have max_active()?
{ "author": "\"Danilo Krummrich\" <dakr@kernel.org>", "date": "Fri, 27 Feb 2026 16:30:59 +0100", "is_openbsd": false, "thread_id": "DGPU8USGBKVH.2D5DH6NTL50U2@kernel.org.mbox.gz" }
lkml_critique
lkml
Hi all, I have created today's linux-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/sfr/linux-next.git. You can see which trees have been included by looking in the Next/Trees file in the source. There are also quilt-import.log and merge.log files in the Next directory. Between each merge, the tree was built with allmodconfig for both powerpc and x86_64. There were only two minor merge problems. We are up to 34 trees, more are welcome (even if they are currently empty). Status of my local build tests is at http://kisskb.ellerman.id.au/kisskb/branch/9/. We have added arm and m68k to the architectures built. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au
null
null
null
linux-next: Tree for Feb 26
Hi all, This tree fails (more than usual) the powerpc allyesconfig build. Changes since 20140225: The mvebu tree gained a conflict against the arm-soc tree. The powerpc tree still had its build failure. The libata tree gained a build failure so I used the version from next-20140225. The mfd-lj tree still had its build failure so I used the version from next-20140210. The net-next tree gained a conflict against the wireless tree. The wireless-next tree still had its build failure so I used the version from next-20140224. The crypto tree gained a conflict against the arm-soc tree. The char-misc tree still had its build failure for which I applied a merge fix patch. The cgroup tree gained a build failure for which I applied a merge fix patch. The clk tree gained a conflict against the keystone tree. The akpm-current tree gained conflicts against the renesas, ext3 and cgroup trees and a build failure for which I reverted a commit. Non-merge commits (relative to Linus' tree): 41340 4327 files changed, 156351 insertions(+), 81744 deletions(-) ---------------------------------------------------------------------------- I have created today's linux-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git (patches at http://www.kernel.org/pub/linux/kernel/next/ ). If you are tracking the linux-next tree using git, you should not use "git pull" to do so as that will try to merge the new linux-next release with the old one. You should use "git fetch" as mentioned in the FAQ on the wiki (see below). You can see which trees have been included by looking in the Next/Trees file in the source. There are also quilt-import.log and merge.log files in the Next directory. Between each merge, the tree was built with a ppc64_defconfig for powerpc and an allmodconfig for x86_64 and a multi_v7_defconfig for arm. After the final fixups (if any), it is also built with powerpc allnoconfig (32 and 64 bit), ppc44x_defconfig and allyesconfig (minus CONFIG_PROFILE_ALL_BRANCHES - this fails its final link) and i386, sparc, sparc64 and arm defconfig. These builds also have CONFIG_ENABLE_WARN_DEPRECATED, CONFIG_ENABLE_MUST_CHECK and CONFIG_DEBUG_INFO disabled when necessary. Below is a summary of the state of the merge. I am currently merging 210 trees (counting Linus' and 28 trees of patches pending for Linus' tree). Stats about the size of the tree over time can be seen at http://neuling.org/linux-next-size.html . Status of my local build tests will be at http://kisskb.ellerman.id.au/linux-next . If maintainers want to give advice about cross compilers/configs that work, we are always open to add more builds. Thanks to Randy Dunlap for doing many randconfig builds. And to Paul Gortmaker for triage and bug fixes. There is a wiki covering stuff to do with linux-next at http://linux.f-seidel.de/linux-next/pmwiki/ . Thanks to Frank Seidel. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au $ git checkout master $ git reset --hard stable Merging origin/master (6dba6ecba7d9 Merge tag 'dmaengine-fixes-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/dmaengine) Merging fixes/master (b0031f227e47 Merge tag 's2mps11-build' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator) Merging kbuild-current/rc-fixes (38dbfb59d117 Linus 3.14-rc1) Merging arc-current/for-curr (7e22e91102c6 Linux 3.13-rc8) Merging arm-current/fixes (b36345759308 ARM: 7980/1: kernel: improve error message when LPAE config doesn't match CPU) Merging m68k-current/for-linus (7247f55381d5 m68k: Wire up sched_setattr and sched_getattr) Merging metag-fixes/fixes (f229006ec6be irq-metag*: stop set_affinity vectoring to offline cpus) Merging powerpc-merge/merge (66f9af83e56b powerpc/eeh: Disable EEH on reboot) Merging sparc/master (10527106abec Merge tag 'dt-for-linus' of git://git.secretlab.ca/git/linux) Merging net/master (a4572e0c2326 phy: unmask link partner capabilities) Merging ipsec/master (ee5c23176fcc xfrm: Clone states properly on migration) Merging sound-current/for-linus (37c367ecdb9a ALSA: hda - Add a fixup for HP Folio 13 mute LED) Merging pci-current/for-linus (fc40363b2140 ahci: Fix broken fallback to single MSI mode) Merging wireless/master (b7b146c9c9a0 ath9k: fix invalid descriptor discarding) Merging driver-core.current/driver-core-linus (fed95bab8d29 sysfs: fix namespace refcnt leak) Merging tty.current/tty-linus (cfbf8d4857c2 Linux 3.14-rc4) Merging usb.current/usb-linus (cfbf8d4857c2 Linux 3.14-rc4) Merging staging.current/staging-linus (260ea9c2e2d3 staging: r8188eu: Add new device ID) Merging char-misc.current/char-misc-linus (58e868be77bd Merge 3.14-rc4 into char-misc-linus) Merging input-current/for-linus (70b0052425ff Input: da9052_onkey - use correct register bit for key status) Merging md-current/for-linus (d47648fcf061 raid5: avoid finding "discard" stripe) Merging crypto-current/master (ee97dc7db4cb crypto: s390 - fix des and des3_ede ctr concurrency issue) Merging ide/master (738b52bb9845 Merge tag 'microblaze-3.14-rc3' of git://git.monstr.eu/linux-2.6-microblaze) Merging dwmw2/master (5950f0803ca9 pcmcia: remove RPX board stuff) Merging devicetree-current/devicetree/merge (1f42e5dd5065 of: Add self test for of_match_node()) Merging rr-fixes/fixes (7122c3e9154b scripts/link-vmlinux.sh: only filter kernel symbols for arm) Merging mfd-fixes/master (73beb63d290f mfd: rtsx_pcr: Disable interrupts before cancelling delayed works) Merging vfio-fixes/for-linus (239a87020b26 Merge branch 'for-joerg/arm-smmu/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into for-linus) Merging drm-intel-fixes/for-linux-next-fixes (f51a44b9a6c4 drm/i915/dp: add native aux defer retry limit) Merging asm-generic/master (fb9de7ebc3a2 xtensa: Use generic asm/mmu.h for nommu) Merging arc/for-next (67a2635aa64a ARC: [clockevent] simplify timer ISR) Merging arm/for-next (93c95d4353c6 Merge branch 'devel-stable' into for-next) Merging arm-perf/for-next/perf (8e781f65423c ARM: perf: add support for the Cortex-A12 PMU) Merging arm-soc/for-next (ff70f51bbeb9 arm-soc: document efm32 cleanup) Merging bcm2835/for-next (8ac06bb693ca Merge branch 'for-3.15/dt' into for-next) Merging cortex-m/for-next (f0d7515372ff ARM: v7m: add trivial suspend support) Merging ep93xx/ep93xx-for-next (bfb0709fd17b Merge branch 'ep93xx-fixes' into ep93xx-for-next) Merging imx-mxs/for-next (8cfdab14395c Merge branch 'imx/dt' into for-next) CONFLICT (content): Merge conflict in arch/arm/mach-imx/common.h CONFLICT (content): Merge conflict in arch/arm/mach-imx/Makefile Merging ixp4xx/next (19f949f52599 Linux 3.8) Merging keystone/next (5cce4bbf2e4e Merge branch 'for_3.15/dts_2' into next) Merging msm/for-next (81cf1e061d00 ARM: msm: Rename msm devicetrees to have standard 'qcom' prefix) Merging mvebu/for-next (98d20a74bd4f Merge branch 'mvebu/dt' into for-next) CONFLICT (content): Merge conflict in arch/arm/boot/dts/Makefile CONFLICT (content): Merge conflict in Documentation/devicetree/bindings/vendor-prefixes.txt Merging renesas/next (a5ebc3b0caaf Merge branches 'heads/clock-for-v3.15' and 'heads/dt-for-v3.15' into next) Merging samsung/for-next (941e7012a3b9 Merge branch 'v3.15-next/clk-s3c24xx' into for-next) Merging tegra/for-next (7bed533771d7 Merge branch for-3.15/defconfig into for-next) Merging arm64/for-next/core (38dbfb59d117 Linus 3.14-rc1) Merging blackfin/for-linus (58095fdaaf1c From: Eunbong Song <eunb.song@samsung.com>) Merging c6x/for-linux-next (546153d75a48 c6x: fix build failure caused by cache.h) Merging cris/for-next (cd065a010a97 CRISv10: Readd missing header) Merging hexagon/linux-next (44eb66c228fe Hexagon: update CR year for elf.h) Merging ia64/next (d52eefb47d4e ia64/xen: Remove Xen support for ia64) Merging m68k/for-next (7247f55381d5 m68k: Wire up sched_setattr and sched_getattr) Merging m68knommu/for-next (72a8ab3cb2a5 m68knommu: fix arg types for outs* functions) Merging metag/for-next (e9a1d0165bbd metag/smp: Make boot_secondary() static) Merging microblaze/next (1cbe158dec8c microblaze: Drop architecture-specific declaration of early_printk) Merging mips/mips-for-linux-next (7d3f1a59e7e5 Merge branch '3.14-fixes' into mips-for-linux-next) Merging openrisc/for-upstream (548dafe880ad openrisc: Use get_signal() signal_setup_done()) Merging parisc/for-next (6c700d71f7fa [PARISC] hpux: Remove obsolete regs parameter from do_execve() in hpux_execve()) Merging parisc-hd/for-next (38dbfb59d117 Linus 3.14-rc1) Merging powerpc/next (f878f84373ae powerpc: Wire up sched_setattr and sched_getattr syscalls) Merging mpc5xxx/next (bc7505942233 powerpc/512x: dts: add MPC5125 clock specs) Merging galak/next (9e2ecdbba3b0 powerpc/fsl-booke: add the reg prop for pci bridge device node for T4/B4) Merging s390/features (d72d2bb5a6bc s390/checksum: remove memset() within csum_partial_copy_from_user()) Merging sparc-next/master (049ffa8ab33a Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux) Merging tile/master (5e01dc7b26d9 Linux 3.12) Merging uml/next (989e59fa41c5 um: Include generic barrier.h) CONFLICT (content): Merge conflict in arch/um/include/asm/Kbuild Merging unicore32/unicore32 (c284464658ac arch/unicore32: remove CONFIG_EXPERIMENTAL) Merging xtensa/for_next (b3fdfc1b4b64 Merge tag 'xtensa-for-next-20140221-1' into for_next) Merging btrfs/next (cf93da7bcf45 Btrfs: fix spin_unlock in check_ref_cleanup) Merging ceph/master (bee26897097f libceph: a per-osdc crush scratch buffer) Merging cifs/for-next (bfa85c96429d cifs: mask off top byte in get_rfc1002_length()) Merging configfs/linux-next (b930c26416c4 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs) Merging ecryptfs/next (9e78d14a9f64 Use %pd in eCryptFS) Merging ext3/for_next (ff57cd5863cf fsnotify: Allocate overflow events with proper type) Merging ext4/dev (442ed22745a0 ext4: merge uninitialized extents) Merging f2fs/dev (8b8343fa9d50 f2fs: implement a lock-free stat_show) Merging fscache/fscache (fe02fb3ec109 FS-Cache: Handle removal of unadded object to the fscache_object_list rb tree) Merging fuse/for-next (b2ec2778df9d fuse: Turn writeback cache on) Merging gfs2/master (b1ab1e44b4fa GFS2: Remove extra "if" in gfs2_log_flush()) Merging jfs/jfs-next (844fa1b5f849 jfs: set i_ctime when setting ACL) Merging logfs/master (339466142b3f Fix the call to BUG() caused by no free segment found) Merging nfs/linux-next (146d70caaa1b NFS fix error return in nfs4_select_rw_stateid) Merging nfsd/nfsd-next (1406b916f4a2 nfsd: fix lost nfserrno() call in nfsd_setattr()) Merging omfs/for-next (976d167615b6 Linux 3.1-rc9) Merging squashfs/master (6d565409503f Squashfs: fix failure to unlock pages on decompress error) Merging v9fs/for-next (38dbfb59d117 Linus 3.14-rc1) Merging ubifs/linux-next (5547fec74a56 UBI: fix some use after free bugs) Merging xfs/for-next (f13780692e65 Merge branch 'xfs-collapse-range' into for-next) Merging file-private-locks/linux-next (1ed1950c412f locks: add new fcntl cmd values for handling file private locks) Merging vfs/for-next (527d1511310a Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc) Merging pci/next (86afe959b08e Merge branches 'pci/host-designware', 'pci/host-imx6' and 'pci/host-rcar' into next) CONFLICT (content): Merge conflict in drivers/ata/ahci.c Merging hid/for-next (afbe1c7e1a53 Merge branch 'for-3.15/sony' into for-next) CONFLICT (content): Merge conflict in drivers/hid/i2c-hid/i2c-hid.c CONFLICT (content): Merge conflict in drivers/hid/hid-ids.h CONFLICT (content): Merge conflict in drivers/hid/hid-core.c Merging i2c/i2c/for-next (6d0abeca3242 Linux 3.14-rc3) Merging jdelvare-hwmon/master (c1d70b646dae hwmon: (lm90) Convert to use hwmon_device_register_with_groups) Merging hwmon-staging/hwmon-next (10056e55982a hwmon: (max6639) Convert to use devm_hwmon_device_register_with_groups) Merging v4l-dvb/master (b215621049bd Merge branch 'v4l_for_linus' into to_next) Merging kbuild/for-next (ff6b9bdb6263 Merge branch 'kbuild/misc' into kbuild/for-next) Merging kconfig/for-next (95edca5c523c localmodconfig: Add config depends by default settings) Merging libata/for-next (127760ec0cbb Merge branch 'for-3.15' into for-next) $ git reset --hard HEAD^ Merging next-20140225 version of libata Merging pm/linux-next (799a1d02a2d5 Merge branch 'pm-cpufreq-next') Merging idle/next (62eec04c7fa3 Merge branch 'turbostat' into release) Merging apm/for-next (158204397034 apm-emulation: add hibernation APM events to support suspend2disk) Merging cpupowerutils/master (f16603386b38 cpupower tools: add install target to the debug tools' makefiles) Merging thermal/next (6d0abeca3242 Linux 3.14-rc3) Merging ieee1394/for-next (fcd46b34425d firewire: Enable remote DMA above 4 GB) Merging dlm/next (075f01775f53 dlm: use INFO for recovery messages) Merging swiotlb/linux-next (0cb637bff80d swiotlb: Don't DoS us with 'swiotlb buffer is full' (v2)) Merging slave-dma/next (3c79200df630 Merge branch 'fixes' into next) Merging dmaengine/next (77873803363c net_dma: mark broken) Merging net-next/master (cd2b0389dc30 bnx2x: Remove hidden flow control goto from BNX2X_ALLOC macros) CONFLICT (content): Merge conflict in net/ipv6/sit.c CONFLICT (content): Merge conflict in drivers/net/wireless/mwifiex/pcie.c CONFLICT (content): Merge conflict in drivers/net/wireless/ath/ath9k/recv.c Merging ipsec-next/master (895de9a3488a vti4: Enable namespace changing) Merging wireless-next/master (ef1b4141d043 ath5k: set SURVEY_INFO_IN_USE on get_survey) $ git reset --hard HEAD^ Merging next-20140224 version of wireless-next Merging bluetooth/master (a9a58f861218 Bluetooth: Ignore IRKs with no Identity Address) Merging infiniband/for-next (7f3c1e1ba82e Merge branches 'cma', 'cxgb4', 'iser', 'misc', 'mlx4', 'mlx5', 'nes', 'ocrdma', 'qib' and 'usnic' into for-next) Merging mtd/master (bb38eefb6858 mtd: nand: omap: fix ecclayout->oobfree->length) Merging l2-mtd/master (6ce719b36b85 mtd: ts5500: Add dependency) Merging crypto/master (c67a3384ff62 crypto: ccp - Account for CCP backlog processing) CONFLICT (content): Merge conflict in drivers/char/hw_random/Kconfig Merging drm/drm-next (ef64cf9d0604 Merge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next) Merging drm-intel/for-linux-next (4c0e55288211 drm/i915: fix NULL deref in the load detect code) CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/intel_dp.c Merging drm-tegra/drm/for-next (a608d94a0b50 gpu: host1x: export host1x_syncpt_incr_max() function) Merging sound/for-next (bf68665d7a56 ALSA: hda - Avoid codec D3 for keeping mute LED up on Lenovo Yxx0) Merging sound-asoc/for-next (8dcf269ba7ba Merge remote-tracking branches 'asoc/topic/wm8991', 'asoc/topic/wm8993', 'asoc/topic/wm8994', 'asoc/topic/wm8995', 'asoc/topic/wm8996', 'asoc/topic/wm9081' and 'asoc/topic/wm9705' into asoc-next) CONFLICT (content): Merge conflict in sound/soc/kirkwood/Kconfig Merging modules/modules-next (917307b09ad5 module: remove MODULE_GENERIC_TABLE) Merging virtio/virtio-next (6f0317058f43 tools/virtio: add a missing )) Merging input/next (7fb45edba8b5 Input: imx_keypad - Propagate the real error code on platform_get_irq() failure) Merging input-mt/for-next (5e01dc7b26d9 Linux 3.12) Merging block/for-next (e28a3e241fb6 Merge branch 'for-3.15/core' into for-next) Merging device-mapper/for-next (1acacc0784aa dm thin: fix the error path for the thin device constructor) Merging embedded/master (4744b43431e8 embedded: fix vc_translate operator precedence) Merging firmware/master (6e03a201bbe8 firmware: speed up request_firmware(), v3) Merging pcmcia/master (80af9e6d7ae6 pcmcia at91_cf: fix raw gpio number usage) Merging mmc/mmc-next (17c8bc85f272 mmc: dw_mmc: Fix NULL pointer dereference) Merging kgdb/kgdb-next (6bedf31c25dd kdb: Remove unhandled ssb command) Merging slab/for-next (26e4f2057516 slub: Fix possible format string bug.) Merging uclinux/for-next (6dbe51c251a3 Linux 3.9-rc1) Merging md/for-next (789b5e031528 md/raid5: Fix CPU hotplug callback registration) Merging mfd/master (90b128ed1557 Merge tag 'mfd-lee-3.13-3' of git://git.linaro.org/people/ljones/mfd) Merging mfd-lj/for-mfd-next (88a31c8daa3f mfd: twl6040: Check for error when reading revision register) $ git reset --hard HEAD^ Merging next-20140210 version of mfd-lj Merging battery/master (ac323d8d8070 power: max17040: Fix NULL pointer dereference when there is no platform_data) Merging fbdev/for-next (718b90ac4c21 video: xilinxfb: Simplify error path) Merging viafb/viafb-next (838ac785d521 viafb: avoid refresh and mode lookup in set_par) Merging omap_dss2/for-next (c4a41bcc1726 video: xilinxfb: Move xilinxfb_platform_data directly to the driver) Merging regulator/for-next (5d267b8967b2 Merge remote-tracking branches 'regulator/topic/tps65218', 'regulator/topic/tps6524x', 'regulator/topic/tps6586x', 'regulator/topic/tps65910', 'regulator/topic/tps80031', 'regulator/topic/wm831x', 'regulator/topic/wm8350' and 'regulator/topic/wm8994' into regulator-next) Merging security/next (f5645d3575fe capability: Use current logging styles) Merging selinux/next (81c94e76ce8e selinux: fix the output of ./scripts/get_maintainer.pl for SELinux) Merging lblnet/next (d8ec26d7f828 Linux 3.13) Merging watchdog/master (3b8b0d45f703 watchdog: xilinx: Remove no_timeout variable) CONFLICT (content): Merge conflict in drivers/watchdog/orion_wdt.c Merging dwmw2-iommu/master (e5d0c874391a Merge tag 'iommu-updates-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu) Merging iommu/next (972157cac528 arm/smmu: Use irqsafe spinlock for domain lock) Merging vfio/next (3be3a074cf5b vfio-pci: Don't use device_lock around AER interrupt setup) Merging osd/linux-next (19350e7627a6 exofs: Print less in r4w) Merging jc_docs/docs-next (5c050fb96380 docs: update the development process document) Merging trivial/for-next (80dd6eac0090 net-sysfs: fix comment typo 'CONFIG_SYFS') Merging audit/master (f3411cb2b2e3 audit: whitespace fix in kernel-parameters.txt) Merging fsnotify/for-next (1ca39ab9d21a inotify: automatically restart syscalls) Merging devicetree/devicetree/next (f4d4ffc03efc kbuild: dtbs_install: new make target) CONFLICT (content): Merge conflict in drivers/of/of_net.c Applying: net: of: merges fix for a moved comment Merging dt-rh/for-next (06b29e76a74b of: search the best compatible match first in __of_match_node()) Merging spi/for-next (49f0a611bab9 Merge remote-tracking branches 'spi/topic/txx9', 'spi/topic/xfer' and 'spi/topic/xilinx' into spi-next) Merging tip/auto-latest (2d286bdbc88c Merge branch 'x86/x32') Merging clockevents/clockevents/next (00e2bcd6d35f clocksource: Timer-sun5i: Switch to sched_clock_register()) Merging edac/linux_next (3e45588825c1 cell_edac: fix missing of_node_put) Merging edac-amd/for-next (9f2ae6397043 Merge branch 'edac-for-3.15' into for-next) Merging ftrace/for-next (1fcc155351f1 ftrace: Have static function trace clear ENABLED flag on unregister) Merging rcu/rcu/next (cfa0405d3428 Merge branch 'timers.2014.02.25a' into HEAD) CONFLICT (content): Merge conflict in kernel/rcu/rcutorture.c Merging uprobes/for-next (0326f5a94dde uprobes/core: Handle breakpoint and singlestep exceptions) Merging kvm/linux-next (b73117c49364 Merge branch 'kvm-ppc-next' of git://github.com/agraf/linux-2.6 into kvm-queue) Merging kvm-arm/kvm-arm-next (b73117c49364 Merge branch 'kvm-ppc-next' of git://github.com/agraf/linux-2.6 into kvm-queue) Merging kvm-ppc/kvm-ppc-next (b73117c49364 Merge branch 'kvm-ppc-next' of git://github.com/agraf/linux-2.6 into kvm-queue) Merging oprofile/for-next (6ce4eac1f600 Linux 3.13-rc1) Merging fw-nohz/nohz/next (74876a98a87a printk: Wake up klogd using irq_work) Merging xen-tip/linux-next (d8491c62480a Revert "x86/xen: allow privcmd hypercalls to be preempted") Merging percpu/for-next (d5f2deed588b Merge branch 'for-3.14' into for-next) Merging workqueues/for-next (379e899a2c66 Merge branch 'for-3.15' into for-next) Merging drivers-x86/linux-next (b4b0b4a9e039 ipc: add intel-mid's pci id macros) Merging chrome-platform/for-next (2b8454a75b90 platform/chrome: unregister platform driver/device when module exit) Merging sysctl/master (4e474a00d7ff sysctl: protect poll() in entries that may go away) Merging regmap/for-next (091209fa0420 Merge remote-tracking branches 'regmap/topic/irq', 'regmap/topic/nodev' and 'regmap/topic/patch' into regmap-next) Merging hsi/for-next (43139a61fc68 HSI: hsi_char: Update ioctl-number.txt) Merging leds/for-next (59e35a9e5315 drivers/leds: delete non-required instances of include <linux/init.h>) Merging driver-core/driver-core-next (6d8b3e1ad3d3 kernfs: remove duplicate dir.c at the top dir) Merging tty/tty-next (8301bb240d0f Merge 3.14-rc4 into tty-next) Merging usb/usb-next (f080a51bef2c USB: complain if userspace resets an active endpoint) Merging usb-gadget/next (8200762fcebf usb: musb: avoid NULL pointer dereference) Merging staging/staging-next (e0f9dfaf0142 staging: dgap: fix compile warnings by remove dead code) CONFLICT (content): Merge conflict in arch/arm/boot/dts/imx53-qsb.dts CONFLICT (content): Merge conflict in arch/arm/boot/dts/imx53-mba53.dts CONFLICT (content): Merge conflict in arch/arm/boot/dts/imx51-babbage.dts Applying: ARM: dts: i.MX53: merge fix patch Merging char-misc/char-misc-next (90eedf0cbe4b vmbus: use resource for hyperv mmio region) Applying: mei: txe: include irqreturn.h for irqreturn_t etc Merging cgroup/for-next (3e21f870b8f7 Merge branch 'for-3.15' into for-next) Applying: cgroup: fix up for kernfs_mount API change Merging scsi/for-next (960dfc4eb23a Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux) Merging target-updates/for-next (9af6de4a22c5 target: silence GCC warning in target_alua_state_check) Merging target-merge/for-next-merge (b28a960c42fc Linux 3.14-rc2) Merging writeback/writeback-for-next (f9b0e058cbd0 writeback: Fix data corruption on NFS) Merging hwspinlock/linux-next (8b37fcfc9b34 hwspinlock: add MAINTAINERS entries) Merging pinctrl/for-next (02b947a79bd9 Merge branch 'devel' into for-next) Merging vhost/linux-next (d3d665a654a3 vhost-scsi: whitespace tweak) Merging remoteproc/for-next (bd88acba5f98 remoteproc/ste_modem: staticize local symbols) Merging rpmsg/for-next (397944df3290 rpmsg: fix kconfig dependencies for VIRTIO) Merging gpio/for-next (41c761a0c892 Merge branch 'devel' into for-next) Merging dma-mapping/dma-mapping-next (cfbf8d4857c2 Linux 3.14-rc4) Merging pwm/for-next (6691a19966f0 pwm: tiecap: Remove duplicate put_sync call) Merging dma-buf/for-next (c0b00a525c12 dma-buf: update debugfs output) Merging userns/for-next (f58437f1f916 MIPS: VPE: Remove vpe_getuid and vpe_getgid) Merging ktest/for-next (961d9caceea2 ktest: Add BISECT_TRIES to bisect test) Merging signal/for-next (20b4fb485227 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs) Merging clk/clk-next (ad077ceb8a90 Merge branch 'clk-fixes' into clk-next) CONFLICT (content): Merge conflict in arch/arm/boot/dts/keystone-clocks.dtsi Applying: ARM: keystone: dts: fix for code movement Merging random/dev (a9f069e38cc3 random: use the architectural HWRNG for the SHA's IV in extract_buf()) Merging lzo-update/lzo-update (42b775abafaf lib/lzo: huge LZO decompression speedup on ARM by using unaligned access) Merging arm64-hugepages/for-next/hugepages (af07484863e0 ARM64: mm: THP support.) Merging aio/master (4675348e78fa Merge tag 'stable/for-linus-3.14-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip) Merging llvmlinux/for-next (f557840d8992 x86, acpi: LLVMLinux: Remove nested functions from Thinkpad ACPI) Merging akpm-current/current (9ace8e1e408f ipc: use device_initcall) CONFLICT (content): Merge conflict in mm/memcontrol.c CONFLICT (content): Merge conflict in fs/notify/fanotify/fanotify_user.c CONFLICT (content): Merge conflict in arch/arm/mach-shmobile/Kconfig Applying: fanotify: fix for bad merge resolution $ git checkout -b akpm remotes/origin/akpm/master Applying: kernel: use macros from compiler.h instead of __attribute__((...)) Applying: drivers/w1/w1_int.c: call put_device if device_register fails Applying: arm: move arm_dma_limit to setup_dma_zone Applying: mm: add strictlimit knob Merging akpm/master (1163e5aeb5ba mm: add strictlimit knob) [master 19250e55f1de] Revert "kconfig: make allnoconfig disable options behind EMBEDDED and EXPERT"
{ "author": "Stephen Rothwell <sfr@canb.auug.org.au>", "date": "Wed, 26 Feb 2014 19:47:38 +1100", "is_openbsd": false, "thread_id": "759447c5-a2bd-445f-a245-8772f9ea1316@sirena.org.uk.mbox.gz" }
lkml_critique
lkml
Hi all, I have created today's linux-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/sfr/linux-next.git. You can see which trees have been included by looking in the Next/Trees file in the source. There are also quilt-import.log and merge.log files in the Next directory. Between each merge, the tree was built with allmodconfig for both powerpc and x86_64. There were only two minor merge problems. We are up to 34 trees, more are welcome (even if they are currently empty). Status of my local build tests is at http://kisskb.ellerman.id.au/kisskb/branch/9/. We have added arm and m68k to the architectures built. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au
null
null
null
linux-next: Tree for Feb 26
On Wed, 26 Feb 2014 19:47:38 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: ^^^^^ That was just wrong :-) Those were yesterday's figures, today's actually: Non-merge commits (relative to Linus' tree): 4690 4620 files changed, 177782 insertions(+), 100723 deletions(-) -- Cheers, Stephen Rothwell sfr@canb.auug.org.au
{ "author": "Stephen Rothwell <sfr@canb.auug.org.au>", "date": "Wed, 26 Feb 2014 19:50:50 +1100", "is_openbsd": false, "thread_id": "759447c5-a2bd-445f-a245-8772f9ea1316@sirena.org.uk.mbox.gz" }
lkml_critique
lkml
Hi all, I have created today's linux-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/sfr/linux-next.git. You can see which trees have been included by looking in the Next/Trees file in the source. There are also quilt-import.log and merge.log files in the Next directory. Between each merge, the tree was built with allmodconfig for both powerpc and x86_64. There were only two minor merge problems. We are up to 34 trees, more are welcome (even if they are currently empty). Status of my local build tests is at http://kisskb.ellerman.id.au/kisskb/branch/9/. We have added arm and m68k to the architectures built. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au
null
null
null
linux-next: Tree for Feb 26
Hi all, Changes since 20150225: The drm-intel tree gained a conflict against the drm-intel-fixes tree. The clk tree gained a build failure so I used the version from next-20150225. Non-merge commits (relative to Linus' tree): 1558 1217 files changed, 31765 insertions(+), 30907 deletions(-) ---------------------------------------------------------------------------- I have created today's linux-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git (patches at http://www.kernel.org/pub/linux/kernel/next/ ). If you are tracking the linux-next tree using git, you should not use "git pull" to do so as that will try to merge the new linux-next release with the old one. You should use "git fetch" and checkout or reset to the new master. You can see which trees have been included by looking in the Next/Trees file in the source. There are also quilt-import.log and merge.log files in the Next directory. Between each merge, the tree was built with a ppc64_defconfig for powerpc and an allmodconfig for x86_64 and a multi_v7_defconfig for arm. After the final fixups (if any), it is also built with powerpc allnoconfig (32 and 64 bit), ppc44x_defconfig and allyesconfig (this fails its final link) and i386, sparc, sparc64 and arm defconfig. Below is a summary of the state of the merge. I am currently merging 206 trees (counting Linus' and 30 trees of patches pending for Linus' tree). Stats about the size of the tree over time can be seen at http://neuling.org/linux-next-size.html . Status of my local build tests will be at http://kisskb.ellerman.id.au/linux-next . If maintainers want to give advice about cross compilers/configs that work, we are always open to add more builds. Thanks to Randy Dunlap for doing many randconfig builds. And to Paul Gortmaker for triage and bug fixes. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au $ git checkout master $ git reset --hard stable Merging origin/master (b24e2bdde4af Merge tag 'stable/for-linus-4.0-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip) Merging fixes/master (b94d525e58dc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net) Merging kbuild-current/rc-fixes (c517d838eb7d Linux 4.0-rc1) Merging arc-current/for-curr (2ce7598c9a45 Linux 3.17-rc4) Merging arm-current/fixes (23be7fdafa50 ARM: 8305/1: DMA: Fix kzalloc flags in __iommu_alloc_buffer()) Merging m68k-current/for-linus (4436820a98cd m68k/defconfig: Enable Ethernet bridging) Merging metag-fixes/fixes (c2996cb29bfb metag: Fix KSTK_EIP() and KSTK_ESP() macros) Merging mips-fixes/mips-fixes (1795cd9b3a91 Linux 3.16-rc5) Merging powerpc-merge/merge (c517d838eb7d Linux 4.0-rc1) Merging powerpc-merge-mpe/fixes (c59c961ca511 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux) Merging sparc/master (66d0f7ec9f10 sparc32: destroy_context() and switch_mm() needs to disable interrupts.) Merging net/master (31639b94cadc MAINTAINERS: update my email address) Merging ipsec/master (ac37e2515c1a xfrm: release dst_orig in case of error in xfrm_lookup()) Merging sound-current/for-linus (de5d0ad506cb ALSA: hda - Disable runtime PM for Panther Point again) Merging pci-current/for-linus (4efe874aace5 PCI: Don't read past the end of sysfs "driver_override" buffer) Merging wireless-drivers/master (aeb2d2a4c0ae rtlwifi: Remove logging statement that is no longer needed) Merging driver-core.current/driver-core-linus (c517d838eb7d Linux 4.0-rc1) Merging tty.current/tty-linus (c517d838eb7d Linux 4.0-rc1) Merging usb.current/usb-linus (b20b1618b8fc cdc-acm: Add support for Denso cradle CU-321) Merging usb-gadget-fixes/fixes (a0456399fb07 usb: gadget: configfs: don't NUL-terminate (sub)compatible ids) Merging usb-serial-fixes/usb-linus (a6f0331236fa USB: cp210x: add ID for RUGGEDCOM USB Serial Console) Merging staging.current/staging-linus (c517d838eb7d Linux 4.0-rc1) Merging char-misc.current/char-misc-linus (c517d838eb7d Linux 4.0-rc1) Merging input-current/for-linus (4c971aa78314 Merge branch 'next' into for-linus) Merging crypto-current/master (96692a7305c4 crypto: tcrypt - do not allocate iv on stack for aead speed tests) Merging ide/master (f96fe225677b Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net) Merging devicetree-current/devicetree/merge (6b1271de3723 of/unittest: Overlays with sub-devices tests) Merging rr-fixes/fixes (f47689345931 lguest: update help text.) Merging vfio-fixes/for-linus (7c2e211f3c95 vfio-pci: Fix the check on pci device type in vfio_pci_probe()) Merging kselftest-fixes/fixes (f5db310d77ef selftests/vm: fix link error for transhuge-stress test) Merging drm-intel-fixes/for-linux-next-fixes (62e537f8d568 drm/i915: Fix frontbuffer false positve.) Merging asm-generic/master (643165c8bbc8 Merge tag 'uaccess_for_upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost into asm-generic) Merging arc/for-next (c517d838eb7d Linux 4.0-rc1) Merging arm/for-next (42203614b435 Merge branch 'devel-stable' into for-next) Merging arm-perf/for-next/perf (97bf6af1f928 Linux 3.19-rc1) Merging arm-soc/for-next (d88d6cfc912e ARM: mm: Remove Kconfig symbol CACHE_PL310) Merging bcm2835/for-next (b2776bf7149b Linux 3.18) Merging berlin/berlin/for-next (c517d838eb7d Linux 4.0-rc1) Merging cortex-m/for-next (e799b6f37e6c ARM: zImage: add support for ARMv7-M) Merging imx-mxs/for-next (395ae1400a35 Merge branch 'imx/defconfig' into for-next) Merging keystone/next (b17275a4a6cc Merge branch 'for_3.19/soc' into next) Merging mvebu/for-next (444fdf947de3 ARM: mvebu: Add Device Tree description of SDHCI for Armada 388 RD) Merging omap/for-next (67fd14b3eca6 ARM: dts: am335x-bone*: usb0 is hardwired for peripheral) Merging omap-pending/for-next (30aa18d3bea5 MAINTAINERS: add maintainer for OMAP hwmod data) Merging renesas/next (095a57c450d3 Merge branches 'heads/defconfig-for-v4.1' and 'heads/r8a73a4-ccf-and-multiplatform-for-v4.1' into next) Merging samsung/for-next (aeb011501873 Merge branch 'v3.20-samsung-defconfig-2' into for-next) Merging sunxi/sunxi/for-next (50997798fb8a Merge branch 'sunxi/fixes-for-4.0' into sunxi/for-next) Merging tegra/for-next (794345d409ad Merge branch for-3.20/arm64 into for-next) Merging arm64/for-next/core (d476d94f180a arm64: compat: Remove incorrect comment in compat_siginfo) Merging blackfin/for-linus (275f5a8573e7 blackfin: defconfigs: cleanup unused CONFIG_MTD_CHAR, add MTD_SPI_NOR for BF537-STAMP) Merging c6x/for-linux-next (ae72758f1dd9 c6x: fix build failure caused by cache.h) Merging cris/for-next (9987c19ed9a7 CRIS: Whitespace cleanup) Merging hexagon/linux-next (8914d7e85780 Hexagon: fix signal delivery for debug traps) Merging ia64/next (a6b8978c54b7 pstore: Fix sprintf format specifier in pstore_dump()) Merging m68k/for-next (4436820a98cd m68k/defconfig: Enable Ethernet bridging) Merging m68knommu/for-next (c517d838eb7d Linux 4.0-rc1) Merging metag/for-next (f93125ae17d1 metag: cachepart: Fix failure check) Merging microblaze/next (a01d37d914f9 microblaze: Remove *.dtb files in make clean) Merging mips/mips-for-linux-next (c517d838eb7d Linux 4.0-rc1) Merging nios2/nios2-next (d16d2be111a6 nios2: add kgdb support) Merging parisc-hd/for-next (bfa76d495765 Linux 3.19) Merging powerpc/next (c517d838eb7d Linux 4.0-rc1) Merging powerpc-mpe/next (a6130ed253a9 cxl: Add missing return statement after handling AFU errror) Merging fsl/next (0dc294f717d4 powerpc/mm: bail out early when flushing TLB page) Merging mpc5xxx/next (9e813308a5c1 powerpc/thp: Add tracepoints to track hugepage invalidate) Merging s390/features (2aa7c23d8a9b s390/traps: panic() instead of die() on translation exception) Merging sparc-next/master (9f935675d41a Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input) Merging tile/master (740e1433f50e tile: change MAINTAINERS website from tilera.com to ezchip.com) Merging unicore32/unicore32 (d670878e2c9a unicore32: Remove ARCH_HAS_CPUFREQ config option) Merging xtensa/for_next (1f2fdbd0078c xtensa: disable link optimization) Merging btrfs/next (a742994aa2e2 Btrfs: don't remove extents and xattrs when logging new names) Merging ceph/master (388cfdc9bc19 libceph: require cephx message signature by default) CONFLICT (content): Merge conflict in net/ceph/ceph_common.c CONFLICT (content): Merge conflict in net/ceph/auth_x.c CONFLICT (content): Merge conflict in include/linux/ceph/libceph.h CONFLICT (content): Merge conflict in fs/ceph/super.h CONFLICT (content): Merge conflict in fs/ceph/super.c CONFLICT (content): Merge conflict in fs/ceph/snap.c CONFLICT (content): Merge conflict in fs/ceph/inode.c Merging cifs/for-next (5a090583c3fc Update negotiate protocol for SMB3.1 dialect) Merging ecryptfs/next (2a559a8bdeae eCryptfs: ensure copy to crypt_stat->cipher does not overrun) Merging ext3/for_next (6981498d7956 udf: remove bool assignment to 0/1) Merging ext4/dev (6f30b7e37a82 ext4: fix indirect punch hole corruption) Merging f2fs/dev (db3ecdee1cf0 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds) Merging fscache/fscache (1a8ed18fb7db cachefiles: remove two unused pagevecs.) CONFLICT (content): Merge conflict in fs/fscache/object.c Merging fuse/for-next (9759bd518994 fuse: add memory barrier to INIT) Merging gfs2/for-next (89d4899e65a7 GFS2: Move gfs2_file_splice_write outside of #ifdef) Merging jfs/jfs-next (648695c74811 jfs: Deletion of an unnecessary check before the function call "unload_nls") Merging nfs/linux-next (7a27eae362ae Merge tag 'nfs-rdma-for-4.0-3' of git://git.linux-nfs.org/projects/anna/nfs-rdma) Merging nfsd/nfsd-next (a1d1e9be5a1d svcrpc: fix memory leak in gssp_accept_sec_context_upcall) Merging overlayfs/overlayfs-next (4330397e4e8a ovl: discard independent cursor in readdir()) Merging squashfs/master (62421645bb70 Squashfs: Add LZ4 compression configuration option) Merging v9fs/for-next (f15844e0777f 9P: fix return value in v9fs_fid_xattr_set) Merging ubifs/linux-next (b388e6a7a6ba UBI: fix missing brace control flow) Merging xfs/for-next (88e8fda99a4c Merge branch 'xfs-mmap-lock' into for-next) Merging file-locks/linux-next (b2b89ebfc0f0 Merge tag 'locks-v3.20-2' of git://git.samba.org/jlayton/linux) Merging vfs/for-next (ca160d0085b6 kill struct filename.separate) Merging pci/next (c517d838eb7d Linux 4.0-rc1) Merging hid/for-next (0f088b67459f Merge branch 'for-4.1/rmi' into for-next) Merging i2c/i2c/for-next (c517d838eb7d Linux 4.0-rc1) Merging jdelvare-hwmon/master (26bc420b59a3 Linux 3.19-rc6) Merging hwmon-staging/hwmon-next (9248faef66cd hwmon: (ibmpex) Allow format string checking) Merging v4l-dvb/master (48b777c0833b Merge branch 'patchwork' into to_next) Merging kbuild/for-next (94100b52d1c0 Merge branch 'kbuild/kconfig' into kbuild/for-next) Merging kconfig/for-next (bfa76d495765 Linux 3.19) Merging libata/for-next (d85aa1624b05 Merge branch 'for-3.19-fixes' into for-next) Merging pm/linux-next (3a64df4a3a4d genirq / PM: better describe IRQF_NO_SUSPEND semantics) Merging idle/next (210109f4a19a Merge branches 'turbostat', 'sfi' and 'cpuidle' into release) Merging apm/for-next (53675abbd1e5 x86, apm: Remove unused variable) Merging thermal/next (4531fa1684bb thermal: exynos: fix: Check if data->tmu_read callback is present before read) Merging thermal-soc/next (1a9f3d3782f9 Merge branch 'work-fixes' into work-next) Merging ieee1394/for-next (d71e6a11737f firewire: core: use correct vendor/model IDs) Merging dlm/next (2ab4bd8ea3a6 dlm: adopt orphan locks) Merging swiotlb/linux-next (8e0629c1d4ce swiotlb: don't assume PA 0 is invalid) Merging slave-dma/next (771bd4f095dd Merge branch 'fixes' into next) Merging net-next/master (92bf200881d9 net: via-rhine: add BQL support) Merging ipsec-next/master (ff660f75be36 Merge branch 'stmmac-pci') Merging wireless-drivers-next/master (d53071143aa5 Merge ath-next from ath.git) Merging bluetooth/master (03f310efd4b1 Bluetooth: Remove unnecessary queue_monitor_skb() function) Merging infiniband/for-next (147d1da951cf Merge branches 'core', 'cxgb4', 'iser', 'mlx4', 'mlx5', 'ocrdma', 'odp', 'qib' and 'srp' into for-next) Merging mtd/master (c517d838eb7d Linux 4.0-rc1) Merging l2-mtd/master (d6a3f0176fe0 mtd: block2mtd: wait until block devices are presented) Merging crypto/master (db71f29a1c32 crypto: testmgr - mark rfc4106(gcm(aes)) as fips_allowed) Merging drm/drm-next (45ee2dbc65cb Merge branch 'drm-next-3.20' of git://people.freedesktop.org/~agd5f/linux into drm-next) Merging drm-panel/drm/panel/for-next (23923ebaac52 drm: Remove unused DRM_MODE_OBJECT_BRIDGE) Merging drm-intel/for-linux-next (06dc68d68090 drm/i915: Plumb drm_device through page tables operations) CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/intel_display.c Merging drm-tegra/drm/tegra/for-next (07d05cbf60ed drm/tegra: dc: Move more code into ->init()) Merging drm-misc/topic/drm-misc (e045d20bef41 drm: Adding edp1.4 specific dpcd macros) Merging sound/for-next (9603cded0e2c ALSA: cmipci: remove a stray space character) Merging sound-asoc/for-next (0179015b2c7f Merge remote-tracking branches 'asoc/topic/rt5677', 'asoc/topic/tegra', 'asoc/topic/wm-adsp' and 'asoc/topic/wm8804' into asoc-next) Merging modules/modules-next (9cc019b8c94f module: Replace over-engineered nested sleep) Merging virtio/virtio-next (5b40a7daf518 virtio: don't set VIRTIO_CONFIG_S_DRIVER_OK twice.) Merging input/next (290b799c390d Input: psmouse - use IS_ENABLED instead of homegrown code) Merging block/for-next (434c26478166 Merge branch 'for-3.20/core' into for-next) Merging device-mapper/for-next (d379ecbac533 dm: don't start current request if it would've merged with the previous) Merging mmc/mmc-next (11bc9381b277 mmc: sdhci-s3c: use mmc_of_parse and remove the card_tasklet) Merging mmc-uh/next (802ea9d8645d Merge tag 'dm-3.20-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm) Merging kgdb/kgdb-next (dd8f30cc0550 kgdb, docs: Fix <para> pdfdocs build errors) Merging md/for-next (26ac107378c4 md/raid5: Fix livelock when array is both resyncing and degraded.) Merging mfd/for-mfd-next (0a65fbf64dad mfd: intel_soc_pmic: Add missing error check for devm_kzalloc) Merging backlight/for-backlight-next (1926469377bb backlight: da9052_bl: Terminate da9052_wled_ids array with empty element) Merging battery/master (881f985a2568 bq2415x_charger, bq27x00_battery.c: comment cleanups) Merging omap_dss2/for-next (d6c2152b3efd Merge branches '3.20/fbdev' and '3.20/omapdss' into for-next) Merging regulator/for-next (224c7f4452a2 Merge remote-tracking branches 'regulator/topic/load-op' and 'regulator/topic/wm8350' into regulator-next) Merging security/next (04f81f0154e4 cipso: don't use IPCB() to locate the CIPSO IP option) Merging integrity/next (7bea7ff67e0c ima: /proc/keys is now mandatory) Merging selinux/next (387fb779789d selinux: reconcile security_netlbl_secattr_to_sid() and mls_import_netlbl_cat()) Merging lblnet/next (b2776bf7149b Linux 3.18) Merging watchdog/master (c517d838eb7d Linux 4.0-rc1) Merging iommu/next (a3f447a4f19c iommu/msm: Mark driver BROKEN) Merging dwmw2-iommu/master (1860e379875d Linux 3.15) Merging vfio/next (6140a8f56238 vfio-pci: Add device request interface) Merging osd/linux-next (1fa3a002b254 Boaz Harrosh - fix email in Documentation) Merging jc_docs/docs-next (52e68924dfa8 Documentation: Fix the wrong command `echo -1 > set_ftrace_pid` for cleaning the filter.) Merging trivial/for-next (edb0ec0725bb kexec, Kconfig: spell "architecture" properly) Merging audit/next (5b28255278dd audit: reduce mmap_sem hold for mm->exe_file) Merging devicetree/devicetree/next (fca8ba4ee24d of/unittest: Remove obsolete code) Merging dt-rh/for-next (3c3c8e3618b0 Merge remote-tracking branch 'grant/devicetree/next' into for-next) Merging mailbox/mailbox-for-next (9f3e3cacb2ff dt: mailbox: add generic bindings) Merging spi/for-next (a12329cfd181 Merge remote-tracking branches 'spi/topic/bcm53xx', 'spi/topic/dw', 'spi/topic/s3c64xx', 'spi/topic/sc18is602' and 'spi/topic/spidev' into spi-next) Merging tip/auto-latest (d0a45fc13f16 Merge branch 'x86/urgent') Merging clockevents/clockevents/next (4c8305221193 clocksource: Driver for Conexant Digicolor SoC timer) CONFLICT (add/add): Merge conflict in drivers/clocksource/rockchip_timer.c CONFLICT (content): Merge conflict in drivers/clocksource/Kconfig CONFLICT (content): Merge conflict in arch/arm/mach-rockchip/Kconfig Merging edac/linux_next (fec53af531dd sb_edac: Fix typo computing number of banks) Merging edac-amd/for-next (30263b4052c6 EDAC, mv64x60_edac: Fix an error code in probe()) Merging irqchip/irqchip/for-next (91d117921216 irqchip: atmel-aic-common: Prevent clobbering of priority when changing IRQ type) Merging tiny/tiny/next (f114040e3ea6 Linux 3.18-rc1) Merging ftrace/for-next (c19565fc83e6 Merge branch 'for-next/ftrace/core' into trace/for-next) Merging rcu/rcu/next (b52e22f3021d Merge with c8bcfbf1b744 (rcu: Process offlining and onlining only at grace-period start)) Merging kvm/linux-next (4ff6f8e61eb7 KVM: emulate: fix CMPXCHG8B on 32-bit hosts) Merging kvm-arm/next (4b990589952f KVM: Remove unused config symbol) Merging kvm-ppc/kvm-ppc-next (2c4aa55a6af0 Merge tag 'signed-kvm-ppc-next' of git://github.com/agraf/linux-2.6 into HEAD) Merging kvms390/next (de8e5d744051 KVM: Disable compat ioctl for s390) Merging xen-tip/linux-next (a2e75bc2ee20 xenbus: Add proper handling of XS_ERROR from Xenbus for transactions.) Merging percpu/for-next (4c907baf36d8 percpu_ref: implement percpu_ref_is_dying()) Merging workqueues/for-next (b5b3ab523e31 Merge branch 'for-3.19-fixes' into for-next) Merging drivers-x86/for-next (c57c0fa4bc9c toshiba_acpi: Cleanup GPL header) Merging chrome-platform/for-next (5502486a2077 platform/chrome: chromeos_laptop - Add a limit for deferred retries) Merging regmap/for-next (48bbdbb173fa Merge remote-tracking branch 'regmap/fix/irq' into regmap-linus) Merging hsi/for-next (f034125dfdae HSI: nokia-modem: fix error return code) Merging leds/for-next (ffe2428614d2 leds: flash: remove stray include directive) Merging ipmi/for-next (3a31f945b709 ipmi: Remove incorrect use of seq_has_overflowed) Merging driver-core/driver-core-next (c517d838eb7d Linux 4.0-rc1) Merging tty/tty-next (c517d838eb7d Linux 4.0-rc1) Merging usb/usb-next (c517d838eb7d Linux 4.0-rc1) Merging usb-gadget/next (c517d838eb7d Linux 4.0-rc1) Merging usb-serial/usb-next (3e264ffc831e USB: mos7840: remove unused code) Merging staging/staging-next (43da0d92ab7d staging: fbtft: fix space prohibited before that ',') Merging char-misc/char-misc-next (c517d838eb7d Linux 4.0-rc1) Merging cgroup/for-next (8abba61bcfd4 Merge branch 'for-3.19-fixes' into for-next) Merging scsi/for-next (cad8000836ef Merge branch 'misc' into for-next) Merging target-updates/for-next (aa04dae454d0 target: Set LBPWS10 bit in Logical Block Provisioning EVPD) Merging target-merge/for-next-merge (b28a960c42fc Linux 3.14-rc2) Merging pinctrl/for-next (c517d838eb7d Linux 4.0-rc1) Merging vhost/linux-next (4fe00489e61c vhost: drop hard-coded num_buffers size) Merging remoteproc/for-next (9a3c4145af32 Linux 3.16-rc6) Merging rpmsg/for-next (b1b9891441fa rpmsg: use less buffers when vrings are small) Merging gpio/for-next (2f97c20e5f7c gpio: tps65912: fix wrong container_of arguments) Merging dma-mapping/dma-mapping-next (dda02fd6278d mm, cma: make parameters order consistent in func declaration and definition) Merging pwm/for-next (b65af27ad89d pwm: tegra: Use NSEC_PER_SEC) Merging dma-buf/for-next (817bd7253291 dma-buf: cleanup dma_buf_export() to make it easily extensible) Merging userns/for-next (db86da7cb76f userns: Unbreak the unprivileged remount tests) Merging ktest/for-next (7c2c49eceb79 ktest: Place quotes around item variable) Merging clk/clk-next (a2146f032294 clk: Use lockdep asserts to find missing hold of prepare_lock) $ git reset --hard HEAD^ Merging next-20150225 version of clk Merging random/dev (7185ad2672a7 crypto: memzero_explicit - make sure to clear out sensitive data) Merging aio/master (5f785de58873 aio: Skip timer for io_getevents if timeout=0) Merging llvmlinux/for-next (25d4aee23af2 arm: LLVMLinux: Use global stack register variable for percpu) Merging kselftest/next (6ddf898c23d6 selftests/exec: Check if the syscall exists and bail if not) Merging y2038/y2038 (ed8c2241c1ae coredump: Use 64bit time for unix time of coredump) Merging luto-misc/next (788807d7ca38 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux) Merging access_once/linux-next (c5b19946eb76 kernel: Fix sparse warning for ACCESS_ONCE) Merging livepatching/for-next (0937e3b025f7 livepatch: simplify disable error path) Merging akpm-current/current (d07b956c650a scripts/gdb: Add infrastructure) CONFLICT (content): Merge conflict in scripts/module-common.lds CONFLICT (add/add): Merge conflict in scripts/Makefile.kasan CONFLICT (content): Merge conflict in mm/vmscan.c CONFLICT (content): Merge conflict in mm/swap.c CONFLICT (content): Merge conflict in mm/slub.c CONFLICT (content): Merge conflict in mm/slab_common.c CONFLICT (modify/delete): mm/filemap_xip.c deleted in HEAD and modified in akpm-current/current. Version akpm-current/current of mm/filemap_xip.c left in tree. CONFLICT (content): Merge conflict in lib/Makefile CONFLICT (content): Merge conflict in kernel/fork.c CONFLICT (content): Merge conflict in init/Kconfig CONFLICT (content): Merge conflict in include/linux/mm.h CONFLICT (content): Merge conflict in fs/xfs/xfs_file.c CONFLICT (content): Merge conflict in fs/notify/fanotify/fanotify.c CONFLICT (content): Merge conflict in drivers/rtc/Makefile CONFLICT (content): Merge conflict in drivers/block/zram/zram_drv.c CONFLICT (content): Merge conflict in arch/x86/include/asm/pgtable.h CONFLICT (content): Merge conflict in arch/x86/Kconfig CONFLICT (content): Merge conflict in arch/powerpc/kernel/time.c CONFLICT (content): Merge conflict in arch/mips/include/asm/pgtable-bits.h CONFLICT (add/add): Merge conflict in Documentation/kasan.txt $ git rm -f mm/filemap_xip.c Applying: fix bad merge in akpm-current Applying: fix another bad merge in akpm-current $ git checkout -b akpm remotes/origin/akpm/master Applying: ocfs2: use 64bit variables to track heartbeat time Applying: lib/Kconfig: fix up HAVE_ARCH_BITREVERSE help text Applying: drivers/w1/w1_int.c: call put_device if device_register fails Applying: mm: add strictlimit knob Merging akpm/master (76bc1df6c125 mm: add strictlimit knob)
{ "author": "Stephen Rothwell <sfr@canb.auug.org.au>", "date": "Thu, 26 Feb 2015 14:40:42 +1100", "is_openbsd": false, "thread_id": "759447c5-a2bd-445f-a245-8772f9ea1316@sirena.org.uk.mbox.gz" }
lkml_critique
lkml
Hi all, I have created today's linux-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/sfr/linux-next.git. You can see which trees have been included by looking in the Next/Trees file in the source. There are also quilt-import.log and merge.log files in the Next directory. Between each merge, the tree was built with allmodconfig for both powerpc and x86_64. There were only two minor merge problems. We are up to 34 trees, more are welcome (even if they are currently empty). Status of my local build tests is at http://kisskb.ellerman.id.au/kisskb/branch/9/. We have added arm and m68k to the architectures built. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au
null
null
null
linux-next: Tree for Feb 26
Hi all, Changes since 20160225: The sunxi tree gained conflicts against Linus' and the arm-soc trees. The net-next tree gained a conflict against the net tree. The tip tree gained conflicts against the arm64 tree. The aio tree still had a build failure so I used the version from next-20160111. The akpm-current tree gained a conflict against the tip tree and I applied another fix patch. It also gained another build failure for which I applied another fix patch. Non-merge commits (relative to Linus' tree): 7266 5926 files changed, 270491 insertions(+), 129316 deletions(-) ---------------------------------------------------------------------------- I have created today's linux-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git (patches at http://www.kernel.org/pub/linux/kernel/next/ ). If you are tracking the linux-next tree using git, you should not use "git pull" to do so as that will try to merge the new linux-next release with the old one. You should use "git fetch" and checkout or reset to the new master. You can see which trees have been included by looking in the Next/Trees file in the source. There are also quilt-import.log and merge.log files in the Next directory. Between each merge, the tree was built with a ppc64_defconfig for powerpc and an allmodconfig (with CONFIG_BUILD_DOCSRC=n) for x86_64, a multi_v7_defconfig for arm and a native build of tools/perf. After the final fixups (if any), I do an x86_64 modules_install followed by builds for x86_64 allnoconfig, powerpc allnoconfig (32 and 64 bit), ppc44x_defconfig, allyesconfig (this fails its final link) and pseries_le_defconfig and i386, sparc and sparc64 defconfig. Below is a summary of the state of the merge. I am currently merging 239 trees (counting Linus' and 36 trees of patches pending for Linus' tree). Stats about the size of the tree over time can be seen at http://neuling.org/linux-next-size.html . Status of my local build tests will be at http://kisskb.ellerman.id.au/linux-next . If maintainers want to give advice about cross compilers/configs that work, we are always open to add more builds. Thanks to Randy Dunlap for doing many randconfig builds. And to Paul Gortmaker for triage and bug fixes. -- Cheers, Stephen Rothwell $ git checkout master $ git reset --hard stable Merging origin/master (6dc390ad61ac Merge tag 'arc-4.5-rc6-fixes-upd' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc) Merging fixes/master (36f90b0a2ddd Linux 4.5-rc2) Merging kbuild-current/rc-fixes (3d1450d54a4f Makefile: Force gzip and xz on module install) Merging arc-current/for-curr (9ef2d8be5565 arc: SMP: CONFIG_ARC_IPI_DBG cleanup) Merging arm-current/fixes (c7edd7f99cda ARM: 8534/1: virt: fix hyp-stub build for pre-ARMv7 CPUs) Merging m68k-current/for-linus (daf670bc9d36 m68k/defconfig: Update defconfigs for v4.5-rc1) Merging metag-fixes/fixes (0164a711c97b metag: Fix ioremap_wc/ioremap_cached build errors) Merging mips-fixes/mips-fixes (1795cd9b3a91 Linux 3.16-rc5) Merging powerpc-fixes/fixes (9ab3ac233a8b powerpc/mm/hash: Clear the invalid slot information correctly) Merging powerpc-merge-mpe/fixes (bc0195aad0da Linux 4.2-rc2) Merging sparc/master (ca0bb0798022 Add sun4v_wdt watchdog driver) Merging net/master (ee50c130c821 net: jme: fix suspend/resume on JMC260) Merging ipsec/master (3ed01df4ff79 xfrm: Reset encapsulation field of the skb before transformation) Merging ipvs/master (5acaf89f88b9 netfilter: ipvs: handle ip_vs_fill_iph_skb_off failure) Merging wireless-drivers/master (c699404db182 Merge tag 'iwlwifi-for-kalle-2016-02-15' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes) Merging mac80211/master (b86071528f32 cfg80211: stop critical protocol session upon disconnect event) Merging sound-current/for-linus (2ae955774f29 ALSA: hda - Fixup speaker pass-through control for nid 0x14 on ALC225) Merging pci-current/for-linus (0a61cb947a5a Merge branch 'pci/host-hv' into for-linus) Merging driver-core.current/driver-core-linus (18558cae0272 Linux 4.5-rc4) Merging tty.current/tty-linus (18558cae0272 Linux 4.5-rc4) Merging usb.current/usb-linus (428b315a2475 Merge tag 'fixes-for-v4.5-rc6' of http://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus) Merging usb-gadget-fixes/fixes (3b2435192fe9 MAINTAINERS: drop OMAP USB and MUSB maintainership) Merging usb-serial-fixes/usb-linus (d061c1caa31d USB: option: add "4G LTE usb-modem U901") Merging usb-chipidea-fixes/ci-for-usb-stable (8c0614ca312c usb: chipidea: fix return value check in ci_hdrc_pci_probe()) Merging staging.current/staging-linus (7a64cd887fdb drivers: android: correct the size of struct binder_uintptr_t for BC_DEAD_BINDER_DONE) Merging char-misc.current/char-misc-linus (18558cae0272 Linux 4.5-rc4) Merging input-current/for-linus (ff84dabe3c6e Input: colibri-vf50-ts - add missing #include <linux/of.h>) Merging crypto-current/master (8a3978ad55fb crypto: marvell/cesa - fix test in mv_cesa_dev_dma_init()) Merging ide/master (e04a2bd6d8c9 drivers/ide: make ide-scan-pci.c driver explicitly non-modular) Merging devicetree-current/devicetree/merge (f76502aa9140 of/dynamic: Fix test for PPC_PSERIES) Merging rr-fixes/fixes (8244062ef1e5 modules: fix longstanding /proc/kallsyms vs module insertion race.) Merging vfio-fixes/for-linus (16ab8a5cbea4 vfio/noiommu: Don't use iommu_present() to track fake groups) Merging kselftest-fixes/fixes (92e963f50fc7 Linux 4.5-rc1) Merging backlight-fixes/for-backlight-fixes (68feaca0b13e backlight: pwm: Handle EPROBE_DEFER while requesting the PWM) Merging ftrace-fixes/for-next-urgent (6224beb12e19 tracing: Have branch tracer use recursive field of task struct) Merging mfd-fixes/for-mfd-fixes (1b52e50f2a40 mfd: max77843: Fix max77843_chg_init() return on error) Merging drm-intel-fixes/for-linux-next-fixes (9b18572e83bf drm/i915/gen9: Verify and enforce dc6 state writes) Merging asm-generic/master (040b323b5012 ARM: asm/div64.h: adjust to generic codde) Merging arc/for-next (e75daf55992d ARC: clockevent: Prepare for DT based probe) Merging arm/for-next (113b44c6c25b Merge branches 'amba', 'fixes', 'misc' and 'tauros2' into for-next) Merging arm-perf/for-next/perf (94085fe570e7 arm64: dts: Add Cavium ThunderX specific PMU) Merging arm-soc/for-next (4455d3de7d77 ARM: SoC: document merges) Merging at91/at91-next (799da647446d Merge tag 'at91-ab-4.6-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into at91-next) Merging bcm2835/for-next (b2776bf7149b Linux 3.18) Merging bcm2835-dt/bcm2835-dt-next (1305141d1a72 ARM: bcm2835: add bcm2835-aux-uart support to DT) Merging bcm2835-soc/bcm2835-soc-next (92e963f50fc7 Linux 4.5-rc1) Merging bcm2835-drivers/bcm2835-drivers-next (92e963f50fc7 Linux 4.5-rc1) Merging bcm2835-defconfig/bcm2835-defconfig-next (0a05d3b71ada ARM: multi_v7_defconfig: Enable BCM283x) Merging berlin/berlin/for-next (9a7e06833249 Merge branch 'berlin/fixes' into berlin/for-next) Merging cortex-m/for-next (f719a0d6a854 ARM: efm32: switch to vendor,device compatible strings) Merging imx-mxs/for-next (655f2d0d2295 Merge branch 'imx/defconfig' into for-next) Merging keystone/next (8fdbbde4a16c Merge branch 'for_4.6/keystone_dts' into next) Merging mvebu/for-next (5be603bdf1a7 Merge branch 'mvebu/dt64' into mvebu/for-next) Merging omap/for-next (601052bca473 Merge branch 'omap-for-v4.6/dt' into for-next) Merging omap-pending/for-next (8fe097a3d99e ARM: DRA7: hwmod: Add reset data for PCIe) Merging qcom/for-next (5b19b3012f3b ARM: dts: msm8974: Add SCM firmware node) CONFLICT (content): Merge conflict in MAINTAINERS Merging renesas/next (fd5c290b7efd Merge branches 'heads/sh-drivers-fixes-for-v4.5', 'heads/arm64-defconfig-for-v4.6', 'heads/arm64-dt-for-v4.6', 'heads/defconfig-for-v4.6' and 'heads/dt-for-v4.6' into next) CONFLICT (content): Merge conflict in arch/arm64/configs/defconfig Merging rockchip/for-next (2def4fc4fc2d Merge branch 'v4.6-clk/next' into for-next) Merging rpi/for-rpi-next (bc0195aad0da Linux 4.2-rc2) Merging samsung/for-next (92e963f50fc7 Linux 4.5-rc1) Merging samsung-krzk/for-next (341080b4d9b4 Merge branch 'next/soc' into for-next) Merging sunxi/sunxi/for-next (73e5379b0442 Merge branches 'sunxi/clocks-for-4.6', 'sunxi/config64-for-4.6' and 'sunxi/dt-for-4.6' into sunxi/for-next) CONFLICT (content): Merge conflict in arch/arm64/configs/defconfig Merging tegra/for-next (6af0a1cda782 Merge branch for-4.6/arm64 into for-next) Merging arm64/for-next/core (cac4b8cdf5a2 arm64: Fix building error with 16KB pages and 36-bit VA) Merging blackfin/for-linus (d91e14b3b9e1 eth: bf609 eth clock: add pclk clock for stmmac driver probe) Merging c6x/for-linux-next (ca3060d39ae7 c6x: Use generic clkdev.h header) Merging cris/for-next (f9f3f864b5e8 cris: Fix section mismatches in architecture startup code) Merging h8300/h8300-next (11943fdd17d2 h8300: dts: Rename the serial port clock to fck) Merging hexagon/linux-next (02cc2ccfe771 Revert "Hexagon: fix signal.c compile error") Merging ia64/next (7e26e9ff0a93 pstore: Fix return type of pstore_is_mounted()) Merging m68k/for-next (a9c9d9aca4e7 zorro: Use kobj_to_dev()) Merging m68knommu/for-next (0cdfea013ee8 m68knommu: fix FEC platform device registration when driver is modular) Merging metag/for-next (c8b6ad8b3f87 metag: ftrace: remove the misleading comment for ftrace_dyn_arch_init) Merging microblaze/next (c937adb7ec91 microblaze: Wire up userfaultfd, membarrier, mlock2 syscalls) Merging mips/mips-for-linux-next (606aab63d453 Merge branch '4.5-fixes' into mips-for-linux-next) Merging nios2/for-next (8e3d7c834ba0 nios2: fix cache coherency) Merging parisc-hd/for-next (afd2ff9b7e1b Linux 4.4) Merging powerpc/next (c3ab300ea555 powerpc: Add POWER9 cputable entry) Merging powerpc-mpe/next (bc0195aad0da Linux 4.2-rc2) Merging fsl/next (44451d4d8f0e MAINTAINERS: Update Scott Wood's e-mail address) Merging mpc5xxx/next (39e69f55f857 powerpc: Introduce the use of the managed version of kzalloc) Merging s390/features (993e0681084c s390/oprofile: add z13/z13s model numbers) Merging sparc-next/master (9f935675d41a Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input) Merging tile/master (f1c3418ed4e6 tile kgdb: fix bug in copy to gdb regs, and optimize memset) Merging uml/linux-next (288b31a382d2 um: use %lx format specifiers for unsigned longs) Merging unicore32/unicore32 (d670878e2c9a unicore32: Remove ARCH_HAS_CPUFREQ config option) Merging xtensa/for_next (bb2f3486041a Merge tag 'xtensa-for-next-20160111' of git://github.com/jcmvbkbc/linux-xtensa) Merging btrfs/next (988f1f576d4f Merge branch 'for-chris-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux into for-linus-4.5) Merging btrfs-kdave/for-next (b7364eb223db Merge branch 'for-next-4.6-20160225' into for-next-20160225) Merging ceph/master (cd8140c673d9 libceph: don't spam dmesg with stray reply warnings) Merging cifs/for-next (6dc390ad61ac Merge tag 'arc-4.5-rc6-fixes-upd' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc) Merging configfs/for-next (1609bac8af31 configfs: add myself as co-maintainer, updated git tree) Merging ecryptfs/next (933c32fe0e42 ecryptfs: drop null test before destroy functions) Merging ext3/for_next (6332b9b5e797 ext4: Make Q_GETNEXTQUOTA work for quota in hidden inodes) Merging ext4/dev (d89b5f6318c2 jbd2: save some atomic ops in __JI_COMMIT_RUNNING handling) Merging f2fs/dev (362977b0dbc6 f2fs crypto: sync ext4_lookup and ext4_file_open) Merging fscache/fscache (b00c2ae2ed3c FS-Cache: Don't override netfs's primary_index if registering failed) Merging fuse/for-next (0b5da8db145b fuse: add support for SEEK_HOLE and SEEK_DATA in lseek) Merging gfs2/for-next (a63be4e6d0e9 GFS2: Eliminate parameter non_block on gfs2_inode_lookup) Merging jfs/jfs-next (26456955719b jfs: clean up jfs_rename and fix out of order unlock) Merging nfs/linux-next (9fd4b9fc7695 NFSv4.x/pnfs: Fix a race between layoutget and bulk recalls) Merging nfsd/nfsd-next (b7052cd7bcf3 sunrpc/cache: fix off-by-one in qword_get()) Merging orangefs/for-next (c1223ca48baa orangefs: get rid of op refcounts) Applying: orangfs: update for follow_link to get_link change Merging overlayfs/overlayfs-next (84889d493356 ovl: check dentry positiveness in ovl_cleanup_whiteouts()) Merging squashfs/master (62421645bb70 Squashfs: Add LZ4 compression configuration option) Merging v9fs/for-next (a333e4bf2556 fs/9p: use fscache mutex rather than spinlock) Merging ubifs/linux-next (4fdd1d51ad5d ubifs: Use XATTR_*_PREFIX_LEN) Merging xfs/for-next (e15c65b38461 Merge branch 'xfs-writepage-rework-4.6' into for-next) Merging file-locks/linux-next (5af9c2e19da6 Merge branch 'akpm' (patches from Andrew)) Merging vfs/for-next (6f3925248b75 Merge branches 'work.iov_iter', 'work.copy_file_range', 'work.xattr' and 'work.symlinks' into for-next) Merging pci/next (a314966fad61 Merge branches 'pci/host-designware', 'pci/host-imx6', 'pci/host-layerscape' and 'pci/host-rcar' into next) CONFLICT (content): Merge conflict in drivers/pci/probe.c Merging hid/for-next (c2781579ce25 Merge branch 'for-4.5/upstream-fixes' into for-next) Merging i2c/i2c/for-next (33f5ccc343b7 i2c: piix4: Pre-shift the port number) Merging jdelvare-hwmon/master (f02de116250d Documentation/hwmon: Update links in max34440) Merging dmi/master (c3db05ecf8ac firmware: dmi_scan: Save SMBIOS Type 9 System Slots) Merging hwmon-staging/hwmon-next (e1370715b20e ARM: dts: vfxxx: Add iio_hwmon node for ADC temperature channel) Merging v4l-dvb/master (0d8f3357897d Merge branch 'v4l_for_linus' into to_next) Merging kbuild/for-next (c2fd1465f329 Merge branch 'kbuild/misc' into kbuild/for-next) Merging kconfig/for-next (c0ddc8c745b7 localmodconfig: Use Kbuild files too) Merging libata/for-next (8490bda29ad1 Merge branch 'for-4.5-fixes' into for-next) Merging pm/linux-next (154b7d22e480 Merge branch 'acpica' into linux-next) Merging idle/next (31ade3b83e18 Linux 4.4-rc3) Merging apm/for-next (53675abbd1e5 x86, apm: Remove unused variable) Merging thermal/next (98d94507e10c Merge branches 'thermal-intel', 'thermal-suspend-fix' and 'thermal-soc' into next) Merging thermal-soc/next (eb4fc33eb268 thermal: small style cleanup in mtk_thermal) Merging ieee1394/for-next (575913946989 firewire: ABI documentation: jujuutils were renamed to linux-firewire-utils) Merging dlm/next (b81171cb6869 DLM: Save and restore socket callbacks properly) Merging swiotlb/linux-next (386744425e35 swiotlb: Make linux/swiotlb.h standalone includible) Merging slave-dma/next (7a02d9b6888e Merge branch 'topic/omap' into next) Merging net-next/master (619b17452a38 tipc: fix null deref crash in compat config path) CONFLICT (content): Merge conflict in include/uapi/linux/bpf.h Merging ipsec-next/master (cb866e3298cd xfrm: Increment statistic counter on inner mode error) Merging ipvs-next/master (f6ca9f46f661 netfilter: ipvs: avoid unused variable warnings) Merging wireless-drivers-next/master (0a44b22009d5 rtlwifi: rtl8821ae: Convert driver to use common 5G channel table) Merging bluetooth/master (395174bb07c1 Bluetooth: hci_uart: Add Intel/AG6xx support) Merging mac80211-next/master (b573213927c5 rfkill: Notify userspace of airplane-mode state changes) CONFLICT (content): Merge conflict in net/mac80211/debugfs.c Merging rdma/for-next (18558cae0272 Linux 4.5-rc4) Merging mtd/master (44248affb5d8 MAINTAINERS: add maintainer entry for FREESCALE GPMI NAND driver) Merging l2-mtd/master (46f0ba976663 mtd: brcmnand: Fix v7.1 register offsets) Merging crypto/master (49abc0d2e19b crypto: xts - fix compile errors) CONFLICT (content): Merge conflict in net/ipv4/tcp.c CONFLICT (modify/delete): fs/f2fs/f2fs_crypto.h deleted in HEAD and modified in crypto/master. Version crypto/master of fs/f2fs/f2fs_crypto.h left in tree. CONFLICT (modify/delete): fs/f2fs/crypto_key.c deleted in HEAD and modified in crypto/master. Version crypto/master of fs/f2fs/crypto_key.c left in tree. CONFLICT (modify/delete): fs/f2fs/crypto.c deleted in HEAD and modified in crypto/master. Version crypto/master of fs/f2fs/crypto.c left in tree. CONFLICT (content): Merge conflict in fs/crypto/fname.c $ git rm -f fs/f2fs/f2fs_crypto.h fs/f2fs/crypto_key.c fs/f2fs/crypto.c Merging drm/drm-next (0041ee4d3642 Merge branch 'drm/next/du' of git://linuxtv.org/pinchartl/fbdev into drm-next) CONFLICT (content): Merge conflict in drivers/gpu/drm/amd/amdgpu/amdgpu.h Applying: drm: fix bad merge of drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c Merging drm-panel/drm/panel/for-next (abf08d5efee4 dt-bindings: Move panel bindings to correct location) Merging drm-intel/for-linux-next (032b612e055e drm/i915: Remove update_sprite_watermarks.) CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/intel_csr.c Merging drm-tegra/drm/tegra/for-next (d50bbe33efb5 gpu: host1x: Use a signed return type for do_relocs()) Merging drm-misc/topic/drm-misc (a6ddd2f1b99f drm/udl: Use module_usb_driver) Merging drm-exynos/exynos-drm/for-next (25364a9e54fb Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid) Merging drm-msm/msm-next (3932f008e3eb drm/msm: rename hdmi symbols) Merging hdlcd/for-upstream/hdlcd (8bb912e606b7 arm64: Juno: Add HDLCD support to the Juno boards.) Merging drm-vc4/drm-vc4-next (fc04023fafec drm/vc4: Add support for YUV planes.) Merging sound/for-next (956dea9e9112 ALSA: oxfw: discontinue MIDI substream for scs1x at transaction failure) Merging sound-asoc/for-next (7135909be57e Merge remote-tracking branch 'asoc/topic/wm8974' into asoc-next) Merging modules/modules-next (b37a05c083c8 Merge branch 'akpm' (patches from Andrew)) Merging input/next (6ccb1d8f78bd Input: add MELFAS MIP4 Touchscreen driver) Merging block/for-next (ab3d8b3ecf77 Merge branch 'for-4.6/core' into for-next) CONFLICT (content): Merge conflict in drivers/nvme/host/pci.c Merging device-mapper/for-next (01dd954e0fd8 dm: drop unnecessary assignment of md->queue) Merging pcmcia/master (e8e68fd86d22 pcmcia: do not break rsrc_nonstatic when handling anonymous cards) Merging mmc/mmc-next (11bc9381b277 mmc: sdhci-s3c: use mmc_of_parse and remove the card_tasklet) Merging mmc-uh/next (af3d6866825f mmc: sdhci-pltfm: remove priv variable from sdhci_pltfm_host) Merging kgdb/kgdb-next (2d289f14f00a kdb: Fix handling of kallsyms_symbol_next() return value) Merging md/for-next (93ac96deff4c md: Drop sending a change uevent when stopping) Merging mfd/for-mfd-next (103d8a7bb8a2 mfd: tps65090: Set regmap config reg counts properly) Merging backlight/for-backlight-next (60d613d6aef4 backlight: pwm_bl: Free PWM requested by legacy API on error path) Merging battery/master (5c0e09e03fb5 power: act8945a: add charger driver for ACT8945A) Merging omap_dss2/for-next (f059c4b220b8 fbdev: exynos: fix IS_ERR_VALUE usage) Merging regulator/for-next (3c030f0deff7 Merge remote-tracking branch 'regulator/topic/vexpress' into regulator-next) Merging security/next (602094428090 Merge branch 'smack-for-4.6' of https://github.com/cschaufler/smack-next into next) Merging integrity/next (95ee08fa373b ima: require signed IMA policy) Merging selinux/next (9090a2d5e3e6 selinux: use absolute path to include directory) Merging lblnet/next (b2776bf7149b Linux 3.18) Merging watchdog/master (1926e54f1157 MAINTAINERS: Update mailing list for Renesas ARM64 SoC Development) Merging iommu/next (fd6b6b40c17e Merge branches 'iommu/fixes' and 'arm/rockchip' into next) Merging dwmw2-iommu/master (46924008273e iommu/vt-d: Clear PPR bit to ensure we get more page request interrupts) Merging vfio/next (a13b64591747 vfio/pci: Expose shadow ROM as PCI option ROM) Merging jc_docs/docs-next (510e64fb0423 Doc: ARM: Fix a typo in clksrc-change-registers.awk) Merging trivial/for-next (d00cd819d7df drivers/rtc: broken link fix) Merging audit/next (fd97646b0595 audit: Fix typo in comment) Merging devicetree/devicetree/next (48a9b733e644 of/irq: Rename "intc_desc" to "of_intc_desc" to fix OF on sh) Merging dt-rh/for-next (6338b8a12d0a Merge branches 'dt/linus' and 'dt/next' into for-next) Merging mailbox/mailbox-for-next (be9c09bcca03 arm64: dts: mailbox device tree node for APM X-Gene platform.) Merging spi/for-next (4483631212ee Merge remote-tracking branches 'spi/topic/rockchip', 'spi/topic/sh' and 'spi/topic/ti-qspi' into spi-next) Merging tip/auto-latest (9d102a2e2002 Merge branch 'x86/urgent') CONFLICT (content): Merge conflict in drivers/firmware/efi/libstub/efistub.h CONFLICT (content): Merge conflict in drivers/firmware/efi/libstub/arm64-stub.c Merging clockevents/clockevents/next (23cb25d0f407 clocksource/drivers/arm_global_timer: Register delay timer) CONFLICT (content): Merge conflict in drivers/clocksource/Kconfig Merging edac/linux_next (12f0721c5a70 sb_edac: correctly fetch DIMM width on Ivy Bridge and Haswell) Merging edac-amd/for-next (7cc5a5d3cd4c ARM: socfpga: Enable OCRAM ECC on startup) Merging irqchip/irqchip/for-next (95d4f352d268 Merge branch 'irqchip/mvebu' into irqchip/for-next) Merging tiny/tiny/next (f114040e3ea6 Linux 3.18-rc1) Merging ftrace/for-next (7fd13615992a tracing/dma-buf/fence: Fix timeline str value on fence_annotate_wait_on) Merging rcu/rcu/next (2863b4e3dd92 Merge branches 'doc.2015.02.23a', 'fixes.2015.02.23a' and 'torture.2015.02.23a' into HEAD) Merging kvm/linux-next (433da86023f8 KVM: async_pf: use list_first_entry) Merging kvm-arm/next (67aaab4cff18 arm64: KVM: Move __cpu_init_stage2 after kvm_call_hyp) CONFLICT (content): Merge conflict in arch/arm64/kvm/hyp.S CONFLICT (content): Merge conflict in arch/arm64/kernel/cpufeature.c CONFLICT (content): Merge conflict in arch/arm64/include/asm/kvm_host.h CONFLICT (content): Merge conflict in arch/arm64/include/asm/cpufeature.h CONFLICT (content): Merge conflict in arch/arm/kvm/arm.c Merging kvm-ppc/kvm-ppc-next (c63517c2e381 KVM: PPC: Book3S: correct width in XER handling) Merging kvm-ppc-paulus/kvm-ppc-next (d3695aa4f452 KVM: PPC: Add support for multiple-TCE hcalls) Merging kvms390/next (1763f8d09d52 KVM: s390: bail out early on fatal signal in dirty logging) Merging xen-tip/linux-next (a4cdb556cae0 xen/gntdev: add ioctl for grant copy) Merging percpu/for-next (18fc93fd6412 percpu: remove PERCPU_ENOUGH_ROOM which is stale definition) Merging workqueues/for-next (23217b443b4b workqueue: Replace usage of init_name with dev_set_name()) Merging drivers-x86/for-next (2d905b3e74ad intel-hid: allocate correct amount of memory for private struct) Merging chrome-platform/for-next (ebaf31c46cce platform/chrome: Fix i2c-designware adapter name) Merging regmap/for-next (10c43341ac84 Merge remote-tracking branches 'regmap/topic/doc', 'regmap/topic/irq', 'regmap/topic/stride' and 'regmap/topic/update-bits' into regmap-next) Merging hsi/for-next (87d99063be01 HSI: ssi-protocol: Use handshake logic from n950) Merging leds/for-next (94b0580b6768 leds: gpio: Use GPIOF_OUT_INIT_LOW instead of hardcoded zero) Merging ipmi/for-next (42a018c63aee ipmi: do not probe ACPI devices if si_tryacpi is unset) Merging driver-core/driver-core-next (112d125a8947 Revert "driver-core: platform: probe of-devices only using list of compatibles") Merging tty/tty-next (a3f0b77f36ca sc16is7xx: implemented get_mctrl) Merging usb/usb-next (a057c3259ab6 usb: dwc2: USB_DWC2 should depend on HAS_DMA) Merging usb-gadget/next (36f90b0a2ddd Linux 4.5-rc2) Merging usb-serial/usb-next (18558cae0272 Linux 4.5-rc4) Merging usb-chipidea-next/ci-for-usb-next (01b8479400ab usb: chipidea: imx: avoid EPROBE_DEFER printed as error) Merging staging/staging-next (c4e315884ed8 staging: lustre: Remove LASSERTS from router checker) CONFLICT (content): Merge conflict in drivers/staging/media/davinci_vpfe/davinci_vpfe_user.h CONFLICT (content): Merge conflict in drivers/staging/lustre/lustre/libcfs/linux/linux-crypto.c CONFLICT (modify/delete): drivers/staging/dgap/dgap.c deleted in staging/staging-next and modified in HEAD. Version HEAD of drivers/staging/dgap/dgap.c left in tree. CONFLICT (content): Merge conflict in drivers/base/firmware_class.c $ git rm -f drivers/staging/dgap/dgap.c Applying: staging: mark CONFIG_FSL_MC_BUS as broken for now Merging char-misc/char-misc-next (35bf7692e765 mei: fix format string in debug prints) Merging extcon/extcon-next (0331966df0a2 arm: boot: beaglex15: pass correct interrupt) Merging cgroup/for-next (468de7d80707 Merge branch 'for-4.6' into for-next) Merging scsi/for-next (3f84575f934a Merge branch 'misc' into for-next) Merging target-updates/for-next (fab683eb12e7 scsi: qla2xxxx: avoid type mismatch in comparison) Merging target-merge/for-next-merge (bc0195aad0da Linux 4.2-rc2) Merging pinctrl/for-next (683072c71ff1 Merge branch 'devel' into for-next) Merging vhost/linux-next (b91608c87c59 vring: Use the DMA API on Xen) Merging remoteproc/for-next (7a6271a80cae remoteproc/wkup_m3: Use MODULE_DEVICE_TABLE to export alias) Merging rpmsg/for-next (b1b9891441fa rpmsg: use less buffers when vrings are small) Merging gpio/for-next (531dd08c87bd Merge branch 'devel' into for-next) CONFLICT (content): Merge conflict in drivers/pinctrl/sunxi/pinctrl-sunxi.c CONFLICT (content): Merge conflict in drivers/gpio/Makefile CONFLICT (content): Merge conflict in drivers/gpio/Kconfig Merging dma-mapping/dma-mapping-next (d770e558e219 Linux 4.2-rc1) Merging pwm/for-next (ff01c944cfa9 pwm: Mark all devices as "might sleep") Merging dma-buf/for-next (0cbb0b92689a Merge tag 'pci-v4.5-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci) Merging userns/for-next (f2ca379642d7 namei: permit linking with CAP_FOWNER in userns) Merging ktest/for-next (b953c0d234bc Linux 4.1) Merging clk/clk-next (023bd7166be0 clk: skip unnecessary set_phase if nothing to do) Merging random/dev (7185ad2672a7 crypto: memzero_explicit - make sure to clear out sensitive data) Merging aio/master (fb2e69217129 aio: Fix compile error due to unexpected use of cmpxchg()) $ git reset --hard HEAD^ Merging next-20160111 version of aio Merging llvmlinux/for-next (25d4aee23af2 arm: LLVMLinux: Use global stack register variable for percpu) Merging kselftest/next (3d6dee7af7fe Makefile: add kselftest-merge) Merging y2038/y2038 (477b8541b31f qla2xxx: Remove use of 'struct timeval') Merging luto-misc/next (afd2ff9b7e1b Linux 4.4) Merging borntraeger/linux-next (36f90b0a2ddd Linux 4.5-rc2) Merging livepatching/for-next (4c5e6154516b Merge branch 'for-4.5/upstream-fixes' into for-next) Merging coresight/next (37fe87dbde16 coresight: implementing 'cpu_id()' API) CONFLICT (content): Merge conflict in drivers/hwtracing/coresight/coresight-etm3x.c Merging rtc/rtc-next (ef1654006c2f rtc: pic32: Add PIC32 real time clock driver) Merging hwspinlock/for-next (bd5717a4632c hwspinlock: qcom: Correct msb in regmap_field) Merging nvdimm/libnvdimm-for-next (36f90b0a2ddd Linux 4.5-rc2) Merging akpm-current/current (c27b54512f75 ipc/msg.c: use freezable blocking call) CONFLICT (content): Merge conflict in mm/mprotect.c CONFLICT (content): Merge conflict in fs/xfs/xfs_aops.c CONFLICT (content): Merge conflict in fs/ocfs2/aops.c CONFLICT (content): Merge conflict in arch/x86/entry/syscalls/syscall_64.tbl CONFLICT (content): Merge conflict in arch/mips/Kconfig Applying: mm: cleanup *pte_alloc* interfaces fix Applying: mm: cleanup *pte_alloc* interfaces fix 2 Applying: signals, pkeys: make si_pkey 32 bits for now $ git checkout -b akpm remotes/origin/akpm/master Applying: drivers/net/wireless/intel/iwlwifi/dvm/calib.c: simplfy min() expression Applying: net/sched/sch_mqprio.c: fix build with older gcc Merging akpm/master (8404c72206cb net/sched/sch_mqprio.c: fix build with older gcc)
{ "author": "Stephen Rothwell <sfr@canb.auug.org.au>", "date": "Fri, 26 Feb 2016 17:37:42 +1100", "is_openbsd": false, "thread_id": "759447c5-a2bd-445f-a245-8772f9ea1316@sirena.org.uk.mbox.gz" }
lkml_critique
lkml
Hi all, I have created today's linux-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/sfr/linux-next.git. You can see which trees have been included by looking in the Next/Trees file in the source. There are also quilt-import.log and merge.log files in the Next directory. Between each merge, the tree was built with allmodconfig for both powerpc and x86_64. There were only two minor merge problems. We are up to 34 trees, more are welcome (even if they are currently empty). Status of my local build tests is at http://kisskb.ellerman.id.au/kisskb/branch/9/. We have added arm and m68k to the architectures built. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au
null
null
null
linux-next: Tree for Feb 26
Hi all, Changes since 20180223: New tree: leaks The bpf-next tree gained a conflict against the bpf tree. The kvms390 tree gained a conflict against the nds32 tree. The percpu tree gained a build failure for which I applied a patch. The akpm-current tree gained a conflict against the metag tree and a build failure for which I applied a patch. The akpm tree lost a patch that turned up elsewhere. Non-merge commits (relative to Linus' tree): 3394 4140 files changed, 155342 insertions(+), 102665 deletions(-) ---------------------------------------------------------------------------- I have created today's linux-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git (patches at http://www.kernel.org/pub/linux/kernel/next/ ). If you are tracking the linux-next tree using git, you should not use "git pull" to do so as that will try to merge the new linux-next release with the old one. You should use "git fetch" and checkout or reset to the new master. You can see which trees have been included by looking in the Next/Trees file in the source. There are also quilt-import.log and merge.log files in the Next directory. Between each merge, the tree was built with a ppc64_defconfig for powerpc, an allmodconfig for x86_64, a multi_v7_defconfig for arm and a native build of tools/perf. After the final fixups (if any), I do an x86_64 modules_install followed by builds for x86_64 allnoconfig, powerpc allnoconfig (32 and 64 bit), ppc44x_defconfig, allyesconfig and pseries_le_defconfig and i386, sparc and sparc64 defconfig. And finally, a simple boot test of the powerpc pseries_le_defconfig kernel in qemu (with and without kvm enabled). Below is a summary of the state of the merge. I am currently merging 258 trees (counting Linus' and 44 trees of bug fix patches pending for the current merge release). Stats about the size of the tree over time can be seen at http://neuling.org/linux-next-size.html . Status of my local build tests will be at http://kisskb.ellerman.id.au/linux-next . If maintainers want to give advice about cross compilers/configs that work, we are always open to add more builds. Thanks to Randy Dunlap for doing many randconfig builds. And to Paul Gortmaker for triage and bug fixes. -- Cheers, Stephen Rothwell $ git checkout master $ git reset --hard stable Merging origin/master (3664ce2d9309 Merge tag 'powerpc-4.16-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux) Merging fixes/master (7928b2cbe55b Linux 4.16-rc1) Merging kbuild-current/fixes (36c1681678b5 genksyms: drop *.hash.c from .gitignore) Merging arc-current/for-curr (646a4c62e03a ARC: setup cpu possible mask according to possible-cpus dts property) Merging arm-current/fixes (091f02483df7 ARM: net: bpf: clarify tail_call index) Merging m68k-current/for-linus (2334b1ac1235 MAINTAINERS: Add NuBus subsystem entry) Merging metag-fixes/fixes (b884a190afce metag/usercopy: Add missing fixups) Merging powerpc-fixes/fixes (eb0a2d2620ae powerpc/powernv: Support firmware disable of RFI flush) Merging sparc/master (aebb48f5e465 sparc64: fix typo in CONFIG_CRYPTO_DES_SPARC64 => CONFIG_CRYPTO_CAMELLIA_SPARC64) Merging fscrypt-current/for-stable (ae64f9bd1d36 Linux 4.15-rc2) Merging net/master (9cb9c07d6b0c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net) Merging bpf/master (ca36960211eb bpf: allow xadd only on aligned memory) Merging ipsec/master (013cb81e89f8 xfrm: Fix infinite loop in xfrm_get_dst_nexthop with transport mode.) Merging netfilter/master (7d98386d55a5 netfilter: use skb_to_full_sk in ip6_route_me_harder) Merging ipvs/master (f7fb77fc1235 netfilter: nft_compat: check extension hook mask only if set) Merging wireless-drivers/master (78dc897b7ee6 rtlwifi: rtl8723be: Fix loss of signal) Merging mac80211/master (b323ac19b773 mac80211: drop frames with unexpected DS bits from fast-rx to slow path) Merging rdma-fixes/for-rc (f45765872e7a RDMA/uverbs: Fix kernel panic while using XRC_TGT QP type) Merging sound-current/for-linus (240a8af929c7 ALSA: usb-audio: Add a quirck for B&W PX headphones) Merging pci-current/for-linus (7928b2cbe55b Linux 4.16-rc1) Merging driver-core.current/driver-core-linus (91ab883eb213 Linux 4.16-rc2) Merging tty.current/tty-linus (91ab883eb213 Linux 4.16-rc2) Merging usb.current/usb-linus (0f9da844d877 MIPS: boot: Define __ASSEMBLY__ for its.S build) Merging usb-gadget-fixes/fixes (98112041bcca usb: dwc3: core: Fix ULPI PHYs and prevent phy_get/ulpi_init during suspend/resume) Merging usb-serial-fixes/usb-linus (d14ac576d10f USB: serial: cp210x: add new device ID ELV ALC 8xxx) Merging usb-chipidea-fixes/ci-for-usb-stable (964728f9f407 USB: chipidea: msm: fix ulpi-node lookup) Merging phy/fixes (7928b2cbe55b Linux 4.16-rc1) Merging staging.current/staging-linus (c6754712e053 Merge tag 'iio-fixes-for-4.16a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus) Merging char-misc.current/char-misc-linus (3664ce2d9309 Merge tag 'powerpc-4.16-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux) Merging input-current/for-linus (ea4f7bd2aca9 Input: matrix_keypad - fix race when disabling interrupts) Merging crypto-current/master (c927b080c67e crypto: s5p-sss - Fix kernel Oops in AES-ECB mode) Merging ide/master (8e44e6600caa Merge branch 'KASAN-read_word_at_a_time') Merging vfio-fixes/for-linus (563b5cbe334e iommu/arm-smmu-v3: Cope with duplicated Stream IDs) Merging kselftest-fixes/fixes (9eaa1fb21961 selftests: vm: update .gitignore with new test) CONFLICT (content): Merge conflict in tools/testing/selftests/x86/Makefile Merging backlight-fixes/for-backlight-fixes (8ff5cbc6e3c5 backlight: as3711_bl: fix device-tree node leaks) Merging nand-fixes/nand/fixes (ee02f73e04c0 mtd: nand: atmel: Fix EDO mode check) Merging spi-nor-fixes/spi-nor/fixes (7928b2cbe55b Linux 4.16-rc1) Merging mfd-fixes/for-mfd-fixes (107b7d9fa94c mfd: rtsx: Release IRQ during shutdown) Merging v4l-dvb-fixes/fixes (3dd6b560dc5d media: Don't let tvp5150_get_vbi() go out of vbi_ram_default array) Merging reset-fixes/reset/fixes (f450f28e70a2 reset: socfpga: fix for 64-bit compilation) Merging mips-fixes/mips-fixes (902f4d067a50 MIPS: OCTEON: irq: Check for null return on kzalloc allocation) Merging kvm-fixes/master (9c5e0afaf157 KVM: SVM: Fix SEV LAUNCH_SECRET command) Merging kvms390-fixes/master (0e7def5fb0dc KVM: s390: provide only a single function for setting the tod (fix SCK)) Merging drm-intel-fixes/for-linux-next-fixes (15fa4d7a8fb9 drm/i915: Make global seqno known in i915_gem_request_execute tracepoint) Merging drm-misc-fixes/for-linux-next-fixes (c20bb155c2c5 drm/nouveau: prefer XBGR2101010 for addfb ioctl) Merging kbuild/for-next (69bb4fc95531 Merge branch 'kconfig' into for-next) Merging leaks/leaks-next (3470bc2ec4dc leaking_addresses: add scan_once array) Merging uuid/for-next (c0020756315e efi: switch to use new generic UUID API) Merging dma-mapping/for-next (af1da6868437 dma-debug: fix memory leak in debug_dma_alloc_coherent) Merging asm-generic/master (a351e9b9fc24 Linux 4.11) Merging arc/for-next (4fbd8d194f06 Linux 4.15-rc1) Merging arm/for-next (3a175cdf4392 Merge branches 'fixes', 'misc', 'sa1111' and 'sa1100-for-next' into for-next) Merging arm-perf/for-next/perf (44300aed5d28 perf: arm_spe: include linux/vmalloc.h for vmap()) Merging arm-soc/for-next (8337d083507b ARM: orion: fix orion_ge00_switch_board_info initialization) Merging actions/for-next (61862a89e6ac Merge branch 'v4.16/drivers' into next) Merging alpine/alpine/for-next (a1144b2b1ec4 ARM: dts: alpine: add valid clock-frequency values) Merging amlogic/for-next (b1303f3fa73b Merge branch 'v4.17/drivers' into tmp/aml-rebuild) Merging aspeed/for-next (91b55cc53a17 Merge branch 'dt-for-4.17' into for-next) Merging at91/at91-next (fa4cf68ab4b1 Merge tag 'at91-ab-4.16-dt' into at91-next) Merging bcm2835/for-next (5aecab364ebd Merge branch anholt/bcm2835-defconfig-next into for-next) Merging imx-mxs/for-next (9bd16cec3c1f Merge branch 'imx/defconfig' into for-next) Merging keystone/next (a29b8b93e158 Merge branch 'for_4.16/keystone-config' into next) Merging mvebu/for-next (b4e369232fa8 Merge branch 'mvebu/dt64' into mvebu/for-next) Merging omap/for-next (fcb508cddbce Merge branch 'omap-for-v4.17/timer' into for-next) Merging reset/reset/next (1d7592f84f92 reset: simple: Enable for ASPEED systems) Merging qcom/for-next (f5788d2f2929 Merge tag 'qcom-arm64-defconfig-for-4.16' into tagged-for-4.16) Merging realtek/for-next (2b6286eb7ab8 Merge branch 'v4.15/dt64' into next) Merging renesas/next (60d04a4b6d41 Merge branch 'topic/renesas-defconfig' into next) Merging rockchip/for-next (aed958de4a40 Merge branch 'v4.17-armsoc/dts64' into for-next) Merging samsung/for-next (bebc6082da0a Linux 4.14) Merging samsung-krzk/for-next (6e3d094fcf59 Merge branch 'next/dt' into for-next) Merging sunxi/sunxi/for-next (454c4bf0d36f Merge branch 'sunxi/dt-for-4.17' into sunxi/for-next) Merging tegra/for-next (983371acdeda Merge branch for-4.16/arm64/dt into for-next) Merging arm64/for-next/core (3a0a397ff5ff arm64: Kill PSCI_GET_VERSION as a variant-2 workaround) Merging clk/clk-next (7928b2cbe55b Linux 4.16-rc1) Merging clk-samsung/for-next (1d5013f1b64d clk: samsung: Add compile time PLL rate validators) Merging c6x/for-linux-next (9d440f7a2824 c6x: fix platforms/plldata.c get_coreid build error) Merging cris/for-next (fd989db807a0 cris: Fix conflicting types for _etext, _edata, _end) Merging m68k/for-next (2334b1ac1235 MAINTAINERS: Add NuBus subsystem entry) Merging m68knommu/for-next (7928b2cbe55b Linux 4.16-rc1) Merging metag/for-next (ced6c232f9c2 i2c: img-scb: Drop METAG dependency) Merging microblaze/next (5b325e3b2912 microblaze: Use generic pci_mmap_resource_range()) Merging mips/mips-next (ea4d340cbea4 Merge branches '4.15-fixes', '4.16-features' and 'octeon-3-net-mips-bits' into mips-next) Merging mips-james/mips-next (35868f095948 MIPS: generic: Enable crc32-mips on r6 configs) Merging nds32/next (c25a4f41b284 cris: add ioremap_nocache declaration before include asm-generic/io.h.) Merging nios2/for-next (e0691ebb33c1 nios2: defconfig: Cleanup from old Kconfig options) Merging openrisc/for-next (0fedb7653af7 openrisc: remove unused __ARCH_HAVE_MMU define) Merging parisc-hd/for-next (8760d9c7e2b0 parisc: Reduce irq overhead when run in qemu) Merging powerpc/next (91ab883eb213 Linux 4.16-rc2) Merging fsl/next (c095ff93f901 powerpc/sysdev: change CPM GPIO to platform_device) Merging risc-v/for-next (91ab883eb213 Linux 4.16-rc2) Merging s390/features (b35fe61df4bf s390: fix comment for scsw_cmd_is_valid_sctl) Merging sparc-next/master (8e44e6600caa Merge branch 'KASAN-read_word_at_a_time') Merging sh/for-next (6e2fbfdd585f sh: fix futex FUTEX_OP_SET op on userspace addresses) Merging uml/linux-next (584bfe635481 um: vector: Fix an error handling path in 'vector_parse()') Merging xtensa/xtensa-for-next (ae6063c83634 Merge branch 'xtensa-fixes' into xtensa-for-next) Merging fscrypt/master (0b1dfa4cc6c6 fscrypt: fix build with pre-4.6 gcc versions) Merging befs/for-next (55d945e2e4aa fs: befs: btree: Fixed some coding standard issues) Merging btrfs/next (7c9a09f56a91 btrfs: don't use async helpers for crcs when under IO limits) Applying: f2fs: fixup for cgroup/writeback change Merging btrfs-kdave/for-next (6537ffbd6382 Merge branch 'for-next-next-v4.16-20180213' into for-next-20180213) CONFLICT (content): Merge conflict in fs/btrfs/tree-log.c CONFLICT (content): Merge conflict in fs/btrfs/disk-io.c Merging ceph/master (a25df1968a0c ceph: fix dentry leak when failing to init debugfs) Merging cifs/for-next (13b8cb522ed3 [SMB3] fix smb3-encryption breakage when CONFIG_DEBUG_SG=y) Merging configfs/for-next (6ace4f6bbcfd RDMA/cma: make config_item_type const) Merging ecryptfs/next (4670269faba7 eCryptfs: constify attribute_group structures.) Merging ext3/for_next (1d37d05f3c2c udf: Fix handling of Partition Descriptors) Merging ext4/dev (5dc397113d19 ext4: create ext4_kset dynamically) Merging f2fs/dev (3664ce2d9309 Merge tag 'powerpc-4.16-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux) Merging fuse/for-next (c6cdd51404b7 fuse: fix READDIRPLUS skipping an entry) Merging jfs/jfs-next (86313903430d MAINTAINERS: fix jfs tree location) Merging nfs/linux-next (1b7204064582 NFS: make struct nlmclnt_fl_close_lock_ops static) Merging nfs-anna/linux-next (c54c14ba000d xprtrdma: Spread reply processing over more CPUs) CONFLICT (content): Merge conflict in net/sunrpc/xprtrdma/transport.c CONFLICT (content): Merge conflict in net/sunrpc/xprt.c Merging nfsd/nfsd-next (219cd595cc46 lockd: make nlm_ntf_refcnt and nlm_ntf_wq static) Merging orangefs/for-next (74e938c22705 orangefs: reverse sense of is-inode-stale test in d_revalidate) Merging overlayfs/overlayfs-next (7168179fcf25 ovl: check ERR_PTR() return value from ovl_lookup_real()) Merging ubifs/linux-next (7f29ae9f977b ubi: block: Fix locking for idr_alloc/idr_remove) Merging xfs/for-next (b31c2bdcd83e xfs: reserve blocks for refcount / rmap log item recovery) Merging file-locks/locks-next (1deab8ce2c91 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc) Merging vfs/for-next (d85e2aa2e34d annotate ep_scan_ready_list()) Merging vfs-miklos/next (0eb8af4916a5 vfs: use helper for calling f_op->fsync()) Merging iversion/iversion-next (581e400ff935 Merge tag 'modules-for-v4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux) Merging printk/for-next (02fffdcaed19 Merge branch 'for-4.17' into for-next) Merging pci/next (c8989cd7ece7 Merge branch 'pci/sparc' into next) Merging pstore/for-next/pstore (a99f41a1b441 fs: pstore: remove unused hardirq.h) Merging hid/for-next (ba6986149ce3 Merge branch 'for-4.16/upstream-fixes' into for-next) Merging i2c/i2c/for-next (91ab883eb213 Linux 4.16-rc2) Merging dmi/master (36a840c73dc6 firmware: dmi: handle missing DMI data gracefully) Merging hwmon-staging/hwmon-next (e464243586cb hwmon: (sht3x) Update data sheet URL) Merging jc_docs/docs-next (c7899551ff3a Documentation: rapidio: move sysfs interface to ABI) Merging v4l-dvb/master (a7bc5773cd16 ov13858: fix endiannes warnings) Merging v4l-dvb-next/master (a1dfb4c48cc1 media: v4l2-compat-ioctl32.c: refactor compat ioctl32 logic) Merging fbdev/fbdev-for-next (5865889fe431 video: udlfb: Switch from the pr_*() to the dev_*() logging functions) Merging pm/linux-next (a8135650d21e Merge branches 'acpica', 'acpi-battery' and 'acpi-doc' into linux-next) Merging cpupower/cpupower (7928b2cbe55b Linux 4.16-rc1) Merging idle/next (8a5776a5f498 Linux 4.14-rc4) Merging opp/opp/linux-next (4a823c0be80f opp: cpu: Replace GFP_ATOMIC with GFP_KERNEL in dev_pm_opp_init_cpufreq_table) Merging thermal/next (134f4010799a Merge branches 'thermal-core', 'thermal-intel' and 'thermal-soc' into next) Merging thermal-soc/next (d0ecbbbe518e thermal/drivers/hisi: Remove bogus const from function return type) Merging ieee1394/for-next (188775181bc0 firewire-ohci: work around oversized DMA reads on JMicron controllers) Merging dlm/next (9250e523592a dlm: remove dlm_send_rcom_lookup_dump) Merging swiotlb/linux-next (69369f52d28a swiotlb-xen: implement xen_swiotlb_get_sgtable callback) Merging net-next/master (f74290fdb363 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net) Merging bpf-next/master (7d72637eb39f Merge branch 'x86-jit') CONFLICT (content): Merge conflict in tools/testing/selftests/bpf/test_verifier.c Merging ipsec-next/master (60aa80460da1 esp4: remove redundant initialization of pointer esph) Merging netfilter-next/master (f74290fdb363 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net) Merging nfc-next/master (4d63adfe12dd NFC: Add NFC_CMD_DEACTIVATE_TARGET support) Merging ipvs-next/master (a910d20aa007 netfilter: ipvs: Fix space before '[' error.) Merging wireless-drivers-next/master (cf19e5e2054f Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue) Merging bluetooth/master (1ec010e70593 tun: export flags, uid, gid, queue information over netlink) Merging mac80211-next/master (318c121cf274 mac80211: support station 4-addr mode fast-rx) Merging rdma/for-next (3a148896b24a IB/srp: Fix completion vector assignment algorithm) Merging gfs2/for-next (3fc7c7e1cfaa gfs2: Fix fallocate chunk size) Merging mtd/master (f23def803861 mtd: nand: MTD_NAND_MARVELL should depend on HAS_DMA) Merging l2-mtd/mtd/next (0dbe4ea78d69 mtd: get rid of the mtd_add_device_partitions()) Merging nand/nand/next (d8757f4c59c9 Update Boris Brezillon email address) CONFLICT (content): Merge conflict in drivers/mtd/nand/Kconfig Applying: mtd: nand: fix up for raw Kconfig move Merging spi-nor/spi-nor/next (7928b2cbe55b Linux 4.16-rc1) Merging crypto/master (017457061e07 crypto: ccree - fix memdup.cocci warnings) Merging drm/drm-next (727edc744098 Merge tag 'drm-misc-next-2018-02-21' of git://anongit.freedesktop.org/drm/drm-misc into drm-next) CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/intel_breadcrumbs.c CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/i915_pmu.h CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/i915_pmu.c Merging drm-panel/drm/panel/for-next (e4bac408b084 drm/panel: simple: Add support for Winstar WF35LTIACD) Merging drm-intel/for-linux-next (f6322eddaff7 drm/i915/preemption: Allow preemption between submission ports) CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/intel_breadcrumbs.c CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/i915_request.c Merging drm-tegra/drm/tegra/for-next (8f62142e490d drm/tegra: dc: Properly cleanup overlay planes) Merging drm-misc/for-linux-next (879659bb87a8 drm/stm: check pitch and size calculations even if !CONFIG_MMU) Merging drm-msm/msm-next (668c5de40345 drm/msm/mdp5: don't pre-reserve LM's if no dual-dsi) Merging hdlcd/for-upstream/hdlcd (f73e8b825315 drm/arm: Replace instances of drm_dev_unref with drm_dev_put.) Merging mali-dp/for-upstream/mali-dp (54243016ae35 drm: mali-dp: Disable planes when their CRTC gets disabled.) Merging sunxi-drm/sunxi-drm/for-next (7dafb83edd32 Merge branches 'sunxi/drm-fixes-for-4.13' and 'sunxi/drm-for-4.14' into sunxi-drm/for-next) Merging imx-drm/imx-drm/next (50b0f0aee839 gpu: ipu-csi: add 10/12-bit grayscale support to mbus_code_to_bus_cfg) Merging etnaviv/etnaviv/next (246774d17fc0 drm/etnaviv: remove the need for a gpu-subsystem DT node) Merging kconfig/for-next (bebc6082da0a Linux 4.14) Merging regmap/for-next (c3270f2b8340 Merge remote-tracking branches 'regmap/topic/bulk' and 'regmap/topic/debugfs' into regmap-next) Merging sound/for-next (248a380a3c2e ALSA: hda-beep: add SPDX identifiers) Merging sound-asoc/for-next (0de0a757faa3 Merge remote-tracking branches 'asoc/topic/wm9713', 'asoc/topic/wm9867', 'asoc/topic/wm_adsp' and 'asoc/topic/zx_aud96p22' into asoc-next) Merging modules/modules-next (0cad61d7a3d5 modpost: Remove trailing semicolon) Merging input/next (cdc2466df40f Input: synaptics - handle errors from input_mt_init_slots()) Merging block/for-next (0ccfb3c0032b Merge branch 'for-4.16/block' into for-next) Merging lightnvm/for-next (1c6286f26301 lightnvm: fix some error code in pblk-init.c) Merging device-mapper/for-next (51a05338a6f8 dm: use blkdev_get rather than bdgrab when issuing pass-through ioctl) Merging mmc/next (80a7d9316496 Merge branch 'fixes' into next) Merging kgdb/kgdb-next (2cf2f0d5b91f kdb: use memmove instead of overlapping memcpy) Merging md/for-next (3de59bb9d551 md/raid1: fix NULL pointer dereference) Merging mfd/for-mfd-next (0f89ffefa4e1 mfd: lpc_ich: Do not touch SPI-NOR write protection bit on Apollo Lake) Merging backlight/for-backlight-next (cfce992766ff Merge branch 'ib-backlight-drm-4.17' into ibs-for-backlight-merged) Merging battery/for-next (416a1ae673db power: supply: gpio-charger: use helper variable to access device info) Merging regulator/for-next (076fe8483340 Merge remote-tracking branches 'regulator/topic/dt' and 'regulator/topic/gpio' into regulator-next) Merging security/next-testing (a58e3226e2e4 Merge tag 'v4.16-rc2' into next-testing) Merging integrity/next-integrity (5f26b1bddb4a IMA: Support using new creds in appraisal policy) Merging keys/keys-next (1e684d3820d8 pkcs7: Set the module licence to prevent tainting) Merging selinux/next (911887463329 selinux: fix typo in selinux_netlbl_sctp_sk_clone declaration) Merging tpmdd/next (0f7f44387244 tpm: cmd_ready command can be issued only after granting locality) Merging watchdog/master (a17f4f032b61 watchdog: sp5100_tco.c: fix potential build failure) Merging iommu/next (18b3c16e25fb Merge branches 'x86/amd', 'x86/vt-d', 'arm/mediatek', 'arm/exynos' and 'core' into next) Merging dwmw2-iommu/master (910170442944 iommu/vt-d: Fix PASID table allocation) Merging vfio/next (46ed90f157f4 vfio: mdev: make a couple of functions and structure vfio_mdev_driver static) Merging trivial/for-next (1972d6c0c86d MAINTAINERS: relinquish kconfig) Merging audit/next (ce423631ce1f audit: track the owner of the command mutex ourselves) Merging devicetree/for-next (7ea5c83472d3 Merge branches 'dt/next' and 'dt/linus' into for-next) Merging mailbox/mailbox-for-next (0ae7d327a64b dt-bindings: mailbox: qcom: Document the APCS clock binding) Merging spi/for-next (a48478413035 Merge remote-tracking branches 'spi/topic/orion' and 'spi/topic/pxa2xx' into spi-next) Merging tip/auto-latest (aa9410633da8 Merge branch 'x86/urgent') Merging clockevents/clockevents/next (322fd24f5e67 clocksource/drivers/stm32: Start the timer's counter sooner) CONFLICT (content): Merge conflict in drivers/clocksource/timer-stm32.c CONFLICT (content): Merge conflict in drivers/clocksource/timer-of.c CONFLICT (content): Merge conflict in drivers/clocksource/Kconfig Merging edac/linux_next (345fb0a9a634 Merge tag 'edac_for_4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp) Merging edac-amd/for-next (bf8486709ac7 EDAC, sb_edac: Fix out of bound writes during DIMM configuration on KNL) Merging irqchip/irqchip/for-next (c1ae3cfa0e89 Linux 4.11-rc1) Merging ftrace/for-next (841a915d20c7 vsprintf: Do not have bprintf dereference pointers) Merging rcu/rcu/next (3fea14045aa4 EXP rcu: Add ->qsmask to assertion) Merging kvm/linux-next (7928b2cbe55b Linux 4.16-rc1) Merging kvm-arm/next (7928b2cbe55b Linux 4.16-rc1) Merging kvm-mips/next (dc44abd6aad2 KVM: MIPS/Emulate: Properly implement TLBR for T&E) Merging kvm-ppc/kvm-ppc-next (7928b2cbe55b Linux 4.16-rc1) Merging kvms390/next (416b744f4494 s390/setup : enable display support for KVM guest) CONFLICT (content): Merge conflict in drivers/video/console/Kconfig Merging xen-tip/linux-next (d1a75e0896f5 pvcalls-front: wait for other operations to return when release passive sockets) Merging percpu/for-next (accd4f36a7d1 percpu: add a schedule point in pcpu_balance_workfn()) Merging workqueues/for-next (a10eb37ccf1d Merge branch 'for-4.15-fixes' into for-next) Merging drivers-x86/for-next (027d50ccd6a0 platform/x86: intel-vbtn: Only activate tablet mode switch on 2-in-1's) Merging chrome-platform/for-next (7928b2cbe55b Linux 4.16-rc1) Merging hsi/for-next (b6dc80dbe6cd HSI: cmt_speech: use timespec64 instead of timespec) Merging leds/for-next (2dd1ea5b8a49 leds: Add more product/board names for PC Engines APU2) Merging ipmi/for-next (09c0179286c7 ipmi: kcs_bmc: mark expected switch fall-through in kcs_bmc_handle_data) Merging driver-core/driver-core-next (91ab883eb213 Linux 4.16-rc2) Merging usb/usb-next (b382a5c3c592 USB: chaoskey: Use kasprintf() over strcpy()/strcat()) Merging usb-gadget/next (8ada211d0383 usb: renesas_usbhs: add extcon notifier to set mode for non-otg channel) Merging usb-serial/usb-next (d1c48227d7c4 USB: serial: f81534: fix tx error on some baud rate) Merging usb-chipidea-next/ci-for-usb-next (ce4c1b820c52 usb: chipidea: imx: Fix ULPI on imx53) Merging phy-next/next (5a0cdc4f1d4c phy: amlogic: phy-meson-gxl-usb2: rename some of the U2P_R2 registers) Merging tty/tty-next (91ab883eb213 Linux 4.16-rc2) Merging char-misc/char-misc-next (7928b2cbe55b Linux 4.16-rc1) Merging extcon/extcon-next (7928b2cbe55b Linux 4.16-rc1) Merging staging/staging-next (721dfe4133a9 staging: speakup: remove space after a cast) CONFLICT (content): Merge conflict in drivers/staging/fsl-mc/bus/Kconfig Merging mux/for-next (6cd361c99ef2 mux: add SPDX identifiers to all mux source files) Applying: staging: fsl-mc: merge fix for CONFIG_FSL_MC_BUS moving Merging slave-dma/next (5ec91512231a Merge branch 'topic/renesas' into next) Merging cgroup/for-next (d1897c9538ed cgroup: fix rule checking for threaded mode switching) Merging scsi/for-next (0e6dbc33f387 Merge branch 'fixes' into for-next) Merging scsi-mkp/for-next (cf8037f8d08a scsi: lpfc: Change Copyright of 12.0.0.0 modified files to 2018) Merging target-updates/for-next (1c130ae00b76 iscsi-target: make sure to wake up sleeping login worker) Merging target-bva/for-next (4fbd8d194f06 Linux 4.15-rc1) Merging libata/for-next (6e627173fd12 Merge branch 'for-4.16-fixes' into for-next) Merging vhost/linux-next (fa08a3b4eba5 virtio/s390: implement PM operations for virtio_ccw) Merging rpmsg/for-next (ec6e69036956 Merge branches 'hwspinlock-next', 'rpmsg-next' and 'rproc-next' into for-next) Merging gpio/for-next (58ce2cb8d9c5 Merge branch 'devel' into for-next) Merging pinctrl/for-next (fd71e799bd5c Merge branch 'devel' into for-next) Merging pinctrl-samsung/for-next (7928b2cbe55b Linux 4.16-rc1) Merging pwm/for-next (bccaa3f917c9 pwm: meson: Add clock source configuration for Meson-AXG) Merging userns/for-next (9eba1cd4b565 24 Jan 2018 Merge of my siginfo and userns trees for testing in linux-next) Merging ktest/for-next (f7c6401ff84a ktest: Make sure wait_for_input does honor the timeout) Merging random/dev (9e66317d3c92 Linux 4.14-rc3) Merging aio/master (2a8a98673c13 fs: aio: fix the increment of aio-nr and counting against aio-max-nr) Merging kselftest/next (7928b2cbe55b Linux 4.16-rc1) Merging y2038/y2038 (69973b830859 Linux 4.9) Merging livepatching/for-next (d13f5d84ca27 Merge branch 'for-4.16/signal-sysfs-force-v2' into for-next) Merging coresight/next (7928b2cbe55b Linux 4.16-rc1) Merging rtc/rtc-next (b9b9f96a8df8 rtc: m41t80: remove useless indirection) Merging nvdimm/libnvdimm-for-next (6a1920f0915c vfio: disable filesystem-dax page pinning) Merging idr/idr-4.11 (f0f3f2d0a3e0 radix tree test suite: Specify -m32 in LDFLAGS too) Merging at24/at24/for-next (7928b2cbe55b Linux 4.16-rc1) Merging ntb/ntb-next (53c3677c56c7 ntb: intel: change references of skx to gen3) Merging kspp/for-next/kspp (2d00fcb32f71 Merge branch 'kspp/gcc-plugin/infrastructure' into for-next/kspp) Merging init_task/init_task (e1e871aff3de Expand INIT_STRUCT_PID and remove) Applying: percpu: include sched.h for cond_resched() Merging akpm-current/current (9ec53107cdd9 ipc: clamp msgmni and shmmni to the real IPC_MNI limit) CONFLICT (modify/delete): arch/metag/kernel/process.c deleted in HEAD and modified in akpm-current/current. Version akpm-current/current of arch/metag/kernel/process.c left in tree. $ git rm -f arch/metag/kernel/process.c $ git checkout -b akpm remotes/origin/akpm/master Applying: ipc/mqueue: add missing error code in init_mqueue_fs() Applying: drivers/media/platform/sti/delta/delta-ipc.c: fix read buffer overflow Applying: sparc64: NG4 memset 32 bits overflow Merging akpm/master (bcfad214b024 sparc64: NG4 memset 32 bits overflow) Applying: KEYS: include vmalloc.h for vmap etc
{ "author": "Stephen Rothwell <sfr@canb.auug.org.au>", "date": "Mon, 26 Feb 2018 16:35:22 +1100", "is_openbsd": false, "thread_id": "759447c5-a2bd-445f-a245-8772f9ea1316@sirena.org.uk.mbox.gz" }
lkml_critique
lkml
Hi all, I have created today's linux-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/sfr/linux-next.git. You can see which trees have been included by looking in the Next/Trees file in the source. There are also quilt-import.log and merge.log files in the Next directory. Between each merge, the tree was built with allmodconfig for both powerpc and x86_64. There were only two minor merge problems. We are up to 34 trees, more are welcome (even if they are currently empty). Status of my local build tests is at http://kisskb.ellerman.id.au/kisskb/branch/9/. We have added arm and m68k to the architectures built. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au
null
null
null
linux-next: Tree for Feb 26
Hi all, Changes since 20190225: The mmc-fixes tree gained a build failure for which I reverted a commit. The hwmon-staging tree gained a build failure for which I reverted a commit. The tip tree gained a conflict against the kbuild tree. The slave-dma tree gained a conflict against Linus' tree. Non-merge commits (relative to Linus' tree): 10101 10150 files changed, 460069 insertions(+), 239923 deletions(-) ---------------------------------------------------------------------------- I have created today's linux-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git (patches at http://www.kernel.org/pub/linux/kernel/next/ ). If you are tracking the linux-next tree using git, you should not use "git pull" to do so as that will try to merge the new linux-next release with the old one. You should use "git fetch" and checkout or reset to the new master. You can see which trees have been included by looking in the Next/Trees file in the source. There are also quilt-import.log and merge.log files in the Next directory. Between each merge, the tree was built with a ppc64_defconfig for powerpc, an allmodconfig for x86_64, a multi_v7_defconfig for arm and a native build of tools/perf. After the final fixups (if any), I do an x86_64 modules_install followed by builds for x86_64 allnoconfig, powerpc allnoconfig (32 and 64 bit), ppc44x_defconfig, allyesconfig and pseries_le_defconfig and i386, sparc and sparc64 defconfig. And finally, a simple boot test of the powerpc pseries_le_defconfig kernel in qemu (with and without kvm enabled). Below is a summary of the state of the merge. I am currently merging 297 trees (counting Linus' and 69 trees of bug fix patches pending for the current merge release). Stats about the size of the tree over time can be seen at http://neuling.org/linux-next-size.html . Status of my local build tests will be at http://kisskb.ellerman.id.au/linux-next . If maintainers want to give advice about cross compilers/configs that work, we are always open to add more builds. Thanks to Randy Dunlap for doing many randconfig builds. And to Paul Gortmaker for triage and bug fixes. -- Cheers, Stephen Rothwell $ git checkout master $ git reset --hard stable Merging origin/master (7d762d69145a afs: Fix manually set volume location server list) Merging fixes/master (ed3ce4cfc919 adfs: mark expected switch fall-throughs) Merging kspp-gustavo/for-next/kspp (6f6c95f09001 ASN.1: mark expected switch fall-through) Merging kbuild-current/fixes (207a369e3c08 sh: fix build error for invisible CONFIG_BUILTIN_DTB_SOURCE) Merging arc-current/for-curr (aa5326504bb4 arc: hsdk_defconfig: Enable CONFIG_BLK_DEV_RAM) Merging arm-current/fixes (fc67e6f120a3 ARM: 8835/1: dma-mapping: Clear DMA ops on teardown) Merging arm64-fixes/for-next/fixes (74698f6971f2 arm64: Relax GIC version check during early boot) Merging m68k-current/for-linus (bed1369f5190 m68k: Fix memblock-related crashes) Merging powerpc-fixes/fixes (8f5b27347e88 powerpc/powernv/sriov: Register IOMMU groups for VFs) Merging sparc/master (b71acb0e3721 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6) Merging fscrypt-current/for-stable (ae64f9bd1d36 Linux 4.15-rc2) Merging net/master (ff7b11aa481f net: socket: set sock->sk to NULL after calling proto_ops::release()) Merging bpf/master (71828b224069 tun: fix blocking read) Merging ipsec/master (660899ddf06a xfrm: Fix inbound traffic via XFRM interfaces across network namespaces) Merging netfilter/master (71828b224069 tun: fix blocking read) Merging ipvs/master (b2e3d68d1251 netfilter: nft_compat: destroy function must not have side effects) Merging wireless-drivers/master (d04ca383860b mt76x0u: fix suspend/resume) Merging mac80211/master (51d0af222f6f mac80211: allocate tailroom for forwarded mesh packets) Merging rdma-fixes/for-rc (f09ef134a7ca iw_cxgb4: cq/qp mask depends on bar2 pages in a host page) Merging sound-current/for-linus (268836649c07 Merge tag 'asoc-fix-v5.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus) Merging sound-asoc-fixes/for-linus (0cb26f410319 Merge branch 'asoc-5.0' into asoc-linus) Merging regmap-fixes/for-linus (f17b5f06cb92 Linux 5.0-rc4) Merging regulator-fixes/for-linus (6a1fe3419310 Merge branch 'regulator-5.0' into regulator-linus) Merging spi-fixes/for-linus (2d068aef6639 Merge branch 'spi-5.0' into spi-linus) Merging pci-current/for-linus (f57a98e1b713 PCI: Work around Synopsys duplicate Device ID (HAPS USB3, NXP i.MX)) Merging driver-core.current/driver-core-linus (d13937116f1e Linux 5.0-rc6) Merging tty.current/tty-linus (d13937116f1e Linux 5.0-rc6) Merging usb.current/usb-linus (d13937116f1e Linux 5.0-rc6) Merging usb-gadget-fixes/fixes (a53469a68eb8 usb: phy: am335x: fix race condition in _probe) Merging usb-serial-fixes/usb-linus (8d7fa3d4ea3f USB: serial: ftdi_sio: add ID for Hjelmslund Electronics USB485) Merging usb-chipidea-fixes/ci-for-usb-stable (d6d768a0ec3c usb: chipidea: fix static checker warning for NULL pointer) Merging phy/fixes (827cb0323928 phy: ath79-usb: Fix the main reset name to match the DT binding) Merging staging.current/staging-linus (d13937116f1e Linux 5.0-rc6) Merging char-misc.current/char-misc-linus (d13937116f1e Linux 5.0-rc6) Merging soundwire-fixes/fixes (bfeffd155283 Linux 5.0-rc1) Merging thunderbolt-fixes/fixes (5908e6b738e3 Linux 5.0-rc8) Merging input-current/for-linus (7ad222b3aed3 Input: elan_i2c - add ACPI ID for touchpad in Lenovo V330-15ISK) Merging crypto-current/master (c64316502008 crypto: sha512/arm - fix crash bug in Thumb2 build) Merging ide/master (adf040ddd001 ide: Use of_node_name_eq for node name comparisons) Merging vfio-fixes/for-linus (9a71ac7e15a7 vfio-pci/nvlink2: Fix ancient gcc warnings) Merging kselftest-fixes/fixes (7d4e591bc051 selftests: timers: use LDLIBS instead of LDFLAGS) Merging modules-fixes/modules-linus (be71eda5383f module: Fix display of wrong module .text address) Merging slave-dma-fixes/fixes (d13937116f1e Linux 5.0-rc6) Merging backlight-fixes/for-backlight-fixes (651022382c7f Linux 4.20-rc1) Merging mtd-fixes/master (3e35730dd754 mtd: powernv_flash: Fix device registration error) Merging spi-nor-fixes/spi-nor/fixes (7928b2cbe55b Linux 4.16-rc1) Merging mfd-fixes/for-mfd-fixes (48a2ca0ee399 Revert "mfd: cros_ec: Use devm_kzalloc for private data") Merging v4l-dvb-fixes/fixes (7bdf2c8fee51 media: v4l: ioctl: Sanitize num_planes before using it) Merging reset-fixes/reset/fixes (26fce0557fa6 reset: imx7: Fix always writing bits as 0) Merging mips-fixes/mips-fixes (98e267443738 MIPS: BCM63XX: provide DMA masks for ethernet devices) Merging at91-fixes/at91-fixes (bfeffd155283 Linux 5.0-rc1) Merging omap-fixes/fixes (dc30e7039137 ARM: OMAP2+: Variable "reg" in function omap4_dsi_mux_pads() could be uninitialized) Merging kvm-fixes/master (de3ccd26fafc KVM: MMU: record maximum physical address width in kvm_mmu_extended_role) Merging kvms390-fixes/master (b10bd9a256ae s390: vsie: Use effective CRYCBD.31 to check CRYCBD validity) Merging hwmon-fixes/hwmon (ff066653aeed hwmon: (pmbus/tps53679) Fix driver info initialization in probe routine) Merging nvdimm-fixes/libnvdimm-fixes (11189c1089da acpi/nfit: Fix command-supported detection) Merging btrfs-fixes/next-fixes (8834f5600cf3 Linux 5.0-rc5) Merging vfs-fixes/fixes (f612acfae86a exec: Fix mem leak in kernel_read_file) Merging dma-mapping-fixes/for-linus (60d8cd572f65 arm64/xen: fix xen-swiotlb cache flushing) Merging i3c-fixes/master (f36c1f9a8dfd i3c: master: dw: fix deadlock) Merging drivers-x86-fixes/fixes (6a730fcb9cb4 Documentation/ABI: Correct mlxreg-io KernelVersion for 5.0) Merging samsung-krzk-fixes/fixes (bfeffd155283 Linux 5.0-rc1) Merging pinctrl-samsung-fixes/pinctrl-fixes (651022382c7f Linux 4.20-rc1) Merging devicetree-fixes/dt/linus (5fa98c2eda35 dt-bindings: Fix dt_binding_check target for in tree builds) Merging scsi-fixes/fixes (4a067cf823d9 scsi: core: reset host byte in DID_NEXUS_FAILURE case) Merging drm-fixes/drm-fixes (019276ed65f3 Merge branch 'drm-fixes-5.0' of git://people.freedesktop.org/~agd5f/linux into drm-fixes) Merging drm-intel-fixes/for-linux-next-fixes (5908e6b738e3 Linux 5.0-rc8) Merging mmc-fixes/fixes (063f8fee9927 mmc: tmio: fix access width of Block Count Register) Merging rtc-fixes/rtc-fixes (bfeffd155283 Linux 5.0-rc1) Merging gnss-fixes/gnss-linus (bfeffd155283 Linux 5.0-rc1) Merging hyperv-fixes/hyperv-fixes (b2946cd86f3c MAINTAINERS: Change mailing list for Hyper-V CORE AND DRIVERS) Merging drm-misc-fixes/for-linux-next-fixes (04b9c4885158 drm/bochs: Fix the ID mismatch error) Applying: Revert "mmc: tmio: fix access width of Block Count Register" Merging kbuild/for-next (40154b67f9bc Merge branch 'kconfig' into for-next) Merging compiler-attributes/compiler-attributes (a3b22b9f11d9 Linux 5.0-rc7) Merging leaks/leaks-next (982ef2f7ef0a leaking_addresses: Completely remove --version flag) Merging dma-mapping/for-next (d222e42e8816 dma-contiguous: do not allocate a single page from CMA area) Merging asm-generic/master (d724444ab97d asm-generic/page.h: fix typo in #error text requiring a real asm/page.h) Merging arc/for-next (5908e6b738e3 Linux 5.0-rc8) Merging arm/for-next (d25495e864b9 Merge branches 'fixes', 'misc' and 'smp-hotplug' into for-next) Merging arm64/for-next/core (0543371a57e3 Merge branch 'for-next/perf' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux) Merging arm-perf/for-next/perf (cf2d65ec1d21 perf: xgene: Remove set but not used variable 'config') Merging arm-soc/for-next (237fcc148b2c Merge branch 'arm/fixes' into for-next) Merging actions/for-next (fb9c1c1deb5e Merge branch 'v4.20/drivers+s900-sps' into next) Merging alpine/alpine/for-next (7928b2cbe55b Linux 4.16-rc1) Merging amlogic/for-next (a7c5fed5c7e4 Merge branch 'v5.1/drivers' into tmp/aml-rebuild) Merging aspeed/for-next (e15425214990 ARM: dts: aspeed: quanta-q71l: enable uart1) Merging at91/at91-next (69dd6b9f7d58 Merge branches 'at91-soc' and 'at91-dt' into at91-next) Merging bcm2835/for-next (1ee128f4fff2 Merge branch 'bcm2835-drivers-next' into for-next) Merging imx-mxs/for-next (fe0b295f61af Merge branch 'imx/maintainers' into for-next) Merging keystone/next (3c3a43c81bda Merge branch 'for_5.1/soc-drivers' into next) Merging mediatek/for-next (d542127adb0c Merge branch 'v5.0-next/soc' into for-next) Merging mvebu/for-next (c51f7f863552 Merge branch 'mvebu/dt64' into mvebu/for-next) Merging omap/for-next (af3b69ea03a2 Merge branch 'omap-for-v5.1/cpsw' into for-next) Merging reset/reset/next (dbfc54534dfc dt-bindings: reset: meson: add g12a bindings) Merging qcom/for-next (4d216cf2443b Merge tag 'qcom-drivers-for-5.1-3' into 5.1-final) Merging renesas/next (f4435b0d605e Merge branch 'fixes-for-v5.1' into next) Merging rockchip/for-next (8444545ff72a Merge branch 'v5.1-clk/next' into for-next) Merging samsung/for-next (bebc6082da0a Linux 4.14) Merging samsung-krzk/for-next (8ecb112edde9 Merge branch 'fixes-late-dt' into for-next) Merging sunxi/sunxi/for-next (1fc3dc289134 Merge remote-tracking branches 'korg/sunxi/sunxi/dt-for-5.1', 'korg/sunxi/sunxi/dt64-for-5.1' and 'korg/sunxi/sunxi/h3-h5-for-5.1' into sunxi/for-next) Merging tegra/for-next (d92dde4f12f1 Merge branch for-5.1/fixes into for-next) Merging clk/clk-next (a9cfaf2343cd Merge branch 'clk-mtk-mux' into clk-next) Merging clk-samsung/for-next (81faa30df9b6 clk: samsung: exynos5433: Add selected IMEM clocks) Merging c6x/for-linux-next (8adcc59974b8 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs) Merging csky/linux-next (88d5f20a8139 csky: Fixup vdsp&fpu issues in kernel) Merging h8300/h8300-next (21c7acc439b5 h8300: pci: Remove local declaration of pcibios_penalize_isa_irq) Merging ia64/next (c51836246f97 ia64: generate uapi header and system call table files) Merging m68k/for-next (28713169d879 m68k: Add -ffreestanding to CFLAGS) Merging m68knommu/for-next (d7e9d01ac292 m68k: add ColdFire mcf5441x eDMA platform support) Merging microblaze/next (226a893bbb1f microblaze: no need to check return value of debugfs_create functions) Merging mips/mips-next (15205fc05482 MIPS: ingenic: Add support for appended devicetree) CONFLICT (content): Merge conflict in arch/mips/include/asm/pgtable.h CONFLICT (content): Merge conflict in arch/mips/include/asm/barrier.h Merging nds32/next (bfeffd155283 Linux 5.0-rc1) Merging nios2/for-next (1c286267aedf nios2: update_mmu_cache preload the TLB with the new PTE) Merging openrisc/for-next (57ce8ba0fd3a openrisc: Fix broken paths to arch/or32) Merging parisc-hd/for-next (6a5280012da5 parisc: use memblock_alloc() instead of custom get_memblock()) Merging powerpc/next (d608898abc74 powerpc: clean stack pointers naming) CONFLICT (content): Merge conflict in kernel/dma/Kconfig CONFLICT (modify/delete): arch/powerpc/kernel/dma.c deleted in powerpc/next and modified in HEAD. Version HEAD of arch/powerpc/kernel/dma.c left in tree. CONFLICT (content): Merge conflict in arch/powerpc/kernel/dma-swiotlb.c $ git rm -f arch/powerpc/kernel/dma.c Merging fsl/next (63d86876f324 Revert "powerpc/fsl_pci: simplify fsl_pci_dma_set_mask") Merging risc-v-pjw/for-next (467e050e9760 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux) Merging risc-v/for-next (79a47bad61bb riscv: remove the HAVE_KPROBES option) Merging sifive/for-next (467e050e9760 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux) Merging s390/features (36360658eb5a s390: vfio_ap: link the vfio_ap devices to the vfio_ap bus subsystem) Merging sparc-next/master (b71acb0e3721 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6) Merging sh/for-next (ac21fc2dcb40 sh: switch to NO_BOOTMEM) Merging uml/linux-next (940b241d9050 um: Remove obsolete reenable_XX calls) Merging xtensa/xtensa-for-next (036ef74b3ecb Merge branch 'xtensa-5.1' into xtensa-for-next) Merging fscrypt/master (f5e55e777cc9 fscrypt: return -EXDEV for incompatible rename or link into encrypted dir) Merging befs/for-next (55d945e2e4aa fs: befs: btree: Fixed some coding standard issues) Merging btrfs/next (29dcea88779c Linux 4.17) Merging btrfs-kdave/for-next (8035e9f4e0ab Merge branch 'for-next-next-v5.0-20190220' into for-next-20190220) Merging ceph/master (04242ff3ac0a ceph: avoid repeatedly adding inode to mdsc->snap_flush_list) Merging cifs/for-next (7877afb450c4 smb3: add missing read completion trace point) Merging configfs/for-next (cc57c07343bd configfs: fix registered group removal) Merging ecryptfs/next (d43388dea04b eCryptfs: fix permission denied with ecryptfs_xattr mount option when create readonly file) Merging ext3/for_next (2337494f7c0f Merge udf cleanup.) Merging ext4/dev (bc1d69d6151f ext4: add sysfs attr /sys/fs/ext4/<disk>/journal_task) Merging f2fs/dev (6afbeef75215 f2fs: don't clear CP_QUOTA_NEED_FSCK_FLAG) Merging fuse/for-next (fabf7e0262d0 fuse: cache readdir calls if filesystem opts out of opendir) Merging jfs/jfs-next (2e3bc6125154 fs/jfs: Switch to use new generic UUID API) Merging nfs/linux-next (06b5fc3ad94e Merge tag 'nfs-rdma-for-5.1-1' of git://git.linux-nfs.org/projects/anna/linux-nfs) Merging nfs-anna/linux-next (a3b22b9f11d9 Linux 5.0-rc7) Merging nfsd/nfsd-next (b7e5034cbecf svcrpc: fix UDP on servers with lots of threads) Merging orangefs/for-next (6e356d45950e orangefs: remove two un-needed BUG_ONs...) Merging overlayfs/overlayfs-next (993a0b2aec52 ovl: Do not lose security.capability xattr over metadata file copy-up) Merging ubifs/linux-next (2fe8b2d5578d ubifs: Reject unsupported ioctl flags explicitly) Merging v9fs/9p-next (3bbe8b1a4ae9 9p: mark expected switch fall-through) Merging xfs/for-next (081a8ae2a54e xfs: fix uninitialized error variable) Merging file-locks/locks-next (bf77ae4c98d7 locks: fix error in locks_move_blocks()) Merging vfs/for-next (b799a82237a5 Merge branches 'fixes' and 'work.misc' into for-next) CONFLICT (content): Merge conflict in fs/Makefile Merging printk/for-next (cbae05d32ff6 printk: Pass caller information to log_store().) Merging pci/next (1a6ccb159371 Merge branch 'remotes/lorenzo/pci/vmd') Merging pstore/for-next/pstore (93ee4b7d9f06 pstore/ram: Avoid needless alloc during header write) Merging hid/for-next (c81eee9fb58c Merge branch 'for-5.1/hid-uclogic' into for-next) Merging i2c/i2c/for-next (a8219c9b6988 Merge branch 'i2c/for-5.1' into i2c/for-next) Merging i3c/i3c/next (25ac3da61ba1 i3c: master: cdns: fix I2C transfers in Cadence I3C master driver) Merging dmi/master (57361846b52b Linux 4.19-rc2) Merging hwmon-staging/hwmon-next (08c95c6f6f95 hwmon: (ad7418) Add device tree probing) Applying: Revert "hwmon: (ad7418) Add device tree probing" Merging jc_docs/docs-next (19c3fe285cba docs: Explicitly state that the 'Fixes:' tag shouldn't split lines) Merging v4l-dvb/master (9fabe1d108ca media: ipu3-mmu: fix some kernel-doc macros) CONFLICT (modify/delete): drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c deleted in v4l-dvb/master and modified in HEAD. Version HEAD of drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c left in tree. $ git rm -f drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c Merging v4l-dvb-next/master (9fabe1d108ca media: ipu3-mmu: fix some kernel-doc macros) Merging fbdev/fbdev-for-next (f40298444e8c video: fbdev: Fix potential NULL pointer dereference) Merging pm/linux-next (fb26fea3ac89 Merge branch 'devprop' into linux-next) Merging cpufreq-arm/cpufreq/arm/linux-next (76d8efa73ba0 cpufreq: kyro: Reduce frame-size of qcom_cpufreq_kryo_probe()) Merging cpupower/cpupower (ae2917093fb6 tools/power/cpupower: Display boost frequency separately) Merging opp/opp/linux-next (a9a744dd5b82 cpufreq: OMAP: Register an Energy Model) Merging thermal/next (b537f89a9e4b Merge branches 'fixes' and 'thermal-intel' into next) Merging thermal-soc/next (8834f5600cf3 Linux 5.0-rc5) Merging ieee1394/for-next (c820518f6ca1 firewire: Remove depends on HAS_DMA in case of platform dependency) Merging dlm/next (8526e331c56f dlm: Fix test for -ERESTARTSYS) Merging swiotlb/linux-next (22cb45d7692a swiotlb: drop pointless static qualifier in swiotlb_create_debugfs()) CONFLICT (content): Merge conflict in kernel/dma/swiotlb.c Merging rdma/for-next (bb618451544c RDMA/uverbs: Don't do double free of allocated PD) Merging net-next/master (c14f7e1efcbf net: wan: z85230: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles) Merging bpf-next/master (143bdc2e27b4 Merge branch 'bpf-libbpf-af-xdp') Merging ipsec-next/master (590ce401c207 dt-bindings: net: dsa: ksz9477: fix indentation for switch spi bindings) Merging mlx5-next/mlx5-next (37b6bb77c6fd net/mlx5: Factor out HCA capabilities functions) Merging netfilter-next/master (bd16693f359b net: fix double-free in bpf_lwt_xmit_reroute) Merging nfc-next/master (1f008cfec5d5 NFC: fdp: Fix unused variable warnings) Merging ipvs-next/master (e2f7cc72cbf4 netfilter: conntrack: fix bogus port values for other l4 protocols) Merging wireless-drivers-next/master (bd16693f359b net: fix double-free in bpf_lwt_xmit_reroute) Merging bluetooth/master (e0b67035a90b Bluetooth: mediatek: update the common setup between MT7622 and other devices) Merging mac80211-next/master (6c4128f65857 rhashtable: Remove obsolete rhashtable_walk_init function) Merging gfs2/for-next (2abbf9a4d262 gfs: no need to check return value of debugfs_create functions) Merging mtd/mtd/next (9220d7befc9c Merge tag 'nand/for-5.1' of git://git.infradead.org/linux-mtd into mtd/next) CONFLICT (content): Merge conflict in MAINTAINERS Merging nand/nand/next (53bcbb839438 mtd: rawnand: denali_dt: remove single anonymous clock support) Merging spi-nor/spi-nor/next (225c0eda36bd mtd: spi-nor: Fix wrong abbreviation HWCPAS) Merging crypto/master (7df5218d6675 crypto: ccp - Update driver messages to remove some confusion) Merging drm/drm-next (fbac3c48fa6b Merge branch 'drm-next-5.1' of git://people.freedesktop.org/~agd5f/linux into drm-next) Merging drm-intel/for-linux-next (24d2727ccc14 drm/i915/selftests: Always free spinner on __sseu_prepare error) Merging drm-tegra/drm/tegra/for-next (ca52507efc03 drm/tegra: vic: Fix implicit function declaration warning) Merging drm-misc/for-linux-next (37406a60fac7 drm: Merge __drm_atomic_helper_disable_all() into drm_atomic_helper_disable_all()) Merging drm-msm/msm-next (860433ed2a55 drm/msm: Truncate the buffer object name if the copy from user failed) Merging hdlcd/for-upstream/hdlcd (d664b851eb2b drm/arm/hdlcd: Reject atomic commits that disable only the plane) Merging mali-dp/for-upstream/mali-dp (dcc9d76b6d83 drm/komeda: Off by one in komeda_fb_get_pixel_addr()) Merging imx-drm/imx-drm/next (a0ea4ffff266 drm/imx: only send commit done event when all state has been applied) Merging etnaviv/etnaviv/next (9e05352340d3 drm/etnaviv: potential NULL dereference) Merging kconfig/for-next (bebc6082da0a Linux 4.14) Merging regmap/for-next (66fb181d6f82 Merge remote-tracking branch 'regmap/topic/irq' into regmap-next) Merging sound/for-next (c0bde003a013 ALSA: hda/tegra: sound card name from device tree) CONFLICT (content): Merge conflict in sound/soc/generic/simple-card.c CONFLICT (content): Merge conflict in arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi CONFLICT (content): Merge conflict in arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts Merging sound-asoc/for-next (db03f85540e0 Merge branch 'asoc-5.1' into asoc-next) Merging modules/modules-next (93d77e7f1410 ARM: module: Fix function kallsyms on Thumb-2) Merging input/next (44466306ebec Input: ti_am335x_tsc - remove set but not used variable 'tscadc_dev') Merging block/for-next (b583cc031fd2 Merge branch 'io_uring' into for-next) CONFLICT (content): Merge conflict in fs/btrfs/extent_io.c Merging device-mapper/for-next (17b23f5e2de5 dm writecache: fix typo in name for writeback_wq) Merging pcmcia/pcmcia-next (95691e3eddc4 pcmcia: Implement CLKRUN protocol disabling for Ricoh bridges) Merging mmc/next (584b894aee79 Merge branch 'fixes' into next) Merging kgdb/kgdb-next (3bd67b37e350 kdb: print real address of pointers instead of hashed addresses) CONFLICT (content): Merge conflict in kernel/debug/kdb/kdb_bt.c Merging md/for-next (e820d55cb99d md: fix raid10 hang issue caused by barrier) Merging mfd/for-mfd-next (d2d833e0bf2b mfd: mxs-lradc: Mark expected switch fall-through) CONFLICT (content): Merge conflict in drivers/mfd/Kconfig Merging backlight/for-backlight-next (cec2b18832e2 backlight: pwm_bl: Use gpiod_get_value_cansleep() to get initial state) Merging battery/for-next (655ab0bc462d power: reset: at91-reset: add support for sam9x60 SoC) Merging regulator/for-next (34033da668ba Merge branch 'regulator-5.1' into regulator-next) CONFLICT (modify/delete): arch/arm/mach-pxa/raumfeld.c deleted in HEAD and modified in regulator/for-next. Version regulator/for-next of arch/arm/mach-pxa/raumfeld.c left in tree. $ git rm -f arch/arm/mach-pxa/raumfeld.c Merging security/next-testing (6d3528f3b162 Merge branch 'next-general' into next-testing) Merging apparmor/apparmor-next (df4d55f2e1b8 apparmor: fix double free when unpack of secmark rules fails) Merging integrity/next-integrity (e7fde070f39b evm: Use defined constant for UUID representation) Merging selinux/next (45189a1998e0 selinux: fix avc audit messages) Merging tpmdd/next (5812f97c0a22 tpm: Fix the type of the return value in calc_tpm2_event_size()) Merging watchdog/master (59600d045ff4 dt-bindings: watchdog: renesas-wdt: Document r8a77470 support) Merging iommu/next (f1fc9f79bf1a Merge branches 'arm/msm', 'arm/tegra', 'x86/vt-d', 'x86/amd' and 'core' into next) Merging dwmw2-iommu/master (d8a5b80568a9 Linux 4.15) Merging vfio/next (0cfd027be1d6 vfio_pci: Enable memory accesses before calling pci_map_rom) Merging trivial/for-next (75a24b822d38 kfifo: fix inaccurate comment) Merging audit/next (131d34cb0795 audit: mark expected switch fall-through) Merging devicetree/for-next (fca9a2d382e2 of: mark early_init_dt_alloc_reserved_memory_arch static) CONFLICT (modify/delete): Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.txt deleted in devicetree/for-next and modified in HEAD. Version HEAD of Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.txt left in tree. $ git rm -f Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.txt Merging mailbox/mailbox-for-next (d69e11648e48 mailbox: tegra-hsp: Use device-managed registration API) Merging spi/for-next (7c01821bd2e2 Merge branch 'spi-5.1' into spi-next) CONFLICT (modify/delete): arch/mips/ath79/dev-spi.h deleted in HEAD and modified in spi/for-next. Version spi/for-next of arch/mips/ath79/dev-spi.h left in tree. $ git rm -f arch/mips/ath79/dev-spi.h Merging tip/auto-latest (dff73d9f170b Merge branch 'timers/core') CONFLICT (content): Merge conflict in kernel/time/timer.c CONFLICT (content): Merge conflict in kernel/time/hrtimer.c CONFLICT (content): Merge conflict in include/uapi/linux/time.h CONFLICT (content): Merge conflict in include/uapi/asm-generic/unistd.h CONFLICT (content): Merge conflict in arch/x86/entry/syscalls/syscall_64.tbl CONFLICT (content): Merge conflict in arch/x86/entry/syscalls/syscall_32.tbl CONFLICT (content): Merge conflict in Kbuild Applying: time: fix up for "y2038: remove struct definition redirects" Merging clockevents/clockevents/next (dbfc6db7ba46 soc/tegra: default select TEGRA_TIMER for Tegra210) Merging edac-amd/for-next (7f736599d632 EDAC, altera: Add missing of_node_put()) Merging irqchip/irq/irqchip-next (28528fca4908 irqchip/imx-irqsteer: Add multi output interrupts support) Merging ftrace/for-next (1c347a94ca79 tracing: Comment why cond_snapshot is checked outside of max_lock protection) Merging rcu/rcu/next (e880edadc149 Merge LKMM and RCU) Merging kvm/linux-next (71783e09b487 Merge tag 'kvmarm-for-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-next) CONFLICT (content): Merge conflict in arch/x86/kvm/vmx/vmx.h CONFLICT (content): Merge conflict in arch/x86/kvm/vmx/vmx.c CONFLICT (content): Merge conflict in arch/arm/include/asm/kvm_host.h Merging kvm-arm/next (c88b093693cc arm64: KVM: Fix architecturally invalid reset value for FPEXC32_EL2) Merging kvm-ppc/kvm-ppc-next (0a0c50f771f5 Merge remote-tracking branch 'remotes/powerpc/topic/ppc-kvm' into kvm-ppc-next) Merging kvms390/next (11ba5961a215 KVM: s390: add debug logging for cpu model subfunctions) Merging xen-tip/linux-next (1d988ed46543 x86/xen: dont add memory above max allowed allocation) Merging percpu/for-next (c3fc1a685981 Merge branch 'for-5.1' into for-next) Merging workqueues/for-next (8bdc6201785d workqueue: fix typo in comment) Merging drivers-x86/for-next (238f9c11351f platform/x86: intel_pmc_core: Quirk to ignore XTAL shutdown) Merging chrome-platform/for-next (0d2f2a3da1f2 platform/chrome: wilco_ec: Add RTC driver) Merging hsi/for-next (1ff85bfa1614 HSI: omap_ssi_port: fix debugfs_simple_attr.cocci warnings) Merging leds/for-next (5ddb0869bfc1 leds: lp55xx: fix null deref on firmware load failure) Merging ipmi/for-next (038903593317 ipmi_si: Potential array underflow in hotmod_handler()) Merging driver-core/driver-core-next (a7013ba5a930 driver core: Add missing description of new struct device_link field) Merging usb/usb-next (7bae0432a64a usb: core: add option of only authorizing internal devices) CONFLICT (content): Merge conflict in drivers/phy/marvell/Makefile CONFLICT (content): Merge conflict in drivers/phy/marvell/Kconfig Merging usb-gadget/next (5895d311d28f usb: phy: twl6030-usb: fix possible use-after-free on remove) Merging usb-serial/usb-next (6431866b6707 USB: serial: option: add Telit ME910 ECM composition) Merging usb-chipidea-next/ci-for-usb-next (bc65fae4b1f0 usb: chipidea: imx: set power polarity) Merging phy-next/next (203d9b11928c phy: qcom-qmp: Add QMP UFS PHY support for msm8998) Merging tty/tty-next (be24c2701859 tty: serial: msm_serial: Remove __init from msm_console_setup()) Merging char-misc/char-misc-next (668ae7288e82 habanalabs: use GFP_ATOMIC under spin lock) Merging extcon/extcon-next (3dfed89512d3 extcon: ptn5150: Fix return value check in ptn5150_i2c_probe()) Merging soundwire/next (bfeffd155283 Linux 5.0-rc1) Merging thunderbolt/next (5908e6b738e3 Linux 5.0-rc8) Merging staging/staging-next (e1167d7b4588 staging: octeon-usb: fix misspelled "re-enable") Merging mux/for-next (a1ad5ff63944 Merge branch 'i2c-mux/for-next' into for-next) Merging icc/icc-next (fcf9d0b7d2f5 drm/msm/a6xx: Add support for an interconnect path) Merging slave-dma/next (58810c58b9e7 Merge branch 'for-linus' into next) CONFLICT (content): Merge conflict in drivers/dma/imx-sdma.c CONFLICT (content): Merge conflict in drivers/dma/dmatest.c CONFLICT (content): Merge conflict in Documentation/driver-api/dmaengine/client.rst Merging cgroup/for-next (6a613d24effc cpuset: remove unused task_has_mempolicy()) Merging scsi/for-next (bbe8f4fcd775 Merge branch 'fixes' into for-next) CONFLICT (content): Merge conflict in include/linux/blkdev.h CONFLICT (modify/delete): fs/exofs/ore_raid.c deleted in scsi/for-next and modified in HEAD. Version HEAD of fs/exofs/ore_raid.c left in tree. CONFLICT (modify/delete): fs/exofs/ore.c deleted in scsi/for-next and modified in HEAD. Version HEAD of fs/exofs/ore.c left in tree. CONFLICT (content): Merge conflict in drivers/scsi/arcmsr/arcmsr_hba.c $ git rm -f fs/exofs/ore.c fs/exofs/ore_raid.c Merging scsi-mkp/for-next (8beb90aaf334 scsi: fcoe: make use of fip_mode enum complete) Merging target-updates/for-next (1c130ae00b76 iscsi-target: make sure to wake up sleeping login worker) Merging target-bva/for-next (60cc43fc8884 Linux 4.17-rc1) Merging vhost/linux-next (53cb6e5b4ab4 arch: move common mmap flags to linux/mman.h) CONFLICT (content): Merge conflict in kernel/dma/swiotlb.c Merging rpmsg/for-next (6a4ac1cc9997 Merge branches 'hwspinlock-next', 'rpmsg-next' and 'rproc-next' into for-next) Applying: remoteproc: fix for "dma-mapping: remove the DMA_MEMORY_EXCLUSIVE flag" Merging gpio/for-next (c0162a49e0a0 gpio: amd-fch: Drop const from resource) Merging gpio-brgl/gpio/for-next (2a9e27408e12 gpio: mockup: rework debugfs interface) Merging pinctrl/for-next (dcab77888da9 dt-bindings: pinctrl: Document the i.MX50 IOMUXC binding) Merging pinctrl-samsung/for-next (651022382c7f Linux 4.20-rc1) Merging pwm/for-next (7ca17b207127 pwm: imx: Signedness bug in imx_pwm_get_state()) Merging userns/for-next (cf43a757fd49 signal: Restore the stop PTRACE_EVENT_EXIT) Merging ktest/for-next (6cd110a91f52 ktest: Take submenu into account for grub2 menus) Merging random/dev (05cbbb6f9ed5 drivers/char/random.c: make primary_crng static) Merging kselftest/next (0e27ded1159f selftests/ftrace: Handle the absence of tput) Merging y2038/y2038 (a2318b6a16a8 riscv: Use latest system call ABI) Merging livepatching/for-next (b420648f103d Merge branch 'for-5.1-atomic-replace' into for-next) Merging coresight/next (37af13cc74d1 perf record: implement --affinity=node|cpu option) Merging rtc/rtc-next (67075b63cce2 rtc: add AB-RTCMC-32.768kHz-EOZ9 RTC support) Merging nvdimm/libnvdimm-for-next (4002ef34b270 Merge branch 'for-5.1/nfit/ars' into libnvdimm-for-next) Merging at24/at24/for-next (950bcbbe3154 eeprom: at24: implement support for 'num-addresses' property) Merging ntb/ntb-next (8af642c76ef5 NTB: ntb_test: Fix bug when counting remote files) Merging kspp/for-next/kspp (ddf89e25fad8 lib: Introduce test_stackinit module) Merging init_task/init_task (e1e871aff3de Expand INIT_STRUCT_PID and remove) Merging cisco/for-next (84a401a27506 Merge branch 'for-x86' into for-next) CONFLICT (content): Merge conflict in arch/x86/kernel/setup.c Merging gnss/gnss-next (d4584bbfcf2a gnss: add driver for mediatek receivers) Merging fsi/master (d20810530b71 fsi: fsi-scom.c: Remove duplicate header) Merging siox/siox/next (1e4b044d2251 Linux 4.18-rc4) Merging slimbus/for-next (81648d8bc222 slimbus: core: add missing spin_lock_init on txn_lock) Merging nvmem/for-next (c86d78c459db nvmem: allow to select i.MX nvmem driver for i.MX 7D) Merging xarray/xarray (4a5c8d898948 XArray: Fix xa_reserve for 2-byte aligned entries) Applying: RDMA/devices: fix up for xa_alloc API change Applying: RDMA/restrack: fix for __xa_alloc() API change Merging hyperv/hyperv-next (27207b76011f vmbus: Switch to use new generic UUID API) Merging auxdisplay/auxdisplay (a3b22b9f11d9 Linux 5.0-rc7) Merging kgdb-dt/kgdb/for-next (97498c96a186 kgdb/treewide: constify struct kgdb_arch arch_kgdb_ops) Merging pidfd/for-next (f67dcc84eb36 selftests: add tests for pidfd_send_signal()) CONFLICT (content): Merge conflict in include/uapi/asm-generic/unistd.h CONFLICT (content): Merge conflict in arch/x86/entry/syscalls/syscall_64.tbl CONFLICT (content): Merge conflict in arch/x86/entry/syscalls/syscall_32.tbl Merging devfreq/for-next (08cacec421f6 PM / devfreq: tegra: remove unneeded variable) Merging akpm-current/current (3e193f11a6be zram: default to lzo-rle instead of lzo) CONFLICT (content): Merge conflict in tools/testing/selftests/Makefile CONFLICT (content): Merge conflict in scripts/gcc-plugins/Kconfig CONFLICT (content): Merge conflict in include/linux/sched.h CONFLICT (content): Merge conflict in include/linux/kernfs.h CONFLICT (content): Merge conflict in include/linux/fs.h $ git checkout -b akpm remotes/origin/akpm/master Applying: pinctrl: fix pxa2xx.c build warnings Applying: scripts/atomic/gen-atomics.sh: don't assume that scripts are executable Applying: powerpc: prefer memblock APIs returning virtual address Applying: microblaze: prefer memblock API returning virtual address Applying: sh: prefer memblock APIs returning virtual address Applying: openrisc: simplify pte_alloc_one_kernel() Applying: arch: simplify several early memory allocations Applying: arm, s390, unicore32: remove oneliner wrappers for memblock_alloc() Applying: mm: create the new vm_fault_t type Applying: x86/mm/fault.c: Convert to use vm_fault_t Applying: mm/hmm: convert to use vm_fault_t Applying: drm/nouveau/dmem: update for struct hmm_devmem_ops member change Applying: MAINTAINERS: fix GTA02 entry and mark as orphan Applying: fs: fs_parser: fix printk format warning Applying: mm: refactor readahead defines in mm.h Applying: mm-refactor-readahead-defines-in-mmh-fix Applying: proc: calculate end pointer for /proc/*/* lookup at compile time Applying: proc: merge fix for proc_pident_lookup() API change Applying: unicore32: stop printing the virtual memory layout Applying: arch/nios2/mm/fault.c: remove duplicate include Applying: include/linux/sched/signal.h: replace `tsk' with `task' Applying: openrisc: prefer memblock APIs returning virtual address Applying: powerpc: use memblock functions returning virtual address Applying: memblock: replace memblock_alloc_base(ANYWHERE) with memblock_phys_alloc Applying: memblock: drop memblock_alloc_base_nid() Applying: memblock: emphasize that memblock_alloc_range() returns a physical address Applying: memblock: memblock_phys_alloc_try_nid(): don't panic Applying: memblock: memblock_phys_alloc(): don't panic Applying: memblock: drop __memblock_alloc_base() Applying: memblock: drop memblock_alloc_base() Applying: memblock: refactor internal allocation functions Applying: memblock: fix parameter order in memblock_phys_alloc_try_nid() Applying: memblock: make memblock_find_in_range_node() and choose_memblock_flags() static Applying: arch: use memblock_alloc() instead of memblock_alloc_from(size, align, 0) Applying: arch: don't memset(0) memory returned by memblock_alloc() Applying: ia64: add checks for the return value of memblock_alloc*() Applying: sparc: add checks for the return value of memblock_alloc*() Applying: mm/percpu: add checks for the return value of memblock_alloc*() Applying: init/main: add checks for the return value of memblock_alloc*() Applying: swiotlb: add checks for the return value of memblock_alloc*() Applying: treewide: add checks for the return value of memblock_alloc*() Applying: mm: sparse: Use '%pa' with 'phys_addr_t' type Applying: memblock: fix format strings for panics after memblock_alloc Applying: mm/sparse: don't panic if the allocation in sparse_buffer_init fails Applying: treewide-add-checks-for-the-return-value-of-memblock_alloc-fix-3-fix Applying: memblock: memblock_alloc_try_nid: don't panic Applying: memblock: drop memblock_alloc_*_nopanic() variants Applying: memblock: remove memblock_{set,clear}_region_flags Applying: memblock: split checks whether a region should be skipped to a helper function Applying: mm: memblock: update comments and kernel-doc Applying: memblock-update-comments-and-kernel-doc-fix Applying: of: fix kmemleak crash caused by imbalance in early memory reservation Applying: of: fix parameters order for call to memblock_find_in_range() Applying: mm, memcg: rename ambiguously named memory.stat counters and functions Applying: mm, memcg: consider subtrees in memory.events Applying: openvswitch: convert to kvmalloc Applying: md: convert to kvmalloc Applying: selinux: convert to kvmalloc Applying: Generic radix trees Applying: proc: commit to genradix Applying: sctp: convert to genradix Applying: Drop flex_arrays Applying: include/linux/relay.h: fix percpu annotation in struct rchan Applying: kernel/fork.c: remove duplicated include Applying: samples/mic/mpssd/mpssd.h: remove duplicate header Applying: drivers/media/platform/sti/delta/delta-ipc.c: fix read buffer overflow Merging akpm/master (2b3c0058568c drivers/media/platform/sti/delta/delta-ipc.c: fix read buffer overflow) Applying: powerpc: fix up merge where alloc_stack was added twice
{ "author": "Stephen Rothwell <sfr@canb.auug.org.au>", "date": "Tue, 26 Feb 2019 19:08:59 +1100", "is_openbsd": false, "thread_id": "759447c5-a2bd-445f-a245-8772f9ea1316@sirena.org.uk.mbox.gz" }
lkml_critique
lkml
Hi all, I have created today's linux-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/sfr/linux-next.git. You can see which trees have been included by looking in the Next/Trees file in the source. There are also quilt-import.log and merge.log files in the Next directory. Between each merge, the tree was built with allmodconfig for both powerpc and x86_64. There were only two minor merge problems. We are up to 34 trees, more are welcome (even if they are currently empty). Status of my local build tests is at http://kisskb.ellerman.id.au/kisskb/branch/9/. We have added arm and m68k to the architectures built. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au
null
null
null
linux-next: Tree for Feb 26
Hi all, Changes since 20200225: Removed tree: kasan-bitops (finished with) The hwmon-fixes tree gained a build failure for which I reverted a commit. The amlogic tree still had its build failure so I used a supplied patch. The rdma tree gained a build failure for which I applied a fix. The regulator tree gained a build failure so I used the version from next-20200225. The pinctrl tree lots its build failure. The akpm-current tree gained conflicts against the microblaze tree. The akpm tree inherited the build failure from the akpm-current tree for which I reverted a series of commits. Non-merge commits (relative to Linus' tree): 3848 3796 files changed, 142384 insertions(+), 83135 deletions(-) ---------------------------------------------------------------------------- I have created today's linux-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git (patches at http://www.kernel.org/pub/linux/kernel/next/ ). If you are tracking the linux-next tree using git, you should not use "git pull" to do so as that will try to merge the new linux-next release with the old one. You should use "git fetch" and checkout or reset to the new master. You can see which trees have been included by looking in the Next/Trees file in the source. There are also quilt-import.log and merge.log files in the Next directory. Between each merge, the tree was built with a ppc64_defconfig for powerpc, an allmodconfig for x86_64, a multi_v7_defconfig for arm and a native build of tools/perf. After the final fixups (if any), I do an x86_64 modules_install followed by builds for x86_64 allnoconfig, powerpc allnoconfig (32 and 64 bit), ppc44x_defconfig, allyesconfig and pseries_le_defconfig and i386, sparc and sparc64 defconfig and htmldocs. And finally, a simple boot test of the powerpc pseries_le_defconfig kernel in qemu (with and without kvm enabled). Below is a summary of the state of the merge. I am currently merging 314 trees (counting Linus' and 78 trees of bug fix patches pending for the current merge release). Stats about the size of the tree over time can be seen at http://neuling.org/linux-next-size.html . Status of my local build tests will be at http://kisskb.ellerman.id.au/linux-next . If maintainers want to give advice about cross compilers/configs that work, we are always open to add more builds. Thanks to Randy Dunlap for doing many randconfig builds. And to Paul Gortmaker for triage and bug fixes. -- Cheers, Stephen Rothwell $ git checkout master $ git reset --hard stable Merging origin/master (c5f86891185c Merge tag 'riscv-for-linux-5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux) Merging fixes/master (eb239a5f369f evh_bytechan: fix out of bounds accesses) Merging kbuild-current/fixes (743de36e106d kbuild: add comment for V=2 mode) Merging arc-current/for-curr (3b00b042eeaa ARC: Replace <linux/clk-provider.h> by <linux/of_clk.h>) Merging arm-current/fixes (89604523a76e ARM: 8961/2: Fix Kbuild issue caused by per-task stack protector GCC plugin) Merging arm-soc-fixes/arm/fixes (f1e4920fe330 Merge tag 'imx-fixes-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes) Merging arm64-fixes/for-next/fixes (dcde237319e6 mm: Avoid creating virtual address aliases in brk()/mmap()/mremap()) Merging m68k-current/for-linus (6aabc1facdb2 m68k: Implement copy_thread_tls()) Merging powerpc-fixes/fixes (9eb425b2e04e powerpc/entry: Fix an #if which should be an #ifdef in entry_32.S) Merging s390-fixes/fixes (f8788d86ab28 Linux 5.6-rc3) Merging sparc/master (11648b8339f8 sparc64: fix adjtimex regression) Merging fscrypt-current/for-stable (ae64f9bd1d36 Linux 4.15-rc2) Merging net/master (a8e41f6033a0 icmp: allow icmpv6_ndo_send to work with CONFIG_IPV6=n) Merging bpf/master (41f57cfde186 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf) Merging ipsec/master (a1a7e3a36e01 xfrm: add the missing verify_sec_ctx_len check in xfrm_add_acquire) Merging netfilter/master (d0820556507b selftests: nft_concat_range: Move option for 'list ruleset' before command) Merging ipvs/master (c24b75e0f923 ipvs: move old_secure_tcp into struct netns_ipvs) Merging wireless-drivers/master (a9149d243f25 iwlwifi: mvm: Do not require PHY_SKU NVM section for 3168 devices) Merging mac80211/master (3614d05b5e6b Merge tag 'mac80211-for-net-2020-02-24' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211) Merging rdma-fixes/for-rc (6affca140cbe RDMA/rw: Fix error flow during RDMA context initialization) Merging sound-current/for-linus (c37c0ab02956 ALSA: hda/realtek - Fix a regression for mute led on Lenovo Carbon X1) Merging sound-asoc-fixes/for-linus (51c8b77b5631 Merge branch 'asoc-5.6' into asoc-linus) Merging regmap-fixes/for-linus (d29456d34def Merge branch 'regmap-5.6' into regmap-linus) Merging regulator-fixes/for-linus (a0d87fa6ec10 Merge branch 'regulator-5.6' into regulator-linus) Merging spi-fixes/for-linus (491727eab556 Merge branch 'spi-5.6' into spi-linus) Merging pci-current/for-linus (bb6d3fb354c5 Linux 5.6-rc1) Merging driver-core.current/driver-core-linus (ae91c9256549 debugfs: remove return value of debugfs_create_regset32()) Merging tty.current/tty-linus (f8788d86ab28 Linux 5.6-rc3) Merging usb.current/usb-linus (f8788d86ab28 Linux 5.6-rc3) Merging usb-gadget-fixes/fixes (42cd5ffe46c1 usb: dwc3: debug: fix string position formatting mixup with ret and len) Merging usb-serial-fixes/usb-linus (f8788d86ab28 Linux 5.6-rc3) Merging usb-chipidea-fixes/ci-for-usb-stable (16009db47c51 usb: chipidea: udc: workaround for endpoint conflict issue) Merging phy/fixes (0ed41b33882c phy: brcm-sata: Correct MDIO operations for 40nm platforms) Merging staging.current/staging-linus (f8788d86ab28 Linux 5.6-rc3) Merging char-misc.current/char-misc-linus (f8788d86ab28 Linux 5.6-rc3) Merging soundwire-fixes/fixes (bb6d3fb354c5 Linux 5.6-rc1) Merging thunderbolt-fixes/fixes (da0f3e0201b8 MAINTAINERS: Sort entries in database for THUNDERBOLT) Merging input-current/for-linus (3dbae1553897 Input: cyapa - replace zero-length array with flexible-array member) Merging crypto-current/master (c9cc0517bba9 crypto: chacha20poly1305 - prevent integer overflow on large input) Merging ide/master (94f2630b1897 Merge tag '5.6-rc-small-smb3-fix-for-stable' of git://git.samba.org/sfrench/cifs-2.6) Merging vfio-fixes/for-linus (95f89e090618 vfio/type1: Initialize resv_msi_base) Merging kselftest-fixes/fixes (ef89d0545132 selftests/rseq: Fix out-of-tree compilation) Merging modules-fixes/modules-linus (57baec7b1b04 scripts/nsdeps: make sure to pass all module source files to spatch) Merging slave-dma-fixes/fixes (25962e1a7f1d dmaengine: imx-sdma: Fix the event id check to include RX event for UART6) Merging backlight-fixes/for-backlight-fixes (219d54332a09 Linux 5.4) Merging mtd-fixes/mtd/fixes (def9d2780727 Linux 5.5-rc7) Merging mfd-fixes/for-mfd-fixes (603d9299da32 mfd: mt6397: Fix probe after changing mt6397-core) Merging v4l-dvb-fixes/fixes (d171c45da874 media: hantro: Fix broken media controller links) Merging reset-fixes/reset/fixes (b460e0a9e240 reset: intel: add unspecified HAS_IOMEM dependency) Merging mips-fixes/mips-fixes (3234f4ed3066 MAINTAINERS: Hand MIPS over to Thomas) Merging at91-fixes/at91-fixes (54ecb8f7028c Linux 5.4-rc1) Merging omap-fixes/fixes (e500ba0e71f0 Merge branch 'omap-for-v5.6/fixes-rc2' into fixes) Merging kvm-fixes/master (a93236fcbe1d KVM: s390: rstify new ioctls in api.rst) Merging kvms390-fixes/master (5ef8acbdd687 KVM: nVMX: Emulate MTF when performing instruction emulation) Merging hwmon-fixes/hwmon (47555027eae2 hwmon: (pmbus/xdpe12284) Add callback for vout limits conversion) Merging nvdimm-fixes/libnvdimm-fixes (96222d53842d dax: pass NOWAIT flag to iomap_apply) Merging btrfs-fixes/next-fixes (5db834fa2a2b Merge branch 'misc-5.6' into next-fixes) Merging vfs-fixes/fixes (bf4498ad3f9a tmpfs: deny and force are not huge mount options) Merging dma-mapping-fixes/for-linus (9c24eaf81cc4 iommu/vt-d: Return the correct dma mask when we are bypassing the IOMMU) Merging i3c-fixes/master (6fbc7275c7a9 Linux 5.2-rc7) Merging drivers-x86-fixes/fixes (f8788d86ab28 Linux 5.6-rc3) Merging samsung-krzk-fixes/fixes (bb6d3fb354c5 Linux 5.6-rc1) Merging pinctrl-samsung-fixes/pinctrl-fixes (bb6d3fb354c5 Linux 5.6-rc1) Merging devicetree-fixes/dt/linus (a40df28c5640 docs: dt: fix several broken doc references) Merging scsi-fixes/fixes (03264ddde245 scsi: compat_ioctl: cdrom: Replace .ioctl with .compat_ioctl in four appropriate places) Merging drm-fixes/drm-fixes (97d9a4e9619a Merge tag 'drm-intel-fixes-2020-02-20' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes) Merging amdgpu-fixes/drm-fixes (2c409ba81be2 drm/radeon: fix si_enable_smc_cac() failed issue) Merging drm-intel-fixes/for-linux-next-fixes (f8788d86ab28 Linux 5.6-rc3) Merging mmc-fixes/fixes (9051db381fab mmc: sdhci-msm: Mark sdhci_msm_cqe_disable static) Merging rtc-fixes/rtc-fixes (bb6d3fb354c5 Linux 5.6-rc1) Merging gnss-fixes/gnss-linus (f8788d86ab28 Linux 5.6-rc3) Merging hyperv-fixes/hyperv-fixes (af42d3466bdc Linux 5.4-rc8) Merging soc-fsl-fixes/fix (5674a92ca4b7 soc/fsl/qe: Fix an error code in qe_pin_request()) Merging risc-v-fixes/fixes (8458ca147c20 riscv: adjust the indent) Merging pidfd-fixes/fixes (0bef168e8859 exit: Fix Sparse errors and warnings) Merging fpga-fixes/fixes (dec43da46f63 fpga: altera-ps-spi: Fix getting of optional confd gpio) Merging spdx/spdx-linus (bb6d3fb354c5 Linux 5.6-rc1) Merging gpio-intel-fixes/fixes (bb6d3fb354c5 Linux 5.6-rc1) Merging pinctrl-intel-fixes/fixes (bb6d3fb354c5 Linux 5.6-rc1) Merging erofs-fixes/fixes (d1eef1c61974 Linux 5.5-rc2) Merging drm-misc-fixes/for-linux-next-fixes (eb9d8ddbc107 drm/panfrost: Don't try to map on error faults) Applying: Revert "hwmon: (pmbus/xdpe12284) Add callback for vout limits conversion" Merging kspp-gustavo/for-next/kspp (d5180902be1c firmware: google: vpd: Replace zero-length array with flexible-array member) Merging kbuild/for-next (5693febe8be8 kbuild: remove wrong documentation about mandatory-y) Merging compiler-attributes/compiler-attributes (54ecb8f7028c Linux 5.4-rc1) Merging leaks/leaks-next (9e98c678c2d6 Linux 5.1-rc1) Merging dma-mapping/for-next (75467ee48a5e dma-direct: improve DMA mask overflow reporting) Merging asm-generic/master (060dc911501f nds32: fix build failure caused by page table folding updates) Merging arc/for-next (def9d2780727 Linux 5.5-rc7) Merging arm/for-next (c0cf33e910fe Merge branches 'fixes' and 'misc' into for-next) Merging arm64/for-next/core (e533dbe9dcb1 arm64: acpi: fix DAIF manipulation with pNMI) Merging arm-perf/for-next/perf (8703317ae576 drivers/perf: hisi: update the sccl_id/ccl_id for certain HiSilicon platform) Merging arm-soc/for-next (f6063ec6ce3c ARM: Document merges) Merging amlogic/for-next (7ef59ea6bce0 Merge branch 'v5.7/drivers' into tmp/aml-rebuild) Applying: soc: amlogic: fix compile failure with MESON_SECURE_PM_DOMAINS & !MESON_SM Merging aspeed/for-next (5a020d80bbef ARM: dts: aspeed: g4: add video engine support) Merging at91/at91-next (1c8bb10f82fb Merge branches 'at91-soc', 'at91-dt' and 'at91-defconfig' into at91-next) Merging imx-mxs/for-next (48b4bfe7105f Merge branch 'imx/defconfig' into for-next) Merging keystone/next (a1766a49fc90 Merge tag 'drivers_soc_for_5.6' into next) Merging mediatek/for-next (00862b8de3aa Merge branch 'v5.6-next/soc' into for-next) Merging mvebu/for-next (c0d03b53ef47 Merge branch 'mvebu/dt64' into mvebu/for-next) Merging omap/for-next (e500ba0e71f0 Merge branch 'omap-for-v5.6/fixes-rc2' into fixes) Merging qcom/for-next (bc50f20a31b1 Merge branches 'arm64-for-5.7', 'defconfig-for-5.7', 'drivers-for-5.7' and 'dts-for-5.7' into for-next) Merging raspberrypi/for-next (ec3d259408ce ARM: bcm2835_defconfig: add support for Raspberry Pi4) Merging realtek/for-next (45698e00d5a9 Merge branch 'v5.6/dt' into next) Merging renesas/next (ddd8444ef822 Merge branch 'renesas-arm-dt-for-v5.7' into renesas-next) Merging reset/reset/next (4e0b9bc98c4a dt-bindings: reset: meson: add gxl internal dac reset) Merging rockchip/for-next (152f9a049efc Merge branch 'v5.6-clk/fixes' into for-next) Merging samsung-krzk/for-next (0c09ac8e27a0 Merge branch 'next/dt' into for-next) Merging scmi/for-linux-next (6143a33281e2 Merge branch 'for-next/scmi' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into for-linux-next) Merging sunxi/sunxi/for-next (ac970cb5c6d4 Merge branches 'sunxi/dt-for-5.7' and 'sunxi/fixes-for-5.6' into sunxi/for-next) Merging tegra/for-next (56568eebf45e Merge branch for-5.7/arm64/dt into for-next) Merging clk/clk-next (931cfff0458a Merge branch 'clk-socfpga' into clk-next) Merging clk-samsung/for-next (54ecb8f7028c Linux 5.4-rc1) Merging c6x/for-linux-next (8adcc59974b8 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs) Merging csky/linux-next (f8788d86ab28 Linux 5.6-rc3) Merging h8300/h8300-next (a5de8865cb3e h8300: move definition of __kernel_size_t etc. to posix_types.h) Merging ia64/next (240b62d381fe ia64: remove stale paravirt leftovers) Merging m68k/for-next (dff527e7a0a8 m68k: Switch to asm-generic/hardirq.h) Merging m68knommu/for-next (f8788d86ab28 Linux 5.6-rc3) Merging microblaze/next (519fa60b6007 microblaze: Use asm generic cmpxchg.h for !SMP case) Merging mips/mips-next (91f40e896444 mips/jazz: Update jazz_defconfig for MIPS Magnum) Merging nds32/next (d785c5a324cd nds32: configs: Cleanup CONFIG_CROSS_COMPILE) Merging nios2/for-next (051d75d3bb31 MAINTAINERS: Update Ley Foon Tan's email address) Merging openrisc/for-next (fc74d7166005 openrisc: use mmgrab) Merging parisc-hd/for-next (bb6d3fb354c5 Linux 5.6-rc1) Merging powerpc/next (71c3a888cbca Merge tag 'powerpc-5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux) Merging fsl/next (a76bea0287ce powerpc/kmcent2: add ranges to the pci bridges) Merging soc-fsl/next (6a7f10c79574 soc: fsl: dpio: fix dereference of pointer p before null check) Merging risc-v/for-next (704dd3cad2e6 RISC-V: Stop putting .sbss in .sdata) Merging sifive/for-next (467e050e9760 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux) Merging s390/features (b059a39cfa27 s390/arch: install kernels with their proper version ID) Merging sh/sh-next (a193018e5290 sh: add missing EXPORT_SYMBOL() for __delay) Merging sparc-next/master (b71acb0e3721 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6) Merging uml/linux-next (d65197ad5249 um: Fix time-travel=inf-cpu with xor/raid6) Merging xtensa/xtensa-for-next (362961f4063f Merge branch 'xtensa-5.6-fixes' into xtensa-for-next) Merging fscrypt/master (edc440e3d27f fscrypt: improve format of no-key names) Merging afs/afs-next (4fe171bb81b1 afs: Remove set but not used variable 'ret') Merging btrfs/for-next (4948f16553e6 Merge branch 'for-next-next-v5.6-20200224' into for-next-20200224) Merging ceph/master (3b20bc2fe4c0 ceph: noacl mount option is effectively ignored) Merging cifs/for-next (b7493db932a4 smb3: fix performance regression with setting mtime) Merging configfs/for-next (e2f238f7d5a1 configfs: calculate the depth of parent item) Merging ecryptfs/next (2c2a7552dd64 ecryptfs: replace BUG_ON with error handling code) Merging erofs/dev (bb6d3fb354c5 Linux 5.6-rc1) Merging ext3/for_next (daf1cd925487 Pull macro cleanup patches.) Merging ext4/dev (9db176bceb5c ext4: fix mount failure with quota configured as module) Merging f2fs/dev (b19e8c684703 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux) Merging fsverity/fsverity (da3a3da4e6c6 fs-verity: use u64_to_user_ptr()) Merging fuse/for-next (3e8cb8b2eaeb fuse: fix stack use after return) Merging jfs/jfs-next (802a5017ffb2 jfs: remove unused MAXL2PAGES) Merging nfs/linux-next (63623fd44972 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm) Merging nfs-anna/linux-next (5d63944f8206 NFSv4: Ensure the delegation cred is pinned when we call delegreturn) Merging nfsd/nfsd-next (3d96208c30f8 sunrpc: expiry_time should be seconds not timeval) Merging orangefs/for-next (9f198a2ac543 help_next should increase position index) Merging overlayfs/overlayfs-next (c2e87fd93396 ovl: allow remote upper) Merging ubifs/linux-next (fe357dbae113 ubi: Fix an error pointer dereference in error handling code) Merging v9fs/9p-next (79fb9216b7be 9p: Remove unneeded semicolon) Merging xfs/for-next (cdbcf82b86ea xfs: fix xfs_buf_ioerror_alert location reporting) Merging zonefs/for-next (bb6d3fb354c5 Linux 5.6-rc1) Merging iomap/iomap-for-next (243145bc4336 fs: Fix page_mkwrite off-by-one errors) Merging djw-vfs/vfs-for-next (3253d9d09337 splice: only read in as much information as there is pipe buffer space) Merging file-locks/locks-next (98ca480a8f22 locks: print unsigned ino in /proc/locks) Merging vfs/for-next (0fd169576648 fs: Add VirtualBox guest shared folder (vboxsf) support) Merging printk/for-next (d34f14ae521f Merge branch 'for-5.7-preferred-console' into for-next) Merging pci/next (daf98fffe4dc Merge branch 'pci/misc') Merging pstore/for-next/pstore (e163fdb3f7f8 pstore/ram: Regularize prz label allocation lifetime) Merging hid/for-next (530c6c3b37e2 Merge branch 'for-5.6/upstream-fixes' into for-next) Merging i2c/i2c/for-next (bb6d3fb354c5 Linux 5.6-rc1) Merging i3c/i3c/next (de8964995c79 i3c: master: no need to iterate master device twice) Merging dmi/master (6eaaa9e89719 firmware/dmi: Report DMI Bios & EC firmware release) Merging hwmon-staging/hwmon-next (75ce99ed1ec8 hwmon: (lm73) Add support for of_match_table) Merging jc_docs/docs-next (ef45e78fdc11 docs: kref: Clarify the use of two kref_put() in example code) Merging v4l-dvb/master (ef0ed05dcef8 media: staging/imx: Missing assignment in imx_media_capture_device_register()) Merging v4l-dvb-next/master (d45331b00ddb Linux 5.3-rc4) Merging fbdev/fbdev-for-next (732146a3f1dc video: fbdev: imxfb: fix a typo in imxfb_probe()) Merging pm/linux-next (49d2c63e171c Merge branch 'pm-qos' into linux-next) Merging cpufreq-arm/cpufreq/arm/linux-next (a30f8a91f3c2 cpufreq: imx-cpufreq-dt: Add "cpu-supply" property check) Merging cpupower/cpupower (bb6d3fb354c5 Linux 5.6-rc1) Merging opp/opp/linux-next (03758d60265c opp: Replace list_kref with a local counter) Merging thermal/thermal/linux-next (bb6d3fb354c5 Linux 5.6-rc1) Merging thermal-rzhang/next (54ecb8f7028c Linux 5.4-rc1) Merging thermal-soc/next (6c375eccded4 thermal: db8500: Rewrite to be a pure OF sensor) Merging ieee1394/for-next (67f8e65e4fc1 firewire: net: remove set but not used variable 'guid') Merging dlm/next (a48f9721e6db dlm: no need to check return value of debugfs_create functions) Merging swiotlb/linux-next (4cdfb27ba80d xen/swiotlb: remember having called xen_create_contiguous_region()) Merging rdma/for-next (6ccad8483b28 RDMA/bnxt_re: use ibdev based message printing functions) Merging net-next/master (f13e4415d271 Merge branch 'mlxsw-Implement-ACL-dropped-packets-identification') Merging bpf-next/master (503d539a6e41 virtio_net: Add XDP meta data support) Merging ipsec-next/master (dda520c4d462 ESP: Export esp_output_fill_trailer function) Merging mlx5-next/mlx5-next (339ffae598ed net/mlx5e: Replace zero-length array with flexible-array member) Merging netfilter-next/master (d5110b5d84d3 netfilter: cleanup unused macro) Merging nfc-next/master (1f008cfec5d5 NFC: fdp: Fix unused variable warnings) CONFLICT (content): Merge conflict in drivers/nfc/st21nfca/se.c Merging ipvs-next/master (d54725cd11a5 netfilter: nf_tables: support for multiple devices per netdev hook) Merging wireless-drivers-next/master (932183aa35c6 mwifiex: change license text from MARVELL to NXP) Merging bluetooth/master (eed467b517e8 Bluetooth: fix passkey uninitialized when used) Merging mac80211-next/master (3b3e808cd883 Merge tag 'mac80211-next-for-net-next-2020-02-24' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next) Merging gfs2/for-next (9357fd4b0167 gfs2: leaf_dealloc needs to allocate one more revoke) Merging mtd/mtd/next (4575243c5c17 Merge tag 'nand/for-5.6' into mtd/next) Merging nand/nand/next (d85339d9ea26 mtd: onenand: Rename omap2 driver to avoid a build warning) Merging spi-nor/spi-nor/next (df5c21002cf4 mtd: spi-nor: use spi-mem dirmap API) Merging crypto/master (ff462ddfd95b crypto: chelsio - Endianess bug in create_authenc_wr) Merging drm/drm-next (1b245ec5b685 Merge tag 'drm-misc-next-2020-02-10' of git://anongit.freedesktop.org/drm/drm-misc into drm-next) Merging amdgpu/drm-next (2ef91cd0b926 drm/amdgpu/display: Fix Pollock Variant Detection) CONFLICT (content): Merge conflict in drivers/gpu/drm/ttm/ttm_bo.c CONFLICT (content): Merge conflict in drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c Merging drm-intel/for-linux-next (cb4d5dc3e7a8 drm/i915/gem: Honour O_NONBLOCK before throttling execbuf submissions) CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/i915_scheduler.c CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/gt/intel_lrc.c CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/display/intel_ddi.c Merging drm-tegra/drm/tegra/for-next (98ae41adb252 gpu: host1x: Set DMA direction only for DMA-mapped buffer objects) Merging drm-misc/for-linux-next (e1cf35b94c5f drm/edid: fix building error) Merging drm-msm/msm-next (5f9935f514d6 drm/msm: Fix error about comments within a comment block) Merging mali-dp/for-upstream/mali-dp (f634c6a80287 dt/bindings: display: Add optional property node define for Mali DP500) Merging imx-drm/imx-drm/next (4d24376370fb gpu: ipu-v3: image-convert: only sample into the next tile if necessary) Merging etnaviv/etnaviv/next (22567d017c2c dt-bindings: etnaviv: Add #cooling-cells) Merging regmap/for-next (d29456d34def Merge branch 'regmap-5.6' into regmap-linus) Merging sound/for-next (2948f4a4e583 Merge branch 'topic/usb-uac2-effect-unit' into for-next) Merging sound-asoc/for-next (ab6a1752d1dd Merge branch 'asoc-5.7' into asoc-next) Merging modules/modules-next (0f74226649fb kernel: module: Replace zero-length array with flexible-array member) Merging input/next (c5ccf2ad3d33 Input: synaptics-rmi4 - switch to reduced reporting mode) Merging block/for-next (6b6eb301e976 Merge branch 'io_uring-5.6' into for-next) Merging device-mapper/for-next (47ace7e012b9 dm: fix potential for q->make_request_fn NULL pointer) Merging pcmcia/pcmcia-next (71705c611263 PCMCIA/i82092: remove #if 0 block) Merging mmc/next (b6559a9563d6 mmc: host: hsq: Add missing MODULE_LICENSE() and MODULE_DESCRIPTION()) Merging md/for-next (e820d55cb99d md: fix raid10 hang issue caused by barrier) Merging mfd/for-mfd-next (1129d6145ed5 mfd: Add support for Azoteq IQS620A/621/622/624/625) Merging backlight/for-backlight-next (7af43a76695d backlight: qcom-wled: Fix unsigned comparison to zero) Merging battery/for-next (1c5dfc5e3f2d power: supply: sc27xx: Add POWER_SUPPLY_PROP_CHARGE_NOW attribute) Merging regulator/for-next (22b95d91e94c Merge branch 'regulator-5.7' into regulator-next) $ git reset --hard HEAD^ Merging next-20200225 version of regulator Merging security/next-testing (3e27a33932df security: remove duplicated include from security.h) Merging apparmor/apparmor-next (01df52d726b5 apparmor: remove duplicate check of xattrs on profile attachment.) Merging integrity/next-integrity (5780b9abd530 ima: add sm3 algorithm to hash algorithm configuration list) Merging keys/keys-next (bda7978b1956 Merge branch 'keys-acl' into keys-next) CONFLICT (content): Merge conflict in fs/pipe.c Merging selinux/next (e4cfa05e9bfe selinux: Add xfs quota command types) CONFLICT (content): Merge conflict in security/selinux/ss/services.c CONFLICT (content): Merge conflict in security/selinux/include/security.h CONFLICT (content): Merge conflict in security/selinux/hooks.c Merging smack/for-next (92604e825304 smack: use GFP_NOFS while holding inode_smack::smk_lock) Merging tomoyo/master (bb6d3fb354c5 Linux 5.6-rc1) Merging tpmdd/next (14c3bf32cb4a tpm: tpm2_bios_measurements_next should increase position index) Merging watchdog/master (44144c809e39 watchdog: da9062: Add dependency on I2C) Merging iommu/next (e3b5ee0cfb65 Merge branches 'iommu/fixes', 'arm/smmu', 'x86/amd', 'x86/vt-d' and 'core' into next) Merging vfio/next (7b5372ba04ca vfio: platform: fix __iomem in vfio_platform_amdxgbe.c) Merging audit/next (70b3eeed49e8 audit: CONFIG_CHANGE don't log internal bookkeeping as an event) Merging devicetree/for-next (632c99084052 of: of_reserved_mem: Increase limit on number of reserved regions) CONFLICT (modify/delete): Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt deleted in devicetree/for-next and modified in HEAD. Version HEAD of Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt left in tree. $ git rm -f Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt Merging mailbox/mailbox-for-next (c6c6bc6ea9fc mailbox: imx: add support for imx v1 mu) Merging spi/for-next (5c0fd1c4c909 Merge branch 'spi-5.7' into spi-next) Merging tip/auto-latest (f4a4fb5f1572 Merge branch 'core/objtool') Merging clockevents/timers/drivers/next (e4c3b4213b79 clocksource/hyperv: Set TSC clocksource as default w/ InvariantTSC) CONFLICT (content): Merge conflict in drivers/clocksource/hyperv_timer.c Merging edac/edac-for-next (c7f7b1c8feca Merge branch 'edac-drivers' into edac-for-next) Merging irqchip/irq/irqchip-next (5186a6cc3ef5 irqchip/gic-v3-its: Rename VPENDBASER/VPROPBASER accessors) Merging ftrace/for-next (5f811c57c992 bootconfig: Add append value operator support) Merging rcu/rcu/next (8aa63de65a79 kcsan: Add option for verbose reporting) Merging kvm/linux-next (a93236fcbe1d KVM: s390: rstify new ioctls in api.rst) Merging kvm-arm/next (e43f1331e2ef arm64: Ask the compiler to __always_inline functions used by KVM at HYP) Merging kvm-ppc/kvm-ppc-next (fd24a8624eb2 KVM: PPC: Book3S PR: Fix -Werror=return-type build failure) Merging kvms390/next (b35e8878e1d3 KVM: s390/interrupt: do not pin adapter interrupt pages) Merging xen-tip/linux-next (8645e56a4ad6 xen: Enable interrupts when calling _cond_resched()) Merging percpu/for-next (9391e7a9a1e2 Merge branch 'for-5.6' into for-next) Merging workqueues/for-next (1cd27003497a workqueue: don't use wq_select_unbound_cpu() for bound works) Merging drivers-x86/for-next (7adb1e8aeeb5 platform/x86: intel_pmc_core: Add debugfs support to access live status registers) Merging chrome-platform/for-next (42cd0ab476e2 platform/chrome: cros_ec: Query EC protocol version if EC transitions between RO/RW) Merging hsi/for-next (bb6d3fb354c5 Linux 5.6-rc1) Merging leds/for-next (11a48a5a18c6 Linux 5.6-rc2) Merging ipmi/for-next (ef0129a4d06a drivers: char: ipmi: ipmi_msghandler: Pass lockdep expression to RCU lists) Merging driver-core/driver-core-next (99c73ce158a4 drivers base/arch_topology: Reformat topology_get_[cpu/freq]_scale() function name) Merging usb/usb-next (24e6aea4801b Merge 5.6-rc3 into usb-next) Merging usb-gadget/next (bb6d3fb354c5 Linux 5.6-rc1) Merging usb-serial/usb-next (0a68ec3d8a2c USB: serial: f81232: set F81534A serial port with RS232 mode) Merging usb-chipidea-next/ci-for-usb-next (cbdfbda4a166 usb: chipidea: otg: handling vbus disconnect event occurred during system suspend) Merging phy-next/next (a5c86c557fe9 phy: mapphone-mdm6600: Fix write timeouts with shorter GPIO toggle interval) Merging tty/tty-next (ba08cf452f34 Merge 5.6-rc3 into tty-next) Merging char-misc/char-misc-next (1f836f5b10f2 Merge 5.6-rc3 into char-misc-next) Merging extcon/extcon-next (87ccafd3bd64 extcon: palmas: Hide error messages if gpio returns -EPROBE_DEFER) Merging soundwire/next (dde73538c9a5 soundwire: bus: don't treat CMD_IGNORED as error on ClockStop) Merging thunderbolt/next (3084ea9ea889 thunderbolt: icm: Replace zero-length array with flexible-array member) Merging staging/staging-next (c85f15519d45 Merge 5.6-rc3 into staging-next) Merging mux/for-next (f356d58c3a04 Merge branch 'i2c-mux/for-next' into for-next) Merging icc/icc-next (bb6d3fb354c5 Linux 5.6-rc1) Merging slave-dma/next (4721e67698cd dmaengine: idxd: remove set but unused 'rc') Merging cgroup/for-next (9bd5910d7f3d selftests/cgroup: add tests for cloning into cgroups) Merging scsi/for-next (214527ada4ee Merge branch 'misc' into for-next) Merging scsi-mkp/for-next (162e250031cc scsi: lpfc: fix spelling mistake "Notication" -> "Notification") Merging vhost/linux-next (370e2c82a4a5 vhost: use batched version by default) Merging rpmsg/for-next (5a87e60312a9 Merge branches 'hwspinlock-next', 'rpmsg-next' and 'rproc-next' into for-next) Merging gpio/for-next (ee82ebf16ccb Merge branch 'devel' into for-next) Merging gpio-brgl/gpio/for-next (b8419b067390 gpiolib: fix unwatch ioctl()) Merging gpio-intel/for-next (bb6d3fb354c5 Linux 5.6-rc1) Merging pinctrl/for-next (2d2177ffa269 Merge branch 'devel' into for-next) Merging pinctrl-intel/for-next (bb6d3fb354c5 Linux 5.6-rc1) Merging pinctrl-samsung/for-next (bb6d3fb354c5 Linux 5.6-rc1) Merging pwm/for-next (9871abffc810 pwm: Remove set but not set variable 'pwm') Merging userns/for-next (61a47c1ad3a4 sysctl: Remove the sysctl system call) Merging ktest/for-next (9b5f852ae20d ktest: Make default build option oldconfig not randconfig) Merging random/dev (4cb760b02419 s390x: Mark archrandom.h functions __must_check) Merging kselftest/next (3032e3a7c7e3 selftests/resctrl: Add the test in MAINTAINERS) Merging y2038/y2038 (c4e71212a245 Revert "drm/etnaviv: reject timeouts with tv_nsec >= NSEC_PER_SEC") Merging livepatching/for-next (d28b4c1b2b3d Merge branch 'for-5.6/selftests' into for-next) Merging coresight/next (bb6d3fb354c5 Linux 5.6-rc1) Merging rtc/rtc-next (4594d082dbe6 rtc: zynqmp: Clear alarm interrupt status before interrupt enable) Merging nvdimm/libnvdimm-for-next (7b27a8622f80 libnvdimm/e820: Retrieve and populate correct 'target_node' info) Merging at24/at24/for-next (4837621cd61e eeprom: at24: add TPF0001 ACPI ID for 24c1024 device) Merging ntb/ntb-next (1ef512b16bc8 NTB: Fix an error in get link status) Merging kspp/for-next/kspp (c79f46a28239 Linux 5.5-rc5) Merging cisco/for-next (9e98c678c2d6 Linux 5.1-rc1) Merging gnss/gnss-next (f8788d86ab28 Linux 5.6-rc3) Merging fsi/next (2c01397b71c5 fsi: aspeed: Fix OPB0 byte order register values) CONFLICT (content): Merge conflict in drivers/fsi/Kconfig Merging slimbus/for-next (526eaf5d08a2 slimbus: Use the correct style for SPDX License Identifier) Merging nvmem/for-next (8daa31303194 nvmem: release the write-protect pin) Merging xarray/xarray (3a00e7c47c38 ida: remove abandoned macros) Merging hyperv/hyperv-next (54e19d34011f hv_utils: Add the support of hibernation) Merging auxdisplay/auxdisplay (54ecb8f7028c Linux 5.4-rc1) Merging kgdb/kgdb/for-next (5ea771abd5a3 kdb: Censor attempts to set PROMPT without ENABLE_MEM_READ) Merging pidfd/for-next (8d19f1c8e193 prctl: PR_{G,S}ET_IO_FLUSHER to support controlling memory reclaim) Merging devfreq/devfreq-next (46dbfe265841 PM / devfreq: Fix a typo in a comment) Merging hmm/hmm (bb6d3fb354c5 Linux 5.6-rc1) Merging fpga/for-next (309db92e29b1 fpga: zynq: Remove clk_get error message for probe defer) Merging kunit/test (bb6d3fb354c5 Linux 5.6-rc1) Merging cel/cel-next (a99d8080aaf3 Linux 5.4-rc6) Merging kasan-bitops/topic/kasan-bitops (4f4afc2c9599 docs/core-api: Remove possibly confusing sub-headings from Bit Operations) Merging generic-ioremap/for-next (4bdc0d676a64 remove ioremap_nocache and devm_ioremap_nocache) Merging kunit-next/kunit (be886ba90cce kunit: run kunit_tool from any directory) Applying: RDMA/bnxt_re: using vmalloc requires includeing vmalloc.h Merging akpm-current/current (447805d7b070 init/Kconfig: clean up ANON_INODES and old IO schedulers options) CONFLICT (content): Merge conflict in init/main.c CONFLICT (content): Merge conflict in arch/microblaze/include/asm/Kbuild CONFLICT (content): Merge conflict in arch/m68k/include/asm/Kbuild $ git checkout -b akpm remotes/origin/akpm/master Applying: mm/frontswap: mark various intentional data races Applying: mm/page_io: mark various intentional data races Applying: mm-page_io-mark-various-intentional-data-races-v2 Applying: mm/swap_state: mark various intentional data races Applying: mm/kmemleak: annotate various data races obj->ptr Applying: mm/filemap.c: fix a data race in filemap_fault() Applying: mm/swapfile: fix and annotate various data races Applying: mm-swapfile-fix-and-annotate-various-data-races-v2 Applying: mm/page_counter: fix various data races at memsw Applying: mm/memcontrol: fix a data race in scan count Applying: mm/list_lru: fix a data race in list_lru_count_one Applying: mm/mempool: fix a data race in mempool_free() Applying: mm/util.c: annotate an data race at vm_committed_as Applying: mm/rmap: annotate a data race at tlb_flush_batched Applying: mm: annotate a data race in page_zonenum() Applying: mm/memory.c: refactor insert_page to prepare for batched-lock insert Applying: mm/memory.c: add vm_insert_pages() Applying: mm-add-vm_insert_pages-fix Applying: add missing page_count() check to vm_insert_pages(). Applying: net-zerocopy: use vm_insert_pages() for tcp rcv zerocopy Applying: net-zerocopy-use-vm_insert_pages-for-tcp-rcv-zerocopy-fix Applying: drivers/tty/serial/sh-sci.c: suppress warning Applying: drivers/media/platform/sti/delta/delta-ipc.c: fix read buffer overflow Merging akpm/master (9a0ec8b33c10 drivers/media/platform/sti/delta/delta-ipc.c: fix read buffer overflow) Applying: Revert "net-zerocopy-use-vm_insert_pages-for-tcp-rcv-zerocopy-fix" Applying: Revert "net-zerocopy: use vm_insert_pages() for tcp rcv zerocopy" Applying: Revert "add missing page_count() check to vm_insert_pages()." Applying: Revert "mm-add-vm_insert_pages-fix" Applying: Revert "mm/memory.c: add vm_insert_pages()"
{ "author": "Stephen Rothwell <sfr@canb.auug.org.au>", "date": "Wed, 26 Feb 2020 15:34:29 +1100", "is_openbsd": false, "thread_id": "759447c5-a2bd-445f-a245-8772f9ea1316@sirena.org.uk.mbox.gz" }
lkml_critique
lkml
Hi all, I have created today's linux-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/sfr/linux-next.git. You can see which trees have been included by looking in the Next/Trees file in the source. There are also quilt-import.log and merge.log files in the Next directory. Between each merge, the tree was built with allmodconfig for both powerpc and x86_64. There were only two minor merge problems. We are up to 34 trees, more are welcome (even if they are currently empty). Status of my local build tests is at http://kisskb.ellerman.id.au/kisskb/branch/9/. We have added arm and m68k to the architectures built. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au
null
null
null
linux-next: Tree for Feb 26
Hi all, Please do not add any changes destined for v5.13 to your linux-next included branches until after v5.12-rc1 has been released. Changes since 20210225: Non-merge commits (relative to Linus' tree): 1023 1094 files changed, 34665 insertions(+), 13023 deletions(-) ---------------------------------------------------------------------------- I have created today's linux-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git (patches at http://www.kernel.org/pub/linux/kernel/next/ ). If you are tracking the linux-next tree using git, you should not use "git pull" to do so as that will try to merge the new linux-next release with the old one. You should use "git fetch" and checkout or reset to the new master. You can see which trees have been included by looking in the Next/Trees file in the source. There are also quilt-import.log and merge.log files in the Next directory. Between each merge, the tree was built with a ppc64_defconfig for powerpc, an allmodconfig for x86_64, a multi_v7_defconfig for arm and a native build of tools/perf. After the final fixups (if any), I do an x86_64 modules_install followed by builds for x86_64 allnoconfig, powerpc allnoconfig (32 and 64 bit), ppc44x_defconfig, allyesconfig and pseries_le_defconfig and i386, sparc and sparc64 defconfig and htmldocs. And finally, a simple boot test of the powerpc pseries_le_defconfig kernel in qemu (with and without kvm enabled). Below is a summary of the state of the merge. I am currently merging 333 trees (counting Linus' and 87 trees of bug fix patches pending for the current merge release). Stats about the size of the tree over time can be seen at http://neuling.org/linux-next-size.html . Status of my local build tests will be at http://kisskb.ellerman.id.au/linux-next . If maintainers want to give advice about cross compilers/configs that work, we are always open to add more builds. Thanks to Randy Dunlap for doing many randconfig builds. And to Paul Gortmaker for triage and bug fixes. -- Cheers, Stephen Rothwell $ git checkout master $ git reset --hard stable Merging origin/master (2c87f7a38f93 Merge tag 'pwm/for-5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm) Merging fixes/fixes (e71ba9452f0b Linux 5.11-rc2) Merging kbuild-current/fixes (a95d33c81987 kbuild: lto: add _mcount to list of used symbols) Merging arc-current/for-curr (7c53f6b671f4 Linux 5.11-rc3) Merging arm-current/fixes (4d62e81b60d4 ARM: kexec: fix oops after TLB are invalidated) Merging arm64-fixes/for-next/fixes (3c02600144bd arm64: stacktrace: Report when we reach the end of the stack) Merging arm-soc-fixes/arm/fixes (090e502e4e63 Merge tag 'socfpga_dts_fix_for_v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/fixes) Merging drivers-memory-fixes/fixes (5c8fe583cce5 Linux 5.11-rc1) Merging m68k-current/for-linus (c396dd2ec5bb macintosh/adb-iop: Use big-endian autopoll mask) Merging powerpc-fixes/fixes (f40ddce88593 Linux 5.11) Merging s390-fixes/fixes (f40ddce88593 Linux 5.11) Merging sparc/master (062c84fccc44 Merge tag 'rproc-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc) Merging fscrypt-current/for-stable (d19d8d345eec fscrypt: fix inline encryption not used on new files) Merging net/master (6cf739131a15 r8169: fix jumbo packet handling on RTL8168e) Merging bpf/master (557c223b643a selftests/bpf: No need to drop the packet when there is no geneve opt) Merging ipsec/master (8fc0e3b6a866 xfrm: interface: fix ipv4 pmtu check to honor ip header df) Merging netfilter/master (3af409ca278d net: enetc: fix destroyed phylink dereference during unbind) Merging ipvs/master (44a674d6f798 Merge tag 'mlx5-fixes-2021-01-26' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux) Merging wireless-drivers/master (4538c5ed0f7e iwlwifi: avoid crash on unsupported debug collection) Merging mac80211/master (3af409ca278d net: enetc: fix destroyed phylink dereference during unbind) Merging rdma-fixes/for-rc (1048ba83fb1c Linux 5.11-rc6) Merging sound-current/for-linus (c88fb897c1fb ALSA: n64: Fix return value check in n64audio_probe()) Merging sound-asoc-fixes/for-linus (cf421c5a84ca Merge remote-tracking branch 'asoc/for-5.12' into asoc-linus) Merging regmap-fixes/for-linus (19c329f68089 Linux 5.11-rc4) Merging regulator-fixes/for-linus (4a8a7d251201 Merge remote-tracking branch 'regulator/for-5.12' into regulator-linus) Merging spi-fixes/for-linus (21b49223c0f5 Merge remote-tracking branch 'spi/for-5.12' into spi-linus) Merging pci-current/for-linus (7e69d07d7c3c Revert "PCI/ASPM: Save/restore L1SS Capability for suspend/resume") Merging driver-core.current/driver-core-linus (29c395c77a9a Merge tag 'x86-entry-2021-02-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip) Merging tty.current/tty-linus (29c395c77a9a Merge tag 'x86-entry-2021-02-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip) Merging usb.current/usb-linus (29c395c77a9a Merge tag 'x86-entry-2021-02-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip) Merging usb-gadget-fixes/fixes (129aa9734559 usb: raw-gadget: fix memory leak in gadget_setup) Merging usb-serial-fixes/usb-linus (92bf22614b21 Linux 5.11-rc7) Merging usb-chipidea-fixes/for-usb-fixes (491b1bea0004 MAINTAINERS: update Peter Chen's email address) Merging phy/fixes (9a8b9434c60f phy: mediatek: Add missing MODULE_DEVICE_TABLE()) Merging staging.current/staging-linus (29c395c77a9a Merge tag 'x86-entry-2021-02-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip) Merging char-misc.current/char-misc-linus (29c395c77a9a Merge tag 'x86-entry-2021-02-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip) Merging soundwire-fixes/fixes (5c8fe583cce5 Linux 5.11-rc1) Merging thunderbolt-fixes/fixes (f40ddce88593 Linux 5.11) Merging input-current/for-linus (1bff77f41a80 Input: st1232 - fix NORMAL vs. IDLE state handling) Merging crypto-current/master (0de9dc80625b hwrng: timeriomem - Use device-managed registration API) Merging ide/master (6800cd8cbc6e ide-acpi: use %*ph to print small buffer) Merging vfio-fixes/for-linus (e4eccb853664 vfio/pci: Bypass IGD init in case of -ENODEV) Merging kselftest-fixes/fixes (7a6eb7c34a78 selftests: Skip BPF seftests by default) Merging modules-fixes/modules-linus (57baec7b1b04 scripts/nsdeps: make sure to pass all module source files to spatch) Merging dmaengine-fixes/fixes (b6c14d7a8380 dmaengine dw: Revert "dmaengine: dw: Enable runtime PM") Merging backlight-fixes/for-backlight-fixes (5c8fe583cce5 Linux 5.11-rc1) Merging mtd-fixes/mtd/fixes (b135b3358d73 mtd: rawnand: omap: Use BCH private fields in the specific OOB layout) Merging mfd-fixes/for-mfd-fixes (5c8fe583cce5 Linux 5.11-rc1) Merging v4l-dvb-fixes/fixes (ef357e02b6c4 media: rockchip: rkisp1: extend uapi array sizes) Merging reset-fixes/reset/fixes (b460e0a9e240 reset: intel: add unspecified HAS_IOMEM dependency) Merging mips-fixes/mips-fixes (7b490a8ab0f2 MIPS: OCTEON: fix unreachable code in octeon_irq_init_ciu) Merging at91-fixes/at91-fixes (16457a528e63 ARM: dts: at91: sam9x60: fix mux-mask to match product's datasheet) Merging omap-fixes/fixes (effe89e40037 soc: ti: omap-prm: Fix occasional abort on reset deassert for dra7 iva) Merging kvm-fixes/master (031b91a5fe6f KVM: x86: Set so called 'reserved CR3 bits in LM mask' at vCPU reset) Merging kvms390-fixes/master (735931f9a51a MAINTAINERS: add uv.c also to KVM/s390) Merging hwmon-fixes/hwmon (4008bc7d3953 hwmon: (dell-smm) Add XPS 15 L502X to fan control blacklist) Merging nvdimm-fixes/libnvdimm-fixes (7018c897c2f2 libnvdimm/dimm: Avoid race between probe and available_slots_show()) Merging btrfs-fixes/next-fixes (08b609a13e80 Merge branch 'misc-5.12' into next-fixes) Merging vfs-fixes/fixes (d36a1dd9f77a dump_common_audit_data(): fix racy accesses to ->d_name) Merging dma-mapping-fixes/for-linus (d17405d52bac dma-mapping: benchmark: fix kernel crash when dma_map_single fails) Merging i3c-fixes/i3c/fixes (291b5c9870fc i3c/master/mipi-i3c-hci: Fix position of __maybe_unused in i3c_hci_of_match) Merging drivers-x86-fixes/fixes (215164bfb714 platform/x86: dell-wmi-sysman: fix a NULL pointer dereference) Merging samsung-krzk-fixes/fixes (5c8fe583cce5 Linux 5.11-rc1) Merging pinctrl-samsung-fixes/fixes (5c8fe583cce5 Linux 5.11-rc1) Merging devicetree-fixes/dt/linus (201158f866dd dt-bindings: media: Use graph and video-interfaces schemas, round 2) Merging scsi-fixes/fixes (f852c596f2ee scsi: scsi_debug: Fix a memory leak) Merging drm-fixes/drm-fixes (f40ddce88593 Linux 5.11) Merging amdgpu-fixes/drm-fixes (2c409ba81be2 drm/radeon: fix si_enable_smc_cac() failed issue) Merging drm-intel-fixes/for-linux-next-fixes (f40ddce88593 Linux 5.11) Merging mmc-fixes/fixes (d7fb9c242095 mmc: sdhci-pltfm: Fix linking err for sdhci-brcmstb) Merging rtc-fixes/rtc-fixes (5c8fe583cce5 Linux 5.11-rc1) Merging gnss-fixes/gnss-linus (7c53f6b671f4 Linux 5.11-rc3) Merging hyperv-fixes/hyperv-fixes (fff7b5e6ee63 x86/hyperv: Initialize clockevents after LAPIC is initialized) Merging soc-fsl-fixes/fix (2663b3388551 soc: fsl: dpio: Get the cpumask through cpumask_of(cpu)) Merging risc-v-fixes/fixes (3da3cc1b5f47 Revert "dts: phy: add GPIO number and active state used for phy reset") Merging pidfd-fixes/fixes (a409ed156a90 Merge tag 'gpio-v5.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio) Merging fpga-fixes/fixes (5c8fe583cce5 Linux 5.11-rc1) Merging spdx/spdx-linus (c03c21ba6f4e Merge tag 'keys-misc-20210126' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs) Merging gpio-brgl-fixes/gpio/for-current (f40ddce88593 Linux 5.11) Merging gpio-intel-fixes/fixes (5c8fe583cce5 Linux 5.11-rc1) Merging pinctrl-intel-fixes/fixes (5c8fe583cce5 Linux 5.11-rc1) Merging erofs-fixes/fixes (a30573b3cdc7 erofs: fix setting up pcluster for temporary pages) Merging integrity-fixes/fixes (843385694721 evm: Fix a small race in init_desc()) Merging kunit-fixes/kunit-fixes (2b8fdbbf1c61 kunit: tool: move kunitconfig parsing into __init__, make it optional) Merging ubifs-fixes/fixes (78c7d49f55d8 ubifs: journal: Make sure to not dirty twice for auth nodes) Merging memblock-fixes/fixes (17cbe03872be mm/memblock: Fix typo in comment of memblock_phys_alloc_try_nid()) Merging cel-fixes/for-rc (135d48d516bd nfsd: don't abort copies early) Merging drm-misc-fixes/for-linux-next-fixes (54dab3a718f7 drm/panel: kd35t133: allow using non-continuous dsi clock) Merging kspp-gustavo/for-next/kspp (36f9ff9e03de lib: Fix fall-through warnings for Clang) Merging kbuild/for-next (6fbd6cf85a3b Merge tag 'kbuild-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild) Merging compiler-attributes/compiler-attributes (19c329f68089 Linux 5.11-rc4) Merging dma-mapping/for-next (3dc47131f8aa media: uvcvideo: Use dma_alloc_noncontiguos API) Merging asm-generic/master (38489db09b10 Merge branch 'asm-generic-fixes' into asm-generic) Merging arc/for-next (def9d2780727 Linux 5.5-rc7) Merging arm/for-next (1afb7e6348aa Merge branch 'devel-stable' into for-next) Merging arm64/for-next/core (1ffa9763828c Merge branch 'for-next/vdso' into for-next/core) Merging arm-perf/for-next/perf (f0c140481d1b perf: Constify static struct attribute_group) Merging arm-soc/for-next (e6c44b8c57c9 soc: document merges) Merging actions/for-next (006828d706fd Merge branch 'v5.12/defconfig' into for-next) Merging amlogic/for-next (9faeb18107d1 Merge branch 'v5.12/soc' into tmp/aml-rebuild) Merging aspeed/for-next (697dabd5d370 Merge branches 'soc-for-v5.12' and 'dt-for-v5.12' into for-next) Merging at91/at91-next (9639bdcf8954 Merge branch 'at91-fixes' into at91-next) Merging drivers-memory/for-next (5c289c7fae29 Merge branch 'mem-ctrl-next' into for-next) Merging imx-mxs/for-next (7535d59c5f11 Merge branch 'imx/defconfig' into for-next) Merging keystone/next (9d2e21ed98a2 Merge branch 'for_5.12/drivers-soc' into next) Merging mediatek/for-next (e6468af3b590 Merge branch 'v5.11-next/soc' into for-next) Merging mvebu/for-next (8e03d45cb7de Merge branch 'mvebu/dt64' into mvebu/for-next) Merging omap/for-next (01e73147cbf8 Merge branch 'fixes' into for-next) Merging qcom/for-next (d79b47c59576 Merge branches 'arm64-defconfig-for-5.12', 'arm64-for-5.12', 'defconfig-for-5.12', 'drivers-for-5.12' and 'dts-for-5.12' into for-next) Merging raspberrypi/for-next (fbdcf1d20126 ARM: dts: bcm2711: Add the CEC interrupt controller) Merging realtek/for-next (486f29df6941 Merge branch 'v5.8/dt' into next) Merging renesas/next (fc6f32116126 Merge branches 'renesas-arm-dt-for-v5.12' and 'renesas-drivers-for-v5.12' into renesas-next) Merging reset/reset/next (d17655759b3f reset: Add devm_reset_control_get_optional_exclusive_released()) Merging rockchip/for-next (38051549ac38 Merge branch 'v5.12-clk/next' into for-next) Merging samsung-krzk/for-next (da2f247fcbf4 Merge branch 'next/soc' into for-next) Merging scmi/for-linux-next (f40ddce88593 Linux 5.11) Merging stm32/stm32-next (a9c92a9671d7 ARM: dts: stm32: add #clock-cells property to usbphyc node on stm32mp151) Merging sunxi/sunxi/for-next (a352e9e72aa3 Merge branch 'sunxi/dt-for-5.12-late' into sunxi/for-next) CONFLICT (content): Merge conflict in arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi CONFLICT (content): Merge conflict in arch/arm/boot/dts/sun8i-r16-parrot.dts CONFLICT (content): Merge conflict in arch/arm/boot/dts/sun8i-r16-bananapi-m2m.dts CONFLICT (content): Merge conflict in arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts CONFLICT (content): Merge conflict in arch/arm/boot/dts/sun8i-a33-olinuxino.dts CONFLICT (content): Merge conflict in arch/arm/boot/dts/sun6i-reference-design-tablet.dtsi CONFLICT (content): Merge conflict in arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts CONFLICT (content): Merge conflict in arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts CONFLICT (content): Merge conflict in arch/arm/boot/dts/sun6i-a31s-sina31s-core.dtsi CONFLICT (content): Merge conflict in arch/arm/boot/dts/sun6i-a31s-primo81.dts CONFLICT (content): Merge conflict in arch/arm/boot/dts/sun6i-a31-mele-a1000g-quad.dts CONFLICT (content): Merge conflict in arch/arm/boot/dts/sun6i-a31-m9.dts CONFLICT (content): Merge conflict in arch/arm/boot/dts/sun6i-a31-hummingbird.dts Merging tegra/for-next (b62f4a3fbb22 Merge branch for-5.12/arm64/defconfig into for-next) Merging ti-k3/ti-k3-next (1e3d655fe7b4 Merge branch 'ti-k3-config-next' into ti-k3-next) Merging ti-k3-new/ti-k3-next (e37eac10bb5d Merge branch 'ti-k3-dts-next' into ti-k3-next) Merging clk/clk-next (4d5c4ae32945 Merge branches 'clk-socfpga', 'clk-mstar', 'clk-qcom' and 'clk-warnings' into clk-next) Merging clk-renesas/renesas-clk (24ece96554a9 clk: renesas: cpg-mssr: Fix formatting issues for 'smstpcr_saved's documentation) Merging clk-samsung/for-next (44a9e78f9242 clk: samsung: Prevent potential endless loop in the PLL ops) Merging csky/linux-next (9d986b01feb9 csky: use free_initmem_default() in free_initmem()) Merging h8300/h8300-next (8808515be0ed h8300: Replace <linux/clk-provider.h> by <linux/of_clk.h>) Merging m68k/for-next (c396dd2ec5bb macintosh/adb-iop: Use big-endian autopoll mask) Merging m68knommu/for-next (c1fb1bf64bb6 m68k: let clk_enable() return immediately if clk is NULL) Merging microblaze/next (48783be427c7 microblaze: Fix built-in DTB alignment to be 8-byte aligned) Merging mips/mips-next (057a14d610cf arch: mips: update references to current linux-mips list) Merging nds32/next (40e0dd851e7b nds32: Fix bogus reference to <asm/procinfo.h>) Merging nios2/for-next (7f7bc20bc41a nios2: Don't use _end for calculating min_low_pfn) Merging openrisc/for-next (8f722f67452f openrisc: Use devicetree to determine present cpus) Merging parisc-hd/for-next (f40ddce88593 Linux 5.11) Merging powerpc/next (82d2c16b350f powerpc/perf: Adds support for programming of Thresholding in P10) Merging fsl/next (a76bea0287ce powerpc/kmcent2: add ranges to the pci bridges) Merging soc-fsl/next (e95f287deed2 soc: fsl: handle RCPM errata A-008646 on SoC LS1021A) Merging risc-v/for-next (d7fbcf40df86 riscv: Improve kasan population by using hugepages when possible) CONFLICT (content): Merge conflict in drivers/soc/Makefile CONFLICT (content): Merge conflict in drivers/soc/Kconfig CONFLICT (content): Merge conflict in arch/arm64/mm/Makefile Merging s390/for-next (cf6acb8bdb1d s390/cpumf: Add support for complete counter set extraction) Merging sh/for-next (b89bc060b53e sh/intc: Restore devm_ioremap() alignment) Merging sparc-next/master (dd0d718152e4 Merge tag 'spi-fix-v5.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi) Merging uml/linux-next (ddad5187fc2a um: irq.h: include <asm-generic/irq.h>) Merging xtensa/xtensa-for-next (7b79eba1d0d1 xtensa: fix spelling mistake in Kconfig "wont" -> "won't") Merging pidfd/for-next (f69e8091c4a2 xfs: remove the possibly unused mp variable in xfs_file_compat_ioctl) Merging fscrypt/master (a14d0b676491 fscrypt: allow deleting files with unsupported encryption policy) Merging fscache/fscache-next (32685453751f netfs: Hold a ref on a page when PG_private_2 is set) CONFLICT (content): Merge conflict in lib/iov_iter.c CONFLICT (content): Merge conflict in include/linux/fs.h Merging afs/afs-next (8409f67b6437 afs: Adjust the fileserver rotation algorithm to reprobe/retry more quickly) Merging btrfs/for-next (191e697796c2 Merge branch 'for-next-next-v5.11-20210217' into for-next-20210217) CONFLICT (content): Merge conflict in lib/iov_iter.c CONFLICT (content): Merge conflict in fs/btrfs/file.c Merging ceph/master (558b4510f622 ceph: defer flushing the capsnap if the Fb is used) Merging cifs/for-next (eb5d480d5b0c cifs: update internal version number) Merging configfs/for-next (65cdb4a214c0 configfs: fix kernel-doc markup issue) Merging ecryptfs/next (902af369942f ecryptfs: use DEFINE_MUTEX() for mutex lock) Merging erofs/dev (ce0631291813 erofs: initialized fields can only be observed after bit is set) Merging exfat/dev (b12b47249688 Merge tag 'powerpc-5.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux) Merging ext3/for_next (c5b8ccc3da76 Pull udf & isofs UID/GID parsing fixes.) Merging ext4/dev (0a76945fd1ba ext4: add .kunitconfig fragment to enable ext4-specific tests) Merging f2fs/dev (c03c21ba6f4e Merge tag 'keys-misc-20210126' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs) Merging fsverity/fsverity (07c99001312c fs-verity: support reading signature with ioctl) Merging fuse/for-next (5d069dbe8aaf fuse: fix bad inode) Merging jfs/jfs-next (c03c21ba6f4e Merge tag 'keys-misc-20210126' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs) Merging nfs/linux-next (92bf22614b21 Linux 5.11-rc7) Merging nfs-anna/linux-next (7ae017c7322e NFS: Support the '-owrite=' option in /proc/self/mounts and mountinfo) Merging nfsd/nfsd-next (c3213d260a23 SUNRPC: Fix oops in the rpc_xdr_buf event class) Merging cel/for-next (1bb67c344b13 NFSD: Clean up after updating NFSv3 ACL encoders) Merging orangefs/for-next (c1048828c3db orangefs: add splice file operations) Merging overlayfs/overlayfs-next (d46b7cd68336 ovl: plumb through flush method) Merging ubifs/next (42119dbe571e ubifs: Fix error return code in alloc_wbufs()) Merging v9fs/9p-next (324a158fe535 fs: 9p: add generic splice_write file operation) Merging xfs/for-next (756b1c343333 xfs: use current->journal_info for detecting transaction recursion) Merging zonefs/for-next (059c01039c01 zonefs: Fix file size of zones in full condition) Merging iomap/iomap-for-next (ed1128c2d0c8 xfs: reduce exclusive locking on unaligned dio) Merging djw-vfs/vfs-for-next (9b8523423b23 vfs: move __sb_{start,end}_write* to fs.h) Merging file-locks/locks-next (cc4a3f885e8f fcntl: make F_GETOWN(EX) return 0 on dead owner task) Merging vfs/for-next (8e555af00592 Merge branches 'work.sparc', 'work.sparc32', 'work.recursive_removal', 'work.misc' and 'work.coredump' into for-next) CONFLICT (content): Merge conflict in fs/coredump.c CONFLICT (content): Merge conflict in Documentation/filesystems/porting.rst Merging printk/for-next (f78dd21aa363 Merge branch 'for-5.12-no_hash_pointers' into for-next) Merging pci/next (e18fb64b7986 Merge branch 'remotes/lorenzo/pci/misc') Merging pstore/for-next/pstore (9c7d83ae6ba6 pstore: Fix warning in pstore_kill_sb()) Merging hid/for-next (914fe0466c86 Merge branch 'for-5.12/playstation-v2' into for-next) Merging i2c/i2c/for-next (35ea257a39ae Merge branch 'i2c/for-5.12' into i2c/for-next) Merging i3c/i3c/next (5c34b8e7e8bb i3c: master: dw: Drop redundant disec call) Merging dmi/dmi-for-next (3cb4d29a2633 MAINTAINERS: The DMI/SMBIOS tree has moved) Merging hwmon-staging/hwmon-next (6ab3332cc692 MAINTAINERS: Add entry for Texas Instruments TPS23861 PoE PSE) Merging jc_docs/docs-next (f37a15ea8db0 docs: proc.rst: fix indentation warning) Merging v4l-dvb/master (8f202f8e9ff3 media: v4l: async: Fix kerneldoc documentation for async functions) Merging v4l-dvb-next/master (d0a9fffedca1 docs: fs: api-summary.rst: get rid of kernel-doc include) CONFLICT (content): Merge conflict in drivers/gpu/drm/drm_dp_helper.c CONFLICT (content): Merge conflict in Documentation/dev-tools/kasan.rst CONFLICT (content): Merge conflict in Documentation/conf.py Merging fbdev/fbdev-for-next (732146a3f1dc video: fbdev: imxfb: fix a typo in imxfb_probe()) Merging pm/linux-next (aa2245914698 Merge branches 'acpi-platform' and 'acpi-tables' into linux-next) Merging cpufreq-arm/cpufreq/arm/linux-next (67fc209b527d cpufreq: qcom-hw: drop devm_xxx() calls from init/exit hooks) Merging cpupower/cpupower (3a3ecfdb605c cpupower: Add cpuid cap flag for MSR_AMD_HWCR support) Merging devfreq/devfreq-next (fc1745c0e40c PM / devfreq: rk3399_dmc: Remove unneeded semicolon) Merging opp/opp/linux-next (de04241ab87a opp: Don't skip freq update for different frequency) Merging thermal/thermal/linux-next (a51afb13311c thermal: cpufreq_cooling: freq_qos_update_request() returns < 0 on error) Merging thermal-rzhang/next (54ecb8f7028c Linux 5.4-rc1) Merging thermal-soc/next (6c375eccded4 thermal: db8500: Rewrite to be a pure OF sensor) Merging ieee1394/for-next (67f8e65e4fc1 firewire: net: remove set but not used variable 'guid') Merging dlm/next (4f19d071f9be fs: dlm: check on existing node address) Merging swiotlb/linux-next (47cfc5be1934 swiotlb: Validate bounce size in the sync/unmap path) Merging rdma/for-next (7289e26f395b Merge tag 'v5.11' into rdma.git for-next) Merging net-next/master (d310ec03a34e Merge tag 'perf-core-2021-02-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip) Merging bpf-next/for-next (d310ec03a34e Merge tag 'perf-core-2021-02-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip) Merging ipsec-next/master (d310ec03a34e Merge tag 'perf-core-2021-02-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip) Merging mlx5-next/mlx5-next (432119de33d9 net/mlx5: Add cyc2time HW translation mode support) Merging netfilter-next/master (38b5133ad607 octeontx2-pf: Fix otx2_get_fecparam()) Merging ipvs-next/master (a61e4b60761f Merge branch 'net-dsa-hellcreek-add-taprio-offloading') Merging wireless-drivers-next/master (773dc50d7169 Merge branch 'Xilinx-axienet-updates') Merging bluetooth/master (d310ec03a34e Merge tag 'perf-core-2021-02-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip) Merging mac80211-next/master (38b5133ad607 octeontx2-pf: Fix otx2_get_fecparam()) Merging gfs2/for-next (f6e1e1d1e149 Merge tag 'gfs2-for-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2) Merging mtd/mtd/next (6e9dff6fe3fb dt-bindings: mtd: add binding for BCM4908 partitions) Merging nand/nand/next (073abfa7ea9a mtd: rawnand: intel: Fix an error handling path in 'ebu_dma_start()') Merging spi-nor/spi-nor/next (75386810d3a6 mtd: spi-nor: sst: Add support for Global Unlock on sst26vf) Merging crypto/master (0de9dc80625b hwrng: timeriomem - Use device-managed registration API) Merging drm/drm-next (d153e8c156da Merge tag 'drm-intel-next-fixes-2021-02-25' of git://anongit.freedesktop.org/drm/drm-intel into drm-next) Merging drm-misc/for-linux-next (d922d58fedcd drm/panel: kd35t133: allow using non-continuous dsi clock) Merging amdgpu/drm-next (0de5c1dcd380 drm/amdgpu: always reset the asic in suspend) CONFLICT (content): Merge conflict in drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c Merging drm-intel/for-linux-next (ed428ffc2852 drm/i915: Nuke INTEL_OUTPUT_FORMAT_INVALID) Merging drm-tegra/drm/tegra/for-next (dcdfe2712b68 drm/tegra: Fix reference leak when pm_runtime_get_sync() fails) Merging drm-msm/msm-next (8490f02a3ca4 drm/msm: a6xx: Make sure the SQE microcode is safe) Merging imx-drm/imx-drm/next (82581fcf070b drm/modes: add non-OF stub for of_get_drm_display_mode) Merging etnaviv/etnaviv/next (7d614ab2f205 drm/etnaviv: fix NULL check before some freeing functions is not needed) Merging regmap/for-next (aa3233086b48 Merge remote-tracking branch 'regmap/for-5.12' into regmap-next) Merging sound/for-next (c88fb897c1fb ALSA: n64: Fix return value check in n64audio_probe()) Merging sound-asoc/for-next (cf421c5a84ca Merge remote-tracking branch 'asoc/for-5.12' into asoc-linus) Merging modules/modules-next (1e80d9cb579e module: potential uninitialized return in module_kallsyms_on_each_symbol()) Merging input/next (4c47097f8514 Input: aiptek - convert sysfs sprintf/snprintf family to sysfs_emit) Merging block/for-next (c1943df0832f Merge branch 'io_uring-worker.v3' into for-next) Merging device-mapper/for-next (a666e5c05e7c dm: fix deadlock when swapping to encrypted device) Merging pcmcia/pcmcia-next (4ce6b242b78d pcmcia: Switch to using the new API kobj_to_dev()) Merging mmc/next (a56f44138a2c mmc: sdhci-esdhc-imx: fix kernel panic when remove module) Merging mfd/for-mfd-next (26783d74cc6a mfd: wm831x-auxadc: Prevent use after free in wm831x_auxadc_read_irq()) Merging backlight/for-backlight-next (0b5e0f45af40 backlight/video: Use Platform getter/setter functions) Merging battery/for-next (a72acc56f3e9 power-supply: use kobj_to_dev()) Merging regulator/for-next (4a8a7d251201 Merge remote-tracking branch 'regulator/for-5.12' into regulator-linus) Merging security/next-testing (9dcd47fc1f7d Merge branch 'fixes-v5.10' into next-testing) Merging apparmor/apparmor-next (d108370c644b apparmor: fix error check) Merging integrity/next-integrity (f6692213b504 integrity: Make function integrity_add_key() static) Merging keys/keys-next (5bcd72358a7d Merge branch 'keys-cve-2020-26541' into keys-next) Merging safesetid/safesetid-next (03ca0ec13892 LSM: SafeSetID: Fix warnings reported by test bot) Merging selinux/next (365982aba1f2 fs: anon_inodes: rephrase to appropriate kernel-doc) Merging smack/next (7ef4c19d245f smackfs: restrict bytes count in smackfs write functions) Merging tomoyo/master (31caf8b2a847 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6) Merging tpmdd/next (c03c21ba6f4e Merge tag 'keys-misc-20210126' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs) Merging watchdog/master (a4f3407c4160 watchdog: qcom: Remove incorrect usage of QCOM_WDT_ENABLE_IRQ) Merging iommu/next (45e606f27269 Merge branches 'arm/renesas', 'arm/smmu', 'x86/amd', 'x86/vt-d' and 'core' into next) Merging audit/next (127c8c5f0589 audit: Make audit_filter_syscall() return void) Merging devicetree/for-next (cb8be8b4b27f driver core: platform: Drop of_device_node_put() wrapper) Merging mailbox/mailbox-for-next (6b50df2b8c20 mailbox: arm_mhuv2: Skip calling kfree() with invalid pointer) Merging spi/for-next (21b49223c0f5 Merge remote-tracking branch 'spi/for-5.12' into spi-linus) Merging tip/auto-latest (2126d722fe93 Merge branch 'sched/smp') Merging clockevents/timers/drivers/next (e85c1d21b16b clocksource/drivers/timer-microchip-pit64b: Add clocksource suspend/resume) Merging edac/edac-for-next (faf042d15093 Merge branch 'edac-amd64' into edac-for-next) Merging irqchip/irq/irqchip-next (c83fd57be3fe irqdomain: Remove debugfs_file from struct irq_domain) Merging ftrace/for-next (e23db805da2d tracing/tools: Add the latency-collector to tools directory) Merging rcu/rcu/next (c8c430f4a2fb Merge branch 'nolibc.2021.01.21a' into HEAD) Merging kvm/next (2df8d3807ce7 KVM: SVM: Fix nested VM-Exit on #GP interception handling) Merging kvm-arm/next (c93199e93e12 Merge branch 'kvm-arm64/pmu-debug-fixes-5.11' into kvmarm-master/next) Merging kvm-ppc/kvm-ppc-next (72476aaa4691 KVM: PPC: Book3S HV: Fix host radix SLB optimisation with hash guests) Merging kvms390/next (50a05be484cb KVM: s390: track synchronous pfault events in kvm_stat) Merging xen-tip/linux-next (53f131c284e8 xen-front-pgdir-shbuf: don't record wrong grant handle upon error) Merging percpu/for-next (df1c002198a8 Merge branch 'for-5.12' into for-next) Merging workqueues/for-next (e9ad2eb3d9ae workqueue: Use %s instead of function name) Merging drivers-x86/for-next (a7d53dbbc70a platform/x86: intel_scu_ipc: Increase virtual timeout from 3 to 5 seconds) Merging chrome-platform/for-next (b996c10e0f5b Merge tag 'tag-chrome-platform-for-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux) Merging hsi/for-next (aa57e77b3d28 HSI: Fix PM usage counter unbalance in ssi_hw_init) Merging leds/for-next (b0a82efa51ad leds: lp50xx: Get rid of redundant explicit casting) Merging ipmi/for-next (fc26067c7417 ipmi: remove open coded version of SMBus block write) Merging driver-core/driver-core-next (29c395c77a9a Merge tag 'x86-entry-2021-02-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip) Merging usb/usb-next (29c395c77a9a Merge tag 'x86-entry-2021-02-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip) Merging usb-gadget/next (b2c586eb07ef usb: dwc2: Fix INTR OUT transfers in DDMA mode.) Merging usb-serial/usb-next (1542d1324be1 USB: serial: drop bogus to_usb_serial_port() checks) Merging usb-chipidea-next/for-usb-next (1ee18ded86ec usb: cdnsp: Removes some useless trace events) Merging tty/tty-next (29c395c77a9a Merge tag 'x86-entry-2021-02-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip) Merging char-misc/char-misc-next (29c395c77a9a Merge tag 'x86-entry-2021-02-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip) Merging extcon/extcon-next (bb512233bffe extcon: qcom-spmi: Add support for VBUS detection) Merging phy-next/next (d68f2cb09597 phy: cpcap-usb: Simplify bool conversion) Merging soundwire/next (8d8d95842867 regmap: sdw-mbq: use MODULE_LICENSE("GPL")) Merging thunderbolt/next (c6da62a219d0 thunderbolt: Add support for native USB4 _OSC) Merging vfio/next (4d83de6da265 vfio/type1: Batch page pinning) Merging staging/staging-next (29c395c77a9a Merge tag 'x86-entry-2021-02-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip) Merging mux/for-next (3516bd729358 Merge tag 's390-5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux) Merging icc/icc-next (6715ea06ced4 Merge branch 'icc-sdx55' into icc-next) Merging dmaengine/next (eda38ce482b2 dmaengine: dw-axi-dmac: remove redundant null check on desc) Merging cgroup/for-next (00bfa16052cd Merge branch 'for-5.11-fixes' into for-next) Merging scsi/for-next (89263dedffa2 Merge branch 'misc' into for-next) Merging scsi-mkp/for-next (f749d8b7a989 scsi: hpsa: Correct dev cmds outstanding for retried cmds) Merging vhost/linux-next (1f77f124f2f2 ALSA: virtio: introduce device suspend/resume support) Merging rpmsg/for-next (fcb4c469244b Merge branches 'hwspinlock-next', 'rpmsg-next' and 'rproc-next' into for-next) Merging gpio/for-next (7ac554888233 MAINTAINERS: Remove reference to non-existing file) Merging gpio-brgl/gpio/for-next (a8002a35935a gpio: pcf857x: Fix missing first interrupt) Merging gpio-intel/for-next (c5318e248f52 gpio: msic: Drop driver from Makefile) Merging pinctrl/for-next (b40b760aa2a9 pinctrl: mediatek: Fix trigger type setting follow for unexpected interrupt) Merging pinctrl-intel/for-next (0e793a4e2834 pinctrl: tigerlake: Add Alder Lake-P ACPI ID) Merging pinctrl-renesas/renesas-pinctrl (a5cda861ed57 pinctrl: renesas: r8a779a0: Add TPU pins, groups and functions) Merging pinctrl-samsung/for-next (5c8fe583cce5 Linux 5.11-rc1) Merging pwm/for-next (9a9dd7e47351 pwm: lpc18xx-sct: remove unneeded semicolon) Merging userns/for-next (95ebabde382c capabilities: Don't allow writing ambiguous v3 file capabilities) Merging ktest/for-next (170f4869e662 ktest.pl: Fix the logic for truncating the size of the log file for email) Merging random/dev (ab9a7e27044b random: avoid warnings for !CONFIG_NUMA builds) Merging kselftest/next (e0c0840a46db selftests/seccomp: Accept any valid fd in user_notification_addfd) Merging y2038/y2038 (c4e71212a245 Revert "drm/etnaviv: reject timeouts with tv_nsec >= NSEC_PER_SEC") Merging livepatching/for-next (81840f21d416 Merge branch 'for-5.12/doc' into for-next) Merging coresight/next (1efbcec2ef8c coresight: cti: Reduce scope for the variable “cs_fwnode” in cti_plat_create_connection()) Merging rtc/rtc-next (49dfc1f16b03 rtc: abx80x: Add utility function for writing configuration key) Merging nvdimm/libnvdimm-for-next (30c10d32152d Merge branch 'for-5.12/cxl' into libnvdimm-for-next) Merging at24/at24/for-next (5366c48f327e dt-bindings: eeprom: at24: Document ROHM BR24G01) Merging ntb/ntb-next (5c8fe583cce5 Linux 5.11-rc1) Merging seccomp/for-next/seccomp (a381b70a1cf8 seccomp: Improve performace by optimizing rmb()) Merging kspp/for-next/kspp (414eece95b98 Merge tag 'clang-lto-v5.12-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux) Merging gnss/gnss-next (45d5996e034c gnss: drop stray semicolons) Merging fsi/next (4a851d714ead fsi: aspeed: Support CFAM reset GPIO) Merging slimbus/for-next (0320ed0a8236 drivers: slimbus: Fix word resposible -> responsible in slimbus.h) CONFLICT (content): Merge conflict in drivers/nvmem/Kconfig Merging nvmem/for-next (667fbb3fcde1 nvmem: qcom-spmi-sdam: Fix uninitialized pdev pointer) Merging xarray/main (80c1dbebf308 XArray: Fix splitting to non-zero orders) Merging hyperv/hyperv-next (3019270282a1 Revert "Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer") Merging auxdisplay/auxdisplay (b45616445a6e auxdisplay: Fix duplicate CHARLCD config symbol) Merging kgdb/kgdb/for-next (f11e2bc682cc kgdb: Remove kgdb_schedule_breakpoint()) Merging hmm/hmm (3650b228f83a Linux 5.10-rc1) Merging fpga/for-next (e41d4c011706 fpga: dfl: fme: Constify static attribute_group structs) Merging kunit/test (e71ba9452f0b Linux 5.11-rc2) Merging generic-ioremap/for-next (4bdc0d676a64 remove ioremap_nocache and devm_ioremap_nocache) Merging cfi/cfi/next (5de15b610f78 mtd: hyperbus: add Renesas RPC-IF driver) Merging kunit-next/kunit (7af29141a31a kunit: tool: fix unintentional statefulness in run_kernel()) Merging trivial/for-next (9ff9b0d392ea Merge tag 'net-next-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next) Merging zx2c4/for-next (16fbf79b0f83 Linux 5.6-rc7) Merging mhi/mhi-next (9e04adfcab78 mhi: Fix double dma free) Merging memblock/for-next (097d43d85704 mm: memblock: remove return value of memblock_free_all()) Merging init/init-user-pointers (38b082236e77 initramfs: use vfs_utimes in do_copy) Merging counters/counters (e71ba9452f0b Linux 5.11-rc2) Merging iomem-mmap-vs-gup/topic/iomem-mmap-vs-gup (636b21b50152 PCI: Revoke mappings like devmem) Merging oprofile-removal/oprofile/removal (be65de6b03aa fs: Remove dcookies support) Merging akpm-current/current (2e862ce7025b initramfs-panic-with-memory-information-fix) CONFLICT (content): Merge conflict in include/linux/pagemap.h $ git checkout -b akpm remotes/origin/akpm/master $ git rebase --onto master remotes/origin/akpm/master-base Merging akpm/master (10fdfd2ba5d8 MIPS: make userspace mapping young by default)
{ "author": "Stephen Rothwell <sfr@canb.auug.org.au>", "date": "Fri, 26 Feb 2021 14:05:37 +1100", "is_openbsd": false, "thread_id": "759447c5-a2bd-445f-a245-8772f9ea1316@sirena.org.uk.mbox.gz" }
lkml_critique
lkml
Hi all, I have created today's linux-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/sfr/linux-next.git. You can see which trees have been included by looking in the Next/Trees file in the source. There are also quilt-import.log and merge.log files in the Next directory. Between each merge, the tree was built with allmodconfig for both powerpc and x86_64. There were only two minor merge problems. We are up to 34 trees, more are welcome (even if they are currently empty). Status of my local build tests is at http://kisskb.ellerman.id.au/kisskb/branch/9/. We have added arm and m68k to the architectures built. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au
null
null
null
linux-next: Tree for Feb 26
Hi all, Changes since 20240223: The mm-nonmm-stable tree gained a conflict against the risc-v-fixes tree. The perf tree still had its build failure so I removed the object tree and rebuilt it which worked. The fuse tree gained a conflict against Linus' tree. The vfs-brauner tree gained conflictis against the bcachefs and cifs trees. The backlight tree gained a build failure so I used the version from next-20240223. The tip tree gained a conflict against the workqueues tree. The rcu tree gained a conflict against the pm tree. The gpio-brgl tree still had its build failure so I used the version from next-20240222. The kspp tree gained a conflict against the kbuild tree. Non-merge commits (relative to Linus' tree): 9000 8396 files changed, 411176 insertions(+), 163733 deletions(-) ---------------------------------------------------------------------------- I have created today's linux-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git (patches at http://www.kernel.org/pub/linux/kernel/next/ ). If you are tracking the linux-next tree using git, you should not use "git pull" to do so as that will try to merge the new linux-next release with the old one. You should use "git fetch" and checkout or reset to the new master. You can see which trees have been included by looking in the Next/Trees file in the source. There is also the merge.log file in the Next directory. Between each merge, the tree was built with a ppc64_defconfig for powerpc, an allmodconfig for x86_64, a multi_v7_defconfig for arm and a native build of tools/perf. After the final fixups (if any), I do an x86_64 modules_install followed by builds for x86_64 allnoconfig, powerpc allnoconfig (32 and 64 bit), ppc44x_defconfig, allyesconfig and pseries_le_defconfig and i386, arm64, s390, sparc and sparc64 defconfig and htmldocs. And finally, a simple boot test of the powerpc pseries_le_defconfig kernel in qemu (with and without kvm enabled). Below is a summary of the state of the merge. I am currently merging 370 trees (counting Linus' and 104 trees of bug fix patches pending for the current merge release). Stats about the size of the tree over time can be seen at http://neuling.org/linux-next-size.html . Status of my local build tests will be at http://kisskb.ellerman.id.au/linux-next . If maintainers want to give advice about cross compilers/configs that work, we are always open to add more builds. Thanks to Randy Dunlap for doing many randconfig builds. And to Paul Gortmaker for triage and bug fixes. -- Cheers, Stephen Rothwell $ git checkout master $ git reset --hard stable Merging origin/master (70ff1fe626a1 Merge tag 'docs-6.8-fixes3' of git://git.lwn.net/linux) Merging fixes/fixes (2dde18cd1d8f Linux 6.5) Merging mm-hotfixes/mm-hotfixes-unstable (e0f617170dc6 init/Kconfig: lower GCC version check for -Warray-bounds) Merging kbuild-current/fixes (b401b621758e Linux 6.8-rc5) Merging arc-current/for-curr (861deac3b092 Linux 6.7-rc7) Merging arm-current/fixes (f54e8634d136 ARM: 9330/1: davinci: also select PINCTRL) Merging arm64-fixes/for-next/fixes (d7b77a0d565b arm64/sme: Restore SMCR_EL1.EZT0 on exit from suspend) Merging arm-soc-fixes/arm/fixes (dcb8e53e339e Merge tag 'renesas-fixes-for-v6.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/fixes) Merging davinci-current/davinci/for-current (6613476e225e Linux 6.8-rc1) Merging drivers-memory-fixes/fixes (6613476e225e Linux 6.8-rc1) Merging sophgo-fixes/fixes (41bccc98fb79 Linux 6.8-rc2) Merging tee-fixes/fixes (ceaa837f96ad Linux 6.2-rc8) Merging m68k-current/for-linus (e8a7824856de m68k: defconfig: Update defconfigs for v6.8-rc1) Merging powerpc-fixes/fixes (20c8c4dafe93 KVM: PPC: Book3S HV: Fix L2 guest reboot failure due to empty 'arch_compat') Merging s390-fixes/fixes (5ef1dc40ffa6 s390/cio: fix invalid -EBUSY on ccw_device_start) Merging fscrypt-current/for-current (4bcf6f827a79 fscrypt: check for NULL keyring in fscrypt_put_master_key_activeref()) Merging fsverity-current/for-current (a075bacde257 fsverity: don't drop pagecache at end of FS_IOC_ENABLE_VERITY) Merging net/main (2a770cdc4382 tun: Fix xdp_rxq_info's queue_index when detaching) Merging bpf/master (dced881ead78 Merge branch 'check-bpf_func_state-callback_depth-when-pruning-states') Merging ipsec/master (983a73da1f99 xfrm: Pass UDP encapsulation in TX packet offload) Merging netfilter/main (359e54a93ab4 l2tp: pass correct message length to ip6_append_data) Merging ipvs/main (40b9385dd8e6 enic: Avoid false positive under FORTIFY_SOURCE) Merging wireless/for-next (413dafc8170f wifi: mac80211: only call drv_sta_rc_update for uploaded stations) Merging wpan/master (b85ea95d0864 Linux 6.7-rc1) Merging rdma-fixes/for-rc (eb5c7465c324 RDMA/srpt: fix function pointer cast warnings) Merging sound-current/for-linus (0ac32a396e4f ALSA: hda/realtek: Add special fixup for Lenovo 14IRP8) Merging sound-asoc-fixes/for-linus (eba2eb2495f4 ASoC: soc-card: Fix missing locking in snd_soc_card_get_kcontrol()) Merging regmap-fixes/for-linus (2f0dbb24f78a regmap: kunit: Ensure that changed bytes are actually different) Merging regulator-fixes/for-linus (e5d40e9afd84 regulator: max5970: Fix regulator child node name) Merging spi-fixes/for-linus (078d62de433b spi: cadence-qspi: add system-wide suspend and resume callbacks) Merging pci-current/for-linus (6613476e225e Linux 6.8-rc1) Merging driver-core.current/driver-core-linus (b401b621758e Linux 6.8-rc5) Merging tty.current/tty-linus (3b69e32e151b serial: amba-pl011: Fix DMA transmission in RS485 mode) Merging usb.current/usb-linus (69f89168b310 usb: typec: tpcm: Fix issues with power being removed during reset) Merging usb-serial-fixes/usb-linus (54be6c6c5ae8 Linux 6.8-rc3) Merging phy/fixes (d4c08d8b23b2 phy: qcom-qmp-usb: fix v3 offsets data) Merging staging.current/staging-linus (6613476e225e Linux 6.8-rc1) Merging iio-fixes/fixes-togreg (11dadb631007 iio: accel: adxl367: fix I2C FIFO data register) Merging counter-current/counter-current (c83ccdc9586b counter: fix privdata alignment) Merging char-misc.current/char-misc-linus (daaf5286b6d2 mei: Add Meteor Lake support for IVSC device) Merging soundwire-fixes/fixes (6613476e225e Linux 6.8-rc1) Merging thunderbolt-fixes/fixes (d3d17e23d1a0 thunderbolt: Fix NULL pointer dereference in tb_port_update_credits()) Merging input-current/for-linus (4255447ad34c Input: i8042 - add Fujitsu Lifebook U728 to i8042 quirk table) Merging crypto-current/master (1c0cf6d19690 crypto: arm64/neonbs - fix out-of-bounds access on short input) Merging vfio-fixes/for-linus (4ea95c04fa6b vfio: Drop vfio_file_iommu_group() stub to fudge around a KVM wart) Merging kselftest-fixes/fixes (b54761f6e977 kselftest/seccomp: Report each expectation we assert as a KTAP test) Merging modules-fixes/modules-linus (f412eef03938 Documentation: livepatch: module-elf-format: Remove local klp_modinfo definition) Merging dmaengine-fixes/fixes (df2515a17914 dmaengine: ptdma: use consistent DMA masks) Merging backlight-fixes/for-backlight-fixes (6613476e225e Linux 6.8-rc1) Merging mtd-fixes/mtd/fixes (e6a30d0c48a1 mtd: rawnand: marvell: fix layouts) Merging mfd-fixes/for-mfd-fixes (6613476e225e Linux 6.8-rc1) Merging v4l-dvb-fixes/fixes (346c84e281a9 media: pwm-ir-tx: Depend on CONFIG_HIGH_RES_TIMERS) Merging reset-fixes/reset/fixes (4a6756f56bcf reset: Fix crash when freeing non-existent optional resets) Merging mips-fixes/mips-fixes (b401b621758e Linux 6.8-rc5) Merging at91-fixes/at91-fixes (6613476e225e Linux 6.8-rc1) Merging omap-fixes/fixes (9b6a51aab5f5 ARM: dts: Fix occasional boot hang for am3 usb) Merging kvm-fixes/master (5ef1d8c1ddbf KVM: SVM: Flush pages under kvm->lock to fix UAF in svm_register_enc_region()) Merging kvms390-fixes/master (83303a4c776c KVM: s390: fix cc for successful PQAP) Merging hwmon-fixes/hwmon (cf5ad17ee6a4 hwmon: (nct6775) Fix access to temperature configuration registers) cf5ad17ee6a4 ("hwmon: (nct6775) Fix access to temperature configuration registers") Merging nvdimm-fixes/libnvdimm-fixes (33908660e814 ACPI: NFIT: Fix incorrect calculation of idt size) Merging cxl-fixes/fixes (daeacfa75d08 Merge branch 'for-6.8/cxl-cper' into for-6.8/cxl) d08431235df0 ("acpi/ghes: Remove CXL CPER notifications") CONFLICT (content): Merge conflict in drivers/cxl/acpi.c Merging btrfs-fixes/next-fixes (eb90d142fc1b Merge branch 'misc-6.8' into next-fixes) Merging vfs-fixes/fixes (2c88c16dc20e erofs: fix handling kern_mount() failure) Merging dma-mapping-fixes/for-linus (d5090484b021 swiotlb: do not try to allocate a TLB bigger than MAX_ORDER pages) Merging drivers-x86-fixes/fixes (427c70dec738 platform/x86: thinkpad_acpi: Only update profile if successfully converted) Merging samsung-krzk-fixes/fixes (eab4f56d3e75 ARM: dts: exynos4212-tab3: add samsung,invert-vclk flag to fimd) Merging pinctrl-samsung-fixes/fixes (6613476e225e Linux 6.8-rc1) Merging devicetree-fixes/dt/linus (4e06ec0774f5 dt-bindings: ufs: samsung,exynos-ufs: Add size constraints on "samsung,sysreg") Merging dt-krzk-fixes/fixes (6613476e225e Linux 6.8-rc1) Merging scsi-fixes/fixes (9ddf190a7df7 scsi: jazz_esp: Only build if SCSI core is builtin) Merging drm-fixes/drm-fixes (72fa02fdf833 nouveau: add an ioctl to report vram usage) Merging drm-intel-fixes/for-linux-next-fixes (fb1e881273f4 drm/i915/tv: Fix TV mode) Merging mmc-fixes/fixes (6b1ba3f9040b mmc: mmci: stm32: fix DMA API overlapping mappings warning) Merging rtc-fixes/rtc-fixes (08279468a294 rtc: sunplus: fix format string for printing resource) Merging gnss-fixes/gnss-linus (54be6c6c5ae8 Linux 6.8-rc3) Merging hyperv-fixes/hyperv-fixes (564eac2860bd hv_utils: Allow implicit ICTIMESYNCFLAG_SYNC) Merging soc-fsl-fixes/fix (06c2afb862f9 Linux 6.5-rc1) Merging risc-v-fixes/fixes (d82f32202e0d RISC-V: Ignore V from the riscv,isa DT property on older T-Head CPUs) Merging riscv-dt-fixes/riscv-dt-fixes (ce6b6d151396 riscv: dts: sifive: add missing #interrupt-cells to pmic) Merging riscv-soc-fixes/riscv-soc-fixes (bf456162601f Merge branches 'riscv-cache-fixes' and 'riscv-firmware-fixes' into riscv-soc-fixes) 8bbccdd8c264 ("cache: ax45mp_cache: Align end size to cache boundary in ax45mp_dma_cache_wback()") Merging fpga-fixes/fixes (6613476e225e Linux 6.8-rc1) Merging spdx/spdx-linus (6613476e225e Linux 6.8-rc1) Merging gpio-brgl-fixes/gpio/for-current (ae366ba8576d gpiolib: Handle no pin_ranges in gpiochip_generic_config()) Merging gpio-intel-fixes/fixes (6613476e225e Linux 6.8-rc1) Merging pinctrl-intel-fixes/fixes (6613476e225e Linux 6.8-rc1) Merging auxdisplay-fixes/fixes (6613476e225e Linux 6.8-rc1) Merging erofs-fixes/fixes (56ee7db31187 erofs: fix refcount on the metabuf used for inode lookup) Merging kunit-fixes/kunit-fixes (829388b725f8 kunit: device: Unregister the kunit_bus on shutdown) Merging ubifs-fixes/fixes (2241ab53cbb5 Linux 6.2-rc5) Merging memblock-fixes/fixes (6a9531c3a880 memblock: fix crash when reserved memory is not added to memory) Merging nfsd-fixes/nfsd-fixes (5ea9a7c5fe41 nfsd: don't take fi_lock in nfsd_break_deleg_cb()) Merging renesas-fixes/fixes (8c987693dc2d ARM: dts: renesas: rcar-gen2: Add missing #interrupt-cells to DA9063 nodes) Merging perf-current/perf-tools (fdd0ae72b34e perf tools headers: update the asm-generic/unaligned.h copy with the kernel sources) Merging efi-fixes/urgent (2ce507f57ba9 efivarfs: Drop 'duplicates' bool parameter on efivar_init()) Merging zstd-fixes/zstd-linus (77618db34645 zstd: Fix array-index-out-of-bounds UBSAN warning) Merging battery-fixes/fixes (2df70149e73e power: supply: bq27xxx-i2c: Do not free non existing IRQ) Merging uml-fixes/fixes (73a23d771033 um: harddog: fix modular build) Merging iommufd-fixes/for-rc (510325e5ac5f selftests/iommu: fix the config fragment) Merging rust-fixes/rust-fixes (b401b621758e Linux 6.8-rc5) Merging v9fs-fixes/fixes/next (6613476e225e Linux 6.8-rc1) Merging w1-fixes/fixes (6613476e225e Linux 6.8-rc1) Merging pmdomain-fixes/fixes (eb5555d422d0 pmdomain: arm: Fix NULL dereference on scmi_perf_domain removal) Merging overlayfs-fixes/ovl-fixes (420332b94119 ovl: mark xwhiteouts directory with overlay.opaque='x') Merging i2c-host-fixes/i2c/i2c-host-fixes (cf8281b1aeab i2c: imx: when being a target, mark the last read as processed) cf8281b1aeab ("i2c: imx: when being a target, mark the last read as processed") Merging drm-misc-fixes/for-linux-next-fixes (f79ee78767ca soc: qcom: pmic_glink: Fix boot when QRTR=m) Merging mm-stable/mm-stable (c44ed5b7596f writeback: remove a use of write_cache_pages() from do_writepages()) Merging mm-nonmm-stable/mm-nonmm-stable (2932fb0a927d list: leverage list_is_head() for list_entry_is_head()) CONFLICT (content): Merge conflict in arch/riscv/include/asm/ftrace.h Merging mm/mm-everything (e599ac4eab99 Merge branch 'mm-nonmm-unstable' into mm-everything) Merging kbuild/for-next (5270316c9fec kbuild: Use -fmin-function-alignment when available) Merging clang-format/clang-format (5a205c6a9f79 clang-format: Update with v6.7-rc4's `for_each` macro list) Merging perf/perf-tools-next (b482f5f8e016 perf tests: Add option to run tests in parallel) Merging compiler-attributes/compiler-attributes (2993eb7a8d34 Compiler Attributes: counted_by: fixup clang URL) Merging dma-mapping/for-next (7c65aa3cc072 dma-debug: fix kernel-doc warnings) Merging asm-generic/master (34b2321cc648 MAINTAINERS: Add Andreas Larsson as co-maintainer for arch/sparc) Merging arc/for-next (0bb80ecc33a8 Linux 6.6-rc1) Merging arm/for-next (83ffbed67207 Merge branches 'misc' and 'fixes' into for-next) Merging arm64/for-next/core (e8e5eae6f56d Merge branch 'for-next/stage1-lpa2' into for-next/core) Merging arm-perf/for-next/perf (fd185a245155 perf/arm_cspmu: Add devicetree support) Merging arm-soc/for-next (d6f69171ea30 soc: document merges) Merging amlogic/for-next (15e1567404d7 Merge branch 'v6.9/arm64-dt' into for-next) Merging asahi-soc/asahi-soc/for-next (ffc253263a13 Linux 6.6) Merging aspeed/for-next (0c30853731ec ARM: dts: aspeed: x4tf: Add dts for asus x4tf project) Merging at91/at91-next (6315946ad242 Merge branch 'at91-dt' into at91-next) Merging broadcom/next (412c6bd2c649 Merge branch 'soc/next' into next) Merging davinci/davinci/for-next (6613476e225e Linux 6.8-rc1) Merging drivers-memory/for-next (ae1e06fb62c3 memory: tegra: Fix indentation) Merging imx-mxs/for-next (45ccd182719b Merge branch 'imx/defconfig' into for-next) Merging mediatek/for-next (ba90af39ba57 arm64: dts: mediatek: mt8183-pico6: Fix wake-on-X event node names) Merging mvebu/for-next (476887312c60 Merge branch 'mvebu/drivers' into mvebu/for-next) Merging omap/for-next (0012c1958460 Merge branches 'sgx-for-v6.9' and 'omap-for-v6.9/soc' into for-next) Merging qcom/for-next (f6265e31fc71 Merge branches 'arm32-for-6.9', 'arm64-defconfig-for-6.9', 'arm64-fixes-for-6.8', 'arm64-for-6.9', 'clk-for-6.9' and 'drivers-for-6.9' into for-next) Merging renesas/next (06a019816e51 Merge branch 'renesas-dts-for-v6.9' into renesas-next) Merging reset/reset/next (c721f189e89c reset: Instantiate reset GPIO controller for shared reset-gpios) Merging rockchip/for-next (504c4c60e70b Merge branch 'v6.9-armsoc/dts64' into for-next) Merging samsung-krzk/for-next (8b9d2e71b42c Merge branch 'next/clk' into for-next) Merging scmi/for-linux-next (a2b8119375a1 Merge tags 'vexpress-update-6.9', 'ffa-update-6.9' and 'scmi-updates-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into for-linux-next) Merging sophgo/for-next (0f46e1339ef1 MAINTAINERS: Setup proper info for SOPHGO vendor support) Merging stm32/stm32-next (7fd195f01ae5 ARM: dts: stm32: lxa-tac: reduce RGMII interface drive strength) Merging sunxi/sunxi/for-next (c1d7282e4e92 Merge branch 'sunxi/dt-for-6.9' into sunxi/for-next) Merging tee/next (58ea7e692a9e Merge branch 'tee_bus_type_for_v6.9' into next) Merging tegra/for-next (c85c30fad06d Merge branch for-6.9/arm64/dt into for-next) Merging ti/ti-next (d4dca68e4b2c Merge branch 'ti-k3-config-next' into ti-next) Merging xilinx/for-next (2d81f5ef567c Merge remote-tracking branch 'git/zynqmp/dt' into for-next) Merging clk/clk-next (948d9ddad423 Merge branch 'clk-mobileye' into clk-next) Merging clk-imx/for-next (6613476e225e Linux 6.8-rc1) Merging clk-renesas/renesas-clk (81a7a88a9806 clk: renesas: r8a779h0: Add RPC-IF clock) Merging csky/linux-next (2c40c1c6adab Merge tag 'usb-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb) Merging loongarch/loongarch-next (f0f5c4894f89 LoongArch: KVM: Streamline kvm_check_cpucfg() and improve comments) Merging m68k/for-next (6b9c045b0602 m68k: defconfig: Update defconfigs for v6.7-rc1) Merging m68knommu/for-next (b401b621758e Linux 6.8-rc5) Merging microblaze/next (6613476e225e Linux 6.8-rc1) Merging mips/mips-next (188942f05ce4 tty: mips_ejtag_fdc: Fix passing incompatible pointer type warning) Merging openrisc/for-next (c289330331eb openrisc: Remove kernel-doc marker from ioremap comment) Merging parisc-hd/for-next (a5c8a00bb269 parisc: Fix csum_ipv6_magic on 64-bit systems) Merging powerpc/next (a3e1820186b5 powerpc: pmi: Convert to platform remove callback returning void) Merging soc-fsl/next (fb9c384625dd bus: fsl-mc: fsl-mc-allocator: Drop a write-only variable) Merging risc-v/for-next (45e0b0fd6dc5 riscv: defconfig: Enable mmc and dma drivers for T-Head TH1520) CONFLICT (content): Merge conflict in arch/riscv/include/asm/bitops.h Merging riscv-dt/riscv-dt-for-next (5669bb5a16a0 riscv: dts: microchip: add specific compatible for mpfs pdma) Merging riscv-soc/riscv-soc-for-next (6613476e225e Linux 6.8-rc1) Merging s390/for-next (ea5872e0bbe1 Merge branch 'features' into for-next) Merging sh/for-next (0a2d3ce0031f sh: hd64461: Make setup_hd64461 static) Merging uml/next (83aec96c631e um: Mark 32bit syscall helpers as clobbering memory) Merging xtensa/xtensa-for-next (7ab7acb68adf xtensa: fix MAKE_PC_FROM_RA second argument) Merging bcachefs/for-next (26494335d114 bcachefs: improve move_gap()) Merging pidfd/for-next (a901a3568fd2 Merge tag 'iomap-6.5-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux) Merging fscrypt/for-next (8c62f31eddb7 fscrypt: shrink the size of struct fscrypt_inode_info slightly) Merging afs/afs-next (abcbd3bfbbfe afs: trace: Log afs_make_call(), including server address) Merging btrfs/for-next (2653677ec901 Merge branch 'for-next-next-v6.8-20240222' into for-next-20240222) Merging ceph/master (dbc347ef7f0c ceph: add ceph_cap_unlink_work to fire check_caps() immediately) Merging cifs/for-next (09d77130a24b smb: client: move most of reparse point handling code to common file) Merging configfs/for-next (4425c1d9b44d configfs: improve item creation performance) Merging ecryptfs/next (a3d78fe3e1ae fs: ecryptfs: comment typo fix) Merging erofs/dev (b401b621758e Linux 6.8-rc5) Merging exfat/dev (f3cb82f5008f exfat: remove SLAB_MEM_SPREAD flag usage) Merging exportfs/exportfs-next (42c3732fa807 fs: Create a generic is_dot_dotdot() utility) Merging ext3/for_next (21fea055bb74 Pull UDF mount API conversion) Merging ext4/dev (1f85b452e07c ext4: verify s_clusters_per_group even without bigalloc) Merging f2fs/dev (78adee727011 f2fs: introduce get_available_block_count() for cleanup) Merging fsverity/for-next (8e43fb06e10d fsverity: remove hash page spin lock) Merging fuse/for-next (33771e1143a9 fuse: implement passthrough for mmap) CONFLICT (content): Merge conflict in fs/fuse/inode.c Merging gfs2/for-next (6b89b6af459f Merge tag 'gfs2-v6.8-rc2-revert' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2) Merging jfs/jfs-next (e42e29cc4423 Revert "jfs: fix shift-out-of-bounds in dbJoin") Merging ksmbd/ksmbd-for-next (342c3b87c95b ksmbd: retrieve number of blocks using vfs_getattr in set_file_allocation_info) Merging nfs/linux-next (052d534373b7 Merge tag 'exfat-for-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat) Merging nfs-anna/linux-next (57331a59ac0d NFSv4.1: Use the nfs_client's rpc timeouts for backchannel) Merging nfsd/nfsd-next (26102396d4e0 NFSD: Document nfsd_setattr() fill-attributes behavior) Merging ntfs3/master (622cd3daa8ea fs/ntfs3: Slightly simplify ntfs_inode_printk()) Merging orangefs/for-next (9bf93dcfc453 Julia Lawall reported this null pointer dereference, this should fix it.) Merging overlayfs/overlayfs-next (d17bb4620f90 overlayfs.rst: fix ReST formatting) Merging ubifs/next (3ce485803da1 mtd: ubi: provide NVMEM layer over UBI volumes) Merging v9fs/9p-next (be3193e58ec2 9p: Fix read/write debug statements to report server reply) Merging v9fs-ericvh/ericvh/for-next (be57855f5050 fs/9p: fix dups even in uncached mode) Merging xfs/for-next (4b2f459d8625 xfs: fix SEEK_HOLE/DATA for regions with active COW extents) Merging zonefs/for-next (567e629fd296 zonefs: convert zonefs to use the new mount api) Merging iomap/iomap-for-next (3ac974796e5d iomap: fix short copy in iomap_write_iter()) Merging djw-vfs/vfs-for-next (ce85a1e04645 xfs: stabilize fs summary counters for online fsck) Merging file-locks/locks-next (e0152e7481c6 Merge tag 'riscv-for-linus-6.6-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux) Merging iversion/iversion-next (e0152e7481c6 Merge tag 'riscv-for-linus-6.6-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux) Merging vfs-brauner/vfs.all (872365adb67a Merge branch 'vfs.uuid' into vfs.all) CONFLICT (content): Merge conflict in fs/bcachefs/super-io.c CONFLICT (content): Merge conflict in fs/nfsd/nfs4layouts.c CONFLICT (content): Merge conflict in fs/smb/client/file.c CONFLICT (content): Merge conflict in init/main.c Applying: fixup for "filelock: split common fields into struct file_lock_core" Merging vfs/for-next (052d534373b7 Merge tag 'exfat-for-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat) Merging printk/for-next (e7081d5a9d97 Merge branch 'rework/console-flushing-fixes' into for-next) Merging pci/next (5b52c9afa3dd Merge branch 'pci/misc') Merging pstore/for-next/pstore (98bc7e26e14f pstore/zone: Add a null pointer check to the psz_kmsg_read) Merging hid/for-next (8f0a3ff87887 Merge branch 'for-6.9/nintendo' into for-next) Merging i2c/i2c/for-next (87aec499368d i2c: imx: when being a target, mark the last read as processed) Merging i2c-host/i2c/i2c-host (48acf8292280 i2c: Remove redundant comparison in npcm_i2c_reg_slave) Merging i3c/i3c/next (8f06fb458539 i3c: Make i3c_bus_type const) Merging hwmon-staging/hwmon-next (5b1d7a0f904b hwmon: (sis5595) drop unused DIV_TO_REG function) Merging jc_docs/docs-next (32ed7930304c Merge branch 'docs-fixes' into docs-mw) Merging v4l-dvb/master (8c64f4cdf4e6 media: edia: dvbdev: fix a use-after-free) CONFLICT (content): Merge conflict in drivers/staging/media/atomisp/pci/atomisp_cmd.c Merging v4l-dvb-next/master (e0b8eb0f6d65 media: visl: Add codec specific variability on output frames) Merging pm/linux-next (b9dcbdb099e4 Merge branches 'pm-cpufreq', 'pm-sleep', 'pm-runtime', 'pm-em' and 'pm-tools' into linux-next) Merging cpufreq-arm/cpufreq/arm/linux-next (3093fa33539b cpufreq: qcom-hw: add CONFIG_COMMON_CLK dependency) Merging cpupower/cpupower (babb46746cc5 Fix cpupower-frequency-info.1 man page typo) Merging devfreq/devfreq-next (b401b621758e Linux 6.8-rc5) Merging pmdomain/next (713240877a26 pmdomain: renesas: Adjust the waiting time to cover the worst case) Merging opp/opp/linux-next (ace4b31b297d cpufreq: Move dev_pm_opp_{init|free}_cpufreq_table() to pm_opp.h) Merging thermal/thermal/linux-next (5314b1543787 thermal/drivers/exynos: Use set_trips ops) Merging dlm/next (5beebc1dda47 dlm: update format header reflect current format) Merging rdma/for-next (14b526f55ba5 RDMA/uverbs: Remove flexible arrays from struct *_filter) Merging net-next/main (d662c5b3ce6d tools: ynl: fix header guards) CONFLICT (content): Merge conflict in drivers/net/wireless/intel/iwlwifi/mvm/mvm.h Merging bpf-next/for-next (2ab256e93249 bpf: add is_async_callback_calling_insn() helper) Merging ipsec-next/master (1476de6d2b57 xfrm: Simplify the allocation of slab caches in xfrm_policy_init) Merging mlx5-next/mlx5-next (d727d27db536 RDMA/mlx5: Expose register c0 for RDMA device) Merging netfilter-next/main (a4634aa71fee bonding: rate-limit bonding driver inspect messages) Merging ipvs-next/main (26f4dac11775 netfilter: x_tables: Use unsafe_memcpy() for 0-sized destination) Merging bluetooth/master (75518da8cf76 Bluetooth: hci_qca: don't use IS_ERR_OR_NULL() with gpiod_get_optional()) Merging wireless-next/for-next (a4634aa71fee bonding: rate-limit bonding driver inspect messages) Merging wpan-next/master (2373699560a7 mac802154: Avoid new associations while disassociating) Merging wpan-staging/staging (2373699560a7 mac802154: Avoid new associations while disassociating) Merging mtd/mtd/next (18af7e357033 mtd: flashchip: explicitly include <linux/wait.h>) Merging nand/nand/next (4bd14b2fd8a8 mtd: spinand: esmt: Extend IDs to 5 bytes) Merging spi-nor/spi-nor/next (3c0e1dfa703c MAINTAINERS: change my mail to the kernel.org one) Merging crypto/master (a24e3b583ea2 crypto: rockchip - fix to check return value) Merging drm/drm-next (40d47c5fb4f2 Merge tag 'amd-drm-next-6.9-2024-02-19' of https://gitlab.freedesktop.org/agd5f/linux into drm-next) CONFLICT (content): Merge conflict in drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c CONFLICT (content): Merge conflict in drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer_private.h CONFLICT (content): Merge conflict in drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c Applying: drm/ttm: initialise places Merging drm-ci/topic/drm-ci (ad6bfe1b66a5 drm: ci: docs: fix build warning - add missing escape) Merging drm-exynos/for-linux-next (9ac4beb7578a Merge tag 'drm-misc-next-2024-02-15' of git://anongit.freedesktop.org/drm/drm-misc into drm-next) Merging drm-misc/for-linux-next (32ca5ebfde9a drm/i915: Fix possible null pointer dereference after drm_dbg_printer conversion) CONFLICT (content): Merge conflict in drivers/gpu/drm/drm_syncobj.c Merging amdgpu/drm-next (21db6199f201 drm/amd/display: fix null-pointer dereference on edid reading) 145242ed6f3f ("drm/amd/display: Fix memory leak in dm_sw_fini()") 1d55183c2cd9 ("drm/amd/display: Fix potential null pointer dereference in dc_dmub_srv") 21db6199f201 ("drm/amd/display: fix null-pointer dereference on edid reading") 4af4d2c275ae ("drm/amd/display: Only allow dig mapping to pwrseq in new asic") b75a1da662eb ("drm/amd/display: fix input states translation error for dcn35 & dcn351") c9aef4f6c6d7 ("drm/amd/display: adjust few initialization order in dm") Merging drm-intel/for-linux-next (0be4e0a5203d drm/i915: Fix doc build issue on intel_cdclk.c) Merging drm-tegra/for-next (2429b3c529da drm/tegra: Avoid potential 32-bit integer overflow) Merging drm-msm/msm-next (ffa0c87f172b drm/msm/mdp5: drop global_state_lock) Merging drm-msm-lumag/msm-next-lumag (e3b1f369db5a drm/msm/dpu: Add X1E80100 support) Merging drm-xe/drm-xe-next (a9e483dda3ef drm/xe: Don't support execlists in xe_gt_tlb_invalidation layer) 0f688c0eb63a ("drm/xe: Return 2MB page size for compact 64k PTEs") 15f0e0c2c46d ("drm/xe: Add XE_VMA_PTE_64K VMA flag") 19adaccef8b2 ("drm/xe: Fix xe_vma_set_pte_size") bb619d71224e ("drm/xe: Fix modpost warning on xe_mocs kunit module") e5626eb80026 ("drm/xe/xe_gt_idle: Drop redundant newline in name") CONFLICT (content): Merge conflict in drivers/gpu/drm/xe/xe_exec_queue.c CONFLICT (content): Merge conflict in drivers/gpu/drm/xe/xe_exec_queue_types.h CONFLICT (content): Merge conflict in drivers/gpu/drm/xe/xe_vm.c CONFLICT (content): Merge conflict in drivers/gpu/drm/xe/xe_vm_types.h CONFLICT (content): Merge conflict in include/uapi/drm/xe_drm.h Merging etnaviv/etnaviv/next (c9959996a8fc drm/etnaviv: add sensitive state for PE_RT_ADDR_4_PIPE(3, 0|1) address) Merging fbdev/for-next (72fee6b0a3a4 fbdev: Restrict FB_SH_MOBILE_LCDC to SuperH) Merging regmap/for-next (cfe1cab458f0 Merge remote-tracking branch 'regmap/for-6.9' into regmap-next) Merging sound/for-next (a55bc334d3df ALSA: pcm_oss: ump: Use automatic cleanup of kfree()) Merging ieee1394/for-next (41ebb53b1bff firewire: core: fix build failure due to the caller of fw_csr_string()) Merging sound-asoc/for-next (51c4c1717a69 Merge remote-tracking branch 'asoc/for-6.9' into asoc-next) Merging modules/modules-next (d1909c022173 module: Don't ignore errors from set_memory_XX()) Merging input/next (d03f030115fe Input: gameport - make gameport_bus const) Merging block/for-next (571484af24f7 Merge branch 'for-6.9/block' into for-next) CONFLICT (content): Merge conflict in block/blk.h CONFLICT (content): Merge conflict in include/linux/sched.h Merging device-mapper/for-next (6006301c6a83 Merge branch 'dm-6.8' into for-next) Merging libata/for-next (c1bc6ed01c16 Merge remote-tracking branch 'libata/for-6.9' into HEAD) Merging pcmcia/pcmcia-next (1bec7691b327 pcmcia: ds: make pcmcia_bus_type const) Merging mmc/next (25e69172db8a mmc: davinci_mmc: Drop dangling variable) CONFLICT (content): Merge conflict in drivers/mmc/core/queue.c Merging mfd/for-mfd-next (ec0131916367 dt-bindings: mfd: Convert atmel-flexcom to json-schema) Merging backlight/for-backlight-next (3c40590fafd4 backlight: lm3630a: Use backlight_get_brightness helper in update_status) $ git reset --hard HEAD^ Merging next-20240223 version of backlight Merging battery/for-next (7b46b60944d7 power: supply: core: constify the struct device_type usage) Merging regulator/for-next (78e0d079ab38 Merge remote-tracking branch 'regulator/for-6.9' into regulator-next) Merging security/next (d4f294b33790 Automated merge of 'dev' into 'next') CONFLICT (content): Merge conflict in security/security.c Merging apparmor/apparmor-next (8ead196be219 apparmor: Fix memory leak in unpack_profile()) Merging integrity/next-integrity (85445b964290 integrity: eliminate unnecessary "Problem loading X.509 certificate" msg) Merging selinux/next (a1fc79343abb selinux: fix style issues in security/selinux/ss/symtab.c) Merging smack/next (69b6d71052b5 Smack: use init_task_smack() in smack_cred_transfer()) Merging tomoyo/master (0bb80ecc33a8 Linux 6.6-rc1) Merging tpmdd/next (27eaacc62ade tpm: tis_i2c: Add compatible string nuvoton,npct75x) Merging watchdog/master (41bccc98fb79 Linux 6.8-rc2) Merging iommu/next (43400fa1ca4c Merge branches 'iommu/fixes', 'arm/mediatek', 'arm/renesas', 'x86/amd' and 'core' into next) Merging audit/next (aa13b709084a audit: use KMEM_CACHE() instead of kmem_cache_create()) Merging devicetree/for-next (08a5b9fe7714 dt-bindings: vendor-prefixes: Add missing prefixes used in compatibles) CONFLICT (content): Merge conflict in Documentation/devicetree/bindings/trivial-devices.yaml Merging dt-krzk/for-next (8c82b4eef297 ARM: dts: sti: minor whitespace cleanup around '=') Merging mailbox/for-next (cd795fb0c352 mailbox: mtk-cmdq: Add CMDQ driver support for mt8188) Merging spi/for-next (8d742874e776 Merge remote-tracking branch 'spi/for-6.9' into spi-next) Merging tip/master (e7f108402128 Merge branch into tip/master: 'x86/tdx') CONFLICT (content): Merge conflict in kernel/workqueue.c Merging clockevents/timers/drivers/next (ec64db6955c5 dt-bindings: timer: add Ralink SoCs system tick counter) Merging edac/edac-for-next (22b6c326a81d Merge remote-tracking branches 'ras/edac-misc', 'ras/edac-drivers' and 'ras/edac-amd-atl' into edac-for-next) CONFLICT (content): Merge conflict in Documentation/index.rst Merging ftrace/for-next (a641f0533adb tracing: Decrement the snapshot if the snapshot trigger fails to register) Merging rcu/rcu/next (10395f8cfef8 tracing: Select new NEED_TASKS_RCU Kconfig option) CONFLICT (content): Merge conflict in Documentation/admin-guide/kernel-parameters.txt Merging kvm/next (0cbca1bf44a0 x86: irq: unconditionally define KVM interrupt vectors) Merging kvm-arm/next (e6af5cb22efe Merge branch kvm-arm64/misc into kvmarm/next) CONFLICT (content): Merge conflict in arch/arm64/kernel/cpufeature.c Applying: fix up for "arm64/sysreg: Add register fields for ID_AA64DFR1_EL1" Merging kvms390/next (00de073e2420 KVM: s390: selftest: memop: Fix undefined behavior) Merging kvm-ppc/topic/ppc-kvm (41bccc98fb79 Linux 6.8-rc2) Merging kvm-riscv/riscv_kvm_next (f072b272aa27 RISC-V: KVM: Use correct restricted types) Merging kvm-x86/next (b82879c81b4f Merge branch 'xen') CONFLICT (content): Merge conflict in arch/x86/kvm/svm/sev.c Merging xen-tip/linux-next (fa765c4b4aed xen/events: close evtchn after mapping cleanup) Merging percpu/for-next (2d9ad81ef935 Merge branch 'for-6.8-fixes' into for-next) Merging workqueues/for-next (43a567462aac Merge branch 'for-6.9' into for-next) Merging drivers-x86/for-next (c5211eacf332 platform/x86: ideapad-laptop: support Fn+R dual-function key) Merging chrome-platform/for-next (6613476e225e Linux 6.8-rc1) Merging chrome-platform-firmware/for-firmware-next (8a0a62941a04 firmware: coreboot: Replace tag with id table in driver struct) Merging hsi/for-next (3693760295e8 HSI: ssi_protocol: fix struct members kernel-doc warnings) Merging leds-lj/for-leds-next (3e7b2b9309cd leds: sgm3140: Add missing timer cleanup and flash gpio control) 5a436f4dadf1 ("leds: Introduce ExpressWire library") c7cbca7886a9 ("leds: ktd2692: Convert to use ExpressWire library") CONFLICT (content): Merge conflict in drivers/leds/flash/Kconfig Merging ipmi/for-next (296455ade1fd Merge tag 'char-misc-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc) Merging driver-core/driver-core-next (01aacda0b10e Merge tag 'sysfs_hidden_attribute_groups-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core into driver-core-next) Merging usb/usb-next (e89fbb5bc21a ASoC: Revert "ASoC: dt-bindings: Update example for enabling USB offload on SM8250") CONFLICT (content): Merge conflict in Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml CONFLICT (content): Merge conflict in drivers/usb/roles/class.c Merging thunderbolt/next (b4734507ac55 thunderbolt: Improve DisplayPort tunnel setup process to be more robust) Merging usb-serial/usb-next (54be6c6c5ae8 Linux 6.8-rc3) Merging tty/tty-next (1643281347f8 serial: pmac_zilog: Convert to platform remove callback returning void) Merging char-misc/char-misc-next (d4551c189d6e Merge tag 'iio-for-6.9a' of http://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next) Merging accel/habanalabs-next (570a7f66cc7a accel/habanalabs: modify pci health check) Merging coresight/next (c099fdd218a0 coresight: tpdm: Fix build break due to uninitialised field) Merging fastrpc/for-next (5169a077f22a misc: fastrpc: Pass proper arguments to scm call) Merging fpga/for-next (ff49b00e9621 fpga: dfl: make dfl_bus_type const) Merging icc/icc-next (6025a81ae63e Merge branch 'icc-cleanup' into icc-next) Merging iio/togreg (3cc5ebd3a2d6 iio: imu: bmi323: Add ACPI Match Table) Merging phy-next/next (00ca8a15dafa phy: constify of_phandle_args in xlate) CONFLICT (content): Merge conflict in drivers/phy/qualcomm/phy-qcom-qmp-usb.c Merging soundwire/next (81a7d0c4d059 soundwire: bus_type: make sdw_bus_type const) Merging extcon/extcon-next (16c6e3aff8d7 extcon: intel-mrfld: Don't shadow error from devm_extcon_dev_allocate()) Merging gnss/gnss-next (54be6c6c5ae8 Linux 6.8-rc3) Merging vfio/next (701ab935859f vfio/nvgrace-gpu: Add vfio pci variant module for grace hopper) CONFLICT (content): Merge conflict in MAINTAINERS Merging w1/for-next (d97d263132a6 w1: w1-gpio: Convert to platform remove callback returning void) Merging spmi/spmi-next (b85ea95d0864 Linux 6.7-rc1) Merging staging/staging-next (455c5e12a3b7 staging: gdm724x: constantify the struct device_type usage) Merging counter-next/counter-next (b6dce0452a02 counter: fix privdata alignment) Merging mux/for-next (44c026a73be8 Linux 6.4-rc3) Merging dmaengine/next (716141d366f4 dmaengine: of: constify of_phandle_args in of_dma_find_controller()) Merging cgroup/for-next (8d4c171f451d docs: cgroup-v1: add missing code-block tags) Merging scsi/for-next (d970d094663a Merge branch 'fixes' into for-next) Merging scsi-mkp/for-next (9f3dbcb5632d scsi: csiostor: Avoid function pointer casts) Merging vhost/linux-next (fd0b29af02bb Documentation: Add reconnect process for VDUSE) Merging rpmsg/for-next (929654e8f1ad Merge branches 'rpmsg-next' and 'rproc-next' into for-next) CONFLICT (content): Merge conflict in drivers/remoteproc/imx_dsp_rproc.c Merging gpio/for-next (0bb80ecc33a8 Linux 6.6-rc1) Merging gpio-brgl/gpio/for-next (7bb5f3a7ca88 gpio: sim: use for_each_hwgpio()) 4a7b0850fc7a ("dt-bindings: cros-ec: Add properties for GPIO controller") CONFLICT (content): Merge conflict in Documentation/userspace-api/index.rst $ git reset --hard HEAD^ Merging next-20240222 version of gpio-brgl CONFLICT (content): Merge conflict in Documentation/userspace-api/index.rst [master 3277349afadd] next-20240222/gpio-brgl Merging gpio-intel/for-next (6613476e225e Linux 6.8-rc1) Merging pinctrl/for-next (9a04a5769a6d Merge branch 'devel' into for-next) Merging pinctrl-intel/for-next (6613476e225e Linux 6.8-rc1) Merging pinctrl-renesas/renesas-pinctrl (a6f06b909fee pinctrl: renesas: Allow the compiler to optimize away sh_pfc_pm) Merging pinctrl-samsung/for-next (6613476e225e Linux 6.8-rc1) Merging pwm/pwm/for-next (ee230c19e174 pwm: dwc: simplify error handling) Merging ktest/for-next (7dc8e24f0e09 ktest: Restore stty setting at first in dodie) Merging kselftest/next (ae638551ab64 selftests/resctrl: Add non-contiguous CBMs CAT test) Merging kunit/test (6613476e225e Linux 6.8-rc1) Merging kunit-next/kunit (717083f66450 kunit: make kunit_bus_type const) Merging livepatching/for-next (602bf1830798 Merge branch 'for-6.7' into for-next) Merging rtc/rtc-next (6613476e225e Linux 6.8-rc1) Merging nvdimm/libnvdimm-for-next (bc22374c96d9 device-dax: make dax_bus_type const) Merging at24/at24/for-next (6613476e225e Linux 6.8-rc1) Merging ntb/ntb-next (9341b37ec17a ntb_perf: Fix printk format) Merging seccomp/for-next/seccomp (56af94aace8a samples: user-trap: fix strict-aliasing warning) Merging fsi/next (c5eeb63edac9 fsi: Fix panic on scom file read) Merging slimbus/for-next (6e8ba95e17ee slimbus: core: Remove usage of the deprecated ida_simple_xx() API) Merging nvmem/for-next (6b475e23544a nvmem: meson-efuse: fix function pointer type mismatch) Merging xarray/main (2a15de80dd0f idr: fix param name in idr_alloc_cyclic() doc) Merging hyperv/hyperv-next (ce9ecca0238b Linux 6.6-rc2) Merging auxdisplay/for-next (34ddc83dc720 auxdisplay: linedisp: Add support for overriding character mapping) Merging kgdb/kgdb/for-next (4f41d30cd6dc kdb: Fix a potential buffer overflow in kdb_local()) Merging hmm/hmm (6613476e225e Linux 6.8-rc1) Merging cfi/cfi/next (06c2afb862f9 Linux 6.5-rc1) Merging mhi/mhi-next (f0397e27d120 Revert "bus: mhi: core: Add support for reading MHI info from device") Merging memblock/for-next (2159bd4e9057 memblock: Return NUMA_NO_NODE instead of -1 to improve code readability) Merging cxl/next (73bf93edeeea cxl/core: use sysfs_emit() for attr's _show()) Merging zstd/zstd-next (3f832dfb8a8e zstd: fix g_debuglevel export warning) Merging efi/next (841c35169323 Linux 6.8-rc4) Merging unicode/for-next (367122c529f3 libfs: Attempt exact-match comparison first during casefolded lookup) Merging slab/slab/for-next (360cda4b91b8 Merge branch 'slab/for-6.9/optimize-get-freelist' into slab/for-next) Merging random/master (1f719a2f3fa6 Merge tag 'net-6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net) Merging landlock/next (28c2be13a1e0 landlock: Document IOCTL support) Merging rust/rust-next (e944171070b6 rust: add `container_of!` macro) CONFLICT (content): Merge conflict in Documentation/process/changes.rst Merging sysctl/sysctl-next (4f1136a55dc8 scripts: check-sysctl-docs: handle per-namespace sysctls) Merging execve/for-next/execve (d3f0d7bbaefd exec: Delete unnecessary statements in remove_arg_zero()) Merging bitmap/bitmap-for-next (fd8ed16c2419 bitmap: Step down as a reviewer) Merging hte/for-next (b85ea95d0864 Linux 6.7-rc1) Merging kspp/for-next/kspp (c427b1a5e0f8 sparc: vdso: Disable UBSAN instrumentation) CONFLICT (content): Merge conflict in scripts/Makefile.lib Merging kspp-gustavo/for-next/kspp (6613476e225e Linux 6.8-rc1) Merging nolibc/nolibc (6613476e225e Linux 6.8-rc1) Merging tsm/tsm-next (f4738f56d1dc virt: tdx-guest: Add Quote generation support using TSM_REPORTS) Merging iommufd/for-next (6613476e225e Linux 6.8-rc1) Merging header_cleanup/header_cleanup (5f4c01f1e3c7 spinlock: Fix failing build for PREEMPT_RT)
{ "author": "Stephen Rothwell <sfr@canb.auug.org.au>", "date": "Mon, 26 Feb 2024 17:55:09 +1100", "is_openbsd": false, "thread_id": "759447c5-a2bd-445f-a245-8772f9ea1316@sirena.org.uk.mbox.gz" }
lkml_critique
lkml
Hi all, I have created today's linux-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/sfr/linux-next.git. You can see which trees have been included by looking in the Next/Trees file in the source. There are also quilt-import.log and merge.log files in the Next directory. Between each merge, the tree was built with allmodconfig for both powerpc and x86_64. There were only two minor merge problems. We are up to 34 trees, more are welcome (even if they are currently empty). Status of my local build tests is at http://kisskb.ellerman.id.au/kisskb/branch/9/. We have added arm and m68k to the architectures built. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au
null
null
null
linux-next: Tree for Feb 26
Hi all, Changes since 20250225: The mm tree gained a build failure for which I applied a patch. The drm-xe tree gained a conflict against the drm-intel tree. The devicetree tree gained a conflict against Linus' tree. Non-merge commits (relative to Linus' tree): 5854 6515 files changed, 328931 insertions(+), 125175 deletions(-) ---------------------------------------------------------------------------- I have created today's linux-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git (patches at http://www.kernel.org/pub/linux/kernel/next/ ). If you are tracking the linux-next tree using git, you should not use "git pull" to do so as that will try to merge the new linux-next release with the old one. You should use "git fetch" and checkout or reset to the new master. You can see which trees have been included by looking in the Next/Trees file in the source. There is also the merge.log file in the Next directory. Between each merge, the tree was built with a ppc64_defconfig for powerpc, an allmodconfig for x86_64, a multi_v7_defconfig for arm and a native build of tools/perf. After the final fixups (if any), I do an x86_64 modules_install followed by builds for x86_64 allnoconfig, powerpc allnoconfig (32 and 64 bit), ppc44x_defconfig, allyesconfig and pseries_le_defconfig and i386, arm64, s390, sparc and sparc64 defconfig and htmldocs. And finally, a simple boot test of the powerpc pseries_le_defconfig kernel in qemu (with and without kvm enabled). Below is a summary of the state of the merge. I am currently merging 383 trees (counting Linus' and 147 trees of bug fix patches pending for the current release). Stats about the size of the tree over time can be seen at http://neuling.org/linux-next-size.html . Thanks to Randy Dunlap for doing many randconfig builds. And to Paul Gortmaker for triage and bug fixes. -- Cheers, Stephen Rothwell $ git checkout master $ git reset --hard stable Merging origin/master (cc8a0934d099 Merge tag 'for-6.14-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux) Merging fixes/fixes (fac04efc5c79 Linux 6.13-rc2) Merging ext4-fixes/fixes (4bbf9020becb Linux 6.13-rc4) Merging vfs-brauner-fixes/vfs.fixes (425e3e3bd62c nsfs: remove d_op->d_delete) Merging fscrypt-current/for-current (2014c95afece Linux 6.14-rc1) Merging fsverity-current/for-current (2014c95afece Linux 6.14-rc1) Merging btrfs-fixes/next-fixes (db9dad9dfa9a Merge branch 'misc-6.14' into next-fixes) Merging vfs-fixes/fixes (60a600243244 hostfs: fix string handling in __dentry_name()) Merging erofs-fixes/fixes (6422cde1b0d5 erofs: use buffered I/O for file-backed mounts by default) Merging nfsd-fixes/nfsd-fixes (4990d098433d NFSD: Fix CB_GETATTR status fix) Merging v9fs-fixes/fixes/next (2014c95afece Linux 6.14-rc1) Merging overlayfs-fixes/ovl-fixes (228a1157fb9f Merge tag '6.13-rc-part1-SMB3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6) Merging bcachefs/for-next (ab215af397f4 Documentation: bcachefs: SubmittingPatches: Convert footnotes to reST syntax) Merging fscrypt/for-next (75eb8b9410ee Revert "fscrypt: relax Kconfig dependencies for crypto API algorithms") Merging btrfs/for-next (f9d3870b9957 Merge branch 'for-next-next-v6.14-20250221' into for-next-20250221) Merging ceph/master (3981be13ec1b ceph: exchange hardcoded value on NAME_MAX) Merging cifs/for-next (c9557b766789 smb: client: Fix netns refcount imbalance causing leaks and use-after-free) Merging configfs/for-next (84147f4e84c4 configfs: improve item creation performance) Merging ecryptfs/next (fba133a34118 ecryptfs: Remove unused declartion ecryptfs_fill_zeros()) Merging dlm/next (8e2bad543eca dlm: prevent NPD when writing a positive value to event_done) Merging erofs/dev (0fb25a2943e1 erofs: clean up header parsing for ztailpacking and fragments) Merging exfat/dev (dda0407a2026 exfat: short-circuit zero-byte writes in exfat_file_write_iter) Merging exportfs/exportfs-next (adc218676eef Linux 6.12) Merging ext3/for_next (98f18c76c2c3 ext2: create ext2_msg_fc for use during parsing) Merging ext4/dev (9e28059d5664 ext4: introduce linear search for dentries) Merging f2fs/dev (a907f3a68ee2 f2fs: add a sysfs entry to reclaim POSIX_FADV_NOREUSE pages) Merging fsverity/for-next (a19bcde49998 Revert "fsverity: relax build time dependency on CRYPTO_SHA256") Merging fuse/for-next (150b838b03e8 fuse: optmize missing FUSE_LINK support) Merging gfs2/for-next (1259f36ab395 gfs2: Fix additional unlikely request cancelation race) Merging jfs/jfs-next (0d250b1c5248 fs/jfs: consolidate sanity checking in dbMount) Merging ksmbd/ksmbd-for-next (a7a8a72c7c30 ksmbd: Use str_read_write() and str_true_false() helpers) Merging nfs/linux-next (0ad2507d5d93 Linux 6.14-rc3) Merging nfs-anna/linux-next (9084ed79ddaa lsm,nfs: fix memory leak of lsm_context) Merging nfsd/nfsd-next (f194595b9bd7 nfsd: eliminate special handling of NFS4ERR_SEQ_MISORDERED) Merging ntfs3/master (b432163ebd15 fs/ntfs3: Update inode->i_mapping->a_ops on compression state) Merging orangefs/for-next (96319dacaf15 orangefs: Constify struct kobj_type) Merging overlayfs/overlayfs-next (c8b359dddb41 ovl: Filter invalid inodes with missing lookup function) Merging ubifs/next (69146a8c893f ubi: ubi_get_ec_info: Fix compiling error 'cast specifies array type') Merging v9fs/9p-next (a22a29655c42 net/9p/fd: support ipv6 for trans=tcp) Merging v9fs-ericvh/ericvh/for-next (2014c95afece Linux 6.14-rc1) Merging xfs/for-next (2d873efd174b xfs: flush inodegc before swapon) Merging zonefs/for-next (c4b3c1332f55 zonefs: add support for FS_IOC_GETFSSYSFSPATH) Merging vfs-brauner/vfs.all (de048109361a Merge branch 'vfs-6.15.mount.namespace' into vfs.all) Merging vfs/for-next (2e72b1e0aac2 Merge branch 'work.d_revalidate' into for-next) Merging mm-hotfixes/mm-hotfixes-unstable (c94fec86ecd0 mm: page_isolation: avoid calling folio_hstate() without hugetlb_lock) Merging fs-current (df5c462dfa25 Merge branch 'next-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git) Merging kbuild-current/fixes (b28fb1f2ef45 modpost: Fix a few typos in a comment) Merging arc-current/for-curr (78d4f34e2115 Linux 6.13-rc3) Merging arm-current/fixes (0c66c6f4e21c ARM: 9359/1: flush: check if the folio is reserved for no-mapping addresses) Merging arm64-fixes/for-next/fixes (446a8351f160 arm64: rust: clean Rust 1.85.0 warning using softfloat target) Merging arm-soc-fixes/arm/fixes (e31e3f6c0ce4 soc: loongson: loongson2_guts: Add check for devm_kstrdup()) Merging davinci-current/davinci/for-current (2014c95afece Linux 6.14-rc1) Merging drivers-memory-fixes/fixes (304e6c02b76f memory: omap-gpmc: drop no compatible check) Merging sophgo-fixes/fixes (2014c95afece Linux 6.14-rc1) Merging m68k-current/for-linus (bb2e0fb1e6aa m68k: libgcc: Fix lvalue abuse in umul_ppmm()) Merging powerpc-fixes/fixes (eff2eb592efd cxl: Fix cross-reference in documentation and add deprecation warning) Merging s390-fixes/fixes (c3a589fd9fcb s390/boot: Fix ESSA detection) Merging net/main (bc50682128bd MAINTAINERS: socket timestamping: add Jason Xing as reviewer) Merging bpf/master (319fc77f8f45 Merge tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf) Merging ipsec/master (0aae2867aa60 xfrm_output: Force software GSO only in tunnel mode) Merging netfilter/main (1438f5d07b9a rtnetlink: fix netns leak with rtnl_setlink()) Merging ipvs/main (1438f5d07b9a rtnetlink: fix netns leak with rtnl_setlink()) Merging wireless/for-next (3640dbc1f75c wifi: iwlwifi: Fix A-MSDU TSO preparation) Merging ath/for-current (3640dbc1f75c wifi: iwlwifi: Fix A-MSDU TSO preparation) Merging wpan/master (8ce4f287524c net: libwx: fix firmware mailbox abnormal return) Merging rdma-fixes/for-rc (b66535356a48 RDMA/bnxt_re: Fix the page details for the srq created by kernel consumers) Merging sound-current/for-linus (9e7c6779e353 ALSA: hda/realtek: Fix wrong mic setup for ASUS VivoBook 15) Merging sound-asoc-fixes/for-linus (9da0ed4a8502 ASoC: Intel: don't check number of sdw links when set) Merging regmap-fixes/for-linus (32ffed055dce regmap-irq: Add missing kfree()) Merging regulator-fixes/for-linus (d082ecbc71e9 Linux 6.14-rc4) Merging spi-fixes/for-linus (3d7a20f9ba7b MAINTAINERS: add tambarus as R for Samsung SPI) Merging pci-current/for-linus (2014c95afece Linux 6.14-rc1) Merging driver-core.current/driver-core-linus (78eb41f518f4 drivers: core: fix device leak in __fw_devlink_relax_cycles()) Merging tty.current/tty-linus (0ad2507d5d93 Linux 6.14-rc3) Merging usb.current/usb-linus (c783e1258f29 usb: gadget: Fix setting self-powered state on suspend) Merging usb-serial-fixes/usb-linus (0ad2507d5d93 Linux 6.14-rc3) Merging phy/fixes (55f1a5f7c97c phy: tegra: xusb: reset VBUS & ID OVERRIDE) Merging staging.current/staging-linus (2014c95afece Linux 6.14-rc1) Merging iio-fixes/fixes-togreg (cc2c3540d947 iio: filter: admv8818: Force initialization of SDO) Merging counter-current/counter-current (2014c95afece Linux 6.14-rc1) Merging char-misc.current/char-misc-linus (92527e473911 ntsync: Check wait count based on byte size.) Merging soundwire-fixes/fixes (2014c95afece Linux 6.14-rc1) Merging thunderbolt-fixes/fixes (d082ecbc71e9 Linux 6.14-rc4) Merging input-current/for-linus (d85862ccca45 Input: i8042 - swap old quirk combination with new quirk for more devices) Merging crypto-current/master (9d4f8e54cef2 rhashtable: Fix rhashtable_try_insert test) Merging vfio-fixes/for-linus (09dfc8a5f2ce vfio/pci: Fallback huge faults for unaligned pfn) Merging kselftest-fixes/fixes (a64dcfb451e2 Linux 6.14-rc2) Merging dmaengine-fixes/fixes (76ed9b7d177e dmaengine: tegra210-adma: check for adma max page) CONFLICT (content): Merge conflict in drivers/dma/tegra210-adma.c Merging backlight-fixes/for-backlight-fixes (1613e604df0c Linux 6.10-rc1) Merging mtd-fixes/mtd/fixes (1dbf60277e9b Merge tag 'spi-nor/fixes-for-6.14-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux into mtd/fixes) Merging mfd-fixes/for-mfd-fixes (68f860426d50 mfd: axp20x: AXP717: Fix missing IRQ status registers range) Merging v4l-dvb-fixes/fixes (2014c95afece Linux 6.14-rc1) Merging reset-fixes/reset/fixes (2014c95afece Linux 6.14-rc1) Merging mips-fixes/mips-fixes (0ad2507d5d93 Linux 6.14-rc3) Merging at91-fixes/at91-fixes (2014c95afece Linux 6.14-rc1) Merging omap-fixes/fixes (c2a5f8c4f28f ARM: OMAP1: select CONFIG_GENERIC_IRQ_CHIP) Merging kvm-fixes/master (e93d78e05abb Merge tag 'kvm-riscv-fixes-6.14-1' of https://github.com/kvm-riscv/linux into HEAD) Merging kvms390-fixes/master (e376d958871c KVM: s390: selftests: Add has device attr check to uc_attr_mem_limit selftest) Merging hwmon-fixes/hwmon (5797c04400ee hwmon: (peci/dimmtemp) Do not provide fake thresholds data) Merging nvdimm-fixes/libnvdimm-fixes (265e98f72bac acpi: nfit: vmalloc-out-of-bounds Read in acpi_nfit_ctl) Merging cxl-fixes/fixes (2014c95afece Linux 6.14-rc1) Merging dma-mapping-fixes/for-linus (78b2770c935f dma-mapping: fix tracing dma_alloc/free with vmalloc'd memory) Merging drivers-x86-fixes/fixes (b3e127dacad6 platform/x86: thinkpad_acpi: Fix registration of tpacpi platform driver) Merging samsung-krzk-fixes/fixes (2014c95afece Linux 6.14-rc1) Merging pinctrl-samsung-fixes/fixes (2014c95afece Linux 6.14-rc1) Merging devicetree-fixes/dt/linus (038e33fcd40e dt-bindings: display: Add powertip,{st7272|hx8238a} as DT Schema description) Merging dt-krzk-fixes/fixes (2014c95afece Linux 6.14-rc1) Merging scsi-fixes/fixes (f27a95845b01 scsi: ufs: core: bsg: Fix crash when arpmb command fails) Merging drm-fixes/drm-fixes (d082ecbc71e9 Linux 6.14-rc4) Merging drm-intel-fixes/for-linux-next-fixes (d082ecbc71e9 Linux 6.14-rc4) Merging mmc-fixes/fixes (3e68abf2b9ce mmc: mtk-sd: Fix register settings for hs400(es) mode) Merging rtc-fixes/rtc-fixes (2014c95afece Linux 6.14-rc1) Merging gnss-fixes/gnss-linus (0ad2507d5d93 Linux 6.14-rc3) Merging hyperv-fixes/hyperv-fixes (7241c886a717 fbdev: hyperv_fb: iounmap() the correct memory when removing a device) Merging risc-v-fixes/fixes (245aece3750d MAINTAINERS: Add myself as a riscv reviewer) Merging riscv-dt-fixes/riscv-dt-fixes (1b133129ad6b riscv: dts: starfive: Fix a typo in StarFive JH7110 pin function definitions) Merging riscv-soc-fixes/riscv-soc-fixes (2014c95afece Linux 6.14-rc1) Merging fpga-fixes/fixes (1613e604df0c Linux 6.10-rc1) Merging spdx/spdx-linus (2014c95afece Linux 6.14-rc1) Merging gpio-brgl-fixes/gpio/for-current (d082ecbc71e9 Linux 6.14-rc4) Merging gpio-intel-fixes/fixes (2014c95afece Linux 6.14-rc1) Merging pinctrl-intel-fixes/fixes (2014c95afece Linux 6.14-rc1) Merging auxdisplay-fixes/fixes (2014c95afece Linux 6.14-rc1) Merging kunit-fixes/kunit-fixes (a64dcfb451e2 Linux 6.14-rc2) Merging memblock-fixes/fixes (180bbad69864 arch_numa: Restore nid checks before registering a memblock with a node) Merging renesas-fixes/fixes (124f4f1a1869 MAINTAINERS: Re-add cancelled Renesas driver sections) CONFLICT (content): Merge conflict in MAINTAINERS Merging perf-current/perf-tools (42367eca7604 tools: Remove redundant quiet setup) Merging efi-fixes/urgent (cb6ae457bc6a efivarfs: Defer PM notifier registration until .fill_super) Merging battery-fixes/fixes (98380110bd48 power: supply: axp20x_battery: Fix fault handling for AXP717) Merging iommufd-fixes/for-rc (2ca704f55e22 iommu/arm-smmu-v3: Improve uAPI comment for IOMMU_HW_INFO_TYPE_ARM_SMMUV3) Merging rust-fixes/rust-fixes (0ad2507d5d93 Linux 6.14-rc3) Merging w1-fixes/fixes (2014c95afece Linux 6.14-rc1) Merging pmdomain-fixes/fixes (a64dcfb451e2 Linux 6.14-rc2) Merging i2c-host-fixes/i2c/i2c-host-fixes (0ad2507d5d93 Linux 6.14-rc3) Merging sparc-fixes/for-linus (6613476e225e Linux 6.8-rc1) Merging clk-fixes/clk-fixes (2014c95afece Linux 6.14-rc1) Merging pwrseq-fixes/pwrseq/for-current (2014c95afece Linux 6.14-rc1) Merging thead-dt-fixes/thead-dt-fixes (40384c840ea1 Linux 6.13-rc1) Merging ftrace-fixes/ftrace/fixes (2fa6a01345b5 tracing: Fix memory leak when reading set_event file) Merging ring-buffer-fixes/ring-buffer/fixes (97937834ae87 ring-buffer: Update pages_touched to reflect persistent buffer content) Merging trace-fixes/trace/fixes (60295b944ff6 tracing: gfp: Fix the GFP enum values shown for user space tracing tools) Merging tracefs-fixes/tracefs/fixes (8b55572e5180 tracing/selftests: Add tracefs mount options test) Merging spacemit-fixes/fixes (2014c95afece Linux 6.14-rc1) Merging tip-fixes/tip/urgent (34458e90620c Merge branch into tip/master: 'x86/urgent') Merging slab-fixes/slab/for-next-fixes (b7ffecbe198e memcg: slub: fix SUnreclaim for post charged objects) Merging drm-msm-fixes/msm-fixes (73f69c6be2a9 drm/msm/dsi/phy: Do not overwite PHY_CMN_CLK_CFG1 when choosing bitclk source) Merging uml-fixes/fixes (96178631c3f5 um: convert irq_lock to raw spinlock) Merging drm-misc-fixes/for-linux-next-fixes (8ec43c58d3be drm/vkms: Round fixp2int conversion in lerp_u16) Merging linus/for-next (ffd294d346d1 Linux 6.13) Merging mm-stable/mm-stable (0ad2507d5d93 Linux 6.14-rc3) Merging mm-nonmm-stable/mm-nonmm-stable (0ad2507d5d93 Linux 6.14-rc3) Merging mm/mm-everything (9048c156e790 foo) Merging kbuild/for-next (a77b570b6c3f modpost: use strstarts() to clean up parse_source_files()) Merging clang-format/clang-format (c147f663b6a5 clang-format: Update with v6.11-rc1's `for_each` macro list) Merging perf/perf-tools-next (c40aa8d98db6 perf report: Fix sample number stats for branch entry mode) Merging compiler-attributes/compiler-attributes (98f7e32f20d2 Linux 6.11) Merging dma-mapping/for-next (aef7ee7649e0 dma-debug: fix physical address calculation for struct dma_debug_entry) Merging asm-generic/master (0af8e32343f8 empty include/asm-generic/vga.h) Merging alpha/alpha-next (1523226edda5 alpha: Use str_yes_no() helper in pci_dac_dma_supported()) Merging arm/for-next (f520fab580c9 ARM: 9440/1: cacheinfo fix format field mask) Merging arm64/for-next/core (a1c24ab82279 Merge branch 'for-next/el2-enable-feat-pmuv3p9' into for-next/core) Merging arm-perf/for-next/perf (ba113ecad81a perf docs: arm_spe: Document new discard mode) Merging arm-soc/for-next (e31e3f6c0ce4 soc: loongson: loongson2_guts: Add check for devm_kstrdup()) Merging amlogic/for-next (953913df9c3a Merge branch 'v6.15/arm64-dt' into for-next) Merging asahi-soc/asahi-soc/for-next (ef3903f59a49 Merge branch 'asahi-soc/soc' into asahi-soc/for-next) Merging aspeed/for-next (3540adcccc71 ARM: dts: aspeed: yosemite4: adjust secondary flash name) Merging at91/at91-next (22ae29e60958 Merge branch 'at91-dt' into at91-next) Merging broadcom/next (bdac656f1bb5 Merge branch 'devicetree/fixes' into next) Merging davinci/davinci/for-next (58abc69e479c ARM: dts: ti: davinci: Align GPIO hog name with bindings) Merging drivers-memory/for-next (b9c791c65ced Merge branch 'mem-ctrl-next' into for-next) Merging imx-mxs/for-next (a76206a60d15 Merge branch 'imx/dt64' into for-next) Merging mediatek/for-next (7c597239973b Merge branch 'v6.14-next/dts64' into for-next) Merging mvebu/for-next (960766b45fa2 arm64: dts: marvell: Add missing board compatible for IEI-Puzzle-M801) Merging omap/for-next (065f3bd4f22b Merge branch 'omap-for-v6.15/dt' into tmp/omap-next-20250205.163245) Merging qcom/for-next (e1ea406aaa19 Merge branches 'arm64-defconfig-for-6.15', 'arm64-for-6.15', 'clk-for-6.15', 'drivers-fixes-for-6.14' and 'drivers-for-6.15' into for-next) Merging renesas/next (b91c46c79497 Merge branches 'renesas-arm-defconfig-for-v6.15', 'renesas-arm-soc-for-v6.15', 'renesas-drivers-for-v6.15', 'renesas-dt-bindings-for-v6.15' and 'renesas-dts-for-v6.15' into renesas-next) Merging reset/reset/next (2014c95afece Linux 6.14-rc1) Merging rockchip/for-next (4e09afea6eb9 Merge branch 'v6.15-armsoc/dts64' into for-next) Merging samsung-krzk/for-next (db9af58db84e Merge branch 'next/dt64' into for-next) Merging scmi/for-linux-next (a3c7c02d3db2 Merge branches 'for-next/scmi/updates' and 'for-next/ffa/updates' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into for-linux-next) Merging sophgo/for-next (f047a9285f9f riscv: sophgo: dts: add cooling maps for Milk-V Pioneer) Merging spacemit/for-next (5b90a3d6092d riscv: dts: spacemit: Add Milk-V Jupiter board device tree) Merging stm32/stm32-next (8c6d469f5249 ARM: dts: stm32: lxa-fairytux2: add Linux Automation GmbH FairyTux 2) Merging sunxi/sunxi/for-next (e2d0b639a4d9 Merge branch 'sunxi/clk-for-6.15' into sunxi/for-next) Merging tee/next (a7562ff02879 Merge branch 'optee_for_v6.14' into next) Merging tegra/for-next (0a891b9fcd9b Merge branch for-6.14/arm64/dt into for-next) Merging thead-dt/thead-dt-for-next (c95c1362e5bc riscv: dts: thead: Add mailbox node) Merging ti/ti-next (c7691aec5e99 arm64: defconfig: Enable TISCI Interrupt Router and Aggregator) Merging xilinx/for-next (d6ccf528cb3c Merge branch 'zynqmp/dt' into for-next) Merging clk/clk-next (2014c95afece Linux 6.14-rc1) Merging clk-imx/for-next (48806be08636 clk: imx: Apply some clks only for i.MX93) Merging clk-renesas/renesas-clk (9b12504e8c8c clk: renesas: r9a09g047: Add CANFD clocks and resets) Merging csky/linux-next (2b48804336be csky: fix csky_cmpxchg_fixup not working) Merging loongarch/loongarch-next (3011b29ec5a3 LoongArch: KVM: Set host with kernel mode when switch to VM mode) Merging m68k/for-next (723be3c6ab31 m68k: sun3: Fix DEBUG_MMU_EMU build) Merging m68knommu/for-next (63014a9e119f m68k: mm: Replace deprecated strncpy() with strscpy()) Merging microblaze/next (920354d7818b microblaze: Use of_property_present() for non-boolean properties) Merging mips/mips-next (e64d19ed82fd mips: dts: ralink: mt7620a: update system controller node and its consumers) Merging openrisc/for-next (ea1413e5b53a rseq/selftests: Add support for OpenRISC) Merging parisc-hd/for-next (4e3ff3c5854f parisc: Remove memcpy_fromio) Merging powerpc/next (6aa989ab2bd0 powerpc/pseries/iommu: memory notifier incorrectly adds TCEs for pmemory) Merging risc-v/for-next (2014c95afece Linux 6.14-rc1) Merging riscv-dt/riscv-dt-for-next (38818f7c9c17 riscv: dts: starfive: jh7110-pine64-star64: enable USB 3.0 port) Merging riscv-soc/riscv-soc-for-next (2014c95afece Linux 6.14-rc1) Merging s390/for-next (aa6b9c1da333 Merge branch 'features' into for-next) Merging sh/for-next (2014c95afece Linux 6.14-rc1) Merging sparc/for-next (2cec2c4dc90c sparc/irq: Remove unneeded if check in sun4v_cookie_only_virqs()) Merging uml/next (2d2b61ae38bd um: Remove unused asm/archparam.h header) Merging xtensa/xtensa-for-next (dbef257ab7fa xtensa: ptrace: Remove zero-length alignment array) Merging fs-next (04618462f1ff Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git) Merging printk/for-next (9022df7f5e05 Merge branch 'for-6.14-cpu_sync-fixup' into for-next) Merging pci/next (3bdee909e45d Merge branch 'pci/misc') Merging pstore/for-next/pstore (5674609535ba pstore: Change kmsg_bytes storage size to u32) Merging hid/for-next (8fabf47931ed Merge branch 'for-6.15/bpf' into for-next) Merging i2c/i2c/for-next (ef8c53714894 Merge branch 'i2c/for-current' into i2c/for-next) Merging i2c-host/i2c/i2c-host (3c59e2039afc i2c: amd-asf: Set cmd variable when encountering an error) Merging i3c/i3c/next (a892ee4cf22a i3c: master: svc: Flush FIFO before sending Dynamic Address Assignment(DAA)) Merging dmi/dmi-for-next (4d1b28a8119c firmware: dmi: Add info message for number of populated and total memory slots) Merging hwmon-staging/hwmon-next (8df0f002827e hwmon: (xgene-hwmon) use appropriate type for the latency value) Merging jc_docs/docs-next (76a6782284df Documentation: input: Add section pertaining to polled input devices) Merging v4l-dvb/next (d98e9213a768 media: visl: Fix ERANGE error when setting enum controls) Merging v4l-dvb-next/master (b36c41c51e9d media: atomisp: set lock before calling vb2_queue_init()) Merging pm/linux-next (42bb5ab05934 Merge branch 'pm-sleep' into linux-next) Merging cpufreq-arm/cpufreq/arm/linux-next (f2d32942026c cpufreq: enable 1200Mhz clock speed for armada-37xx) Merging cpupower/cpupower (80d3175a7e07 cpupower: monitor: Exit with error status if execvp() fail) Merging devfreq/devfreq-next (f3253b23535f PM / devfreq: exynos: remove unused function parameter) Merging pmdomain/next (36ccabe59dda pmdomain: Merge branch rockchip into next) Merging opp/opp/linux-next (2014c95afece Linux 6.14-rc1) Merging thermal/thermal/linux-next (ecb642900deb dt-bindings: thermal: Correct indentation and style in DTS example) Merging rdma/for-next (ba7fbaa6a83e RDMA/hfi1: Remove unused one_qsfp_write) Merging net-next/main (287044abff82 sctp: Remove unused payload from sctp_idatahdr) CONFLICT (content): Merge conflict in drivers/net/ethernet/cadence/macb_main.c Merging bpf-next/for-next (d806176814b4 Merge branch 'bpf-next/net' into for-next) Merging ipsec-next/master (9d381c77087b Merge branch 'Support-PMTU-in-tunnel-mode-for-packet-offload') Merging mlx5-next/mlx5-next (80df31f384b4 net/mlx5: Change POOL_NEXT_SIZE define value and make it global) Merging netfilter-next/main (4e41231249f4 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue) Merging ipvs-next/main (4e41231249f4 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue) Merging bluetooth/master (a4ce2f1cceba Bluetooth: Add check for mgmt_alloc_skb() in mgmt_device_connected()) Merging wireless-next/for-next (c61da149b9c2 Merge tag 'rtw-next-2025-02-10-v2' of https://github.com/pkshih/rtw) Merging ath-next/for-next (e180a01bf2c4 wifi: ath12k: Add NULL check to validate tpc_stats) Merging wpan-next/master (3e5908172c05 Merge tag 'ieee802154-for-net-next-2025-01-03' of git://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan-next) Merging wpan-staging/staging (3e5908172c05 Merge tag 'ieee802154-for-net-next-2025-01-03' of git://git.kernel.org/pub/scm/linux/kernel/git/wpan/wpan-next) Merging mtd/mtd/next (3f930a52d715 mtd: capture device name setting failure when adding mtd) Merging nand/nand/next (1db50b96b059 mtd: rawnand: qcom: finish converting register to FIELD_PREP) Merging spi-nor/spi-nor/next (03e7bb864d9a mtd: spi-nor: use scope-based mutex cleanup helpers) Merging crypto/master (b9874a66e404 crypto: ahash - Set default reqsize from ahash_alg) Merging drm/drm-next (fb51bf025519 Merge tag 'v6.14-rc4' into drm-next) Merging drm-exynos/for-linux-next (81a50378559b drm/exynos: Remove unnecessary checking) Merging drm-misc/for-linux-next (72d0af4accd9 drm/msm/dp: Add support for LTTPR handling) Merging amdgpu/drm-next (dab993bf1513 drm/amdgpu: increase AMDGPU_MAX_RINGS) CONFLICT (content): Merge conflict in drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c Merging drm-intel/for-linux-next (0159e311772a drm/i915/dp_mst: Fix encoder HW state readout for UHBR MST) CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/display/intel_dp.c CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/display/intel_dp_mst.c CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/i915_reg.h Merging drm-msm/msm-next (72d0af4accd9 drm/msm/dp: Add support for LTTPR handling) Merging drm-msm-lumag/msm-next-lumag (9262a1796935 drm/msm/dpu: rate limit snapshot capture for mmu faults) Merging drm-xe/drm-xe-next (35359c36356a drm/xe: Stop ignoring errors from xe_ttm_sys_mgr_init()) CONFLICT (content): Merge conflict in drivers/gpu/drm/xe/display/xe_display.c CONFLICT (content): Merge conflict in drivers/gpu/drm/xe/xe_gt_sriov_pf.c Merging etnaviv/etnaviv/next (6bde14ba5f7e drm/etnaviv: add optional reset support) Merging fbdev/for-next (c454bc716854 fbcon: Use correct erase colour for clearing in fbcon) Merging regmap/for-next (14b33926f576 Merge remote-tracking branch 'regmap/for-6.15' into regmap-next) Merging sound/for-next (0f1f26c59196 ALSA: arm: aaci: Constify amba_id table) Merging ieee1394/for-next (1c745720bec2 drivers: firewire: firewire-cdev.h: fix identation on a kernel-doc markup) Merging sound-asoc/for-next (0bd70b51f7a0 Merge remote-tracking branch 'asoc/for-6.15' into asoc-next) Merging modules/modules-next (afa92869776a params: Annotate struct module_param_attrs with __counted_by()) Merging input/next (7f7573bd4f37 Input: pm8941-pwrkey - fix dev_dbg() output in pm8941_pwrkey_irq()) Merging block/for-next (c77a2bf5fca6 Merge branch 'for-6.15/block' into for-next) Merging device-mapper/for-next (e678900df264 dm vdo indexer: reorder uds_request to reduce padding) Merging libata/for-next (91ec84f8eadd ata: libata-eh: Do not use ATAPI DMA for a device limited to PIO mode) Merging pcmcia/pcmcia-next (0630e3bc0e91 pcmcia: add missing MODULE_DESCRIPTION() macros) Merging mmc/next (cb71db3b2cea mmc: Merge branch fixes into next) Merging mfd/for-mfd-next (bd3152428217 dt-bindings: mfd: qcom,tcsr: Add compatible for MSM8937) Merging backlight/for-backlight-next (d1ebaf003a06 MAINTAINERS: Add entries for Apple DWI backlight controller) Merging battery/for-next (76d5fb0e58d8 power: supply: sc27xx: use devm_kmemdup_array()) Merging regulator/for-next (312a78aed357 Merge remote-tracking branch 'regulator/for-6.15' into regulator-next) Merging security/next (4632cd0ec3fa lsm: fix a missing security_uring_allowed() prototype) Merging apparmor/apparmor-next (3e45553acb14 apparmor: Remove unused variable 'sock' in __file_sock_perm()) Merging integrity/next-integrity (57a0ef02fefa ima: Reset IMA_NONACTION_RULE_FLAGS after post_setattr) Merging selinux/next (5fc80fb5b776 selinux: always check the file label in selinux_kernel_read_file()) Merging smack/next (a158a937d864 smack: recognize ipv4 CIPSO w/o categories) Merging tomoyo/master (09fbf3d50205 Merge tag 'tomoyo-pr-20250211' of git://git.code.sf.net/p/tomoyo/tomoyo) Merging tpmdd/next (34c26c5e1cb0 tpm: do not start chip while suspended) Merging watchdog/master (0ad2507d5d93 Linux 6.14-rc3) Merging iommu/next (1485fa1aadcd Merge branches 'apple/dart' and 's390' into next) Merging audit/next (2014c95afece Linux 6.14-rc1) Merging devicetree/for-next (44d755c1d698 dt-bindings: display/lvds-codec: add ti,sn65lvds822) CONFLICT (content): Merge conflict in drivers/of/of_private.h Merging dt-krzk/for-next (854a080f0b73 loongarch: dts: remove non-existent DAC from 2k1000-ref) Merging mailbox/for-next (4783ce32b080 riscv: export __cpuid_to_hartid_map) Merging spi/for-next (155caaddc3e2 Merge remote-tracking branch 'spi/for-6.15' into spi-next) Merging tip/master (0f966b199269 Merge branch into tip/master: 'x86/platform') CONFLICT (content): Merge conflict in arch/riscv/include/asm/io.h Merging clockevents/timers/drivers/next (fafc3058cc2f dt-bindings: timer: exynos4210-mct: Add samsung,exynos990-mct compatible) Merging edac/edac-for-next (b3205f5a415b Merge branch 'edac-drivers' into edac-for-next) Merging ftrace/for-next (dc208c69c033 scripts/sorttable: Allow matches to functions before function entry) Merging rcu/next (c52f04dbdef4 Merge branches 'docs.2025.02.04a', 'lazypreempt.2025.02.24a', 'misc.2025.02.06a', 'srcu.2025.02.05a' and 'torture.2025.02.05a') Merging paulmck/non-rcu/next (a2bfbf847c96 tools/memory-model: glossary.txt: Fix indents) Merging kvm/next (d3d0b8dfe060 Merge tag 'kvm-x86-fixes-6.14-rcN' of https://github.com/kvm-x86/linux into HEAD) Merging kvm-arm/next (86d8f0dd0035 Merge branch 'kvm-arm64/nv-idregs' into kvmarm/next) Merging kvms390/next (32239066776a KVM: s390: selftests: Streamline uc_skey test to issue iske after sske) Merging kvm-ppc/topic/ppc-kvm (fac04efc5c79 Linux 6.13-rc2) Merging kvm-riscv/riscv_kvm_next (d252435aca44 riscv: KVM: Remove unnecessary vcpu kick) Merging kvm-x86/next (fed48e2967f4 Merge branches 'fixes', 'misc', 'mmu', 'pvclock', 'selftests', 'selftests_6.14', 'svm' and 'xen') Merging xen-tip/linux-next (75ad02318af2 Xen/swiotlb: mark xen_swiotlb_fixup() __init) Merging percpu/for-next (87d6aab2389e Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost) Merging workqueues/for-next (1e5f94eb8ef7 Merge branch 'for-6.15' into for-next) Merging sched-ext/for-next (641e9dc2e05f Merge branch 'for-6.15' into for-next) Merging drivers-x86/for-next (c86e269c4da6 platform/x86: dell: Use *-y instead of *-objs in Makefile) Merging chrome-platform/for-next (9fc83373f0ff platform/chrome: cros_ec_typec: Add support for setting USB mode via sysfs) Merging chrome-platform-firmware/for-firmware-next (2014c95afece Linux 6.14-rc1) Merging hsi/for-next (e3f88665a780 HSI: ssi_protocol: Fix use after free vulnerability in ssi_protocol Driver Due to Race Condition) Merging leds-lj/for-leds-next (012825dbd5aa Revert "leds-pca955x: Remove the unused function pca95xx_num_led_regs()") Merging ipmi/for-next (d082ecbc71e9 Linux 6.14-rc4) Merging driver-core/driver-core-next (354fd6e86fac rust: io: rename `io::Io` accessors) Merging usb/usb-next (c749f058b437 USB: core: Add eUSB2 descriptor and parsing in USB core) CONFLICT (content): Merge conflict in drivers/usb/typec/ucsi/ucsi_acpi.c Merging thunderbolt/next (72cef52b353c thunderbolt: Make tb_tunnel_alloc_usb3() error paths consistent with the rest) Merging usb-serial/usb-next (6a7713ec5337 USB: serial: mos7840: drop unused defines) Merging tty/tty-next (d2fa8e52cf91 serial: xilinx_uartps: Switch to use hrtimer_setup()) Merging char-misc/char-misc-next (264ff8415aed ABI: pps: Add ABI documentation for Intel TIO) Merging accel/habanalabs-next (f03eee5fc922 Merge tag 'drm-xe-next-fixes-2024-05-02' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next) Merging coresight/next (b2d67616fcf9 coresight: etm4x: don't include '<linux/pm_wakeup.h>' directly) Merging fastrpc/for-next (2014c95afece Linux 6.14-rc1) Merging fpga/for-next (cc1eb048e7ee fpga: m10bmc-sec: update email address for Peter Colberg) Merging icc/icc-next (4cc004716977 Merge branch 'icc-sm8750' into icc-next) Merging iio/togreg (66e80e2f2176 iio: resolver: ad2s1210: use bitmap_write) Merging phy-next/next (7dff18535b93 phy: PHY_LAN966X_SERDES should depend on SOC_LAN966 || MCHP_LAN966X_PCI) Merging soundwire/next (aac2f8363f77 soundwire: slave: fix an OF node reference leak in soundwire slave device) Merging extcon/extcon-next (7041ed0dde83 extcon: Drop explicit initialization of struct i2c_device_id::driver_data to 0) Merging gnss/gnss-next (0ad2507d5d93 Linux 6.14-rc3) Merging vfio/next (2bb447540e71 vfio/nvgrace-gpu: Add GB200 SKU to the devid table) Merging w1/for-next (33c145297840 w1: w1_therm: w1: Use HWMON_CHANNEL_INFO macro to simplify code) Merging spmi/spmi-next (40384c840ea1 Linux 6.13-rc1) Merging staging/staging-next (20a351c36afc staging: gpib: tnt4882 console messaging cleanup) Merging counter-next/counter-next (c2a756660324 counter: ti-eqep: add direction support) Merging siox/siox/for-next (db418d5f1ca5 siox: bus-gpio: Simplify using devm_siox_* functions) Merging mux/for-next (59b723cd2adb Linux 6.12-rc6) Merging dmaengine/next (2c17e9ea0caa dmaengine: idxd: Delete unnecessary NULL check) CONFLICT (modify/delete): Documentation/devicetree/bindings/misc/atmel-ssc.txt deleted in HEAD and modified in dmaengine/next. Version dmaengine/next of Documentation/devicetree/bindings/misc/atmel-ssc.txt left in tree. $ git rm -f Documentation/devicetree/bindings/misc/atmel-ssc.txt Merging cgroup/for-next (d920908fe36c Merge branch 'for-6.14-fixes' into for-next) Merging scsi/for-next (5d51aea46375 Merge branch 'misc' into for-next) Merging scsi-mkp/for-next (ac0fb4a55bde scsi: scsi_debug: Do not sleep in atomic sections) CONFLICT (content): Merge conflict in drivers/scsi/scsi_debug.c Merging vhost/linux-next (9d8960672d63 vhost-scsi: Reduce response iov mem use) Merging rpmsg/for-next (539c3845d320 remoteproc: omap: Add comment for is_iomem) Merging gpio-brgl/gpio/for-next (da5dd31efd24 gpio: vf610: Switch to gpio-mmio) Merging gpio-intel/for-next (1f4c7f3b3afa Merge patch series "Split devres APIs to device/devres.h and introduce devm_kmemdup_array()") Merging pinctrl/for-next (d01895c5b118 Merge branch 'devel' into for-next) Merging pinctrl-intel/for-next (aa0554d3756a Merge tag 'ib-devres-iio-input-pinctrl-v6.15' into intel/pinctrl) Merging pinctrl-renesas/renesas-pinctrl (ea4065345643 pinctrl: renesas: rzg2l: Suppress binding attributes) Merging pinctrl-samsung/for-next (574d0f2120b8 pinctrl: samsung: add exynos2200 SoC pinctrl configuration) Merging pwm/pwm/for-next (e8af7c083520 pwm: Strengthen dependency for PWM_SIFIVE) Merging ktest/for-next (f3a30016e4b5 ktest.pl: Fix typo "accesing") Merging kselftest/next (e402c70856a3 selftests/user_events: Fix failures caused by test code) Merging kunit/test (a64dcfb451e2 Linux 6.14-rc2) Merging kunit-next/kunit (0619a4868fc1 kunit: Clarify kunit_skip() argument name) Merging livepatching/for-next (f76ad354146d Merge branch 'for-6.14/selftests-dmesg' into for-next) Merging rtc/rtc-next (2014c95afece Linux 6.14-rc1) Merging nvdimm/libnvdimm-for-next (f3dd9ae7f03a dax: Remove an unused field in struct dax_operations) Merging at24/at24/for-next (03480898cefe dt-bindings: eeprom: at24: Add compatible for Giantec GT24P128E) Merging ntb/ntb-next (c620f56c70eb MAINTAINERS: Update AMD NTB maintainers) Merging seccomp/for-next/seccomp (8f19331384e6 seccomp: avoid the lock trip seccomp_filter_release in common case) Merging slimbus/for-next (2014c95afece Linux 6.14-rc1) Merging nvmem/for-next (d0ee061dec06 nvmem: make the misaligned raw_len non-fatal) Merging xarray/main (6684aba0780d XArray: Add extra debugging check to xas_lock and friends) Merging hyperv/hyperv-next (21cfcbeb7bff hyperv: Add CONFIG_MSHV_ROOT to gate root partition support) Merging auxdisplay/for-next (72e1c440c848 auxdisplay: panel: Fix an API misuse in panel.c) Merging kgdb/kgdb/for-next (6beaa75cd24d kdb: Remove unused flags stack) Merging hmm/hmm (40384c840ea1 Linux 6.13-rc1) Merging cfi/cfi/next (2014c95afece Linux 6.14-rc1) Merging mhi/mhi-next (cba6bdfd7929 bus: mhi: host: pci_generic: Add support for SA8775P endpoint) Merging memblock/for-next (98b7beba1ee6 memblock: uniformly initialize all reserved pages to MIGRATE_MOVABLE) Merging cxl/next (0f5f03069721 Merge branch 'for-6.15/features' into cxl-for-next) Merging efi/next (fb84cefd4ce7 x86/efi/mixed: Move mixed mode startup code into libstub) Merging unicode/for-next (6b56a63d286f MAINTAINERS: Add Unicode tree) Merging slab/slab/for-next (c6bb909b8f11 Merge branch 'slab/for-6.15/kfree_rcu_tiny' into slab/for-next) CONFLICT (content): Merge conflict in kernel/rcu/tiny.c Merging random/master (93354d866ac4 prandom: remove next_pseudo_random32) Merging landlock/next (78332fdb956f selftests/landlock: Add binaries to .gitignore) Merging rust/rust-next (beeb78d46249 MAINTAINERS: add Danilo Krummrich as Rust reviewer) Merging sysctl/sysctl-next (ae9ebda1bc32 selftests: fix spelling/grammar errors in sysctl/sysctl.sh) CONFLICT (content): Merge conflict in kernel/sysctl.c Merging execve/for-next/execve (07c29c78ca3a Merge branch 'for-linus/execve' into for-next/execve) Merging bitmap/bitmap-for-next (14c384131ea0 cpumask: drop cpumask_next_wrap_old()) Merging hte/for-next (9e4259716f60 hte: tegra-194: add missing MODULE_DESCRIPTION() macro) Merging kspp/for-next/kspp (dc95913ce686 Merge branch 'for-next/hardening' into for-next/kspp) CONFLICT (content): Merge conflict in lib/Makefile Applying: fix up for "lib: Move KUnit tests into tests/ subdirectory" Merging nolibc/nolibc (a64dcfb451e2 Linux 6.14-rc2) Merging iommufd/for-next (598749522d42 iommufd: Implement sw_msi support natively) Merging turbostat/next (447c98c1ca4a tools/power turbostat: Add idle governor statistics reporting) Merging pwrseq/pwrseq/for-next (2014c95afece Linux 6.14-rc1) Merging capabilities-next/caps-next (d48da4d5ed7b security: add trace event for cap_capable) Merging ipe/next (aefadf03b3e3 ipe: policy_fs: fix kernel-doc warnings) Merging kcsan/next (9d89551994a4 Linux 6.13-rc6) Merging crc/crc-next (a0bd462f3a13 x86/crc: add ANNOTATE_NOENDBR to suppress objtool warnings) Merging kthread/for-next (d8b4bf4ea04d kthread: modify kernel-doc function name to match code) Applying: fix up for "mm, swap: simplify folio swap allocation"
{ "author": "Stephen Rothwell <sfr@canb.auug.org.au>", "date": "Wed, 26 Feb 2025 16:31:40 +1100", "is_openbsd": false, "thread_id": "759447c5-a2bd-445f-a245-8772f9ea1316@sirena.org.uk.mbox.gz" }
lkml_critique
lkml
Hi all, I have created today's linux-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/sfr/linux-next.git. You can see which trees have been included by looking in the Next/Trees file in the source. There are also quilt-import.log and merge.log files in the Next directory. Between each merge, the tree was built with allmodconfig for both powerpc and x86_64. There were only two minor merge problems. We are up to 34 trees, more are welcome (even if they are currently empty). Status of my local build tests is at http://kisskb.ellerman.id.au/kisskb/branch/9/. We have added arm and m68k to the architectures built. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au
null
null
null
linux-next: Tree for Feb 26
Hi all, Changes since 20260225: We now do a rustfmtcheck build after each x86_64 allmodconfig. The net-next tree acquired a conflict with the net tree. The net-next tree acquired a conflict with the origin tree. Non-merge commits (relative to Linus' tree): 2264 2557 files changed, 203760 insertions(+), 33660 deletions(-) ---------------------------------------------------------------------------- I have created today's linux-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git (patches at http://www.kernel.org/pub/linux/kernel/next/ ). If you are tracking the linux-next tree using git, you should not use "git pull" to do so as that will try to merge the new linux-next release with the old one. You should use "git fetch" and checkout or reset to the new master. You can see which trees have been included by looking in the Next/Trees file in the source. There is also the merge.log file in the Next directory. Between each merge, the tree was built with a defconfig for arm64, an allmodconfig for x86_64, a multi_v7_defconfig for arm, an arm64 build of various kselftests, a KUnit build and run on arm64, and a native build of tools/perf. After the final fixups (if any), I do an x86_64 modules_install followed by builds for x86_64 allnoconfig, arm64 allyesconfig, powerpc allnoconfig (32 and 64 bit), ppc44x_defconfig and pseries_le_defconfig and i386, s390, sparc and sparc64 defconfig and htmldocs. Below is a summary of the state of the merge. I am currently merging 408 trees (counting Linus' and 122 trees of bug fix patches pending for the current release). Stats about the size of the tree over time can be seen at http://neuling.org/linux-next-size.html . Thanks to Paul Gortmaker for triage and bug fixes.
{ "author": "Mark Brown <broonie@kernel.org>", "date": "Thu, 26 Feb 2026 14:20:52 +0000", "is_openbsd": false, "thread_id": "759447c5-a2bd-445f-a245-8772f9ea1316@sirena.org.uk.mbox.gz" }
lkml_critique
lkml
Hi all, I have created today's linux-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/sfr/linux-next.git. You can see which trees have been included by looking in the Next/Trees file in the source. There are also quilt-import.log and merge.log files in the Next directory. Between each merge, the tree was built with allmodconfig for both powerpc and x86_64. There were only two minor merge problems. We are up to 34 trees, more are welcome (even if they are currently empty). Status of my local build tests is at http://kisskb.ellerman.id.au/kisskb/branch/9/. We have added arm and m68k to the architectures built. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au
null
null
null
linux-next: Tree for Feb 26
On Thu, Feb 26, 2026 at 02:20:52PM +0000, Mark Brown wrote: I meant to CC you yesterday to let you know about the additional rust checks - I'll add other checks one at a time.
{ "author": "Mark Brown <broonie@kernel.org>", "date": "Fri, 27 Feb 2026 15:03:07 +0000", "is_openbsd": false, "thread_id": "759447c5-a2bd-445f-a245-8772f9ea1316@sirena.org.uk.mbox.gz" }
lkml_critique
lkml
Add ASPEED_RESET_VIDEO reset definition to the ast2600-clock binding header. It is required for proper reset control of the video on the AST2600 SoC for aspeed-video driver. Fixes: e83f8dd668ea ("media: aspeed: Fix dram hang at res-change") Signed-off-by: Haiyue Wang <haiyuewa@163.com> --- v2: - Fix checkpatch.pl warning, and send dt-bindings as single patch as the submitting-patches guide. v1: https://lore.kernel.org/all/20260227123837.70079-1-haiyuewa@163.com/ --- include/dt-bindings/clock/ast2600-clock.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/dt-bindings/clock/ast2600-clock.h b/include/dt-bindings/clock/ast2600-clock.h index f60fff261130..7b9b80c38a8b 100644 --- a/include/dt-bindings/clock/ast2600-clock.h +++ b/include/dt-bindings/clock/ast2600-clock.h @@ -124,6 +124,7 @@ #define ASPEED_RESET_PCIE_RC_OEN 18 #define ASPEED_RESET_MAC2 12 #define ASPEED_RESET_MAC1 11 +#define ASPEED_RESET_VIDEO 6 #define ASPEED_RESET_PCI_DP 5 #define ASPEED_RESET_HACE 4 #define ASPEED_RESET_AHB 1 -- 2.53.0
null
null
null
[PATCH v2 1/2] dt-bindings: clock: ast2600: Add reset definition for video
The aspeed video (be compatible for ast2400, ast2500, ast2600) now needs the reset DTS handle specified, otherwise it will fail to load: [ 4.809494] aspeed-video 1e700000.video: irq 57 [ 4.809977] aspeed-video 1e700000.video: Unable to get reset [ 4.810341] aspeed-video 1e700000.video: probe with driver aspeed-video failed with error -2 Fixes: e83f8dd668ea ("media: aspeed: Fix dram hang at res-change") Signed-off-by: Haiyue Wang <haiyuewa@163.com> --- arch/arm/boot/dts/aspeed/aspeed-g4.dtsi | 1 + arch/arm/boot/dts/aspeed/aspeed-g5.dtsi | 1 + arch/arm/boot/dts/aspeed/aspeed-g6.dtsi | 1 + 3 files changed, 3 insertions(+) diff --git a/arch/arm/boot/dts/aspeed/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed/aspeed-g4.dtsi index c3d4d916c69b..1547e28d77e2 100644 --- a/arch/arm/boot/dts/aspeed/aspeed-g4.dtsi +++ b/arch/arm/boot/dts/aspeed/aspeed-g4.dtsi @@ -242,6 +242,7 @@ video: video@1e700000 { <&syscon ASPEED_CLK_GATE_ECLK>; clock-names = "vclk", "eclk"; interrupts = <7>; + resets = <&syscon ASPEED_RESET_VIDEO>; status = "disabled"; }; diff --git a/arch/arm/boot/dts/aspeed/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed/aspeed-g5.dtsi index 39500bdb4747..793570ca2518 100644 --- a/arch/arm/boot/dts/aspeed/aspeed-g5.dtsi +++ b/arch/arm/boot/dts/aspeed/aspeed-g5.dtsi @@ -296,6 +296,7 @@ video: video@1e700000 { <&syscon ASPEED_CLK_GATE_ECLK>; clock-names = "vclk", "eclk"; interrupts = <7>; + resets = <&syscon ASPEED_RESET_VIDEO>; status = "disabled"; }; diff --git a/arch/arm/boot/dts/aspeed/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed/aspeed-g6.dtsi index 189bc3bbb47c..3adf48987a17 100644 --- a/arch/arm/boot/dts/aspeed/aspeed-g6.dtsi +++ b/arch/arm/boot/dts/aspeed/aspeed-g6.dtsi @@ -428,6 +428,7 @@ video: video@1e700000 { <&syscon ASPEED_CLK_GATE_ECLK>; clock-names = "vclk", "eclk"; interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; + resets = <&syscon ASPEED_RESET_VIDEO>; status = "disabled"; }; -- 2.53.0
{ "author": "Haiyue Wang <haiyuewa@163.com>", "date": "Fri, 27 Feb 2026 23:13:15 +0800", "is_openbsd": false, "thread_id": "20260227151602.829-1-haiyuewa@163.com.mbox.gz" }
lkml_critique
lkml
From: Conor Dooley <conor.dooley@microchip.com> In 2024 I sent a v7 of adding support for the GPIOs on PolarFire SoC, which relied on an irqchip driver for a mux sitting between the GPIO controllers and the main interrupt controller on the chip: https://lore.kernel.org/all/20240723-flatworm-cornflake-8023212f6584@wendy/ Some feedback I got from Thomas there ended up being a complete black hole for time spent, and I never managed to make the change he wanted, as a house of cards collapsed whenever I tried it. I eventually abandoned my attempt to upstream the GPIO driver with interrupt support and cut it out of the driver to make progress. I've been carrying what Thomas deemed incorrect downstream since. Recently Hervé upstreamed a patchset for a Renesas chip that deals with a mux sitting between a GPIO controller and the platform interrupt controller by way of interrupt-map. I saw the opportunity to copy what he did, so have gone from an irqchip driver that read the mux setting that firmware had configured, to trivial driver that reads the mux configuration from devicetree and sets the hardware up to match. This gets rid entirely of the irqchip driver, so resolves Thomas' complaint, but I don't love how the GPIO side of things turned out quite as much. The hardware has 41 interrupts but 70 GPIO lines. 38 of these are 1:1, direct connections to a dedicated line on the interrupt controller and 3 are shared. With the parent mux driver, the GPIO driver's interrupt handler was only called either for specific direct interrupt or for only the subset that are fed into the shared interrupt for that controller. Without the parent irqchip from mux driver, and using interrupt-map, I lost the ability to use mux driver to selectively call the handler, so now the GPIO controller attempts to handle interrupts on all lines. Probably this is ultimately not a big deal, it just feels bad to do. Going RFC here, since it's an entirely different approach. The version number is a continuation from before, since the patchset linked above got merged at v10 when I stripped the interrupt support. The mux driver has moved from irqchip to soc, since that's where Hervé's ended up. Cheers, Conor. CC: Thomas Gleixner <tglx@linutronix.de> CC: Herve Codina <herve.codina@bootlin.com> CC: Conor Dooley <conor.dooley@microchip.com> CC: Daire McNamara <daire.mcnamara@microchip.com> CC: Rob Herring <robh@kernel.org> CC: Krzysztof Kozlowski <krzk+dt@kernel.org> CC: Paul Walmsley <pjw@kernel.org> CC: Palmer Dabbelt <palmer@dabbelt.com> CC: Albert Ou <aou@eecs.berkeley.edu> CC: Alexandre Ghiti <alex@ghiti.fr> CC: Linus Walleij <linusw@kernel.org> CC: Bartosz Golaszewski <brgl@kernel.org> CC: linux-riscv@lists.infradead.org CC: devicetree@vger.kernel.org CC: linux-kernel@vger.kernel.org CC: linux-gpio@vger.kernel.org Conor Dooley (4): gpio: mpfs: Add interrupt support dt-bindings: soc: microchip: document PolarFire SoC's gpio interrupt mux soc: microchip: add mpfs gpio interrupt mux driver riscv: dts: microchip: update mpfs gpio interrupts to better match the SoC .../soc/microchip/microchip,mpfs-irqmux.yaml | 76 ++++++++ .../microchip,mpfs-mss-top-sysreg.yaml | 4 + MAINTAINERS | 2 +- .../boot/dts/microchip/mpfs-beaglev-fire.dts | 29 +++ .../boot/dts/microchip/mpfs-disco-kit.dts | 43 +++-- .../dts/microchip/mpfs-icicle-kit-common.dtsi | 37 +++- .../boot/dts/microchip/mpfs-m100pfsevp.dts | 41 +++-- .../boot/dts/microchip/mpfs-polarberry.dts | 29 +++ .../riscv/boot/dts/microchip/mpfs-sev-kit.dts | 37 +++- .../riscv/boot/dts/microchip/mpfs-tysom-m.dts | 35 +++- arch/riscv/boot/dts/microchip/mpfs.dtsi | 37 +++- drivers/gpio/Kconfig | 1 + drivers/gpio/gpio-mpfs.c | 125 ++++++++++++- drivers/soc/microchip/Kconfig | 11 ++ drivers/soc/microchip/Makefile | 1 + drivers/soc/microchip/mpfs-irqmux.c | 167 ++++++++++++++++++ 16 files changed, 620 insertions(+), 55 deletions(-) create mode 100644 Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-irqmux.yaml create mode 100644 drivers/soc/microchip/mpfs-irqmux.c -- 2.51.0
null
null
null
[RFC v11 0/4] PolarFire SoC GPIO interrupt support
From: Conor Dooley <conor.dooley@microchip.com> Add support for interrupts to the PolarFire SoC GPIO driver. Each GPIO has an independent interrupt that is wired to an interrupt mux that sits between the controllers and the PLIC. The SoC has more GPIO lines than connections from the mux to the PLIC, so some GPIOs must share PLIC interrupts. The configuration is not static and is set at runtime, conventionally by the platform's firmware. CoreGPIO, the version intended for use in the FPGA fabric has two interrupt output ports, one is IO_NUM bits wide, as is used in the hardened cores, and the other is a single bit with all lines ORed together. Signed-off-by: Conor Dooley <conor.dooley@microchip.com> --- Doing the chained thing kinda covers all the bases at the expense of the "direct" mode interrupts that have a dedicated connection to the PLIC. --- drivers/gpio/Kconfig | 1 + drivers/gpio/gpio-mpfs.c | 125 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 123 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index b45fb799e36c1..1d1239323f615 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -572,6 +572,7 @@ config GPIO_PL061 config GPIO_POLARFIRE_SOC bool "Microchip FPGA GPIO support" select REGMAP_MMIO + select GPIOLIB_IRQCHIP help Say yes here to support the GPIO controllers on Microchip FPGAs. diff --git a/drivers/gpio/gpio-mpfs.c b/drivers/gpio/gpio-mpfs.c index 9468795b96348..d19249dd0c87d 100644 --- a/drivers/gpio/gpio-mpfs.c +++ b/drivers/gpio/gpio-mpfs.c @@ -9,8 +9,9 @@ #include <linux/device.h> #include <linux/errno.h> #include <linux/gpio/driver.h> -#include <linux/init.h> +#include <linux/interrupt.h> #include <linux/mod_devicetable.h> +#include <linux/of_irq.h> #include <linux/platform_device.h> #include <linux/property.h> #include <linux/regmap.h> @@ -18,7 +19,7 @@ #define MPFS_GPIO_CTRL(i) (0x4 * (i)) #define MPFS_MAX_NUM_GPIO 32 -#define MPFS_GPIO_EN_INT 3 +#define MPFS_GPIO_EN_INT BIT(3) #define MPFS_GPIO_EN_OUT_BUF BIT(2) #define MPFS_GPIO_EN_IN BIT(1) #define MPFS_GPIO_EN_OUT BIT(0) @@ -52,6 +53,7 @@ static const struct regmap_config mpfs_gpio_regmap_config = { .reg_bits = 32, .reg_stride = 4, .val_bits = 32, + .use_raw_spinlock = true, }; static int mpfs_gpio_direction_input(struct gpio_chip *gc, unsigned int gpio_index) @@ -114,13 +116,97 @@ static int mpfs_gpio_set(struct gpio_chip *gc, unsigned int gpio_index, int valu return ret; } +static int mpfs_gpio_irq_set_type(struct irq_data *data, unsigned int type) +{ + struct gpio_chip *gc = irq_data_get_irq_chip_data(data); + struct mpfs_gpio_chip *mpfs_gpio = gpiochip_get_data(gc); + int gpio_index = irqd_to_hwirq(data) % 32; + u32 interrupt_type; + + switch (type) { + case IRQ_TYPE_EDGE_BOTH: + interrupt_type = MPFS_GPIO_TYPE_INT_EDGE_BOTH; + break; + case IRQ_TYPE_EDGE_FALLING: + interrupt_type = MPFS_GPIO_TYPE_INT_EDGE_NEG; + break; + case IRQ_TYPE_EDGE_RISING: + interrupt_type = MPFS_GPIO_TYPE_INT_EDGE_POS; + break; + case IRQ_TYPE_LEVEL_HIGH: + interrupt_type = MPFS_GPIO_TYPE_INT_LEVEL_HIGH; + break; + case IRQ_TYPE_LEVEL_LOW: + interrupt_type = MPFS_GPIO_TYPE_INT_LEVEL_LOW; + break; + } + + regmap_update_bits(mpfs_gpio->regs, MPFS_GPIO_CTRL(gpio_index), + MPFS_GPIO_TYPE_INT_MASK, interrupt_type); + + return 0; +} + +static void mpfs_gpio_irq_unmask(struct irq_data *data) +{ + struct gpio_chip *gc = irq_data_get_irq_chip_data(data); + struct mpfs_gpio_chip *mpfs_gpio = gpiochip_get_data(gc); + int gpio_index = irqd_to_hwirq(data) % 32; + + gpiochip_enable_irq(gc, gpio_index); + mpfs_gpio_direction_input(gc, gpio_index); + regmap_update_bits(mpfs_gpio->regs, MPFS_GPIO_CTRL(gpio_index), + MPFS_GPIO_EN_INT, MPFS_GPIO_EN_INT); +} + +static void mpfs_gpio_irq_mask(struct irq_data *data) +{ + struct gpio_chip *gc = irq_data_get_irq_chip_data(data); + struct mpfs_gpio_chip *mpfs_gpio = gpiochip_get_data(gc); + int gpio_index = irqd_to_hwirq(data) % 32; + + regmap_update_bits(mpfs_gpio->regs, MPFS_GPIO_CTRL(gpio_index), + MPFS_GPIO_EN_INT, 0); + gpiochip_disable_irq(gc, gpio_index); +} + +static const struct irq_chip mpfs_gpio_irqchip = { + .name = "MPFS GPIO", + .irq_set_type = mpfs_gpio_irq_set_type, + .irq_mask = mpfs_gpio_irq_mask, + .irq_unmask = mpfs_gpio_irq_unmask, + .flags = IRQCHIP_IMMUTABLE | IRQCHIP_MASK_ON_SUSPEND, + GPIOCHIP_IRQ_RESOURCE_HELPERS, +}; + +static irqreturn_t mpfs_gpio_irq_handler(int irq, void *data) +{ + struct mpfs_gpio_chip *mpfs_gpio = data; + unsigned int handled = 0; + unsigned long status; + u32 val; + int i; + + regmap_read(mpfs_gpio->regs, MPFS_IRQ_REG, &val); + status = val; + for_each_set_bit(i, &status, MPFS_MAX_NUM_GPIO) { + regmap_write(mpfs_gpio->regs, MPFS_IRQ_REG, BIT(i)); + generic_handle_domain_irq(mpfs_gpio->gc.irq.domain, i); + handled++; + } + + return handled ? IRQ_HANDLED : IRQ_NONE; +} + static int mpfs_gpio_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; + struct device_node *node = pdev->dev.of_node; struct mpfs_gpio_chip *mpfs_gpio; + struct gpio_irq_chip *girq; struct clk *clk; void __iomem *base; - int ngpios; + int ngpios, nirqs, ret; mpfs_gpio = devm_kzalloc(dev, sizeof(*mpfs_gpio), GFP_KERNEL); if (!mpfs_gpio) @@ -157,6 +243,39 @@ static int mpfs_gpio_probe(struct platform_device *pdev) mpfs_gpio->gc.parent = dev; mpfs_gpio->gc.owner = THIS_MODULE; + nirqs = of_irq_count(node); + if (nirqs > MPFS_MAX_NUM_GPIO) + return -ENXIO; + + girq = &mpfs_gpio->gc.irq; + girq->num_parents = nirqs; + + if (girq->num_parents) { + gpio_irq_chip_set_chip(girq, &mpfs_gpio_irqchip); + + girq->parents = devm_kcalloc(&pdev->dev, girq->num_parents, + sizeof(*girq->parents), GFP_KERNEL); + if (!girq->parents) + return -ENOMEM; + + for (int i = 0; i < girq->num_parents; i++) { + ret = platform_get_irq(pdev, i); + if (ret < 0) + return ret; + + girq->parents[i] = ret; + ret = devm_request_irq(dev, girq->parents[i], mpfs_gpio_irq_handler, + IRQF_SHARED, NULL, mpfs_gpio); + if (ret) + return dev_err_probe(dev, ret, + "failed to request irq for line %u\n", + i); + } + + girq->handler = handle_level_irq; + girq->default_type = IRQ_TYPE_NONE; + } + return devm_gpiochip_add_data(dev, &mpfs_gpio->gc, mpfs_gpio); } -- 2.51.0
{ "author": "Conor Dooley <conor@kernel.org>", "date": "Fri, 27 Feb 2026 14:52:27 +0000", "is_openbsd": false, "thread_id": "20260227-manhunt-sixtieth-a7928d5b7e98@spud.mbox.gz" }
lkml_critique
lkml
From: Conor Dooley <conor.dooley@microchip.com> In 2024 I sent a v7 of adding support for the GPIOs on PolarFire SoC, which relied on an irqchip driver for a mux sitting between the GPIO controllers and the main interrupt controller on the chip: https://lore.kernel.org/all/20240723-flatworm-cornflake-8023212f6584@wendy/ Some feedback I got from Thomas there ended up being a complete black hole for time spent, and I never managed to make the change he wanted, as a house of cards collapsed whenever I tried it. I eventually abandoned my attempt to upstream the GPIO driver with interrupt support and cut it out of the driver to make progress. I've been carrying what Thomas deemed incorrect downstream since. Recently Hervé upstreamed a patchset for a Renesas chip that deals with a mux sitting between a GPIO controller and the platform interrupt controller by way of interrupt-map. I saw the opportunity to copy what he did, so have gone from an irqchip driver that read the mux setting that firmware had configured, to trivial driver that reads the mux configuration from devicetree and sets the hardware up to match. This gets rid entirely of the irqchip driver, so resolves Thomas' complaint, but I don't love how the GPIO side of things turned out quite as much. The hardware has 41 interrupts but 70 GPIO lines. 38 of these are 1:1, direct connections to a dedicated line on the interrupt controller and 3 are shared. With the parent mux driver, the GPIO driver's interrupt handler was only called either for specific direct interrupt or for only the subset that are fed into the shared interrupt for that controller. Without the parent irqchip from mux driver, and using interrupt-map, I lost the ability to use mux driver to selectively call the handler, so now the GPIO controller attempts to handle interrupts on all lines. Probably this is ultimately not a big deal, it just feels bad to do. Going RFC here, since it's an entirely different approach. The version number is a continuation from before, since the patchset linked above got merged at v10 when I stripped the interrupt support. The mux driver has moved from irqchip to soc, since that's where Hervé's ended up. Cheers, Conor. CC: Thomas Gleixner <tglx@linutronix.de> CC: Herve Codina <herve.codina@bootlin.com> CC: Conor Dooley <conor.dooley@microchip.com> CC: Daire McNamara <daire.mcnamara@microchip.com> CC: Rob Herring <robh@kernel.org> CC: Krzysztof Kozlowski <krzk+dt@kernel.org> CC: Paul Walmsley <pjw@kernel.org> CC: Palmer Dabbelt <palmer@dabbelt.com> CC: Albert Ou <aou@eecs.berkeley.edu> CC: Alexandre Ghiti <alex@ghiti.fr> CC: Linus Walleij <linusw@kernel.org> CC: Bartosz Golaszewski <brgl@kernel.org> CC: linux-riscv@lists.infradead.org CC: devicetree@vger.kernel.org CC: linux-kernel@vger.kernel.org CC: linux-gpio@vger.kernel.org Conor Dooley (4): gpio: mpfs: Add interrupt support dt-bindings: soc: microchip: document PolarFire SoC's gpio interrupt mux soc: microchip: add mpfs gpio interrupt mux driver riscv: dts: microchip: update mpfs gpio interrupts to better match the SoC .../soc/microchip/microchip,mpfs-irqmux.yaml | 76 ++++++++ .../microchip,mpfs-mss-top-sysreg.yaml | 4 + MAINTAINERS | 2 +- .../boot/dts/microchip/mpfs-beaglev-fire.dts | 29 +++ .../boot/dts/microchip/mpfs-disco-kit.dts | 43 +++-- .../dts/microchip/mpfs-icicle-kit-common.dtsi | 37 +++- .../boot/dts/microchip/mpfs-m100pfsevp.dts | 41 +++-- .../boot/dts/microchip/mpfs-polarberry.dts | 29 +++ .../riscv/boot/dts/microchip/mpfs-sev-kit.dts | 37 +++- .../riscv/boot/dts/microchip/mpfs-tysom-m.dts | 35 +++- arch/riscv/boot/dts/microchip/mpfs.dtsi | 37 +++- drivers/gpio/Kconfig | 1 + drivers/gpio/gpio-mpfs.c | 125 ++++++++++++- drivers/soc/microchip/Kconfig | 11 ++ drivers/soc/microchip/Makefile | 1 + drivers/soc/microchip/mpfs-irqmux.c | 167 ++++++++++++++++++ 16 files changed, 620 insertions(+), 55 deletions(-) create mode 100644 Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-irqmux.yaml create mode 100644 drivers/soc/microchip/mpfs-irqmux.c -- 2.51.0
null
null
null
[RFC v11 0/4] PolarFire SoC GPIO interrupt support
From: Conor Dooley <conor.dooley@microchip.com> On PolarFire SoC there are more GPIO interrupts than there are interrupt lines available on the PLIC, and a runtime configurable mux is used to decide which interrupts are assigned direct connections to the PLIC & which are relegated to sharing a line. Signed-off-by: Conor Dooley <conor.dooley@microchip.com> --- .../soc/microchip/microchip,mpfs-irqmux.yaml | 76 +++++++++++++++++++ .../microchip,mpfs-mss-top-sysreg.yaml | 4 + 2 files changed, 80 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-irqmux.yaml diff --git a/Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-irqmux.yaml b/Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-irqmux.yaml new file mode 100644 index 0000000000000..c8b0de9444dd6 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-irqmux.yaml @@ -0,0 +1,76 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/microchip/microchip,mpfs-irqmux.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Microchip Polarfire SoC GPIO Interrupt Mux + +maintainers: + - Conor Dooley <conor.dooley@microchip.com> + +description: | + There are 3 GPIO controllers on this SoC, of which: + - GPIO controller 0 has 14 GPIOs + - GPIO controller 1 has 24 GPIOs + - GPIO controller 2 has 32 GPIOs + + All GPIOs are capable of generating interrupts, for a total of 70. + There are only 41 IRQs available however, so a configurable mux is used to + ensure all GPIOs can be used for interrupt generation. + 38 of the 41 interrupts are in what the documentation calls "direct mode", + as they provide an exclusive connection from a GPIO to the PLIC. + The 3 remaining interrupts are used to mux the interrupts which do not have + a exclusive connection, one for each GPIO controller. + +properties: + compatible: + const: microchip,mpfs-irqmux + + reg: + maxItems: 1 + + "#address-cells": + const: 0 + + "#interrupt-cells": + const: 1 + + interrupt-map-mask: + items: + - const: 0x7f + + interrupt-map: + description: | + Specifies the mapping from GPIO interrupt lines to plic interrupts. + + The child interrupt number set in arrays items is computed using the + following formula: + gpio_bank * 32 + gpio_number + with: + - gpio_bank: The GPIO bank number + - 0 for GPIO0, + - 1 for GPIO1, + - 2 for GPIO2 + - gpio_number: Number of the gpio in the bank (0..31) + maxItems: 70 + +required: + - compatible + - reg + - "#address-cells" + - "#interrupt-cells" + - interrupt-map-mask + - interrupt-map + +additionalProperties: false + +examples: + - | + interrupt-controller@54 { + compatible = "microchip,mpfs-irqmux"; + reg = <0x54 0x4>; + #address-cells = <0>; + #interrupt-cells = <1>; + interrupt-map-mask = <0xff>; + }; diff --git a/Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-mss-top-sysreg.yaml b/Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-mss-top-sysreg.yaml index 44e4a50c31554..276d48ba15f01 100644 --- a/Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-mss-top-sysreg.yaml +++ b/Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-mss-top-sysreg.yaml @@ -38,6 +38,10 @@ properties: of PolarFire clock/reset IDs. const: 1 + interrupt-controller@54: + type: object + $ref: /schemas/soc/microchip/microchip,mpfs-irqmux.yaml + pinctrl@200: type: object $ref: /schemas/pinctrl/microchip,mpfs-pinctrl-iomux0.yaml -- 2.51.0
{ "author": "Conor Dooley <conor@kernel.org>", "date": "Fri, 27 Feb 2026 14:52:28 +0000", "is_openbsd": false, "thread_id": "20260227-manhunt-sixtieth-a7928d5b7e98@spud.mbox.gz" }
lkml_critique
lkml
From: Conor Dooley <conor.dooley@microchip.com> In 2024 I sent a v7 of adding support for the GPIOs on PolarFire SoC, which relied on an irqchip driver for a mux sitting between the GPIO controllers and the main interrupt controller on the chip: https://lore.kernel.org/all/20240723-flatworm-cornflake-8023212f6584@wendy/ Some feedback I got from Thomas there ended up being a complete black hole for time spent, and I never managed to make the change he wanted, as a house of cards collapsed whenever I tried it. I eventually abandoned my attempt to upstream the GPIO driver with interrupt support and cut it out of the driver to make progress. I've been carrying what Thomas deemed incorrect downstream since. Recently Hervé upstreamed a patchset for a Renesas chip that deals with a mux sitting between a GPIO controller and the platform interrupt controller by way of interrupt-map. I saw the opportunity to copy what he did, so have gone from an irqchip driver that read the mux setting that firmware had configured, to trivial driver that reads the mux configuration from devicetree and sets the hardware up to match. This gets rid entirely of the irqchip driver, so resolves Thomas' complaint, but I don't love how the GPIO side of things turned out quite as much. The hardware has 41 interrupts but 70 GPIO lines. 38 of these are 1:1, direct connections to a dedicated line on the interrupt controller and 3 are shared. With the parent mux driver, the GPIO driver's interrupt handler was only called either for specific direct interrupt or for only the subset that are fed into the shared interrupt for that controller. Without the parent irqchip from mux driver, and using interrupt-map, I lost the ability to use mux driver to selectively call the handler, so now the GPIO controller attempts to handle interrupts on all lines. Probably this is ultimately not a big deal, it just feels bad to do. Going RFC here, since it's an entirely different approach. The version number is a continuation from before, since the patchset linked above got merged at v10 when I stripped the interrupt support. The mux driver has moved from irqchip to soc, since that's where Hervé's ended up. Cheers, Conor. CC: Thomas Gleixner <tglx@linutronix.de> CC: Herve Codina <herve.codina@bootlin.com> CC: Conor Dooley <conor.dooley@microchip.com> CC: Daire McNamara <daire.mcnamara@microchip.com> CC: Rob Herring <robh@kernel.org> CC: Krzysztof Kozlowski <krzk+dt@kernel.org> CC: Paul Walmsley <pjw@kernel.org> CC: Palmer Dabbelt <palmer@dabbelt.com> CC: Albert Ou <aou@eecs.berkeley.edu> CC: Alexandre Ghiti <alex@ghiti.fr> CC: Linus Walleij <linusw@kernel.org> CC: Bartosz Golaszewski <brgl@kernel.org> CC: linux-riscv@lists.infradead.org CC: devicetree@vger.kernel.org CC: linux-kernel@vger.kernel.org CC: linux-gpio@vger.kernel.org Conor Dooley (4): gpio: mpfs: Add interrupt support dt-bindings: soc: microchip: document PolarFire SoC's gpio interrupt mux soc: microchip: add mpfs gpio interrupt mux driver riscv: dts: microchip: update mpfs gpio interrupts to better match the SoC .../soc/microchip/microchip,mpfs-irqmux.yaml | 76 ++++++++ .../microchip,mpfs-mss-top-sysreg.yaml | 4 + MAINTAINERS | 2 +- .../boot/dts/microchip/mpfs-beaglev-fire.dts | 29 +++ .../boot/dts/microchip/mpfs-disco-kit.dts | 43 +++-- .../dts/microchip/mpfs-icicle-kit-common.dtsi | 37 +++- .../boot/dts/microchip/mpfs-m100pfsevp.dts | 41 +++-- .../boot/dts/microchip/mpfs-polarberry.dts | 29 +++ .../riscv/boot/dts/microchip/mpfs-sev-kit.dts | 37 +++- .../riscv/boot/dts/microchip/mpfs-tysom-m.dts | 35 +++- arch/riscv/boot/dts/microchip/mpfs.dtsi | 37 +++- drivers/gpio/Kconfig | 1 + drivers/gpio/gpio-mpfs.c | 125 ++++++++++++- drivers/soc/microchip/Kconfig | 11 ++ drivers/soc/microchip/Makefile | 1 + drivers/soc/microchip/mpfs-irqmux.c | 167 ++++++++++++++++++ 16 files changed, 620 insertions(+), 55 deletions(-) create mode 100644 Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-irqmux.yaml create mode 100644 drivers/soc/microchip/mpfs-irqmux.c -- 2.51.0
null
null
null
[RFC v11 0/4] PolarFire SoC GPIO interrupt support
From: Conor Dooley <conor.dooley@microchip.com> On PolarFire SoC there are more GPIO interrupts than there are interrupt lines available on the PLIC, and a runtime configurable mux is used to decide which interrupts are assigned direct connections to the PLIC & which are relegated to sharing a line. Add a driver so that Linux can set the mux based on the interrupt mapping in the devicetree. Signed-off-by: Conor Dooley <conor.dooley@microchip.com> --- MAINTAINERS | 2 +- drivers/soc/microchip/Kconfig | 11 ++ drivers/soc/microchip/Makefile | 1 + drivers/soc/microchip/mpfs-irqmux.c | 167 ++++++++++++++++++++++++++++ 4 files changed, 180 insertions(+), 1 deletion(-) create mode 100644 drivers/soc/microchip/mpfs-irqmux.c diff --git a/MAINTAINERS b/MAINTAINERS index 4044b28ca1818..55ed37ee53af0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -22691,7 +22691,7 @@ F: Documentation/devicetree/bindings/pinctrl/microchip,mpfs-pinctrl-mssio.yaml F: Documentation/devicetree/bindings/pinctrl/microchip,pic64gx-pinctrl-gpio2.yaml F: Documentation/devicetree/bindings/pwm/microchip,corepwm.yaml F: Documentation/devicetree/bindings/riscv/microchip.yaml -F: Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-sys-controller.yaml +F: Documentation/devicetree/bindings/soc/microchip/microchip,mpfs*.yaml F: Documentation/devicetree/bindings/spi/microchip,mpfs-spi.yaml F: Documentation/devicetree/bindings/usb/microchip,mpfs-musb.yaml F: arch/riscv/boot/dts/microchip/ diff --git a/drivers/soc/microchip/Kconfig b/drivers/soc/microchip/Kconfig index bcf5546025610..7131f1b52d1bc 100644 --- a/drivers/soc/microchip/Kconfig +++ b/drivers/soc/microchip/Kconfig @@ -1,3 +1,14 @@ +config POLARFIRE_SOC_IRQ_MUX + bool "Microchip PolarFire SoC's GPIO IRQ Mux" + depends on ARCH_MICROCHIP + select REGMAP + select REGMAP_MMIO + default y + help + Support for the interrupt mux on Polarfire SoC. It sits between + the GPIO controllers and the PLIC, as only 35 interrupts are shared + between 3 GPIO controllers with 32 interrupts each. + config POLARFIRE_SOC_SYS_CTRL tristate "Microchip PolarFire SoC (MPFS) system controller support" depends on POLARFIRE_SOC_MAILBOX diff --git a/drivers/soc/microchip/Makefile b/drivers/soc/microchip/Makefile index 1a3a1594b089b..55775db45ee76 100644 --- a/drivers/soc/microchip/Makefile +++ b/drivers/soc/microchip/Makefile @@ -1,2 +1,3 @@ +obj-$(CONFIG_POLARFIRE_SOC_IRQ_MUX) += mpfs-irqmux.o obj-$(CONFIG_POLARFIRE_SOC_SYS_CTRL) += mpfs-sys-controller.o obj-$(CONFIG_POLARFIRE_SOC_SYSCONS) += mpfs-control-scb.o mpfs-mss-top-sysreg.o diff --git a/drivers/soc/microchip/mpfs-irqmux.c b/drivers/soc/microchip/mpfs-irqmux.c new file mode 100644 index 0000000000000..76c1afa1fe1c4 --- /dev/null +++ b/drivers/soc/microchip/mpfs-irqmux.c @@ -0,0 +1,167 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Largely copied from rzn1_irqmux.c + */ + +#include <linux/bitmap.h> +#include <linux/bitops.h> +#include <linux/mfd/syscon.h> +#include <linux/module.h> +#include <linux/of.h> +#include <linux/of_irq.h> +#include <linux/platform_device.h> +#include <linux/regmap.h> + +#define MPFS_IRQMUX_CR 0x54 +#define MPFS_IRQMUX_NUM_OUTPUTS 70 + +static int mpfs_irqmux_is_direct_mode(struct device *dev, + const struct of_phandle_args *parent_args) +{ + if (parent_args->args_count != 1) { + dev_err(dev, "Invalid interrupt-map item\n"); + return -EINVAL; + } + + if (parent_args->args[0] < 13 || parent_args->args[0] > 53) { + dev_err(dev, "Invalid interrupt %u\n", parent_args->args[0]); + return -EINVAL; + } + + if (parent_args->args[0] > 50) + return 0; + + return 1; +} + +static int mpfs_irqmux_probe(struct platform_device *pdev) +{ + DECLARE_BITMAP(line_done, MPFS_IRQMUX_NUM_OUTPUTS) = {}; + struct device *dev = &pdev->dev; + struct device_node *np = dev->of_node; + struct of_imap_parser imap_parser; + struct of_imap_item imap_item; + struct regmap *regmap; + int ret, direct_mode, line, controller, gpio; + u32 tmp, val = 0, old; + + regmap = device_node_to_regmap(pdev->dev.parent->of_node); + if (IS_ERR(regmap)) + return dev_err_probe(dev, PTR_ERR(regmap), "Failed to find syscon regmap\n"); + + /* We support only #interrupt-cells = <1> and #address-cells = <0> */ + ret = of_property_read_u32(np, "#interrupt-cells", &tmp); + if (ret) + return ret; + if (tmp != 1) + return -EINVAL; + + ret = of_property_read_u32(np, "#address-cells", &tmp); + if (ret) + return ret; + if (tmp != 0) + return -EINVAL; + + ret = of_imap_parser_init(&imap_parser, np, &imap_item); + if (ret) + return ret; + + for_each_of_imap_item(&imap_parser, &imap_item) { + + direct_mode = mpfs_irqmux_is_direct_mode(dev, &imap_item.parent_args); + if (direct_mode < 0) { + of_node_put(imap_item.parent_args.np); + return direct_mode; + } + + line = imap_item.child_imap[0]; + gpio = line % 32; + controller = line / 32; + + if (controller > 2) { + of_node_put(imap_item.parent_args.np); + dev_err(dev, "child interrupt number too large: %d\n", line); + return -EINVAL; + } + + if (test_and_set_bit(line, line_done)) { + of_node_put(imap_item.parent_args.np); + dev_err(dev, "Mux output line %d already defined in interrupt-map\n", + line); + return -EINVAL; + } + + /* + * There are 41 interrupts assigned to GPIOs, of which 38 are "direct". Since the + * mux has 32 bits only, 6 of these exclusive/"direct" interrupts remain. These + * are used by GPIO controller 1's lines 18 to 23. Nothing needs to be done + * for these interrupts. + */ + if (controller == 1 && gpio >= 18) + continue; + + /* + * The mux has a single register, where bits 0 to 13 mux between GPIO controller + * 1's 14 GPIOs and GPIO controller 2's first 14 GPIOs. The remaining bits mux + * between the first 18 GPIOs of controller 1 and the last 18 GPIOS of + * controller 2. If a bit in the mux's control register is set, the + * corresponding interrupt line for GPIO controller 0 or 1 will be put in + * "non-direct" mode. If cleared, the "fabric" controller's will. + * + * Register layout: + * GPIO 1 interrupt line 17 | mux bit 31 | GPIO 2 interrupt line 31 + * ... | ... | ... + * ... | ... | ... + * GPIO 1 interrupt line 0 | mux bit 14 | GPIO 2 interrupt line 14 + * GPIO 0 interrupt line 13 | mux bit 13 | GPIO 2 interrupt line 13 + * ... | ... | ... + * ... | ... | ... + * GPIO 0 interrupt line 0 | mux bit 0 | GPIO 2 interrupt line 0 + * + * As the binding mandates 70 items, one for each GPIO line, there's no need to + * handle anything for GPIO controller 2, since the bit will be set for the + * corresponding line in GPIO controller 0 or 1. + */ + if (controller == 2) + continue; + + /* + * If in direct mode, the bit is cleared, nothing needs to be done as val is zero + * initialised and that's the direct mode setting for GPIO controller 0 and 1. + */ + if (direct_mode) + continue; + + if (controller == 0) + val |= 1U << gpio; + else + val |= 1U << (gpio + 14); + } + + regmap_read(regmap, MPFS_IRQMUX_CR, &old); + regmap_write(regmap, MPFS_IRQMUX_CR, val); + + if (val != old) + dev_info(dev, "firmware mux setting of 0x%x overwritten to 0x%x\n", old, val); + + return 0; +} + +static const struct of_device_id mpfs_irqmux_of_match[] = { + { .compatible = "microchip,mpfs-irqmux", }, + { } +}; +MODULE_DEVICE_TABLE(of, mpfs_irqmux_of_match); + +static struct platform_driver mpfs_irqmux_driver = { + .probe = mpfs_irqmux_probe, + .driver = { + .name = "mpfs_irqmux", + .of_match_table = mpfs_irqmux_of_match, + }, +}; +module_platform_driver(mpfs_irqmux_driver); + +MODULE_AUTHOR("Conor Dooley <conor.dooley@microchip.com>"); +MODULE_DESCRIPTION("Polarfire SoC interrupt mux driver"); +MODULE_LICENSE("GPL"); -- 2.51.0
{ "author": "Conor Dooley <conor@kernel.org>", "date": "Fri, 27 Feb 2026 14:52:29 +0000", "is_openbsd": false, "thread_id": "20260227-manhunt-sixtieth-a7928d5b7e98@spud.mbox.gz" }
lkml_critique
lkml
From: Conor Dooley <conor.dooley@microchip.com> In 2024 I sent a v7 of adding support for the GPIOs on PolarFire SoC, which relied on an irqchip driver for a mux sitting between the GPIO controllers and the main interrupt controller on the chip: https://lore.kernel.org/all/20240723-flatworm-cornflake-8023212f6584@wendy/ Some feedback I got from Thomas there ended up being a complete black hole for time spent, and I never managed to make the change he wanted, as a house of cards collapsed whenever I tried it. I eventually abandoned my attempt to upstream the GPIO driver with interrupt support and cut it out of the driver to make progress. I've been carrying what Thomas deemed incorrect downstream since. Recently Hervé upstreamed a patchset for a Renesas chip that deals with a mux sitting between a GPIO controller and the platform interrupt controller by way of interrupt-map. I saw the opportunity to copy what he did, so have gone from an irqchip driver that read the mux setting that firmware had configured, to trivial driver that reads the mux configuration from devicetree and sets the hardware up to match. This gets rid entirely of the irqchip driver, so resolves Thomas' complaint, but I don't love how the GPIO side of things turned out quite as much. The hardware has 41 interrupts but 70 GPIO lines. 38 of these are 1:1, direct connections to a dedicated line on the interrupt controller and 3 are shared. With the parent mux driver, the GPIO driver's interrupt handler was only called either for specific direct interrupt or for only the subset that are fed into the shared interrupt for that controller. Without the parent irqchip from mux driver, and using interrupt-map, I lost the ability to use mux driver to selectively call the handler, so now the GPIO controller attempts to handle interrupts on all lines. Probably this is ultimately not a big deal, it just feels bad to do. Going RFC here, since it's an entirely different approach. The version number is a continuation from before, since the patchset linked above got merged at v10 when I stripped the interrupt support. The mux driver has moved from irqchip to soc, since that's where Hervé's ended up. Cheers, Conor. CC: Thomas Gleixner <tglx@linutronix.de> CC: Herve Codina <herve.codina@bootlin.com> CC: Conor Dooley <conor.dooley@microchip.com> CC: Daire McNamara <daire.mcnamara@microchip.com> CC: Rob Herring <robh@kernel.org> CC: Krzysztof Kozlowski <krzk+dt@kernel.org> CC: Paul Walmsley <pjw@kernel.org> CC: Palmer Dabbelt <palmer@dabbelt.com> CC: Albert Ou <aou@eecs.berkeley.edu> CC: Alexandre Ghiti <alex@ghiti.fr> CC: Linus Walleij <linusw@kernel.org> CC: Bartosz Golaszewski <brgl@kernel.org> CC: linux-riscv@lists.infradead.org CC: devicetree@vger.kernel.org CC: linux-kernel@vger.kernel.org CC: linux-gpio@vger.kernel.org Conor Dooley (4): gpio: mpfs: Add interrupt support dt-bindings: soc: microchip: document PolarFire SoC's gpio interrupt mux soc: microchip: add mpfs gpio interrupt mux driver riscv: dts: microchip: update mpfs gpio interrupts to better match the SoC .../soc/microchip/microchip,mpfs-irqmux.yaml | 76 ++++++++ .../microchip,mpfs-mss-top-sysreg.yaml | 4 + MAINTAINERS | 2 +- .../boot/dts/microchip/mpfs-beaglev-fire.dts | 29 +++ .../boot/dts/microchip/mpfs-disco-kit.dts | 43 +++-- .../dts/microchip/mpfs-icicle-kit-common.dtsi | 37 +++- .../boot/dts/microchip/mpfs-m100pfsevp.dts | 41 +++-- .../boot/dts/microchip/mpfs-polarberry.dts | 29 +++ .../riscv/boot/dts/microchip/mpfs-sev-kit.dts | 37 +++- .../riscv/boot/dts/microchip/mpfs-tysom-m.dts | 35 +++- arch/riscv/boot/dts/microchip/mpfs.dtsi | 37 +++- drivers/gpio/Kconfig | 1 + drivers/gpio/gpio-mpfs.c | 125 ++++++++++++- drivers/soc/microchip/Kconfig | 11 ++ drivers/soc/microchip/Makefile | 1 + drivers/soc/microchip/mpfs-irqmux.c | 167 ++++++++++++++++++ 16 files changed, 620 insertions(+), 55 deletions(-) create mode 100644 Documentation/devicetree/bindings/soc/microchip/microchip,mpfs-irqmux.yaml create mode 100644 drivers/soc/microchip/mpfs-irqmux.c -- 2.51.0
null
null
null
[RFC v11 0/4] PolarFire SoC GPIO interrupt support
From: Conor Dooley <conor.dooley@microchip.com> There are 3 GPIO controllers on this SoC, of which: - GPIO controller 0 has 14 GPIOs - GPIO controller 1 has 24 GPIOs - GPIO controller 2 has 32 GPIOs All GPIOs are capable of generating interrupts, for a total of 70. There are only 41 IRQs available however, so a configurable mux is used to ensure all GPIOs can be used for interrupt generation. 38 of the 41 interrupts are in what the documentation calls "direct mode", as they provide an exclusive connection from a GPIO to the PLIC. The 3 remaining interrupts are used to mux the interrupts which do not have a exclusive connection, one for each GPIO controller. The mux was overlooked when the bindings and driver were originally written for the GPIO controllers on Polarfire SoC, and the interrupts property in the GPIO nodes used to try and convey what the mapping was. Instead, the mux should be a device in its own right, and the GPIO controllers should be connected to it, rather than to the PLIC. Now that a binding exists for that mux, fix the inaccurate description of the interrupt controller hierarchy. GPIO controllers 0 and 1 do not have all 32 possible GPIO lines, so ngpios needs to be set to match the number of lines/interrupts. The m100pfsevp has conflicting interrupt mappings for controllers 0 and 2, as they cannot both be using an interrupt in "direct mode" at the same time, so the default replaces this impossible configuration. Signed-off-by: Conor Dooley <conor.dooley@microchip.com> --- .../boot/dts/microchip/mpfs-beaglev-fire.dts | 29 +++++++++++++ .../boot/dts/microchip/mpfs-disco-kit.dts | 43 +++++++++++++------ .../dts/microchip/mpfs-icicle-kit-common.dtsi | 37 ++++++++++++---- .../boot/dts/microchip/mpfs-m100pfsevp.dts | 41 ++++++++++++------ .../boot/dts/microchip/mpfs-polarberry.dts | 29 +++++++++++++ .../riscv/boot/dts/microchip/mpfs-sev-kit.dts | 37 ++++++++++++---- .../riscv/boot/dts/microchip/mpfs-tysom-m.dts | 35 ++++++++++++--- arch/riscv/boot/dts/microchip/mpfs.dtsi | 37 ++++++++++++++-- 8 files changed, 237 insertions(+), 51 deletions(-) diff --git a/arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts b/arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts index 73afa2d26bb61..7e6449ba91b6a 100644 --- a/arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts +++ b/arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts @@ -163,6 +163,35 @@ imx219_0: endpoint { }; }; +&irqmux { + interrupt-map = <0 &plic 13>, <1 &plic 14>, <2 &plic 15>, + <3 &plic 16>, <4 &plic 17>, <5 &plic 18>, + <6 &plic 19>, <7 &plic 20>, <8 &plic 21>, + <9 &plic 22>, <10 &plic 23>, <11 &plic 24>, + <12 &plic 25>, <13 &plic 26>, + + <32 &plic 27>, <33 &plic 28>, <34 &plic 29>, + <35 &plic 30>, <36 &plic 31>, <37 &plic 32>, + <38 &plic 33>, <39 &plic 34>, <40 &plic 35>, + <41 &plic 36>, <42 &plic 37>, <43 &plic 38>, + <44 &plic 39>, <45 &plic 40>, <46 &plic 41>, + <47 &plic 42>, <48 &plic 43>, <49 &plic 44>, + <50 &plic 45>, <51 &plic 46>, <52 &plic 47>, + <53 &plic 48>, <54 &plic 49>, <55 &plic 50>, + + <64 &plic 53>, <65 &plic 53>, <66 &plic 53>, + <67 &plic 53>, <68 &plic 53>, <69 &plic 53>, + <70 &plic 53>, <71 &plic 53>, <72 &plic 53>, + <73 &plic 53>, <74 &plic 53>, <75 &plic 53>, + <76 &plic 53>, <77 &plic 53>, <78 &plic 53>, + <79 &plic 53>, <80 &plic 53>, <81 &plic 53>, + <82 &plic 53>, <83 &plic 53>, <84 &plic 53>, + <85 &plic 53>, <86 &plic 53>, <87 &plic 53>, + <88 &plic 53>, <89 &plic 53>, <90 &plic 53>, + <91 &plic 53>, <92 &plic 53>, <93 &plic 53>, + <94 &plic 53>, <95 &plic 53>; +}; + &mac0 { status = "okay"; phy-mode = "sgmii"; diff --git a/arch/riscv/boot/dts/microchip/mpfs-disco-kit.dts b/arch/riscv/boot/dts/microchip/mpfs-disco-kit.dts index c068b9bb5bfdf..f769c9d5d7b47 100644 --- a/arch/riscv/boot/dts/microchip/mpfs-disco-kit.dts +++ b/arch/riscv/boot/dts/microchip/mpfs-disco-kit.dts @@ -97,24 +97,10 @@ &core_pwm0 { }; &gpio1 { - interrupts = <27>, <28>, <29>, <30>, - <31>, <32>, <33>, <47>, - <35>, <36>, <37>, <38>, - <39>, <40>, <41>, <42>, - <43>, <44>, <45>, <46>, - <47>, <48>, <49>, <50>; status = "okay"; }; &gpio2 { - interrupts = <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>; status = "okay"; }; @@ -130,6 +116,35 @@ &ihc { status = "okay"; }; +&irqmux { + interrupt-map = <0 &plic 13>, <1 &plic 14>, <2 &plic 15>, + <3 &plic 16>, <4 &plic 17>, <5 &plic 18>, + <6 &plic 19>, <7 &plic 20>, <8 &plic 21>, + <9 &plic 22>, <10 &plic 23>, <11 &plic 24>, + <12 &plic 25>, <13 &plic 26>, + + <32 &plic 27>, <33 &plic 28>, <34 &plic 29>, + <35 &plic 30>, <36 &plic 31>, <37 &plic 32>, + <38 &plic 33>, <39 &plic 34>, <40 &plic 35>, + <41 &plic 36>, <42 &plic 37>, <43 &plic 38>, + <44 &plic 39>, <45 &plic 40>, <46 &plic 41>, + <47 &plic 42>, <48 &plic 43>, <49 &plic 44>, + <50 &plic 45>, <51 &plic 46>, <52 &plic 47>, + <53 &plic 48>, <54 &plic 49>, <55 &plic 50>, + + <64 &plic 53>, <65 &plic 53>, <66 &plic 53>, + <67 &plic 53>, <68 &plic 53>, <69 &plic 53>, + <70 &plic 53>, <71 &plic 53>, <72 &plic 53>, + <73 &plic 53>, <74 &plic 53>, <75 &plic 53>, + <76 &plic 53>, <77 &plic 53>, <78 &plic 53>, + <79 &plic 53>, <80 &plic 53>, <81 &plic 53>, + <82 &plic 53>, <83 &plic 53>, <84 &plic 53>, + <85 &plic 53>, <86 &plic 53>, <87 &plic 53>, + <88 &plic 53>, <89 &plic 53>, <90 &plic 53>, + <91 &plic 53>, <92 &plic 53>, <93 &plic 53>, + <94 &plic 53>, <95 &plic 53>; +}; + &mac0 { phy-mode = "sgmii"; phy-handle = <&phy0>; diff --git a/arch/riscv/boot/dts/microchip/mpfs-icicle-kit-common.dtsi b/arch/riscv/boot/dts/microchip/mpfs-icicle-kit-common.dtsi index e01a216e6c3a8..e25edc5f3b451 100644 --- a/arch/riscv/boot/dts/microchip/mpfs-icicle-kit-common.dtsi +++ b/arch/riscv/boot/dts/microchip/mpfs-icicle-kit-common.dtsi @@ -77,14 +77,6 @@ &core_pwm0 { }; &gpio2 { - interrupts = <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>; status = "okay"; }; @@ -136,6 +128,35 @@ &ihc { status = "okay"; }; +&irqmux { + interrupt-map = <0 &plic 13>, <1 &plic 14>, <2 &plic 15>, + <3 &plic 16>, <4 &plic 17>, <5 &plic 18>, + <6 &plic 19>, <7 &plic 20>, <8 &plic 21>, + <9 &plic 22>, <10 &plic 23>, <11 &plic 24>, + <12 &plic 25>, <13 &plic 26>, + + <32 &plic 27>, <33 &plic 28>, <34 &plic 29>, + <35 &plic 30>, <36 &plic 31>, <37 &plic 32>, + <38 &plic 33>, <39 &plic 34>, <40 &plic 35>, + <41 &plic 36>, <42 &plic 37>, <43 &plic 38>, + <44 &plic 39>, <45 &plic 40>, <46 &plic 41>, + <47 &plic 42>, <48 &plic 43>, <49 &plic 44>, + <50 &plic 45>, <51 &plic 46>, <52 &plic 47>, + <53 &plic 48>, <54 &plic 49>, <55 &plic 50>, + + <64 &plic 53>, <65 &plic 53>, <66 &plic 53>, + <67 &plic 53>, <68 &plic 53>, <69 &plic 53>, + <70 &plic 53>, <71 &plic 53>, <72 &plic 53>, + <73 &plic 53>, <74 &plic 53>, <75 &plic 53>, + <76 &plic 53>, <77 &plic 53>, <78 &plic 53>, + <79 &plic 53>, <80 &plic 53>, <81 &plic 53>, + <82 &plic 53>, <83 &plic 53>, <84 &plic 53>, + <85 &plic 53>, <86 &plic 53>, <87 &plic 53>, + <88 &plic 53>, <89 &plic 53>, <90 &plic 53>, + <91 &plic 53>, <92 &plic 53>, <93 &plic 53>, + <94 &plic 53>, <95 &plic 53>; +}; + &mac0 { phy-mode = "sgmii"; phy-handle = <&phy0>; diff --git a/arch/riscv/boot/dts/microchip/mpfs-m100pfsevp.dts b/arch/riscv/boot/dts/microchip/mpfs-m100pfsevp.dts index a8d623ee9fa4c..86234968df486 100644 --- a/arch/riscv/boot/dts/microchip/mpfs-m100pfsevp.dts +++ b/arch/riscv/boot/dts/microchip/mpfs-m100pfsevp.dts @@ -52,11 +52,36 @@ &i2c1 { status = "okay"; }; +&irqmux { + interrupt-map = <0 &plic 13>, <1 &plic 14>, <2 &plic 15>, + <3 &plic 16>, <4 &plic 17>, <5 &plic 18>, + <6 &plic 19>, <7 &plic 20>, <8 &plic 21>, + <9 &plic 22>, <10 &plic 23>, <11 &plic 24>, + <12 &plic 25>, <13 &plic 26>, + + <32 &plic 27>, <33 &plic 28>, <34 &plic 29>, + <35 &plic 30>, <36 &plic 31>, <37 &plic 32>, + <38 &plic 33>, <39 &plic 34>, <40 &plic 35>, + <41 &plic 36>, <42 &plic 37>, <43 &plic 38>, + <44 &plic 39>, <45 &plic 40>, <46 &plic 41>, + <47 &plic 42>, <48 &plic 43>, <49 &plic 44>, + <50 &plic 45>, <51 &plic 46>, <52 &plic 47>, + <53 &plic 48>, <54 &plic 49>, <55 &plic 50>, + + <64 &plic 53>, <65 &plic 53>, <66 &plic 53>, + <67 &plic 53>, <68 &plic 53>, <69 &plic 53>, + <70 &plic 53>, <71 &plic 53>, <72 &plic 53>, + <73 &plic 53>, <74 &plic 53>, <75 &plic 53>, + <76 &plic 53>, <77 &plic 53>, <78 &plic 53>, + <79 &plic 53>, <80 &plic 53>, <81 &plic 53>, + <82 &plic 53>, <83 &plic 53>, <84 &plic 53>, + <85 &plic 53>, <86 &plic 53>, <87 &plic 53>, + <88 &plic 53>, <89 &plic 53>, <90 &plic 53>, + <91 &plic 53>, <92 &plic 53>, <93 &plic 53>, + <94 &plic 53>, <95 &plic 53>; +}; + &gpio0 { - interrupts = <13>, <14>, <15>, <16>, - <17>, <18>, <19>, <20>, - <21>, <22>, <23>, <24>, - <25>, <26>; ngpios = <14>; status = "okay"; @@ -75,14 +100,6 @@ mmc-sel-hog { }; &gpio2 { - interrupts = <13>, <14>, <15>, <16>, - <17>, <18>, <19>, <20>, - <21>, <22>, <23>, <24>, - <25>, <26>, <27>, <28>, - <29>, <30>, <31>, <32>, - <33>, <34>, <35>, <36>, - <37>, <38>, <39>, <40>, - <41>, <42>, <43>, <44>; status = "okay"; }; diff --git a/arch/riscv/boot/dts/microchip/mpfs-polarberry.dts b/arch/riscv/boot/dts/microchip/mpfs-polarberry.dts index ea0808ab10425..510d59153cd07 100644 --- a/arch/riscv/boot/dts/microchip/mpfs-polarberry.dts +++ b/arch/riscv/boot/dts/microchip/mpfs-polarberry.dts @@ -30,6 +30,35 @@ ddrc_cache_hi: memory@1000000000 { }; }; +&irqmux { + interrupt-map = <0 &plic 13>, <1 &plic 14>, <2 &plic 15>, + <3 &plic 16>, <4 &plic 17>, <5 &plic 18>, + <6 &plic 19>, <7 &plic 20>, <8 &plic 21>, + <9 &plic 22>, <10 &plic 23>, <11 &plic 24>, + <12 &plic 25>, <13 &plic 26>, + + <32 &plic 27>, <33 &plic 28>, <34 &plic 29>, + <35 &plic 30>, <36 &plic 31>, <37 &plic 32>, + <38 &plic 33>, <39 &plic 34>, <40 &plic 35>, + <41 &plic 36>, <42 &plic 37>, <43 &plic 38>, + <44 &plic 39>, <45 &plic 40>, <46 &plic 41>, + <47 &plic 42>, <48 &plic 43>, <49 &plic 44>, + <50 &plic 45>, <51 &plic 46>, <52 &plic 47>, + <53 &plic 48>, <54 &plic 49>, <55 &plic 50>, + + <64 &plic 53>, <65 &plic 53>, <66 &plic 53>, + <67 &plic 53>, <68 &plic 53>, <69 &plic 53>, + <70 &plic 53>, <71 &plic 53>, <72 &plic 53>, + <73 &plic 53>, <74 &plic 53>, <75 &plic 53>, + <76 &plic 53>, <77 &plic 53>, <78 &plic 53>, + <79 &plic 53>, <80 &plic 53>, <81 &plic 53>, + <82 &plic 53>, <83 &plic 53>, <84 &plic 53>, + <85 &plic 53>, <86 &plic 53>, <87 &plic 53>, + <88 &plic 53>, <89 &plic 53>, <90 &plic 53>, + <91 &plic 53>, <92 &plic 53>, <93 &plic 53>, + <94 &plic 53>, <95 &plic 53>; +}; + /* * phy0 is connected to mac0, but the port itself is on the (optional) carrier * board. diff --git a/arch/riscv/boot/dts/microchip/mpfs-sev-kit.dts b/arch/riscv/boot/dts/microchip/mpfs-sev-kit.dts index f9a8905794383..8f1908a105671 100644 --- a/arch/riscv/boot/dts/microchip/mpfs-sev-kit.dts +++ b/arch/riscv/boot/dts/microchip/mpfs-sev-kit.dts @@ -56,15 +56,36 @@ &i2c0 { status = "okay"; }; +&irqmux { + interrupt-map = <0 &plic 13>, <1 &plic 14>, <2 &plic 15>, + <3 &plic 16>, <4 &plic 17>, <5 &plic 18>, + <6 &plic 19>, <7 &plic 20>, <8 &plic 21>, + <9 &plic 22>, <10 &plic 23>, <11 &plic 24>, + <12 &plic 25>, <13 &plic 26>, + + <32 &plic 27>, <33 &plic 28>, <34 &plic 29>, + <35 &plic 30>, <36 &plic 31>, <37 &plic 32>, + <38 &plic 33>, <39 &plic 34>, <40 &plic 35>, + <41 &plic 36>, <42 &plic 37>, <43 &plic 38>, + <44 &plic 39>, <45 &plic 40>, <46 &plic 41>, + <47 &plic 42>, <48 &plic 43>, <49 &plic 44>, + <50 &plic 45>, <51 &plic 46>, <52 &plic 47>, + <53 &plic 48>, <54 &plic 49>, <55 &plic 50>, + + <64 &plic 53>, <65 &plic 53>, <66 &plic 53>, + <67 &plic 53>, <68 &plic 53>, <69 &plic 53>, + <70 &plic 53>, <71 &plic 53>, <72 &plic 53>, + <73 &plic 53>, <74 &plic 53>, <75 &plic 53>, + <76 &plic 53>, <77 &plic 53>, <78 &plic 53>, + <79 &plic 53>, <80 &plic 53>, <81 &plic 53>, + <82 &plic 53>, <83 &plic 53>, <84 &plic 53>, + <85 &plic 53>, <86 &plic 53>, <87 &plic 53>, + <88 &plic 53>, <89 &plic 53>, <90 &plic 53>, + <91 &plic 53>, <92 &plic 53>, <93 &plic 53>, + <94 &plic 53>, <95 &plic 53>; +}; + &gpio2 { - interrupts = <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>, - <53>, <53>, <53>, <53>; status = "okay"; }; diff --git a/arch/riscv/boot/dts/microchip/mpfs-tysom-m.dts b/arch/riscv/boot/dts/microchip/mpfs-tysom-m.dts index d1120f5f2c015..bc15530a2979b 100644 --- a/arch/riscv/boot/dts/microchip/mpfs-tysom-m.dts +++ b/arch/riscv/boot/dts/microchip/mpfs-tysom-m.dts @@ -69,13 +69,36 @@ hwmon: hwmon@45 { }; }; +&irqmux { + interrupt-map = <0 &plic 13>, <1 &plic 14>, <2 &plic 15>, + <3 &plic 16>, <4 &plic 17>, <5 &plic 18>, + <6 &plic 19>, <7 &plic 20>, <8 &plic 21>, + <9 &plic 22>, <10 &plic 23>, <11 &plic 24>, + <12 &plic 25>, <13 &plic 26>, + + <32 &plic 27>, <33 &plic 28>, <34 &plic 29>, + <35 &plic 30>, <36 &plic 31>, <37 &plic 32>, + <38 &plic 33>, <39 &plic 34>, <40 &plic 35>, + <41 &plic 36>, <42 &plic 37>, <43 &plic 38>, + <44 &plic 39>, <45 &plic 40>, <46 &plic 41>, + <47 &plic 42>, <48 &plic 43>, <49 &plic 44>, + <50 &plic 45>, <51 &plic 46>, <52 &plic 47>, + <53 &plic 48>, <54 &plic 49>, <55 &plic 50>, + + <64 &plic 53>, <65 &plic 53>, <66 &plic 53>, + <67 &plic 53>, <68 &plic 53>, <69 &plic 53>, + <70 &plic 53>, <71 &plic 53>, <72 &plic 53>, + <73 &plic 53>, <74 &plic 53>, <75 &plic 53>, + <76 &plic 53>, <77 &plic 53>, <78 &plic 53>, + <79 &plic 53>, <80 &plic 53>, <81 &plic 53>, + <82 &plic 53>, <83 &plic 53>, <84 &plic 53>, + <85 &plic 53>, <86 &plic 53>, <87 &plic 53>, + <88 &plic 53>, <89 &plic 53>, <90 &plic 53>, + <91 &plic 53>, <92 &plic 53>, <93 &plic 53>, + <94 &plic 53>, <95 &plic 53>; +}; + &gpio1 { - interrupts = <27>, <28>, <29>, <30>, - <31>, <32>, <33>, <47>, - <35>, <36>, <37>, <38>, - <39>, <40>, <41>, <42>, - <43>, <44>, <45>, <46>, - <47>, <48>, <49>, <50>; status = "okay"; }; diff --git a/arch/riscv/boot/dts/microchip/mpfs.dtsi b/arch/riscv/boot/dts/microchip/mpfs.dtsi index 5c2963e269b83..4f0d5bdee3da6 100644 --- a/arch/riscv/boot/dts/microchip/mpfs.dtsi +++ b/arch/riscv/boot/dts/microchip/mpfs.dtsi @@ -254,7 +254,17 @@ pdma: dma-controller@3000000 { mss_top_sysreg: syscon@20002000 { compatible = "microchip,mpfs-mss-top-sysreg", "syscon", "simple-mfd"; reg = <0x0 0x20002000 0x0 0x1000>; + #address-cells = <1>; + #size-cells = <1>; #reset-cells = <1>; + + irqmux: interrupt-controller@54 { + compatible = "microchip,mpfs-irqmux"; + reg = <0x54 0x4>; + #address-cells = <0>; + #interrupt-cells = <1>; + interrupt-map-mask = <0x7f>; + }; }; sysreg_scb: syscon@20003000 { @@ -471,36 +481,57 @@ mac1: ethernet@20112000 { gpio0: gpio@20120000 { compatible = "microchip,mpfs-gpio"; reg = <0x0 0x20120000 0x0 0x1000>; - interrupt-parent = <&plic>; + interrupt-parent = <&irqmux>; interrupt-controller; #interrupt-cells = <1>; + interrupts = <0>, <1>, <2>, <3>, + <4>, <5>, <6>, <7>, + <8>, <9>, <10>, <11>, + <12>, <13>; clocks = <&clkcfg CLK_GPIO0>; gpio-controller; #gpio-cells = <2>; + ngpios = <14>; status = "disabled"; }; gpio1: gpio@20121000 { compatible = "microchip,mpfs-gpio"; reg = <0x0 0x20121000 0x0 0x1000>; - interrupt-parent = <&plic>; + interrupt-parent = <&irqmux>; interrupt-controller; #interrupt-cells = <1>; + interrupts = <32>, <33>, <34>, <35>, + <36>, <37>, <38>, <39>, + <40>, <41>, <42>, <43>, + <44>, <45>, <46>, <47>, + <48>, <49>, <50>, <51>, + <52>, <53>, <54>, <55>; clocks = <&clkcfg CLK_GPIO1>; gpio-controller; #gpio-cells = <2>; + ngpios = <24>; status = "disabled"; }; gpio2: gpio@20122000 { compatible = "microchip,mpfs-gpio"; reg = <0x0 0x20122000 0x0 0x1000>; - interrupt-parent = <&plic>; + interrupt-parent = <&irqmux>; interrupt-controller; #interrupt-cells = <1>; + interrupts = <64>, <65>, <66>, <67>, + <68>, <69>, <70>, <71>, + <72>, <73>, <74>, <75>, + <76>, <77>, <78>, <79>, + <80>, <81>, <82>, <83>, + <84>, <85>, <86>, <87>, + <88>, <89>, <90>, <91>, + <92>, <93>, <94>, <95>; clocks = <&clkcfg CLK_GPIO2>; gpio-controller; #gpio-cells = <2>; + ngpios = <32>; status = "disabled"; }; -- 2.51.0
{ "author": "Conor Dooley <conor@kernel.org>", "date": "Fri, 27 Feb 2026 14:52:30 +0000", "is_openbsd": false, "thread_id": "20260227-manhunt-sixtieth-a7928d5b7e98@spud.mbox.gz" }