1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 #ifndef _LINUX_EISA_H #define _LINUX_EISA_H #include <linux/ioport.h> #include <linux/device.h> #include <linux/mod_devicetable.h> #define EISA_MAX_SLOTS 8 #define EISA_MAX_RESOURCES 4 /* A few EISA constants/offsets... */ #define EISA_DMA1_STATUS 8 #define EISA_INT1_CTRL 0x20 #define EISA_INT1_MASK 0x21 #define EISA_INT2_CTRL 0xA0 #define EISA_INT2_MASK 0xA1 #define EISA_DMA2_STATUS 0xD0 #define EISA_DMA2_WRITE_SINGLE 0xD4 #define EISA_EXT_NMI_RESET_CTRL 0x461 #define EISA_INT1_EDGE_LEVEL 0x4D0 #define EISA_INT2_EDGE_LEVEL 0x4D1 #define EISA_VENDOR_ID_OFFSET 0xC80 #define EISA_CONFIG_OFFSET 0xC84 #define EISA_CONFIG_ENABLED 1 #define EISA_CONFIG_FORCED 2 /* There is not much we can say about an EISA device, apart from * signature, slot number, and base address. dma_mask is set by * default to parent device mask..*/ struct eisa_device { struct eisa_device_id id; int slot; int state; unsigned long base_addr; struct resource res[EISA_MAX_RESOURCES]; u64 dma_mask; struct device dev; /* generic device */ #ifdef CONFIG_EISA_NAMES char pretty_name[50]; #endif }; #define to_eisa_device(n) container_of(n, struct eisa_device, dev) static inline int eisa_get_region_index (void *addr) { unsigned long x = (unsigned long) addr; x &= 0xc00; return (x >> 12); } struct eisa_driver { const struct eisa_device_id *id_table; struct device_driver driver; }; #define to_eisa_driver(drv) container_of(drv,struct eisa_driver, driver) /* These external functions are only available when EISA support is enabled. */ #ifdef CONFIG_EISA extern struct bus_type eisa_bus_type; int eisa_driver_register (struct eisa_driver *edrv); void eisa_driver_unregister (struct eisa_driver *edrv); #else /* !CONFIG_EISA */ static inline int eisa_driver_register (struct eisa_driver *edrv) { return 0; } static inline void eisa_driver_unregister (struct eisa_driver *edrv) { } #endif /* !CONFIG_EISA */ /* Mimics pci.h... */ static inline void *eisa_get_drvdata (struct eisa_device *edev/* * include/linux/backing-dev.h * * low-level device information and state which is propagated up through * to high-level code. */ #ifndef _LINUX_BACKING_DEV_H #define _LINUX_BACKING_DEV_H #include <linux/percpu_counter.h> #include <linux/log2.h> #include <linux/proportions.h> #include <linux/kernel.h> #include <linux/fs.h> #include <linux/sched.h> #include <linux/timer.h> #include <linux/writeback.h> #include <asm/atomic.h> struct page; struct device; struct dentry; /* * Bits in backing_dev_info.state */ enum bdi_state { BDI_pending, /* On its way to being activated */ BDI_wb_alloc, /* Default embedded wb allocated */ BDI_async_congested, /* The async (write) queue is getting full */ BDI_sync_congested, /* The sync queue is getting full */ BDI_registered, /* bdi_register() was done */ BDI_writeback_running, /* Writeback is in progress */ BDI_unused, /* Available bits start here */ }; typedef int (congested_fn)(void *, int); enum bdi_stat_item { BDI_RECLAIMABLE, BDI_WRITEBACK, NR_BDI_STAT_ITEMS }; #define BDI_STAT_BATCH (8*(1+ilog2(nr_