diff options
| author | Jeff Garzik <jgarzik@pobox.com> | 2005-08-14 23:10:00 -0400 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-14 23:10:00 -0400 |
| commit | 4c0e176dd5e4c44dd60f398518f75eedbe1a65f3 (patch) | |
| tree | 07aea7539f78f221c6fc535a94a07befa2afdb63 /include/linux | |
| parent | f241be74b803dcf9d70c9978292946370654320f (diff) | |
| parent | 2ba84684e8cf6f980e4e95a2300f53a505eb794e (diff) | |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/acpi.h | 4 | ||||
| -rw-r--r-- | include/linux/blkdev.h | 1 | ||||
| -rw-r--r-- | include/linux/dcookies.h | 4 | ||||
| -rw-r--r-- | include/linux/fsnotify.h | 31 | ||||
| -rw-r--r-- | include/linux/ide.h | 6 | ||||
| -rw-r--r-- | include/linux/mm.h | 22 | ||||
| -rw-r--r-- | include/linux/netlink.h | 4 | ||||
| -rw-r--r-- | include/linux/netpoll.h | 20 | ||||
| -rw-r--r-- | include/linux/raid/bitmap.h | 1 | ||||
| -rw-r--r-- | include/linux/skbuff.h | 2 | ||||
| -rw-r--r-- | include/linux/swap.h | 3 | ||||
| -rw-r--r-- | include/linux/zlib.h | 5 |
12 files changed, 65 insertions, 38 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index f85cbe919e13..b46a5205ee7b 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -453,9 +453,7 @@ int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); | |||
| 453 | * If this matches the last registration, any IRQ resources for gsi | 453 | * If this matches the last registration, any IRQ resources for gsi |
| 454 | * are freed. | 454 | * are freed. |
| 455 | */ | 455 | */ |
| 456 | #ifdef CONFIG_ACPI_DEALLOCATE_IRQ | ||
| 457 | void acpi_unregister_gsi (u32 gsi); | 456 | void acpi_unregister_gsi (u32 gsi); |
| 458 | #endif | ||
| 459 | 457 | ||
| 460 | #ifdef CONFIG_ACPI_PCI | 458 | #ifdef CONFIG_ACPI_PCI |
| 461 | 459 | ||
| @@ -480,9 +478,7 @@ struct pci_dev; | |||
| 480 | int acpi_pci_irq_enable (struct pci_dev *dev); | 478 | int acpi_pci_irq_enable (struct pci_dev *dev); |
| 481 | void acpi_penalize_isa_irq(int irq, int active); | 479 | void acpi_penalize_isa_irq(int irq, int active); |
| 482 | 480 | ||
| 483 | #ifdef CONFIG_ACPI_DEALLOCATE_IRQ | ||
| 484 | void acpi_pci_irq_disable (struct pci_dev *dev); | 481 | void acpi_pci_irq_disable (struct pci_dev *dev); |
| 485 | #endif | ||
| 486 | 482 | ||
| 487 | struct acpi_pci_driver { | 483 | struct acpi_pci_driver { |
| 488 | struct acpi_pci_driver *next; | 484 | struct acpi_pci_driver *next; |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 0881b5cdee3d..19bd8e7e11bf 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -301,6 +301,7 @@ struct blk_queue_tag { | |||
| 301 | struct list_head busy_list; /* fifo list of busy tags */ | 301 | struct list_head busy_list; /* fifo list of busy tags */ |
| 302 | int busy; /* current depth */ | 302 | int busy; /* current depth */ |
| 303 | int max_depth; /* what we will send to device */ | 303 | int max_depth; /* what we will send to device */ |
| 304 | int real_max_depth; /* what the array can hold */ | ||
| 304 | atomic_t refcnt; /* map can be shared */ | 305 | atomic_t refcnt; /* map can be shared */ |
| 305 | }; | 306 | }; |
| 306 | 307 | ||
diff --git a/include/linux/dcookies.h b/include/linux/dcookies.h index c28050136164..1d68428c925d 100644 --- a/include/linux/dcookies.h +++ b/include/linux/dcookies.h | |||
| @@ -48,12 +48,12 @@ int get_dcookie(struct dentry * dentry, struct vfsmount * vfsmnt, | |||
| 48 | 48 | ||
| 49 | #else | 49 | #else |
| 50 | 50 | ||
| 51 | struct dcookie_user * dcookie_register(void) | 51 | static inline struct dcookie_user * dcookie_register(void) |
| 52 | { | 52 | { |
| 53 | return NULL; | 53 | return NULL; |
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | void dcookie_unregister(struct dcookie_user * user) | 56 | static inline void dcookie_unregister(struct dcookie_user * user) |
| 57 | { | 57 | { |
| 58 | return; | 58 | return; |
| 59 | } | 59 | } |
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index d07a92c94776..602c305c8585 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | */ | 21 | */ |
| 22 | static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, | 22 | static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, |
| 23 | const char *old_name, const char *new_name, | 23 | const char *old_name, const char *new_name, |
| 24 | int isdir) | 24 | int isdir, struct inode *target) |
| 25 | { | 25 | { |
| 26 | u32 cookie = inotify_get_cookie(); | 26 | u32 cookie = inotify_get_cookie(); |
| 27 | 27 | ||
| @@ -36,31 +36,30 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, | |||
| 36 | isdir = IN_ISDIR; | 36 | isdir = IN_ISDIR; |
| 37 | inotify_inode_queue_event(old_dir, IN_MOVED_FROM|isdir,cookie,old_name); | 37 | inotify_inode_queue_event(old_dir, IN_MOVED_FROM|isdir,cookie,old_name); |
| 38 | inotify_inode_queue_event(new_dir, IN_MOVED_TO|isdir, cookie, new_name); | 38 | inotify_inode_queue_event(new_dir, IN_MOVED_TO|isdir, cookie, new_name); |
| 39 | |||
| 40 | if (target) { | ||
| 41 | inotify_inode_queue_event(target, IN_DELETE_SELF, 0, NULL); | ||
| 42 | inotify_inode_is_dead(target); | ||
| 43 | } | ||
| 39 | } | 44 | } |
| 40 | 45 | ||
| 41 | /* | 46 | /* |
| 42 | * fsnotify_unlink - file was unlinked | 47 | * fsnotify_nameremove - a filename was removed from a directory |
| 43 | */ | 48 | */ |
| 44 | static inline void fsnotify_unlink(struct dentry *dentry, struct inode *dir) | 49 | static inline void fsnotify_nameremove(struct dentry *dentry, int isdir) |
| 45 | { | 50 | { |
| 46 | struct inode *inode = dentry->d_inode; | 51 | if (isdir) |
| 47 | 52 | isdir = IN_ISDIR; | |
| 48 | inode_dir_notify(dir, DN_DELETE); | 53 | dnotify_parent(dentry, DN_DELETE); |
| 49 | inotify_inode_queue_event(dir, IN_DELETE, 0, dentry->d_name.name); | 54 | inotify_dentry_parent_queue_event(dentry, IN_DELETE|isdir, 0, dentry->d_name.name); |
| 50 | inotify_inode_queue_event(inode, IN_DELETE_SELF, 0, NULL); | ||
| 51 | |||
| 52 | inotify_inode_is_dead(inode); | ||
| 53 | } | 55 | } |
| 54 | 56 | ||
| 55 | /* | 57 | /* |
| 56 | * fsnotify_rmdir - directory was removed | 58 | * fsnotify_inoderemove - an inode is going away |
| 57 | */ | 59 | */ |
| 58 | static inline void fsnotify_rmdir(struct dentry *dentry, struct inode *inode, | 60 | static inline void fsnotify_inoderemove(struct inode *inode) |
| 59 | struct inode *dir) | ||
| 60 | { | 61 | { |
| 61 | inode_dir_notify(dir, DN_DELETE); | 62 | inotify_inode_queue_event(inode, IN_DELETE_SELF, 0, NULL); |
| 62 | inotify_inode_queue_event(dir,IN_DELETE|IN_ISDIR,0,dentry->d_name.name); | ||
| 63 | inotify_inode_queue_event(inode, IN_DELETE_SELF | IN_ISDIR, 0, NULL); | ||
| 64 | inotify_inode_is_dead(inode); | 63 | inotify_inode_is_dead(inode); |
| 65 | } | 64 | } |
| 66 | 65 | ||
diff --git a/include/linux/ide.h b/include/linux/ide.h index 92129078d4f3..a6dbb51ecd7b 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
| @@ -1501,4 +1501,10 @@ extern struct bus_type ide_bus_type; | |||
| 1501 | #define ide_id_has_flush_cache_ext(id) \ | 1501 | #define ide_id_has_flush_cache_ext(id) \ |
| 1502 | (((id)->cfs_enable_2 & 0x2400) == 0x2400) | 1502 | (((id)->cfs_enable_2 & 0x2400) == 0x2400) |
| 1503 | 1503 | ||
| 1504 | static inline int hwif_to_node(ide_hwif_t *hwif) | ||
| 1505 | { | ||
| 1506 | struct pci_dev *dev = hwif->pci_dev; | ||
| 1507 | return dev ? pcibus_to_node(dev->bus) : -1; | ||
| 1508 | } | ||
| 1509 | |||
| 1504 | #endif /* _IDE_H */ | 1510 | #endif /* _IDE_H */ |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 6eb7f48317f8..82d7024f0765 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -625,10 +625,16 @@ static inline int page_mapped(struct page *page) | |||
| 625 | * Used to decide whether a process gets delivered SIGBUS or | 625 | * Used to decide whether a process gets delivered SIGBUS or |
| 626 | * just gets major/minor fault counters bumped up. | 626 | * just gets major/minor fault counters bumped up. |
| 627 | */ | 627 | */ |
| 628 | #define VM_FAULT_OOM (-1) | 628 | #define VM_FAULT_OOM 0x00 |
| 629 | #define VM_FAULT_SIGBUS 0 | 629 | #define VM_FAULT_SIGBUS 0x01 |
| 630 | #define VM_FAULT_MINOR 1 | 630 | #define VM_FAULT_MINOR 0x02 |
| 631 | #define VM_FAULT_MAJOR 2 | 631 | #define VM_FAULT_MAJOR 0x03 |
| 632 | |||
| 633 | /* | ||
| 634 | * Special case for get_user_pages. | ||
| 635 | * Must be in a distinct bit from the above VM_FAULT_ flags. | ||
| 636 | */ | ||
| 637 | #define VM_FAULT_WRITE 0x10 | ||
| 632 | 638 | ||
| 633 | #define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK) | 639 | #define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK) |
| 634 | 640 | ||
| @@ -704,7 +710,13 @@ extern pte_t *FASTCALL(pte_alloc_kernel(struct mm_struct *mm, pmd_t *pmd, unsign | |||
| 704 | extern pte_t *FASTCALL(pte_alloc_map(struct mm_struct *mm, pmd_t *pmd, unsigned long address)); | 710 | extern pte_t *FASTCALL(pte_alloc_map(struct mm_struct *mm, pmd_t *pmd, unsigned long address)); |
| 705 | extern int install_page(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, struct page *page, pgprot_t prot); | 711 | extern int install_page(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, struct page *page, pgprot_t prot); |
| 706 | extern int install_file_pte(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, unsigned long pgoff, pgprot_t prot); | 712 | extern int install_file_pte(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, unsigned long pgoff, pgprot_t prot); |
| 707 | extern int handle_mm_fault(struct mm_struct *mm,struct vm_area_struct *vma, unsigned long address, int write_access); | 713 | extern int __handle_mm_fault(struct mm_struct *mm,struct vm_area_struct *vma, unsigned long address, int write_access); |
| 714 | |||
| 715 | static inline int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long address, int write_access) | ||
| 716 | { | ||
| 717 | return __handle_mm_fault(mm, vma, address, write_access) & (~VM_FAULT_WRITE); | ||
| 718 | } | ||
| 719 | |||
| 708 | extern int make_pages_present(unsigned long addr, unsigned long end); | 720 | extern int make_pages_present(unsigned long addr, unsigned long end); |
| 709 | extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write); | 721 | extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write); |
| 710 | void install_arg_page(struct vm_area_struct *, struct page *, unsigned long); | 722 | void install_arg_page(struct vm_area_struct *, struct page *, unsigned long); |
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 70c2a9dc4b2b..6552b71bfa73 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
| @@ -12,15 +12,13 @@ | |||
| 12 | #define NETLINK_NFLOG 5 /* netfilter/iptables ULOG */ | 12 | #define NETLINK_NFLOG 5 /* netfilter/iptables ULOG */ |
| 13 | #define NETLINK_XFRM 6 /* ipsec */ | 13 | #define NETLINK_XFRM 6 /* ipsec */ |
| 14 | #define NETLINK_SELINUX 7 /* SELinux event notifications */ | 14 | #define NETLINK_SELINUX 7 /* SELinux event notifications */ |
| 15 | #define NETLINK_ARPD 8 | 15 | #define NETLINK_ISCSI 8 /* Open-iSCSI */ |
| 16 | #define NETLINK_AUDIT 9 /* auditing */ | 16 | #define NETLINK_AUDIT 9 /* auditing */ |
| 17 | #define NETLINK_FIB_LOOKUP 10 | 17 | #define NETLINK_FIB_LOOKUP 10 |
| 18 | #define NETLINK_ROUTE6 11 /* af_inet6 route comm channel */ | ||
| 19 | #define NETLINK_NETFILTER 12 /* netfilter subsystem */ | 18 | #define NETLINK_NETFILTER 12 /* netfilter subsystem */ |
| 20 | #define NETLINK_IP6_FW 13 | 19 | #define NETLINK_IP6_FW 13 |
| 21 | #define NETLINK_DNRTMSG 14 /* DECnet routing messages */ | 20 | #define NETLINK_DNRTMSG 14 /* DECnet routing messages */ |
| 22 | #define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */ | 21 | #define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */ |
| 23 | #define NETLINK_TAPBASE 16 /* 16 to 31 are ethertap */ | ||
| 24 | 22 | ||
| 25 | #define MAX_LINKS 32 | 23 | #define MAX_LINKS 32 |
| 26 | 24 | ||
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index bcd0ac33f592..5ade54a78dbb 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | #include <linux/netdevice.h> | 10 | #include <linux/netdevice.h> |
| 11 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
| 12 | #include <linux/rcupdate.h> | ||
| 12 | #include <linux/list.h> | 13 | #include <linux/list.h> |
| 13 | 14 | ||
| 14 | struct netpoll; | 15 | struct netpoll; |
| @@ -26,6 +27,7 @@ struct netpoll { | |||
| 26 | struct netpoll_info { | 27 | struct netpoll_info { |
| 27 | spinlock_t poll_lock; | 28 | spinlock_t poll_lock; |
| 28 | int poll_owner; | 29 | int poll_owner; |
| 30 | int tries; | ||
| 29 | int rx_flags; | 31 | int rx_flags; |
| 30 | spinlock_t rx_lock; | 32 | spinlock_t rx_lock; |
| 31 | struct netpoll *rx_np; /* netpoll that registered an rx_hook */ | 33 | struct netpoll *rx_np; /* netpoll that registered an rx_hook */ |
| @@ -60,25 +62,31 @@ static inline int netpoll_rx(struct sk_buff *skb) | |||
| 60 | return ret; | 62 | return ret; |
| 61 | } | 63 | } |
| 62 | 64 | ||
| 63 | static inline void netpoll_poll_lock(struct net_device *dev) | 65 | static inline void *netpoll_poll_lock(struct net_device *dev) |
| 64 | { | 66 | { |
| 67 | rcu_read_lock(); /* deal with race on ->npinfo */ | ||
| 65 | if (dev->npinfo) { | 68 | if (dev->npinfo) { |
| 66 | spin_lock(&dev->npinfo->poll_lock); | 69 | spin_lock(&dev->npinfo->poll_lock); |
| 67 | dev->npinfo->poll_owner = smp_processor_id(); | 70 | dev->npinfo->poll_owner = smp_processor_id(); |
| 71 | return dev->npinfo; | ||
| 68 | } | 72 | } |
| 73 | return NULL; | ||
| 69 | } | 74 | } |
| 70 | 75 | ||
| 71 | static inline void netpoll_poll_unlock(struct net_device *dev) | 76 | static inline void netpoll_poll_unlock(void *have) |
| 72 | { | 77 | { |
| 73 | if (dev->npinfo) { | 78 | struct netpoll_info *npi = have; |
| 74 | dev->npinfo->poll_owner = -1; | 79 | |
| 75 | spin_unlock(&dev->npinfo->poll_lock); | 80 | if (npi) { |
| 81 | npi->poll_owner = -1; | ||
| 82 | spin_unlock(&npi->poll_lock); | ||
| 76 | } | 83 | } |
| 84 | rcu_read_unlock(); | ||
| 77 | } | 85 | } |
| 78 | 86 | ||
| 79 | #else | 87 | #else |
| 80 | #define netpoll_rx(a) 0 | 88 | #define netpoll_rx(a) 0 |
| 81 | #define netpoll_poll_lock(a) | 89 | #define netpoll_poll_lock(a) 0 |
| 82 | #define netpoll_poll_unlock(a) | 90 | #define netpoll_poll_unlock(a) |
| 83 | #endif | 91 | #endif |
| 84 | 92 | ||
diff --git a/include/linux/raid/bitmap.h b/include/linux/raid/bitmap.h index 6213e976eade..4bf1659f8aa8 100644 --- a/include/linux/raid/bitmap.h +++ b/include/linux/raid/bitmap.h | |||
| @@ -248,6 +248,7 @@ struct bitmap { | |||
| 248 | 248 | ||
| 249 | /* these are used only by md/bitmap */ | 249 | /* these are used only by md/bitmap */ |
| 250 | int bitmap_create(mddev_t *mddev); | 250 | int bitmap_create(mddev_t *mddev); |
| 251 | void bitmap_flush(mddev_t *mddev); | ||
| 251 | void bitmap_destroy(mddev_t *mddev); | 252 | void bitmap_destroy(mddev_t *mddev); |
| 252 | int bitmap_active(struct bitmap *bitmap); | 253 | int bitmap_active(struct bitmap *bitmap); |
| 253 | 254 | ||
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 0061c9470482..948527e42a60 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -255,7 +255,7 @@ struct sk_buff { | |||
| 255 | nohdr:1; | 255 | nohdr:1; |
| 256 | /* 3 bits spare */ | 256 | /* 3 bits spare */ |
| 257 | __u8 pkt_type; | 257 | __u8 pkt_type; |
| 258 | __u16 protocol; | 258 | __be16 protocol; |
| 259 | 259 | ||
| 260 | void (*destructor)(struct sk_buff *skb); | 260 | void (*destructor)(struct sk_buff *skb); |
| 261 | #ifdef CONFIG_NETFILTER | 261 | #ifdef CONFIG_NETFILTER |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 239f520cc49e..bfe3e763ccf2 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
| @@ -7,7 +7,6 @@ | |||
| 7 | #include <linux/mmzone.h> | 7 | #include <linux/mmzone.h> |
| 8 | #include <linux/list.h> | 8 | #include <linux/list.h> |
| 9 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
| 10 | #include <linux/pagemap.h> | ||
| 11 | 10 | ||
| 12 | #include <asm/atomic.h> | 11 | #include <asm/atomic.h> |
| 13 | #include <asm/page.h> | 12 | #include <asm/page.h> |
| @@ -255,6 +254,8 @@ static inline void put_swap_token(struct mm_struct *mm) | |||
| 255 | 254 | ||
| 256 | #define si_swapinfo(val) \ | 255 | #define si_swapinfo(val) \ |
| 257 | do { (val)->freeswap = (val)->totalswap = 0; } while (0) | 256 | do { (val)->freeswap = (val)->totalswap = 0; } while (0) |
| 257 | /* only sparc can not include linux/pagemap.h in this file | ||
| 258 | * so leave page_cache_release and release_pages undeclared... */ | ||
| 258 | #define free_page_and_swap_cache(page) \ | 259 | #define free_page_and_swap_cache(page) \ |
| 259 | page_cache_release(page) | 260 | page_cache_release(page) |
| 260 | #define free_pages_and_swap_cache(pages, nr) \ | 261 | #define free_pages_and_swap_cache(pages, nr) \ |
diff --git a/include/linux/zlib.h b/include/linux/zlib.h index 850076ea14d3..74f7b78c22d2 100644 --- a/include/linux/zlib.h +++ b/include/linux/zlib.h | |||
| @@ -506,6 +506,11 @@ extern int zlib_deflateReset (z_streamp strm); | |||
| 506 | stream state was inconsistent (such as zalloc or state being NULL). | 506 | stream state was inconsistent (such as zalloc or state being NULL). |
| 507 | */ | 507 | */ |
| 508 | 508 | ||
| 509 | static inline unsigned long deflateBound(unsigned long s) | ||
| 510 | { | ||
| 511 | return s + ((s + 7) >> 3) + ((s + 63) >> 6) + 11; | ||
| 512 | } | ||
| 513 | |||
| 509 | extern int zlib_deflateParams (z_streamp strm, int level, int strategy); | 514 | extern int zlib_deflateParams (z_streamp strm, int level, int strategy); |
| 510 | /* | 515 | /* |
| 511 | Dynamically update the compression level and compression strategy. The | 516 | Dynamically update the compression level and compression strategy. The |
