diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/acct.h | 2 | ||||
| -rw-r--r-- | include/linux/aio.h | 13 | ||||
| -rw-r--r-- | include/linux/bitops.h | 10 | ||||
| -rw-r--r-- | include/linux/cm4000_cs.h | 66 | ||||
| -rw-r--r-- | include/linux/file.h | 10 | ||||
| -rw-r--r-- | include/linux/fsl_devices.h | 2 | ||||
| -rw-r--r-- | include/linux/gfp.h | 16 | ||||
| -rw-r--r-- | include/linux/hardirq.h | 2 | ||||
| -rw-r--r-- | include/linux/hugetlb.h | 4 | ||||
| -rw-r--r-- | include/linux/i2c-id.h | 1 | ||||
| -rw-r--r-- | include/linux/init_task.h | 1 | ||||
| -rw-r--r-- | include/linux/interrupt.h | 1 | ||||
| -rw-r--r-- | include/linux/mm.h | 10 | ||||
| -rw-r--r-- | include/linux/mmzone.h | 22 | ||||
| -rw-r--r-- | include/linux/netfilter/nfnetlink.h | 6 | ||||
| -rw-r--r-- | include/linux/pagemap.h | 4 | ||||
| -rw-r--r-- | include/linux/pci_ids.h | 4 | ||||
| -rw-r--r-- | include/linux/percpu.h | 2 | ||||
| -rw-r--r-- | include/linux/pm.h | 49 | ||||
| -rw-r--r-- | include/linux/pm_legacy.h | 56 | ||||
| -rw-r--r-- | include/linux/preempt.h | 1 | ||||
| -rw-r--r-- | include/linux/sched.h | 32 | ||||
| -rw-r--r-- | include/linux/smp_lock.h | 3 | ||||
| -rw-r--r-- | include/linux/sysctl.h | 2 | ||||
| -rw-r--r-- | include/linux/thread_info.h | 47 | ||||
| -rw-r--r-- | include/linux/time.h | 2 | ||||
| -rw-r--r-- | include/linux/usb.h | 6 | ||||
| -rw-r--r-- | include/linux/videodev2.h | 1 |
28 files changed, 240 insertions, 135 deletions
diff --git a/include/linux/acct.h b/include/linux/acct.h index 93c5b3cdf951..9a66401073fc 100644 --- a/include/linux/acct.h +++ b/include/linux/acct.h | |||
| @@ -16,6 +16,8 @@ | |||
| 16 | #define _LINUX_ACCT_H | 16 | #define _LINUX_ACCT_H |
| 17 | 17 | ||
| 18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
| 19 | #include <linux/jiffies.h> | ||
| 20 | |||
| 19 | #include <asm/param.h> | 21 | #include <asm/param.h> |
| 20 | #include <asm/byteorder.h> | 22 | #include <asm/byteorder.h> |
| 21 | 23 | ||
diff --git a/include/linux/aio.h b/include/linux/aio.h index 403d71dcb7c8..49fd37629ee4 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h | |||
| @@ -124,7 +124,7 @@ struct kiocb { | |||
| 124 | (x)->ki_users = 1; \ | 124 | (x)->ki_users = 1; \ |
| 125 | (x)->ki_key = KIOCB_SYNC_KEY; \ | 125 | (x)->ki_key = KIOCB_SYNC_KEY; \ |
| 126 | (x)->ki_filp = (filp); \ | 126 | (x)->ki_filp = (filp); \ |
| 127 | (x)->ki_ctx = &tsk->active_mm->default_kioctx; \ | 127 | (x)->ki_ctx = NULL; \ |
| 128 | (x)->ki_cancel = NULL; \ | 128 | (x)->ki_cancel = NULL; \ |
| 129 | (x)->ki_dtor = NULL; \ | 129 | (x)->ki_dtor = NULL; \ |
| 130 | (x)->ki_obj.tsk = tsk; \ | 130 | (x)->ki_obj.tsk = tsk; \ |
| @@ -210,8 +210,15 @@ struct kioctx *lookup_ioctx(unsigned long ctx_id); | |||
| 210 | int FASTCALL(io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb, | 210 | int FASTCALL(io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb, |
| 211 | struct iocb *iocb)); | 211 | struct iocb *iocb)); |
| 212 | 212 | ||
| 213 | #define get_ioctx(kioctx) do { if (unlikely(atomic_read(&(kioctx)->users) <= 0)) BUG(); atomic_inc(&(kioctx)->users); } while (0) | 213 | #define get_ioctx(kioctx) do { \ |
| 214 | #define put_ioctx(kioctx) do { if (unlikely(atomic_dec_and_test(&(kioctx)->users))) __put_ioctx(kioctx); else if (unlikely(atomic_read(&(kioctx)->users) < 0)) BUG(); } while (0) | 214 | BUG_ON(unlikely(atomic_read(&(kioctx)->users) <= 0)); \ |
| 215 | atomic_inc(&(kioctx)->users); \ | ||
| 216 | } while (0) | ||
| 217 | #define put_ioctx(kioctx) do { \ | ||
| 218 | BUG_ON(unlikely(atomic_read(&(kioctx)->users) <= 0)); \ | ||
| 219 | if (unlikely(atomic_dec_and_test(&(kioctx)->users))) \ | ||
| 220 | __put_ioctx(kioctx); \ | ||
| 221 | } while (0) | ||
| 215 | 222 | ||
| 216 | #define in_aio() !is_sync_wait(current->io_wait) | 223 | #define in_aio() !is_sync_wait(current->io_wait) |
| 217 | /* may be used for debugging */ | 224 | /* may be used for debugging */ |
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index cb3c3ef50f50..38c2fb7ebe09 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
| @@ -84,6 +84,16 @@ static __inline__ int get_bitmask_order(unsigned int count) | |||
| 84 | return order; /* We could be slightly more clever with -1 here... */ | 84 | return order; /* We could be slightly more clever with -1 here... */ |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | static __inline__ int get_count_order(unsigned int count) | ||
| 88 | { | ||
| 89 | int order; | ||
| 90 | |||
| 91 | order = fls(count) - 1; | ||
| 92 | if (count & (count - 1)) | ||
| 93 | order++; | ||
| 94 | return order; | ||
| 95 | } | ||
| 96 | |||
| 87 | /* | 97 | /* |
| 88 | * hweightN: returns the hamming weight (i.e. the number | 98 | * hweightN: returns the hamming weight (i.e. the number |
| 89 | * of bits set) of a N-bit word | 99 | * of bits set) of a N-bit word |
diff --git a/include/linux/cm4000_cs.h b/include/linux/cm4000_cs.h new file mode 100644 index 000000000000..605ebe24bb2e --- /dev/null +++ b/include/linux/cm4000_cs.h | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | #ifndef _CM4000_H_ | ||
| 2 | #define _CM4000_H_ | ||
| 3 | |||
| 4 | #define MAX_ATR 33 | ||
| 5 | |||
| 6 | #define CM4000_MAX_DEV 4 | ||
| 7 | |||
| 8 | /* those two structures are passed via ioctl() from/to userspace. They are | ||
| 9 | * used by existing userspace programs, so I kepth the awkward "bIFSD" naming | ||
| 10 | * not to break compilation of userspace apps. -HW */ | ||
| 11 | |||
| 12 | typedef struct atreq { | ||
| 13 | int32_t atr_len; | ||
| 14 | unsigned char atr[64]; | ||
| 15 | int32_t power_act; | ||
| 16 | unsigned char bIFSD; | ||
| 17 | unsigned char bIFSC; | ||
| 18 | } atreq_t; | ||
| 19 | |||
| 20 | |||
| 21 | /* what is particularly stupid in the original driver is the arch-dependant | ||
| 22 | * member sizes. This leads to CONFIG_COMPAT breakage, since 32bit userspace | ||
| 23 | * will lay out the structure members differently than the 64bit kernel. | ||
| 24 | * | ||
| 25 | * I've changed "ptsreq.protocol" from "unsigned long" to "u_int32_t". | ||
| 26 | * On 32bit this will make no difference. With 64bit kernels, it will make | ||
| 27 | * 32bit apps work, too. | ||
| 28 | */ | ||
| 29 | |||
| 30 | typedef struct ptsreq { | ||
| 31 | u_int32_t protocol; /*T=0: 2^0, T=1: 2^1*/ | ||
| 32 | unsigned char flags; | ||
| 33 | unsigned char pts1; | ||
| 34 | unsigned char pts2; | ||
| 35 | unsigned char pts3; | ||
| 36 | } ptsreq_t; | ||
| 37 | |||
| 38 | #define CM_IOC_MAGIC 'c' | ||
| 39 | #define CM_IOC_MAXNR 255 | ||
| 40 | |||
| 41 | #define CM_IOCGSTATUS _IOR (CM_IOC_MAGIC, 0, unsigned char *) | ||
| 42 | #define CM_IOCGATR _IOWR(CM_IOC_MAGIC, 1, atreq_t *) | ||
| 43 | #define CM_IOCSPTS _IOW (CM_IOC_MAGIC, 2, ptsreq_t *) | ||
| 44 | #define CM_IOCSRDR _IO (CM_IOC_MAGIC, 3) | ||
| 45 | #define CM_IOCARDOFF _IO (CM_IOC_MAGIC, 4) | ||
| 46 | |||
| 47 | #define CM_IOSDBGLVL _IOW(CM_IOC_MAGIC, 250, int*) | ||
| 48 | |||
| 49 | /* card and device states */ | ||
| 50 | #define CM_CARD_INSERTED 0x01 | ||
| 51 | #define CM_CARD_POWERED 0x02 | ||
| 52 | #define CM_ATR_PRESENT 0x04 | ||
| 53 | #define CM_ATR_VALID 0x08 | ||
| 54 | #define CM_STATE_VALID 0x0f | ||
| 55 | /* extra info only from CM4000 */ | ||
| 56 | #define CM_NO_READER 0x10 | ||
| 57 | #define CM_BAD_CARD 0x20 | ||
| 58 | |||
| 59 | |||
| 60 | #ifdef __KERNEL__ | ||
| 61 | |||
| 62 | #define DEVICE_NAME "cmm" | ||
| 63 | #define MODULE_NAME "cm4000_cs" | ||
| 64 | |||
| 65 | #endif /* __KERNEL__ */ | ||
| 66 | #endif /* _CM4000_H_ */ | ||
diff --git a/include/linux/file.h b/include/linux/file.h index d3b1a15d5f21..418b6101b59a 100644 --- a/include/linux/file.h +++ b/include/linux/file.h | |||
| @@ -33,13 +33,13 @@ struct fdtable { | |||
| 33 | * Open file table structure | 33 | * Open file table structure |
| 34 | */ | 34 | */ |
| 35 | struct files_struct { | 35 | struct files_struct { |
| 36 | atomic_t count; | 36 | atomic_t count; |
| 37 | spinlock_t file_lock; /* Protects all the below members. Nests inside tsk->alloc_lock */ | ||
| 38 | struct fdtable *fdt; | 37 | struct fdtable *fdt; |
| 39 | struct fdtable fdtab; | 38 | struct fdtable fdtab; |
| 40 | fd_set close_on_exec_init; | 39 | fd_set close_on_exec_init; |
| 41 | fd_set open_fds_init; | 40 | fd_set open_fds_init; |
| 42 | struct file * fd_array[NR_OPEN_DEFAULT]; | 41 | struct file * fd_array[NR_OPEN_DEFAULT]; |
| 42 | spinlock_t file_lock; /* Protects concurrent writers. Nests inside tsk->alloc_lock */ | ||
| 43 | }; | 43 | }; |
| 44 | 44 | ||
| 45 | #define files_fdtable(files) (rcu_dereference((files)->fdt)) | 45 | #define files_fdtable(files) (rcu_dereference((files)->fdt)) |
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index 114d5d59f695..934aa9bda481 100644 --- a/include/linux/fsl_devices.h +++ b/include/linux/fsl_devices.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * Definitions for any platform device related flags or structures for | 4 | * Definitions for any platform device related flags or structures for |
| 5 | * Freescale processor devices | 5 | * Freescale processor devices |
| 6 | * | 6 | * |
| 7 | * Maintainer: Kumar Gala (kumar.gala@freescale.com) | 7 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
| 8 | * | 8 | * |
| 9 | * Copyright 2004 Freescale Semiconductor, Inc | 9 | * Copyright 2004 Freescale Semiconductor, Inc |
| 10 | * | 10 | * |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index c3779432a723..313dfe9b443a 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
| @@ -14,6 +14,13 @@ struct vm_area_struct; | |||
| 14 | /* Zone modifiers in GFP_ZONEMASK (see linux/mmzone.h - low two bits) */ | 14 | /* Zone modifiers in GFP_ZONEMASK (see linux/mmzone.h - low two bits) */ |
| 15 | #define __GFP_DMA ((__force gfp_t)0x01u) | 15 | #define __GFP_DMA ((__force gfp_t)0x01u) |
| 16 | #define __GFP_HIGHMEM ((__force gfp_t)0x02u) | 16 | #define __GFP_HIGHMEM ((__force gfp_t)0x02u) |
| 17 | #ifdef CONFIG_DMA_IS_DMA32 | ||
| 18 | #define __GFP_DMA32 ((__force gfp_t)0x01) /* ZONE_DMA is ZONE_DMA32 */ | ||
| 19 | #elif BITS_PER_LONG < 64 | ||
| 20 | #define __GFP_DMA32 ((__force gfp_t)0x00) /* ZONE_NORMAL is ZONE_DMA32 */ | ||
| 21 | #else | ||
| 22 | #define __GFP_DMA32 ((__force gfp_t)0x04) /* Has own ZONE_DMA32 */ | ||
| 23 | #endif | ||
| 17 | 24 | ||
| 18 | /* | 25 | /* |
| 19 | * Action modifiers - doesn't change the zoning | 26 | * Action modifiers - doesn't change the zoning |
| @@ -39,8 +46,7 @@ struct vm_area_struct; | |||
| 39 | #define __GFP_COMP ((__force gfp_t)0x4000u)/* Add compound page metadata */ | 46 | #define __GFP_COMP ((__force gfp_t)0x4000u)/* Add compound page metadata */ |
| 40 | #define __GFP_ZERO ((__force gfp_t)0x8000u)/* Return zeroed page on success */ | 47 | #define __GFP_ZERO ((__force gfp_t)0x8000u)/* Return zeroed page on success */ |
| 41 | #define __GFP_NOMEMALLOC ((__force gfp_t)0x10000u) /* Don't use emergency reserves */ | 48 | #define __GFP_NOMEMALLOC ((__force gfp_t)0x10000u) /* Don't use emergency reserves */ |
| 42 | #define __GFP_NORECLAIM ((__force gfp_t)0x20000u) /* No realy zone reclaim during allocation */ | 49 | #define __GFP_HARDWALL ((__force gfp_t)0x20000u) /* Enforce hardwall cpuset memory allocs */ |
| 43 | #define __GFP_HARDWALL ((__force gfp_t)0x40000u) /* Enforce hardwall cpuset memory allocs */ | ||
| 44 | 50 | ||
| 45 | #define __GFP_BITS_SHIFT 20 /* Room for 20 __GFP_FOO bits */ | 51 | #define __GFP_BITS_SHIFT 20 /* Room for 20 __GFP_FOO bits */ |
| 46 | #define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1)) | 52 | #define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1)) |
| @@ -49,7 +55,7 @@ struct vm_area_struct; | |||
| 49 | #define GFP_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS| \ | 55 | #define GFP_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS| \ |
| 50 | __GFP_COLD|__GFP_NOWARN|__GFP_REPEAT| \ | 56 | __GFP_COLD|__GFP_NOWARN|__GFP_REPEAT| \ |
| 51 | __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \ | 57 | __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \ |
| 52 | __GFP_NOMEMALLOC|__GFP_NORECLAIM|__GFP_HARDWALL) | 58 | __GFP_NOMEMALLOC|__GFP_HARDWALL) |
| 53 | 59 | ||
| 54 | #define GFP_ATOMIC (__GFP_HIGH) | 60 | #define GFP_ATOMIC (__GFP_HIGH) |
| 55 | #define GFP_NOIO (__GFP_WAIT) | 61 | #define GFP_NOIO (__GFP_WAIT) |
| @@ -64,6 +70,10 @@ struct vm_area_struct; | |||
| 64 | 70 | ||
| 65 | #define GFP_DMA __GFP_DMA | 71 | #define GFP_DMA __GFP_DMA |
| 66 | 72 | ||
| 73 | /* 4GB DMA on some platforms */ | ||
| 74 | #define GFP_DMA32 __GFP_DMA32 | ||
| 75 | |||
| 76 | |||
| 67 | #define gfp_zone(mask) ((__force int)((mask) & (__force gfp_t)GFP_ZONEMASK)) | 77 | #define gfp_zone(mask) ((__force int)((mask) & (__force gfp_t)GFP_ZONEMASK)) |
| 68 | 78 | ||
| 69 | /* | 79 | /* |
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 5912874ca83c..71d2b8a723b9 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
| @@ -90,6 +90,8 @@ extern void synchronize_irq(unsigned int irq); | |||
| 90 | #define nmi_enter() irq_enter() | 90 | #define nmi_enter() irq_enter() |
| 91 | #define nmi_exit() sub_preempt_count(HARDIRQ_OFFSET) | 91 | #define nmi_exit() sub_preempt_count(HARDIRQ_OFFSET) |
| 92 | 92 | ||
| 93 | struct task_struct; | ||
| 94 | |||
| 93 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING | 95 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING |
| 94 | static inline void account_user_vtime(struct task_struct *tsk) | 96 | static inline void account_user_vtime(struct task_struct *tsk) |
| 95 | { | 97 | { |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 0cea162b08c0..1056717ee501 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
| @@ -102,8 +102,8 @@ static inline unsigned long hugetlb_total_pages(void) | |||
| 102 | #define hugetlb_fault(mm, vma, addr, write) ({ BUG(); 0; }) | 102 | #define hugetlb_fault(mm, vma, addr, write) ({ BUG(); 0; }) |
| 103 | 103 | ||
| 104 | #ifndef HPAGE_MASK | 104 | #ifndef HPAGE_MASK |
| 105 | #define HPAGE_MASK 0 /* Keep the compiler happy */ | 105 | #define HPAGE_MASK PAGE_MASK /* Keep the compiler happy */ |
| 106 | #define HPAGE_SIZE 0 | 106 | #define HPAGE_SIZE PAGE_SIZE |
| 107 | #endif | 107 | #endif |
| 108 | 108 | ||
| 109 | #endif /* !CONFIG_HUGETLB_PAGE */ | 109 | #endif /* !CONFIG_HUGETLB_PAGE */ |
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index 74abaecdb572..1543daaa9c5e 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
| @@ -107,6 +107,7 @@ | |||
| 107 | #define I2C_DRIVERID_CX25840 71 /* cx2584x video encoder */ | 107 | #define I2C_DRIVERID_CX25840 71 /* cx2584x video encoder */ |
| 108 | #define I2C_DRIVERID_SAA7127 72 /* saa7124 video encoder */ | 108 | #define I2C_DRIVERID_SAA7127 72 /* saa7124 video encoder */ |
| 109 | #define I2C_DRIVERID_SAA711X 73 /* saa711x video encoders */ | 109 | #define I2C_DRIVERID_SAA711X 73 /* saa711x video encoders */ |
| 110 | #define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */ | ||
| 110 | 111 | ||
| 111 | #define I2C_DRIVERID_EXP0 0xF0 /* experimental use id's */ | 112 | #define I2C_DRIVERID_EXP0 0xF0 /* experimental use id's */ |
| 112 | #define I2C_DRIVERID_EXP1 0xF1 | 113 | #define I2C_DRIVERID_EXP1 0xF1 |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 68ab5f2ab9cd..dcfd2ecccb5d 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
| @@ -51,7 +51,6 @@ | |||
| 51 | .page_table_lock = SPIN_LOCK_UNLOCKED, \ | 51 | .page_table_lock = SPIN_LOCK_UNLOCKED, \ |
| 52 | .mmlist = LIST_HEAD_INIT(name.mmlist), \ | 52 | .mmlist = LIST_HEAD_INIT(name.mmlist), \ |
| 53 | .cpu_vm_mask = CPU_MASK_ALL, \ | 53 | .cpu_vm_mask = CPU_MASK_ALL, \ |
| 54 | .default_kioctx = INIT_KIOCTX(name.default_kioctx, name), \ | ||
| 55 | } | 54 | } |
| 56 | 55 | ||
| 57 | #define INIT_SIGNALS(sig) { \ | 56 | #define INIT_SIGNALS(sig) { \ |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 0a90205184b0..41f150a3d2dd 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include <linux/preempt.h> | 9 | #include <linux/preempt.h> |
| 10 | #include <linux/cpumask.h> | 10 | #include <linux/cpumask.h> |
| 11 | #include <linux/hardirq.h> | 11 | #include <linux/hardirq.h> |
| 12 | #include <linux/sched.h> | ||
| 12 | #include <asm/atomic.h> | 13 | #include <asm/atomic.h> |
| 13 | #include <asm/ptrace.h> | 14 | #include <asm/ptrace.h> |
| 14 | #include <asm/system.h> | 15 | #include <asm/system.h> |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 7b115feca4df..1013a42d10b1 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -206,12 +206,6 @@ struct vm_operations_struct { | |||
| 206 | struct mmu_gather; | 206 | struct mmu_gather; |
| 207 | struct inode; | 207 | struct inode; |
| 208 | 208 | ||
| 209 | #ifdef ARCH_HAS_ATOMIC_UNSIGNED | ||
| 210 | typedef unsigned page_flags_t; | ||
| 211 | #else | ||
| 212 | typedef unsigned long page_flags_t; | ||
| 213 | #endif | ||
| 214 | |||
| 215 | /* | 209 | /* |
| 216 | * Each physical page in the system has a struct page associated with | 210 | * Each physical page in the system has a struct page associated with |
| 217 | * it to keep track of whatever it is we are using the page for at the | 211 | * it to keep track of whatever it is we are using the page for at the |
| @@ -219,7 +213,7 @@ typedef unsigned long page_flags_t; | |||
| 219 | * a page. | 213 | * a page. |
| 220 | */ | 214 | */ |
| 221 | struct page { | 215 | struct page { |
| 222 | page_flags_t flags; /* Atomic flags, some possibly | 216 | unsigned long flags; /* Atomic flags, some possibly |
| 223 | * updated asynchronously */ | 217 | * updated asynchronously */ |
| 224 | atomic_t _count; /* Usage count, see below. */ | 218 | atomic_t _count; /* Usage count, see below. */ |
| 225 | atomic_t _mapcount; /* Count of ptes mapped in mms, | 219 | atomic_t _mapcount; /* Count of ptes mapped in mms, |
| @@ -435,7 +429,7 @@ static inline void put_page(struct page *page) | |||
| 435 | #endif | 429 | #endif |
| 436 | 430 | ||
| 437 | /* Page flags: | [SECTION] | [NODE] | ZONE | ... | FLAGS | */ | 431 | /* Page flags: | [SECTION] | [NODE] | ZONE | ... | FLAGS | */ |
| 438 | #define SECTIONS_PGOFF ((sizeof(page_flags_t)*8) - SECTIONS_WIDTH) | 432 | #define SECTIONS_PGOFF ((sizeof(unsigned long)*8) - SECTIONS_WIDTH) |
| 439 | #define NODES_PGOFF (SECTIONS_PGOFF - NODES_WIDTH) | 433 | #define NODES_PGOFF (SECTIONS_PGOFF - NODES_WIDTH) |
| 440 | #define ZONES_PGOFF (NODES_PGOFF - ZONES_WIDTH) | 434 | #define ZONES_PGOFF (NODES_PGOFF - ZONES_WIDTH) |
| 441 | 435 | ||
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index f5fa3082fd6a..2c8edad5dccf 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
| @@ -71,10 +71,11 @@ struct per_cpu_pageset { | |||
| 71 | #endif | 71 | #endif |
| 72 | 72 | ||
| 73 | #define ZONE_DMA 0 | 73 | #define ZONE_DMA 0 |
| 74 | #define ZONE_NORMAL 1 | 74 | #define ZONE_DMA32 1 |
| 75 | #define ZONE_HIGHMEM 2 | 75 | #define ZONE_NORMAL 2 |
| 76 | #define ZONE_HIGHMEM 3 | ||
| 76 | 77 | ||
| 77 | #define MAX_NR_ZONES 3 /* Sync this with ZONES_SHIFT */ | 78 | #define MAX_NR_ZONES 4 /* Sync this with ZONES_SHIFT */ |
| 78 | #define ZONES_SHIFT 2 /* ceil(log2(MAX_NR_ZONES)) */ | 79 | #define ZONES_SHIFT 2 /* ceil(log2(MAX_NR_ZONES)) */ |
| 79 | 80 | ||
| 80 | 81 | ||
| @@ -108,9 +109,10 @@ struct per_cpu_pageset { | |||
| 108 | 109 | ||
| 109 | /* | 110 | /* |
| 110 | * On machines where it is needed (eg PCs) we divide physical memory | 111 | * On machines where it is needed (eg PCs) we divide physical memory |
| 111 | * into multiple physical zones. On a PC we have 3 zones: | 112 | * into multiple physical zones. On a PC we have 4 zones: |
| 112 | * | 113 | * |
| 113 | * ZONE_DMA < 16 MB ISA DMA capable memory | 114 | * ZONE_DMA < 16 MB ISA DMA capable memory |
| 115 | * ZONE_DMA32 0 MB Empty | ||
| 114 | * ZONE_NORMAL 16-896 MB direct mapped by the kernel | 116 | * ZONE_NORMAL 16-896 MB direct mapped by the kernel |
| 115 | * ZONE_HIGHMEM > 896 MB only page cache and user processes | 117 | * ZONE_HIGHMEM > 896 MB only page cache and user processes |
| 116 | */ | 118 | */ |
| @@ -329,7 +331,7 @@ void get_zone_counts(unsigned long *active, unsigned long *inactive, | |||
| 329 | void build_all_zonelists(void); | 331 | void build_all_zonelists(void); |
| 330 | void wakeup_kswapd(struct zone *zone, int order); | 332 | void wakeup_kswapd(struct zone *zone, int order); |
| 331 | int zone_watermark_ok(struct zone *z, int order, unsigned long mark, | 333 | int zone_watermark_ok(struct zone *z, int order, unsigned long mark, |
| 332 | int alloc_type, int can_try_harder, gfp_t gfp_high); | 334 | int classzone_idx, int alloc_flags); |
| 333 | 335 | ||
| 334 | #ifdef CONFIG_HAVE_MEMORY_PRESENT | 336 | #ifdef CONFIG_HAVE_MEMORY_PRESENT |
| 335 | void memory_present(int nid, unsigned long start, unsigned long end); | 337 | void memory_present(int nid, unsigned long start, unsigned long end); |
| @@ -433,7 +435,9 @@ int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, struct file *, | |||
| 433 | 435 | ||
| 434 | #include <linux/topology.h> | 436 | #include <linux/topology.h> |
| 435 | /* Returns the number of the current Node. */ | 437 | /* Returns the number of the current Node. */ |
| 438 | #ifndef numa_node_id | ||
| 436 | #define numa_node_id() (cpu_to_node(raw_smp_processor_id())) | 439 | #define numa_node_id() (cpu_to_node(raw_smp_processor_id())) |
| 440 | #endif | ||
| 437 | 441 | ||
| 438 | #ifndef CONFIG_NEED_MULTIPLE_NODES | 442 | #ifndef CONFIG_NEED_MULTIPLE_NODES |
| 439 | 443 | ||
| @@ -453,12 +457,12 @@ extern struct pglist_data contig_page_data; | |||
| 453 | #include <asm/sparsemem.h> | 457 | #include <asm/sparsemem.h> |
| 454 | #endif | 458 | #endif |
| 455 | 459 | ||
| 456 | #if BITS_PER_LONG == 32 || defined(ARCH_HAS_ATOMIC_UNSIGNED) | 460 | #if BITS_PER_LONG == 32 |
| 457 | /* | 461 | /* |
| 458 | * with 32 bit page->flags field, we reserve 8 bits for node/zone info. | 462 | * with 32 bit page->flags field, we reserve 9 bits for node/zone info. |
| 459 | * there are 3 zones (2 bits) and this leaves 8-2=6 bits for nodes. | 463 | * there are 4 zones (3 bits) and this leaves 9-3=6 bits for nodes. |
| 460 | */ | 464 | */ |
| 461 | #define FLAGS_RESERVED 8 | 465 | #define FLAGS_RESERVED 9 |
| 462 | 466 | ||
| 463 | #elif BITS_PER_LONG == 64 | 467 | #elif BITS_PER_LONG == 64 |
| 464 | /* | 468 | /* |
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h index 72975fa8795d..934a2479f160 100644 --- a/include/linux/netfilter/nfnetlink.h +++ b/include/linux/netfilter/nfnetlink.h | |||
| @@ -112,7 +112,6 @@ struct nfnl_callback | |||
| 112 | { | 112 | { |
| 113 | int (*call)(struct sock *nl, struct sk_buff *skb, | 113 | int (*call)(struct sock *nl, struct sk_buff *skb, |
| 114 | struct nlmsghdr *nlh, struct nfattr *cda[], int *errp); | 114 | struct nlmsghdr *nlh, struct nfattr *cda[], int *errp); |
| 115 | kernel_cap_t cap_required; /* capabilities required for this msg */ | ||
| 116 | u_int16_t attr_count; /* number of nfattr's */ | 115 | u_int16_t attr_count; /* number of nfattr's */ |
| 117 | }; | 116 | }; |
| 118 | 117 | ||
| @@ -154,11 +153,14 @@ extern void nfattr_parse(struct nfattr *tb[], int maxattr, | |||
| 154 | 153 | ||
| 155 | #define nfattr_bad_size(tb, max, cta_min) \ | 154 | #define nfattr_bad_size(tb, max, cta_min) \ |
| 156 | ({ int __i, __res = 0; \ | 155 | ({ int __i, __res = 0; \ |
| 157 | for (__i=0; __i<max; __i++) \ | 156 | for (__i=0; __i<max; __i++) { \ |
| 157 | if (!cta_min[__i]) \ | ||
| 158 | continue; \ | ||
| 158 | if (tb[__i] && NFA_PAYLOAD(tb[__i]) < cta_min[__i]){ \ | 159 | if (tb[__i] && NFA_PAYLOAD(tb[__i]) < cta_min[__i]){ \ |
| 159 | __res = 1; \ | 160 | __res = 1; \ |
| 160 | break; \ | 161 | break; \ |
| 161 | } \ | 162 | } \ |
| 163 | } \ | ||
| 162 | __res; \ | 164 | __res; \ |
| 163 | }) | 165 | }) |
| 164 | 166 | ||
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index ba6c310a055f..ee700c6eb442 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
| @@ -53,12 +53,12 @@ void release_pages(struct page **pages, int nr, int cold); | |||
| 53 | 53 | ||
| 54 | static inline struct page *page_cache_alloc(struct address_space *x) | 54 | static inline struct page *page_cache_alloc(struct address_space *x) |
| 55 | { | 55 | { |
| 56 | return alloc_pages(mapping_gfp_mask(x)|__GFP_NORECLAIM, 0); | 56 | return alloc_pages(mapping_gfp_mask(x), 0); |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | static inline struct page *page_cache_alloc_cold(struct address_space *x) | 59 | static inline struct page *page_cache_alloc_cold(struct address_space *x) |
| 60 | { | 60 | { |
| 61 | return alloc_pages(mapping_gfp_mask(x)|__GFP_COLD|__GFP_NORECLAIM, 0); | 61 | return alloc_pages(mapping_gfp_mask(x)|__GFP_COLD, 0); |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | typedef int filler_t(void *, struct page *); | 64 | typedef int filler_t(void *, struct page *); |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index d00f8ba7f22b..d4c1c8fd2925 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -805,6 +805,10 @@ | |||
| 805 | #define PCI_DEVICE_ID_APPLE_SH_SUNGEM 0x0051 | 805 | #define PCI_DEVICE_ID_APPLE_SH_SUNGEM 0x0051 |
| 806 | #define PCI_DEVICE_ID_APPLE_U3L_AGP 0x0058 | 806 | #define PCI_DEVICE_ID_APPLE_U3L_AGP 0x0058 |
| 807 | #define PCI_DEVICE_ID_APPLE_U3H_AGP 0x0059 | 807 | #define PCI_DEVICE_ID_APPLE_U3H_AGP 0x0059 |
| 808 | #define PCI_DEVICE_ID_APPLE_IPID2_AGP 0x0066 | ||
| 809 | #define PCI_DEVICE_ID_APPLE_IPID2_ATA 0x0069 | ||
| 810 | #define PCI_DEVICE_ID_APPLE_IPID2_FW 0x006a | ||
| 811 | #define PCI_DEVICE_ID_APPLE_IPID2_GMAC 0x006b | ||
| 808 | #define PCI_DEVICE_ID_APPLE_TIGON3 0x1645 | 812 | #define PCI_DEVICE_ID_APPLE_TIGON3 0x1645 |
| 809 | 813 | ||
| 810 | #define PCI_VENDOR_ID_YAMAHA 0x1073 | 814 | #define PCI_VENDOR_ID_YAMAHA 0x1073 |
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 5451eb1e781d..fb8d2d24e4bb 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
| @@ -38,7 +38,7 @@ extern void free_percpu(const void *); | |||
| 38 | 38 | ||
| 39 | #else /* CONFIG_SMP */ | 39 | #else /* CONFIG_SMP */ |
| 40 | 40 | ||
| 41 | #define per_cpu_ptr(ptr, cpu) (ptr) | 41 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) |
| 42 | 42 | ||
| 43 | static inline void *__alloc_percpu(size_t size, size_t align) | 43 | static inline void *__alloc_percpu(size_t size, size_t align) |
| 44 | { | 44 | { |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 1514098d156d..5be87ba3b7ac 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
| @@ -94,55 +94,6 @@ struct pm_dev | |||
| 94 | struct list_head entry; | 94 | struct list_head entry; |
| 95 | }; | 95 | }; |
| 96 | 96 | ||
| 97 | #ifdef CONFIG_PM | ||
| 98 | |||
| 99 | extern int pm_active; | ||
| 100 | |||
| 101 | #define PM_IS_ACTIVE() (pm_active != 0) | ||
| 102 | |||
| 103 | /* | ||
| 104 | * Register a device with power management | ||
| 105 | */ | ||
| 106 | struct pm_dev __deprecated * | ||
| 107 | pm_register(pm_dev_t type, unsigned long id, pm_callback callback); | ||
| 108 | |||
| 109 | /* | ||
| 110 | * Unregister a device with power management | ||
| 111 | */ | ||
| 112 | void __deprecated pm_unregister(struct pm_dev *dev); | ||
| 113 | |||
| 114 | /* | ||
| 115 | * Unregister all devices with matching callback | ||
| 116 | */ | ||
| 117 | void __deprecated pm_unregister_all(pm_callback callback); | ||
| 118 | |||
| 119 | /* | ||
| 120 | * Send a request to all devices | ||
| 121 | */ | ||
| 122 | int __deprecated pm_send_all(pm_request_t rqst, void *data); | ||
| 123 | |||
| 124 | #else /* CONFIG_PM */ | ||
| 125 | |||
| 126 | #define PM_IS_ACTIVE() 0 | ||
| 127 | |||
| 128 | static inline struct pm_dev *pm_register(pm_dev_t type, | ||
| 129 | unsigned long id, | ||
| 130 | pm_callback callback) | ||
| 131 | { | ||
| 132 | return NULL; | ||
| 133 | } | ||
| 134 | |||
| 135 | static inline void pm_unregister(struct pm_dev *dev) {} | ||
| 136 | |||
| 137 | static inline void pm_unregister_all(pm_callback callback) {} | ||
| 138 | |||
| 139 | static inline int pm_send_all(pm_request_t rqst, void *data) | ||
| 140 | { | ||
| 141 | return 0; | ||
| 142 | } | ||
| 143 | |||
| 144 | #endif /* CONFIG_PM */ | ||
| 145 | |||
| 146 | /* Functions above this comment are list-based old-style power | 97 | /* Functions above this comment are list-based old-style power |
| 147 | * managment. Please avoid using them. */ | 98 | * managment. Please avoid using them. */ |
| 148 | 99 | ||
diff --git a/include/linux/pm_legacy.h b/include/linux/pm_legacy.h new file mode 100644 index 000000000000..1252b45face1 --- /dev/null +++ b/include/linux/pm_legacy.h | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | #ifndef __LINUX_PM_LEGACY_H__ | ||
| 2 | #define __LINUX_PM_LEGACY_H__ | ||
| 3 | |||
| 4 | #include <linux/config.h> | ||
| 5 | |||
| 6 | #ifdef CONFIG_PM_LEGACY | ||
| 7 | |||
| 8 | extern int pm_active; | ||
| 9 | |||
| 10 | #define PM_IS_ACTIVE() (pm_active != 0) | ||
| 11 | |||
| 12 | /* | ||
| 13 | * Register a device with power management | ||
| 14 | */ | ||
| 15 | struct pm_dev __deprecated * | ||
| 16 | pm_register(pm_dev_t type, unsigned long id, pm_callback callback); | ||
| 17 | |||
| 18 | /* | ||
| 19 | * Unregister a device with power management | ||
| 20 | */ | ||
| 21 | void __deprecated pm_unregister(struct pm_dev *dev); | ||
| 22 | |||
| 23 | /* | ||
| 24 | * Unregister all devices with matching callback | ||
| 25 | */ | ||
| 26 | void __deprecated pm_unregister_all(pm_callback callback); | ||
| 27 | |||
| 28 | /* | ||
| 29 | * Send a request to all devices | ||
| 30 | */ | ||
| 31 | int __deprecated pm_send_all(pm_request_t rqst, void *data); | ||
| 32 | |||
| 33 | #else /* CONFIG_PM_LEGACY */ | ||
| 34 | |||
| 35 | #define PM_IS_ACTIVE() 0 | ||
| 36 | |||
| 37 | static inline struct pm_dev *pm_register(pm_dev_t type, | ||
| 38 | unsigned long id, | ||
| 39 | pm_callback callback) | ||
| 40 | { | ||
| 41 | return NULL; | ||
| 42 | } | ||
| 43 | |||
| 44 | static inline void pm_unregister(struct pm_dev *dev) {} | ||
| 45 | |||
| 46 | static inline void pm_unregister_all(pm_callback callback) {} | ||
| 47 | |||
| 48 | static inline int pm_send_all(pm_request_t rqst, void *data) | ||
| 49 | { | ||
| 50 | return 0; | ||
| 51 | } | ||
| 52 | |||
| 53 | #endif /* CONFIG_PM_LEGACY */ | ||
| 54 | |||
| 55 | #endif /* __LINUX_PM_LEGACY_H__ */ | ||
| 56 | |||
diff --git a/include/linux/preempt.h b/include/linux/preempt.h index dd98c54a23b4..d9a2f5254a51 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | */ | 7 | */ |
| 8 | 8 | ||
| 9 | #include <linux/config.h> | 9 | #include <linux/config.h> |
| 10 | #include <linux/thread_info.h> | ||
| 10 | #include <linux/linkage.h> | 11 | #include <linux/linkage.h> |
| 11 | 12 | ||
| 12 | #ifdef CONFIG_DEBUG_PREEMPT | 13 | #ifdef CONFIG_DEBUG_PREEMPT |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 2bbf968b23d9..2038bd27b041 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -357,7 +357,6 @@ struct mm_struct { | |||
| 357 | /* aio bits */ | 357 | /* aio bits */ |
| 358 | rwlock_t ioctx_list_lock; | 358 | rwlock_t ioctx_list_lock; |
| 359 | struct kioctx *ioctx_list; | 359 | struct kioctx *ioctx_list; |
| 360 | struct kioctx default_kioctx; | ||
| 361 | }; | 360 | }; |
| 362 | 361 | ||
| 363 | struct sighand_struct { | 362 | struct sighand_struct { |
| @@ -1233,32 +1232,49 @@ static inline void task_unlock(struct task_struct *p) | |||
| 1233 | spin_unlock(&p->alloc_lock); | 1232 | spin_unlock(&p->alloc_lock); |
| 1234 | } | 1233 | } |
| 1235 | 1234 | ||
| 1235 | #ifndef __HAVE_THREAD_FUNCTIONS | ||
| 1236 | |||
| 1237 | #define task_thread_info(task) (task)->thread_info | ||
| 1238 | |||
| 1239 | static inline void setup_thread_stack(struct task_struct *p, struct task_struct *org) | ||
| 1240 | { | ||
| 1241 | *task_thread_info(p) = *task_thread_info(org); | ||
| 1242 | task_thread_info(p)->task = p; | ||
| 1243 | } | ||
| 1244 | |||
| 1245 | static inline unsigned long *end_of_stack(struct task_struct *p) | ||
| 1246 | { | ||
| 1247 | return (unsigned long *)(p->thread_info + 1); | ||
| 1248 | } | ||
| 1249 | |||
| 1250 | #endif | ||
| 1251 | |||
| 1236 | /* set thread flags in other task's structures | 1252 | /* set thread flags in other task's structures |
| 1237 | * - see asm/thread_info.h for TIF_xxxx flags available | 1253 | * - see asm/thread_info.h for TIF_xxxx flags available |
| 1238 | */ | 1254 | */ |
| 1239 | static inline void set_tsk_thread_flag(struct task_struct *tsk, int flag) | 1255 | static inline void set_tsk_thread_flag(struct task_struct *tsk, int flag) |
| 1240 | { | 1256 | { |
| 1241 | set_ti_thread_flag(tsk->thread_info,flag); | 1257 | set_ti_thread_flag(task_thread_info(tsk), flag); |
| 1242 | } | 1258 | } |
| 1243 | 1259 | ||
| 1244 | static inline void clear_tsk_thread_flag(struct task_struct *tsk, int flag) | 1260 | static inline void clear_tsk_thread_flag(struct task_struct *tsk, int flag) |
| 1245 | { | 1261 | { |
| 1246 | clear_ti_thread_flag(tsk->thread_info,flag); | 1262 | clear_ti_thread_flag(task_thread_info(tsk), flag); |
| 1247 | } | 1263 | } |
| 1248 | 1264 | ||
| 1249 | static inline int test_and_set_tsk_thread_flag(struct task_struct *tsk, int flag) | 1265 | static inline int test_and_set_tsk_thread_flag(struct task_struct *tsk, int flag) |
| 1250 | { | 1266 | { |
| 1251 | return test_and_set_ti_thread_flag(tsk->thread_info,flag); | 1267 | return test_and_set_ti_thread_flag(task_thread_info(tsk), flag); |
| 1252 | } | 1268 | } |
| 1253 | 1269 | ||
| 1254 | static inline int test_and_clear_tsk_thread_flag(struct task_struct *tsk, int flag) | 1270 | static inline int test_and_clear_tsk_thread_flag(struct task_struct *tsk, int flag) |
| 1255 | { | 1271 | { |
| 1256 | return test_and_clear_ti_thread_flag(tsk->thread_info,flag); | 1272 | return test_and_clear_ti_thread_flag(task_thread_info(tsk), flag); |
| 1257 | } | 1273 | } |
| 1258 | 1274 | ||
| 1259 | static inline int test_tsk_thread_flag(struct task_struct *tsk, int flag) | 1275 | static inline int test_tsk_thread_flag(struct task_struct *tsk, int flag) |
| 1260 | { | 1276 | { |
| 1261 | return test_ti_thread_flag(tsk->thread_info,flag); | 1277 | return test_ti_thread_flag(task_thread_info(tsk), flag); |
| 1262 | } | 1278 | } |
| 1263 | 1279 | ||
| 1264 | static inline void set_tsk_need_resched(struct task_struct *tsk) | 1280 | static inline void set_tsk_need_resched(struct task_struct *tsk) |
| @@ -1329,12 +1345,12 @@ extern void signal_wake_up(struct task_struct *t, int resume_stopped); | |||
| 1329 | 1345 | ||
| 1330 | static inline unsigned int task_cpu(const struct task_struct *p) | 1346 | static inline unsigned int task_cpu(const struct task_struct *p) |
| 1331 | { | 1347 | { |
| 1332 | return p->thread_info->cpu; | 1348 | return task_thread_info(p)->cpu; |
| 1333 | } | 1349 | } |
| 1334 | 1350 | ||
| 1335 | static inline void set_task_cpu(struct task_struct *p, unsigned int cpu) | 1351 | static inline void set_task_cpu(struct task_struct *p, unsigned int cpu) |
| 1336 | { | 1352 | { |
| 1337 | p->thread_info->cpu = cpu; | 1353 | task_thread_info(p)->cpu = cpu; |
| 1338 | } | 1354 | } |
| 1339 | 1355 | ||
| 1340 | #else | 1356 | #else |
diff --git a/include/linux/smp_lock.h b/include/linux/smp_lock.h index b63ce7014093..fa1ff3b165fe 100644 --- a/include/linux/smp_lock.h +++ b/include/linux/smp_lock.h | |||
| @@ -2,11 +2,10 @@ | |||
| 2 | #define __LINUX_SMPLOCK_H | 2 | #define __LINUX_SMPLOCK_H |
| 3 | 3 | ||
| 4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
| 5 | #ifdef CONFIG_LOCK_KERNEL | ||
| 5 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
| 6 | #include <linux/spinlock.h> | 7 | #include <linux/spinlock.h> |
| 7 | 8 | ||
| 8 | #ifdef CONFIG_LOCK_KERNEL | ||
| 9 | |||
| 10 | #define kernel_locked() (current->lock_depth >= 0) | 9 | #define kernel_locked() (current->lock_depth >= 0) |
| 11 | 10 | ||
| 12 | extern int __lockfunc __reacquire_kernel_lock(void); | 11 | extern int __lockfunc __reacquire_kernel_lock(void); |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 64f203c45378..6bc03c911a83 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
| @@ -20,7 +20,6 @@ | |||
| 20 | 20 | ||
| 21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
| 22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
| 23 | #include <linux/list.h> | ||
| 24 | #include <linux/compiler.h> | 23 | #include <linux/compiler.h> |
| 25 | 24 | ||
| 26 | struct file; | 25 | struct file; |
| @@ -859,6 +858,7 @@ enum | |||
| 859 | }; | 858 | }; |
| 860 | 859 | ||
| 861 | #ifdef __KERNEL__ | 860 | #ifdef __KERNEL__ |
| 861 | #include <linux/list.h> | ||
| 862 | 862 | ||
| 863 | extern void sysctl_init(void); | 863 | extern void sysctl_init(void); |
| 864 | 864 | ||
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index d252f45a0f9b..1c4eb41dbd89 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h | |||
| @@ -27,31 +27,6 @@ extern long do_no_restart_syscall(struct restart_block *parm); | |||
| 27 | * - pass TIF_xxxx constants to these functions | 27 | * - pass TIF_xxxx constants to these functions |
| 28 | */ | 28 | */ |
| 29 | 29 | ||
| 30 | static inline void set_thread_flag(int flag) | ||
| 31 | { | ||
| 32 | set_bit(flag,¤t_thread_info()->flags); | ||
| 33 | } | ||
| 34 | |||
| 35 | static inline void clear_thread_flag(int flag) | ||
| 36 | { | ||
| 37 | clear_bit(flag,¤t_thread_info()->flags); | ||
| 38 | } | ||
| 39 | |||
| 40 | static inline int test_and_set_thread_flag(int flag) | ||
| 41 | { | ||
| 42 | return test_and_set_bit(flag,¤t_thread_info()->flags); | ||
| 43 | } | ||
| 44 | |||
| 45 | static inline int test_and_clear_thread_flag(int flag) | ||
| 46 | { | ||
| 47 | return test_and_clear_bit(flag,¤t_thread_info()->flags); | ||
| 48 | } | ||
| 49 | |||
| 50 | static inline int test_thread_flag(int flag) | ||
| 51 | { | ||
| 52 | return test_bit(flag,¤t_thread_info()->flags); | ||
| 53 | } | ||
| 54 | |||
| 55 | static inline void set_ti_thread_flag(struct thread_info *ti, int flag) | 30 | static inline void set_ti_thread_flag(struct thread_info *ti, int flag) |
| 56 | { | 31 | { |
| 57 | set_bit(flag,&ti->flags); | 32 | set_bit(flag,&ti->flags); |
| @@ -77,15 +52,19 @@ static inline int test_ti_thread_flag(struct thread_info *ti, int flag) | |||
| 77 | return test_bit(flag,&ti->flags); | 52 | return test_bit(flag,&ti->flags); |
| 78 | } | 53 | } |
| 79 | 54 | ||
| 80 | static inline void set_need_resched(void) | 55 | #define set_thread_flag(flag) \ |
| 81 | { | 56 | set_ti_thread_flag(current_thread_info(), flag) |
| 82 | set_thread_flag(TIF_NEED_RESCHED); | 57 | #define clear_thread_flag(flag) \ |
| 83 | } | 58 | clear_ti_thread_flag(current_thread_info(), flag) |
| 84 | 59 | #define test_and_set_thread_flag(flag) \ | |
| 85 | static inline void clear_need_resched(void) | 60 | test_and_set_ti_thread_flag(current_thread_info(), flag) |
| 86 | { | 61 | #define test_and_clear_thread_flag(flag) \ |
| 87 | clear_thread_flag(TIF_NEED_RESCHED); | 62 | test_and_clear_ti_thread_flag(current_thread_info(), flag) |
| 88 | } | 63 | #define test_thread_flag(flag) \ |
| 64 | test_ti_thread_flag(current_thread_info(), flag) | ||
| 65 | |||
| 66 | #define set_need_resched() set_thread_flag(TIF_NEED_RESCHED) | ||
| 67 | #define clear_need_resched() clear_thread_flag(TIF_NEED_RESCHED) | ||
| 89 | 68 | ||
| 90 | #endif | 69 | #endif |
| 91 | 70 | ||
diff --git a/include/linux/time.h b/include/linux/time.h index 8e83f4e778bb..bfbe92d0767c 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
| @@ -101,7 +101,7 @@ extern struct timespec timespec_trunc(struct timespec t, unsigned gran); | |||
| 101 | static inline void | 101 | static inline void |
| 102 | set_normalized_timespec (struct timespec *ts, time_t sec, long nsec) | 102 | set_normalized_timespec (struct timespec *ts, time_t sec, long nsec) |
| 103 | { | 103 | { |
| 104 | while (nsec > NSEC_PER_SEC) { | 104 | while (nsec >= NSEC_PER_SEC) { |
| 105 | nsec -= NSEC_PER_SEC; | 105 | nsec -= NSEC_PER_SEC; |
| 106 | ++sec; | 106 | ++sec; |
| 107 | } | 107 | } |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 748d04385256..856d232c7562 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
| @@ -819,7 +819,7 @@ typedef void (*usb_complete_t)(struct urb *, struct pt_regs *); | |||
| 819 | */ | 819 | */ |
| 820 | struct urb | 820 | struct urb |
| 821 | { | 821 | { |
| 822 | /* private, usb core and host controller only fields in the urb */ | 822 | /* private: usb core and host controller only fields in the urb */ |
| 823 | struct kref kref; /* reference count of the URB */ | 823 | struct kref kref; /* reference count of the URB */ |
| 824 | spinlock_t lock; /* lock for the URB */ | 824 | spinlock_t lock; /* lock for the URB */ |
| 825 | void *hcpriv; /* private data for host controller */ | 825 | void *hcpriv; /* private data for host controller */ |
| @@ -827,7 +827,7 @@ struct urb | |||
| 827 | atomic_t use_count; /* concurrent submissions counter */ | 827 | atomic_t use_count; /* concurrent submissions counter */ |
| 828 | u8 reject; /* submissions will fail */ | 828 | u8 reject; /* submissions will fail */ |
| 829 | 829 | ||
| 830 | /* public, documented fields in the urb that can be used by drivers */ | 830 | /* public: documented fields in the urb that can be used by drivers */ |
| 831 | struct list_head urb_list; /* list head for use by the urb's | 831 | struct list_head urb_list; /* list head for use by the urb's |
| 832 | * current owner */ | 832 | * current owner */ |
| 833 | struct usb_device *dev; /* (in) pointer to associated device */ | 833 | struct usb_device *dev; /* (in) pointer to associated device */ |
| @@ -1045,7 +1045,7 @@ struct usb_sg_request { | |||
| 1045 | size_t bytes; | 1045 | size_t bytes; |
| 1046 | 1046 | ||
| 1047 | /* | 1047 | /* |
| 1048 | * members below are private to usbcore, | 1048 | * members below are private: to usbcore, |
| 1049 | * and are not provided for driver access! | 1049 | * and are not provided for driver access! |
| 1050 | */ | 1050 | */ |
| 1051 | spinlock_t lock; | 1051 | spinlock_t lock; |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index a114fff6568b..1cded681eb6d 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
| @@ -636,6 +636,7 @@ typedef __u64 v4l2_std_id; | |||
| 636 | #define V4L2_STD_SECAM_K ((v4l2_std_id)0x00100000) | 636 | #define V4L2_STD_SECAM_K ((v4l2_std_id)0x00100000) |
| 637 | #define V4L2_STD_SECAM_K1 ((v4l2_std_id)0x00200000) | 637 | #define V4L2_STD_SECAM_K1 ((v4l2_std_id)0x00200000) |
| 638 | #define V4L2_STD_SECAM_L ((v4l2_std_id)0x00400000) | 638 | #define V4L2_STD_SECAM_L ((v4l2_std_id)0x00400000) |
| 639 | #define V4L2_STD_SECAM_LC ((v4l2_std_id)0x00800000) | ||
| 639 | 640 | ||
| 640 | /* ATSC/HDTV */ | 641 | /* ATSC/HDTV */ |
| 641 | #define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000) | 642 | #define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000) |
