amd64/4598: missing bus_space functions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

amd64/4598: missing bus_space functions

Jason Wright-2
>Number:         4598
>Category:       amd64
>Synopsis:       missing bus_space functions
>Confidential:   yes
>Severity:       non-critical
>Priority:       low
>Responsible:    bugs
>State:          open
>Quarter:        
>Keywords:      
>Date-Required:
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 05 17:30:01 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Jason Wright
>Release:        -current
>Organization:
Uh, right.
>Environment:
       
        System      : OpenBSD 3.8
        Architecture: OpenBSD.amd64
        Machine     : amd64
>Description:
        bus_space_{alloc/free} missing on amd64
>How-To-Repeat:
        try to add eso(4) to amd64 GENERIC
>Fix:
        move crap around in bus.h like the patch below.
This allows enabling of:
        eso* at pci?
        opl* at eso?
        audio* at eso?

Index: bus.h
===================================================================
RCS file: /cvs/src/sys/arch/amd64/include/bus.h,v
retrieving revision 1.3
diff -u -r1.3 bus.h
--- bus.h 25 May 2005 18:29:58 -0000 1.3
+++ bus.h 5 Nov 2005 17:12:23 -0000
@@ -104,6 +104,16 @@
 int _x86_memio_map(bus_space_tag_t t, bus_addr_t addr,
     bus_size_t size, int flags, bus_space_handle_t *bshp);
 
+#define bus_space_alloc(t,beg,end,sz,align,bound,flag,addrp,h) \
+    x86_memio_alloc((t),(beg),(end),(sz),(align),(bound),(flag),(addrp),(h))
+int x86_memio_alloc(bus_space_tag_t t, bus_addr_t rstart,
+    bus_addr_t rend, bus_size_t size, bus_size_t align,
+    bus_size_t boundary, int flags, bus_addr_t *addrp,
+    bus_space_handle_t *bshp);
+#define bus_space_free(t,h,z) x86_memio_free((t),(h),(z))
+void x86_memio_free(bus_space_tag_t t, bus_space_handle_t bsh,  
+    bus_size_t size);
+
 /*
  *      int bus_space_unmap(bus_space_tag_t t,
  *          bus_space_handle_t bsh, bus_size_t size);
@@ -120,13 +130,6 @@
 int _bus_space_map(bus_space_tag_t t, bus_addr_t addr,
     bus_size_t size, int cacheable, bus_space_handle_t *bshp);
 
-int bus_space_alloc(bus_space_tag_t t, bus_addr_t rstart,
-    bus_addr_t rend, bus_size_t size, bus_size_t align,
-    bus_size_t boundary, int cacheable, bus_addr_t *addrp,
-    bus_space_handle_t *bshp);
-void bus_space_free(bus_space_tag_t t, bus_space_handle_t bsh,
-    bus_size_t size);
-
 /*
  *      int bus_space_subregion(bus_space_tag_t t,
  *          bus_space_handle_t bsh, bus_size_t offset, bus_size_t size,
@@ -1121,30 +1124,6 @@
     bus_size_t alignment, bus_size_t boundary,
     bus_dma_segment_t *segs, int nsegs, int *rsegs, int flags,
     paddr_t low, paddr_t high);
-
-/*
- *      int bus_space_alloc(bus_space_tag_t t, bus_addr_t rstart,
- *          bus_addr_t rend, bus_size_t size, bus_size_t align,
- *          bus_size_t boundary, int flags, bus_addr_t *addrp,
- *          bus_space_handle_t *bshp);
- *
- * Allocate a region of bus space.      
- */
-
-int x86_memio_alloc(bus_space_tag_t t, bus_addr_t rstart,
-    bus_addr_t rend, bus_size_t size, bus_size_t align,
-    bus_size_t boundary, int flags, bus_addr_t *addrp,
-    bus_space_handle_t *bshp);
-
-/*          
- *      int bus_space_free(bus_space_tag_t t,
- *          bus_space_handle_t bsh, bus_size_t size);
- *
- * Free a region of bus space.
- */
-
-void x86_memio_free(bus_space_tag_t t, bus_space_handle_t bsh,  
-    bus_size_t size);
 
 /*      
  *      paddr_t bus_space_mmap(bus_space_tag_t t, bus_addr_t base,


>Release-Note:
>Audit-Trail:
>Unformatted: