From 16168b364a2ba06b962dc30e7a667864b5900d63 Mon Sep 17 00:00:00 2001 From: jhb Date: Fri, 20 Oct 2000 06:45:48 +0000 Subject: Axe the barrier_{read,write,rw}() helper functions as this method of doing memory barriers doesn't really scale well for the ia64. Also, memory barriers are more a property of the CPU than bus space. Requested by: dfr --- sys/alpha/include/bus.h | 12 ------------ sys/amd64/include/bus_amd64.h | 24 ------------------------ sys/amd64/include/bus_at386.h | 24 ------------------------ sys/amd64/include/bus_dma.h | 24 ------------------------ sys/i386/include/bus_at386.h | 24 ------------------------ sys/i386/include/bus_dma.h | 24 ------------------------ sys/i386/include/bus_pc98.h | 24 ------------------------ sys/ia64/include/bus.h | 23 ----------------------- sys/sys/bus_dma.h | 24 ------------------------ 9 files changed, 203 deletions(-) diff --git a/sys/alpha/include/bus.h b/sys/alpha/include/bus.h index 1810c4b..7fe2726 100644 --- a/sys/alpha/include/bus.h +++ b/sys/alpha/include/bus.h @@ -364,18 +364,6 @@ void busspace_generic_barrier(struct alpha_busspace *space, #define bus_space_barrier(t, h, o, l, f) \ (t)->ab_ops->abo_barrier(t, (h)+(o), l, f) -#define barrier_read \ - bus_space_barrier(busspace_isa_mem, 0, BUS_SPACE_UNRESTRICTED, \ - BUS_SPACE_BARRIER_READ) - -#define barrier_write \ - bus_space_barrier(busspace_isa_mem, 0, BUS_SPACE_UNRESTRICTED, \ - BUS_SPACE_BARRIER_WRITE) - -#define barrier_rw \ - bus_space_barrier(busspace_isa_mem, 0, BUS_SPACE_UNRESTRICTED, \ - BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE) - /* * Flags used in various bus DMA methods. */ diff --git a/sys/amd64/include/bus_amd64.h b/sys/amd64/include/bus_amd64.h index 3423e6b..9f036b6 100644 --- a/sys/amd64/include/bus_amd64.h +++ b/sys/amd64/include/bus_amd64.h @@ -1152,30 +1152,6 @@ bus_space_barrier(bus_space_tag_t tag, bus_space_handle_t bsh, __asm __volatile("" : : : "memory"); } - -/* - * Generic memory barrier functions. - */ -static __inline void -barrier_read(void) -{ - bus_space_barrier(I386_BUS_SPACE_MEM, 0, 0, ~0, BUS_SPACE_BARRIER_READ); -} - -static __inline void -barrier_write(void) -{ - bus_space_barrier(I386_BUS_SPACE_MEM, 0, 0, ~0, - BUS_SPACE_BARRIER_WRITE); -} - -static __inline void -barrier_rw(void) -{ - bus_space_barrier(I386_BUS_SPACE_MEM, 0, 0, ~0, - BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); -} - /* * Flags used in various bus DMA methods. */ diff --git a/sys/amd64/include/bus_at386.h b/sys/amd64/include/bus_at386.h index 3423e6b..9f036b6 100644 --- a/sys/amd64/include/bus_at386.h +++ b/sys/amd64/include/bus_at386.h @@ -1152,30 +1152,6 @@ bus_space_barrier(bus_space_tag_t tag, bus_space_handle_t bsh, __asm __volatile("" : : : "memory"); } - -/* - * Generic memory barrier functions. - */ -static __inline void -barrier_read(void) -{ - bus_space_barrier(I386_BUS_SPACE_MEM, 0, 0, ~0, BUS_SPACE_BARRIER_READ); -} - -static __inline void -barrier_write(void) -{ - bus_space_barrier(I386_BUS_SPACE_MEM, 0, 0, ~0, - BUS_SPACE_BARRIER_WRITE); -} - -static __inline void -barrier_rw(void) -{ - bus_space_barrier(I386_BUS_SPACE_MEM, 0, 0, ~0, - BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); -} - /* * Flags used in various bus DMA methods. */ diff --git a/sys/amd64/include/bus_dma.h b/sys/amd64/include/bus_dma.h index 3423e6b..9f036b6 100644 --- a/sys/amd64/include/bus_dma.h +++ b/sys/amd64/include/bus_dma.h @@ -1152,30 +1152,6 @@ bus_space_barrier(bus_space_tag_t tag, bus_space_handle_t bsh, __asm __volatile("" : : : "memory"); } - -/* - * Generic memory barrier functions. - */ -static __inline void -barrier_read(void) -{ - bus_space_barrier(I386_BUS_SPACE_MEM, 0, 0, ~0, BUS_SPACE_BARRIER_READ); -} - -static __inline void -barrier_write(void) -{ - bus_space_barrier(I386_BUS_SPACE_MEM, 0, 0, ~0, - BUS_SPACE_BARRIER_WRITE); -} - -static __inline void -barrier_rw(void) -{ - bus_space_barrier(I386_BUS_SPACE_MEM, 0, 0, ~0, - BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); -} - /* * Flags used in various bus DMA methods. */ diff --git a/sys/i386/include/bus_at386.h b/sys/i386/include/bus_at386.h index 3423e6b..9f036b6 100644 --- a/sys/i386/include/bus_at386.h +++ b/sys/i386/include/bus_at386.h @@ -1152,30 +1152,6 @@ bus_space_barrier(bus_space_tag_t tag, bus_space_handle_t bsh, __asm __volatile("" : : : "memory"); } - -/* - * Generic memory barrier functions. - */ -static __inline void -barrier_read(void) -{ - bus_space_barrier(I386_BUS_SPACE_MEM, 0, 0, ~0, BUS_SPACE_BARRIER_READ); -} - -static __inline void -barrier_write(void) -{ - bus_space_barrier(I386_BUS_SPACE_MEM, 0, 0, ~0, - BUS_SPACE_BARRIER_WRITE); -} - -static __inline void -barrier_rw(void) -{ - bus_space_barrier(I386_BUS_SPACE_MEM, 0, 0, ~0, - BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); -} - /* * Flags used in various bus DMA methods. */ diff --git a/sys/i386/include/bus_dma.h b/sys/i386/include/bus_dma.h index 3423e6b..9f036b6 100644 --- a/sys/i386/include/bus_dma.h +++ b/sys/i386/include/bus_dma.h @@ -1152,30 +1152,6 @@ bus_space_barrier(bus_space_tag_t tag, bus_space_handle_t bsh, __asm __volatile("" : : : "memory"); } - -/* - * Generic memory barrier functions. - */ -static __inline void -barrier_read(void) -{ - bus_space_barrier(I386_BUS_SPACE_MEM, 0, 0, ~0, BUS_SPACE_BARRIER_READ); -} - -static __inline void -barrier_write(void) -{ - bus_space_barrier(I386_BUS_SPACE_MEM, 0, 0, ~0, - BUS_SPACE_BARRIER_WRITE); -} - -static __inline void -barrier_rw(void) -{ - bus_space_barrier(I386_BUS_SPACE_MEM, 0, 0, ~0, - BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); -} - /* * Flags used in various bus DMA methods. */ diff --git a/sys/i386/include/bus_pc98.h b/sys/i386/include/bus_pc98.h index d1a5ca8..271356e 100644 --- a/sys/i386/include/bus_pc98.h +++ b/sys/i386/include/bus_pc98.h @@ -1454,30 +1454,6 @@ bus_space_barrier(bus_space_tag_t tag, bus_space_handle_t bsh, __asm __volatile("" : : : "memory"); } - -/* - * Generic memory barrier functions. - */ -static __inline void -barrier_read(void) -{ - bus_space_barrier(I386_BUS_SPACE_MEM, 0, 0, ~0, BUS_SPACE_BARRIER_READ); -} - -static __inline void -barrier_write(void) -{ - bus_space_barrier(I386_BUS_SPACE_MEM, 0, 0, ~0, - BUS_SPACE_BARRIER_WRITE); -} - -static __inline void -barrier_rw(void) -{ - bus_space_barrier(I386_BUS_SPACE_MEM, 0, 0, ~0, - BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); -} - /* * Flags used in various bus DMA methods. */ diff --git a/sys/ia64/include/bus.h b/sys/ia64/include/bus.h index 9bb2f76..724d1d5 100644 --- a/sys/ia64/include/bus.h +++ b/sys/ia64/include/bus.h @@ -1024,29 +1024,6 @@ bus_space_barrier(bus_space_tag_t tag, bus_space_handle_t bsh, } /* - * Generic memory barrier functions. - */ -static __inline void -barrier_read(void) -{ - bus_space_barrier(IA64_BUS_SPACE_MEM, 0, 0, ~0, BUS_SPACE_BARRIER_READ); -} - -static __inline void -barrier_write(void) -{ - bus_space_barrier(IA64_BUS_SPACE_MEM, 0, 0, ~0, - BUS_SPACE_BARRIER_WRITE); -} - -static __inline void -barrier_rw(void) -{ - bus_space_barrier(IA64_BUS_SPACE_MEM, 0, 0, ~0, - BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); -} - -/* * Flags used in various bus DMA methods. */ #define BUS_DMA_WAITOK 0x00 /* safe to sleep (pseudo-flag) */ diff --git a/sys/sys/bus_dma.h b/sys/sys/bus_dma.h index 3423e6b..9f036b6 100644 --- a/sys/sys/bus_dma.h +++ b/sys/sys/bus_dma.h @@ -1152,30 +1152,6 @@ bus_space_barrier(bus_space_tag_t tag, bus_space_handle_t bsh, __asm __volatile("" : : : "memory"); } - -/* - * Generic memory barrier functions. - */ -static __inline void -barrier_read(void) -{ - bus_space_barrier(I386_BUS_SPACE_MEM, 0, 0, ~0, BUS_SPACE_BARRIER_READ); -} - -static __inline void -barrier_write(void) -{ - bus_space_barrier(I386_BUS_SPACE_MEM, 0, 0, ~0, - BUS_SPACE_BARRIER_WRITE); -} - -static __inline void -barrier_rw(void) -{ - bus_space_barrier(I386_BUS_SPACE_MEM, 0, 0, ~0, - BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); -} - /* * Flags used in various bus DMA methods. */ -- cgit v1.1