From: Michael Schmitz <schmitzmic@gmail.com>
To: linux-m68k@vger.kernel.org, arnd@kernel.org
Cc: linux-scsi@vger.kernel.org, geert@linux-m68k.org
Subject: [PATCH v2 0/3] Converting m68k WD33C93 drivers to DMA API
Date: Thu, 30 Jun 2022 15:32:59 +1200 [thread overview]
Message-ID: <20220630033302.3183-1-schmitzmic@gmail.com> (raw)
This series was precipitated by Arnd removing CONFIG_VIRT_TO_BUS. The
m68k WD33C93 still used virt_to_bus to convert virtual addresses to
physical addresses suitable for the DMA engines (note m68k does not
have an IOMMU and uses a direct mapping for DMA addresses).
Arnd suggested to use dma_map_single() to set up dma mappings instead
of open-coding much the same in every driver dma_setup() function.
DMA setup on a3000 host adapters can be kept as-is (bounce
buffers are used only where the input buffer isn't cache line
aligned). Cache management is now taken care of by dma_map_single().
Note that I've restored bounce buffer allocation (dropped in v1) in
order to make minimal changes to the core logic.
On gvp11 and a2091 host adapters, only the lowest 16 MB of physical
memory can be directy addressed by DMA, and bounce buffers from that
space must be used (possibly allocated from chip RAM using the
custom allocator) if buffers are located in the higher memory regions.
No cache management is required for chip RAM bounce buffers.
The m68k VME mvme147 driver has no DMA addressing or alignment
restrictions and can be converted in the same way as the Amiga a3000
one, but will require conversion to a platform device driver first.
Only compile tested so far, and hardware testing might be hard to do.
Cheers,
Michael
next reply other threads:[~2022-06-30 3:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-30 3:32 Michael Schmitz [this message]
2022-06-30 3:33 ` [PATCH v2 1/3] scsi - a3000.c: convert m68k WD33C93 drivers to DMA API Michael Schmitz
2022-06-30 3:33 ` [PATCH v2 2/3] scsi - a2091.c: " Michael Schmitz
2022-06-30 3:33 ` [PATCH v2 3/3] scsi - gvp11.c: " Michael Schmitz
2022-07-07 21:01 ` [PATCH v2 0/3] Converting " Martin K. Petersen
2022-07-08 8:49 ` Michael Schmitz
2022-07-14 4:22 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220630033302.3183-1-schmitzmic@gmail.com \
--to=schmitzmic@gmail.com \
--cc=arnd@kernel.org \
--cc=geert@linux-m68k.org \
--cc=linux-m68k@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox