From: Marek Vasut <ma...@denx.de> Date: Sun, 17 May 2020 02:33:34 +0200
> The KS8851SNL/SNLI and KS8851-16MLL/MLLI/MLLU are very much the same pieces > of silicon, except the former has an SPI interface, while the later has a > parallel bus interface. Thus far, Linux has two separate drivers for each > and they are diverging considerably. > > This series unifies them into a single driver with small SPI and parallel > bus specific parts. The approach here is to first separate out the SPI > specific parts into a separate file, then add parallel bus accessors in > another separate file and then finally remove the old parallel bus driver. > The reason for replacing the old parallel bus driver is because the SPI > bus driver is much higher quality. What strikes me in these changes is all of the new indirect jumps in the fast paths of TX and RX packet processing. It's just too much for my eyes. :-) Especially in the presence of Spectre mitigations, these costs are quite non-trivial. Seriously, I would recommend that instead of having these small indirect helpers, just inline the differences into two instances of the RX interrupt and the TX handler.