diff options
| author | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-10-12 09:44:33 -0400 |
|---|---|---|
| committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-10-12 09:44:33 -0400 |
| commit | 0d62950125241a6e6db8e8f14271f098ec7a2da4 (patch) | |
| tree | 8cdd9e17f6a6ff4cb6166ad12a4d3ed1d45b2dc9 /include | |
| parent | b3bc2c5562f06ca34b30f61c5714e96490946c81 (diff) | |
| parent | 5e7184ae0dd49456387e8b1cdebc6b2c92fc6d51 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/atmel-mci-2.6.28
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-mips/cevt-r4k.h | 46 | ||||
| -rw-r--r-- | include/asm-mips/irqflags.h | 26 | ||||
| -rw-r--r-- | include/asm-mips/mipsregs.h | 6 | ||||
| -rw-r--r-- | include/asm-mips/pgtable-32.h | 2 | ||||
| -rw-r--r-- | include/asm-mips/smtc.h | 8 | ||||
| -rw-r--r-- | include/asm-mips/stackframe.h | 72 | ||||
| -rw-r--r-- | include/asm-x86/acpi.h | 2 | ||||
| -rw-r--r-- | include/asm-x86/cpufeature.h | 1 | ||||
| -rw-r--r-- | include/asm-x86/idle.h | 2 | ||||
| -rw-r--r-- | include/asm-x86/kgdb.h | 24 | ||||
| -rw-r--r-- | include/asm-x86/uaccess_64.h | 1 | ||||
| -rw-r--r-- | include/linux/cnt32_to_63.h | 80 | ||||
| -rw-r--r-- | include/linux/hrtimer.h | 18 | ||||
| -rw-r--r-- | include/linux/pci.h | 8 | ||||
| -rw-r--r-- | include/linux/ramfs.h | 1 | ||||
| -rw-r--r-- | include/linux/smb.h | 2 | ||||
| -rw-r--r-- | include/linux/stacktrace.h | 2 | ||||
| -rw-r--r-- | include/net/9p/9p.h | 1 | ||||
| -rw-r--r-- | include/net/9p/transport.h | 9 | ||||
| -rw-r--r-- | include/net/sctp/sm.h | 3 |
20 files changed, 270 insertions, 44 deletions
diff --git a/include/asm-mips/cevt-r4k.h b/include/asm-mips/cevt-r4k.h new file mode 100644 index 000000000000..fa4328f9124f --- /dev/null +++ b/include/asm-mips/cevt-r4k.h | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | /* | ||
| 2 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 3 | * License. See the file "COPYING" in the main directory of this archive | ||
| 4 | * for more details. | ||
| 5 | * | ||
| 6 | * Copyright (C) 2008 Kevin D. Kissell | ||
| 7 | */ | ||
| 8 | |||
| 9 | /* | ||
| 10 | * Definitions used for common event timer implementation | ||
| 11 | * for MIPS 4K-type processors and their MIPS MT variants. | ||
| 12 | * Avoids unsightly extern declarations in C files. | ||
| 13 | */ | ||
| 14 | #ifndef __ASM_CEVT_R4K_H | ||
| 15 | #define __ASM_CEVT_R4K_H | ||
| 16 | |||
| 17 | DECLARE_PER_CPU(struct clock_event_device, mips_clockevent_device); | ||
| 18 | |||
| 19 | void mips_event_handler(struct clock_event_device *dev); | ||
| 20 | int c0_compare_int_usable(void); | ||
| 21 | void mips_set_clock_mode(enum clock_event_mode, struct clock_event_device *); | ||
| 22 | irqreturn_t c0_compare_interrupt(int, void *); | ||
| 23 | |||
| 24 | extern struct irqaction c0_compare_irqaction; | ||
| 25 | extern int cp0_timer_irq_installed; | ||
| 26 | |||
| 27 | /* | ||
| 28 | * Possibly handle a performance counter interrupt. | ||
| 29 | * Return true if the timer interrupt should not be checked | ||
| 30 | */ | ||
| 31 | |||
| 32 | static inline int handle_perf_irq(int r2) | ||
| 33 | { | ||
| 34 | /* | ||
| 35 | * The performance counter overflow interrupt may be shared with the | ||
| 36 | * timer interrupt (cp0_perfcount_irq < 0). If it is and a | ||
| 37 | * performance counter has overflowed (perf_irq() == IRQ_HANDLED) | ||
| 38 | * and we can't reliably determine if a counter interrupt has also | ||
| 39 | * happened (!r2) then don't check for a timer interrupt. | ||
| 40 | */ | ||
| 41 | return (cp0_perfcount_irq < 0) && | ||
| 42 | perf_irq() == IRQ_HANDLED && | ||
| 43 | !r2; | ||
| 44 | } | ||
| 45 | |||
| 46 | #endif /* __ASM_CEVT_R4K_H */ | ||
diff --git a/include/asm-mips/irqflags.h b/include/asm-mips/irqflags.h index 881e8866501d..701ec0ba8fa9 100644 --- a/include/asm-mips/irqflags.h +++ b/include/asm-mips/irqflags.h | |||
| @@ -38,8 +38,17 @@ __asm__( | |||
| 38 | " .set pop \n" | 38 | " .set pop \n" |
| 39 | " .endm"); | 39 | " .endm"); |
| 40 | 40 | ||
| 41 | extern void smtc_ipi_replay(void); | ||
| 42 | |||
| 41 | static inline void raw_local_irq_enable(void) | 43 | static inline void raw_local_irq_enable(void) |
| 42 | { | 44 | { |
| 45 | #ifdef CONFIG_MIPS_MT_SMTC | ||
| 46 | /* | ||
| 47 | * SMTC kernel needs to do a software replay of queued | ||
| 48 | * IPIs, at the cost of call overhead on each local_irq_enable() | ||
| 49 | */ | ||
| 50 | smtc_ipi_replay(); | ||
| 51 | #endif | ||
| 43 | __asm__ __volatile__( | 52 | __asm__ __volatile__( |
| 44 | "raw_local_irq_enable" | 53 | "raw_local_irq_enable" |
| 45 | : /* no outputs */ | 54 | : /* no outputs */ |
| @@ -47,6 +56,7 @@ static inline void raw_local_irq_enable(void) | |||
| 47 | : "memory"); | 56 | : "memory"); |
| 48 | } | 57 | } |
| 49 | 58 | ||
| 59 | |||
| 50 | /* | 60 | /* |
| 51 | * For cli() we have to insert nops to make sure that the new value | 61 | * For cli() we have to insert nops to make sure that the new value |
| 52 | * has actually arrived in the status register before the end of this | 62 | * has actually arrived in the status register before the end of this |
| @@ -185,15 +195,14 @@ __asm__( | |||
| 185 | " .set pop \n" | 195 | " .set pop \n" |
| 186 | " .endm \n"); | 196 | " .endm \n"); |
| 187 | 197 | ||
| 188 | extern void smtc_ipi_replay(void); | ||
| 189 | 198 | ||
| 190 | static inline void raw_local_irq_restore(unsigned long flags) | 199 | static inline void raw_local_irq_restore(unsigned long flags) |
| 191 | { | 200 | { |
| 192 | unsigned long __tmp1; | 201 | unsigned long __tmp1; |
| 193 | 202 | ||
| 194 | #ifdef CONFIG_MIPS_MT_SMTC_INSTANT_REPLAY | 203 | #ifdef CONFIG_MIPS_MT_SMTC |
| 195 | /* | 204 | /* |
| 196 | * CONFIG_MIPS_MT_SMTC_INSTANT_REPLAY does prompt replay of deferred | 205 | * SMTC kernel needs to do a software replay of queued |
| 197 | * IPIs, at the cost of branch and call overhead on each | 206 | * IPIs, at the cost of branch and call overhead on each |
| 198 | * local_irq_restore() | 207 | * local_irq_restore() |
| 199 | */ | 208 | */ |
| @@ -208,6 +217,17 @@ static inline void raw_local_irq_restore(unsigned long flags) | |||
| 208 | : "memory"); | 217 | : "memory"); |
| 209 | } | 218 | } |
| 210 | 219 | ||
| 220 | static inline void __raw_local_irq_restore(unsigned long flags) | ||
| 221 | { | ||
| 222 | unsigned long __tmp1; | ||
| 223 | |||
| 224 | __asm__ __volatile__( | ||
| 225 | "raw_local_irq_restore\t%0" | ||
| 226 | : "=r" (__tmp1) | ||
| 227 | : "0" (flags) | ||
| 228 | : "memory"); | ||
| 229 | } | ||
| 230 | |||
| 211 | static inline int raw_irqs_disabled_flags(unsigned long flags) | 231 | static inline int raw_irqs_disabled_flags(unsigned long flags) |
| 212 | { | 232 | { |
| 213 | #ifdef CONFIG_MIPS_MT_SMTC | 233 | #ifdef CONFIG_MIPS_MT_SMTC |
diff --git a/include/asm-mips/mipsregs.h b/include/asm-mips/mipsregs.h index a46f8e258e6b..979866000da4 100644 --- a/include/asm-mips/mipsregs.h +++ b/include/asm-mips/mipsregs.h | |||
| @@ -1462,7 +1462,7 @@ set_c0_##name(unsigned int set) \ | |||
| 1462 | { \ | 1462 | { \ |
| 1463 | unsigned int res; \ | 1463 | unsigned int res; \ |
| 1464 | unsigned int omt; \ | 1464 | unsigned int omt; \ |
| 1465 | unsigned int flags; \ | 1465 | unsigned long flags; \ |
| 1466 | \ | 1466 | \ |
| 1467 | local_irq_save(flags); \ | 1467 | local_irq_save(flags); \ |
| 1468 | omt = __dmt(); \ | 1468 | omt = __dmt(); \ |
| @@ -1480,7 +1480,7 @@ clear_c0_##name(unsigned int clear) \ | |||
| 1480 | { \ | 1480 | { \ |
| 1481 | unsigned int res; \ | 1481 | unsigned int res; \ |
| 1482 | unsigned int omt; \ | 1482 | unsigned int omt; \ |
| 1483 | unsigned int flags; \ | 1483 | unsigned long flags; \ |
| 1484 | \ | 1484 | \ |
| 1485 | local_irq_save(flags); \ | 1485 | local_irq_save(flags); \ |
| 1486 | omt = __dmt(); \ | 1486 | omt = __dmt(); \ |
| @@ -1498,7 +1498,7 @@ change_c0_##name(unsigned int change, unsigned int new) \ | |||
| 1498 | { \ | 1498 | { \ |
| 1499 | unsigned int res; \ | 1499 | unsigned int res; \ |
| 1500 | unsigned int omt; \ | 1500 | unsigned int omt; \ |
| 1501 | unsigned int flags; \ | 1501 | unsigned long flags; \ |
| 1502 | \ | 1502 | \ |
| 1503 | local_irq_save(flags); \ | 1503 | local_irq_save(flags); \ |
| 1504 | \ | 1504 | \ |
diff --git a/include/asm-mips/pgtable-32.h b/include/asm-mips/pgtable-32.h index 4396e9ffd418..55813d6150c7 100644 --- a/include/asm-mips/pgtable-32.h +++ b/include/asm-mips/pgtable-32.h | |||
| @@ -57,7 +57,7 @@ extern int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1, | |||
| 57 | #define PMD_ORDER 1 | 57 | #define PMD_ORDER 1 |
| 58 | #define PTE_ORDER 0 | 58 | #define PTE_ORDER 0 |
| 59 | 59 | ||
| 60 | #define PTRS_PER_PGD ((PAGE_SIZE << PGD_ORDER) / sizeof(pgd_t)) | 60 | #define PTRS_PER_PGD (USER_PTRS_PER_PGD * 2) |
| 61 | #define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t)) | 61 | #define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t)) |
| 62 | 62 | ||
| 63 | #define USER_PTRS_PER_PGD (0x80000000UL/PGDIR_SIZE) | 63 | #define USER_PTRS_PER_PGD (0x80000000UL/PGDIR_SIZE) |
diff --git a/include/asm-mips/smtc.h b/include/asm-mips/smtc.h index 3639b28f80db..ea60bf08dcb0 100644 --- a/include/asm-mips/smtc.h +++ b/include/asm-mips/smtc.h | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | #include <asm/mips_mt.h> | 8 | #include <asm/mips_mt.h> |
| 9 | #include <asm/smtc_ipi.h> | ||
| 9 | 10 | ||
| 10 | /* | 11 | /* |
| 11 | * System-wide SMTC status information | 12 | * System-wide SMTC status information |
| @@ -38,14 +39,15 @@ struct mm_struct; | |||
| 38 | struct task_struct; | 39 | struct task_struct; |
| 39 | 40 | ||
| 40 | void smtc_get_new_mmu_context(struct mm_struct *mm, unsigned long cpu); | 41 | void smtc_get_new_mmu_context(struct mm_struct *mm, unsigned long cpu); |
| 41 | 42 | void self_ipi(struct smtc_ipi *); | |
| 42 | void smtc_flush_tlb_asid(unsigned long asid); | 43 | void smtc_flush_tlb_asid(unsigned long asid); |
| 43 | extern int mipsmt_build_cpu_map(int startslot); | 44 | extern int smtc_build_cpu_map(int startslot); |
| 44 | extern void mipsmt_prepare_cpus(void); | 45 | extern void smtc_prepare_cpus(int cpus); |
| 45 | extern void smtc_smp_finish(void); | 46 | extern void smtc_smp_finish(void); |
| 46 | extern void smtc_boot_secondary(int cpu, struct task_struct *t); | 47 | extern void smtc_boot_secondary(int cpu, struct task_struct *t); |
| 47 | extern void smtc_cpus_done(void); | 48 | extern void smtc_cpus_done(void); |
| 48 | 49 | ||
| 50 | |||
| 49 | /* | 51 | /* |
| 50 | * Sharing the TLB between multiple VPEs means that the | 52 | * Sharing the TLB between multiple VPEs means that the |
| 51 | * "random" index selection function is not allowed to | 53 | * "random" index selection function is not allowed to |
diff --git a/include/asm-mips/stackframe.h b/include/asm-mips/stackframe.h index 051e1af0bb95..4c37c4e5f72e 100644 --- a/include/asm-mips/stackframe.h +++ b/include/asm-mips/stackframe.h | |||
| @@ -297,14 +297,31 @@ | |||
| 297 | #ifdef CONFIG_MIPS_MT_SMTC | 297 | #ifdef CONFIG_MIPS_MT_SMTC |
| 298 | .set mips32r2 | 298 | .set mips32r2 |
| 299 | /* | 299 | /* |
| 300 | * This may not really be necessary if ints are already | 300 | * We need to make sure the read-modify-write |
| 301 | * inhibited here. | 301 | * of Status below isn't perturbed by an interrupt |
| 302 | * or cross-TC access, so we need to do at least a DMT, | ||
| 303 | * protected by an interrupt-inhibit. But setting IXMT | ||
| 304 | * also creates a few-cycle window where an IPI could | ||
| 305 | * be queued and not be detected before potentially | ||
| 306 | * returning to a WAIT or user-mode loop. It must be | ||
| 307 | * replayed. | ||
| 308 | * | ||
| 309 | * We're in the middle of a context switch, and | ||
| 310 | * we can't dispatch it directly without trashing | ||
| 311 | * some registers, so we'll try to detect this unlikely | ||
| 312 | * case and program a software interrupt in the VPE, | ||
| 313 | * as would be done for a cross-VPE IPI. To accomodate | ||
| 314 | * the handling of that case, we're doing a DVPE instead | ||
| 315 | * of just a DMT here to protect against other threads. | ||
| 316 | * This is a lot of cruft to cover a tiny window. | ||
| 317 | * If you can find a better design, implement it! | ||
| 318 | * | ||
| 302 | */ | 319 | */ |
| 303 | mfc0 v0, CP0_TCSTATUS | 320 | mfc0 v0, CP0_TCSTATUS |
| 304 | ori v0, TCSTATUS_IXMT | 321 | ori v0, TCSTATUS_IXMT |
| 305 | mtc0 v0, CP0_TCSTATUS | 322 | mtc0 v0, CP0_TCSTATUS |
| 306 | _ehb | 323 | _ehb |
| 307 | DMT 5 # dmt a1 | 324 | DVPE 5 # dvpe a1 |
| 308 | jal mips_ihb | 325 | jal mips_ihb |
| 309 | #endif /* CONFIG_MIPS_MT_SMTC */ | 326 | #endif /* CONFIG_MIPS_MT_SMTC */ |
| 310 | mfc0 a0, CP0_STATUS | 327 | mfc0 a0, CP0_STATUS |
| @@ -325,17 +342,50 @@ | |||
| 325 | */ | 342 | */ |
| 326 | LONG_L v1, PT_TCSTATUS(sp) | 343 | LONG_L v1, PT_TCSTATUS(sp) |
| 327 | _ehb | 344 | _ehb |
| 328 | mfc0 v0, CP0_TCSTATUS | 345 | mfc0 a0, CP0_TCSTATUS |
| 329 | andi v1, TCSTATUS_IXMT | 346 | andi v1, TCSTATUS_IXMT |
| 330 | /* We know that TCStatua.IXMT should be set from above */ | 347 | bnez v1, 0f |
| 331 | xori v0, v0, TCSTATUS_IXMT | 348 | |
| 332 | or v0, v0, v1 | 349 | /* |
| 333 | mtc0 v0, CP0_TCSTATUS | 350 | * We'd like to detect any IPIs queued in the tiny window |
| 334 | _ehb | 351 | * above and request an software interrupt to service them |
| 335 | andi a1, a1, VPECONTROL_TE | 352 | * when we ERET. |
| 353 | * | ||
| 354 | * Computing the offset into the IPIQ array of the executing | ||
| 355 | * TC's IPI queue in-line would be tedious. We use part of | ||
| 356 | * the TCContext register to hold 16 bits of offset that we | ||
| 357 | * can add in-line to find the queue head. | ||
| 358 | */ | ||
| 359 | mfc0 v0, CP0_TCCONTEXT | ||
| 360 | la a2, IPIQ | ||
| 361 | srl v0, v0, 16 | ||
| 362 | addu a2, a2, v0 | ||
| 363 | LONG_L v0, 0(a2) | ||
| 364 | beqz v0, 0f | ||
| 365 | /* | ||
| 366 | * If we have a queue, provoke dispatch within the VPE by setting C_SW1 | ||
| 367 | */ | ||
| 368 | mfc0 v0, CP0_CAUSE | ||
| 369 | ori v0, v0, C_SW1 | ||
| 370 | mtc0 v0, CP0_CAUSE | ||
| 371 | 0: | ||
| 372 | /* | ||
| 373 | * This test should really never branch but | ||
| 374 | * let's be prudent here. Having atomized | ||
| 375 | * the shared register modifications, we can | ||
| 376 | * now EVPE, and must do so before interrupts | ||
| 377 | * are potentially re-enabled. | ||
| 378 | */ | ||
| 379 | andi a1, a1, MVPCONTROL_EVP | ||
| 336 | beqz a1, 1f | 380 | beqz a1, 1f |
| 337 | emt | 381 | evpe |
| 338 | 1: | 382 | 1: |
| 383 | /* We know that TCStatua.IXMT should be set from above */ | ||
| 384 | xori a0, a0, TCSTATUS_IXMT | ||
| 385 | or a0, a0, v1 | ||
| 386 | mtc0 a0, CP0_TCSTATUS | ||
| 387 | _ehb | ||
| 388 | |||
| 339 | .set mips0 | 389 | .set mips0 |
| 340 | #endif /* CONFIG_MIPS_MT_SMTC */ | 390 | #endif /* CONFIG_MIPS_MT_SMTC */ |
| 341 | LONG_L v1, PT_EPC(sp) | 391 | LONG_L v1, PT_EPC(sp) |
diff --git a/include/asm-x86/acpi.h b/include/asm-x86/acpi.h index 635d764dc13e..35d1743b57ac 100644 --- a/include/asm-x86/acpi.h +++ b/include/asm-x86/acpi.h | |||
| @@ -140,6 +140,8 @@ static inline unsigned int acpi_processor_cstate_check(unsigned int max_cstate) | |||
| 140 | boot_cpu_data.x86_model <= 0x05 && | 140 | boot_cpu_data.x86_model <= 0x05 && |
| 141 | boot_cpu_data.x86_mask < 0x0A) | 141 | boot_cpu_data.x86_mask < 0x0A) |
| 142 | return 1; | 142 | return 1; |
| 143 | else if (boot_cpu_has(X86_FEATURE_AMDC1E)) | ||
| 144 | return 1; | ||
| 143 | else | 145 | else |
| 144 | return max_cstate; | 146 | return max_cstate; |
| 145 | } | 147 | } |
diff --git a/include/asm-x86/cpufeature.h b/include/asm-x86/cpufeature.h index 9489283a4bcf..cfcfb0a806ba 100644 --- a/include/asm-x86/cpufeature.h +++ b/include/asm-x86/cpufeature.h | |||
| @@ -81,6 +81,7 @@ | |||
| 81 | #define X86_FEATURE_LFENCE_RDTSC (3*32+18) /* Lfence synchronizes RDTSC */ | 81 | #define X86_FEATURE_LFENCE_RDTSC (3*32+18) /* Lfence synchronizes RDTSC */ |
| 82 | #define X86_FEATURE_11AP (3*32+19) /* Bad local APIC aka 11AP */ | 82 | #define X86_FEATURE_11AP (3*32+19) /* Bad local APIC aka 11AP */ |
| 83 | #define X86_FEATURE_NOPL (3*32+20) /* The NOPL (0F 1F) instructions */ | 83 | #define X86_FEATURE_NOPL (3*32+20) /* The NOPL (0F 1F) instructions */ |
| 84 | #define X86_FEATURE_AMDC1E (3*32+21) /* AMD C1E detected */ | ||
| 84 | 85 | ||
| 85 | /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ | 86 | /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ |
| 86 | #define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */ | 87 | #define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */ |
diff --git a/include/asm-x86/idle.h b/include/asm-x86/idle.h index d240e5b30a45..cbb649123612 100644 --- a/include/asm-x86/idle.h +++ b/include/asm-x86/idle.h | |||
| @@ -10,4 +10,6 @@ void idle_notifier_register(struct notifier_block *n); | |||
| 10 | void enter_idle(void); | 10 | void enter_idle(void); |
| 11 | void exit_idle(void); | 11 | void exit_idle(void); |
| 12 | 12 | ||
| 13 | void c1e_remove_cpu(int cpu); | ||
| 14 | |||
| 13 | #endif | 15 | #endif |
diff --git a/include/asm-x86/kgdb.h b/include/asm-x86/kgdb.h index 484c47554f3b..94d63db10365 100644 --- a/include/asm-x86/kgdb.h +++ b/include/asm-x86/kgdb.h | |||
| @@ -39,12 +39,13 @@ enum regnames { | |||
| 39 | GDB_FS, /* 14 */ | 39 | GDB_FS, /* 14 */ |
| 40 | GDB_GS, /* 15 */ | 40 | GDB_GS, /* 15 */ |
| 41 | }; | 41 | }; |
| 42 | #define NUMREGBYTES ((GDB_GS+1)*4) | ||
| 42 | #else /* ! CONFIG_X86_32 */ | 43 | #else /* ! CONFIG_X86_32 */ |
| 43 | enum regnames { | 44 | enum regnames64 { |
| 44 | GDB_AX, /* 0 */ | 45 | GDB_AX, /* 0 */ |
| 45 | GDB_DX, /* 1 */ | 46 | GDB_BX, /* 1 */ |
| 46 | GDB_CX, /* 2 */ | 47 | GDB_CX, /* 2 */ |
| 47 | GDB_BX, /* 3 */ | 48 | GDB_DX, /* 3 */ |
| 48 | GDB_SI, /* 4 */ | 49 | GDB_SI, /* 4 */ |
| 49 | GDB_DI, /* 5 */ | 50 | GDB_DI, /* 5 */ |
| 50 | GDB_BP, /* 6 */ | 51 | GDB_BP, /* 6 */ |
| @@ -58,18 +59,15 @@ enum regnames { | |||
| 58 | GDB_R14, /* 14 */ | 59 | GDB_R14, /* 14 */ |
| 59 | GDB_R15, /* 15 */ | 60 | GDB_R15, /* 15 */ |
| 60 | GDB_PC, /* 16 */ | 61 | GDB_PC, /* 16 */ |
| 61 | GDB_PS, /* 17 */ | ||
| 62 | }; | 62 | }; |
| 63 | #endif /* CONFIG_X86_32 */ | ||
| 64 | 63 | ||
| 65 | /* | 64 | enum regnames32 { |
| 66 | * Number of bytes of registers: | 65 | GDB_PS = 34, |
| 67 | */ | 66 | GDB_CS, |
| 68 | #ifdef CONFIG_X86_32 | 67 | GDB_SS, |
| 69 | # define NUMREGBYTES 64 | 68 | }; |
| 70 | #else | 69 | #define NUMREGBYTES ((GDB_SS+1)*4) |
| 71 | # define NUMREGBYTES ((GDB_PS+1)*8) | 70 | #endif /* CONFIG_X86_32 */ |
| 72 | #endif | ||
| 73 | 71 | ||
| 74 | static inline void arch_kgdb_breakpoint(void) | 72 | static inline void arch_kgdb_breakpoint(void) |
| 75 | { | 73 | { |
diff --git a/include/asm-x86/uaccess_64.h b/include/asm-x86/uaccess_64.h index 515d4dce96b5..45806d60bcbe 100644 --- a/include/asm-x86/uaccess_64.h +++ b/include/asm-x86/uaccess_64.h | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | #include <linux/compiler.h> | 7 | #include <linux/compiler.h> |
| 8 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
| 9 | #include <linux/prefetch.h> | 9 | #include <linux/prefetch.h> |
| 10 | #include <linux/lockdep.h> | ||
| 10 | #include <asm/page.h> | 11 | #include <asm/page.h> |
| 11 | 12 | ||
| 12 | /* | 13 | /* |
diff --git a/include/linux/cnt32_to_63.h b/include/linux/cnt32_to_63.h new file mode 100644 index 000000000000..8c0f9505b48c --- /dev/null +++ b/include/linux/cnt32_to_63.h | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | /* | ||
| 2 | * Extend a 32-bit counter to 63 bits | ||
| 3 | * | ||
| 4 | * Author: Nicolas Pitre | ||
| 5 | * Created: December 3, 2006 | ||
| 6 | * Copyright: MontaVista Software, Inc. | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License version 2 | ||
| 10 | * as published by the Free Software Foundation. | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef __LINUX_CNT32_TO_63_H__ | ||
| 14 | #define __LINUX_CNT32_TO_63_H__ | ||
| 15 | |||
| 16 | #include <linux/compiler.h> | ||
| 17 | #include <linux/types.h> | ||
| 18 | #include <asm/byteorder.h> | ||
| 19 | |||
| 20 | /* this is used only to give gcc a clue about good code generation */ | ||
| 21 | union cnt32_to_63 { | ||
| 22 | struct { | ||
| 23 | #if defined(__LITTLE_ENDIAN) | ||
| 24 | u32 lo, hi; | ||
| 25 | #elif defined(__BIG_ENDIAN) | ||
| 26 | u32 hi, lo; | ||
| 27 | #endif | ||
| 28 | }; | ||
| 29 | u64 val; | ||
| 30 | }; | ||
| 31 | |||
| 32 | |||
| 33 | /** | ||
| 34 | * cnt32_to_63 - Expand a 32-bit counter to a 63-bit counter | ||
| 35 | * @cnt_lo: The low part of the counter | ||
| 36 | * | ||
| 37 | * Many hardware clock counters are only 32 bits wide and therefore have | ||
| 38 | * a relatively short period making wrap-arounds rather frequent. This | ||
| 39 | * is a problem when implementing sched_clock() for example, where a 64-bit | ||
| 40 | * non-wrapping monotonic value is expected to be returned. | ||
| 41 | * | ||
| 42 | * To overcome that limitation, let's extend a 32-bit counter to 63 bits | ||
| 43 | * in a completely lock free fashion. Bits 0 to 31 of the clock are provided | ||
| 44 | * by the hardware while bits 32 to 62 are stored in memory. The top bit in | ||
| 45 | * memory is used to synchronize with the hardware clock half-period. When | ||
| 46 | * the top bit of both counters (hardware and in memory) differ then the | ||
| 47 | * memory is updated with a new value, incrementing it when the hardware | ||
| 48 | * counter wraps around. | ||
| 49 | * | ||
| 50 | * Because a word store in memory is atomic then the incremented value will | ||
| 51 | * always be in synch with the top bit indicating to any potential concurrent | ||
| 52 | * reader if the value in memory is up to date or not with regards to the | ||
| 53 | * needed increment. And any race in updating the value in memory is harmless | ||
| 54 | * as the same value would simply be stored more than once. | ||
| 55 | * | ||
| 56 | * The only restriction for the algorithm to work properly is that this | ||
| 57 | * code must be executed at least once per each half period of the 32-bit | ||
| 58 | * counter to properly update the state bit in memory. This is usually not a | ||
| 59 | * problem in practice, but if it is then a kernel timer could be scheduled | ||
| 60 | * to manage for this code to be executed often enough. | ||
| 61 | * | ||
| 62 | * Note that the top bit (bit 63) in the returned value should be considered | ||
| 63 | * as garbage. It is not cleared here because callers are likely to use a | ||
| 64 | * multiplier on the returned value which can get rid of the top bit | ||
| 65 | * implicitly by making the multiplier even, therefore saving on a runtime | ||
| 66 | * clear-bit instruction. Otherwise caller must remember to clear the top | ||
| 67 | * bit explicitly. | ||
| 68 | */ | ||
| 69 | #define cnt32_to_63(cnt_lo) \ | ||
| 70 | ({ \ | ||
| 71 | static volatile u32 __m_cnt_hi; \ | ||
| 72 | union cnt32_to_63 __x; \ | ||
| 73 | __x.hi = __m_cnt_hi; \ | ||
| 74 | __x.lo = (cnt_lo); \ | ||
| 75 | if (unlikely((s32)(__x.hi ^ __x.lo) < 0)) \ | ||
| 76 | __m_cnt_hi = __x.hi = (__x.hi ^ 0x80000000) + (__x.hi >> 31); \ | ||
| 77 | __x.val; \ | ||
| 78 | }) | ||
| 79 | |||
| 80 | #endif | ||
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 6d93dce61cbb..2f245fe63bda 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
| @@ -47,14 +47,22 @@ enum hrtimer_restart { | |||
| 47 | * HRTIMER_CB_IRQSAFE: Callback may run in hardirq context | 47 | * HRTIMER_CB_IRQSAFE: Callback may run in hardirq context |
| 48 | * HRTIMER_CB_IRQSAFE_NO_RESTART: Callback may run in hardirq context and | 48 | * HRTIMER_CB_IRQSAFE_NO_RESTART: Callback may run in hardirq context and |
| 49 | * does not restart the timer | 49 | * does not restart the timer |
| 50 | * HRTIMER_CB_IRQSAFE_NO_SOFTIRQ: Callback must run in hardirq context | 50 | * HRTIMER_CB_IRQSAFE_PERCPU: Callback must run in hardirq context |
| 51 | * Special mode for tick emultation | 51 | * Special mode for tick emulation and |
| 52 | * scheduler timer. Such timers are per | ||
| 53 | * cpu and not allowed to be migrated on | ||
| 54 | * cpu unplug. | ||
| 55 | * HRTIMER_CB_IRQSAFE_UNLOCKED: Callback should run in hardirq context | ||
| 56 | * with timer->base lock unlocked | ||
| 57 | * used for timers which call wakeup to | ||
| 58 | * avoid lock order problems with rq->lock | ||
| 52 | */ | 59 | */ |
| 53 | enum hrtimer_cb_mode { | 60 | enum hrtimer_cb_mode { |
| 54 | HRTIMER_CB_SOFTIRQ, | 61 | HRTIMER_CB_SOFTIRQ, |
| 55 | HRTIMER_CB_IRQSAFE, | 62 | HRTIMER_CB_IRQSAFE, |
| 56 | HRTIMER_CB_IRQSAFE_NO_RESTART, | 63 | HRTIMER_CB_IRQSAFE_NO_RESTART, |
| 57 | HRTIMER_CB_IRQSAFE_NO_SOFTIRQ, | 64 | HRTIMER_CB_IRQSAFE_PERCPU, |
| 65 | HRTIMER_CB_IRQSAFE_UNLOCKED, | ||
| 58 | }; | 66 | }; |
| 59 | 67 | ||
| 60 | /* | 68 | /* |
| @@ -67,9 +75,10 @@ enum hrtimer_cb_mode { | |||
| 67 | * 0x02 callback function running | 75 | * 0x02 callback function running |
| 68 | * 0x04 callback pending (high resolution mode) | 76 | * 0x04 callback pending (high resolution mode) |
| 69 | * | 77 | * |
| 70 | * Special case: | 78 | * Special cases: |
| 71 | * 0x03 callback function running and enqueued | 79 | * 0x03 callback function running and enqueued |
| 72 | * (was requeued on another CPU) | 80 | * (was requeued on another CPU) |
| 81 | * 0x09 timer was migrated on CPU hotunplug | ||
| 73 | * The "callback function running and enqueued" status is only possible on | 82 | * The "callback function running and enqueued" status is only possible on |
| 74 | * SMP. It happens for example when a posix timer expired and the callback | 83 | * SMP. It happens for example when a posix timer expired and the callback |
| 75 | * queued a signal. Between dropping the lock which protects the posix timer | 84 | * queued a signal. Between dropping the lock which protects the posix timer |
| @@ -87,6 +96,7 @@ enum hrtimer_cb_mode { | |||
| 87 | #define HRTIMER_STATE_ENQUEUED 0x01 | 96 | #define HRTIMER_STATE_ENQUEUED 0x01 |
| 88 | #define HRTIMER_STATE_CALLBACK 0x02 | 97 | #define HRTIMER_STATE_CALLBACK 0x02 |
| 89 | #define HRTIMER_STATE_PENDING 0x04 | 98 | #define HRTIMER_STATE_PENDING 0x04 |
| 99 | #define HRTIMER_STATE_MIGRATE 0x08 | ||
| 90 | 100 | ||
| 91 | /** | 101 | /** |
| 92 | * struct hrtimer - the basic hrtimer structure | 102 | * struct hrtimer - the basic hrtimer structure |
diff --git a/include/linux/pci.h b/include/linux/pci.h index c0e14008a3c2..98dc6243a706 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -534,7 +534,7 @@ extern void pci_sort_breadthfirst(void); | |||
| 534 | #ifdef CONFIG_PCI_LEGACY | 534 | #ifdef CONFIG_PCI_LEGACY |
| 535 | struct pci_dev __deprecated *pci_find_device(unsigned int vendor, | 535 | struct pci_dev __deprecated *pci_find_device(unsigned int vendor, |
| 536 | unsigned int device, | 536 | unsigned int device, |
| 537 | const struct pci_dev *from); | 537 | struct pci_dev *from); |
| 538 | struct pci_dev __deprecated *pci_find_slot(unsigned int bus, | 538 | struct pci_dev __deprecated *pci_find_slot(unsigned int bus, |
| 539 | unsigned int devfn); | 539 | unsigned int devfn); |
| 540 | #endif /* CONFIG_PCI_LEGACY */ | 540 | #endif /* CONFIG_PCI_LEGACY */ |
| @@ -550,7 +550,7 @@ struct pci_dev *pci_get_device(unsigned int vendor, unsigned int device, | |||
| 550 | struct pci_dev *from); | 550 | struct pci_dev *from); |
| 551 | struct pci_dev *pci_get_subsys(unsigned int vendor, unsigned int device, | 551 | struct pci_dev *pci_get_subsys(unsigned int vendor, unsigned int device, |
| 552 | unsigned int ss_vendor, unsigned int ss_device, | 552 | unsigned int ss_vendor, unsigned int ss_device, |
| 553 | const struct pci_dev *from); | 553 | struct pci_dev *from); |
| 554 | struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn); | 554 | struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn); |
| 555 | struct pci_dev *pci_get_bus_and_slot(unsigned int bus, unsigned int devfn); | 555 | struct pci_dev *pci_get_bus_and_slot(unsigned int bus, unsigned int devfn); |
| 556 | struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from); | 556 | struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from); |
| @@ -816,7 +816,7 @@ _PCI_NOP_ALL(write,) | |||
| 816 | 816 | ||
| 817 | static inline struct pci_dev *pci_find_device(unsigned int vendor, | 817 | static inline struct pci_dev *pci_find_device(unsigned int vendor, |
| 818 | unsigned int device, | 818 | unsigned int device, |
| 819 | const struct pci_dev *from) | 819 | struct pci_dev *from) |
| 820 | { | 820 | { |
| 821 | return NULL; | 821 | return NULL; |
| 822 | } | 822 | } |
| @@ -838,7 +838,7 @@ static inline struct pci_dev *pci_get_subsys(unsigned int vendor, | |||
| 838 | unsigned int device, | 838 | unsigned int device, |
| 839 | unsigned int ss_vendor, | 839 | unsigned int ss_vendor, |
| 840 | unsigned int ss_device, | 840 | unsigned int ss_device, |
| 841 | const struct pci_dev *from) | 841 | struct pci_dev *from) |
| 842 | { | 842 | { |
| 843 | return NULL; | 843 | return NULL; |
| 844 | } | 844 | } |
diff --git a/include/linux/ramfs.h b/include/linux/ramfs.h index b160fb18e8d6..37aaf2b39863 100644 --- a/include/linux/ramfs.h +++ b/include/linux/ramfs.h | |||
| @@ -6,6 +6,7 @@ extern int ramfs_get_sb(struct file_system_type *fs_type, | |||
| 6 | int flags, const char *dev_name, void *data, struct vfsmount *mnt); | 6 | int flags, const char *dev_name, void *data, struct vfsmount *mnt); |
| 7 | 7 | ||
| 8 | #ifndef CONFIG_MMU | 8 | #ifndef CONFIG_MMU |
| 9 | extern int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize); | ||
| 9 | extern unsigned long ramfs_nommu_get_unmapped_area(struct file *file, | 10 | extern unsigned long ramfs_nommu_get_unmapped_area(struct file *file, |
| 10 | unsigned long addr, | 11 | unsigned long addr, |
| 11 | unsigned long len, | 12 | unsigned long len, |
diff --git a/include/linux/smb.h b/include/linux/smb.h index caa43b2370cb..82fefddc5987 100644 --- a/include/linux/smb.h +++ b/include/linux/smb.h | |||
| @@ -11,7 +11,9 @@ | |||
| 11 | 11 | ||
| 12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
| 13 | #include <linux/magic.h> | 13 | #include <linux/magic.h> |
| 14 | #ifdef __KERNEL__ | ||
| 14 | #include <linux/time.h> | 15 | #include <linux/time.h> |
| 16 | #endif | ||
| 15 | 17 | ||
| 16 | enum smb_protocol { | 18 | enum smb_protocol { |
| 17 | SMB_PROTOCOL_NONE, | 19 | SMB_PROTOCOL_NONE, |
diff --git a/include/linux/stacktrace.h b/include/linux/stacktrace.h index 5da9794b2d78..b106fd8e0d5c 100644 --- a/include/linux/stacktrace.h +++ b/include/linux/stacktrace.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef __LINUX_STACKTRACE_H | 1 | #ifndef __LINUX_STACKTRACE_H |
| 2 | #define __LINUX_STACKTRACE_H | 2 | #define __LINUX_STACKTRACE_H |
| 3 | 3 | ||
| 4 | struct task_struct; | ||
| 5 | |||
| 4 | #ifdef CONFIG_STACKTRACE | 6 | #ifdef CONFIG_STACKTRACE |
| 5 | struct stack_trace { | 7 | struct stack_trace { |
| 6 | unsigned int nr_entries, max_entries; | 8 | unsigned int nr_entries, max_entries; |
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index b3d3e27c6299..c3626c0ba9d3 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h | |||
| @@ -596,4 +596,5 @@ int p9_idpool_check(int id, struct p9_idpool *p); | |||
| 596 | int p9_error_init(void); | 596 | int p9_error_init(void); |
| 597 | int p9_errstr2errno(char *, int); | 597 | int p9_errstr2errno(char *, int); |
| 598 | int p9_trans_fd_init(void); | 598 | int p9_trans_fd_init(void); |
| 599 | void p9_trans_fd_exit(void); | ||
| 599 | #endif /* NET_9P_H */ | 600 | #endif /* NET_9P_H */ |
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h index 0db3a4038dc0..3ca737120a90 100644 --- a/include/net/9p/transport.h +++ b/include/net/9p/transport.h | |||
| @@ -26,6 +26,8 @@ | |||
| 26 | #ifndef NET_9P_TRANSPORT_H | 26 | #ifndef NET_9P_TRANSPORT_H |
| 27 | #define NET_9P_TRANSPORT_H | 27 | #define NET_9P_TRANSPORT_H |
| 28 | 28 | ||
| 29 | #include <linux/module.h> | ||
| 30 | |||
| 29 | /** | 31 | /** |
| 30 | * enum p9_trans_status - different states of underlying transports | 32 | * enum p9_trans_status - different states of underlying transports |
| 31 | * @Connected: transport is connected and healthy | 33 | * @Connected: transport is connected and healthy |
| @@ -91,9 +93,12 @@ struct p9_trans_module { | |||
| 91 | int maxsize; /* max message size of transport */ | 93 | int maxsize; /* max message size of transport */ |
| 92 | int def; /* this transport should be default */ | 94 | int def; /* this transport should be default */ |
| 93 | struct p9_trans * (*create)(const char *, char *, int, unsigned char); | 95 | struct p9_trans * (*create)(const char *, char *, int, unsigned char); |
| 96 | struct module *owner; | ||
| 94 | }; | 97 | }; |
| 95 | 98 | ||
| 96 | void v9fs_register_trans(struct p9_trans_module *m); | 99 | void v9fs_register_trans(struct p9_trans_module *m); |
| 97 | struct p9_trans_module *v9fs_match_trans(const substring_t *name); | 100 | void v9fs_unregister_trans(struct p9_trans_module *m); |
| 98 | struct p9_trans_module *v9fs_default_trans(void); | 101 | struct p9_trans_module *v9fs_get_trans_by_name(const substring_t *name); |
| 102 | struct p9_trans_module *v9fs_get_default_trans(void); | ||
| 103 | void v9fs_put_trans(struct p9_trans_module *m); | ||
| 99 | #endif /* NET_9P_TRANSPORT_H */ | 104 | #endif /* NET_9P_TRANSPORT_H */ |
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index 24811732bdb2..029a54a02396 100644 --- a/include/net/sctp/sm.h +++ b/include/net/sctp/sm.h | |||
| @@ -227,6 +227,9 @@ struct sctp_chunk *sctp_make_abort_violation(const struct sctp_association *, | |||
| 227 | const struct sctp_chunk *, | 227 | const struct sctp_chunk *, |
| 228 | const __u8 *, | 228 | const __u8 *, |
| 229 | const size_t ); | 229 | const size_t ); |
| 230 | struct sctp_chunk *sctp_make_violation_paramlen(const struct sctp_association *, | ||
| 231 | const struct sctp_chunk *, | ||
| 232 | struct sctp_paramhdr *); | ||
| 230 | struct sctp_chunk *sctp_make_heartbeat(const struct sctp_association *, | 233 | struct sctp_chunk *sctp_make_heartbeat(const struct sctp_association *, |
| 231 | const struct sctp_transport *, | 234 | const struct sctp_transport *, |
| 232 | const void *payload, | 235 | const void *payload, |
