Module Name: src Committed By: riastradh Date: Tue Dec 3 04:57:25 UTC 2019
Modified Files: src/sys/arch/x86/x86: bus_space.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/x86/x86/bus_space.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/x86/x86/bus_space.c diff -u src/sys/arch/x86/x86/bus_space.c:1.42 src/sys/arch/x86/x86/bus_space.c:1.43 --- src/sys/arch/x86/x86/bus_space.c:1.42 Mon Dec 2 08:33:52 2019 +++ src/sys/arch/x86/x86/bus_space.c Tue Dec 3 04:57:25 2019 @@ -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_space_barrier(bus_space_tag_t tag, b 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.