zorro_esp, was: Re: m68k v3.16 status update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Geert,

Am 19.12.2017 um 21:19 schrieb Geert Uytterhoeven:
Hi Michael,

On Tue, Dec 19, 2017 at 1:40 AM, Michael Schmitz <schmitzmic@xxxxxxxxx> wrote:
Contrary to the Mac driver, esp->command_block and
esp->command_block_dma are not identical addresses on Amiga. Is there
a generic way to map a DMA address (i.e., physical address AFAIK) to a
kernel virtual one? (I can use esp->command_block in the reconnect
message special case but not otherwise ...)

The only generic way is to use the virtual and DMA addresses as returned
by the dma_map_*() functions.

Yes, but there is no way to find the mapped virtual address given the
DMA handle (=physical address). I suppose that would mean walking the
page tables, looking for a mapping that bears the hallmarks of a DMA
mapping?

There may be some platform-specific legacy conversion routines around...

phys_to_virt() does return _a_ mapping but it is not the DMA virtual
mapping itself. Since we are doing PIO, the cache bits in the mapping
may not matter at all here so this may be safe in general. It's a hack I
would not want to submit for review though.

Anyway - both using esp->command_block and the address returned by
phys_to_virt() work, that's good enough for now. At least we can get rid
of the slave_configure hack ...

(Tested on CyberStorm I only so far, of course, And only handles message
in, not other short transfers ...).

Cheers,

	Michael

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux