#include <netdev.h>
#if defined(CONFIG_LARGE_IO_DIRECT)
-#define read_direct(flag) (!udata.u_sysio)
+#define read_direct(dev, flag) (!udata.u_sysio && CONFIG_LARGE_IO_DIRECT(dev))
#elif (NBUFS >= 32)
-#define read_direct(flag) (flag & O_DIRECT)
+#define read_direct(dev, flag) (flag & O_DIRECT)
#endif
/* This assumes it's called once before we do I/O. That's wrong and we
#if !defined(read_direct)
bp = NULL;
#else
- if (pblk != NULLBLK && (bp = bfind(dev, pblk)) == NULL && !ispipe && amount == BLKSIZE && read_direct(flag)) {
+ if (pblk != NULLBLK && (bp = bfind(dev, pblk)) == NULL && !ispipe && amount == BLKSIZE && read_direct(major(dev), flag)) {
/* we can transfer direct from disk to the userspace buffer */
/* FIXME: allow for async queued I/O here. We want
an API something like breadasync() that either
#define BOOTDEVICE 0x0100 /* Only one possible option */
#endif
-#define CONFIG_LARGE_IO_DIRECT /* Definite win as our I/O is as fast as a
- memcpy! */
+#define CONFIG_LARGE_IO_DIRECT(m) 1
+ /* Definite win as our I/O is as fast as a memcpy! */
#define platform_discard()
#define platform_copyright()
#define MAX_SWAPS 32
/* Permit large I/O requests to bypass cache and go direct to userspace */
-#define CONFIG_LARGE_IO_DIRECT
+#define CONFIG_LARGE_IO_DIRECT(x) 1
/* Video terminal, not a serial tty */
#define CONFIG_VT
#define MAX_SWAPS 32
/* Permit large I/O requests to bypass cache and go direct to userspace */
-#define CONFIG_LARGE_IO_DIRECT
+#define CONFIG_LARGE_IO_DIRECT(x) 1
/* Video terminal, not a serial tty */
#define CONFIG_VT
#define NMOUNTS 4 /* Number of mounts at a time */
#define CONFIG_DYNAMIC_BUFPOOL
-#define CONFIG_LARGE_IO_DIRECT
+#define CONFIG_LARGE_IO_DIRECT(x) 1
#define platform_copyright()
#define MAX_SWAPS 32
/* Permit large I/O requests to bypass cache and go direct to userspace */
-#define CONFIG_LARGE_IO_DIRECT
+#define CONFIG_LARGE_IO_DIRECT(x) 1
/* Reclaim the discard space for buffers */
#define CONFIG_DYNAMIC_BUFPOOL
#define MAX_SWAPS 32
/* Permit large I/O requests to bypass cache and go direct to userspace */
-#define CONFIG_LARGE_IO_DIRECT
+#define CONFIG_LARGE_IO_DIRECT(x) 1
/* Reclaim the discard space for buffers */
#define CONFIG_DYNAMIC_BUFPOOL
#define UDATA_SIZE 0x200
#define MAXTICKS 20
/* Direct I/O support */
-#define CONFIG_LARGE_IO_DIRECT
+#define CONFIG_LARGE_IO_DIRECT(x) 1
/* Raw input layer */
#define CONFIG_INPUT
/* Full keycode level grabbing supported */
#define CONFIG_PARENT_FIRST
#define MAXTICKS 20
/* Permit large I/O requests to bypass cache and go direct to userspace */
-#define CONFIG_LARGE_IO_DIRECT
+#define CONFIG_LARGE_IO_DIRECT(x) 1
/* One memory bank */
#define CONFIG_BANKS 1
#define TICKSPERSEC 10 /* Ticks per second */
/* Swap based one process in RAM */
#define CONFIG_SWAP_ONLY
/* Permit large I/O requests to bypass cache and go direct to userspace */
-#define CONFIG_LARGE_IO_DIRECT
+#define CONFIG_LARGE_IO_DIRECT(x) 1
/* One memory bank */
#define CONFIG_BANKS 1
#define TICKSPERSEC 50 /* Ticks per second */
/* Fixed banking: 8 x 64K banks, top 4KB is shared with kernel, 60KB-62KB is user memory */
#define CONFIG_BANK_FIXED
/* Permit large I/O requests to bypass cache and go direct to userspace */
-#define CONFIG_LARGE_IO_DIRECT
+#define CONFIG_LARGE_IO_DIRECT(x) 1
/* 8 60K banks, 1 is kernel */
#define MAX_MAPS 8
#define MAP_SIZE PROGTOP /* WRS: I feel this should be 60KB, but setting it so breaks pagemap_realloc() when exec calls it */
#define NMOUNTS 4 /* Number of mounts at a time */
/* Do I/O direct to user space */
-#define CONFIG_LARGE_IO_DIRECT
+#define CONFIG_LARGE_IO_DIRECT(x) 1
/* Reclaim the discard space for buffers */
#define CONFIG_DYNAMIC_BUFPOOL
/* Fixed banking: 8 x 64K banks, top 4KB is shared with kernel */
#define CONFIG_BANK_FIXED
/* Permit large I/O requests to bypass cache and go direct to userspace */
-#define CONFIG_LARGE_IO_DIRECT
+#define CONFIG_LARGE_IO_DIRECT(x) 1
/* 8 60K banks, 1 is kernel */
#define MAX_MAPS 16
#define MAP_SIZE PROGTOP /* 0xF000 breaks pagemap_realloc() / exec() */
#define NBUFS 6 /* Number of block buffers */
#define NMOUNTS 2 /* Number of mounts at a time */
-#define CONFIG_LARGE_IO_DIRECT
+#define CONFIG_LARGE_IO_DIRECT(x) 1
#define swap_map(x) (uint8_t *)(0x4000 + ((x) & 0x3FFF)) /* For now */
/* Swap based one process in RAM */
#define CONFIG_SWAP_ONLY
/* Permit large I/O requests to bypass cache and go direct to userspace */
-#define CONFIG_LARGE_IO_DIRECT
+#define CONFIG_LARGE_IO_DIRECT(x) 1
/* One memory bank */
#define CONFIG_BANKS 1
#define TICKSPERSEC 10 /* Ticks per second */
/* Flexible 4x16K banking */
#define CONFIG_BANK16
/* Permit large I/O requests to bypass cache and go direct to userspace */
-#define CONFIG_LARGE_IO_DIRECT
+#define CONFIG_LARGE_IO_DIRECT(x) 1
/* 32 x 16K pages, 3 pages for kernel, whatever the RAM disk uses */
#define MAX_MAPS (32 - 3)
the buffer cache. For all small (eg bit) systems this is the right setting
as it avoids polluting the small cache with data when it needs to be full
of directory and inode information */
-#define CONFIG_LARGE_IO_DIRECT
+#define CONFIG_LARGE_IO_DIRECT(x) 1
/* Specify this if there is a real time clock capable of reporting seconds. It
will be used to lock the kernel time better to reality. Other details like
#define CONFIG_PARENT_FIRST
#define MAXTICKS 20
/* Permit large I/O requests to bypass cache and go direct to userspace */
-#define CONFIG_LARGE_IO_DIRECT
+#define CONFIG_LARGE_IO_DIRECT(x) 1
/* One memory bank */
#define CONFIG_BANKS 1
#define TICKSPERSEC 10 /* Ticks per second */
#define MAX_BLKDEV 1 /* Only the one SPI supported for now */
#define SD_DRIVE_COUNT 1
-#define CONFIG_LARGE_IO_DIRECT
+#define CONFIG_LARGE_IO_DIRECT(x) 1
#define platform_discard()
#define platform_copyright()
the buffer cache. For all small (eg bit) systems this is the right setting
as it avoids polluting the small cache with data when it needs to be full
of directory and inode information */
-#define CONFIG_LARGE_IO_DIRECT
+#define CONFIG_LARGE_IO_DIRECT(x) 1
/* Specify this if there is a real time clock capable of reporting seconds. It
will be used to lock the kernel time better to reality. Other details like
#define CONFIG_IDE
-#define CONFIG_LARGE_IO_DIRECT /* We support direct to user I/O */
+#define CONFIG_LARGE_IO_DIRECT(x) 1 /* We support direct to user I/O */
/* Enable to make ^Z dump the inode table for debug */
#undef CONFIG_IDUMP
/* Enable to make ^A drop back into the monitor */
/* Reclaim the discard space for buffers */
#define CONFIG_DYNAMIC_BUFPOOL
/* Use large I/O */
-#define CONFIG_LARGE_IO_DIRECT
+#define CONFIG_LARGE_IO_DIRECT(x) 1
extern void platform_discard(void);
#define platform_copyright()
/* Banked memory set up */
#define CONFIG_BANK_FIXED
/* Direct I/O support */
-#define CONFIG_LARGE_IO_DIRECT
+#define CONFIG_LARGE_IO_DIRECT(x) 1
/* Raw input layer */
#define CONFIG_INPUT
/* Full keycode level grabbing supported */
#define CONFIG_DYNAMIC_BUFPOOL
#define CONFIG_DYNAMIC_SWAP
-#define CONFIG_LARGE_IO_DIRECT
+#define CONFIG_LARGE_IO_DIRECT(x) 1
#define MAX_BLKDEV 4
the buffer cache. For all small (eg bit) systems this is the right setting
as it avoids polluting the small cache with data when it needs to be full
of directory and inode information */
-#define CONFIG_LARGE_IO_DIRECT
+#define CONFIG_LARGE_IO_DIRECT(x) 1
/* Specify this if there is a real time clock capable of reporting seconds. It
will be used to lock the kernel time better to reality. Other details like
#define CONFIG_NET
#define CONFIG_NET_NATIVE
/* Read processes and big I/O direct into process space */
-#define CONFIG_LARGE_IO_DIRECT
+#define CONFIG_LARGE_IO_DIRECT(x) 1
/* Banks as reported to user space */
#define CONFIG_BANKS 1
/* Flexible 4x16K banking */
#define CONFIG_BANK16
/* Permit large I/O requests to bypass cache and go direct to userspace */
-#define CONFIG_LARGE_IO_DIRECT
+#define CONFIG_LARGE_IO_DIRECT(x) 1
/* 32 x 16K pages, 3 pages for kernel, whatever the RAM disk uses */
#define MAX_MAPS (32 - 3 - DEV_RD_RAM_PAGES)
#define CONFIG_IDE
-#define CONFIG_LARGE_IO_DIRECT /* We support direct to user I/O */
+#define CONFIG_LARGE_IO_DIRECT(x) 1 /* We support direct to user I/O */
#define CONFIG_SD
#define SD_DRIVE_COUNT 2
/* Enable to make ^Z dump the inode table for debug */
#define CONFIG_IDE
#define CONFIG_SD
#define SD_DRIVE_COUNT 2
-#define CONFIG_LARGE_IO_DIRECT /* We support direct to user I/O */
+#define CONFIG_LARGE_IO_DIRECT(x) 1 /* We support direct to user I/O */
/* Enable to make ^Z dump the inode table for debug */
#undef CONFIG_IDUMP