summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/device.h15
-rw-r--r--include/linux/dma-mapping.h17
-rw-r--r--include/linux/ext3_fs_i.h21
-rw-r--r--include/linux/gfp.h1
-rw-r--r--include/linux/if_bonding.h10
-rw-r--r--include/linux/mmzone.h15
-rw-r--r--include/linux/pci.h13
-rw-r--r--include/linux/sched.h11
-rw-r--r--include/linux/slab.h2
-rw-r--r--include/linux/swap.h6
-rw-r--r--include/linux/sysctl.h3
11 files changed, 78 insertions, 36 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 48612267bd65..a2d6e8171f9b 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -396,22 +396,21 @@ extern int firmware_register(struct subsystem *);
extern void firmware_unregister(struct subsystem *);
/* debugging and troubleshooting/diagnostic helpers. */
+#define dev_printk(sev, dev, format, arg...) \
+ printk(sev "%s %s: " format , (dev).driver->name , (dev).bus_id , ## arg)
+
#ifdef DEBUG
#define dev_dbg(dev, format, arg...) \
- printk (KERN_DEBUG "%s %s: " format , \
- (dev).driver->name , (dev).bus_id , ## arg)
+ dev_printk(KERN_DEBUG , (dev) , format , ## arg)
#else
#define dev_dbg(dev, format, arg...) do {} while (0)
#endif
#define dev_err(dev, format, arg...) \
- printk (KERN_ERR "%s %s: " format , \
- (dev).driver->name , (dev).bus_id , ## arg)
+ dev_printk(KERN_ERR , (dev) , format , ## arg)
#define dev_info(dev, format, arg...) \
- printk (KERN_INFO "%s %s: " format , \
- (dev).driver->name , (dev).bus_id , ## arg)
+ dev_printk(KERN_INFO , (dev) , format , ## arg)
#define dev_warn(dev, format, arg...) \
- printk (KERN_WARNING "%s %s: " format , \
- (dev).driver->name , (dev).bus_id , ## arg)
+ dev_printk(KERN_WARNING , (dev) , format , ## arg)
#endif /* _DEVICE_H_ */
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
new file mode 100644
index 000000000000..9d88549ff2fc
--- /dev/null
+++ b/include/linux/dma-mapping.h
@@ -0,0 +1,17 @@
+#ifndef _ASM_LINUX_DMA_MAPPING_H
+#define _ASM_LINUX_DMA_MAPPING_H
+
+/* These definitions mirror those in pci.h, so they can be used
+ * interchangeably with their PCI_ counterparts */
+enum dma_data_direction {
+ DMA_BIDIRECTIONAL = 0,
+ DMA_TO_DEVICE = 1,
+ DMA_FROM_DEVICE = 2,
+ DMA_NONE = 3,
+};
+
+#include <asm/dma-mapping.h>
+
+#endif
+
+
diff --git a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h
index ec11e1ab01c5..02021676dd74 100644
--- a/include/linux/ext3_fs_i.h
+++ b/include/linux/ext3_fs_i.h
@@ -32,9 +32,30 @@ struct ext3_inode_info {
__u32 i_file_acl;
__u32 i_dir_acl;
__u32 i_dtime;
+
+ /*
+ * i_block_group is the number of the block group which contains
+ * this file's inode. Constant across the lifetime of the inode,
+ * it is ued for making block allocation decisions - we try to
+ * place a file's data blocks near its inode block, and new inodes
+ * near to their parent directory's inode.
+ */
__u32 i_block_group;
__u32 i_state; /* Dynamic state flags for ext3 */
+
+ /*
+ * i_next_alloc_block is the logical (file-relative) number of the
+ * most-recently-allocated block in this file. Yes, it is misnamed.
+ * We use this for detecting linearly ascending allocation requests.
+ */
__u32 i_next_alloc_block;
+
+ /*
+ * i_next_alloc_goal is the *physical* companion to i_next_alloc_block.
+ * it the the physical block number of the block which was most-recently
+ * allocated to this file. This give us the goal (target) for the next
+ * allocation when we detect linearly ascending requests.
+ */
__u32 i_next_alloc_goal;
#ifdef EXT3_PREALLOCATE
__u32 i_prealloc_block;
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 8e093813e4f7..54bf03eaf3e7 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -18,6 +18,7 @@
#define __GFP_HIGHIO 0x80 /* Can start high mem physical IO? */
#define __GFP_FS 0x100 /* Can call down to low-level FS? */
#define __GFP_COLD 0x200 /* Cache-cold page required */
+#define __GFP_NOWARN 0x400 /* Suppress page allocation failure warning */
#define GFP_NOHIGHIO ( __GFP_WAIT | __GFP_IO)
#define GFP_NOIO ( __GFP_WAIT)
diff --git a/include/linux/if_bonding.h b/include/linux/if_bonding.h
index a263da6bd01c..b673b0830ddd 100644
--- a/include/linux/if_bonding.h
+++ b/include/linux/if_bonding.h
@@ -37,9 +37,10 @@
#define BOND_CHECK_MII_STATUS (SIOCGMIIPHY)
-#define BOND_MODE_ROUNDROBIN 0
-#define BOND_MODE_ACTIVEBACKUP 1
-#define BOND_MODE_XOR 2
+#define BOND_MODE_ROUNDROBIN 0
+#define BOND_MODE_ACTIVEBACKUP 1
+#define BOND_MODE_XOR 2
+#define BOND_MODE_BROADCAST 3
/* each slave's link has 4 states */
#define BOND_LINK_UP 0 /* link is up and running */
@@ -74,6 +75,7 @@ typedef struct slave {
struct slave *prev;
struct net_device *dev;
short delay;
+ unsigned long jiffies;
char link; /* one of BOND_LINK_XXXX */
char state; /* one of BOND_STATE_XXXX */
unsigned short original_flags;
@@ -93,6 +95,8 @@ typedef struct bonding {
slave_t *next;
slave_t *prev;
slave_t *current_slave;
+ slave_t *primary_slave;
+ slave_t *current_arp_slave;
__s32 slave_cnt;
rwlock_t lock;
rwlock_t ptrlock;
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index f286bf9aeefd..14ce2049de71 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -193,16 +193,6 @@ typedef struct pglist_data {
extern int numnodes;
extern struct pglist_data *pgdat_list;
-static inline int
-memclass(struct zone *pgzone, struct zone *classzone)
-{
- if (pgzone->zone_pgdat != classzone->zone_pgdat)
- return 0;
- if (pgzone > classzone)
- return 0;
- return 1;
-}
-
void get_zone_counts(unsigned long *active, unsigned long *inactive);
void build_all_zonelists(void);
void wakeup_kswapd(struct zone *zone);
@@ -335,11 +325,6 @@ static inline unsigned int num_online_memblks(void)
#define num_online_memblks() 1
#endif /* CONFIG_DISCONTIGMEM || CONFIG_NUMA */
-
-
-#define MAP_ALIGN(x) ((((x) % sizeof(struct page)) == 0) ? (x) : ((x) + \
- sizeof(struct page) - ((x) % sizeof(struct page))))
-
#endif /* !__ASSEMBLY__ */
#endif /* __KERNEL__ */
#endif /* _LINUX_MMZONE_H */
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 557b17d959c1..9d4e269ac1db 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -558,8 +558,16 @@ void pcibios_fixup_pbus_ranges(struct pci_bus *, struct pbus_set_ranges_data *);
/* Generic PCI functions used internally */
int pci_bus_exists(const struct list_head *list, int nr);
-struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, void *sysdata);
-struct pci_bus *pci_alloc_primary_bus(int bus);
+struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, struct pci_ops *ops, void *sysdata);
+static inline struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, void *sysdata)
+{
+ return pci_scan_bus_parented(NULL, bus, ops, sysdata);
+}
+struct pci_bus *pci_alloc_primary_bus_parented(struct device * parent, int bus);
+static inline struct pci_bus *pci_alloc_primary_bus(int bus)
+{
+ return pci_alloc_primary_bus_parented(NULL, bus);
+}
struct pci_dev *pci_scan_slot(struct pci_dev *temp);
int pci_proc_attach_device(struct pci_dev *dev);
int pci_proc_detach_device(struct pci_dev *dev);
@@ -826,5 +834,6 @@ extern int pci_pci_problems;
#define PCIPCI_VIAETBF 8
#define PCIPCI_VSFX 16
+
#endif /* __KERNEL__ */
#endif /* LINUX_PCI_H */
diff --git a/include/linux/sched.h b/include/linux/sched.h
index d0726cb87145..7c3bbfc255ed 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -419,13 +419,12 @@ do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0)
#define PF_MEMALLOC 0x00000800 /* Allocating memory */
#define PF_MEMDIE 0x00001000 /* Killed for out-of-memory */
#define PF_FLUSHER 0x00002000 /* responsible for disk writeback */
-#define PF_NOWARN 0x00004000 /* debug: don't warn if alloc fails */
-#define PF_FREEZE 0x00008000 /* this task should be frozen for suspend */
-#define PF_IOTHREAD 0x00010000 /* this thread is needed for doing I/O to swap */
-#define PF_FROZEN 0x00020000 /* frozen for system suspend */
-#define PF_FSTRANS 0x00040000 /* inside a filesystem transaction */
-#define PF_KSWAPD 0x00080000 /* I am kswapd */
+#define PF_FREEZE 0x00004000 /* this task should be frozen for suspend */
+#define PF_IOTHREAD 0x00008000 /* this thread is needed for doing I/O to swap */
+#define PF_FROZEN 0x00010000 /* frozen for system suspend */
+#define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */
+#define PF_KSWAPD 0x00040000 /* I am kswapd */
/*
* Ptrace flags
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 3a5a6d576f93..997bc710bfb0 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -23,7 +23,7 @@ typedef struct kmem_cache_s kmem_cache_t;
#define SLAB_KERNEL GFP_KERNEL
#define SLAB_DMA GFP_DMA
-#define SLAB_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_HIGHIO|__GFP_FS)
+#define SLAB_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_HIGHIO|__GFP_FS|__GFP_COLD|__GFP_NOWARN)
#define SLAB_NO_GROW 0x00001000UL /* don't grow a cache */
/* flags to pass to kmem_cache_create().
diff --git a/include/linux/swap.h b/include/linux/swap.h
index c635f392d6c1..9ab02098aad5 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -7,6 +7,7 @@
#include <linux/linkage.h>
#include <linux/mmzone.h>
#include <linux/list.h>
+#include <linux/sched.h>
#include <asm/atomic.h>
#include <asm/page.h>
@@ -14,6 +15,11 @@
#define SWAP_FLAG_PRIO_MASK 0x7fff
#define SWAP_FLAG_PRIO_SHIFT 0
+static inline int current_is_kswapd(void)
+{
+ return current->flags & PF_KSWAPD;
+}
+
/*
* MAX_SWAPFILES defines the maximum number of swaptypes: things which can
* be swapped to. The swap type and the offset into that swap type are
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 0b905659ac4b..b115623159e9 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -544,7 +544,8 @@ enum {
NET_SCTP_PATH_MAX_RETRANS = 8,
NET_SCTP_MAX_INIT_RETRANSMITS = 9,
NET_SCTP_HB_INTERVAL = 10,
- NET_SCTP_MAX_BURST = 11,
+ NET_SCTP_PRESERVE_ENABLE = 11,
+ NET_SCTP_MAX_BURST = 12,
};
/* CTL_PROC names: */