mbox series

[v5,0/3] Reliability improvements for Microchip MPF FPGA manager

Message ID 20221230092922.18822-1-i.bornyakov@metrotek.ru (mailing list archive)
Headers show
Series Reliability improvements for Microchip MPF FPGA manager | expand

Message

Ivan Bornyakov Dec. 30, 2022, 9:29 a.m. UTC
A couple of reliability improvements for Microchip Polarfire FPGA
manager:
 * move SPI I/O buffers out of stack
 * rewrite status polling routine in a time measurable way

Also improve mpf_ops_write() code readability by separating single data
frame writing routine.

ChangeLog:
  v1:
[https://lore.kernel.org/linux-fpga/20221223123854.8023-1-i.bornyakov@metrotek.ru/]
  v2:
    * split into 3 distinct patches
[https://lore.kernel.org/linux-fpga/20221226142326.8111-1-i.bornyakov@metrotek.ru/]
  v3:
    * fix polling stop condition in mpf_poll_status() as Ilpo suggested.
[https://lore.kernel.org/linux-fpga/20221227100450.2257-1-i.bornyakov@metrotek.ru/]
  v4:
    * more verbose comment for mpf_poll_status()
[https://lore.kernel.org/linux-fpga/20221229104604.2496-1-i.bornyakov@metrotek.ru/]
  v5:
    * revord "fpga: microchip-spi: move SPI I/O buffers out of stack"
      commit message "Use allocated buffers" -> "Use cacheline aligned
      buffers"
    * drop __aligned(ARCH_KMALLOC_MINALIGN) attribute of struct mpf_priv
      member "rx". tx and rx are used synchronously by dma, they could
      share a cacheline.

Ivan Bornyakov (3):
  fpga: microchip-spi: move SPI I/O buffers out of stack
  fpga: microchip-spi: rewrite status polling in a time measurable way
  fpga: microchip-spi: separate data frame write routine

 drivers/fpga/microchip-spi.c | 145 +++++++++++++++++++----------------
 1 file changed, 79 insertions(+), 66 deletions(-)

Comments

Ivan Bornyakov Jan. 9, 2023, 5:47 a.m. UTC | #1
On Fri, Dec 30, 2022 at 12:29:19PM +0300, Ivan Bornyakov wrote:
> A couple of reliability improvements for Microchip Polarfire FPGA
> manager:
>  * move SPI I/O buffers out of stack
>  * rewrite status polling routine in a time measurable way
> 
> Also improve mpf_ops_write() code readability by separating single data
> frame writing routine.
> 
> ChangeLog:
>   v1:
> [https://lore.kernel.org/linux-fpga/20221223123854.8023-1-i.bornyakov@metrotek.ru/]
>   v2:
>     * split into 3 distinct patches
> [https://lore.kernel.org/linux-fpga/20221226142326.8111-1-i.bornyakov@metrotek.ru/]
>   v3:
>     * fix polling stop condition in mpf_poll_status() as Ilpo suggested.
> [https://lore.kernel.org/linux-fpga/20221227100450.2257-1-i.bornyakov@metrotek.ru/]
>   v4:
>     * more verbose comment for mpf_poll_status()
> [https://lore.kernel.org/linux-fpga/20221229104604.2496-1-i.bornyakov@metrotek.ru/]
>   v5:
>     * revord "fpga: microchip-spi: move SPI I/O buffers out of stack"
>       commit message "Use allocated buffers" -> "Use cacheline aligned
>       buffers"
>     * drop __aligned(ARCH_KMALLOC_MINALIGN) attribute of struct mpf_priv
>       member "rx". tx and rx are used synchronously by dma, they could
>       share a cacheline.
> 
> Ivan Bornyakov (3):
>   fpga: microchip-spi: move SPI I/O buffers out of stack
>   fpga: microchip-spi: rewrite status polling in a time measurable way
>   fpga: microchip-spi: separate data frame write routine
> 
>  drivers/fpga/microchip-spi.c | 145 +++++++++++++++++++----------------
>  1 file changed, 79 insertions(+), 66 deletions(-)
> 
> -- 
> 2.38.2
> 

Friendly ping.
Xu Yilun Jan. 9, 2023, 6:13 a.m. UTC | #2
On 2023-01-09 at 08:47:42 +0300, Ivan Bornyakov wrote:
> On Fri, Dec 30, 2022 at 12:29:19PM +0300, Ivan Bornyakov wrote:
> > A couple of reliability improvements for Microchip Polarfire FPGA
> > manager:
> >  * move SPI I/O buffers out of stack
> >  * rewrite status polling routine in a time measurable way
> > 
> > Also improve mpf_ops_write() code readability by separating single data
> > frame writing routine.
> > 
> > ChangeLog:
> >   v1:
> > [https://lore.kernel.org/linux-fpga/20221223123854.8023-1-i.bornyakov@metrotek.ru/]
> >   v2:
> >     * split into 3 distinct patches
> > [https://lore.kernel.org/linux-fpga/20221226142326.8111-1-i.bornyakov@metrotek.ru/]
> >   v3:
> >     * fix polling stop condition in mpf_poll_status() as Ilpo suggested.
> > [https://lore.kernel.org/linux-fpga/20221227100450.2257-1-i.bornyakov@metrotek.ru/]
> >   v4:
> >     * more verbose comment for mpf_poll_status()
> > [https://lore.kernel.org/linux-fpga/20221229104604.2496-1-i.bornyakov@metrotek.ru/]
> >   v5:
> >     * revord "fpga: microchip-spi: move SPI I/O buffers out of stack"
> >       commit message "Use allocated buffers" -> "Use cacheline aligned
> >       buffers"
> >     * drop __aligned(ARCH_KMALLOC_MINALIGN) attribute of struct mpf_priv
> >       member "rx". tx and rx are used synchronously by dma, they could
> >       share a cacheline.
> > 
> > Ivan Bornyakov (3):
> >   fpga: microchip-spi: move SPI I/O buffers out of stack
> >   fpga: microchip-spi: rewrite status polling in a time measurable way
> >   fpga: microchip-spi: separate data frame write routine
> > 
> >  drivers/fpga/microchip-spi.c | 145 +++++++++++++++++++----------------
> >  1 file changed, 79 insertions(+), 66 deletions(-)
> > 
> > -- 
> > 2.38.2
> > 
> 
> Friendly ping.
> 

Patch #1 is good to me now. And applied this series to for-next

Thanks,
Yilun