[QUERY]: RZ/Five (AX45MP) non-coherent DMA

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

 



Hi All,

When trying to add non coherent DMA support for the RZ/Five SoC, I was
suggested to use the ALTERNATIVE() macro [0].

My initial intention was to implement the alternative_call_x()
something like what x86 has and from there call the C function, So
while doing some experiments I realized that using the asm "call
<func>" would cause adding the whole lot of registers in the clobbers
list.

As per my understanding the only correct approach to
alternative_call_x() is if the function itself is inline assembly then
we know the exact registers being used and then we could add them
appropriately in the clobbers list.

The problem with the above approach being we have quite a lot of C
code [1] for the CMO and it also requires some register writes of the
l2 cache controller, converting this to assembly would be a pain.

* Is my understanding correct?
* Is there any other approach I am missing?
* Is there no way out apart from implementing inline asm?

[0] https://patchwork.kernel.org/project/linux-riscv/cover/20221019220242.4746-1-prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx/
[1] https://patchwork.kernel.org/project/linux-riscv/patch/20221019220242.4746-3-prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx/

Cheers,
Prabhakar



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux