Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/sunxi remove useless splbio() in sunxispi_start



details:   https://anonhg.NetBSD.org/src/rev/80afd105ffcb
branches:  trunk
changeset: 964494:80afd105ffcb
user:      tnn <tnn%NetBSD.org@localhost>
date:      Sun Aug 04 22:26:40 2019 +0000

description:
remove useless splbio() in sunxispi_start

We raised spl already in sunxispi_transfer.
XXX spi(4) should be made MPSAFE

diffstat:

 sys/arch/arm/sunxi/sun4i_spi.c |  7 ++-----
 sys/arch/arm/sunxi/sun6i_spi.c |  6 ++----
 2 files changed, 4 insertions(+), 9 deletions(-)

diffs (72 lines):

diff -r add8af577552 -r 80afd105ffcb sys/arch/arm/sunxi/sun4i_spi.c
--- a/sys/arch/arm/sunxi/sun4i_spi.c    Sun Aug 04 22:13:24 2019 +0000
+++ b/sys/arch/arm/sunxi/sun4i_spi.c    Sun Aug 04 22:26:40 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sun4i_spi.c,v 1.2 2019/08/03 19:56:42 tnn Exp $        */
+/*     $NetBSD: sun4i_spi.c,v 1.3 2019/08/04 22:26:40 tnn Exp $        */
 
 /*
  * Copyright (c) 2019 Tobias Nygren
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sun4i_spi.c,v 1.2 2019/08/03 19:56:42 tnn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sun4i_spi.c,v 1.3 2019/08/04 22:26:40 tnn Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -337,7 +337,6 @@
 {
        struct spi_transfer *st;
        uint32_t ctl;
-       int s;
        struct spi_chunk *chunk;
        size_t burstcount;
 
@@ -368,13 +367,11 @@
                if (!cold)
                        return;
 
-               s = splbio();
                for (;;) {
                        (void) sun4ispi_intr(sc);
                        if (ISSET(st->st_flags, SPI_F_DONE))
                                break;
                }
-               splx(s);
        }
        sc->sc_running = false;
 }
diff -r add8af577552 -r 80afd105ffcb sys/arch/arm/sunxi/sun6i_spi.c
--- a/sys/arch/arm/sunxi/sun6i_spi.c    Sun Aug 04 22:13:24 2019 +0000
+++ b/sys/arch/arm/sunxi/sun6i_spi.c    Sun Aug 04 22:26:40 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sun6i_spi.c,v 1.3 2019/08/03 14:42:24 tnn Exp $        */
+/*     $NetBSD: sun6i_spi.c,v 1.4 2019/08/04 22:26:40 tnn Exp $        */
 
 /*
  * Copyright (c) 2019 Tobias Nygren
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sun6i_spi.c,v 1.3 2019/08/03 14:42:24 tnn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sun6i_spi.c,v 1.4 2019/08/04 22:26:40 tnn Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -308,13 +308,11 @@
                if (!cold)
                        return;
 
-               int s = splbio();
                for (;;) {
                        sun6ispi_intr(sc);
                        if (ISSET(st->st_flags, SPI_F_DONE))
                                break;
                }
-               splx(s);
        }
 
        sc->sc_running = false;



Home | Main Index | Thread Index | Old Index