All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] firewire: core/ohci: code refactoring for pages dedicated to DMA
@ 2026-01-10  1:39 Takashi Sakamoto
  2026-01-10  1:39 ` [PATCH 1/8] firewire: core: move private function declaration from public header to internal header Takashi Sakamoto
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Takashi Sakamoto @ 2026-01-10  1:39 UTC (permalink / raw)
  To: linux1394-devel; +Cc: linux-kernel, jgg

Hi,

This patchset is to refactor current codes handling pages dedicated to
DMA.

There are two cases to acquires pages dedicated to DMA; isochronous
contexts and AR contexts. The reason of page acquisition is the need to map
them into VMA. In the former case, they are mapped into userspace VMA. In
the latter case, they are mapped into kernel VMA with continuous address
to access to packet content across the page boundaries, especially between
the end and the beginning of pages. The allocated pages are
discontiguous, and their cache coherency is managed by DMA streaming
APIs.

1394 OHCI has no restriction about the size and alignment of memory
registered for DMA, while the registered DMA address should be within
32 bit. The DMA mapped addresses can be discontiguous between descriptor,
thus the above subsystem design is due to the convenience of system side.

I think the recent convention of driver programming relies on DMA-coherent
buffers, while this code refactoring keeps the uses of DMA streaming
APIs as is. Also, the acquisition per page is kept as is, even if there
are some ways to allocate memories wider than the page size. They would be
future works since it requires to change how to handle the packet content
across the pages.


Takashi Sakamoto (8):
  firewire: core: move private function declaration from public header
    to internal header
  firewire: core: use mutex instead of spinlock for client isochronous
    context
  firewire: core: code refactoring with cleanup function for isoc pages
  firewire: core: use common kernel API to allocate and release a batch
    of pages
  firewire: core: stop using page private to store DMA mapping address
  firewire: ohci: use MAX macro to guarantee minimum count of pages for
    AR contexts
  firewire: ohci: split page allocation from dma mapping
  firewire: ohci: stop using page private to store DMA mapping address

 drivers/firewire/core-cdev.c |  41 ++++++------
 drivers/firewire/core-iso.c  |  86 +++++++++++++-----------
 drivers/firewire/core.h      |   1 +
 drivers/firewire/ohci.c      | 124 ++++++++++++++++++++---------------
 include/linux/firewire.h     |   3 +-
 5 files changed, 141 insertions(+), 114 deletions(-)


base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
-- 
2.51.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-01-12  2:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-10  1:39 [PATCH 0/8] firewire: core/ohci: code refactoring for pages dedicated to DMA Takashi Sakamoto
2026-01-10  1:39 ` [PATCH 1/8] firewire: core: move private function declaration from public header to internal header Takashi Sakamoto
2026-01-10  1:39 ` [PATCH 2/8] firewire: core: use mutex instead of spinlock for client isochronous context Takashi Sakamoto
2026-01-10  1:39 ` [PATCH 3/8] firewire: core: code refactoring with cleanup function for isoc pages Takashi Sakamoto
2026-01-10  1:39 ` [PATCH 4/8] firewire: core: use common kernel API to allocate and release a batch of pages Takashi Sakamoto
2026-01-10  1:39 ` [PATCH 5/8] firewire: core: stop using page private to store DMA mapping address Takashi Sakamoto
2026-01-10  1:39 ` [PATCH 6/8] firewire: ohci: use MAX macro to guarantee minimum count of pages for AR contexts Takashi Sakamoto
2026-01-10  1:39 ` [PATCH 7/8] firewire: ohci: split page allocation from dma mapping Takashi Sakamoto
2026-01-10  1:39 ` [PATCH 8/8] firewire: ohci: stop using page private to store DMA mapping address Takashi Sakamoto
2026-01-12  2:55 ` [PATCH 0/8] firewire: core/ohci: code refactoring for pages dedicated to DMA Takashi Sakamoto

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.