]> xenbits.xensource.com Git - seabios.git/commitdiff
Misc conversions to GET/SET_LOWFLAT().
authorKevin O'Connor <kevin@koconnor.net>
Fri, 25 May 2012 03:56:19 +0000 (23:56 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Fri, 25 May 2012 03:56:19 +0000 (23:56 -0400)
Convert from GET/SET_FLATPTR() to GET/SET_LOWFLAT() - the latter
produces better code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
src/ata.c
src/usb.c

index b261bfe964c474c22dadd943a0f1e5c009e8317f..3246acbc4e7e978ce9193290b2cc008b04c2182b 100644 (file)
--- a/src/ata.c
+++ b/src/ata.c
@@ -408,14 +408,14 @@ ata_try_dma(struct disk_op_s *op, int iswrite, int blocksize)
         if (count > max)
             count = max;
 
-        SET_FLATPTR(dma->buf_fl, dest);
+        SET_LOWFLAT(dma->buf_fl, dest);
         bytes -= count;
         if (!bytes)
             // Last descriptor.
             count |= 1<<31;
         dprintf(16, "dma@%p: %08x %08x\n", dma, dest, count);
         dest += count;
-        SET_FLATPTR(dma->count, count);
+        SET_LOWFLAT(dma->count, count);
         dma++;
     }
 
index aaa2c8e300721d3e19d98aa7e62c233f24e2d469..1391f0eaa5bab16166b77cfb610462594965554e 100644 (file)
--- a/src/usb.c
+++ b/src/usb.c
@@ -59,7 +59,7 @@ send_control(struct usb_pipe *pipe, int dir, const void *cmd, int cmdsize
 int
 usb_send_bulk(struct usb_pipe *pipe_fl, int dir, void *data, int datasize)
 {
-    switch (GET_FLATPTR(pipe_fl->type)) {
+    switch (GET_LOWFLAT(pipe_fl->type)) {
     default:
     case USB_TYPE_UHCI:
         return uhci_send_bulk(pipe_fl, dir, data, datasize);
@@ -73,7 +73,7 @@ usb_send_bulk(struct usb_pipe *pipe_fl, int dir, void *data, int datasize)
 int noinline
 usb_poll_intr(struct usb_pipe *pipe_fl, void *data)
 {
-    switch (GET_FLATPTR(pipe_fl->type)) {
+    switch (GET_LOWFLAT(pipe_fl->type)) {
     default:
     case USB_TYPE_UHCI:
         return uhci_poll_intr(pipe_fl, data);