summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 20:30:11 -0800
committerLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 20:30:11 -0800
commit5db5272c0a5cd37e5a697e4750fbc4ce6317b7dc (patch)
treeebb132cbe03d613b01bea25c3c552360c8acb2ec /include
parentaad40ef3f2b9c4077e5a79606aed24a92ccb0406 (diff)
v2.4.14 -> v2.4.14.1
- me: fix page flags race condition Andrea found - David Miller: sparc and network updates - various: fix loop driver that thought it was part of the VM system - me: teach DRM about VM_RESERVED - Alan Cox: more merging
Diffstat (limited to 'include')
-rw-r--r--include/asm-i386/system.h4
-rw-r--r--include/asm-sparc/pci.h2
-rw-r--r--include/linux/if_bonding.h86
-rw-r--r--include/linux/kernel.h6
-rw-r--r--include/linux/mm.h16
-rw-r--r--include/linux/pci_ids.h4
-rw-r--r--include/linux/sockios.h9
-rw-r--r--include/linux/swap.h6
8 files changed, 112 insertions, 21 deletions
diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h
index cfcaa64f00fd..1c056176ea2d 100644
--- a/include/asm-i386/system.h
+++ b/include/asm-i386/system.h
@@ -349,6 +349,10 @@ extern void __global_restore_flags(unsigned long);
void disable_hlt(void);
void enable_hlt(void);
+extern unsigned long dmi_broken;
extern int is_sony_vaio_laptop;
+#define BROKEN_ACPI_Sx 0x0001
+#define BROKEN_INIT_AFTER_S1 0x0002
+
#endif
diff --git a/include/asm-sparc/pci.h b/include/asm-sparc/pci.h
index 59aa22d71253..2f9feef28411 100644
--- a/include/asm-sparc/pci.h
+++ b/include/asm-sparc/pci.h
@@ -113,6 +113,8 @@ extern inline int pci_dma_supported(struct pci_dev *hwdev, u64 mask)
return 1;
}
+#define pci_dac_dma_supported(dev, mask) (0)
+
/* Return the index of the PCI controller for device PDEV. */
#define pci_controller_num(PDEV) (0)
diff --git a/include/linux/if_bonding.h b/include/linux/if_bonding.h
index 791127363db7..d719560dde0b 100644
--- a/include/linux/if_bonding.h
+++ b/include/linux/if_bonding.h
@@ -9,16 +9,94 @@
* (c) Copyright 1999, Thomas Davis, tadavis@lbl.gov
*
* This software may be used and distributed according to the terms
- * of the GNU General Public License, incorporated herein by reference.
+ * of the GNU Public License, incorporated herein by reference.
*
*/
#ifndef _LINUX_IF_BONDING_H
#define _LINUX_IF_BONDING_H
-#define BOND_ENSLAVE (SIOCDEVPRIVATE)
-#define BOND_RELEASE (SIOCDEVPRIVATE + 1)
-#define BOND_SETHWADDR (SIOCDEVPRIVATE + 2)
+#ifdef __KERNEL__
+#include <linux/timer.h>
+#include <linux/if.h>
+#include <linux/proc_fs.h>
+#endif /* __KERNEL__ */
+
+#include <linux/types.h>
+
+/*
+ * We can remove these ioctl definitions in 2.5. People should use the
+ * SIOC*** versions of them instead
+ */
+#define BOND_ENSLAVE_OLD (SIOCDEVPRIVATE)
+#define BOND_RELEASE_OLD (SIOCDEVPRIVATE + 1)
+#define BOND_SETHWADDR_OLD (SIOCDEVPRIVATE + 2)
+#define BOND_SLAVE_INFO_QUERY_OLD (SIOCDEVPRIVATE + 11)
+#define BOND_INFO_QUERY_OLD (SIOCDEVPRIVATE + 12)
+#define BOND_CHANGE_ACTIVE_OLD (SIOCDEVPRIVATE + 13)
+
+#define BOND_CHECK_MII_STATUS (SIOCGMIIPHY)
+
+#define BOND_MODE_ROUNDROBIN 0
+#define BOND_MODE_ACTIVEBACKUP 1
+#define BOND_MODE_XOR 2
+
+/* each slave's link has 4 states */
+#define BOND_LINK_UP 0 /* link is up and running */
+#define BOND_LINK_FAIL 1 /* link has just gone down */
+#define BOND_LINK_DOWN 2 /* link has been down for too long time */
+#define BOND_LINK_BACK 3 /* link is going back */
+
+/* each slave has several states */
+#define BOND_STATE_ACTIVE 0 /* link is active */
+#define BOND_STATE_BACKUP 1 /* link is backup */
+
+#define MAX_BONDS 1 /* Maximum number of devices to support */
+
+typedef struct ifbond {
+ __s32 bond_mode;
+ __s32 num_slaves;
+ __s32 miimon;
+} ifbond;
+
+typedef struct ifslave
+{
+ __s32 slave_id; /* Used as an IN param to the BOND_SLAVE_INFO_QUERY ioctl */
+ char slave_name[IFNAMSIZ];
+ char link;
+ char state;
+ __u32 link_failure_count;
+} ifslave;
+
+#ifdef __KERNEL__
+typedef struct slave {
+ struct slave *next;
+ struct slave *prev;
+ struct net_device *dev;
+ short delay;
+ char link; /* one of BOND_LINK_XXXX */
+ char state; /* one of BOND_STATE_XXXX */
+ u32 link_failure_count;
+} slave_t;
+
+typedef struct bonding {
+ slave_t *next;
+ slave_t *prev;
+ slave_t *current_slave;
+ __s32 slave_cnt;
+ rwlock_t lock;
+ rwlock_t ptrlock;
+ struct timer_list mii_timer;
+ struct timer_list arp_timer;
+ struct net_device_stats *stats;
+#ifdef CONFIG_PROC_FS
+ struct proc_dir_entry *bond_proc_dir;
+ struct proc_dir_entry *bond_proc_info_file;
+#endif /* CONFIG_PROC_FS */
+ struct bonding *next_bond;
+ struct net_device *device;
+} bonding_t;
+#endif /* __KERNEL__ */
#endif /* _LINUX_BOND_H */
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 904588c1754e..f6821a2668b2 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -60,9 +60,11 @@ extern unsigned long simple_strtoul(const char *,char **,unsigned int);
extern long simple_strtol(const char *,char **,unsigned int);
extern unsigned long long simple_strtoull(const char *,char **,unsigned int);
extern long long simple_strtoll(const char *,char **,unsigned int);
-extern int sprintf(char * buf, const char * fmt, ...);
+extern int sprintf(char * buf, const char * fmt, ...)
+ __attribute__ ((format (printf, 2, 3)));
extern int vsprintf(char *buf, const char *, va_list);
-extern int snprintf(char * buf, size_t size, const char *fmt, ...);
+extern int snprintf(char * buf, size_t size, const char * fmt, ...)
+ __attribute__ ((format (printf, 3, 4)));
extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
extern int sscanf(const char *, const char *, ...)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index e128b2f84bc0..171bf9e410d1 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -271,8 +271,8 @@ typedef struct page {
#define PG_uptodate 3
#define PG_dirty 4
#define PG_unused 5
-#define PG_active 6
-#define PG_inactive 7
+#define PG_lru 6
+#define PG_active 7
#define PG_slab 8
#define PG_skip 10
#define PG_highmem 11
@@ -320,14 +320,10 @@ extern void FASTCALL(set_page_dirty(struct page *));
#define PageActive(page) test_bit(PG_active, &(page)->flags)
#define SetPageActive(page) set_bit(PG_active, &(page)->flags)
#define ClearPageActive(page) clear_bit(PG_active, &(page)->flags)
-#define TestandSetPageActive(page) test_and_set_bit(PG_active, &(page)->flags)
-#define TestandClearPageActive(page) test_and_clear_bit(PG_active, &(page)->flags)
-
-#define PageInactive(page) test_bit(PG_inactive, &(page)->flags)
-#define SetPageInactive(page) set_bit(PG_inactive, &(page)->flags)
-#define ClearPageInactive(page) clear_bit(PG_inactive, &(page)->flags)
-#define TestandSetPageInactive(page) test_and_set_bit(PG_inactive, &(page)->flags)
-#define TestandClearPageInactive(page) test_and_clear_bit(PG_inactive, &(page)->flags)
+
+#define PageLRU(page) test_bit(PG_lru, &(page)->flags)
+#define TestSetPageLRU(page) test_and_set_bit(PG_lru, &(page)->flags)
+#define TestClearPageLRU(page) test_and_clear_bit(PG_lru, &(page)->flags)
#ifdef CONFIG_HIGHMEM
#define PageHighMem(page) test_bit(PG_highmem, &(page)->flags)
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index d3d966ef6c21..08e720a8904f 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1473,7 +1473,9 @@
#define PCI_DEVICE_ID_PANACOM_DUALMODEM 0x0402
#define PCI_VENDOR_ID_BROADCOM 0x14e4
-#define PCI_DEVICE_ID_TIGON3 0x1644
+#define PCI_DEVICE_ID_TIGON3_5700 0x1644
+#define PCI_DEVICE_ID_TIGON3_5701 0x1645
+#define PCI_DEVICE_ID_TIGON3_5703 0x1647
#define PCI_VENDOR_ID_SYBA 0x1592
#define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782
diff --git a/include/linux/sockios.h b/include/linux/sockios.h
index 40b85a72e9a9..0c5c4e1f803a 100644
--- a/include/linux/sockios.h
+++ b/include/linux/sockios.h
@@ -105,6 +105,15 @@
#define SIOCGIFVLAN 0x8982 /* 802.1Q VLAN support */
#define SIOCSIFVLAN 0x8983 /* Set 802.1Q VLAN options */
+/* bonding calls */
+
+#define SIOCBONDENSLAVE 0x8990 /* enslave a device to the bond */
+#define SIOCBONDRELEASE 0x8991 /* release a slave from the bond*/
+#define SIOCBONDSETHWADDR 0x8992 /* set the hw addr of the bond */
+#define SIOCBONDSLAVEINFOQUERY 0x8993 /* rtn info about slave state */
+#define SIOCBONDINFOQUERY 0x8994 /* rtn info about bond state */
+#define SIOCBONDCHANGEACTIVE 0x8995 /* update to a new active slave */
+
/* Device private ioctl calls */
/*
diff --git a/include/linux/swap.h b/include/linux/swap.h
index ab6cf6d6f958..8c6a3dd48b7f 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -166,9 +166,9 @@ extern void FASTCALL(mark_page_accessed(struct page *));
*/
#define DEBUG_LRU_PAGE(page) \
do { \
- if (PageActive(page)) \
+ if (!PageLRU(page)) \
BUG(); \
- if (PageInactive(page)) \
+ if (PageActive(page)) \
BUG(); \
if (page_count(page) == 0) \
BUG(); \
@@ -185,7 +185,6 @@ do { \
#define add_page_to_inactive_list(page) \
do { \
DEBUG_LRU_PAGE(page); \
- SetPageInactive(page); \
list_add(&(page)->lru, &inactive_list); \
nr_inactive_pages++; \
} while (0)
@@ -200,7 +199,6 @@ do { \
#define del_page_from_inactive_list(page) \
do { \
list_del(&(page)->lru); \
- ClearPageInactive(page); \
nr_inactive_pages--; \
} while (0)