z80pack: Fix the micropack build and the swap
authorAlan Cox <alan@linux.intel.com>
Mon, 20 Apr 2015 22:09:14 +0000 (23:09 +0100)
committerAlan Cox <alan@linux.intel.com>
Mon, 20 Apr 2015 22:09:14 +0000 (23:09 +0100)
Kernel/dev/z80pack/devfd.c
Kernel/platform-micropack/config.h

index 05f5929..022d4b8 100644 (file)
@@ -90,7 +90,7 @@ static int fd_transfer(bool is_read, uint8_t minor, uint8_t rawflag)
     } else if (rawflag == 2) {         /* Swap device special */
         dlen = swapcnt;
         dptr = (uint16_t)swapbase;
-        page = &swapproc->p_page;      /* Acting on this task */
+        page = &swappage;              /* Acting on this page */
         block = swapblk;
         block_xfer = dlen >> 7;                /* We want this in 128 byte sectors */
         map = 1;
index db5e915..41584d8 100644 (file)
@@ -32,6 +32,7 @@
 #define SWAPBASE    0x0000     /* We swap the lot in one, include the */
 #define SWAPTOP            0x8000      /* vectors so its a round number of sectors */
 #define MAX_SWAPS      64      /* The full drive would actually be 170! */
+#define swap_map(x)    ((uint8_t *)(x)) /* Simple zero based mapping */
 
 #define BOOT_TTY (512 + 1)/* Set this to default device for stdio, stderr */
                           /* In this case, the default is the first TTY device */