diff options
Diffstat (limited to 'include')
50 files changed, 270 insertions, 113 deletions
diff --git a/include/asm-avr32/io.h b/include/asm-avr32/io.h index e30d4b3bd836..64bb92bb6773 100644 --- a/include/asm-avr32/io.h +++ b/include/asm-avr32/io.h | |||
@@ -255,6 +255,8 @@ static inline void memset_io(volatile void __iomem *addr, unsigned char val, | |||
255 | memset((void __force *)addr, val, count); | 255 | memset((void __force *)addr, val, count); |
256 | } | 256 | } |
257 | 257 | ||
258 | #define mmiowb() | ||
259 | |||
258 | #define IO_SPACE_LIMIT 0xffffffff | 260 | #define IO_SPACE_LIMIT 0xffffffff |
259 | 261 | ||
260 | extern void __iomem *__ioremap(unsigned long offset, size_t size, | 262 | extern void __iomem *__ioremap(unsigned long offset, size_t size, |
diff --git a/include/asm-avr32/pgalloc.h b/include/asm-avr32/pgalloc.h index bb82e70cde8d..0e680f47209f 100644 --- a/include/asm-avr32/pgalloc.h +++ b/include/asm-avr32/pgalloc.h | |||
@@ -27,13 +27,7 @@ static __inline__ void pmd_populate(struct mm_struct *mm, pmd_t *pmd, | |||
27 | */ | 27 | */ |
28 | static __inline__ pgd_t *pgd_alloc(struct mm_struct *mm) | 28 | static __inline__ pgd_t *pgd_alloc(struct mm_struct *mm) |
29 | { | 29 | { |
30 | unsigned int pgd_size = (USER_PTRS_PER_PGD * sizeof(pgd_t)); | 30 | return kcalloc(USER_PTRS_PER_PGD, sizeof(pgd_t), GFP_KERNEL); |
31 | pgd_t *pgd = kmalloc(pgd_size, GFP_KERNEL); | ||
32 | |||
33 | if (pgd) | ||
34 | memset(pgd, 0, pgd_size); | ||
35 | |||
36 | return pgd; | ||
37 | } | 31 | } |
38 | 32 | ||
39 | static inline void pgd_free(pgd_t *pgd) | 33 | static inline void pgd_free(pgd_t *pgd) |
@@ -44,18 +38,9 @@ static inline void pgd_free(pgd_t *pgd) | |||
44 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, | 38 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, |
45 | unsigned long address) | 39 | unsigned long address) |
46 | { | 40 | { |
47 | int count = 0; | ||
48 | pte_t *pte; | 41 | pte_t *pte; |
49 | 42 | ||
50 | do { | 43 | pte = (pte_t *)get_zeroed_page(GFP_KERNEL | __GFP_REPEAT); |
51 | pte = (pte_t *) __get_free_page(GFP_KERNEL | __GFP_REPEAT); | ||
52 | if (pte) | ||
53 | clear_page(pte); | ||
54 | else { | ||
55 | current->state = TASK_UNINTERRUPTIBLE; | ||
56 | schedule_timeout(HZ); | ||
57 | } | ||
58 | } while (!pte && (count++ < 10)); | ||
59 | 44 | ||
60 | return pte; | 45 | return pte; |
61 | } | 46 | } |
@@ -63,18 +48,9 @@ static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, | |||
63 | static inline struct page *pte_alloc_one(struct mm_struct *mm, | 48 | static inline struct page *pte_alloc_one(struct mm_struct *mm, |
64 | unsigned long address) | 49 | unsigned long address) |
65 | { | 50 | { |
66 | int count = 0; | ||
67 | struct page *pte; | 51 | struct page *pte; |
68 | 52 | ||
69 | do { | 53 | pte = alloc_page(GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO); |
70 | pte = alloc_pages(GFP_KERNEL, 0); | ||
71 | if (pte) | ||
72 | clear_page(page_address(pte)); | ||
73 | else { | ||
74 | current->state = TASK_UNINTERRUPTIBLE; | ||
75 | schedule_timeout(HZ); | ||
76 | } | ||
77 | } while (!pte && (count++ < 10)); | ||
78 | 54 | ||
79 | return pte; | 55 | return pte; |
80 | } | 56 | } |
diff --git a/include/asm-avr32/pgtable.h b/include/asm-avr32/pgtable.h index c07bdd10b891..018f6e2a0242 100644 --- a/include/asm-avr32/pgtable.h +++ b/include/asm-avr32/pgtable.h | |||
@@ -32,8 +32,6 @@ | |||
32 | #define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE) | 32 | #define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE) |
33 | #define FIRST_USER_ADDRESS 0 | 33 | #define FIRST_USER_ADDRESS 0 |
34 | 34 | ||
35 | #define PTE_PHYS_MASK 0x1ffff000 | ||
36 | |||
37 | #ifndef __ASSEMBLY__ | 35 | #ifndef __ASSEMBLY__ |
38 | extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; | 36 | extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; |
39 | extern void paging_init(void); | 37 | extern void paging_init(void); |
@@ -265,7 +263,7 @@ static inline pte_t pte_mkyoung(pte_t pte) | |||
265 | * trivial. | 263 | * trivial. |
266 | */ | 264 | */ |
267 | #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) | 265 | #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) |
268 | #define pte_page(x) phys_to_page(pte_val(x) & PTE_PHYS_MASK) | 266 | #define pte_page(x) (pfn_to_page(pte_pfn(x))) |
269 | 267 | ||
270 | /* | 268 | /* |
271 | * Mark the prot value as uncacheable and unbufferable | 269 | * Mark the prot value as uncacheable and unbufferable |
diff --git a/include/asm-i386/io.h b/include/asm-i386/io.h index 7b65b5b00034..e8e0bd641120 100644 --- a/include/asm-i386/io.h +++ b/include/asm-i386/io.h | |||
@@ -112,6 +112,9 @@ extern void __iomem * __ioremap(unsigned long offset, unsigned long size, unsign | |||
112 | * writew/writel functions and the other mmio helpers. The returned | 112 | * writew/writel functions and the other mmio helpers. The returned |
113 | * address is not guaranteed to be usable directly as a virtual | 113 | * address is not guaranteed to be usable directly as a virtual |
114 | * address. | 114 | * address. |
115 | * | ||
116 | * If the area you are trying to map is a PCI BAR you should have a | ||
117 | * look at pci_iomap(). | ||
115 | */ | 118 | */ |
116 | 119 | ||
117 | static inline void __iomem * ioremap(unsigned long offset, unsigned long size) | 120 | static inline void __iomem * ioremap(unsigned long offset, unsigned long size) |
diff --git a/include/asm-i386/mach-default/mach_wakecpu.h b/include/asm-i386/mach-default/mach_wakecpu.h index 673b85c9b273..3ebb17893aa5 100644 --- a/include/asm-i386/mach-default/mach_wakecpu.h +++ b/include/asm-i386/mach-default/mach_wakecpu.h | |||
@@ -15,7 +15,8 @@ | |||
15 | 15 | ||
16 | static inline void wait_for_init_deassert(atomic_t *deassert) | 16 | static inline void wait_for_init_deassert(atomic_t *deassert) |
17 | { | 17 | { |
18 | while (!atomic_read(deassert)); | 18 | while (!atomic_read(deassert)) |
19 | cpu_relax(); | ||
19 | return; | 20 | return; |
20 | } | 21 | } |
21 | 22 | ||
diff --git a/include/asm-i386/mach-es7000/mach_wakecpu.h b/include/asm-i386/mach-es7000/mach_wakecpu.h index efc903b73486..84ff58314501 100644 --- a/include/asm-i386/mach-es7000/mach_wakecpu.h +++ b/include/asm-i386/mach-es7000/mach_wakecpu.h | |||
@@ -31,7 +31,8 @@ wakeup_secondary_cpu(int phys_apicid, unsigned long start_eip) | |||
31 | static inline void wait_for_init_deassert(atomic_t *deassert) | 31 | static inline void wait_for_init_deassert(atomic_t *deassert) |
32 | { | 32 | { |
33 | #ifdef WAKE_SECONDARY_VIA_INIT | 33 | #ifdef WAKE_SECONDARY_VIA_INIT |
34 | while (!atomic_read(deassert)); | 34 | while (!atomic_read(deassert)) |
35 | cpu_relax(); | ||
35 | #endif | 36 | #endif |
36 | return; | 37 | return; |
37 | } | 38 | } |
diff --git a/include/asm-i386/nmi.h b/include/asm-i386/nmi.h index ff30c98f87b0..70a958a8e381 100644 --- a/include/asm-i386/nmi.h +++ b/include/asm-i386/nmi.h | |||
@@ -33,11 +33,12 @@ extern int nmi_watchdog_tick (struct pt_regs * regs, unsigned reason); | |||
33 | 33 | ||
34 | extern atomic_t nmi_active; | 34 | extern atomic_t nmi_active; |
35 | extern unsigned int nmi_watchdog; | 35 | extern unsigned int nmi_watchdog; |
36 | #define NMI_DEFAULT -1 | 36 | #define NMI_DISABLED -1 |
37 | #define NMI_NONE 0 | 37 | #define NMI_NONE 0 |
38 | #define NMI_IO_APIC 1 | 38 | #define NMI_IO_APIC 1 |
39 | #define NMI_LOCAL_APIC 2 | 39 | #define NMI_LOCAL_APIC 2 |
40 | #define NMI_INVALID 3 | 40 | #define NMI_INVALID 3 |
41 | #define NMI_DEFAULT NMI_DISABLED | ||
41 | 42 | ||
42 | struct ctl_table; | 43 | struct ctl_table; |
43 | struct file; | 44 | struct file; |
diff --git a/include/asm-ia64/atomic.h b/include/asm-ia64/atomic.h index 1fc3b83325da..50c2b83fd5a0 100644 --- a/include/asm-ia64/atomic.h +++ b/include/asm-ia64/atomic.h | |||
@@ -55,7 +55,7 @@ ia64_atomic64_add (__s64 i, atomic64_t *v) | |||
55 | 55 | ||
56 | do { | 56 | do { |
57 | CMPXCHG_BUGCHECK(v); | 57 | CMPXCHG_BUGCHECK(v); |
58 | old = atomic_read(v); | 58 | old = atomic64_read(v); |
59 | new = old + i; | 59 | new = old + i; |
60 | } while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic64_t)) != old); | 60 | } while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic64_t)) != old); |
61 | return new; | 61 | return new; |
@@ -83,7 +83,7 @@ ia64_atomic64_sub (__s64 i, atomic64_t *v) | |||
83 | 83 | ||
84 | do { | 84 | do { |
85 | CMPXCHG_BUGCHECK(v); | 85 | CMPXCHG_BUGCHECK(v); |
86 | old = atomic_read(v); | 86 | old = atomic64_read(v); |
87 | new = old - i; | 87 | new = old - i; |
88 | } while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic64_t)) != old); | 88 | } while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic64_t)) != old); |
89 | return new; | 89 | return new; |
diff --git a/include/asm-ia64/hw_irq.h b/include/asm-ia64/hw_irq.h index efa1b8f7251d..bba5baa3c7fc 100644 --- a/include/asm-ia64/hw_irq.h +++ b/include/asm-ia64/hw_irq.h | |||
@@ -124,6 +124,11 @@ static inline void ia64_resend_irq(unsigned int vector) | |||
124 | extern irq_desc_t irq_desc[NR_IRQS]; | 124 | extern irq_desc_t irq_desc[NR_IRQS]; |
125 | 125 | ||
126 | #ifndef CONFIG_IA64_GENERIC | 126 | #ifndef CONFIG_IA64_GENERIC |
127 | static inline ia64_vector __ia64_irq_to_vector(int irq) | ||
128 | { | ||
129 | return irq_cfg[irq].vector; | ||
130 | } | ||
131 | |||
127 | static inline unsigned int | 132 | static inline unsigned int |
128 | __ia64_local_vector_to_irq (ia64_vector vec) | 133 | __ia64_local_vector_to_irq (ia64_vector vec) |
129 | { | 134 | { |
@@ -145,7 +150,7 @@ __ia64_local_vector_to_irq (ia64_vector vec) | |||
145 | static inline ia64_vector | 150 | static inline ia64_vector |
146 | irq_to_vector (int irq) | 151 | irq_to_vector (int irq) |
147 | { | 152 | { |
148 | return irq_cfg[irq].vector; | 153 | return platform_irq_to_vector(irq); |
149 | } | 154 | } |
150 | 155 | ||
151 | /* | 156 | /* |
diff --git a/include/asm-ia64/machvec.h b/include/asm-ia64/machvec.h index 5cf8bf1e805e..c201a2020aa4 100644 --- a/include/asm-ia64/machvec.h +++ b/include/asm-ia64/machvec.h | |||
@@ -30,6 +30,7 @@ typedef void ia64_mv_send_ipi_t (int, int, int, int); | |||
30 | typedef void ia64_mv_timer_interrupt_t (int, void *); | 30 | typedef void ia64_mv_timer_interrupt_t (int, void *); |
31 | typedef void ia64_mv_global_tlb_purge_t (struct mm_struct *, unsigned long, unsigned long, unsigned long); | 31 | typedef void ia64_mv_global_tlb_purge_t (struct mm_struct *, unsigned long, unsigned long, unsigned long); |
32 | typedef void ia64_mv_tlb_migrate_finish_t (struct mm_struct *); | 32 | typedef void ia64_mv_tlb_migrate_finish_t (struct mm_struct *); |
33 | typedef u8 ia64_mv_irq_to_vector (int); | ||
33 | typedef unsigned int ia64_mv_local_vector_to_irq (u8); | 34 | typedef unsigned int ia64_mv_local_vector_to_irq (u8); |
34 | typedef char *ia64_mv_pci_get_legacy_mem_t (struct pci_bus *); | 35 | typedef char *ia64_mv_pci_get_legacy_mem_t (struct pci_bus *); |
35 | typedef int ia64_mv_pci_legacy_read_t (struct pci_bus *, u16 port, u32 *val, | 36 | typedef int ia64_mv_pci_legacy_read_t (struct pci_bus *, u16 port, u32 *val, |
@@ -145,6 +146,7 @@ extern void machvec_tlb_migrate_finish (struct mm_struct *); | |||
145 | # define platform_dma_sync_sg_for_device ia64_mv.dma_sync_sg_for_device | 146 | # define platform_dma_sync_sg_for_device ia64_mv.dma_sync_sg_for_device |
146 | # define platform_dma_mapping_error ia64_mv.dma_mapping_error | 147 | # define platform_dma_mapping_error ia64_mv.dma_mapping_error |
147 | # define platform_dma_supported ia64_mv.dma_supported | 148 | # define platform_dma_supported ia64_mv.dma_supported |
149 | # define platform_irq_to_vector ia64_mv.irq_to_vector | ||
148 | # define platform_local_vector_to_irq ia64_mv.local_vector_to_irq | 150 | # define platform_local_vector_to_irq ia64_mv.local_vector_to_irq |
149 | # define platform_pci_get_legacy_mem ia64_mv.pci_get_legacy_mem | 151 | # define platform_pci_get_legacy_mem ia64_mv.pci_get_legacy_mem |
150 | # define platform_pci_legacy_read ia64_mv.pci_legacy_read | 152 | # define platform_pci_legacy_read ia64_mv.pci_legacy_read |
@@ -198,6 +200,7 @@ struct ia64_machine_vector { | |||
198 | ia64_mv_dma_sync_sg_for_device *dma_sync_sg_for_device; | 200 | ia64_mv_dma_sync_sg_for_device *dma_sync_sg_for_device; |
199 | ia64_mv_dma_mapping_error *dma_mapping_error; | 201 | ia64_mv_dma_mapping_error *dma_mapping_error; |
200 | ia64_mv_dma_supported *dma_supported; | 202 | ia64_mv_dma_supported *dma_supported; |
203 | ia64_mv_irq_to_vector *irq_to_vector; | ||
201 | ia64_mv_local_vector_to_irq *local_vector_to_irq; | 204 | ia64_mv_local_vector_to_irq *local_vector_to_irq; |
202 | ia64_mv_pci_get_legacy_mem_t *pci_get_legacy_mem; | 205 | ia64_mv_pci_get_legacy_mem_t *pci_get_legacy_mem; |
203 | ia64_mv_pci_legacy_read_t *pci_legacy_read; | 206 | ia64_mv_pci_legacy_read_t *pci_legacy_read; |
@@ -247,6 +250,7 @@ struct ia64_machine_vector { | |||
247 | platform_dma_sync_sg_for_device, \ | 250 | platform_dma_sync_sg_for_device, \ |
248 | platform_dma_mapping_error, \ | 251 | platform_dma_mapping_error, \ |
249 | platform_dma_supported, \ | 252 | platform_dma_supported, \ |
253 | platform_irq_to_vector, \ | ||
250 | platform_local_vector_to_irq, \ | 254 | platform_local_vector_to_irq, \ |
251 | platform_pci_get_legacy_mem, \ | 255 | platform_pci_get_legacy_mem, \ |
252 | platform_pci_legacy_read, \ | 256 | platform_pci_legacy_read, \ |
@@ -366,6 +370,9 @@ extern ia64_mv_dma_supported swiotlb_dma_supported; | |||
366 | #ifndef platform_dma_supported | 370 | #ifndef platform_dma_supported |
367 | # define platform_dma_supported swiotlb_dma_supported | 371 | # define platform_dma_supported swiotlb_dma_supported |
368 | #endif | 372 | #endif |
373 | #ifndef platform_irq_to_vector | ||
374 | # define platform_irq_to_vector __ia64_irq_to_vector | ||
375 | #endif | ||
369 | #ifndef platform_local_vector_to_irq | 376 | #ifndef platform_local_vector_to_irq |
370 | # define platform_local_vector_to_irq __ia64_local_vector_to_irq | 377 | # define platform_local_vector_to_irq __ia64_local_vector_to_irq |
371 | #endif | 378 | #endif |
diff --git a/include/asm-ia64/machvec_init.h b/include/asm-ia64/machvec_init.h index 2d36f6840f0b..7f21249fba3f 100644 --- a/include/asm-ia64/machvec_init.h +++ b/include/asm-ia64/machvec_init.h | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | extern ia64_mv_send_ipi_t ia64_send_ipi; | 3 | extern ia64_mv_send_ipi_t ia64_send_ipi; |
4 | extern ia64_mv_global_tlb_purge_t ia64_global_tlb_purge; | 4 | extern ia64_mv_global_tlb_purge_t ia64_global_tlb_purge; |
5 | extern ia64_mv_irq_to_vector __ia64_irq_to_vector; | ||
5 | extern ia64_mv_local_vector_to_irq __ia64_local_vector_to_irq; | 6 | extern ia64_mv_local_vector_to_irq __ia64_local_vector_to_irq; |
6 | extern ia64_mv_pci_get_legacy_mem_t ia64_pci_get_legacy_mem; | 7 | extern ia64_mv_pci_get_legacy_mem_t ia64_pci_get_legacy_mem; |
7 | extern ia64_mv_pci_legacy_read_t ia64_pci_legacy_read; | 8 | extern ia64_mv_pci_legacy_read_t ia64_pci_legacy_read; |
diff --git a/include/asm-ia64/machvec_sn2.h b/include/asm-ia64/machvec_sn2.h index eaa2fce0fecd..61439a7f5b08 100644 --- a/include/asm-ia64/machvec_sn2.h +++ b/include/asm-ia64/machvec_sn2.h | |||
@@ -35,6 +35,7 @@ extern ia64_mv_send_ipi_t sn2_send_IPI; | |||
35 | extern ia64_mv_timer_interrupt_t sn_timer_interrupt; | 35 | extern ia64_mv_timer_interrupt_t sn_timer_interrupt; |
36 | extern ia64_mv_global_tlb_purge_t sn2_global_tlb_purge; | 36 | extern ia64_mv_global_tlb_purge_t sn2_global_tlb_purge; |
37 | extern ia64_mv_tlb_migrate_finish_t sn_tlb_migrate_finish; | 37 | extern ia64_mv_tlb_migrate_finish_t sn_tlb_migrate_finish; |
38 | extern ia64_mv_irq_to_vector sn_irq_to_vector; | ||
38 | extern ia64_mv_local_vector_to_irq sn_local_vector_to_irq; | 39 | extern ia64_mv_local_vector_to_irq sn_local_vector_to_irq; |
39 | extern ia64_mv_pci_get_legacy_mem_t sn_pci_get_legacy_mem; | 40 | extern ia64_mv_pci_get_legacy_mem_t sn_pci_get_legacy_mem; |
40 | extern ia64_mv_pci_legacy_read_t sn_pci_legacy_read; | 41 | extern ia64_mv_pci_legacy_read_t sn_pci_legacy_read; |
@@ -104,6 +105,7 @@ extern ia64_mv_pci_fixup_bus_t sn_pci_fixup_bus; | |||
104 | #define platform_readw_relaxed __sn_readw_relaxed | 105 | #define platform_readw_relaxed __sn_readw_relaxed |
105 | #define platform_readl_relaxed __sn_readl_relaxed | 106 | #define platform_readl_relaxed __sn_readl_relaxed |
106 | #define platform_readq_relaxed __sn_readq_relaxed | 107 | #define platform_readq_relaxed __sn_readq_relaxed |
108 | #define platform_irq_to_vector sn_irq_to_vector | ||
107 | #define platform_local_vector_to_irq sn_local_vector_to_irq | 109 | #define platform_local_vector_to_irq sn_local_vector_to_irq |
108 | #define platform_pci_get_legacy_mem sn_pci_get_legacy_mem | 110 | #define platform_pci_get_legacy_mem sn_pci_get_legacy_mem |
109 | #define platform_pci_legacy_read sn_pci_legacy_read | 111 | #define platform_pci_legacy_read sn_pci_legacy_read |
diff --git a/include/asm-m68k/ioctls.h b/include/asm-m68k/ioctls.h index 0c48929ab444..b8d2f4be7fd7 100644 --- a/include/asm-m68k/ioctls.h +++ b/include/asm-m68k/ioctls.h | |||
@@ -46,6 +46,10 @@ | |||
46 | #define TIOCSBRK 0x5427 /* BSD compatibility */ | 46 | #define TIOCSBRK 0x5427 /* BSD compatibility */ |
47 | #define TIOCCBRK 0x5428 /* BSD compatibility */ | 47 | #define TIOCCBRK 0x5428 /* BSD compatibility */ |
48 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ | 48 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ |
49 | #define TCGETS2 _IOR('T',0x2A, struct termios2) | ||
50 | #define TCSETS2 _IOW('T',0x2B, struct termios2) | ||
51 | #define TCSETSW2 _IOW('T',0x2C, struct termios2) | ||
52 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) | ||
49 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 53 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
50 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 54 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
51 | 55 | ||
diff --git a/include/asm-m68k/page.h b/include/asm-m68k/page.h index 9e6d0d6debdb..1431ea0b59e0 100644 --- a/include/asm-m68k/page.h +++ b/include/asm-m68k/page.h | |||
@@ -4,17 +4,15 @@ | |||
4 | 4 | ||
5 | #ifdef __KERNEL__ | 5 | #ifdef __KERNEL__ |
6 | 6 | ||
7 | #include <linux/const.h> | ||
8 | |||
7 | /* PAGE_SHIFT determines the page size */ | 9 | /* PAGE_SHIFT determines the page size */ |
8 | #ifndef CONFIG_SUN3 | 10 | #ifndef CONFIG_SUN3 |
9 | #define PAGE_SHIFT (12) | 11 | #define PAGE_SHIFT (12) |
10 | #else | 12 | #else |
11 | #define PAGE_SHIFT (13) | 13 | #define PAGE_SHIFT (13) |
12 | #endif | 14 | #endif |
13 | #ifdef __ASSEMBLY__ | 15 | #define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT) |
14 | #define PAGE_SIZE (1 << PAGE_SHIFT) | ||
15 | #else | ||
16 | #define PAGE_SIZE (1UL << PAGE_SHIFT) | ||
17 | #endif | ||
18 | #define PAGE_MASK (~(PAGE_SIZE-1)) | 16 | #define PAGE_MASK (~(PAGE_SIZE-1)) |
19 | 17 | ||
20 | #include <asm/setup.h> | 18 | #include <asm/setup.h> |
@@ -27,6 +25,8 @@ | |||
27 | 25 | ||
28 | #ifndef __ASSEMBLY__ | 26 | #ifndef __ASSEMBLY__ |
29 | 27 | ||
28 | #include <linux/compiler.h> | ||
29 | |||
30 | #include <asm/module.h> | 30 | #include <asm/module.h> |
31 | 31 | ||
32 | #define get_user_page(vaddr) __get_free_page(GFP_KERNEL) | 32 | #define get_user_page(vaddr) __get_free_page(GFP_KERNEL) |
diff --git a/include/asm-m68k/processor.h b/include/asm-m68k/processor.h index 8455f778b601..4453ec379c5d 100644 --- a/include/asm-m68k/processor.h +++ b/include/asm-m68k/processor.h | |||
@@ -38,12 +38,8 @@ static inline void wrusp(unsigned long usp) | |||
38 | #ifndef CONFIG_SUN3 | 38 | #ifndef CONFIG_SUN3 |
39 | #define TASK_SIZE (0xF0000000UL) | 39 | #define TASK_SIZE (0xF0000000UL) |
40 | #else | 40 | #else |
41 | #ifdef __ASSEMBLY__ | ||
42 | #define TASK_SIZE (0x0E000000) | ||
43 | #else | ||
44 | #define TASK_SIZE (0x0E000000UL) | 41 | #define TASK_SIZE (0x0E000000UL) |
45 | #endif | 42 | #endif |
46 | #endif | ||
47 | 43 | ||
48 | /* This decides where the kernel will search for a free chunk of vm | 44 | /* This decides where the kernel will search for a free chunk of vm |
49 | * space during mmap's. | 45 | * space during mmap's. |
diff --git a/include/asm-m68k/termbits.h b/include/asm-m68k/termbits.h index 0e520f328f53..8c14170996bb 100644 --- a/include/asm-m68k/termbits.h +++ b/include/asm-m68k/termbits.h | |||
@@ -141,6 +141,7 @@ struct ktermios { | |||
141 | #define HUPCL 0002000 | 141 | #define HUPCL 0002000 |
142 | #define CLOCAL 0004000 | 142 | #define CLOCAL 0004000 |
143 | #define CBAUDEX 0010000 | 143 | #define CBAUDEX 0010000 |
144 | #define BOTHER 0010000 | ||
144 | #define B57600 0010001 | 145 | #define B57600 0010001 |
145 | #define B115200 0010002 | 146 | #define B115200 0010002 |
146 | #define B230400 0010003 | 147 | #define B230400 0010003 |
@@ -156,10 +157,12 @@ struct ktermios { | |||
156 | #define B3000000 0010015 | 157 | #define B3000000 0010015 |
157 | #define B3500000 0010016 | 158 | #define B3500000 0010016 |
158 | #define B4000000 0010017 | 159 | #define B4000000 0010017 |
159 | #define CIBAUD 002003600000 /* input baud rate (not used) */ | 160 | #define CIBAUD 002003600000 /* input baud rate */ |
160 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | 161 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ |
161 | #define CRTSCTS 020000000000 /* flow control */ | 162 | #define CRTSCTS 020000000000 /* flow control */ |
162 | 163 | ||
164 | #define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ | ||
165 | |||
163 | /* c_lflag bits */ | 166 | /* c_lflag bits */ |
164 | #define ISIG 0000001 | 167 | #define ISIG 0000001 |
165 | #define ICANON 0000002 | 168 | #define ICANON 0000002 |
diff --git a/include/asm-m68k/termios.h b/include/asm-m68k/termios.h index 00edabd76168..0823032e4045 100644 --- a/include/asm-m68k/termios.h +++ b/include/asm-m68k/termios.h | |||
@@ -82,8 +82,10 @@ struct termio { | |||
82 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ | 82 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ |
83 | }) | 83 | }) |
84 | 84 | ||
85 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) | 85 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) |
86 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) | 86 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) |
87 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) | ||
88 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) | ||
87 | 89 | ||
88 | #endif /* __KERNEL__ */ | 90 | #endif /* __KERNEL__ */ |
89 | 91 | ||
diff --git a/include/asm-m68knommu/pgtable.h b/include/asm-m68knommu/pgtable.h index e1e6a1d2333a..46251016e821 100644 --- a/include/asm-m68knommu/pgtable.h +++ b/include/asm-m68knommu/pgtable.h | |||
@@ -65,4 +65,6 @@ extern unsigned int kobjsize(const void *objp); | |||
65 | #define VMALLOC_START 0 | 65 | #define VMALLOC_START 0 |
66 | #define VMALLOC_END 0xffffffff | 66 | #define VMALLOC_END 0xffffffff |
67 | 67 | ||
68 | #include <asm-generic/pgtable.h> | ||
69 | |||
68 | #endif /* _M68KNOMMU_PGTABLE_H */ | 70 | #endif /* _M68KNOMMU_PGTABLE_H */ |
diff --git a/include/asm-powerpc/reg_booke.h b/include/asm-powerpc/reg_booke.h index 064405c207bf..8fdc2b47afb9 100644 --- a/include/asm-powerpc/reg_booke.h +++ b/include/asm-powerpc/reg_booke.h | |||
@@ -223,7 +223,6 @@ | |||
223 | #define MCSR_ICPERR 0x40000000UL /* I-Cache Parity Error */ | 223 | #define MCSR_ICPERR 0x40000000UL /* I-Cache Parity Error */ |
224 | #define MCSR_DCP_PERR 0x20000000UL /* D-Cache Push Parity Error */ | 224 | #define MCSR_DCP_PERR 0x20000000UL /* D-Cache Push Parity Error */ |
225 | #define MCSR_DCPERR 0x10000000UL /* D-Cache Parity Error */ | 225 | #define MCSR_DCPERR 0x10000000UL /* D-Cache Parity Error */ |
226 | #define MCSR_GL_CI 0x00010000UL /* Guarded Load or Cache-Inhibited stwcx. */ | ||
227 | #define MCSR_BUS_IAERR 0x00000080UL /* Instruction Address Error */ | 226 | #define MCSR_BUS_IAERR 0x00000080UL /* Instruction Address Error */ |
228 | #define MCSR_BUS_RAERR 0x00000040UL /* Read Address Error */ | 227 | #define MCSR_BUS_RAERR 0x00000040UL /* Read Address Error */ |
229 | #define MCSR_BUS_WAERR 0x00000020UL /* Write Address Error */ | 228 | #define MCSR_BUS_WAERR 0x00000020UL /* Write Address Error */ |
@@ -232,6 +231,12 @@ | |||
232 | #define MCSR_BUS_WBERR 0x00000004UL /* Write Data Bus Error */ | 231 | #define MCSR_BUS_WBERR 0x00000004UL /* Write Data Bus Error */ |
233 | #define MCSR_BUS_IPERR 0x00000002UL /* Instruction parity Error */ | 232 | #define MCSR_BUS_IPERR 0x00000002UL /* Instruction parity Error */ |
234 | #define MCSR_BUS_RPERR 0x00000001UL /* Read parity Error */ | 233 | #define MCSR_BUS_RPERR 0x00000001UL /* Read parity Error */ |
234 | |||
235 | /* e500 parts may set unused bits in MCSR; mask these off */ | ||
236 | #define MCSR_MASK (MCSR_MCP | MCSR_ICPERR | MCSR_DCP_PERR | \ | ||
237 | MCSR_DCPERR | MCSR_BUS_IAERR | MCSR_BUS_RAERR | \ | ||
238 | MCSR_BUS_WAERR | MCSR_BUS_IBERR | MCSR_BUS_RBERR | \ | ||
239 | MCSR_BUS_WBERR | MCSR_BUS_IPERR | MCSR_BUS_RPERR) | ||
235 | #endif | 240 | #endif |
236 | #ifdef CONFIG_E200 | 241 | #ifdef CONFIG_E200 |
237 | #define MCSR_MCP 0x80000000UL /* Machine Check Input Pin */ | 242 | #define MCSR_MCP 0x80000000UL /* Machine Check Input Pin */ |
@@ -243,6 +248,11 @@ | |||
243 | #define MCSR_BUS_DRERR 0x00000008UL /* Read Bus Error on data load */ | 248 | #define MCSR_BUS_DRERR 0x00000008UL /* Read Bus Error on data load */ |
244 | #define MCSR_BUS_WRERR 0x00000004UL /* Write Bus Error on buffered | 249 | #define MCSR_BUS_WRERR 0x00000004UL /* Write Bus Error on buffered |
245 | store or cache line push */ | 250 | store or cache line push */ |
251 | |||
252 | /* e200 parts may set unused bits in MCSR; mask these off */ | ||
253 | #define MCSR_MASK (MCSR_MCP | MCSR_CP_PERR | MCSR_CPERR | \ | ||
254 | MCSR_EXCP_ERR | MCSR_BUS_IRERR | MCSR_BUS_DRERR | \ | ||
255 | MCSR_BUS_WRERR) | ||
246 | #endif | 256 | #endif |
247 | 257 | ||
248 | /* Bit definitions for the DBSR. */ | 258 | /* Bit definitions for the DBSR. */ |
diff --git a/include/asm-s390/atomic.h b/include/asm-s390/atomic.h index ea486952f778..2d184655bc5d 100644 --- a/include/asm-s390/atomic.h +++ b/include/asm-s390/atomic.h | |||
@@ -67,8 +67,17 @@ typedef struct { | |||
67 | 67 | ||
68 | #endif /* __GNUC__ */ | 68 | #endif /* __GNUC__ */ |
69 | 69 | ||
70 | #define atomic_read(v) ((v)->counter) | 70 | static inline int atomic_read(const atomic_t *v) |
71 | #define atomic_set(v,i) (((v)->counter) = (i)) | 71 | { |
72 | barrier(); | ||
73 | return v->counter; | ||
74 | } | ||
75 | |||
76 | static inline void atomic_set(atomic_t *v, int i) | ||
77 | { | ||
78 | v->counter = i; | ||
79 | barrier(); | ||
80 | } | ||
72 | 81 | ||
73 | static __inline__ int atomic_add_return(int i, atomic_t * v) | 82 | static __inline__ int atomic_add_return(int i, atomic_t * v) |
74 | { | 83 | { |
@@ -182,8 +191,17 @@ typedef struct { | |||
182 | 191 | ||
183 | #endif /* __GNUC__ */ | 192 | #endif /* __GNUC__ */ |
184 | 193 | ||
185 | #define atomic64_read(v) ((v)->counter) | 194 | static inline long long atomic64_read(const atomic64_t *v) |
186 | #define atomic64_set(v,i) (((v)->counter) = (i)) | 195 | { |
196 | barrier(); | ||
197 | return v->counter; | ||
198 | } | ||
199 | |||
200 | static inline void atomic64_set(atomic64_t *v, long long i) | ||
201 | { | ||
202 | v->counter = i; | ||
203 | barrier(); | ||
204 | } | ||
187 | 205 | ||
188 | static __inline__ long long atomic64_add_return(long long i, atomic64_t * v) | 206 | static __inline__ long long atomic64_add_return(long long i, atomic64_t * v) |
189 | { | 207 | { |
diff --git a/include/asm-s390/cio.h b/include/asm-s390/cio.h index f738d2827582..1982fb344164 100644 --- a/include/asm-s390/cio.h +++ b/include/asm-s390/cio.h | |||
@@ -258,19 +258,6 @@ struct ciw { | |||
258 | /* Sick revalidation of device. */ | 258 | /* Sick revalidation of device. */ |
259 | #define CIO_REVALIDATE 0x0008 | 259 | #define CIO_REVALIDATE 0x0008 |
260 | 260 | ||
261 | struct diag210 { | ||
262 | __u16 vrdcdvno : 16; /* device number (input) */ | ||
263 | __u16 vrdclen : 16; /* data block length (input) */ | ||
264 | __u32 vrdcvcla : 8; /* virtual device class (output) */ | ||
265 | __u32 vrdcvtyp : 8; /* virtual device type (output) */ | ||
266 | __u32 vrdcvsta : 8; /* virtual device status (output) */ | ||
267 | __u32 vrdcvfla : 8; /* virtual device flags (output) */ | ||
268 | __u32 vrdcrccl : 8; /* real device class (output) */ | ||
269 | __u32 vrdccrty : 8; /* real device type (output) */ | ||
270 | __u32 vrdccrmd : 8; /* real device model (output) */ | ||
271 | __u32 vrdccrft : 8; /* real device feature (output) */ | ||
272 | } __attribute__ ((packed,aligned(4))); | ||
273 | |||
274 | struct ccw_dev_id { | 261 | struct ccw_dev_id { |
275 | u8 ssid; | 262 | u8 ssid; |
276 | u16 devno; | 263 | u16 devno; |
@@ -285,8 +272,6 @@ static inline int ccw_dev_id_is_equal(struct ccw_dev_id *dev_id1, | |||
285 | return 0; | 272 | return 0; |
286 | } | 273 | } |
287 | 274 | ||
288 | extern int diag210(struct diag210 *addr); | ||
289 | |||
290 | extern void wait_cons_dev(void); | 275 | extern void wait_cons_dev(void); |
291 | 276 | ||
292 | extern void css_schedule_reprobe(void); | 277 | extern void css_schedule_reprobe(void); |
diff --git a/include/asm-s390/diag.h b/include/asm-s390/diag.h new file mode 100644 index 000000000000..72b2e2f2d32d --- /dev/null +++ b/include/asm-s390/diag.h | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * s390 diagnose functions | ||
3 | * | ||
4 | * Copyright IBM Corp. 2007 | ||
5 | * Author(s): Michael Holzheu <holzheu@de.ibm.com> | ||
6 | */ | ||
7 | |||
8 | #ifndef _ASM_S390_DIAG_H | ||
9 | #define _ASM_S390_DIAG_H | ||
10 | |||
11 | /* | ||
12 | * Diagnose 10: Release pages | ||
13 | */ | ||
14 | extern void diag10(unsigned long addr); | ||
15 | |||
16 | /* | ||
17 | * Diagnose 14: Input spool file manipulation | ||
18 | */ | ||
19 | extern int diag14(unsigned long rx, unsigned long ry1, unsigned long subcode); | ||
20 | |||
21 | /* | ||
22 | * Diagnose 210: Get information about a virtual device | ||
23 | */ | ||
24 | struct diag210 { | ||
25 | u16 vrdcdvno; /* device number (input) */ | ||
26 | u16 vrdclen; /* data block length (input) */ | ||
27 | u8 vrdcvcla; /* virtual device class (output) */ | ||
28 | u8 vrdcvtyp; /* virtual device type (output) */ | ||
29 | u8 vrdcvsta; /* virtual device status (output) */ | ||
30 | u8 vrdcvfla; /* virtual device flags (output) */ | ||
31 | u8 vrdcrccl; /* real device class (output) */ | ||
32 | u8 vrdccrty; /* real device type (output) */ | ||
33 | u8 vrdccrmd; /* real device model (output) */ | ||
34 | u8 vrdccrft; /* real device feature (output) */ | ||
35 | } __attribute__((packed, aligned(4))); | ||
36 | |||
37 | extern int diag210(struct diag210 *addr); | ||
38 | |||
39 | #endif /* _ASM_S390_DIAG_H */ | ||
diff --git a/include/asm-s390/pgalloc.h b/include/asm-s390/pgalloc.h index 56c8a6c80e2e..e45d3c9a4b7e 100644 --- a/include/asm-s390/pgalloc.h +++ b/include/asm-s390/pgalloc.h | |||
@@ -19,8 +19,6 @@ | |||
19 | 19 | ||
20 | #define check_pgt_cache() do {} while (0) | 20 | #define check_pgt_cache() do {} while (0) |
21 | 21 | ||
22 | extern void diag10(unsigned long addr); | ||
23 | |||
24 | /* | 22 | /* |
25 | * Page allocation orders. | 23 | * Page allocation orders. |
26 | */ | 24 | */ |
diff --git a/include/asm-sh/dma-mapping.h b/include/asm-sh/dma-mapping.h index 6f492ac3fa13..84fefdaa01a5 100644 --- a/include/asm-sh/dma-mapping.h +++ b/include/asm-sh/dma-mapping.h | |||
@@ -160,6 +160,25 @@ static inline void dma_sync_single_for_device(struct device *dev, | |||
160 | dma_sync_single(dev, dma_handle, size, dir); | 160 | dma_sync_single(dev, dma_handle, size, dir); |
161 | } | 161 | } |
162 | 162 | ||
163 | static inline void dma_sync_single_range_for_cpu(struct device *dev, | ||
164 | dma_addr_t dma_handle, | ||
165 | unsigned long offset, | ||
166 | size_t size, | ||
167 | enum dma_data_direction direction) | ||
168 | { | ||
169 | dma_sync_single_for_cpu(dev, dma_handle+offset, size, direction); | ||
170 | } | ||
171 | |||
172 | static inline void dma_sync_single_range_for_device(struct device *dev, | ||
173 | dma_addr_t dma_handle, | ||
174 | unsigned long offset, | ||
175 | size_t size, | ||
176 | enum dma_data_direction direction) | ||
177 | { | ||
178 | dma_sync_single_for_device(dev, dma_handle+offset, size, direction); | ||
179 | } | ||
180 | |||
181 | |||
163 | static inline void dma_sync_sg_for_cpu(struct device *dev, | 182 | static inline void dma_sync_sg_for_cpu(struct device *dev, |
164 | struct scatterlist *sg, int nelems, | 183 | struct scatterlist *sg, int nelems, |
165 | enum dma_data_direction dir) | 184 | enum dma_data_direction dir) |
diff --git a/include/asm-sh64/dma-mapping.h b/include/asm-sh64/dma-mapping.h index d505f357f819..de4309960207 100644 --- a/include/asm-sh64/dma-mapping.h +++ b/include/asm-sh64/dma-mapping.h | |||
@@ -141,6 +141,24 @@ static inline void dma_sync_single_for_device(struct device *dev, | |||
141 | dma_sync_single(dev, dma_handle, size, dir); | 141 | dma_sync_single(dev, dma_handle, size, dir); |
142 | } | 142 | } |
143 | 143 | ||
144 | static inline void dma_sync_single_range_for_cpu(struct device *dev, | ||
145 | dma_addr_t dma_handle, | ||
146 | unsigned long offset, | ||
147 | size_t size, | ||
148 | enum dma_data_direction direction) | ||
149 | { | ||
150 | dma_sync_single_for_cpu(dev, dma_handle+offset, size, direction); | ||
151 | } | ||
152 | |||
153 | static inline void dma_sync_single_range_for_device(struct device *dev, | ||
154 | dma_addr_t dma_handle, | ||
155 | unsigned long offset, | ||
156 | size_t size, | ||
157 | enum dma_data_direction direction) | ||
158 | { | ||
159 | dma_sync_single_for_device(dev, dma_handle+offset, size, direction); | ||
160 | } | ||
161 | |||
144 | static inline void dma_sync_sg_for_cpu(struct device *dev, | 162 | static inline void dma_sync_sg_for_cpu(struct device *dev, |
145 | struct scatterlist *sg, int nelems, | 163 | struct scatterlist *sg, int nelems, |
146 | enum dma_data_direction dir) | 164 | enum dma_data_direction dir) |
diff --git a/include/asm-sparc/sbus.h b/include/asm-sparc/sbus.h index d036e4419d79..27d076c46964 100644 --- a/include/asm-sparc/sbus.h +++ b/include/asm-sparc/sbus.h | |||
@@ -68,7 +68,6 @@ struct sbus_dev { | |||
68 | /* This struct describes the SBus(s) found on this machine. */ | 68 | /* This struct describes the SBus(s) found on this machine. */ |
69 | struct sbus_bus { | 69 | struct sbus_bus { |
70 | struct of_device ofdev; | 70 | struct of_device ofdev; |
71 | void *iommu; /* Opaque IOMMU cookie */ | ||
72 | struct sbus_dev *devices; /* Link to devices on this SBus */ | 71 | struct sbus_dev *devices; /* Link to devices on this SBus */ |
73 | struct sbus_bus *next; /* next SBus, if more than one SBus */ | 72 | struct sbus_bus *next; /* next SBus, if more than one SBus */ |
74 | int prom_node; /* PROM device tree node for this SBus */ | 73 | int prom_node; /* PROM device tree node for this SBus */ |
diff --git a/include/asm-sparc/sfp-machine.h b/include/asm-sparc/sfp-machine.h index ecfc86a4a725..266a42b8f99f 100644 --- a/include/asm-sparc/sfp-machine.h +++ b/include/asm-sparc/sfp-machine.h | |||
@@ -203,4 +203,10 @@ extern struct task_struct *last_task_used_math; | |||
203 | #define FP_INHIBIT_RESULTS ((last_task_used_math->thread.fsr >> 23) & _fex) | 203 | #define FP_INHIBIT_RESULTS ((last_task_used_math->thread.fsr >> 23) & _fex) |
204 | #endif | 204 | #endif |
205 | 205 | ||
206 | #ifdef CONFIG_SMP | ||
207 | #define FP_TRAPPING_EXCEPTIONS ((current->thread.fsr >> 23) & 0x1f) | ||
208 | #else | ||
209 | #define FP_TRAPPING_EXCEPTIONS ((last_task_used_math->thread.fsr >> 23) & 0x1f) | ||
210 | #endif | ||
211 | |||
206 | #endif | 212 | #endif |
diff --git a/include/asm-sparc64/elf.h b/include/asm-sparc64/elf.h index 303d85e2f82e..8653e8665009 100644 --- a/include/asm-sparc64/elf.h +++ b/include/asm-sparc64/elf.h | |||
@@ -70,6 +70,7 @@ | |||
70 | #define HWCAP_SPARC_V9 16 | 70 | #define HWCAP_SPARC_V9 16 |
71 | #define HWCAP_SPARC_ULTRA3 32 | 71 | #define HWCAP_SPARC_ULTRA3 32 |
72 | #define HWCAP_SPARC_BLKINIT 64 | 72 | #define HWCAP_SPARC_BLKINIT 64 |
73 | #define HWCAP_SPARC_N2 128 | ||
73 | 74 | ||
74 | /* | 75 | /* |
75 | * These are used to set parameters in the core dumps. | 76 | * These are used to set parameters in the core dumps. |
@@ -155,8 +156,13 @@ static inline unsigned int sparc64_elf_hwcap(void) | |||
155 | 156 | ||
156 | if (tlb_type == cheetah || tlb_type == cheetah_plus) | 157 | if (tlb_type == cheetah || tlb_type == cheetah_plus) |
157 | cap |= HWCAP_SPARC_ULTRA3; | 158 | cap |= HWCAP_SPARC_ULTRA3; |
158 | else if (tlb_type == hypervisor) | 159 | else if (tlb_type == hypervisor) { |
159 | cap |= HWCAP_SPARC_BLKINIT; | 160 | if (sun4v_chip_type == SUN4V_CHIP_NIAGARA1 || |
161 | sun4v_chip_type == SUN4V_CHIP_NIAGARA2) | ||
162 | cap |= HWCAP_SPARC_BLKINIT; | ||
163 | if (sun4v_chip_type == SUN4V_CHIP_NIAGARA2) | ||
164 | cap |= HWCAP_SPARC_N2; | ||
165 | } | ||
160 | 166 | ||
161 | return cap; | 167 | return cap; |
162 | } | 168 | } |
diff --git a/include/asm-sparc64/percpu.h b/include/asm-sparc64/percpu.h index caf8750792ff..a1f53a4da405 100644 --- a/include/asm-sparc64/percpu.h +++ b/include/asm-sparc64/percpu.h | |||
@@ -3,6 +3,8 @@ | |||
3 | 3 | ||
4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
5 | 5 | ||
6 | register unsigned long __local_per_cpu_offset asm("g5"); | ||
7 | |||
6 | #ifdef CONFIG_SMP | 8 | #ifdef CONFIG_SMP |
7 | 9 | ||
8 | #define setup_per_cpu_areas() do { } while (0) | 10 | #define setup_per_cpu_areas() do { } while (0) |
@@ -23,8 +25,6 @@ extern unsigned long __per_cpu_shift; | |||
23 | __typeof__(type) per_cpu__##name \ | 25 | __typeof__(type) per_cpu__##name \ |
24 | ____cacheline_aligned_in_smp | 26 | ____cacheline_aligned_in_smp |
25 | 27 | ||
26 | register unsigned long __local_per_cpu_offset asm("g5"); | ||
27 | |||
28 | /* var is in discarded region: offset to particular copy we want */ | 28 | /* var is in discarded region: offset to particular copy we want */ |
29 | #define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu))) | 29 | #define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu))) |
30 | #define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __local_per_cpu_offset)) | 30 | #define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __local_per_cpu_offset)) |
diff --git a/include/asm-sparc64/sfp-machine.h b/include/asm-sparc64/sfp-machine.h index 89d42431efb5..c9331b02d9c8 100644 --- a/include/asm-sparc64/sfp-machine.h +++ b/include/asm-sparc64/sfp-machine.h | |||
@@ -88,4 +88,6 @@ | |||
88 | 88 | ||
89 | #define FP_INHIBIT_RESULTS ((current_thread_info()->xfsr[0] >> 23) & _fex) | 89 | #define FP_INHIBIT_RESULTS ((current_thread_info()->xfsr[0] >> 23) & _fex) |
90 | 90 | ||
91 | #define FP_TRAPPING_EXCEPTIONS ((current_thread_info()->xfsr[0] >> 23) & 0x1f) | ||
92 | |||
91 | #endif | 93 | #endif |
diff --git a/include/asm-sparc64/system.h b/include/asm-sparc64/system.h index 64891cb10f05..3f175fa7e6d2 100644 --- a/include/asm-sparc64/system.h +++ b/include/asm-sparc64/system.h | |||
@@ -141,7 +141,6 @@ do { \ | |||
141 | * not preserve it's value. Hairy, but it lets us remove 2 loads | 141 | * not preserve it's value. Hairy, but it lets us remove 2 loads |
142 | * and 2 stores in this critical code path. -DaveM | 142 | * and 2 stores in this critical code path. -DaveM |
143 | */ | 143 | */ |
144 | #define EXTRA_CLOBBER ,"%l1" | ||
145 | #define switch_to(prev, next, last) \ | 144 | #define switch_to(prev, next, last) \ |
146 | do { if (test_thread_flag(TIF_PERFCTR)) { \ | 145 | do { if (test_thread_flag(TIF_PERFCTR)) { \ |
147 | unsigned long __tmp; \ | 146 | unsigned long __tmp; \ |
@@ -164,33 +163,34 @@ do { if (test_thread_flag(TIF_PERFCTR)) { \ | |||
164 | "stx %%i6, [%%sp + 2047 + 0x70]\n\t" \ | 163 | "stx %%i6, [%%sp + 2047 + 0x70]\n\t" \ |
165 | "stx %%i7, [%%sp + 2047 + 0x78]\n\t" \ | 164 | "stx %%i7, [%%sp + 2047 + 0x78]\n\t" \ |
166 | "rdpr %%wstate, %%o5\n\t" \ | 165 | "rdpr %%wstate, %%o5\n\t" \ |
167 | "stx %%o6, [%%g6 + %3]\n\t" \ | 166 | "stx %%o6, [%%g6 + %6]\n\t" \ |
168 | "stb %%o5, [%%g6 + %2]\n\t" \ | ||
169 | "rdpr %%cwp, %%o5\n\t" \ | ||
170 | "stb %%o5, [%%g6 + %5]\n\t" \ | 167 | "stb %%o5, [%%g6 + %5]\n\t" \ |
171 | "mov %1, %%g6\n\t" \ | 168 | "rdpr %%cwp, %%o5\n\t" \ |
172 | "ldub [%1 + %5], %%g1\n\t" \ | 169 | "stb %%o5, [%%g6 + %8]\n\t" \ |
170 | "mov %4, %%g6\n\t" \ | ||
171 | "ldub [%4 + %8], %%g1\n\t" \ | ||
173 | "wrpr %%g1, %%cwp\n\t" \ | 172 | "wrpr %%g1, %%cwp\n\t" \ |
174 | "ldx [%%g6 + %3], %%o6\n\t" \ | 173 | "ldx [%%g6 + %6], %%o6\n\t" \ |
175 | "ldub [%%g6 + %2], %%o5\n\t" \ | 174 | "ldub [%%g6 + %5], %%o5\n\t" \ |
176 | "ldub [%%g6 + %4], %%o7\n\t" \ | 175 | "ldub [%%g6 + %7], %%o7\n\t" \ |
177 | "wrpr %%o5, 0x0, %%wstate\n\t" \ | 176 | "wrpr %%o5, 0x0, %%wstate\n\t" \ |
178 | "ldx [%%sp + 2047 + 0x70], %%i6\n\t" \ | 177 | "ldx [%%sp + 2047 + 0x70], %%i6\n\t" \ |
179 | "ldx [%%sp + 2047 + 0x78], %%i7\n\t" \ | 178 | "ldx [%%sp + 2047 + 0x78], %%i7\n\t" \ |
180 | "ldx [%%g6 + %6], %%g4\n\t" \ | 179 | "ldx [%%g6 + %9], %%g4\n\t" \ |
181 | "brz,pt %%o7, 1f\n\t" \ | 180 | "brz,pt %%o7, 1f\n\t" \ |
182 | " mov %%g7, %0\n\t" \ | 181 | " mov %%g7, %0\n\t" \ |
183 | "b,a ret_from_syscall\n\t" \ | 182 | "b,a ret_from_syscall\n\t" \ |
184 | "1:\n\t" \ | 183 | "1:\n\t" \ |
185 | : "=&r" (last) \ | 184 | : "=&r" (last), "=r" (current), "=r" (current_thread_info_reg), \ |
185 | "=r" (__local_per_cpu_offset) \ | ||
186 | : "0" (task_thread_info(next)), \ | 186 | : "0" (task_thread_info(next)), \ |
187 | "i" (TI_WSTATE), "i" (TI_KSP), "i" (TI_NEW_CHILD), \ | 187 | "i" (TI_WSTATE), "i" (TI_KSP), "i" (TI_NEW_CHILD), \ |
188 | "i" (TI_CWP), "i" (TI_TASK) \ | 188 | "i" (TI_CWP), "i" (TI_TASK) \ |
189 | : "cc", \ | 189 | : "cc", \ |
190 | "g1", "g2", "g3", "g7", \ | 190 | "g1", "g2", "g3", "g7", \ |
191 | "l2", "l3", "l4", "l5", "l6", "l7", \ | 191 | "l1", "l2", "l3", "l4", "l5", "l6", "l7", \ |
192 | "i0", "i1", "i2", "i3", "i4", "i5", \ | 192 | "i0", "i1", "i2", "i3", "i4", "i5", \ |
193 | "o0", "o1", "o2", "o3", "o4", "o5", "o7" EXTRA_CLOBBER);\ | 193 | "o0", "o1", "o2", "o3", "o4", "o5", "o7"); \ |
194 | /* If you fuck with this, update ret_from_syscall code too. */ \ | 194 | /* If you fuck with this, update ret_from_syscall code too. */ \ |
195 | if (test_thread_flag(TIF_PERFCTR)) { \ | 195 | if (test_thread_flag(TIF_PERFCTR)) { \ |
196 | write_pcr(current_thread_info()->pcr_reg); \ | 196 | write_pcr(current_thread_info()->pcr_reg); \ |
diff --git a/include/asm-x86_64/nmi.h b/include/asm-x86_64/nmi.h index 5fb3c0de5ccc..65b6acf3bb59 100644 --- a/include/asm-x86_64/nmi.h +++ b/include/asm-x86_64/nmi.h | |||
@@ -64,11 +64,12 @@ extern int setup_nmi_watchdog(char *); | |||
64 | 64 | ||
65 | extern atomic_t nmi_active; | 65 | extern atomic_t nmi_active; |
66 | extern unsigned int nmi_watchdog; | 66 | extern unsigned int nmi_watchdog; |
67 | #define NMI_DEFAULT -1 | 67 | #define NMI_DISABLED -1 |
68 | #define NMI_NONE 0 | 68 | #define NMI_NONE 0 |
69 | #define NMI_IO_APIC 1 | 69 | #define NMI_IO_APIC 1 |
70 | #define NMI_LOCAL_APIC 2 | 70 | #define NMI_LOCAL_APIC 2 |
71 | #define NMI_INVALID 3 | 71 | #define NMI_INVALID 3 |
72 | #define NMI_DEFAULT NMI_DISABLED | ||
72 | 73 | ||
73 | struct ctl_table; | 74 | struct ctl_table; |
74 | struct file; | 75 | struct file; |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 4bbd8601b8f0..d6579df8dadf 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -63,8 +63,8 @@ | |||
63 | #define AUDIT_ADD_RULE 1011 /* Add syscall filtering rule */ | 63 | #define AUDIT_ADD_RULE 1011 /* Add syscall filtering rule */ |
64 | #define AUDIT_DEL_RULE 1012 /* Delete syscall filtering rule */ | 64 | #define AUDIT_DEL_RULE 1012 /* Delete syscall filtering rule */ |
65 | #define AUDIT_LIST_RULES 1013 /* List syscall filtering rules */ | 65 | #define AUDIT_LIST_RULES 1013 /* List syscall filtering rules */ |
66 | #define AUDIT_TTY_GET 1014 /* Get TTY auditing status */ | 66 | #define AUDIT_TTY_GET 1016 /* Get TTY auditing status */ |
67 | #define AUDIT_TTY_SET 1015 /* Set TTY auditing status */ | 67 | #define AUDIT_TTY_SET 1017 /* Set TTY auditing status */ |
68 | 68 | ||
69 | #define AUDIT_FIRST_USER_MSG 1100 /* Userspace messages mostly uninteresting to kernel */ | 69 | #define AUDIT_FIRST_USER_MSG 1100 /* Userspace messages mostly uninteresting to kernel */ |
70 | #define AUDIT_USER_AVC 1107 /* We filter this differently */ | 70 | #define AUDIT_USER_AVC 1107 /* We filter this differently */ |
diff --git a/include/linux/ide.h b/include/linux/ide.h index d71d0121b7f9..c792b4fd1588 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1285,13 +1285,14 @@ void ide_init_sg_cmd(ide_drive_t *, struct request *); | |||
1285 | #define BAD_DMA_DRIVE 0 | 1285 | #define BAD_DMA_DRIVE 0 |
1286 | #define GOOD_DMA_DRIVE 1 | 1286 | #define GOOD_DMA_DRIVE 1 |
1287 | 1287 | ||
1288 | #ifdef CONFIG_BLK_DEV_IDEDMA | ||
1289 | struct drive_list_entry { | 1288 | struct drive_list_entry { |
1290 | const char *id_model; | 1289 | const char *id_model; |
1291 | const char *id_firmware; | 1290 | const char *id_firmware; |
1292 | }; | 1291 | }; |
1293 | 1292 | ||
1294 | int ide_in_drive_list(struct hd_driveid *, const struct drive_list_entry *); | 1293 | int ide_in_drive_list(struct hd_driveid *, const struct drive_list_entry *); |
1294 | |||
1295 | #ifdef CONFIG_BLK_DEV_IDEDMA | ||
1295 | int __ide_dma_bad_drive(ide_drive_t *); | 1296 | int __ide_dma_bad_drive(ide_drive_t *); |
1296 | int __ide_dma_good_drive(ide_drive_t *); | 1297 | int __ide_dma_good_drive(ide_drive_t *); |
1297 | u8 ide_max_dma_mode(ide_drive_t *); | 1298 | u8 ide_max_dma_mode(ide_drive_t *); |
@@ -1312,7 +1313,6 @@ void ide_dma_host_off(ide_drive_t *); | |||
1312 | void ide_dma_off_quietly(ide_drive_t *); | 1313 | void ide_dma_off_quietly(ide_drive_t *); |
1313 | void ide_dma_host_on(ide_drive_t *); | 1314 | void ide_dma_host_on(ide_drive_t *); |
1314 | extern int __ide_dma_on(ide_drive_t *); | 1315 | extern int __ide_dma_on(ide_drive_t *); |
1315 | extern int __ide_dma_check(ide_drive_t *); | ||
1316 | extern int ide_dma_setup(ide_drive_t *); | 1316 | extern int ide_dma_setup(ide_drive_t *); |
1317 | extern void ide_dma_start(ide_drive_t *); | 1317 | extern void ide_dma_start(ide_drive_t *); |
1318 | extern int __ide_dma_end(ide_drive_t *); | 1318 | extern int __ide_dma_end(ide_drive_t *); |
diff --git a/include/linux/kbd_kern.h b/include/linux/kbd_kern.h index 506ad20c18f8..8bdb16bfe5fb 100644 --- a/include/linux/kbd_kern.h +++ b/include/linux/kbd_kern.h | |||
@@ -161,4 +161,7 @@ static inline void con_schedule_flip(struct tty_struct *t) | |||
161 | schedule_delayed_work(&t->buf.work, 0); | 161 | schedule_delayed_work(&t->buf.work, 0); |
162 | } | 162 | } |
163 | 163 | ||
164 | /* mac_hid.c */ | ||
165 | extern int mac_hid_mouse_emulate_buttons(int, unsigned int, int); | ||
166 | |||
164 | #endif | 167 | #endif |
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index e147cf50529f..5bdd656e88cf 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h | |||
@@ -166,7 +166,7 @@ extern enum zone_type policy_zone; | |||
166 | 166 | ||
167 | static inline void check_highest_zone(enum zone_type k) | 167 | static inline void check_highest_zone(enum zone_type k) |
168 | { | 168 | { |
169 | if (k > policy_zone) | 169 | if (k > policy_zone && k != ZONE_MOVABLE) |
170 | policy_zone = k; | 170 | policy_zone = k; |
171 | } | 171 | } |
172 | 172 | ||
diff --git a/include/linux/mm.h b/include/linux/mm.h index 655094dc9440..1692dd6cb915 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1042,7 +1042,7 @@ static inline void vma_nonlinear_insert(struct vm_area_struct *vma, | |||
1042 | } | 1042 | } |
1043 | 1043 | ||
1044 | /* mmap.c */ | 1044 | /* mmap.c */ |
1045 | extern int __vm_enough_memory(long pages, int cap_sys_admin); | 1045 | extern int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin); |
1046 | extern void vma_adjust(struct vm_area_struct *vma, unsigned long start, | 1046 | extern void vma_adjust(struct vm_area_struct *vma, unsigned long start, |
1047 | unsigned long end, pgoff_t pgoff, struct vm_area_struct *insert); | 1047 | unsigned long end, pgoff_t pgoff, struct vm_area_struct *insert); |
1048 | extern struct vm_area_struct *vma_merge(struct mm_struct *, | 1048 | extern struct vm_area_struct *vma_merge(struct mm_struct *, |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 3ea68cd3b61f..4e5627379b09 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -410,6 +410,24 @@ struct zonelist { | |||
410 | #endif | 410 | #endif |
411 | }; | 411 | }; |
412 | 412 | ||
413 | #ifdef CONFIG_NUMA | ||
414 | /* | ||
415 | * Only custom zonelists like MPOL_BIND need to be filtered as part of | ||
416 | * policies. As described in the comment for struct zonelist_cache, these | ||
417 | * zonelists will not have a zlcache so zlcache_ptr will not be set. Use | ||
418 | * that to determine if the zonelists needs to be filtered or not. | ||
419 | */ | ||
420 | static inline int alloc_should_filter_zonelist(struct zonelist *zonelist) | ||
421 | { | ||
422 | return !zonelist->zlcache_ptr; | ||
423 | } | ||
424 | #else | ||
425 | static inline int alloc_should_filter_zonelist(struct zonelist *zonelist) | ||
426 | { | ||
427 | return 0; | ||
428 | } | ||
429 | #endif /* CONFIG_NUMA */ | ||
430 | |||
413 | #ifdef CONFIG_ARCH_POPULATES_NODE_MAP | 431 | #ifdef CONFIG_ARCH_POPULATES_NODE_MAP |
414 | struct node_active_region { | 432 | struct node_active_region { |
415 | unsigned long start_pfn; | 433 | unsigned long start_pfn; |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 2ada8ee316b3..4dc5fa8be781 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -159,7 +159,8 @@ struct ap_device_id { | |||
159 | 159 | ||
160 | #define AP_DEVICE_ID_MATCH_DEVICE_TYPE 0x01 | 160 | #define AP_DEVICE_ID_MATCH_DEVICE_TYPE 0x01 |
161 | 161 | ||
162 | #define ACPI_ID_LEN 9 | 162 | #define ACPI_ID_LEN 16 /* only 9 bytes needed here, 16 bytes are used */ |
163 | /* to workaround crosscompile issues */ | ||
163 | 164 | ||
164 | struct acpi_device_id { | 165 | struct acpi_device_id { |
165 | __u8 id[ACPI_ID_LEN]; | 166 | __u8 id[ACPI_ID_LEN]; |
diff --git a/include/linux/pci.h b/include/linux/pci.h index e7d8d4e19a53..038a0dc7273a 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -557,6 +557,7 @@ int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); | |||
557 | int pcix_get_max_mmrbc(struct pci_dev *dev); | 557 | int pcix_get_max_mmrbc(struct pci_dev *dev); |
558 | int pcix_get_mmrbc(struct pci_dev *dev); | 558 | int pcix_get_mmrbc(struct pci_dev *dev); |
559 | int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc); | 559 | int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc); |
560 | int pcie_get_readrq(struct pci_dev *dev); | ||
560 | int pcie_set_readrq(struct pci_dev *dev, int rq); | 561 | int pcie_set_readrq(struct pci_dev *dev, int rq); |
561 | void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); | 562 | void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); |
562 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); | 563 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); |
@@ -578,6 +579,9 @@ int pci_set_power_state(struct pci_dev *dev, pci_power_t state); | |||
578 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); | 579 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); |
579 | int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable); | 580 | int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable); |
580 | 581 | ||
582 | /* Functions for PCI Hotplug drivers to use */ | ||
583 | int pci_bus_find_capability (struct pci_bus *bus, unsigned int devfn, int cap); | ||
584 | |||
581 | /* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */ | 585 | /* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */ |
582 | void pci_bus_assign_resources(struct pci_bus *bus); | 586 | void pci_bus_assign_resources(struct pci_bus *bus); |
583 | void pci_bus_size_bridges(struct pci_bus *bus); | 587 | void pci_bus_size_bridges(struct pci_bus *bus); |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 07fc57429b58..f77944e432f2 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -360,6 +360,9 @@ | |||
360 | #define PCI_DEVICE_ID_ATI_RS400_166 0x5a32 | 360 | #define PCI_DEVICE_ID_ATI_RS400_166 0x5a32 |
361 | #define PCI_DEVICE_ID_ATI_RS400_200 0x5a33 | 361 | #define PCI_DEVICE_ID_ATI_RS400_200 0x5a33 |
362 | #define PCI_DEVICE_ID_ATI_RS480 0x5950 | 362 | #define PCI_DEVICE_ID_ATI_RS480 0x5950 |
363 | #define PCI_DEVICE_ID_ATI_RD580 0x5952 | ||
364 | #define PCI_DEVICE_ID_ATI_RX790 0x5957 | ||
365 | #define PCI_DEVICE_ID_ATI_RS690 0x7910 | ||
363 | /* ATI IXP Chipset */ | 366 | /* ATI IXP Chipset */ |
364 | #define PCI_DEVICE_ID_ATI_IXP200_IDE 0x4349 | 367 | #define PCI_DEVICE_ID_ATI_IXP200_IDE 0x4349 |
365 | #define PCI_DEVICE_ID_ATI_IXP200_SMBUS 0x4353 | 368 | #define PCI_DEVICE_ID_ATI_IXP200_SMBUS 0x4353 |
@@ -2092,8 +2095,10 @@ | |||
2092 | #define PCI_DEVICE_ID_MPC8568 0x0021 | 2095 | #define PCI_DEVICE_ID_MPC8568 0x0021 |
2093 | #define PCI_DEVICE_ID_MPC8567E 0x0022 | 2096 | #define PCI_DEVICE_ID_MPC8567E 0x0022 |
2094 | #define PCI_DEVICE_ID_MPC8567 0x0023 | 2097 | #define PCI_DEVICE_ID_MPC8567 0x0023 |
2095 | #define PCI_DEVICE_ID_MPC8544E 0x0030 | 2098 | #define PCI_DEVICE_ID_MPC8533E 0x0030 |
2096 | #define PCI_DEVICE_ID_MPC8544 0x0031 | 2099 | #define PCI_DEVICE_ID_MPC8533 0x0031 |
2100 | #define PCI_DEVICE_ID_MPC8544E 0x0032 | ||
2101 | #define PCI_DEVICE_ID_MPC8544 0x0033 | ||
2097 | #define PCI_DEVICE_ID_MPC8641 0x7010 | 2102 | #define PCI_DEVICE_ID_MPC8641 0x7010 |
2098 | #define PCI_DEVICE_ID_MPC8641D 0x7011 | 2103 | #define PCI_DEVICE_ID_MPC8641D 0x7011 |
2099 | 2104 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 682ef87da6eb..ba78807eab91 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -681,7 +681,7 @@ enum cpu_idle_type { | |||
681 | #define SCHED_LOAD_SHIFT 10 | 681 | #define SCHED_LOAD_SHIFT 10 |
682 | #define SCHED_LOAD_SCALE (1L << SCHED_LOAD_SHIFT) | 682 | #define SCHED_LOAD_SCALE (1L << SCHED_LOAD_SHIFT) |
683 | 683 | ||
684 | #define SCHED_LOAD_SCALE_FUZZ (SCHED_LOAD_SCALE >> 1) | 684 | #define SCHED_LOAD_SCALE_FUZZ SCHED_LOAD_SCALE |
685 | 685 | ||
686 | #ifdef CONFIG_SMP | 686 | #ifdef CONFIG_SMP |
687 | #define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */ | 687 | #define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */ |
@@ -1388,7 +1388,8 @@ extern void sched_exec(void); | |||
1388 | #define sched_exec() {} | 1388 | #define sched_exec() {} |
1389 | #endif | 1389 | #endif |
1390 | 1390 | ||
1391 | extern void sched_clock_unstable_event(void); | 1391 | extern void sched_clock_idle_sleep_event(void); |
1392 | extern void sched_clock_idle_wakeup_event(u64 delta_ns); | ||
1392 | 1393 | ||
1393 | #ifdef CONFIG_HOTPLUG_CPU | 1394 | #ifdef CONFIG_HOTPLUG_CPU |
1394 | extern void idle_task_exit(void); | 1395 | extern void idle_task_exit(void); |
diff --git a/include/linux/security.h b/include/linux/security.h index c11dc8aa0351..1a15526e9f67 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -54,7 +54,7 @@ extern int cap_inode_removexattr(struct dentry *dentry, char *name); | |||
54 | extern int cap_task_post_setuid (uid_t old_ruid, uid_t old_euid, uid_t old_suid, int flags); | 54 | extern int cap_task_post_setuid (uid_t old_ruid, uid_t old_euid, uid_t old_suid, int flags); |
55 | extern void cap_task_reparent_to_init (struct task_struct *p); | 55 | extern void cap_task_reparent_to_init (struct task_struct *p); |
56 | extern int cap_syslog (int type); | 56 | extern int cap_syslog (int type); |
57 | extern int cap_vm_enough_memory (long pages); | 57 | extern int cap_vm_enough_memory (struct mm_struct *mm, long pages); |
58 | 58 | ||
59 | struct msghdr; | 59 | struct msghdr; |
60 | struct sk_buff; | 60 | struct sk_buff; |
@@ -1125,6 +1125,7 @@ struct request_sock; | |||
1125 | * Return 0 if permission is granted. | 1125 | * Return 0 if permission is granted. |
1126 | * @vm_enough_memory: | 1126 | * @vm_enough_memory: |
1127 | * Check permissions for allocating a new virtual mapping. | 1127 | * Check permissions for allocating a new virtual mapping. |
1128 | * @mm contains the mm struct it is being added to. | ||
1128 | * @pages contains the number of pages. | 1129 | * @pages contains the number of pages. |
1129 | * Return 0 if permission is granted. | 1130 | * Return 0 if permission is granted. |
1130 | * | 1131 | * |
@@ -1169,7 +1170,7 @@ struct security_operations { | |||
1169 | int (*quota_on) (struct dentry * dentry); | 1170 | int (*quota_on) (struct dentry * dentry); |
1170 | int (*syslog) (int type); | 1171 | int (*syslog) (int type); |
1171 | int (*settime) (struct timespec *ts, struct timezone *tz); | 1172 | int (*settime) (struct timespec *ts, struct timezone *tz); |
1172 | int (*vm_enough_memory) (long pages); | 1173 | int (*vm_enough_memory) (struct mm_struct *mm, long pages); |
1173 | 1174 | ||
1174 | int (*bprm_alloc_security) (struct linux_binprm * bprm); | 1175 | int (*bprm_alloc_security) (struct linux_binprm * bprm); |
1175 | void (*bprm_free_security) (struct linux_binprm * bprm); | 1176 | void (*bprm_free_security) (struct linux_binprm * bprm); |
@@ -1469,10 +1470,14 @@ static inline int security_settime(struct timespec *ts, struct timezone *tz) | |||
1469 | return security_ops->settime(ts, tz); | 1470 | return security_ops->settime(ts, tz); |
1470 | } | 1471 | } |
1471 | 1472 | ||
1472 | |||
1473 | static inline int security_vm_enough_memory(long pages) | 1473 | static inline int security_vm_enough_memory(long pages) |
1474 | { | 1474 | { |
1475 | return security_ops->vm_enough_memory(pages); | 1475 | return security_ops->vm_enough_memory(current->mm, pages); |
1476 | } | ||
1477 | |||
1478 | static inline int security_vm_enough_memory_mm(struct mm_struct *mm, long pages) | ||
1479 | { | ||
1480 | return security_ops->vm_enough_memory(mm, pages); | ||
1476 | } | 1481 | } |
1477 | 1482 | ||
1478 | static inline int security_bprm_alloc (struct linux_binprm *bprm) | 1483 | static inline int security_bprm_alloc (struct linux_binprm *bprm) |
@@ -2219,7 +2224,12 @@ static inline int security_settime(struct timespec *ts, struct timezone *tz) | |||
2219 | 2224 | ||
2220 | static inline int security_vm_enough_memory(long pages) | 2225 | static inline int security_vm_enough_memory(long pages) |
2221 | { | 2226 | { |
2222 | return cap_vm_enough_memory(pages); | 2227 | return cap_vm_enough_memory(current->mm, pages); |
2228 | } | ||
2229 | |||
2230 | static inline int security_vm_enough_memory_mm(struct mm_struct *mm, long pages) | ||
2231 | { | ||
2232 | return cap_vm_enough_memory(mm, pages); | ||
2223 | } | 2233 | } |
2224 | 2234 | ||
2225 | static inline int security_bprm_alloc (struct linux_binprm *bprm) | 2235 | static inline int security_bprm_alloc (struct linux_binprm *bprm) |
diff --git a/include/linux/selection.h b/include/linux/selection.h index ed3408b400f1..f9457861937c 100644 --- a/include/linux/selection.h +++ b/include/linux/selection.h | |||
@@ -10,6 +10,8 @@ | |||
10 | #include <linux/tiocl.h> | 10 | #include <linux/tiocl.h> |
11 | #include <linux/vt_buffer.h> | 11 | #include <linux/vt_buffer.h> |
12 | 12 | ||
13 | struct tty_struct; | ||
14 | |||
13 | extern struct vc_data *sel_cons; | 15 | extern struct vc_data *sel_cons; |
14 | 16 | ||
15 | extern void clear_selection(void); | 17 | extern void clear_selection(void); |
diff --git a/include/linux/serial_reg.h b/include/linux/serial_reg.h index 1c5ed7d92b0f..96c0d93fc2ca 100644 --- a/include/linux/serial_reg.h +++ b/include/linux/serial_reg.h | |||
@@ -118,6 +118,7 @@ | |||
118 | #define UART_LSR_PE 0x04 /* Parity error indicator */ | 118 | #define UART_LSR_PE 0x04 /* Parity error indicator */ |
119 | #define UART_LSR_OE 0x02 /* Overrun error indicator */ | 119 | #define UART_LSR_OE 0x02 /* Overrun error indicator */ |
120 | #define UART_LSR_DR 0x01 /* Receiver data ready */ | 120 | #define UART_LSR_DR 0x01 /* Receiver data ready */ |
121 | #define UART_LSR_BRK_ERROR_BITS 0x1E /* BI, FE, PE, OE bits */ | ||
121 | 122 | ||
122 | #define UART_MSR 6 /* In: Modem Status Register */ | 123 | #define UART_MSR 6 /* In: Modem Status Register */ |
123 | #define UART_MSR_DCD 0x80 /* Data Carrier Detect */ | 124 | #define UART_MSR_DCD 0x80 /* Data Carrier Detect */ |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index c66c8a3410b9..ae9b24c12f6a 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -617,7 +617,6 @@ struct v4l2_framebuffer | |||
617 | #define V4L2_FBUF_CAP_LOCAL_ALPHA 0x0010 | 617 | #define V4L2_FBUF_CAP_LOCAL_ALPHA 0x0010 |
618 | #define V4L2_FBUF_CAP_GLOBAL_ALPHA 0x0020 | 618 | #define V4L2_FBUF_CAP_GLOBAL_ALPHA 0x0020 |
619 | #define V4L2_FBUF_CAP_LOCAL_INV_ALPHA 0x0040 | 619 | #define V4L2_FBUF_CAP_LOCAL_INV_ALPHA 0x0040 |
620 | #define V4L2_FBUF_CAP_GLOBAL_INV_ALPHA 0x0080 | ||
621 | /* Flags for the 'flags' field. */ | 620 | /* Flags for the 'flags' field. */ |
622 | #define V4L2_FBUF_FLAG_PRIMARY 0x0001 | 621 | #define V4L2_FBUF_FLAG_PRIMARY 0x0001 |
623 | #define V4L2_FBUF_FLAG_OVERLAY 0x0002 | 622 | #define V4L2_FBUF_FLAG_OVERLAY 0x0002 |
@@ -625,7 +624,6 @@ struct v4l2_framebuffer | |||
625 | #define V4L2_FBUF_FLAG_LOCAL_ALPHA 0x0008 | 624 | #define V4L2_FBUF_FLAG_LOCAL_ALPHA 0x0008 |
626 | #define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010 | 625 | #define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010 |
627 | #define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020 | 626 | #define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020 |
628 | #define V4L2_FBUF_FLAG_GLOBAL_INV_ALPHA 0x0040 | ||
629 | 627 | ||
630 | struct v4l2_clip | 628 | struct v4l2_clip |
631 | { | 629 | { |
diff --git a/include/math-emu/op-common.h b/include/math-emu/op-common.h index 93780abd01bc..bb46e7645d53 100644 --- a/include/math-emu/op-common.h +++ b/include/math-emu/op-common.h | |||
@@ -145,13 +145,16 @@ do { \ | |||
145 | { \ | 145 | { \ |
146 | X##_e = 1; \ | 146 | X##_e = 1; \ |
147 | _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \ | 147 | _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \ |
148 | FP_SET_EXCEPTION(FP_EX_INEXACT); \ | ||
148 | } \ | 149 | } \ |
149 | else \ | 150 | else \ |
150 | { \ | 151 | { \ |
151 | X##_e = 0; \ | 152 | X##_e = 0; \ |
152 | _FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \ | 153 | _FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \ |
153 | FP_SET_EXCEPTION(FP_EX_UNDERFLOW); \ | ||
154 | } \ | 154 | } \ |
155 | if ((FP_CUR_EXCEPTIONS & FP_EX_INEXACT) || \ | ||
156 | (FP_TRAPPING_EXCEPTIONS & FP_EX_UNDERFLOW)) \ | ||
157 | FP_SET_EXCEPTION(FP_EX_UNDERFLOW); \ | ||
155 | } \ | 158 | } \ |
156 | else \ | 159 | else \ |
157 | { \ | 160 | { \ |
diff --git a/include/math-emu/soft-fp.h b/include/math-emu/soft-fp.h index d02eb64a865b..a6f873b45f98 100644 --- a/include/math-emu/soft-fp.h +++ b/include/math-emu/soft-fp.h | |||
@@ -97,12 +97,19 @@ | |||
97 | #define FP_INHIBIT_RESULTS 0 | 97 | #define FP_INHIBIT_RESULTS 0 |
98 | #endif | 98 | #endif |
99 | 99 | ||
100 | #ifndef FP_TRAPPING_EXCEPTIONS | ||
101 | #define FP_TRAPPING_EXCEPTIONS 0 | ||
102 | #endif | ||
103 | |||
100 | #define FP_SET_EXCEPTION(ex) \ | 104 | #define FP_SET_EXCEPTION(ex) \ |
101 | _fex |= (ex) | 105 | _fex |= (ex) |
102 | 106 | ||
103 | #define FP_UNSET_EXCEPTION(ex) \ | 107 | #define FP_UNSET_EXCEPTION(ex) \ |
104 | _fex &= ~(ex) | 108 | _fex &= ~(ex) |
105 | 109 | ||
110 | #define FP_CUR_EXCEPTIONS \ | ||
111 | (_fex) | ||
112 | |||
106 | #define FP_CLEAR_EXCEPTIONS \ | 113 | #define FP_CLEAR_EXCEPTIONS \ |
107 | _fex = 0 | 114 | _fex = 0 |
108 | 115 | ||
diff --git a/include/rdma/ib_mad.h b/include/rdma/ib_mad.h index 30712ddd8a5e..8ec3799e42e1 100644 --- a/include/rdma/ib_mad.h +++ b/include/rdma/ib_mad.h | |||
@@ -39,6 +39,8 @@ | |||
39 | #if !defined( IB_MAD_H ) | 39 | #if !defined( IB_MAD_H ) |
40 | #define IB_MAD_H | 40 | #define IB_MAD_H |
41 | 41 | ||
42 | #include <linux/list.h> | ||
43 | |||
42 | #include <rdma/ib_verbs.h> | 44 | #include <rdma/ib_verbs.h> |
43 | 45 | ||
44 | /* Management base version */ | 46 | /* Management base version */ |
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 0627a6aa282a..4bea182d7116 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -46,6 +46,8 @@ | |||
46 | #include <linux/mm.h> | 46 | #include <linux/mm.h> |
47 | #include <linux/dma-mapping.h> | 47 | #include <linux/dma-mapping.h> |
48 | #include <linux/kref.h> | 48 | #include <linux/kref.h> |
49 | #include <linux/list.h> | ||
50 | #include <linux/rwsem.h> | ||
49 | 51 | ||
50 | #include <asm/atomic.h> | 52 | #include <asm/atomic.h> |
51 | #include <asm/scatterlist.h> | 53 | #include <asm/scatterlist.h> |
@@ -731,11 +733,6 @@ struct ib_udata { | |||
731 | size_t outlen; | 733 | size_t outlen; |
732 | }; | 734 | }; |
733 | 735 | ||
734 | #define IB_UMEM_MAX_PAGE_CHUNK \ | ||
735 | ((PAGE_SIZE - offsetof(struct ib_umem_chunk, page_list)) / \ | ||
736 | ((void *) &((struct ib_umem_chunk *) 0)->page_list[1] - \ | ||
737 | (void *) &((struct ib_umem_chunk *) 0)->page_list[0])) | ||
738 | |||
739 | struct ib_pd { | 736 | struct ib_pd { |
740 | struct ib_device *device; | 737 | struct ib_device *device; |
741 | struct ib_uobject *uobject; | 738 | struct ib_uobject *uobject; |