Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86/x86 Skip fences in bus_space_barrier on I/O space.



details:   https://anonhg.NetBSD.org/src/rev/44741a24fefb
branches:  trunk
changeset: 465741:44741a24fefb
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue Dec 03 04:57:25 2019 +0000

description:
Skip fences in bus_space_barrier on I/O space.

I/O operations are issued in program order.  Not that I/O operations
are usually a performance bottleneck anyway, but maybe it is slightly
cheaper to avoid stalling on store buffers or pending loads, and
there's very little cost to the skipping criterion here.

diffstat:

 sys/arch/x86/x86/bus_space.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 0ebb7ff74c5c -r 44741a24fefb sys/arch/x86/x86/bus_space.c
--- a/sys/arch/x86/x86/bus_space.c      Tue Dec 03 04:20:45 2019 +0000
+++ b/sys/arch/x86/x86/bus_space.c      Tue Dec 03 04:57:25 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus_space.c,v 1.42 2019/12/02 08:33:52 riastradh Exp $ */
+/*     $NetBSD: bus_space.c,v 1.43 2019/12/03 04:57:25 riastradh Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.42 2019/12/02 08:33:52 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.43 2019/12/03 04:57:25 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -878,6 +878,10 @@
                  bus_size_t offset, bus_size_t len, int flags)
 {
 
+       /* I/O instructions always happen in program order.  */
+       if (x86_bus_space_is_io(tag))
+               return;
+
        /*
         * For default mappings, which are mapped with UC-type memory
         * regions, all loads and stores are issued in program order.



Home | Main Index | Thread Index | Old Index