diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/Kbuild | 1 | ||||
-rw-r--r-- | include/asm-generic/pgtable.h | 21 | ||||
-rw-r--r-- | include/linux/acpi.h | 2 | ||||
-rw-r--r-- | include/linux/cpumask.h | 15 | ||||
-rw-r--r-- | include/linux/dma-debug.h | 7 | ||||
-rw-r--r-- | include/linux/dmar.h | 3 | ||||
-rw-r--r-- | include/linux/futex.h | 6 | ||||
-rw-r--r-- | include/linux/interrupt.h | 2 | ||||
-rw-r--r-- | include/linux/irq.h | 58 | ||||
-rw-r--r-- | include/linux/mm.h | 2 | ||||
-rw-r--r-- | include/linux/mutex.h | 1 | ||||
-rw-r--r-- | include/linux/sched.h | 28 | ||||
-rw-r--r-- | include/linux/spinlock_up.h | 1 | ||||
-rw-r--r-- | include/linux/swiotlb.h | 3 | ||||
-rw-r--r-- | include/linux/thread_info.h | 3 | ||||
-rw-r--r-- | include/linux/wait.h | 2 | ||||
-rw-r--r-- | include/xen/Kbuild | 1 | ||||
-rw-r--r-- | include/xen/events.h | 3 | ||||
-rw-r--r-- | include/xen/evtchn.h | 88 | ||||
-rw-r--r-- | include/xen/interface/version.h | 3 | ||||
-rw-r--r-- | include/xen/xenbus.h | 3 |
21 files changed, 201 insertions, 52 deletions
diff --git a/include/Kbuild b/include/Kbuild index d8c3e3cbf416..fe36accd4328 100644 --- a/include/Kbuild +++ b/include/Kbuild | |||
@@ -8,3 +8,4 @@ header-y += mtd/ | |||
8 | header-y += rdma/ | 8 | header-y += rdma/ |
9 | header-y += video/ | 9 | header-y += video/ |
10 | header-y += drm/ | 10 | header-y += drm/ |
11 | header-y += xen/ | ||
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index 8e6d0ca70aba..e410f602cab1 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
@@ -280,17 +280,18 @@ static inline void ptep_modify_prot_commit(struct mm_struct *mm, | |||
280 | #endif | 280 | #endif |
281 | 281 | ||
282 | /* | 282 | /* |
283 | * A facility to provide batching of the reload of page tables with the | 283 | * A facility to provide batching of the reload of page tables and |
284 | * actual context switch code for paravirtualized guests. By convention, | 284 | * other process state with the actual context switch code for |
285 | * only one of the lazy modes (CPU, MMU) should be active at any given | 285 | * paravirtualized guests. By convention, only one of the batched |
286 | * time, entry should never be nested, and entry and exits should always | 286 | * update (lazy) modes (CPU, MMU) should be active at any given time, |
287 | * be paired. This is for sanity of maintaining and reasoning about the | 287 | * entry should never be nested, and entry and exits should always be |
288 | * kernel code. | 288 | * paired. This is for sanity of maintaining and reasoning about the |
289 | * kernel code. In this case, the exit (end of the context switch) is | ||
290 | * in architecture-specific code, and so doesn't need a generic | ||
291 | * definition. | ||
289 | */ | 292 | */ |
290 | #ifndef __HAVE_ARCH_ENTER_LAZY_CPU_MODE | 293 | #ifndef __HAVE_ARCH_START_CONTEXT_SWITCH |
291 | #define arch_enter_lazy_cpu_mode() do {} while (0) | 294 | #define arch_start_context_switch(prev) do {} while (0) |
292 | #define arch_leave_lazy_cpu_mode() do {} while (0) | ||
293 | #define arch_flush_lazy_cpu_mode() do {} while (0) | ||
294 | #endif | 295 | #endif |
295 | 296 | ||
296 | #ifndef __HAVE_PFNMAP_TRACKING | 297 | #ifndef __HAVE_PFNMAP_TRACKING |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 88be890ee3c7..51b4b0a5ce8c 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -119,7 +119,7 @@ extern int pci_mmcfg_config_num; | |||
119 | extern int sbf_port; | 119 | extern int sbf_port; |
120 | extern unsigned long acpi_realmode_flags; | 120 | extern unsigned long acpi_realmode_flags; |
121 | 121 | ||
122 | int acpi_register_gsi (u32 gsi, int triggering, int polarity); | 122 | int acpi_register_gsi (struct device *dev, u32 gsi, int triggering, int polarity); |
123 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); | 123 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); |
124 | 124 | ||
125 | #ifdef CONFIG_X86_IO_APIC | 125 | #ifdef CONFIG_X86_IO_APIC |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 9f315382610b..c5ac87ca7bc6 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -1022,6 +1022,8 @@ typedef struct cpumask *cpumask_var_t; | |||
1022 | 1022 | ||
1023 | bool alloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags, int node); | 1023 | bool alloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags, int node); |
1024 | bool alloc_cpumask_var(cpumask_var_t *mask, gfp_t flags); | 1024 | bool alloc_cpumask_var(cpumask_var_t *mask, gfp_t flags); |
1025 | bool zalloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags, int node); | ||
1026 | bool zalloc_cpumask_var(cpumask_var_t *mask, gfp_t flags); | ||
1025 | void alloc_bootmem_cpumask_var(cpumask_var_t *mask); | 1027 | void alloc_bootmem_cpumask_var(cpumask_var_t *mask); |
1026 | void free_cpumask_var(cpumask_var_t mask); | 1028 | void free_cpumask_var(cpumask_var_t mask); |
1027 | void free_bootmem_cpumask_var(cpumask_var_t mask); | 1029 | void free_bootmem_cpumask_var(cpumask_var_t mask); |
@@ -1040,6 +1042,19 @@ static inline bool alloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags, | |||
1040 | return true; | 1042 | return true; |
1041 | } | 1043 | } |
1042 | 1044 | ||
1045 | static inline bool zalloc_cpumask_var(cpumask_var_t *mask, gfp_t flags) | ||
1046 | { | ||
1047 | cpumask_clear(*mask); | ||
1048 | return true; | ||
1049 | } | ||
1050 | |||
1051 | static inline bool zalloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags, | ||
1052 | int node) | ||
1053 | { | ||
1054 | cpumask_clear(*mask); | ||
1055 | return true; | ||
1056 | } | ||
1057 | |||
1043 | static inline void alloc_bootmem_cpumask_var(cpumask_var_t *mask) | 1058 | static inline void alloc_bootmem_cpumask_var(cpumask_var_t *mask) |
1044 | { | 1059 | { |
1045 | } | 1060 | } |
diff --git a/include/linux/dma-debug.h b/include/linux/dma-debug.h index 28d53cb7b5a2..171ad8aedc83 100644 --- a/include/linux/dma-debug.h +++ b/include/linux/dma-debug.h | |||
@@ -32,6 +32,8 @@ extern void dma_debug_add_bus(struct bus_type *bus); | |||
32 | 32 | ||
33 | extern void dma_debug_init(u32 num_entries); | 33 | extern void dma_debug_init(u32 num_entries); |
34 | 34 | ||
35 | extern int dma_debug_resize_entries(u32 num_entries); | ||
36 | |||
35 | extern void debug_dma_map_page(struct device *dev, struct page *page, | 37 | extern void debug_dma_map_page(struct device *dev, struct page *page, |
36 | size_t offset, size_t size, | 38 | size_t offset, size_t size, |
37 | int direction, dma_addr_t dma_addr, | 39 | int direction, dma_addr_t dma_addr, |
@@ -91,6 +93,11 @@ static inline void dma_debug_init(u32 num_entries) | |||
91 | { | 93 | { |
92 | } | 94 | } |
93 | 95 | ||
96 | static inline int dma_debug_resize_entries(u32 num_entries) | ||
97 | { | ||
98 | return 0; | ||
99 | } | ||
100 | |||
94 | static inline void debug_dma_map_page(struct device *dev, struct page *page, | 101 | static inline void debug_dma_map_page(struct device *dev, struct page *page, |
95 | size_t offset, size_t size, | 102 | size_t offset, size_t size, |
96 | int direction, dma_addr_t dma_addr, | 103 | int direction, dma_addr_t dma_addr, |
diff --git a/include/linux/dmar.h b/include/linux/dmar.h index e397dc342cda..10ff5c498824 100644 --- a/include/linux/dmar.h +++ b/include/linux/dmar.h | |||
@@ -108,6 +108,7 @@ struct irte { | |||
108 | }; | 108 | }; |
109 | #ifdef CONFIG_INTR_REMAP | 109 | #ifdef CONFIG_INTR_REMAP |
110 | extern int intr_remapping_enabled; | 110 | extern int intr_remapping_enabled; |
111 | extern int intr_remapping_supported(void); | ||
111 | extern int enable_intr_remapping(int); | 112 | extern int enable_intr_remapping(int); |
112 | extern void disable_intr_remapping(void); | 113 | extern void disable_intr_remapping(void); |
113 | extern int reenable_intr_remapping(int); | 114 | extern int reenable_intr_remapping(int); |
@@ -157,6 +158,8 @@ static inline struct intel_iommu *map_ioapic_to_ir(int apic) | |||
157 | } | 158 | } |
158 | #define irq_remapped(irq) (0) | 159 | #define irq_remapped(irq) (0) |
159 | #define enable_intr_remapping(mode) (-1) | 160 | #define enable_intr_remapping(mode) (-1) |
161 | #define disable_intr_remapping() (0) | ||
162 | #define reenable_intr_remapping(mode) (0) | ||
160 | #define intr_remapping_enabled (0) | 163 | #define intr_remapping_enabled (0) |
161 | #endif | 164 | #endif |
162 | 165 | ||
diff --git a/include/linux/futex.h b/include/linux/futex.h index 3bf5bb5a34f9..34956c8fdebf 100644 --- a/include/linux/futex.h +++ b/include/linux/futex.h | |||
@@ -23,6 +23,8 @@ union ktime; | |||
23 | #define FUTEX_TRYLOCK_PI 8 | 23 | #define FUTEX_TRYLOCK_PI 8 |
24 | #define FUTEX_WAIT_BITSET 9 | 24 | #define FUTEX_WAIT_BITSET 9 |
25 | #define FUTEX_WAKE_BITSET 10 | 25 | #define FUTEX_WAKE_BITSET 10 |
26 | #define FUTEX_WAIT_REQUEUE_PI 11 | ||
27 | #define FUTEX_CMP_REQUEUE_PI 12 | ||
26 | 28 | ||
27 | #define FUTEX_PRIVATE_FLAG 128 | 29 | #define FUTEX_PRIVATE_FLAG 128 |
28 | #define FUTEX_CLOCK_REALTIME 256 | 30 | #define FUTEX_CLOCK_REALTIME 256 |
@@ -38,6 +40,10 @@ union ktime; | |||
38 | #define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG) | 40 | #define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG) |
39 | #define FUTEX_WAIT_BITSET_PRIVATE (FUTEX_WAIT_BITS | FUTEX_PRIVATE_FLAG) | 41 | #define FUTEX_WAIT_BITSET_PRIVATE (FUTEX_WAIT_BITS | FUTEX_PRIVATE_FLAG) |
40 | #define FUTEX_WAKE_BITSET_PRIVATE (FUTEX_WAKE_BITS | FUTEX_PRIVATE_FLAG) | 42 | #define FUTEX_WAKE_BITSET_PRIVATE (FUTEX_WAKE_BITS | FUTEX_PRIVATE_FLAG) |
43 | #define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | \ | ||
44 | FUTEX_PRIVATE_FLAG) | ||
45 | #define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | \ | ||
46 | FUTEX_PRIVATE_FLAG) | ||
41 | 47 | ||
42 | /* | 48 | /* |
43 | * Support for robust futexes: the kernel cleans up held futexes at | 49 | * Support for robust futexes: the kernel cleans up held futexes at |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 91bb76f44f14..ff374ceface0 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -566,6 +566,6 @@ struct irq_desc; | |||
566 | extern int early_irq_init(void); | 566 | extern int early_irq_init(void); |
567 | extern int arch_probe_nr_irqs(void); | 567 | extern int arch_probe_nr_irqs(void); |
568 | extern int arch_early_irq_init(void); | 568 | extern int arch_early_irq_init(void); |
569 | extern int arch_init_chip_data(struct irq_desc *desc, int cpu); | 569 | extern int arch_init_chip_data(struct irq_desc *desc, int node); |
570 | 570 | ||
571 | #endif | 571 | #endif |
diff --git a/include/linux/irq.h b/include/linux/irq.h index b7cbeed972e4..eedbb8e5e0cc 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -117,7 +117,7 @@ struct irq_chip { | |||
117 | void (*eoi)(unsigned int irq); | 117 | void (*eoi)(unsigned int irq); |
118 | 118 | ||
119 | void (*end)(unsigned int irq); | 119 | void (*end)(unsigned int irq); |
120 | void (*set_affinity)(unsigned int irq, | 120 | int (*set_affinity)(unsigned int irq, |
121 | const struct cpumask *dest); | 121 | const struct cpumask *dest); |
122 | int (*retrigger)(unsigned int irq); | 122 | int (*retrigger)(unsigned int irq); |
123 | int (*set_type)(unsigned int irq, unsigned int flow_type); | 123 | int (*set_type)(unsigned int irq, unsigned int flow_type); |
@@ -187,7 +187,7 @@ struct irq_desc { | |||
187 | spinlock_t lock; | 187 | spinlock_t lock; |
188 | #ifdef CONFIG_SMP | 188 | #ifdef CONFIG_SMP |
189 | cpumask_var_t affinity; | 189 | cpumask_var_t affinity; |
190 | unsigned int cpu; | 190 | unsigned int node; |
191 | #ifdef CONFIG_GENERIC_PENDING_IRQ | 191 | #ifdef CONFIG_GENERIC_PENDING_IRQ |
192 | cpumask_var_t pending_mask; | 192 | cpumask_var_t pending_mask; |
193 | #endif | 193 | #endif |
@@ -201,26 +201,23 @@ struct irq_desc { | |||
201 | } ____cacheline_internodealigned_in_smp; | 201 | } ____cacheline_internodealigned_in_smp; |
202 | 202 | ||
203 | extern void arch_init_copy_chip_data(struct irq_desc *old_desc, | 203 | extern void arch_init_copy_chip_data(struct irq_desc *old_desc, |
204 | struct irq_desc *desc, int cpu); | 204 | struct irq_desc *desc, int node); |
205 | extern void arch_free_chip_data(struct irq_desc *old_desc, struct irq_desc *desc); | 205 | extern void arch_free_chip_data(struct irq_desc *old_desc, struct irq_desc *desc); |
206 | 206 | ||
207 | #ifndef CONFIG_SPARSE_IRQ | 207 | #ifndef CONFIG_SPARSE_IRQ |
208 | extern struct irq_desc irq_desc[NR_IRQS]; | 208 | extern struct irq_desc irq_desc[NR_IRQS]; |
209 | #else /* CONFIG_SPARSE_IRQ */ | 209 | #endif |
210 | extern struct irq_desc *move_irq_desc(struct irq_desc *old_desc, int cpu); | ||
211 | #endif /* CONFIG_SPARSE_IRQ */ | ||
212 | |||
213 | extern struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu); | ||
214 | 210 | ||
215 | static inline struct irq_desc * | 211 | #ifdef CONFIG_NUMA_IRQ_DESC |
216 | irq_remap_to_desc(unsigned int irq, struct irq_desc *desc) | 212 | extern struct irq_desc *move_irq_desc(struct irq_desc *old_desc, int node); |
217 | { | ||
218 | #ifdef CONFIG_NUMA_MIGRATE_IRQ_DESC | ||
219 | return irq_to_desc(irq); | ||
220 | #else | 213 | #else |
214 | static inline struct irq_desc *move_irq_desc(struct irq_desc *desc, int node) | ||
215 | { | ||
221 | return desc; | 216 | return desc; |
222 | #endif | ||
223 | } | 217 | } |
218 | #endif | ||
219 | |||
220 | extern struct irq_desc *irq_to_desc_alloc_node(unsigned int irq, int node); | ||
224 | 221 | ||
225 | /* | 222 | /* |
226 | * Migration helpers for obsolete names, they will go away: | 223 | * Migration helpers for obsolete names, they will go away: |
@@ -386,7 +383,7 @@ extern void set_irq_noprobe(unsigned int irq); | |||
386 | extern void set_irq_probe(unsigned int irq); | 383 | extern void set_irq_probe(unsigned int irq); |
387 | 384 | ||
388 | /* Handle dynamic irq creation and destruction */ | 385 | /* Handle dynamic irq creation and destruction */ |
389 | extern unsigned int create_irq_nr(unsigned int irq_want); | 386 | extern unsigned int create_irq_nr(unsigned int irq_want, int node); |
390 | extern int create_irq(void); | 387 | extern int create_irq(void); |
391 | extern void destroy_irq(unsigned int irq); | 388 | extern void destroy_irq(unsigned int irq); |
392 | 389 | ||
@@ -424,47 +421,48 @@ extern int set_irq_msi(unsigned int irq, struct msi_desc *entry); | |||
424 | 421 | ||
425 | #ifdef CONFIG_SMP | 422 | #ifdef CONFIG_SMP |
426 | /** | 423 | /** |
427 | * init_alloc_desc_masks - allocate cpumasks for irq_desc | 424 | * alloc_desc_masks - allocate cpumasks for irq_desc |
428 | * @desc: pointer to irq_desc struct | 425 | * @desc: pointer to irq_desc struct |
429 | * @cpu: cpu which will be handling the cpumasks | 426 | * @cpu: cpu which will be handling the cpumasks |
430 | * @boot: true if need bootmem | 427 | * @boot: true if need bootmem |
431 | * | 428 | * |
432 | * Allocates affinity and pending_mask cpumask if required. | 429 | * Allocates affinity and pending_mask cpumask if required. |
433 | * Returns true if successful (or not required). | 430 | * Returns true if successful (or not required). |
434 | * Side effect: affinity has all bits set, pending_mask has all bits clear. | ||
435 | */ | 431 | */ |
436 | static inline bool init_alloc_desc_masks(struct irq_desc *desc, int cpu, | 432 | static inline bool alloc_desc_masks(struct irq_desc *desc, int node, |
437 | bool boot) | 433 | bool boot) |
438 | { | 434 | { |
439 | int node; | 435 | #ifdef CONFIG_CPUMASK_OFFSTACK |
440 | |||
441 | if (boot) { | 436 | if (boot) { |
442 | alloc_bootmem_cpumask_var(&desc->affinity); | 437 | alloc_bootmem_cpumask_var(&desc->affinity); |
443 | cpumask_setall(desc->affinity); | ||
444 | 438 | ||
445 | #ifdef CONFIG_GENERIC_PENDING_IRQ | 439 | #ifdef CONFIG_GENERIC_PENDING_IRQ |
446 | alloc_bootmem_cpumask_var(&desc->pending_mask); | 440 | alloc_bootmem_cpumask_var(&desc->pending_mask); |
447 | cpumask_clear(desc->pending_mask); | ||
448 | #endif | 441 | #endif |
449 | return true; | 442 | return true; |
450 | } | 443 | } |
451 | 444 | ||
452 | node = cpu_to_node(cpu); | ||
453 | |||
454 | if (!alloc_cpumask_var_node(&desc->affinity, GFP_ATOMIC, node)) | 445 | if (!alloc_cpumask_var_node(&desc->affinity, GFP_ATOMIC, node)) |
455 | return false; | 446 | return false; |
456 | cpumask_setall(desc->affinity); | ||
457 | 447 | ||
458 | #ifdef CONFIG_GENERIC_PENDING_IRQ | 448 | #ifdef CONFIG_GENERIC_PENDING_IRQ |
459 | if (!alloc_cpumask_var_node(&desc->pending_mask, GFP_ATOMIC, node)) { | 449 | if (!alloc_cpumask_var_node(&desc->pending_mask, GFP_ATOMIC, node)) { |
460 | free_cpumask_var(desc->affinity); | 450 | free_cpumask_var(desc->affinity); |
461 | return false; | 451 | return false; |
462 | } | 452 | } |
463 | cpumask_clear(desc->pending_mask); | 453 | #endif |
464 | #endif | 454 | #endif |
465 | return true; | 455 | return true; |
466 | } | 456 | } |
467 | 457 | ||
458 | static inline void init_desc_masks(struct irq_desc *desc) | ||
459 | { | ||
460 | cpumask_setall(desc->affinity); | ||
461 | #ifdef CONFIG_GENERIC_PENDING_IRQ | ||
462 | cpumask_clear(desc->pending_mask); | ||
463 | #endif | ||
464 | } | ||
465 | |||
468 | /** | 466 | /** |
469 | * init_copy_desc_masks - copy cpumasks for irq_desc | 467 | * init_copy_desc_masks - copy cpumasks for irq_desc |
470 | * @old_desc: pointer to old irq_desc struct | 468 | * @old_desc: pointer to old irq_desc struct |
@@ -478,7 +476,7 @@ static inline bool init_alloc_desc_masks(struct irq_desc *desc, int cpu, | |||
478 | static inline void init_copy_desc_masks(struct irq_desc *old_desc, | 476 | static inline void init_copy_desc_masks(struct irq_desc *old_desc, |
479 | struct irq_desc *new_desc) | 477 | struct irq_desc *new_desc) |
480 | { | 478 | { |
481 | #ifdef CONFIG_CPUMASKS_OFFSTACK | 479 | #ifdef CONFIG_CPUMASK_OFFSTACK |
482 | cpumask_copy(new_desc->affinity, old_desc->affinity); | 480 | cpumask_copy(new_desc->affinity, old_desc->affinity); |
483 | 481 | ||
484 | #ifdef CONFIG_GENERIC_PENDING_IRQ | 482 | #ifdef CONFIG_GENERIC_PENDING_IRQ |
@@ -499,12 +497,16 @@ static inline void free_desc_masks(struct irq_desc *old_desc, | |||
499 | 497 | ||
500 | #else /* !CONFIG_SMP */ | 498 | #else /* !CONFIG_SMP */ |
501 | 499 | ||
502 | static inline bool init_alloc_desc_masks(struct irq_desc *desc, int cpu, | 500 | static inline bool alloc_desc_masks(struct irq_desc *desc, int node, |
503 | bool boot) | 501 | bool boot) |
504 | { | 502 | { |
505 | return true; | 503 | return true; |
506 | } | 504 | } |
507 | 505 | ||
506 | static inline void init_desc_masks(struct irq_desc *desc) | ||
507 | { | ||
508 | } | ||
509 | |||
508 | static inline void init_copy_desc_masks(struct irq_desc *old_desc, | 510 | static inline void init_copy_desc_masks(struct irq_desc *old_desc, |
509 | struct irq_desc *new_desc) | 511 | struct irq_desc *new_desc) |
510 | { | 512 | { |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 0c21af6abffb..5528ff32512e 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1029,8 +1029,6 @@ extern void add_active_range(unsigned int nid, unsigned long start_pfn, | |||
1029 | unsigned long end_pfn); | 1029 | unsigned long end_pfn); |
1030 | extern void remove_active_range(unsigned int nid, unsigned long start_pfn, | 1030 | extern void remove_active_range(unsigned int nid, unsigned long start_pfn, |
1031 | unsigned long end_pfn); | 1031 | unsigned long end_pfn); |
1032 | extern void push_node_boundaries(unsigned int nid, unsigned long start_pfn, | ||
1033 | unsigned long end_pfn); | ||
1034 | extern void remove_all_active_ranges(void); | 1032 | extern void remove_all_active_ranges(void); |
1035 | extern unsigned long absent_pages_in_range(unsigned long start_pfn, | 1033 | extern unsigned long absent_pages_in_range(unsigned long start_pfn, |
1036 | unsigned long end_pfn); | 1034 | unsigned long end_pfn); |
diff --git a/include/linux/mutex.h b/include/linux/mutex.h index 3069ec7e0ab8..878cab4f5fcc 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h | |||
@@ -150,5 +150,6 @@ extern int __must_check mutex_lock_killable(struct mutex *lock); | |||
150 | */ | 150 | */ |
151 | extern int mutex_trylock(struct mutex *lock); | 151 | extern int mutex_trylock(struct mutex *lock); |
152 | extern void mutex_unlock(struct mutex *lock); | 152 | extern void mutex_unlock(struct mutex *lock); |
153 | extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); | ||
153 | 154 | ||
154 | #endif | 155 | #endif |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 5932ace22400..ff687281f233 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -116,6 +116,7 @@ struct fs_struct; | |||
116 | * 11 bit fractions. | 116 | * 11 bit fractions. |
117 | */ | 117 | */ |
118 | extern unsigned long avenrun[]; /* Load averages */ | 118 | extern unsigned long avenrun[]; /* Load averages */ |
119 | extern void get_avenrun(unsigned long *loads, unsigned long offset, int shift); | ||
119 | 120 | ||
120 | #define FSHIFT 11 /* nr of bits of precision */ | 121 | #define FSHIFT 11 /* nr of bits of precision */ |
121 | #define FIXED_1 (1<<FSHIFT) /* 1.0 as fixed-point */ | 122 | #define FIXED_1 (1<<FSHIFT) /* 1.0 as fixed-point */ |
@@ -135,8 +136,8 @@ DECLARE_PER_CPU(unsigned long, process_counts); | |||
135 | extern int nr_processes(void); | 136 | extern int nr_processes(void); |
136 | extern unsigned long nr_running(void); | 137 | extern unsigned long nr_running(void); |
137 | extern unsigned long nr_uninterruptible(void); | 138 | extern unsigned long nr_uninterruptible(void); |
138 | extern unsigned long nr_active(void); | ||
139 | extern unsigned long nr_iowait(void); | 139 | extern unsigned long nr_iowait(void); |
140 | extern void calc_global_load(void); | ||
140 | 141 | ||
141 | extern unsigned long get_parent_ip(unsigned long addr); | 142 | extern unsigned long get_parent_ip(unsigned long addr); |
142 | 143 | ||
@@ -838,7 +839,17 @@ struct sched_group { | |||
838 | */ | 839 | */ |
839 | u32 reciprocal_cpu_power; | 840 | u32 reciprocal_cpu_power; |
840 | 841 | ||
841 | unsigned long cpumask[]; | 842 | /* |
843 | * The CPUs this group covers. | ||
844 | * | ||
845 | * NOTE: this field is variable length. (Allocated dynamically | ||
846 | * by attaching extra space to the end of the structure, | ||
847 | * depending on how many CPUs the kernel has booted up with) | ||
848 | * | ||
849 | * It is also be embedded into static data structures at build | ||
850 | * time. (See 'struct static_sched_group' in kernel/sched.c) | ||
851 | */ | ||
852 | unsigned long cpumask[0]; | ||
842 | }; | 853 | }; |
843 | 854 | ||
844 | static inline struct cpumask *sched_group_cpus(struct sched_group *sg) | 855 | static inline struct cpumask *sched_group_cpus(struct sched_group *sg) |
@@ -924,8 +935,17 @@ struct sched_domain { | |||
924 | char *name; | 935 | char *name; |
925 | #endif | 936 | #endif |
926 | 937 | ||
927 | /* span of all CPUs in this domain */ | 938 | /* |
928 | unsigned long span[]; | 939 | * Span of all CPUs in this domain. |
940 | * | ||
941 | * NOTE: this field is variable length. (Allocated dynamically | ||
942 | * by attaching extra space to the end of the structure, | ||
943 | * depending on how many CPUs the kernel has booted up with) | ||
944 | * | ||
945 | * It is also be embedded into static data structures at build | ||
946 | * time. (See 'struct static_sched_domain' in kernel/sched.c) | ||
947 | */ | ||
948 | unsigned long span[0]; | ||
929 | }; | 949 | }; |
930 | 950 | ||
931 | static inline struct cpumask *sched_domain_span(struct sched_domain *sd) | 951 | static inline struct cpumask *sched_domain_span(struct sched_domain *sd) |
diff --git a/include/linux/spinlock_up.h b/include/linux/spinlock_up.h index 938234c4a996..d4841ed8215b 100644 --- a/include/linux/spinlock_up.h +++ b/include/linux/spinlock_up.h | |||
@@ -60,6 +60,7 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock) | |||
60 | #define __raw_spin_is_locked(lock) ((void)(lock), 0) | 60 | #define __raw_spin_is_locked(lock) ((void)(lock), 0) |
61 | /* for sched.c and kernel_lock.c: */ | 61 | /* for sched.c and kernel_lock.c: */ |
62 | # define __raw_spin_lock(lock) do { (void)(lock); } while (0) | 62 | # define __raw_spin_lock(lock) do { (void)(lock); } while (0) |
63 | # define __raw_spin_lock_flags(lock, flags) do { (void)(lock); } while (0) | ||
63 | # define __raw_spin_unlock(lock) do { (void)(lock); } while (0) | 64 | # define __raw_spin_unlock(lock) do { (void)(lock); } while (0) |
64 | # define __raw_spin_trylock(lock) ({ (void)(lock); 1; }) | 65 | # define __raw_spin_trylock(lock) ({ (void)(lock); 1; }) |
65 | #endif /* DEBUG_SPINLOCK */ | 66 | #endif /* DEBUG_SPINLOCK */ |
diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h index ac9ff54f7cb3..cb1a6631b8f4 100644 --- a/include/linux/swiotlb.h +++ b/include/linux/swiotlb.h | |||
@@ -29,7 +29,8 @@ extern void *swiotlb_alloc(unsigned order, unsigned long nslabs); | |||
29 | 29 | ||
30 | extern dma_addr_t swiotlb_phys_to_bus(struct device *hwdev, | 30 | extern dma_addr_t swiotlb_phys_to_bus(struct device *hwdev, |
31 | phys_addr_t address); | 31 | phys_addr_t address); |
32 | extern phys_addr_t swiotlb_bus_to_phys(dma_addr_t address); | 32 | extern phys_addr_t swiotlb_bus_to_phys(struct device *hwdev, |
33 | dma_addr_t address); | ||
33 | 34 | ||
34 | extern int swiotlb_arch_range_needs_mapping(phys_addr_t paddr, size_t size); | 35 | extern int swiotlb_arch_range_needs_mapping(phys_addr_t paddr, size_t size); |
35 | 36 | ||
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index e6b820f8b56b..a8cc4e13434c 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h | |||
@@ -21,13 +21,14 @@ struct restart_block { | |||
21 | struct { | 21 | struct { |
22 | unsigned long arg0, arg1, arg2, arg3; | 22 | unsigned long arg0, arg1, arg2, arg3; |
23 | }; | 23 | }; |
24 | /* For futex_wait */ | 24 | /* For futex_wait and futex_wait_requeue_pi */ |
25 | struct { | 25 | struct { |
26 | u32 *uaddr; | 26 | u32 *uaddr; |
27 | u32 val; | 27 | u32 val; |
28 | u32 flags; | 28 | u32 flags; |
29 | u32 bitset; | 29 | u32 bitset; |
30 | u64 time; | 30 | u64 time; |
31 | u32 *uaddr2; | ||
31 | } futex; | 32 | } futex; |
32 | /* For nanosleep */ | 33 | /* For nanosleep */ |
33 | struct { | 34 | struct { |
diff --git a/include/linux/wait.h b/include/linux/wait.h index bc024632f365..6788e1a4d4ca 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
@@ -132,8 +132,6 @@ static inline void __remove_wait_queue(wait_queue_head_t *head, | |||
132 | list_del(&old->task_list); | 132 | list_del(&old->task_list); |
133 | } | 133 | } |
134 | 134 | ||
135 | void __wake_up_common(wait_queue_head_t *q, unsigned int mode, | ||
136 | int nr_exclusive, int sync, void *key); | ||
137 | void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key); | 135 | void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key); |
138 | void __wake_up_locked_key(wait_queue_head_t *q, unsigned int mode, void *key); | 136 | void __wake_up_locked_key(wait_queue_head_t *q, unsigned int mode, void *key); |
139 | void __wake_up_sync_key(wait_queue_head_t *q, unsigned int mode, int nr, | 137 | void __wake_up_sync_key(wait_queue_head_t *q, unsigned int mode, int nr, |
diff --git a/include/xen/Kbuild b/include/xen/Kbuild new file mode 100644 index 000000000000..4e65c16a445b --- /dev/null +++ b/include/xen/Kbuild | |||
@@ -0,0 +1 @@ | |||
header-y += evtchn.h | |||
diff --git a/include/xen/events.h b/include/xen/events.h index 0d5f1adc0363..e68d59a90ca8 100644 --- a/include/xen/events.h +++ b/include/xen/events.h | |||
@@ -53,4 +53,7 @@ bool xen_test_irq_pending(int irq); | |||
53 | irq will be disabled so it won't deliver an interrupt. */ | 53 | irq will be disabled so it won't deliver an interrupt. */ |
54 | void xen_poll_irq(int irq); | 54 | void xen_poll_irq(int irq); |
55 | 55 | ||
56 | /* Determine the IRQ which is bound to an event channel */ | ||
57 | unsigned irq_from_evtchn(unsigned int evtchn); | ||
58 | |||
56 | #endif /* _XEN_EVENTS_H */ | 59 | #endif /* _XEN_EVENTS_H */ |
diff --git a/include/xen/evtchn.h b/include/xen/evtchn.h new file mode 100644 index 000000000000..14e833ee4e0b --- /dev/null +++ b/include/xen/evtchn.h | |||
@@ -0,0 +1,88 @@ | |||
1 | /****************************************************************************** | ||
2 | * evtchn.h | ||
3 | * | ||
4 | * Interface to /dev/xen/evtchn. | ||
5 | * | ||
6 | * Copyright (c) 2003-2005, K A Fraser | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License version 2 | ||
10 | * as published by the Free Software Foundation; or, when distributed | ||
11 | * separately from the Linux kernel or incorporated into other | ||
12 | * software packages, subject to the following license: | ||
13 | * | ||
14 | * Permission is hereby granted, free of charge, to any person obtaining a copy | ||
15 | * of this source file (the "Software"), to deal in the Software without | ||
16 | * restriction, including without limitation the rights to use, copy, modify, | ||
17 | * merge, publish, distribute, sublicense, and/or sell copies of the Software, | ||
18 | * and to permit persons to whom the Software is furnished to do so, subject to | ||
19 | * the following conditions: | ||
20 | * | ||
21 | * The above copyright notice and this permission notice shall be included in | ||
22 | * all copies or substantial portions of the Software. | ||
23 | * | ||
24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
25 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
26 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
27 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
28 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
29 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
30 | * IN THE SOFTWARE. | ||
31 | */ | ||
32 | |||
33 | #ifndef __LINUX_PUBLIC_EVTCHN_H__ | ||
34 | #define __LINUX_PUBLIC_EVTCHN_H__ | ||
35 | |||
36 | /* | ||
37 | * Bind a fresh port to VIRQ @virq. | ||
38 | * Return allocated port. | ||
39 | */ | ||
40 | #define IOCTL_EVTCHN_BIND_VIRQ \ | ||
41 | _IOC(_IOC_NONE, 'E', 0, sizeof(struct ioctl_evtchn_bind_virq)) | ||
42 | struct ioctl_evtchn_bind_virq { | ||
43 | unsigned int virq; | ||
44 | }; | ||
45 | |||
46 | /* | ||
47 | * Bind a fresh port to remote <@remote_domain, @remote_port>. | ||
48 | * Return allocated port. | ||
49 | */ | ||
50 | #define IOCTL_EVTCHN_BIND_INTERDOMAIN \ | ||
51 | _IOC(_IOC_NONE, 'E', 1, sizeof(struct ioctl_evtchn_bind_interdomain)) | ||
52 | struct ioctl_evtchn_bind_interdomain { | ||
53 | unsigned int remote_domain, remote_port; | ||
54 | }; | ||
55 | |||
56 | /* | ||
57 | * Allocate a fresh port for binding to @remote_domain. | ||
58 | * Return allocated port. | ||
59 | */ | ||
60 | #define IOCTL_EVTCHN_BIND_UNBOUND_PORT \ | ||
61 | _IOC(_IOC_NONE, 'E', 2, sizeof(struct ioctl_evtchn_bind_unbound_port)) | ||
62 | struct ioctl_evtchn_bind_unbound_port { | ||
63 | unsigned int remote_domain; | ||
64 | }; | ||
65 | |||
66 | /* | ||
67 | * Unbind previously allocated @port. | ||
68 | */ | ||
69 | #define IOCTL_EVTCHN_UNBIND \ | ||
70 | _IOC(_IOC_NONE, 'E', 3, sizeof(struct ioctl_evtchn_unbind)) | ||
71 | struct ioctl_evtchn_unbind { | ||
72 | unsigned int port; | ||
73 | }; | ||
74 | |||
75 | /* | ||
76 | * Unbind previously allocated @port. | ||
77 | */ | ||
78 | #define IOCTL_EVTCHN_NOTIFY \ | ||
79 | _IOC(_IOC_NONE, 'E', 4, sizeof(struct ioctl_evtchn_notify)) | ||
80 | struct ioctl_evtchn_notify { | ||
81 | unsigned int port; | ||
82 | }; | ||
83 | |||
84 | /* Clear and reinitialise the event buffer. Clear error condition. */ | ||
85 | #define IOCTL_EVTCHN_RESET \ | ||
86 | _IOC(_IOC_NONE, 'E', 5, 0) | ||
87 | |||
88 | #endif /* __LINUX_PUBLIC_EVTCHN_H__ */ | ||
diff --git a/include/xen/interface/version.h b/include/xen/interface/version.h index 453235e923f0..e8b6519d47e9 100644 --- a/include/xen/interface/version.h +++ b/include/xen/interface/version.h | |||
@@ -57,4 +57,7 @@ struct xen_feature_info { | |||
57 | /* Declares the features reported by XENVER_get_features. */ | 57 | /* Declares the features reported by XENVER_get_features. */ |
58 | #include "features.h" | 58 | #include "features.h" |
59 | 59 | ||
60 | /* arg == NULL; returns host memory page size. */ | ||
61 | #define XENVER_pagesize 7 | ||
62 | |||
60 | #endif /* __XEN_PUBLIC_VERSION_H__ */ | 63 | #endif /* __XEN_PUBLIC_VERSION_H__ */ |
diff --git a/include/xen/xenbus.h b/include/xen/xenbus.h index f87f9614844d..b9763badbd77 100644 --- a/include/xen/xenbus.h +++ b/include/xen/xenbus.h | |||
@@ -91,8 +91,7 @@ struct xenbus_driver { | |||
91 | void (*otherend_changed)(struct xenbus_device *dev, | 91 | void (*otherend_changed)(struct xenbus_device *dev, |
92 | enum xenbus_state backend_state); | 92 | enum xenbus_state backend_state); |
93 | int (*remove)(struct xenbus_device *dev); | 93 | int (*remove)(struct xenbus_device *dev); |
94 | int (*suspend)(struct xenbus_device *dev); | 94 | int (*suspend)(struct xenbus_device *dev, pm_message_t state); |
95 | int (*suspend_cancel)(struct xenbus_device *dev); | ||
96 | int (*resume)(struct xenbus_device *dev); | 95 | int (*resume)(struct xenbus_device *dev); |
97 | int (*uevent)(struct xenbus_device *, char **, int, char *, int); | 96 | int (*uevent)(struct xenbus_device *, char **, int, char *, int); |
98 | struct device_driver driver; | 97 | struct device_driver driver; |