diff options
Diffstat (limited to 'include')
80 files changed, 621 insertions, 461 deletions
diff --git a/include/asm-arm/arch-pxa/audio.h b/include/asm-arm/arch-pxa/audio.h index 60976f830e3f..17eccd720136 100644 --- a/include/asm-arm/arch-pxa/audio.h +++ b/include/asm-arm/arch-pxa/audio.h | |||
@@ -6,8 +6,8 @@ | |||
6 | #include <sound/pcm.h> | 6 | #include <sound/pcm.h> |
7 | 7 | ||
8 | typedef struct { | 8 | typedef struct { |
9 | int (*startup)(snd_pcm_substream_t *, void *); | 9 | int (*startup)(struct snd_pcm_substream *, void *); |
10 | void (*shutdown)(snd_pcm_substream_t *, void *); | 10 | void (*shutdown)(struct snd_pcm_substream *, void *); |
11 | void (*suspend)(void *); | 11 | void (*suspend)(void *); |
12 | void (*resume)(void *); | 12 | void (*resume)(void *); |
13 | void *priv; | 13 | void *priv; |
diff --git a/include/asm-i386/acpi.h b/include/asm-i386/acpi.h index 55059abf9c95..20f523954218 100644 --- a/include/asm-i386/acpi.h +++ b/include/asm-i386/acpi.h | |||
@@ -103,6 +103,12 @@ __acpi_release_global_lock (unsigned int *lock) | |||
103 | :"=r"(n_hi), "=r"(n_lo) \ | 103 | :"=r"(n_hi), "=r"(n_lo) \ |
104 | :"0"(n_hi), "1"(n_lo)) | 104 | :"0"(n_hi), "1"(n_lo)) |
105 | 105 | ||
106 | #ifdef CONFIG_X86_IO_APIC | ||
107 | extern void check_acpi_pci(void); | ||
108 | #else | ||
109 | static inline void check_acpi_pci(void) { } | ||
110 | #endif | ||
111 | |||
106 | #ifdef CONFIG_ACPI | 112 | #ifdef CONFIG_ACPI |
107 | extern int acpi_lapic; | 113 | extern int acpi_lapic; |
108 | extern int acpi_ioapic; | 114 | extern int acpi_ioapic; |
@@ -128,8 +134,6 @@ extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq); | |||
128 | extern int skip_ioapic_setup; | 134 | extern int skip_ioapic_setup; |
129 | extern int acpi_skip_timer_override; | 135 | extern int acpi_skip_timer_override; |
130 | 136 | ||
131 | extern void check_acpi_pci(void); | ||
132 | |||
133 | static inline void disable_ioapic_setup(void) | 137 | static inline void disable_ioapic_setup(void) |
134 | { | 138 | { |
135 | skip_ioapic_setup = 1; | 139 | skip_ioapic_setup = 1; |
@@ -142,8 +146,6 @@ static inline int ioapic_setup_disabled(void) | |||
142 | 146 | ||
143 | #else | 147 | #else |
144 | static inline void disable_ioapic_setup(void) { } | 148 | static inline void disable_ioapic_setup(void) { } |
145 | static inline void check_acpi_pci(void) { } | ||
146 | |||
147 | #endif | 149 | #endif |
148 | 150 | ||
149 | static inline void acpi_noirq_set(void) { acpi_noirq = 1; } | 151 | static inline void acpi_noirq_set(void) { acpi_noirq = 1; } |
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index 088a945bf26b..ee056c41a9fb 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h | |||
@@ -219,13 +219,12 @@ extern unsigned long pg0[]; | |||
219 | * The following only work if pte_present() is true. | 219 | * The following only work if pte_present() is true. |
220 | * Undefined behaviour if not.. | 220 | * Undefined behaviour if not.. |
221 | */ | 221 | */ |
222 | #define __LARGE_PTE (_PAGE_PSE | _PAGE_PRESENT) | ||
223 | static inline int pte_user(pte_t pte) { return (pte).pte_low & _PAGE_USER; } | 222 | static inline int pte_user(pte_t pte) { return (pte).pte_low & _PAGE_USER; } |
224 | static inline int pte_read(pte_t pte) { return (pte).pte_low & _PAGE_USER; } | 223 | static inline int pte_read(pte_t pte) { return (pte).pte_low & _PAGE_USER; } |
225 | static inline int pte_dirty(pte_t pte) { return (pte).pte_low & _PAGE_DIRTY; } | 224 | static inline int pte_dirty(pte_t pte) { return (pte).pte_low & _PAGE_DIRTY; } |
226 | static inline int pte_young(pte_t pte) { return (pte).pte_low & _PAGE_ACCESSED; } | 225 | static inline int pte_young(pte_t pte) { return (pte).pte_low & _PAGE_ACCESSED; } |
227 | static inline int pte_write(pte_t pte) { return (pte).pte_low & _PAGE_RW; } | 226 | static inline int pte_write(pte_t pte) { return (pte).pte_low & _PAGE_RW; } |
228 | static inline int pte_huge(pte_t pte) { return ((pte).pte_low & __LARGE_PTE) == __LARGE_PTE; } | 227 | static inline int pte_huge(pte_t pte) { return (pte).pte_low & _PAGE_PSE; } |
229 | 228 | ||
230 | /* | 229 | /* |
231 | * The following only works if pte_present() is not true. | 230 | * The following only works if pte_present() is not true. |
@@ -242,7 +241,7 @@ static inline pte_t pte_mkexec(pte_t pte) { (pte).pte_low |= _PAGE_USER; return | |||
242 | static inline pte_t pte_mkdirty(pte_t pte) { (pte).pte_low |= _PAGE_DIRTY; return pte; } | 241 | static inline pte_t pte_mkdirty(pte_t pte) { (pte).pte_low |= _PAGE_DIRTY; return pte; } |
243 | static inline pte_t pte_mkyoung(pte_t pte) { (pte).pte_low |= _PAGE_ACCESSED; return pte; } | 242 | static inline pte_t pte_mkyoung(pte_t pte) { (pte).pte_low |= _PAGE_ACCESSED; return pte; } |
244 | static inline pte_t pte_mkwrite(pte_t pte) { (pte).pte_low |= _PAGE_RW; return pte; } | 243 | static inline pte_t pte_mkwrite(pte_t pte) { (pte).pte_low |= _PAGE_RW; return pte; } |
245 | static inline pte_t pte_mkhuge(pte_t pte) { (pte).pte_low |= __LARGE_PTE; return pte; } | 244 | static inline pte_t pte_mkhuge(pte_t pte) { (pte).pte_low |= _PAGE_PSE; return pte; } |
246 | 245 | ||
247 | #ifdef CONFIG_X86_PAE | 246 | #ifdef CONFIG_X86_PAE |
248 | # include <asm/pgtable-3level.h> | 247 | # include <asm/pgtable-3level.h> |
diff --git a/include/asm-ia64/intel_intrin.h b/include/asm-ia64/intel_intrin.h index a7122d850177..d069b6acddce 100644 --- a/include/asm-ia64/intel_intrin.h +++ b/include/asm-ia64/intel_intrin.h | |||
@@ -5,113 +5,10 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2002,2003 Jun Nakajima <jun.nakajima@intel.com> | 6 | * Copyright (C) 2002,2003 Jun Nakajima <jun.nakajima@intel.com> |
7 | * Copyright (C) 2002,2003 Suresh Siddha <suresh.b.siddha@intel.com> | 7 | * Copyright (C) 2002,2003 Suresh Siddha <suresh.b.siddha@intel.com> |
8 | * Copyright (C) 2005,2006 Hongjiu Lu <hongjiu.lu@intel.com> | ||
8 | * | 9 | * |
9 | */ | 10 | */ |
10 | #include <asm/types.h> | 11 | #include <ia64intrin.h> |
11 | |||
12 | void __lfetch(int lfhint, void *y); | ||
13 | void __lfetch_excl(int lfhint, void *y); | ||
14 | void __lfetch_fault(int lfhint, void *y); | ||
15 | void __lfetch_fault_excl(int lfhint, void *y); | ||
16 | |||
17 | /* In the following, whichFloatReg should be an integer from 0-127 */ | ||
18 | void __ldfs(const int whichFloatReg, void *src); | ||
19 | void __ldfd(const int whichFloatReg, void *src); | ||
20 | void __ldfe(const int whichFloatReg, void *src); | ||
21 | void __ldf8(const int whichFloatReg, void *src); | ||
22 | void __ldf_fill(const int whichFloatReg, void *src); | ||
23 | void __stfs(void *dst, const int whichFloatReg); | ||
24 | void __stfd(void *dst, const int whichFloatReg); | ||
25 | void __stfe(void *dst, const int whichFloatReg); | ||
26 | void __stf8(void *dst, const int whichFloatReg); | ||
27 | void __stf_spill(void *dst, const int whichFloatReg); | ||
28 | |||
29 | void __st1_rel(void *dst, const __s8 value); | ||
30 | void __st2_rel(void *dst, const __s16 value); | ||
31 | void __st4_rel(void *dst, const __s32 value); | ||
32 | void __st8_rel(void *dst, const __s64 value); | ||
33 | __u8 __ld1_acq(void *src); | ||
34 | __u16 __ld2_acq(void *src); | ||
35 | __u32 __ld4_acq(void *src); | ||
36 | __u64 __ld8_acq(void *src); | ||
37 | |||
38 | __u64 __fetchadd4_acq(__u32 *addend, const int increment); | ||
39 | __u64 __fetchadd4_rel(__u32 *addend, const int increment); | ||
40 | __u64 __fetchadd8_acq(__u64 *addend, const int increment); | ||
41 | __u64 __fetchadd8_rel(__u64 *addend, const int increment); | ||
42 | |||
43 | __u64 __getf_exp(double d); | ||
44 | |||
45 | /* OS Related Itanium(R) Intrinsics */ | ||
46 | |||
47 | /* The names to use for whichReg and whichIndReg below come from | ||
48 | the include file asm/ia64regs.h */ | ||
49 | |||
50 | __u64 __getIndReg(const int whichIndReg, __s64 index); | ||
51 | __u64 __getReg(const int whichReg); | ||
52 | |||
53 | void __setIndReg(const int whichIndReg, __s64 index, __u64 value); | ||
54 | void __setReg(const int whichReg, __u64 value); | ||
55 | |||
56 | void __mf(void); | ||
57 | void __mfa(void); | ||
58 | void __synci(void); | ||
59 | void __itcd(__s64 pa); | ||
60 | void __itci(__s64 pa); | ||
61 | void __itrd(__s64 whichTransReg, __s64 pa); | ||
62 | void __itri(__s64 whichTransReg, __s64 pa); | ||
63 | void __ptce(__s64 va); | ||
64 | void __ptcl(__s64 va, __s64 pagesz); | ||
65 | void __ptcg(__s64 va, __s64 pagesz); | ||
66 | void __ptcga(__s64 va, __s64 pagesz); | ||
67 | void __ptri(__s64 va, __s64 pagesz); | ||
68 | void __ptrd(__s64 va, __s64 pagesz); | ||
69 | void __invala (void); | ||
70 | void __invala_gr(const int whichGeneralReg /* 0-127 */ ); | ||
71 | void __invala_fr(const int whichFloatReg /* 0-127 */ ); | ||
72 | void __nop(const int); | ||
73 | void __fc(__u64 *addr); | ||
74 | void __sum(int mask); | ||
75 | void __rum(int mask); | ||
76 | void __ssm(int mask); | ||
77 | void __rsm(int mask); | ||
78 | __u64 __thash(__s64); | ||
79 | __u64 __ttag(__s64); | ||
80 | __s64 __tpa(__s64); | ||
81 | |||
82 | /* Intrinsics for implementing get/put_user macros */ | ||
83 | void __st_user(const char *tableName, __u64 addr, char size, char relocType, __u64 val); | ||
84 | void __ld_user(const char *tableName, __u64 addr, char size, char relocType); | ||
85 | |||
86 | /* This intrinsic does not generate code, it creates a barrier across which | ||
87 | * the compiler will not schedule data access instructions. | ||
88 | */ | ||
89 | void __memory_barrier(void); | ||
90 | |||
91 | void __isrlz(void); | ||
92 | void __dsrlz(void); | ||
93 | |||
94 | __u64 _m64_mux1(__u64 a, const int n); | ||
95 | __u64 __thash(__u64); | ||
96 | |||
97 | /* Lock and Atomic Operation Related Intrinsics */ | ||
98 | __u64 _InterlockedExchange8(volatile __u8 *trgt, __u8 value); | ||
99 | __u64 _InterlockedExchange16(volatile __u16 *trgt, __u16 value); | ||
100 | __s64 _InterlockedExchange(volatile __u32 *trgt, __u32 value); | ||
101 | __s64 _InterlockedExchange64(volatile __u64 *trgt, __u64 value); | ||
102 | |||
103 | __u64 _InterlockedCompareExchange8_rel(volatile __u8 *dest, __u64 xchg, __u64 comp); | ||
104 | __u64 _InterlockedCompareExchange8_acq(volatile __u8 *dest, __u64 xchg, __u64 comp); | ||
105 | __u64 _InterlockedCompareExchange16_rel(volatile __u16 *dest, __u64 xchg, __u64 comp); | ||
106 | __u64 _InterlockedCompareExchange16_acq(volatile __u16 *dest, __u64 xchg, __u64 comp); | ||
107 | __u64 _InterlockedCompareExchange_rel(volatile __u32 *dest, __u64 xchg, __u64 comp); | ||
108 | __u64 _InterlockedCompareExchange_acq(volatile __u32 *dest, __u64 xchg, __u64 comp); | ||
109 | __u64 _InterlockedCompareExchange64_rel(volatile __u64 *dest, __u64 xchg, __u64 comp); | ||
110 | __u64 _InterlockedCompareExchange64_acq(volatile __u64 *dest, __u64 xchg, __u64 comp); | ||
111 | |||
112 | __s64 _m64_dep_mi(const int v, __s64 s, const int p, const int len); | ||
113 | __s64 _m64_shrp(__s64 a, __s64 b, const int count); | ||
114 | __s64 _m64_popcnt(__s64 a); | ||
115 | 12 | ||
116 | #define ia64_barrier() __memory_barrier() | 13 | #define ia64_barrier() __memory_barrier() |
117 | 14 | ||
@@ -122,15 +19,16 @@ __s64 _m64_popcnt(__s64 a); | |||
122 | #define ia64_getreg __getReg | 19 | #define ia64_getreg __getReg |
123 | #define ia64_setreg __setReg | 20 | #define ia64_setreg __setReg |
124 | 21 | ||
125 | #define ia64_hint(x) | 22 | #define ia64_hint __hint |
23 | #define ia64_hint_pause __hint_pause | ||
126 | 24 | ||
127 | #define ia64_mux1_brcst 0 | 25 | #define ia64_mux1_brcst _m64_mux1_brcst |
128 | #define ia64_mux1_mix 8 | 26 | #define ia64_mux1_mix _m64_mux1_mix |
129 | #define ia64_mux1_shuf 9 | 27 | #define ia64_mux1_shuf _m64_mux1_shuf |
130 | #define ia64_mux1_alt 10 | 28 | #define ia64_mux1_alt _m64_mux1_alt |
131 | #define ia64_mux1_rev 11 | 29 | #define ia64_mux1_rev _m64_mux1_rev |
132 | 30 | ||
133 | #define ia64_mux1 _m64_mux1 | 31 | #define ia64_mux1(x,v) _m_to_int64(_m64_mux1(_m_from_int64(x), (v))) |
134 | #define ia64_popcnt _m64_popcnt | 32 | #define ia64_popcnt _m64_popcnt |
135 | #define ia64_getf_exp __getf_exp | 33 | #define ia64_getf_exp __getf_exp |
136 | #define ia64_shrp _m64_shrp | 34 | #define ia64_shrp _m64_shrp |
@@ -158,7 +56,7 @@ __s64 _m64_popcnt(__s64 a); | |||
158 | #define ia64_stf8 __stf8 | 56 | #define ia64_stf8 __stf8 |
159 | #define ia64_stf_spill __stf_spill | 57 | #define ia64_stf_spill __stf_spill |
160 | 58 | ||
161 | #define ia64_mf __mf | 59 | #define ia64_mf __mf |
162 | #define ia64_mfa __mfa | 60 | #define ia64_mfa __mfa |
163 | 61 | ||
164 | #define ia64_fetchadd4_acq __fetchadd4_acq | 62 | #define ia64_fetchadd4_acq __fetchadd4_acq |
@@ -234,10 +132,10 @@ __s64 _m64_popcnt(__s64 a); | |||
234 | 132 | ||
235 | /* Values for lfhint in __lfetch and __lfetch_fault */ | 133 | /* Values for lfhint in __lfetch and __lfetch_fault */ |
236 | 134 | ||
237 | #define ia64_lfhint_none 0 | 135 | #define ia64_lfhint_none __lfhint_none |
238 | #define ia64_lfhint_nt1 1 | 136 | #define ia64_lfhint_nt1 __lfhint_nt1 |
239 | #define ia64_lfhint_nt2 2 | 137 | #define ia64_lfhint_nt2 __lfhint_nt2 |
240 | #define ia64_lfhint_nta 3 | 138 | #define ia64_lfhint_nta __lfhint_nta |
241 | 139 | ||
242 | #define ia64_lfetch __lfetch | 140 | #define ia64_lfetch __lfetch |
243 | #define ia64_lfetch_excl __lfetch_excl | 141 | #define ia64_lfetch_excl __lfetch_excl |
@@ -254,4 +152,6 @@ do { \ | |||
254 | } \ | 152 | } \ |
255 | } while (0) | 153 | } while (0) |
256 | 154 | ||
155 | #define __builtin_trap() __break(0); | ||
156 | |||
257 | #endif /* _ASM_IA64_INTEL_INTRIN_H */ | 157 | #endif /* _ASM_IA64_INTEL_INTRIN_H */ |
diff --git a/include/asm-ia64/machvec.h b/include/asm-ia64/machvec.h index ca5ea994d688..c3e4ed8a3e17 100644 --- a/include/asm-ia64/machvec.h +++ b/include/asm-ia64/machvec.h | |||
@@ -20,6 +20,7 @@ struct scatterlist; | |||
20 | struct page; | 20 | struct page; |
21 | struct mm_struct; | 21 | struct mm_struct; |
22 | struct pci_bus; | 22 | struct pci_bus; |
23 | struct task_struct; | ||
23 | 24 | ||
24 | typedef void ia64_mv_setup_t (char **); | 25 | typedef void ia64_mv_setup_t (char **); |
25 | typedef void ia64_mv_cpu_init_t (void); | 26 | typedef void ia64_mv_cpu_init_t (void); |
@@ -34,6 +35,7 @@ typedef int ia64_mv_pci_legacy_read_t (struct pci_bus *, u16 port, u32 *val, | |||
34 | u8 size); | 35 | u8 size); |
35 | typedef int ia64_mv_pci_legacy_write_t (struct pci_bus *, u16 port, u32 val, | 36 | typedef int ia64_mv_pci_legacy_write_t (struct pci_bus *, u16 port, u32 val, |
36 | u8 size); | 37 | u8 size); |
38 | typedef void ia64_mv_migrate_t(struct task_struct * task); | ||
37 | 39 | ||
38 | /* DMA-mapping interface: */ | 40 | /* DMA-mapping interface: */ |
39 | typedef void ia64_mv_dma_init (void); | 41 | typedef void ia64_mv_dma_init (void); |
@@ -85,6 +87,11 @@ machvec_noop_mm (struct mm_struct *mm) | |||
85 | { | 87 | { |
86 | } | 88 | } |
87 | 89 | ||
90 | static inline void | ||
91 | machvec_noop_task (struct task_struct *task) | ||
92 | { | ||
93 | } | ||
94 | |||
88 | extern void machvec_setup (char **); | 95 | extern void machvec_setup (char **); |
89 | extern void machvec_timer_interrupt (int, void *, struct pt_regs *); | 96 | extern void machvec_timer_interrupt (int, void *, struct pt_regs *); |
90 | extern void machvec_dma_sync_single (struct device *, dma_addr_t, size_t, int); | 97 | extern void machvec_dma_sync_single (struct device *, dma_addr_t, size_t, int); |
@@ -146,6 +153,7 @@ extern void machvec_tlb_migrate_finish (struct mm_struct *); | |||
146 | # define platform_readw_relaxed ia64_mv.readw_relaxed | 153 | # define platform_readw_relaxed ia64_mv.readw_relaxed |
147 | # define platform_readl_relaxed ia64_mv.readl_relaxed | 154 | # define platform_readl_relaxed ia64_mv.readl_relaxed |
148 | # define platform_readq_relaxed ia64_mv.readq_relaxed | 155 | # define platform_readq_relaxed ia64_mv.readq_relaxed |
156 | # define platform_migrate ia64_mv.migrate | ||
149 | # endif | 157 | # endif |
150 | 158 | ||
151 | /* __attribute__((__aligned__(16))) is required to make size of the | 159 | /* __attribute__((__aligned__(16))) is required to make size of the |
@@ -194,6 +202,7 @@ struct ia64_machine_vector { | |||
194 | ia64_mv_readw_relaxed_t *readw_relaxed; | 202 | ia64_mv_readw_relaxed_t *readw_relaxed; |
195 | ia64_mv_readl_relaxed_t *readl_relaxed; | 203 | ia64_mv_readl_relaxed_t *readl_relaxed; |
196 | ia64_mv_readq_relaxed_t *readq_relaxed; | 204 | ia64_mv_readq_relaxed_t *readq_relaxed; |
205 | ia64_mv_migrate_t *migrate; | ||
197 | } __attribute__((__aligned__(16))); /* align attrib? see above comment */ | 206 | } __attribute__((__aligned__(16))); /* align attrib? see above comment */ |
198 | 207 | ||
199 | #define MACHVEC_INIT(name) \ | 208 | #define MACHVEC_INIT(name) \ |
@@ -238,6 +247,7 @@ struct ia64_machine_vector { | |||
238 | platform_readw_relaxed, \ | 247 | platform_readw_relaxed, \ |
239 | platform_readl_relaxed, \ | 248 | platform_readl_relaxed, \ |
240 | platform_readq_relaxed, \ | 249 | platform_readq_relaxed, \ |
250 | platform_migrate, \ | ||
241 | } | 251 | } |
242 | 252 | ||
243 | extern struct ia64_machine_vector ia64_mv; | 253 | extern struct ia64_machine_vector ia64_mv; |
@@ -386,5 +396,8 @@ extern ia64_mv_dma_supported swiotlb_dma_supported; | |||
386 | #ifndef platform_readq_relaxed | 396 | #ifndef platform_readq_relaxed |
387 | # define platform_readq_relaxed __ia64_readq_relaxed | 397 | # define platform_readq_relaxed __ia64_readq_relaxed |
388 | #endif | 398 | #endif |
399 | #ifndef platform_migrate | ||
400 | # define platform_migrate machvec_noop_task | ||
401 | #endif | ||
389 | 402 | ||
390 | #endif /* _ASM_IA64_MACHVEC_H */ | 403 | #endif /* _ASM_IA64_MACHVEC_H */ |
diff --git a/include/asm-ia64/machvec_sn2.h b/include/asm-ia64/machvec_sn2.h index 03d00faf03b5..da1d43755afe 100644 --- a/include/asm-ia64/machvec_sn2.h +++ b/include/asm-ia64/machvec_sn2.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2002-2003, 2006 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2002-2003,2006 Silicon Graphics, Inc. All Rights Reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms of version 2 of the GNU General Public License | 5 | * under the terms of version 2 of the GNU General Public License |
@@ -66,6 +66,7 @@ extern ia64_mv_dma_sync_single_for_device sn_dma_sync_single_for_device; | |||
66 | extern ia64_mv_dma_sync_sg_for_device sn_dma_sync_sg_for_device; | 66 | extern ia64_mv_dma_sync_sg_for_device sn_dma_sync_sg_for_device; |
67 | extern ia64_mv_dma_mapping_error sn_dma_mapping_error; | 67 | extern ia64_mv_dma_mapping_error sn_dma_mapping_error; |
68 | extern ia64_mv_dma_supported sn_dma_supported; | 68 | extern ia64_mv_dma_supported sn_dma_supported; |
69 | extern ia64_mv_migrate_t sn_migrate; | ||
69 | 70 | ||
70 | /* | 71 | /* |
71 | * This stuff has dual use! | 72 | * This stuff has dual use! |
@@ -115,6 +116,7 @@ extern ia64_mv_dma_supported sn_dma_supported; | |||
115 | #define platform_dma_sync_sg_for_device sn_dma_sync_sg_for_device | 116 | #define platform_dma_sync_sg_for_device sn_dma_sync_sg_for_device |
116 | #define platform_dma_mapping_error sn_dma_mapping_error | 117 | #define platform_dma_mapping_error sn_dma_mapping_error |
117 | #define platform_dma_supported sn_dma_supported | 118 | #define platform_dma_supported sn_dma_supported |
119 | #define platform_migrate sn_migrate | ||
118 | 120 | ||
119 | #include <asm/sn/io.h> | 121 | #include <asm/sn/io.h> |
120 | 122 | ||
diff --git a/include/asm-ia64/mca.h b/include/asm-ia64/mca.h index c7d9c9ed38ba..bfbbb8da79c7 100644 --- a/include/asm-ia64/mca.h +++ b/include/asm-ia64/mca.h | |||
@@ -131,6 +131,8 @@ struct ia64_mca_cpu { | |||
131 | /* Array of physical addresses of each CPU's MCA area. */ | 131 | /* Array of physical addresses of each CPU's MCA area. */ |
132 | extern unsigned long __per_cpu_mca[NR_CPUS]; | 132 | extern unsigned long __per_cpu_mca[NR_CPUS]; |
133 | 133 | ||
134 | extern int cpe_vector; | ||
135 | extern int ia64_cpe_irq; | ||
134 | extern void ia64_mca_init(void); | 136 | extern void ia64_mca_init(void); |
135 | extern void ia64_mca_cpu_init(void *); | 137 | extern void ia64_mca_cpu_init(void *); |
136 | extern void ia64_os_mca_dispatch(void); | 138 | extern void ia64_os_mca_dispatch(void); |
diff --git a/include/asm-ia64/mutex.h b/include/asm-ia64/mutex.h index 458c1f7fbc18..5a3224f6af38 100644 --- a/include/asm-ia64/mutex.h +++ b/include/asm-ia64/mutex.h | |||
@@ -1,9 +1,92 @@ | |||
1 | /* | 1 | /* |
2 | * Pull in the generic implementation for the mutex fastpath. | 2 | * ia64 implementation of the mutex fastpath. |
3 | * | 3 | * |
4 | * TODO: implement optimized primitives instead, or leave the generic | 4 | * Copyright (C) 2006 Ken Chen <kenneth.w.chen@intel.com> |
5 | * implementation in place, or pick the atomic_xchg() based generic | 5 | * |
6 | * implementation. (see asm-generic/mutex-xchg.h for details) | 6 | */ |
7 | |||
8 | #ifndef _ASM_MUTEX_H | ||
9 | #define _ASM_MUTEX_H | ||
10 | |||
11 | /** | ||
12 | * __mutex_fastpath_lock - try to take the lock by moving the count | ||
13 | * from 1 to a 0 value | ||
14 | * @count: pointer of type atomic_t | ||
15 | * @fail_fn: function to call if the original value was not 1 | ||
16 | * | ||
17 | * Change the count from 1 to a value lower than 1, and call <fail_fn> if | ||
18 | * it wasn't 1 originally. This function MUST leave the value lower than | ||
19 | * 1 even when the "1" assertion wasn't true. | ||
20 | */ | ||
21 | static inline void | ||
22 | __mutex_fastpath_lock(atomic_t *count, void (*fail_fn)(atomic_t *)) | ||
23 | { | ||
24 | if (unlikely(ia64_fetchadd4_acq(count, -1) != 1)) | ||
25 | fail_fn(count); | ||
26 | } | ||
27 | |||
28 | /** | ||
29 | * __mutex_fastpath_lock_retval - try to take the lock by moving the count | ||
30 | * from 1 to a 0 value | ||
31 | * @count: pointer of type atomic_t | ||
32 | * @fail_fn: function to call if the original value was not 1 | ||
33 | * | ||
34 | * Change the count from 1 to a value lower than 1, and call <fail_fn> if | ||
35 | * it wasn't 1 originally. This function returns 0 if the fastpath succeeds, | ||
36 | * or anything the slow path function returns. | ||
37 | */ | ||
38 | static inline int | ||
39 | __mutex_fastpath_lock_retval(atomic_t *count, int (*fail_fn)(atomic_t *)) | ||
40 | { | ||
41 | if (unlikely(ia64_fetchadd4_acq(count, -1) != 1)) | ||
42 | return fail_fn(count); | ||
43 | return 0; | ||
44 | } | ||
45 | |||
46 | /** | ||
47 | * __mutex_fastpath_unlock - try to promote the count from 0 to 1 | ||
48 | * @count: pointer of type atomic_t | ||
49 | * @fail_fn: function to call if the original value was not 0 | ||
50 | * | ||
51 | * Try to promote the count from 0 to 1. If it wasn't 0, call <fail_fn>. | ||
52 | * In the failure case, this function is allowed to either set the value to | ||
53 | * 1, or to set it to a value lower than 1. | ||
54 | * | ||
55 | * If the implementation sets it to a value of lower than 1, then the | ||
56 | * __mutex_slowpath_needs_to_unlock() macro needs to return 1, it needs | ||
57 | * to return 0 otherwise. | ||
58 | */ | ||
59 | static inline void | ||
60 | __mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *)) | ||
61 | { | ||
62 | int ret = ia64_fetchadd4_rel(count, 1); | ||
63 | if (unlikely(ret < 0)) | ||
64 | fail_fn(count); | ||
65 | } | ||
66 | |||
67 | #define __mutex_slowpath_needs_to_unlock() 1 | ||
68 | |||
69 | /** | ||
70 | * __mutex_fastpath_trylock - try to acquire the mutex, without waiting | ||
71 | * | ||
72 | * @count: pointer of type atomic_t | ||
73 | * @fail_fn: fallback function | ||
74 | * | ||
75 | * Change the count from 1 to a value lower than 1, and return 0 (failure) | ||
76 | * if it wasn't 1 originally, or return 1 (success) otherwise. This function | ||
77 | * MUST leave the value lower than 1 even when the "1" assertion wasn't true. | ||
78 | * Additionally, if the value was < 0 originally, this function must not leave | ||
79 | * it to 0 on failure. | ||
80 | * | ||
81 | * If the architecture has no effective trylock variant, it should call the | ||
82 | * <fail_fn> spinlock-based trylock variant unconditionally. | ||
7 | */ | 83 | */ |
84 | static inline int | ||
85 | __mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *)) | ||
86 | { | ||
87 | if (likely(cmpxchg_acq(count, 1, 0)) == 1) | ||
88 | return 1; | ||
89 | return 0; | ||
90 | } | ||
8 | 91 | ||
9 | #include <asm-generic/mutex-dec.h> | 92 | #endif |
diff --git a/include/asm-ia64/page.h b/include/asm-ia64/page.h index 5e6362a786b7..3ab27333dae4 100644 --- a/include/asm-ia64/page.h +++ b/include/asm-ia64/page.h | |||
@@ -57,6 +57,8 @@ | |||
57 | 57 | ||
58 | # define HAVE_ARCH_HUGETLB_UNMAPPED_AREA | 58 | # define HAVE_ARCH_HUGETLB_UNMAPPED_AREA |
59 | # define ARCH_HAS_HUGEPAGE_ONLY_RANGE | 59 | # define ARCH_HAS_HUGEPAGE_ONLY_RANGE |
60 | # define ARCH_HAS_PREPARE_HUGEPAGE_RANGE | ||
61 | # define ARCH_HAS_HUGETLB_FREE_PGD_RANGE | ||
60 | #endif /* CONFIG_HUGETLB_PAGE */ | 62 | #endif /* CONFIG_HUGETLB_PAGE */ |
61 | 63 | ||
62 | #ifdef __ASSEMBLY__ | 64 | #ifdef __ASSEMBLY__ |
diff --git a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h index e2560c58384b..c0f8144f2349 100644 --- a/include/asm-ia64/pgtable.h +++ b/include/asm-ia64/pgtable.h | |||
@@ -314,7 +314,7 @@ ia64_phys_addr_valid (unsigned long addr) | |||
314 | #define pte_mkyoung(pte) (__pte(pte_val(pte) | _PAGE_A)) | 314 | #define pte_mkyoung(pte) (__pte(pte_val(pte) | _PAGE_A)) |
315 | #define pte_mkclean(pte) (__pte(pte_val(pte) & ~_PAGE_D)) | 315 | #define pte_mkclean(pte) (__pte(pte_val(pte) & ~_PAGE_D)) |
316 | #define pte_mkdirty(pte) (__pte(pte_val(pte) | _PAGE_D)) | 316 | #define pte_mkdirty(pte) (__pte(pte_val(pte) | _PAGE_D)) |
317 | #define pte_mkhuge(pte) (__pte(pte_val(pte) | _PAGE_P)) | 317 | #define pte_mkhuge(pte) (__pte(pte_val(pte))) |
318 | 318 | ||
319 | /* | 319 | /* |
320 | * Macro to a page protection value as "uncacheable". Note that "protection" is really a | 320 | * Macro to a page protection value as "uncacheable". Note that "protection" is really a |
@@ -505,9 +505,6 @@ extern struct page *zero_page_memmap_ptr; | |||
505 | #define HUGETLB_PGDIR_SHIFT (HPAGE_SHIFT + 2*(PAGE_SHIFT-3)) | 505 | #define HUGETLB_PGDIR_SHIFT (HPAGE_SHIFT + 2*(PAGE_SHIFT-3)) |
506 | #define HUGETLB_PGDIR_SIZE (__IA64_UL(1) << HUGETLB_PGDIR_SHIFT) | 506 | #define HUGETLB_PGDIR_SIZE (__IA64_UL(1) << HUGETLB_PGDIR_SHIFT) |
507 | #define HUGETLB_PGDIR_MASK (~(HUGETLB_PGDIR_SIZE-1)) | 507 | #define HUGETLB_PGDIR_MASK (~(HUGETLB_PGDIR_SIZE-1)) |
508 | struct mmu_gather; | ||
509 | void hugetlb_free_pgd_range(struct mmu_gather **tlb, unsigned long addr, | ||
510 | unsigned long end, unsigned long floor, unsigned long ceiling); | ||
511 | #endif | 508 | #endif |
512 | 509 | ||
513 | /* | 510 | /* |
diff --git a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h index 23c8e1be1911..128fefd8056f 100644 --- a/include/asm-ia64/processor.h +++ b/include/asm-ia64/processor.h | |||
@@ -50,7 +50,8 @@ | |||
50 | #define IA64_THREAD_PM_VALID (__IA64_UL(1) << 2) /* performance registers valid? */ | 50 | #define IA64_THREAD_PM_VALID (__IA64_UL(1) << 2) /* performance registers valid? */ |
51 | #define IA64_THREAD_UAC_NOPRINT (__IA64_UL(1) << 3) /* don't log unaligned accesses */ | 51 | #define IA64_THREAD_UAC_NOPRINT (__IA64_UL(1) << 3) /* don't log unaligned accesses */ |
52 | #define IA64_THREAD_UAC_SIGBUS (__IA64_UL(1) << 4) /* generate SIGBUS on unaligned acc. */ | 52 | #define IA64_THREAD_UAC_SIGBUS (__IA64_UL(1) << 4) /* generate SIGBUS on unaligned acc. */ |
53 | /* bit 5 is currently unused */ | 53 | #define IA64_THREAD_MIGRATION (__IA64_UL(1) << 5) /* require migration |
54 | sync at ctx sw */ | ||
54 | #define IA64_THREAD_FPEMU_NOPRINT (__IA64_UL(1) << 6) /* don't log any fpswa faults */ | 55 | #define IA64_THREAD_FPEMU_NOPRINT (__IA64_UL(1) << 6) /* don't log any fpswa faults */ |
55 | #define IA64_THREAD_FPEMU_SIGFPE (__IA64_UL(1) << 7) /* send a SIGFPE for fpswa faults */ | 56 | #define IA64_THREAD_FPEMU_SIGFPE (__IA64_UL(1) << 7) /* send a SIGFPE for fpswa faults */ |
56 | 57 | ||
diff --git a/include/asm-ia64/signal.h b/include/asm-ia64/signal.h index 608168d713d3..5e328ed5d01d 100644 --- a/include/asm-ia64/signal.h +++ b/include/asm-ia64/signal.h | |||
@@ -158,8 +158,6 @@ struct k_sigaction { | |||
158 | 158 | ||
159 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) | 159 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) |
160 | 160 | ||
161 | void set_sigdelayed(pid_t pid, int signo, int code, void __user *addr); | ||
162 | |||
163 | #endif /* __KERNEL__ */ | 161 | #endif /* __KERNEL__ */ |
164 | 162 | ||
165 | # endif /* !__ASSEMBLY__ */ | 163 | # endif /* !__ASSEMBLY__ */ |
diff --git a/include/asm-ia64/sn/addrs.h b/include/asm-ia64/sn/addrs.h index 2c32e4b77b54..1d9efe541662 100644 --- a/include/asm-ia64/sn/addrs.h +++ b/include/asm-ia64/sn/addrs.h | |||
@@ -283,5 +283,13 @@ | |||
283 | #define REMOTE_HUB_L(n, a) HUB_L(REMOTE_HUB_ADDR((n), (a))) | 283 | #define REMOTE_HUB_L(n, a) HUB_L(REMOTE_HUB_ADDR((n), (a))) |
284 | #define REMOTE_HUB_S(n, a, d) HUB_S(REMOTE_HUB_ADDR((n), (a)), (d)) | 284 | #define REMOTE_HUB_S(n, a, d) HUB_S(REMOTE_HUB_ADDR((n), (a)), (d)) |
285 | 285 | ||
286 | /* | ||
287 | * Coretalk address breakdown | ||
288 | */ | ||
289 | #define CTALK_NASID_SHFT 40 | ||
290 | #define CTALK_NASID_MASK (0x3FFFULL << CTALK_NASID_SHFT) | ||
291 | #define CTALK_CID_SHFT 38 | ||
292 | #define CTALK_CID_MASK (0x3ULL << CTALK_CID_SHFT) | ||
293 | #define CTALK_NODE_OFFSET 0x3FFFFFFFFF | ||
286 | 294 | ||
287 | #endif /* _ASM_IA64_SN_ADDRS_H */ | 295 | #endif /* _ASM_IA64_SN_ADDRS_H */ |
diff --git a/include/asm-ia64/sn/rw_mmr.h b/include/asm-ia64/sn/rw_mmr.h index f40fd1a5510d..2d78f4c5a45e 100644 --- a/include/asm-ia64/sn/rw_mmr.h +++ b/include/asm-ia64/sn/rw_mmr.h | |||
@@ -3,15 +3,14 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2002-2004 Silicon Graphics, Inc. All Rights Reserved. | 6 | * Copyright (C) 2002-2006 Silicon Graphics, Inc. All Rights Reserved. |
7 | */ | 7 | */ |
8 | #ifndef _ASM_IA64_SN_RW_MMR_H | 8 | #ifndef _ASM_IA64_SN_RW_MMR_H |
9 | #define _ASM_IA64_SN_RW_MMR_H | 9 | #define _ASM_IA64_SN_RW_MMR_H |
10 | 10 | ||
11 | 11 | ||
12 | /* | 12 | /* |
13 | * This file contains macros used to access MMR registers via | 13 | * This file that access MMRs via uncached physical addresses. |
14 | * uncached physical addresses. | ||
15 | * pio_phys_read_mmr - read an MMR | 14 | * pio_phys_read_mmr - read an MMR |
16 | * pio_phys_write_mmr - write an MMR | 15 | * pio_phys_write_mmr - write an MMR |
17 | * pio_atomic_phys_write_mmrs - atomically write 1 or 2 MMRs with psr.ic=0 | 16 | * pio_atomic_phys_write_mmrs - atomically write 1 or 2 MMRs with psr.ic=0 |
@@ -22,53 +21,8 @@ | |||
22 | */ | 21 | */ |
23 | 22 | ||
24 | 23 | ||
25 | extern inline long | 24 | extern long pio_phys_read_mmr(volatile long *mmr); |
26 | pio_phys_read_mmr(volatile long *mmr) | 25 | extern void pio_phys_write_mmr(volatile long *mmr, long val); |
27 | { | 26 | extern void pio_atomic_phys_write_mmrs(volatile long *mmr1, long val1, volatile long *mmr2, long val2); |
28 | long val; | ||
29 | asm volatile | ||
30 | ("mov r2=psr;;" | ||
31 | "rsm psr.i | psr.dt;;" | ||
32 | "srlz.i;;" | ||
33 | "ld8.acq %0=[%1];;" | ||
34 | "mov psr.l=r2;;" | ||
35 | "srlz.i;;" | ||
36 | : "=r"(val) | ||
37 | : "r"(mmr) | ||
38 | : "r2"); | ||
39 | return val; | ||
40 | } | ||
41 | |||
42 | |||
43 | |||
44 | extern inline void | ||
45 | pio_phys_write_mmr(volatile long *mmr, long val) | ||
46 | { | ||
47 | asm volatile | ||
48 | ("mov r2=psr;;" | ||
49 | "rsm psr.i | psr.dt;;" | ||
50 | "srlz.i;;" | ||
51 | "st8.rel [%0]=%1;;" | ||
52 | "mov psr.l=r2;;" | ||
53 | "srlz.i;;" | ||
54 | :: "r"(mmr), "r"(val) | ||
55 | : "r2", "memory"); | ||
56 | } | ||
57 | |||
58 | extern inline void | ||
59 | pio_atomic_phys_write_mmrs(volatile long *mmr1, long val1, volatile long *mmr2, long val2) | ||
60 | { | ||
61 | asm volatile | ||
62 | ("mov r2=psr;;" | ||
63 | "rsm psr.i | psr.dt | psr.ic;;" | ||
64 | "cmp.ne p9,p0=%2,r0;" | ||
65 | "srlz.i;;" | ||
66 | "st8.rel [%0]=%1;" | ||
67 | "(p9) st8.rel [%2]=%3;;" | ||
68 | "mov psr.l=r2;;" | ||
69 | "srlz.i;;" | ||
70 | :: "r"(mmr1), "r"(val1), "r"(mmr2), "r"(val2) | ||
71 | : "p9", "r2", "memory"); | ||
72 | } | ||
73 | 27 | ||
74 | #endif /* _ASM_IA64_SN_RW_MMR_H */ | 28 | #endif /* _ASM_IA64_SN_RW_MMR_H */ |
diff --git a/include/asm-ia64/sn/tioce.h b/include/asm-ia64/sn/tioce.h index d4c990712eac..893468e1b41b 100644 --- a/include/asm-ia64/sn/tioce.h +++ b/include/asm-ia64/sn/tioce.h | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | /* CE ASIC part & mfgr information */ | 12 | /* CE ASIC part & mfgr information */ |
13 | #define TIOCE_PART_NUM 0xCE00 | 13 | #define TIOCE_PART_NUM 0xCE00 |
14 | #define TIOCE_MFGR_NUM 0x36 | 14 | #define TIOCE_SRC_ID 0x01 |
15 | #define TIOCE_REV_A 0x1 | 15 | #define TIOCE_REV_A 0x1 |
16 | 16 | ||
17 | /* CE Virtual PPB Vendor/Device IDs */ | 17 | /* CE Virtual PPB Vendor/Device IDs */ |
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | /* CE Host Bridge Vendor/Device IDs */ | 21 | /* CE Host Bridge Vendor/Device IDs */ |
22 | #define CE_HOST_BRIDGE_VENDOR_ID 0x10a9 | 22 | #define CE_HOST_BRIDGE_VENDOR_ID 0x10a9 |
23 | #define CE_HOST_BRIDGE_DEVICE_ID 0x4003 | 23 | #define CE_HOST_BRIDGE_DEVICE_ID 0x4001 |
24 | 24 | ||
25 | 25 | ||
26 | #define TIOCE_NUM_M40_ATES 4096 | 26 | #define TIOCE_NUM_M40_ATES 4096 |
@@ -463,6 +463,25 @@ typedef volatile struct tioce { | |||
463 | u64 ce_end_of_struct; /* 0x044400 */ | 463 | u64 ce_end_of_struct; /* 0x044400 */ |
464 | } tioce_t; | 464 | } tioce_t; |
465 | 465 | ||
466 | /* ce_lsiX_gb_cfg1 register bit masks & shifts */ | ||
467 | #define CE_LSI_GB_CFG1_RXL0S_THS_SHFT 0 | ||
468 | #define CE_LSI_GB_CFG1_RXL0S_THS_MASK (0xffULL << 0) | ||
469 | #define CE_LSI_GB_CFG1_RXL0S_SMP_SHFT 8 | ||
470 | #define CE_LSI_GB_CFG1_RXL0S_SMP_MASK (0xfULL << 8); | ||
471 | #define CE_LSI_GB_CFG1_RXL0S_ADJ_SHFT 12 | ||
472 | #define CE_LSI_GB_CFG1_RXL0S_ADJ_MASK (0x7ULL << 12) | ||
473 | #define CE_LSI_GB_CFG1_RXL0S_FLT_SHFT 15 | ||
474 | #define CE_LSI_GB_CFG1_RXL0S_FLT_MASK (0x1ULL << 15) | ||
475 | #define CE_LSI_GB_CFG1_LPBK_SEL_SHFT 16 | ||
476 | #define CE_LSI_GB_CFG1_LPBK_SEL_MASK (0x3ULL << 16) | ||
477 | #define CE_LSI_GB_CFG1_LPBK_EN_SHFT 18 | ||
478 | #define CE_LSI_GB_CFG1_LPBK_EN_MASK (0x1ULL << 18) | ||
479 | #define CE_LSI_GB_CFG1_RVRS_LB_SHFT 19 | ||
480 | #define CE_LSI_GB_CFG1_RVRS_LB_MASK (0x1ULL << 19) | ||
481 | #define CE_LSI_GB_CFG1_RVRS_CLK_SHFT 20 | ||
482 | #define CE_LSI_GB_CFG1_RVRS_CLK_MASK (0x3ULL << 20) | ||
483 | #define CE_LSI_GB_CFG1_SLF_TS_SHFT 24 | ||
484 | #define CE_LSI_GB_CFG1_SLF_TS_MASK (0xfULL << 24) | ||
466 | 485 | ||
467 | /* ce_adm_int_mask/ce_adm_int_status register bit defines */ | 486 | /* ce_adm_int_mask/ce_adm_int_status register bit defines */ |
468 | #define CE_ADM_INT_CE_ERROR_SHFT 0 | 487 | #define CE_ADM_INT_CE_ERROR_SHFT 0 |
@@ -592,6 +611,11 @@ typedef volatile struct tioce { | |||
592 | #define CE_URE_RD_MRG_ENABLE (0x1ULL << 0) | 611 | #define CE_URE_RD_MRG_ENABLE (0x1ULL << 0) |
593 | #define CE_URE_WRT_MRG_ENABLE1 (0x1ULL << 4) | 612 | #define CE_URE_WRT_MRG_ENABLE1 (0x1ULL << 4) |
594 | #define CE_URE_WRT_MRG_ENABLE2 (0x1ULL << 5) | 613 | #define CE_URE_WRT_MRG_ENABLE2 (0x1ULL << 5) |
614 | #define CE_URE_WRT_MRG_TIMER_SHFT 12 | ||
615 | #define CE_URE_WRT_MRG_TIMER_MASK (0x7FFULL << CE_URE_WRT_MRG_TIMER_SHFT) | ||
616 | #define CE_URE_WRT_MRG_TIMER(x) (((u64)(x) << \ | ||
617 | CE_URE_WRT_MRG_TIMER_SHFT) & \ | ||
618 | CE_URE_WRT_MRG_TIMER_MASK) | ||
595 | #define CE_URE_RSPQ_BYPASS_DISABLE (0x1ULL << 24) | 619 | #define CE_URE_RSPQ_BYPASS_DISABLE (0x1ULL << 24) |
596 | #define CE_URE_UPS_DAT1_PAR_DISABLE (0x1ULL << 32) | 620 | #define CE_URE_UPS_DAT1_PAR_DISABLE (0x1ULL << 32) |
597 | #define CE_URE_UPS_HDR1_PAR_DISABLE (0x1ULL << 33) | 621 | #define CE_URE_UPS_HDR1_PAR_DISABLE (0x1ULL << 33) |
@@ -653,8 +677,12 @@ typedef volatile struct tioce { | |||
653 | #define CE_URE_SI (0x1ULL << 0) | 677 | #define CE_URE_SI (0x1ULL << 0) |
654 | #define CE_URE_ELAL_SHFT 4 | 678 | #define CE_URE_ELAL_SHFT 4 |
655 | #define CE_URE_ELAL_MASK (0x7ULL << CE_URE_ELAL_SHFT) | 679 | #define CE_URE_ELAL_MASK (0x7ULL << CE_URE_ELAL_SHFT) |
680 | #define CE_URE_ELAL_SET(n) (((u64)(n) << CE_URE_ELAL_SHFT) & \ | ||
681 | CE_URE_ELAL_MASK) | ||
656 | #define CE_URE_ELAL1_SHFT 8 | 682 | #define CE_URE_ELAL1_SHFT 8 |
657 | #define CE_URE_ELAL1_MASK (0x7ULL << CE_URE_ELAL1_SHFT) | 683 | #define CE_URE_ELAL1_MASK (0x7ULL << CE_URE_ELAL1_SHFT) |
684 | #define CE_URE_ELAL1_SET(n) (((u64)(n) << CE_URE_ELAL1_SHFT) & \ | ||
685 | CE_URE_ELAL1_MASK) | ||
658 | #define CE_URE_SCC (0x1ULL << 12) | 686 | #define CE_URE_SCC (0x1ULL << 12) |
659 | #define CE_URE_PN1_SHFT 16 | 687 | #define CE_URE_PN1_SHFT 16 |
660 | #define CE_URE_PN1_MASK (0xFFULL << CE_URE_PN1_SHFT) | 688 | #define CE_URE_PN1_MASK (0xFFULL << CE_URE_PN1_SHFT) |
@@ -675,8 +703,12 @@ typedef volatile struct tioce { | |||
675 | #define CE_URE_HPC (0x1ULL << 6) | 703 | #define CE_URE_HPC (0x1ULL << 6) |
676 | #define CE_URE_SPLV_SHFT 7 | 704 | #define CE_URE_SPLV_SHFT 7 |
677 | #define CE_URE_SPLV_MASK (0xFFULL << CE_URE_SPLV_SHFT) | 705 | #define CE_URE_SPLV_MASK (0xFFULL << CE_URE_SPLV_SHFT) |
706 | #define CE_URE_SPLV_SET(n) (((u64)(n) << CE_URE_SPLV_SHFT) & \ | ||
707 | CE_URE_SPLV_MASK) | ||
678 | #define CE_URE_SPLS_SHFT 15 | 708 | #define CE_URE_SPLS_SHFT 15 |
679 | #define CE_URE_SPLS_MASK (0x3ULL << CE_URE_SPLS_SHFT) | 709 | #define CE_URE_SPLS_MASK (0x3ULL << CE_URE_SPLS_SHFT) |
710 | #define CE_URE_SPLS_SET(n) (((u64)(n) << CE_URE_SPLS_SHFT) & \ | ||
711 | CE_URE_SPLS_MASK) | ||
680 | #define CE_URE_PSN1_SHFT 19 | 712 | #define CE_URE_PSN1_SHFT 19 |
681 | #define CE_URE_PSN1_MASK (0x1FFFULL << CE_URE_PSN1_SHFT) | 713 | #define CE_URE_PSN1_MASK (0x1FFFULL << CE_URE_PSN1_SHFT) |
682 | #define CE_URE_PSN2_SHFT 32 | 714 | #define CE_URE_PSN2_SHFT 32 |
diff --git a/include/asm-ia64/sn/xpc.h b/include/asm-ia64/sn/xpc.h index df7f5f4f3cde..aa3b8ace9030 100644 --- a/include/asm-ia64/sn/xpc.h +++ b/include/asm-ia64/sn/xpc.h | |||
@@ -1227,28 +1227,6 @@ xpc_map_bte_errors(bte_result_t error) | |||
1227 | 1227 | ||
1228 | 1228 | ||
1229 | 1229 | ||
1230 | static inline void * | ||
1231 | xpc_kmalloc_cacheline_aligned(size_t size, gfp_t flags, void **base) | ||
1232 | { | ||
1233 | /* see if kmalloc will give us cachline aligned memory by default */ | ||
1234 | *base = kmalloc(size, flags); | ||
1235 | if (*base == NULL) { | ||
1236 | return NULL; | ||
1237 | } | ||
1238 | if ((u64) *base == L1_CACHE_ALIGN((u64) *base)) { | ||
1239 | return *base; | ||
1240 | } | ||
1241 | kfree(*base); | ||
1242 | |||
1243 | /* nope, we'll have to do it ourselves */ | ||
1244 | *base = kmalloc(size + L1_CACHE_BYTES, flags); | ||
1245 | if (*base == NULL) { | ||
1246 | return NULL; | ||
1247 | } | ||
1248 | return (void *) L1_CACHE_ALIGN((u64) *base); | ||
1249 | } | ||
1250 | |||
1251 | |||
1252 | /* | 1230 | /* |
1253 | * Check to see if there is any channel activity to/from the specified | 1231 | * Check to see if there is any channel activity to/from the specified |
1254 | * partition. | 1232 | * partition. |
diff --git a/include/asm-ia64/system.h b/include/asm-ia64/system.h index 062538715623..cd4233d66f15 100644 --- a/include/asm-ia64/system.h +++ b/include/asm-ia64/system.h | |||
@@ -244,6 +244,13 @@ extern void ia64_load_extra (struct task_struct *task); | |||
244 | __ia64_save_fpu((prev)->thread.fph); \ | 244 | __ia64_save_fpu((prev)->thread.fph); \ |
245 | } \ | 245 | } \ |
246 | __switch_to(prev, next, last); \ | 246 | __switch_to(prev, next, last); \ |
247 | /* "next" in old context is "current" in new context */ \ | ||
248 | if (unlikely((current->thread.flags & IA64_THREAD_MIGRATION) && \ | ||
249 | (task_cpu(current) != \ | ||
250 | task_thread_info(current)->last_cpu))) { \ | ||
251 | platform_migrate(current); \ | ||
252 | task_thread_info(current)->last_cpu = task_cpu(current); \ | ||
253 | } \ | ||
247 | } while (0) | 254 | } while (0) |
248 | #else | 255 | #else |
249 | # define switch_to(prev,next,last) __switch_to(prev, next, last) | 256 | # define switch_to(prev,next,last) __switch_to(prev, next, last) |
diff --git a/include/asm-ia64/thread_info.h b/include/asm-ia64/thread_info.h index 1d6518fe1f02..56394a2c7055 100644 --- a/include/asm-ia64/thread_info.h +++ b/include/asm-ia64/thread_info.h | |||
@@ -26,16 +26,10 @@ struct thread_info { | |||
26 | struct exec_domain *exec_domain;/* execution domain */ | 26 | struct exec_domain *exec_domain;/* execution domain */ |
27 | __u32 flags; /* thread_info flags (see TIF_*) */ | 27 | __u32 flags; /* thread_info flags (see TIF_*) */ |
28 | __u32 cpu; /* current CPU */ | 28 | __u32 cpu; /* current CPU */ |
29 | __u32 last_cpu; /* Last CPU thread ran on */ | ||
29 | mm_segment_t addr_limit; /* user-level address space limit */ | 30 | mm_segment_t addr_limit; /* user-level address space limit */ |
30 | int preempt_count; /* 0=premptable, <0=BUG; will also serve as bh-counter */ | 31 | int preempt_count; /* 0=premptable, <0=BUG; will also serve as bh-counter */ |
31 | struct restart_block restart_block; | 32 | struct restart_block restart_block; |
32 | struct { | ||
33 | int signo; | ||
34 | int code; | ||
35 | void __user *addr; | ||
36 | unsigned long start_time; | ||
37 | pid_t pid; | ||
38 | } sigdelayed; /* Saved information for TIF_SIGDELAYED */ | ||
39 | }; | 33 | }; |
40 | 34 | ||
41 | #define THREAD_SIZE KERNEL_STACK_SIZE | 35 | #define THREAD_SIZE KERNEL_STACK_SIZE |
@@ -89,7 +83,6 @@ struct thread_info { | |||
89 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ | 83 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
90 | #define TIF_SYSCALL_TRACE 3 /* syscall trace active */ | 84 | #define TIF_SYSCALL_TRACE 3 /* syscall trace active */ |
91 | #define TIF_SYSCALL_AUDIT 4 /* syscall auditing active */ | 85 | #define TIF_SYSCALL_AUDIT 4 /* syscall auditing active */ |
92 | #define TIF_SIGDELAYED 5 /* signal delayed from MCA/INIT/NMI/PMI context */ | ||
93 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 86 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
94 | #define TIF_MEMDIE 17 | 87 | #define TIF_MEMDIE 17 |
95 | #define TIF_MCA_INIT 18 /* this task is processing MCA or INIT */ | 88 | #define TIF_MCA_INIT 18 /* this task is processing MCA or INIT */ |
@@ -101,13 +94,12 @@ struct thread_info { | |||
101 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | 94 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) |
102 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 95 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
103 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 96 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
104 | #define _TIF_SIGDELAYED (1 << TIF_SIGDELAYED) | ||
105 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | 97 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) |
106 | #define _TIF_MCA_INIT (1 << TIF_MCA_INIT) | 98 | #define _TIF_MCA_INIT (1 << TIF_MCA_INIT) |
107 | #define _TIF_DB_DISABLED (1 << TIF_DB_DISABLED) | 99 | #define _TIF_DB_DISABLED (1 << TIF_DB_DISABLED) |
108 | 100 | ||
109 | /* "work to do on user-return" bits */ | 101 | /* "work to do on user-return" bits */ |
110 | #define TIF_ALLWORK_MASK (_TIF_NOTIFY_RESUME|_TIF_SIGPENDING|_TIF_NEED_RESCHED|_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SIGDELAYED) | 102 | #define TIF_ALLWORK_MASK (_TIF_NOTIFY_RESUME|_TIF_SIGPENDING|_TIF_NEED_RESCHED|_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT) |
111 | /* like TIF_ALLWORK_BITS but sans TIF_SYSCALL_TRACE or TIF_SYSCALL_AUDIT */ | 103 | /* like TIF_ALLWORK_BITS but sans TIF_SYSCALL_TRACE or TIF_SYSCALL_AUDIT */ |
112 | #define TIF_WORK_MASK (TIF_ALLWORK_MASK&~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)) | 104 | #define TIF_WORK_MASK (TIF_ALLWORK_MASK&~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)) |
113 | 105 | ||
diff --git a/include/asm-mips/termbits.h b/include/asm-mips/termbits.h index c29c65b7818e..fa6d04dac56b 100644 --- a/include/asm-mips/termbits.h +++ b/include/asm-mips/termbits.h | |||
@@ -77,7 +77,7 @@ struct termios { | |||
77 | #define IXANY 0004000 /* Any character will restart after stop. */ | 77 | #define IXANY 0004000 /* Any character will restart after stop. */ |
78 | #define IXOFF 0010000 /* Enable start/stop input control. */ | 78 | #define IXOFF 0010000 /* Enable start/stop input control. */ |
79 | #define IMAXBEL 0020000 /* Ring bell when input queue is full. */ | 79 | #define IMAXBEL 0020000 /* Ring bell when input queue is full. */ |
80 | #define IUTF8 0040000 /* Input is UTF8 */ | 80 | #define IUTF8 0040000 /* Input is UTF-8 */ |
81 | 81 | ||
82 | /* c_oflag bits */ | 82 | /* c_oflag bits */ |
83 | #define OPOST 0000001 /* Perform output processing. */ | 83 | #define OPOST 0000001 /* Perform output processing. */ |
diff --git a/include/asm-powerpc/pgtable.h b/include/asm-powerpc/pgtable.h index e38931379a72..185ee15963a1 100644 --- a/include/asm-powerpc/pgtable.h +++ b/include/asm-powerpc/pgtable.h | |||
@@ -468,11 +468,6 @@ extern pgd_t swapper_pg_dir[]; | |||
468 | 468 | ||
469 | extern void paging_init(void); | 469 | extern void paging_init(void); |
470 | 470 | ||
471 | #ifdef CONFIG_HUGETLB_PAGE | ||
472 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) \ | ||
473 | free_pgd_range(tlb, addr, end, floor, ceiling) | ||
474 | #endif | ||
475 | |||
476 | /* | 471 | /* |
477 | * This gets called at the end of handling a page fault, when | 472 | * This gets called at the end of handling a page fault, when |
478 | * the kernel has put a new PTE into the page table for the process. | 473 | * the kernel has put a new PTE into the page table for the process. |
diff --git a/include/asm-s390/pgalloc.h b/include/asm-s390/pgalloc.h index 3417dd71ab43..e28aaf28e4a8 100644 --- a/include/asm-s390/pgalloc.h +++ b/include/asm-s390/pgalloc.h | |||
@@ -158,11 +158,4 @@ static inline void pte_free(struct page *pte) | |||
158 | 158 | ||
159 | #define __pte_free_tlb(tlb,pte) tlb_remove_page(tlb,pte) | 159 | #define __pte_free_tlb(tlb,pte) tlb_remove_page(tlb,pte) |
160 | 160 | ||
161 | /* | ||
162 | * This establishes kernel virtual mappings (e.g., as a result of a | ||
163 | * vmalloc call). Since s390-esame uses a separate kernel page table, | ||
164 | * there is nothing to do here... :) | ||
165 | */ | ||
166 | #define set_pgdir(addr,entry) do { } while(0) | ||
167 | |||
168 | #endif /* _S390_PGALLOC_H */ | 161 | #endif /* _S390_PGALLOC_H */ |
diff --git a/include/asm-sh64/pgalloc.h b/include/asm-sh64/pgalloc.h index 678251ac1db8..b29dd468817e 100644 --- a/include/asm-sh64/pgalloc.h +++ b/include/asm-sh64/pgalloc.h | |||
@@ -167,22 +167,6 @@ static __inline__ void pmd_free(pmd_t *pmd) | |||
167 | 167 | ||
168 | extern int do_check_pgt_cache(int, int); | 168 | extern int do_check_pgt_cache(int, int); |
169 | 169 | ||
170 | static inline void set_pgdir(unsigned long address, pgd_t entry) | ||
171 | { | ||
172 | struct task_struct * p; | ||
173 | pgd_t *pgd; | ||
174 | |||
175 | read_lock(&tasklist_lock); | ||
176 | for_each_process(p) { | ||
177 | if (!p->mm) | ||
178 | continue; | ||
179 | *pgd_offset(p->mm,address) = entry; | ||
180 | } | ||
181 | read_unlock(&tasklist_lock); | ||
182 | for (pgd = (pgd_t *)pgd_quicklist; pgd; pgd = (pgd_t *)*(unsigned long *)pgd) | ||
183 | pgd[address >> PGDIR_SHIFT] = entry; | ||
184 | } | ||
185 | |||
186 | #define pmd_populate_kernel(mm, pmd, pte) \ | 170 | #define pmd_populate_kernel(mm, pmd, pte) \ |
187 | set_pmd(pmd, __pmd(_PAGE_TABLE + (unsigned long) (pte))) | 171 | set_pmd(pmd, __pmd(_PAGE_TABLE + (unsigned long) (pte))) |
188 | 172 | ||
diff --git a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h index b33c35411e82..9eea8f4d41f0 100644 --- a/include/asm-sparc/pgtable.h +++ b/include/asm-sparc/pgtable.h | |||
@@ -269,11 +269,14 @@ BTFIXUPDEF_CALL_CONST(pte_t, mk_pte, struct page *, pgprot_t) | |||
269 | 269 | ||
270 | BTFIXUPDEF_CALL_CONST(pte_t, mk_pte_phys, unsigned long, pgprot_t) | 270 | BTFIXUPDEF_CALL_CONST(pte_t, mk_pte_phys, unsigned long, pgprot_t) |
271 | BTFIXUPDEF_CALL_CONST(pte_t, mk_pte_io, unsigned long, pgprot_t, int) | 271 | BTFIXUPDEF_CALL_CONST(pte_t, mk_pte_io, unsigned long, pgprot_t, int) |
272 | BTFIXUPDEF_CALL_CONST(pgprot_t, pgprot_noncached, pgprot_t) | ||
272 | 273 | ||
273 | #define mk_pte(page,pgprot) BTFIXUP_CALL(mk_pte)(page,pgprot) | 274 | #define mk_pte(page,pgprot) BTFIXUP_CALL(mk_pte)(page,pgprot) |
274 | #define mk_pte_phys(page,pgprot) BTFIXUP_CALL(mk_pte_phys)(page,pgprot) | 275 | #define mk_pte_phys(page,pgprot) BTFIXUP_CALL(mk_pte_phys)(page,pgprot) |
275 | #define mk_pte_io(page,pgprot,space) BTFIXUP_CALL(mk_pte_io)(page,pgprot,space) | 276 | #define mk_pte_io(page,pgprot,space) BTFIXUP_CALL(mk_pte_io)(page,pgprot,space) |
276 | 277 | ||
278 | #define pgprot_noncached(pgprot) BTFIXUP_CALL(pgprot_noncached)(pgprot) | ||
279 | |||
277 | BTFIXUPDEF_INT(pte_modify_mask) | 280 | BTFIXUPDEF_INT(pte_modify_mask) |
278 | 281 | ||
279 | static pte_t pte_modify(pte_t pte, pgprot_t newprot) __attribute_const__; | 282 | static pte_t pte_modify(pte_t pte, pgprot_t newprot) __attribute_const__; |
@@ -309,9 +312,6 @@ BTFIXUPDEF_CALL(pte_t *, pte_offset_kernel, pmd_t *, unsigned long) | |||
309 | #define pte_unmap(pte) do{}while(0) | 312 | #define pte_unmap(pte) do{}while(0) |
310 | #define pte_unmap_nested(pte) do{}while(0) | 313 | #define pte_unmap_nested(pte) do{}while(0) |
311 | 314 | ||
312 | /* The permissions for pgprot_val to make a page mapped on the obio space */ | ||
313 | extern unsigned int pg_iobits; | ||
314 | |||
315 | /* Certain architectures need to do special things when pte's | 315 | /* Certain architectures need to do special things when pte's |
316 | * within a page table are directly modified. Thus, the following | 316 | * within a page table are directly modified. Thus, the following |
317 | * hook is made available. | 317 | * hook is made available. |
diff --git a/include/asm-sparc64/cpudata.h b/include/asm-sparc64/cpudata.h index c66a81bbc84d..9d6a6dbaf126 100644 --- a/include/asm-sparc64/cpudata.h +++ b/include/asm-sparc64/cpudata.h | |||
@@ -71,7 +71,8 @@ struct trap_per_cpu { | |||
71 | /* Dcache line 7: Physical addresses of CPU send mondo block and CPU list. */ | 71 | /* Dcache line 7: Physical addresses of CPU send mondo block and CPU list. */ |
72 | unsigned long cpu_mondo_block_pa; | 72 | unsigned long cpu_mondo_block_pa; |
73 | unsigned long cpu_list_pa; | 73 | unsigned long cpu_list_pa; |
74 | unsigned long __pad1[2]; | 74 | unsigned long tsb_huge; |
75 | unsigned long tsb_huge_temp; | ||
75 | 76 | ||
76 | /* Dcache line 8: Unused, needed to keep trap_block a power-of-2 in size. */ | 77 | /* Dcache line 8: Unused, needed to keep trap_block a power-of-2 in size. */ |
77 | unsigned long __pad2[4]; | 78 | unsigned long __pad2[4]; |
@@ -116,6 +117,8 @@ extern struct sun4v_2insn_patch_entry __sun4v_2insn_patch, | |||
116 | #define TRAP_PER_CPU_FAULT_INFO 0x40 | 117 | #define TRAP_PER_CPU_FAULT_INFO 0x40 |
117 | #define TRAP_PER_CPU_CPU_MONDO_BLOCK_PA 0xc0 | 118 | #define TRAP_PER_CPU_CPU_MONDO_BLOCK_PA 0xc0 |
118 | #define TRAP_PER_CPU_CPU_LIST_PA 0xc8 | 119 | #define TRAP_PER_CPU_CPU_LIST_PA 0xc8 |
120 | #define TRAP_PER_CPU_TSB_HUGE 0xd0 | ||
121 | #define TRAP_PER_CPU_TSB_HUGE_TEMP 0xd8 | ||
119 | 122 | ||
120 | #define TRAP_BLOCK_SZ_SHIFT 8 | 123 | #define TRAP_BLOCK_SZ_SHIFT 8 |
121 | 124 | ||
diff --git a/include/asm-sparc64/mmu.h b/include/asm-sparc64/mmu.h index 230ba678d3b0..2d4f2ea9568a 100644 --- a/include/asm-sparc64/mmu.h +++ b/include/asm-sparc64/mmu.h | |||
@@ -90,18 +90,39 @@ extern void __tsb_insert(unsigned long ent, unsigned long tag, unsigned long pte | |||
90 | extern void tsb_flush(unsigned long ent, unsigned long tag); | 90 | extern void tsb_flush(unsigned long ent, unsigned long tag); |
91 | extern void tsb_init(struct tsb *tsb, unsigned long size); | 91 | extern void tsb_init(struct tsb *tsb, unsigned long size); |
92 | 92 | ||
93 | typedef struct { | 93 | struct tsb_config { |
94 | spinlock_t lock; | ||
95 | unsigned long sparc64_ctx_val; | ||
96 | struct tsb *tsb; | 94 | struct tsb *tsb; |
97 | unsigned long tsb_rss_limit; | 95 | unsigned long tsb_rss_limit; |
98 | unsigned long tsb_nentries; | 96 | unsigned long tsb_nentries; |
99 | unsigned long tsb_reg_val; | 97 | unsigned long tsb_reg_val; |
100 | unsigned long tsb_map_vaddr; | 98 | unsigned long tsb_map_vaddr; |
101 | unsigned long tsb_map_pte; | 99 | unsigned long tsb_map_pte; |
102 | struct hv_tsb_descr tsb_descr; | 100 | }; |
101 | |||
102 | #define MM_TSB_BASE 0 | ||
103 | |||
104 | #ifdef CONFIG_HUGETLB_PAGE | ||
105 | #define MM_TSB_HUGE 1 | ||
106 | #define MM_NUM_TSBS 2 | ||
107 | #else | ||
108 | #define MM_NUM_TSBS 1 | ||
109 | #endif | ||
110 | |||
111 | typedef struct { | ||
112 | spinlock_t lock; | ||
113 | unsigned long sparc64_ctx_val; | ||
114 | unsigned long huge_pte_count; | ||
115 | struct tsb_config tsb_block[MM_NUM_TSBS]; | ||
116 | struct hv_tsb_descr tsb_descr[MM_NUM_TSBS]; | ||
103 | } mm_context_t; | 117 | } mm_context_t; |
104 | 118 | ||
105 | #endif /* !__ASSEMBLY__ */ | 119 | #endif /* !__ASSEMBLY__ */ |
106 | 120 | ||
121 | #define TSB_CONFIG_TSB 0x00 | ||
122 | #define TSB_CONFIG_RSS_LIMIT 0x08 | ||
123 | #define TSB_CONFIG_NENTRIES 0x10 | ||
124 | #define TSB_CONFIG_REG_VAL 0x18 | ||
125 | #define TSB_CONFIG_MAP_VADDR 0x20 | ||
126 | #define TSB_CONFIG_MAP_PTE 0x28 | ||
127 | |||
107 | #endif /* __MMU_H */ | 128 | #endif /* __MMU_H */ |
diff --git a/include/asm-sparc64/mmu_context.h b/include/asm-sparc64/mmu_context.h index e7974321d052..2337eb487719 100644 --- a/include/asm-sparc64/mmu_context.h +++ b/include/asm-sparc64/mmu_context.h | |||
@@ -29,20 +29,25 @@ extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm); | |||
29 | extern void destroy_context(struct mm_struct *mm); | 29 | extern void destroy_context(struct mm_struct *mm); |
30 | 30 | ||
31 | extern void __tsb_context_switch(unsigned long pgd_pa, | 31 | extern void __tsb_context_switch(unsigned long pgd_pa, |
32 | unsigned long tsb_reg, | 32 | struct tsb_config *tsb_base, |
33 | unsigned long tsb_vaddr, | 33 | struct tsb_config *tsb_huge, |
34 | unsigned long tsb_pte, | ||
35 | unsigned long tsb_descr_pa); | 34 | unsigned long tsb_descr_pa); |
36 | 35 | ||
37 | static inline void tsb_context_switch(struct mm_struct *mm) | 36 | static inline void tsb_context_switch(struct mm_struct *mm) |
38 | { | 37 | { |
39 | __tsb_context_switch(__pa(mm->pgd), mm->context.tsb_reg_val, | 38 | __tsb_context_switch(__pa(mm->pgd), |
40 | mm->context.tsb_map_vaddr, | 39 | &mm->context.tsb_block[0], |
41 | mm->context.tsb_map_pte, | 40 | #ifdef CONFIG_HUGETLB_PAGE |
42 | __pa(&mm->context.tsb_descr)); | 41 | (mm->context.tsb_block[1].tsb ? |
42 | &mm->context.tsb_block[1] : | ||
43 | NULL) | ||
44 | #else | ||
45 | NULL | ||
46 | #endif | ||
47 | , __pa(&mm->context.tsb_descr[0])); | ||
43 | } | 48 | } |
44 | 49 | ||
45 | extern void tsb_grow(struct mm_struct *mm, unsigned long mm_rss); | 50 | extern void tsb_grow(struct mm_struct *mm, unsigned long tsb_index, unsigned long mm_rss); |
46 | #ifdef CONFIG_SMP | 51 | #ifdef CONFIG_SMP |
47 | extern void smp_tsb_sync(struct mm_struct *mm); | 52 | extern void smp_tsb_sync(struct mm_struct *mm); |
48 | #else | 53 | #else |
diff --git a/include/asm-sparc64/page.h b/include/asm-sparc64/page.h index fcb2812265f4..66fe4ac59fd6 100644 --- a/include/asm-sparc64/page.h +++ b/include/asm-sparc64/page.h | |||
@@ -30,6 +30,23 @@ | |||
30 | 30 | ||
31 | #ifdef __KERNEL__ | 31 | #ifdef __KERNEL__ |
32 | 32 | ||
33 | #if defined(CONFIG_HUGETLB_PAGE_SIZE_4MB) | ||
34 | #define HPAGE_SHIFT 22 | ||
35 | #elif defined(CONFIG_HUGETLB_PAGE_SIZE_512K) | ||
36 | #define HPAGE_SHIFT 19 | ||
37 | #elif defined(CONFIG_HUGETLB_PAGE_SIZE_64K) | ||
38 | #define HPAGE_SHIFT 16 | ||
39 | #endif | ||
40 | |||
41 | #ifdef CONFIG_HUGETLB_PAGE | ||
42 | #define HPAGE_SIZE (_AC(1,UL) << HPAGE_SHIFT) | ||
43 | #define HPAGE_MASK (~(HPAGE_SIZE - 1UL)) | ||
44 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) | ||
45 | #define ARCH_HAS_SETCLEAR_HUGE_PTE | ||
46 | #define ARCH_HAS_HUGETLB_PREFAULT_HOOK | ||
47 | #define HAVE_ARCH_HUGETLB_UNMAPPED_AREA | ||
48 | #endif | ||
49 | |||
33 | #ifndef __ASSEMBLY__ | 50 | #ifndef __ASSEMBLY__ |
34 | 51 | ||
35 | extern void _clear_page(void *page); | 52 | extern void _clear_page(void *page); |
@@ -90,23 +107,6 @@ typedef unsigned long pgprot_t; | |||
90 | 107 | ||
91 | #endif /* (STRICT_MM_TYPECHECKS) */ | 108 | #endif /* (STRICT_MM_TYPECHECKS) */ |
92 | 109 | ||
93 | #if defined(CONFIG_HUGETLB_PAGE_SIZE_4MB) | ||
94 | #define HPAGE_SHIFT 22 | ||
95 | #elif defined(CONFIG_HUGETLB_PAGE_SIZE_512K) | ||
96 | #define HPAGE_SHIFT 19 | ||
97 | #elif defined(CONFIG_HUGETLB_PAGE_SIZE_64K) | ||
98 | #define HPAGE_SHIFT 16 | ||
99 | #endif | ||
100 | |||
101 | #ifdef CONFIG_HUGETLB_PAGE | ||
102 | #define HPAGE_SIZE (_AC(1,UL) << HPAGE_SHIFT) | ||
103 | #define HPAGE_MASK (~(HPAGE_SIZE - 1UL)) | ||
104 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) | ||
105 | #define ARCH_HAS_SETCLEAR_HUGE_PTE | ||
106 | #define ARCH_HAS_HUGETLB_PREFAULT_HOOK | ||
107 | #define HAVE_ARCH_HUGETLB_UNMAPPED_AREA | ||
108 | #endif | ||
109 | |||
110 | #define TASK_UNMAPPED_BASE (test_thread_flag(TIF_32BIT) ? \ | 110 | #define TASK_UNMAPPED_BASE (test_thread_flag(TIF_32BIT) ? \ |
111 | (_AC(0x0000000070000000,UL)) : \ | 111 | (_AC(0x0000000070000000,UL)) : \ |
112 | (_AC(0xfffff80000000000,UL) + (1UL << 32UL))) | 112 | (_AC(0xfffff80000000000,UL) + (1UL << 32UL))) |
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index ed4124edf837..c44e7466534e 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h | |||
@@ -105,6 +105,7 @@ | |||
105 | #define _PAGE_RES1_4U _AC(0x0002000000000000,UL) /* Reserved */ | 105 | #define _PAGE_RES1_4U _AC(0x0002000000000000,UL) /* Reserved */ |
106 | #define _PAGE_SZ32MB_4U _AC(0x0001000000000000,UL) /* (Panther) 32MB page */ | 106 | #define _PAGE_SZ32MB_4U _AC(0x0001000000000000,UL) /* (Panther) 32MB page */ |
107 | #define _PAGE_SZ256MB_4U _AC(0x2001000000000000,UL) /* (Panther) 256MB page */ | 107 | #define _PAGE_SZ256MB_4U _AC(0x2001000000000000,UL) /* (Panther) 256MB page */ |
108 | #define _PAGE_SZALL_4U _AC(0x6001000000000000,UL) /* All pgsz bits */ | ||
108 | #define _PAGE_SN_4U _AC(0x0000800000000000,UL) /* (Cheetah) Snoop */ | 109 | #define _PAGE_SN_4U _AC(0x0000800000000000,UL) /* (Cheetah) Snoop */ |
109 | #define _PAGE_RES2_4U _AC(0x0000780000000000,UL) /* Reserved */ | 110 | #define _PAGE_RES2_4U _AC(0x0000780000000000,UL) /* Reserved */ |
110 | #define _PAGE_PADDR_4U _AC(0x000007FFFFFFE000,UL) /* (Cheetah) pa[42:13] */ | 111 | #define _PAGE_PADDR_4U _AC(0x000007FFFFFFE000,UL) /* (Cheetah) pa[42:13] */ |
@@ -150,6 +151,7 @@ | |||
150 | #define _PAGE_SZ512K_4V _AC(0x0000000000000002,UL) /* 512K Page */ | 151 | #define _PAGE_SZ512K_4V _AC(0x0000000000000002,UL) /* 512K Page */ |
151 | #define _PAGE_SZ64K_4V _AC(0x0000000000000001,UL) /* 64K Page */ | 152 | #define _PAGE_SZ64K_4V _AC(0x0000000000000001,UL) /* 64K Page */ |
152 | #define _PAGE_SZ8K_4V _AC(0x0000000000000000,UL) /* 8K Page */ | 153 | #define _PAGE_SZ8K_4V _AC(0x0000000000000000,UL) /* 8K Page */ |
154 | #define _PAGE_SZALL_4V _AC(0x0000000000000007,UL) /* All pgsz bits */ | ||
153 | 155 | ||
154 | #if PAGE_SHIFT == 13 | 156 | #if PAGE_SHIFT == 13 |
155 | #define _PAGE_SZBITS_4U _PAGE_SZ8K_4U | 157 | #define _PAGE_SZBITS_4U _PAGE_SZ8K_4U |
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index 715fd94cf577..a617d364d08d 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h | |||
@@ -273,7 +273,7 @@ static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } | |||
273 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } | 273 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } |
274 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } | 274 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } |
275 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } | 275 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } |
276 | static inline int pte_huge(pte_t pte) { return (pte_val(pte) & __LARGE_PTE) == __LARGE_PTE; } | 276 | static inline int pte_huge(pte_t pte) { return pte_val(pte) & _PAGE_PSE; } |
277 | 277 | ||
278 | static inline pte_t pte_rdprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; } | 278 | static inline pte_t pte_rdprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; } |
279 | static inline pte_t pte_exprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; } | 279 | static inline pte_t pte_exprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; } |
@@ -285,7 +285,7 @@ static inline pte_t pte_mkexec(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _ | |||
285 | static inline pte_t pte_mkdirty(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_DIRTY)); return pte; } | 285 | static inline pte_t pte_mkdirty(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_DIRTY)); return pte; } |
286 | static inline pte_t pte_mkyoung(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_ACCESSED)); return pte; } | 286 | static inline pte_t pte_mkyoung(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_ACCESSED)); return pte; } |
287 | static inline pte_t pte_mkwrite(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_RW)); return pte; } | 287 | static inline pte_t pte_mkwrite(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_RW)); return pte; } |
288 | static inline pte_t pte_mkhuge(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | __LARGE_PTE)); return pte; } | 288 | static inline pte_t pte_mkhuge(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_PSE)); return pte; } |
289 | 289 | ||
290 | struct vm_area_struct; | 290 | struct vm_area_struct; |
291 | 291 | ||
diff --git a/include/linux/ata.h b/include/linux/ata.h index b02a16c435e7..312a2c0c64e6 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -146,6 +146,8 @@ enum { | |||
146 | ATA_CMD_STANDBYNOW1 = 0xE0, | 146 | ATA_CMD_STANDBYNOW1 = 0xE0, |
147 | ATA_CMD_IDLEIMMEDIATE = 0xE1, | 147 | ATA_CMD_IDLEIMMEDIATE = 0xE1, |
148 | ATA_CMD_INIT_DEV_PARAMS = 0x91, | 148 | ATA_CMD_INIT_DEV_PARAMS = 0x91, |
149 | ATA_CMD_READ_NATIVE_MAX = 0xF8, | ||
150 | ATA_CMD_READ_NATIVE_MAX_EXT = 0x27, | ||
149 | 151 | ||
150 | /* SETFEATURES stuff */ | 152 | /* SETFEATURES stuff */ |
151 | SETFEATURES_XFER = 0x03, | 153 | SETFEATURES_XFER = 0x03, |
@@ -204,7 +206,6 @@ enum ata_tf_protocols { | |||
204 | ATA_PROT_UNKNOWN, /* unknown/invalid */ | 206 | ATA_PROT_UNKNOWN, /* unknown/invalid */ |
205 | ATA_PROT_NODATA, /* no data */ | 207 | ATA_PROT_NODATA, /* no data */ |
206 | ATA_PROT_PIO, /* PIO single sector */ | 208 | ATA_PROT_PIO, /* PIO single sector */ |
207 | ATA_PROT_PIO_MULT, /* PIO multiple sector */ | ||
208 | ATA_PROT_DMA, /* DMA */ | 209 | ATA_PROT_DMA, /* DMA */ |
209 | ATA_PROT_ATAPI, /* packet command, PIO data xfer*/ | 210 | ATA_PROT_ATAPI, /* packet command, PIO data xfer*/ |
210 | ATA_PROT_ATAPI_NODATA, /* packet command, no data */ | 211 | ATA_PROT_ATAPI_NODATA, /* packet command, no data */ |
@@ -247,18 +248,22 @@ struct ata_taskfile { | |||
247 | }; | 248 | }; |
248 | 249 | ||
249 | #define ata_id_is_ata(id) (((id)[0] & (1 << 15)) == 0) | 250 | #define ata_id_is_ata(id) (((id)[0] & (1 << 15)) == 0) |
251 | #define ata_id_is_cfa(id) ((id)[0] == 0x848A) | ||
250 | #define ata_id_is_sata(id) ((id)[93] == 0) | 252 | #define ata_id_is_sata(id) ((id)[93] == 0) |
251 | #define ata_id_rahead_enabled(id) ((id)[85] & (1 << 6)) | 253 | #define ata_id_rahead_enabled(id) ((id)[85] & (1 << 6)) |
252 | #define ata_id_wcache_enabled(id) ((id)[85] & (1 << 5)) | 254 | #define ata_id_wcache_enabled(id) ((id)[85] & (1 << 5)) |
255 | #define ata_id_hpa_enabled(id) ((id)[85] & (1 << 10)) | ||
253 | #define ata_id_has_fua(id) ((id)[84] & (1 << 6)) | 256 | #define ata_id_has_fua(id) ((id)[84] & (1 << 6)) |
254 | #define ata_id_has_flush(id) ((id)[83] & (1 << 12)) | 257 | #define ata_id_has_flush(id) ((id)[83] & (1 << 12)) |
255 | #define ata_id_has_flush_ext(id) ((id)[83] & (1 << 13)) | 258 | #define ata_id_has_flush_ext(id) ((id)[83] & (1 << 13)) |
256 | #define ata_id_has_lba48(id) ((id)[83] & (1 << 10)) | 259 | #define ata_id_has_lba48(id) ((id)[83] & (1 << 10)) |
260 | #define ata_id_has_hpa(id) ((id)[82] & (1 << 10)) | ||
257 | #define ata_id_has_wcache(id) ((id)[82] & (1 << 5)) | 261 | #define ata_id_has_wcache(id) ((id)[82] & (1 << 5)) |
258 | #define ata_id_has_pm(id) ((id)[82] & (1 << 3)) | 262 | #define ata_id_has_pm(id) ((id)[82] & (1 << 3)) |
259 | #define ata_id_has_lba(id) ((id)[49] & (1 << 9)) | 263 | #define ata_id_has_lba(id) ((id)[49] & (1 << 9)) |
260 | #define ata_id_has_dma(id) ((id)[49] & (1 << 8)) | 264 | #define ata_id_has_dma(id) ((id)[49] & (1 << 8)) |
261 | #define ata_id_removeable(id) ((id)[0] & (1 << 7)) | 265 | #define ata_id_removeable(id) ((id)[0] & (1 << 7)) |
266 | #define ata_id_has_dword_io(id) ((id)[50] & (1 << 0)) | ||
262 | #define ata_id_u32(id,n) \ | 267 | #define ata_id_u32(id,n) \ |
263 | (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)])) | 268 | (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)])) |
264 | #define ata_id_u64(id,n) \ | 269 | #define ata_id_u64(id,n) \ |
diff --git a/include/linux/device.h b/include/linux/device.h index 5b595fdfb672..f6e72a65a3f2 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -378,6 +378,7 @@ extern void device_bind_driver(struct device * dev); | |||
378 | extern void device_release_driver(struct device * dev); | 378 | extern void device_release_driver(struct device * dev); |
379 | extern int device_attach(struct device * dev); | 379 | extern int device_attach(struct device * dev); |
380 | extern void driver_attach(struct device_driver * drv); | 380 | extern void driver_attach(struct device_driver * drv); |
381 | extern void device_reprobe(struct device *dev); | ||
381 | 382 | ||
382 | 383 | ||
383 | /* | 384 | /* |
@@ -399,7 +400,7 @@ extern struct device * get_device(struct device * dev); | |||
399 | extern void put_device(struct device * dev); | 400 | extern void put_device(struct device * dev); |
400 | 401 | ||
401 | 402 | ||
402 | /* drivers/base/power.c */ | 403 | /* drivers/base/power/shutdown.c */ |
403 | extern void device_shutdown(void); | 404 | extern void device_shutdown(void); |
404 | 405 | ||
405 | 406 | ||
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 2d80cc761a15..a8731062a74c 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
@@ -20,6 +20,7 @@ enum dma_data_direction { | |||
20 | #define DMA_31BIT_MASK 0x000000007fffffffULL | 20 | #define DMA_31BIT_MASK 0x000000007fffffffULL |
21 | #define DMA_30BIT_MASK 0x000000003fffffffULL | 21 | #define DMA_30BIT_MASK 0x000000003fffffffULL |
22 | #define DMA_29BIT_MASK 0x000000001fffffffULL | 22 | #define DMA_29BIT_MASK 0x000000001fffffffULL |
23 | #define DMA_28BIT_MASK 0x000000000fffffffULL | ||
23 | 24 | ||
24 | #include <asm/dma-mapping.h> | 25 | #include <asm/dma-mapping.h> |
25 | 26 | ||
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 68d82ad6b17c..d6f1019625af 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -20,10 +20,7 @@ void unmap_hugepage_range(struct vm_area_struct *, unsigned long, unsigned long) | |||
20 | int hugetlb_prefault(struct address_space *, struct vm_area_struct *); | 20 | int hugetlb_prefault(struct address_space *, struct vm_area_struct *); |
21 | int hugetlb_report_meminfo(char *); | 21 | int hugetlb_report_meminfo(char *); |
22 | int hugetlb_report_node_meminfo(int, char *); | 22 | int hugetlb_report_node_meminfo(int, char *); |
23 | int is_hugepage_mem_enough(size_t); | ||
24 | unsigned long hugetlb_total_pages(void); | 23 | unsigned long hugetlb_total_pages(void); |
25 | struct page *alloc_huge_page(struct vm_area_struct *, unsigned long); | ||
26 | void free_huge_page(struct page *); | ||
27 | int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, | 24 | int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, |
28 | unsigned long address, int write_access); | 25 | unsigned long address, int write_access); |
29 | 26 | ||
@@ -39,18 +36,35 @@ struct page *follow_huge_addr(struct mm_struct *mm, unsigned long address, | |||
39 | int write); | 36 | int write); |
40 | struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, | 37 | struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, |
41 | pmd_t *pmd, int write); | 38 | pmd_t *pmd, int write); |
42 | int is_aligned_hugepage_range(unsigned long addr, unsigned long len); | ||
43 | int pmd_huge(pmd_t pmd); | 39 | int pmd_huge(pmd_t pmd); |
40 | void hugetlb_change_protection(struct vm_area_struct *vma, | ||
41 | unsigned long address, unsigned long end, pgprot_t newprot); | ||
44 | 42 | ||
45 | #ifndef ARCH_HAS_HUGEPAGE_ONLY_RANGE | 43 | #ifndef ARCH_HAS_HUGEPAGE_ONLY_RANGE |
46 | #define is_hugepage_only_range(mm, addr, len) 0 | 44 | #define is_hugepage_only_range(mm, addr, len) 0 |
47 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) \ | 45 | #endif |
48 | do { } while (0) | 46 | |
47 | #ifndef ARCH_HAS_HUGETLB_FREE_PGD_RANGE | ||
48 | #define hugetlb_free_pgd_range free_pgd_range | ||
49 | #else | ||
50 | void hugetlb_free_pgd_range(struct mmu_gather **tlb, unsigned long addr, | ||
51 | unsigned long end, unsigned long floor, | ||
52 | unsigned long ceiling); | ||
49 | #endif | 53 | #endif |
50 | 54 | ||
51 | #ifndef ARCH_HAS_PREPARE_HUGEPAGE_RANGE | 55 | #ifndef ARCH_HAS_PREPARE_HUGEPAGE_RANGE |
52 | #define prepare_hugepage_range(addr, len) \ | 56 | /* |
53 | is_aligned_hugepage_range(addr, len) | 57 | * If the arch doesn't supply something else, assume that hugepage |
58 | * size aligned regions are ok without further preparation. | ||
59 | */ | ||
60 | static inline int prepare_hugepage_range(unsigned long addr, unsigned long len) | ||
61 | { | ||
62 | if (len & ~HPAGE_MASK) | ||
63 | return -EINVAL; | ||
64 | if (addr & ~HPAGE_MASK) | ||
65 | return -EINVAL; | ||
66 | return 0; | ||
67 | } | ||
54 | #else | 68 | #else |
55 | int prepare_hugepage_range(unsigned long addr, unsigned long len); | 69 | int prepare_hugepage_range(unsigned long addr, unsigned long len); |
56 | #endif | 70 | #endif |
@@ -87,20 +101,17 @@ static inline unsigned long hugetlb_total_pages(void) | |||
87 | #define copy_hugetlb_page_range(src, dst, vma) ({ BUG(); 0; }) | 101 | #define copy_hugetlb_page_range(src, dst, vma) ({ BUG(); 0; }) |
88 | #define hugetlb_prefault(mapping, vma) ({ BUG(); 0; }) | 102 | #define hugetlb_prefault(mapping, vma) ({ BUG(); 0; }) |
89 | #define unmap_hugepage_range(vma, start, end) BUG() | 103 | #define unmap_hugepage_range(vma, start, end) BUG() |
90 | #define is_hugepage_mem_enough(size) 0 | ||
91 | #define hugetlb_report_meminfo(buf) 0 | 104 | #define hugetlb_report_meminfo(buf) 0 |
92 | #define hugetlb_report_node_meminfo(n, buf) 0 | 105 | #define hugetlb_report_node_meminfo(n, buf) 0 |
93 | #define follow_huge_pmd(mm, addr, pmd, write) NULL | 106 | #define follow_huge_pmd(mm, addr, pmd, write) NULL |
94 | #define is_aligned_hugepage_range(addr, len) 0 | ||
95 | #define prepare_hugepage_range(addr, len) (-EINVAL) | 107 | #define prepare_hugepage_range(addr, len) (-EINVAL) |
96 | #define pmd_huge(x) 0 | 108 | #define pmd_huge(x) 0 |
97 | #define is_hugepage_only_range(mm, addr, len) 0 | 109 | #define is_hugepage_only_range(mm, addr, len) 0 |
98 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) \ | 110 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) |
99 | do { } while (0) | ||
100 | #define alloc_huge_page(vma, addr) ({ NULL; }) | ||
101 | #define free_huge_page(p) ({ (void)(p); BUG(); }) | ||
102 | #define hugetlb_fault(mm, vma, addr, write) ({ BUG(); 0; }) | 111 | #define hugetlb_fault(mm, vma, addr, write) ({ BUG(); 0; }) |
103 | 112 | ||
113 | #define hugetlb_change_protection(vma, address, end, newprot) | ||
114 | |||
104 | #ifndef HPAGE_MASK | 115 | #ifndef HPAGE_MASK |
105 | #define HPAGE_MASK PAGE_MASK /* Keep the compiler happy */ | 116 | #define HPAGE_MASK PAGE_MASK /* Keep the compiler happy */ |
106 | #define HPAGE_SIZE PAGE_SIZE | 117 | #define HPAGE_SIZE PAGE_SIZE |
@@ -128,6 +139,8 @@ struct hugetlbfs_sb_info { | |||
128 | 139 | ||
129 | struct hugetlbfs_inode_info { | 140 | struct hugetlbfs_inode_info { |
130 | struct shared_policy policy; | 141 | struct shared_policy policy; |
142 | /* Protected by the (global) hugetlb_lock */ | ||
143 | unsigned long prereserved_hpages; | ||
131 | struct inode vfs_inode; | 144 | struct inode vfs_inode; |
132 | }; | 145 | }; |
133 | 146 | ||
@@ -144,6 +157,10 @@ static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb) | |||
144 | extern struct file_operations hugetlbfs_file_operations; | 157 | extern struct file_operations hugetlbfs_file_operations; |
145 | extern struct vm_operations_struct hugetlb_vm_ops; | 158 | extern struct vm_operations_struct hugetlb_vm_ops; |
146 | struct file *hugetlb_zero_setup(size_t); | 159 | struct file *hugetlb_zero_setup(size_t); |
160 | int hugetlb_extend_reservation(struct hugetlbfs_inode_info *info, | ||
161 | unsigned long atleast_hpages); | ||
162 | void hugetlb_truncate_reservation(struct hugetlbfs_inode_info *info, | ||
163 | unsigned long atmost_hpages); | ||
147 | int hugetlb_get_quota(struct address_space *mapping); | 164 | int hugetlb_get_quota(struct address_space *mapping); |
148 | void hugetlb_put_quota(struct address_space *mapping); | 165 | void hugetlb_put_quota(struct address_space *mapping); |
149 | 166 | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index 239408ecfddf..7a54244d30aa 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -502,13 +502,13 @@ extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_i | |||
502 | extern void ata_pci_remove_one (struct pci_dev *pdev); | 502 | extern void ata_pci_remove_one (struct pci_dev *pdev); |
503 | extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t state); | 503 | extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t state); |
504 | extern int ata_pci_device_resume(struct pci_dev *pdev); | 504 | extern int ata_pci_device_resume(struct pci_dev *pdev); |
505 | extern int ata_pci_clear_simplex(struct pci_dev *pdev); | ||
505 | #endif /* CONFIG_PCI */ | 506 | #endif /* CONFIG_PCI */ |
506 | extern int ata_device_add(const struct ata_probe_ent *ent); | 507 | extern int ata_device_add(const struct ata_probe_ent *ent); |
507 | extern void ata_host_set_remove(struct ata_host_set *host_set); | 508 | extern void ata_host_set_remove(struct ata_host_set *host_set); |
508 | extern int ata_scsi_detect(struct scsi_host_template *sht); | 509 | extern int ata_scsi_detect(struct scsi_host_template *sht); |
509 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); | 510 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); |
510 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); | 511 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); |
511 | extern enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd); | ||
512 | extern int ata_scsi_error(struct Scsi_Host *host); | 512 | extern int ata_scsi_error(struct Scsi_Host *host); |
513 | extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); | 513 | extern void ata_eh_qc_complete(struct ata_queued_cmd *qc); |
514 | extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); | 514 | extern void ata_eh_qc_retry(struct ata_queued_cmd *qc); |
@@ -543,6 +543,7 @@ extern void ata_port_stop (struct ata_port *ap); | |||
543 | extern void ata_host_stop (struct ata_host_set *host_set); | 543 | extern void ata_host_stop (struct ata_host_set *host_set); |
544 | extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs); | 544 | extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs); |
545 | extern void ata_qc_prep(struct ata_queued_cmd *qc); | 545 | extern void ata_qc_prep(struct ata_queued_cmd *qc); |
546 | extern void ata_noop_qc_prep(struct ata_queued_cmd *qc); | ||
546 | extern unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc); | 547 | extern unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc); |
547 | extern void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, | 548 | extern void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, |
548 | unsigned int buflen); | 549 | unsigned int buflen); |
@@ -609,7 +610,7 @@ extern void ata_pci_host_stop (struct ata_host_set *host_set); | |||
609 | extern struct ata_probe_ent * | 610 | extern struct ata_probe_ent * |
610 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask); | 611 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask); |
611 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); | 612 | extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); |
612 | 613 | extern unsigned long ata_pci_default_filter(const struct ata_port *, struct ata_device *, unsigned long); | |
613 | #endif /* CONFIG_PCI */ | 614 | #endif /* CONFIG_PCI */ |
614 | 615 | ||
615 | 616 | ||
diff --git a/include/linux/migrate.h b/include/linux/migrate.h new file mode 100644 index 000000000000..7d09962c3c0b --- /dev/null +++ b/include/linux/migrate.h | |||
@@ -0,0 +1,36 @@ | |||
1 | #ifndef _LINUX_MIGRATE_H | ||
2 | #define _LINUX_MIGRATE_H | ||
3 | |||
4 | #include <linux/config.h> | ||
5 | #include <linux/mm.h> | ||
6 | |||
7 | #ifdef CONFIG_MIGRATION | ||
8 | extern int isolate_lru_page(struct page *p, struct list_head *pagelist); | ||
9 | extern int putback_lru_pages(struct list_head *l); | ||
10 | extern int migrate_page(struct page *, struct page *); | ||
11 | extern void migrate_page_copy(struct page *, struct page *); | ||
12 | extern int migrate_page_remove_references(struct page *, struct page *, int); | ||
13 | extern int migrate_pages(struct list_head *l, struct list_head *t, | ||
14 | struct list_head *moved, struct list_head *failed); | ||
15 | int migrate_pages_to(struct list_head *pagelist, | ||
16 | struct vm_area_struct *vma, int dest); | ||
17 | extern int fail_migrate_page(struct page *, struct page *); | ||
18 | |||
19 | extern int migrate_prep(void); | ||
20 | |||
21 | #else | ||
22 | |||
23 | static inline int isolate_lru_page(struct page *p, struct list_head *list) | ||
24 | { return -ENOSYS; } | ||
25 | static inline int putback_lru_pages(struct list_head *l) { return 0; } | ||
26 | static inline int migrate_pages(struct list_head *l, struct list_head *t, | ||
27 | struct list_head *moved, struct list_head *failed) { return -ENOSYS; } | ||
28 | |||
29 | static inline int migrate_prep(void) { return -ENOSYS; } | ||
30 | |||
31 | /* Possible settings for the migrate_page() method in address_operations */ | ||
32 | #define migrate_page NULL | ||
33 | #define fail_migrate_page NULL | ||
34 | |||
35 | #endif /* CONFIG_MIGRATION */ | ||
36 | #endif /* _LINUX_MIGRATE_H */ | ||
diff --git a/include/linux/mm.h b/include/linux/mm.h index 498ff8778fb6..6aa016f1d3ae 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -286,43 +286,34 @@ struct page { | |||
286 | * | 286 | * |
287 | * Also, many kernel routines increase the page count before a critical | 287 | * Also, many kernel routines increase the page count before a critical |
288 | * routine so they can be sure the page doesn't go away from under them. | 288 | * routine so they can be sure the page doesn't go away from under them. |
289 | * | ||
290 | * Since 2.6.6 (approx), a free page has ->_count = -1. This is so that we | ||
291 | * can use atomic_add_negative(-1, page->_count) to detect when the page | ||
292 | * becomes free and so that we can also use atomic_inc_and_test to atomically | ||
293 | * detect when we just tried to grab a ref on a page which some other CPU has | ||
294 | * already deemed to be freeable. | ||
295 | * | ||
296 | * NO code should make assumptions about this internal detail! Use the provided | ||
297 | * macros which retain the old rules: page_count(page) == 0 is a free page. | ||
298 | */ | 289 | */ |
299 | 290 | ||
300 | /* | 291 | /* |
301 | * Drop a ref, return true if the logical refcount fell to zero (the page has | 292 | * Drop a ref, return true if the logical refcount fell to zero (the page has |
302 | * no users) | 293 | * no users) |
303 | */ | 294 | */ |
304 | #define put_page_testzero(p) \ | 295 | static inline int put_page_testzero(struct page *page) |
305 | ({ \ | 296 | { |
306 | BUG_ON(atomic_read(&(p)->_count) == -1);\ | 297 | BUG_ON(atomic_read(&page->_count) == 0); |
307 | atomic_add_negative(-1, &(p)->_count); \ | 298 | return atomic_dec_and_test(&page->_count); |
308 | }) | 299 | } |
309 | 300 | ||
310 | /* | 301 | /* |
311 | * Grab a ref, return true if the page previously had a logical refcount of | 302 | * Try to grab a ref unless the page has a refcount of zero, return false if |
312 | * zero. ie: returns true if we just grabbed an already-deemed-to-be-free page | 303 | * that is the case. |
313 | */ | 304 | */ |
314 | #define get_page_testone(p) atomic_inc_and_test(&(p)->_count) | 305 | static inline int get_page_unless_zero(struct page *page) |
315 | 306 | { | |
316 | #define set_page_count(p,v) atomic_set(&(p)->_count, (v) - 1) | 307 | return atomic_inc_not_zero(&page->_count); |
317 | #define __put_page(p) atomic_dec(&(p)->_count) | 308 | } |
318 | 309 | ||
319 | extern void FASTCALL(__page_cache_release(struct page *)); | 310 | extern void FASTCALL(__page_cache_release(struct page *)); |
320 | 311 | ||
321 | static inline int page_count(struct page *page) | 312 | static inline int page_count(struct page *page) |
322 | { | 313 | { |
323 | if (PageCompound(page)) | 314 | if (unlikely(PageCompound(page))) |
324 | page = (struct page *)page_private(page); | 315 | page = (struct page *)page_private(page); |
325 | return atomic_read(&page->_count) + 1; | 316 | return atomic_read(&page->_count); |
326 | } | 317 | } |
327 | 318 | ||
328 | static inline void get_page(struct page *page) | 319 | static inline void get_page(struct page *page) |
@@ -332,8 +323,19 @@ static inline void get_page(struct page *page) | |||
332 | atomic_inc(&page->_count); | 323 | atomic_inc(&page->_count); |
333 | } | 324 | } |
334 | 325 | ||
326 | /* | ||
327 | * Setup the page count before being freed into the page allocator for | ||
328 | * the first time (boot or memory hotplug) | ||
329 | */ | ||
330 | static inline void init_page_count(struct page *page) | ||
331 | { | ||
332 | atomic_set(&page->_count, 1); | ||
333 | } | ||
334 | |||
335 | void put_page(struct page *page); | 335 | void put_page(struct page *page); |
336 | 336 | ||
337 | void split_page(struct page *page, unsigned int order); | ||
338 | |||
337 | /* | 339 | /* |
338 | * Multiple processes may "see" the same page. E.g. for untouched | 340 | * Multiple processes may "see" the same page. E.g. for untouched |
339 | * mappings of /dev/null, all processes see the same page full of | 341 | * mappings of /dev/null, all processes see the same page full of |
@@ -1046,7 +1048,7 @@ int in_gate_area_no_task(unsigned long addr); | |||
1046 | 1048 | ||
1047 | int drop_caches_sysctl_handler(struct ctl_table *, int, struct file *, | 1049 | int drop_caches_sysctl_handler(struct ctl_table *, int, struct file *, |
1048 | void __user *, size_t *, loff_t *); | 1050 | void __user *, size_t *, loff_t *); |
1049 | int shrink_slab(unsigned long scanned, gfp_t gfp_mask, | 1051 | unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask, |
1050 | unsigned long lru_pages); | 1052 | unsigned long lru_pages); |
1051 | void drop_pagecache(void); | 1053 | void drop_pagecache(void); |
1052 | void drop_slab(void); | 1054 | void drop_slab(void); |
diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h index 8ac854f7f190..3b6723dfaff3 100644 --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h | |||
@@ -32,7 +32,7 @@ del_page_from_lru(struct zone *zone, struct page *page) | |||
32 | { | 32 | { |
33 | list_del(&page->lru); | 33 | list_del(&page->lru); |
34 | if (PageActive(page)) { | 34 | if (PageActive(page)) { |
35 | ClearPageActive(page); | 35 | __ClearPageActive(page); |
36 | zone->nr_active--; | 36 | zone->nr_active--; |
37 | } else { | 37 | } else { |
38 | zone->nr_inactive--; | 38 | zone->nr_inactive--; |
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index e933e2a355ad..8bcd9450d926 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
@@ -199,7 +199,7 @@ struct fat_mount_options { | |||
199 | sys_immutable:1, /* set = system files are immutable */ | 199 | sys_immutable:1, /* set = system files are immutable */ |
200 | dotsOK:1, /* set = hidden and system files are named '.filename' */ | 200 | dotsOK:1, /* set = hidden and system files are named '.filename' */ |
201 | isvfat:1, /* 0=no vfat long filename support, 1=vfat support */ | 201 | isvfat:1, /* 0=no vfat long filename support, 1=vfat support */ |
202 | utf8:1, /* Use of UTF8 character set (Default) */ | 202 | utf8:1, /* Use of UTF-8 character set (Default) */ |
203 | unicode_xlate:1, /* create escape sequences for unhandled Unicode */ | 203 | unicode_xlate:1, /* create escape sequences for unhandled Unicode */ |
204 | numtail:1, /* Does first alias have a numeric '~1' type tail? */ | 204 | numtail:1, /* Does first alias have a numeric '~1' type tail? */ |
205 | atari:1, /* Use Atari GEMDOS variation of MS-DOS fs */ | 205 | atari:1, /* Use Atari GEMDOS variation of MS-DOS fs */ |
diff --git a/include/linux/net.h b/include/linux/net.h index 152fa6551fd8..84a490e5f0a1 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -143,6 +143,8 @@ struct proto_ops { | |||
143 | struct poll_table_struct *wait); | 143 | struct poll_table_struct *wait); |
144 | int (*ioctl) (struct socket *sock, unsigned int cmd, | 144 | int (*ioctl) (struct socket *sock, unsigned int cmd, |
145 | unsigned long arg); | 145 | unsigned long arg); |
146 | int (*compat_ioctl) (struct socket *sock, unsigned int cmd, | ||
147 | unsigned long arg); | ||
146 | int (*listen) (struct socket *sock, int len); | 148 | int (*listen) (struct socket *sock, int len); |
147 | int (*shutdown) (struct socket *sock, int flags); | 149 | int (*shutdown) (struct socket *sock, int flags); |
148 | int (*setsockopt)(struct socket *sock, int level, | 150 | int (*setsockopt)(struct socket *sock, int level, |
@@ -251,6 +253,8 @@ SOCKCALL_UWRAP(name, poll, (struct file *file, struct socket *sock, struct poll_ | |||
251 | (file, sock, wait)) \ | 253 | (file, sock, wait)) \ |
252 | SOCKCALL_WRAP(name, ioctl, (struct socket *sock, unsigned int cmd, \ | 254 | SOCKCALL_WRAP(name, ioctl, (struct socket *sock, unsigned int cmd, \ |
253 | unsigned long arg), (sock, cmd, arg)) \ | 255 | unsigned long arg), (sock, cmd, arg)) \ |
256 | SOCKCALL_WRAP(name, compat_ioctl, (struct socket *sock, unsigned int cmd, \ | ||
257 | unsigned long arg), (sock, cmd, arg)) \ | ||
254 | SOCKCALL_WRAP(name, listen, (struct socket *sock, int len), (sock, len)) \ | 258 | SOCKCALL_WRAP(name, listen, (struct socket *sock, int len), (sock, len)) \ |
255 | SOCKCALL_WRAP(name, shutdown, (struct socket *sock, int flags), (sock, flags)) \ | 259 | SOCKCALL_WRAP(name, shutdown, (struct socket *sock, int flags), (sock, flags)) \ |
256 | SOCKCALL_WRAP(name, setsockopt, (struct socket *sock, int level, int optname, \ | 260 | SOCKCALL_WRAP(name, setsockopt, (struct socket *sock, int level, int optname, \ |
@@ -275,6 +279,7 @@ static const struct proto_ops name##_ops = { \ | |||
275 | .getname = __lock_##name##_getname, \ | 279 | .getname = __lock_##name##_getname, \ |
276 | .poll = __lock_##name##_poll, \ | 280 | .poll = __lock_##name##_poll, \ |
277 | .ioctl = __lock_##name##_ioctl, \ | 281 | .ioctl = __lock_##name##_ioctl, \ |
282 | .compat_ioctl = __lock_##name##_compat_ioctl, \ | ||
278 | .listen = __lock_##name##_listen, \ | 283 | .listen = __lock_##name##_listen, \ |
279 | .shutdown = __lock_##name##_shutdown, \ | 284 | .shutdown = __lock_##name##_shutdown, \ |
280 | .setsockopt = __lock_##name##_setsockopt, \ | 285 | .setsockopt = __lock_##name##_setsockopt, \ |
@@ -283,6 +288,7 @@ static const struct proto_ops name##_ops = { \ | |||
283 | .recvmsg = __lock_##name##_recvmsg, \ | 288 | .recvmsg = __lock_##name##_recvmsg, \ |
284 | .mmap = __lock_##name##_mmap, \ | 289 | .mmap = __lock_##name##_mmap, \ |
285 | }; | 290 | }; |
291 | |||
286 | #endif | 292 | #endif |
287 | 293 | ||
288 | #define MODULE_ALIAS_NETPROTO(proto) \ | 294 | #define MODULE_ALIAS_NETPROTO(proto) \ |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index d52999c43336..9ea629c02a4b 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -86,8 +86,9 @@ | |||
86 | * - The __xxx_page_state variants can be used safely when interrupts are | 86 | * - The __xxx_page_state variants can be used safely when interrupts are |
87 | * disabled. | 87 | * disabled. |
88 | * - The __xxx_page_state variants can be used if the field is only | 88 | * - The __xxx_page_state variants can be used if the field is only |
89 | * modified from process context, or only modified from interrupt context. | 89 | * modified from process context and protected from preemption, or only |
90 | * In this case, the field should be commented here. | 90 | * modified from interrupt context. In this case, the field should be |
91 | * commented here. | ||
91 | */ | 92 | */ |
92 | struct page_state { | 93 | struct page_state { |
93 | unsigned long nr_dirty; /* Dirty writeable pages */ | 94 | unsigned long nr_dirty; /* Dirty writeable pages */ |
@@ -239,22 +240,19 @@ extern void __mod_page_state_offset(unsigned long offset, unsigned long delta); | |||
239 | #define __ClearPageDirty(page) __clear_bit(PG_dirty, &(page)->flags) | 240 | #define __ClearPageDirty(page) __clear_bit(PG_dirty, &(page)->flags) |
240 | #define TestClearPageDirty(page) test_and_clear_bit(PG_dirty, &(page)->flags) | 241 | #define TestClearPageDirty(page) test_and_clear_bit(PG_dirty, &(page)->flags) |
241 | 242 | ||
242 | #define SetPageLRU(page) set_bit(PG_lru, &(page)->flags) | ||
243 | #define PageLRU(page) test_bit(PG_lru, &(page)->flags) | 243 | #define PageLRU(page) test_bit(PG_lru, &(page)->flags) |
244 | #define TestSetPageLRU(page) test_and_set_bit(PG_lru, &(page)->flags) | 244 | #define SetPageLRU(page) set_bit(PG_lru, &(page)->flags) |
245 | #define TestClearPageLRU(page) test_and_clear_bit(PG_lru, &(page)->flags) | 245 | #define ClearPageLRU(page) clear_bit(PG_lru, &(page)->flags) |
246 | #define __ClearPageLRU(page) __clear_bit(PG_lru, &(page)->flags) | ||
246 | 247 | ||
247 | #define PageActive(page) test_bit(PG_active, &(page)->flags) | 248 | #define PageActive(page) test_bit(PG_active, &(page)->flags) |
248 | #define SetPageActive(page) set_bit(PG_active, &(page)->flags) | 249 | #define SetPageActive(page) set_bit(PG_active, &(page)->flags) |
249 | #define ClearPageActive(page) clear_bit(PG_active, &(page)->flags) | 250 | #define ClearPageActive(page) clear_bit(PG_active, &(page)->flags) |
250 | #define TestClearPageActive(page) test_and_clear_bit(PG_active, &(page)->flags) | 251 | #define __ClearPageActive(page) __clear_bit(PG_active, &(page)->flags) |
251 | #define TestSetPageActive(page) test_and_set_bit(PG_active, &(page)->flags) | ||
252 | 252 | ||
253 | #define PageSlab(page) test_bit(PG_slab, &(page)->flags) | 253 | #define PageSlab(page) test_bit(PG_slab, &(page)->flags) |
254 | #define SetPageSlab(page) set_bit(PG_slab, &(page)->flags) | 254 | #define __SetPageSlab(page) __set_bit(PG_slab, &(page)->flags) |
255 | #define ClearPageSlab(page) clear_bit(PG_slab, &(page)->flags) | 255 | #define __ClearPageSlab(page) __clear_bit(PG_slab, &(page)->flags) |
256 | #define TestClearPageSlab(page) test_and_clear_bit(PG_slab, &(page)->flags) | ||
257 | #define TestSetPageSlab(page) test_and_set_bit(PG_slab, &(page)->flags) | ||
258 | 256 | ||
259 | #ifdef CONFIG_HIGHMEM | 257 | #ifdef CONFIG_HIGHMEM |
260 | #define PageHighMem(page) is_highmem(page_zone(page)) | 258 | #define PageHighMem(page) is_highmem(page_zone(page)) |
@@ -329,8 +327,8 @@ extern void __mod_page_state_offset(unsigned long offset, unsigned long delta); | |||
329 | #define TestClearPageReclaim(page) test_and_clear_bit(PG_reclaim, &(page)->flags) | 327 | #define TestClearPageReclaim(page) test_and_clear_bit(PG_reclaim, &(page)->flags) |
330 | 328 | ||
331 | #define PageCompound(page) test_bit(PG_compound, &(page)->flags) | 329 | #define PageCompound(page) test_bit(PG_compound, &(page)->flags) |
332 | #define SetPageCompound(page) set_bit(PG_compound, &(page)->flags) | 330 | #define __SetPageCompound(page) __set_bit(PG_compound, &(page)->flags) |
333 | #define ClearPageCompound(page) clear_bit(PG_compound, &(page)->flags) | 331 | #define __ClearPageCompound(page) __clear_bit(PG_compound, &(page)->flags) |
334 | 332 | ||
335 | #ifdef CONFIG_SWAP | 333 | #ifdef CONFIG_SWAP |
336 | #define PageSwapCache(page) test_bit(PG_swapcache, &(page)->flags) | 334 | #define PageSwapCache(page) test_bit(PG_swapcache, &(page)->flags) |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index b9810ddf435a..ec3c32932620 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -852,6 +852,8 @@ | |||
852 | #define PCI_DEVICE_ID_QLOGIC_ISP2432 0x2432 | 852 | #define PCI_DEVICE_ID_QLOGIC_ISP2432 0x2432 |
853 | #define PCI_DEVICE_ID_QLOGIC_ISP2512 0x2512 | 853 | #define PCI_DEVICE_ID_QLOGIC_ISP2512 0x2512 |
854 | #define PCI_DEVICE_ID_QLOGIC_ISP2522 0x2522 | 854 | #define PCI_DEVICE_ID_QLOGIC_ISP2522 0x2522 |
855 | #define PCI_DEVICE_ID_QLOGIC_ISP5422 0x5422 | ||
856 | #define PCI_DEVICE_ID_QLOGIC_ISP5432 0x5432 | ||
855 | 857 | ||
856 | #define PCI_VENDOR_ID_CYRIX 0x1078 | 858 | #define PCI_VENDOR_ID_CYRIX 0x1078 |
857 | #define PCI_DEVICE_ID_CYRIX_5510 0x0000 | 859 | #define PCI_DEVICE_ID_CYRIX_5510 0x0000 |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 0b2ba67ff13c..b739ac1f7ca0 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -11,8 +11,6 @@ | |||
11 | #ifndef _LINUX_RTC_H_ | 11 | #ifndef _LINUX_RTC_H_ |
12 | #define _LINUX_RTC_H_ | 12 | #define _LINUX_RTC_H_ |
13 | 13 | ||
14 | #include <linux/interrupt.h> | ||
15 | |||
16 | /* | 14 | /* |
17 | * The struct used to pass data via the following ioctl. Similar to the | 15 | * The struct used to pass data via the following ioctl. Similar to the |
18 | * struct tm in <time.h>, but it needs to be here so that the kernel | 16 | * struct tm in <time.h>, but it needs to be here so that the kernel |
@@ -95,6 +93,8 @@ struct rtc_pll_info { | |||
95 | 93 | ||
96 | #ifdef __KERNEL__ | 94 | #ifdef __KERNEL__ |
97 | 95 | ||
96 | #include <linux/interrupt.h> | ||
97 | |||
98 | typedef struct rtc_task { | 98 | typedef struct rtc_task { |
99 | void (*func)(void *private_data); | 99 | void (*func)(void *private_data); |
100 | void *private_data; | 100 | void *private_data; |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 8cf52939d0ab..2b28c849d75a 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -38,7 +38,6 @@ typedef struct kmem_cache kmem_cache_t; | |||
38 | #define SLAB_DEBUG_INITIAL 0x00000200UL /* Call constructor (as verifier) */ | 38 | #define SLAB_DEBUG_INITIAL 0x00000200UL /* Call constructor (as verifier) */ |
39 | #define SLAB_RED_ZONE 0x00000400UL /* Red zone objs in a cache */ | 39 | #define SLAB_RED_ZONE 0x00000400UL /* Red zone objs in a cache */ |
40 | #define SLAB_POISON 0x00000800UL /* Poison objects */ | 40 | #define SLAB_POISON 0x00000800UL /* Poison objects */ |
41 | #define SLAB_NO_REAP 0x00001000UL /* never reap from the cache */ | ||
42 | #define SLAB_HWCACHE_ALIGN 0x00002000UL /* align objs on a h/w cache lines */ | 41 | #define SLAB_HWCACHE_ALIGN 0x00002000UL /* align objs on a h/w cache lines */ |
43 | #define SLAB_CACHE_DMA 0x00004000UL /* use GFP_DMA memory */ | 42 | #define SLAB_CACHE_DMA 0x00004000UL /* use GFP_DMA memory */ |
44 | #define SLAB_MUST_HWCACHE_ALIGN 0x00008000UL /* force alignment */ | 43 | #define SLAB_MUST_HWCACHE_ALIGN 0x00008000UL /* force alignment */ |
@@ -118,7 +117,7 @@ extern void *kzalloc(size_t, gfp_t); | |||
118 | */ | 117 | */ |
119 | static inline void *kcalloc(size_t n, size_t size, gfp_t flags) | 118 | static inline void *kcalloc(size_t n, size_t size, gfp_t flags) |
120 | { | 119 | { |
121 | if (n != 0 && size > INT_MAX / n) | 120 | if (n != 0 && size > ULONG_MAX / n) |
122 | return NULL; | 121 | return NULL; |
123 | return kzalloc(n * size, flags); | 122 | return kzalloc(n * size, flags); |
124 | } | 123 | } |
diff --git a/include/linux/smp.h b/include/linux/smp.h index 44153fdf73fc..d699a16b0cb2 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
@@ -52,23 +52,12 @@ extern void smp_cpus_done(unsigned int max_cpus); | |||
52 | /* | 52 | /* |
53 | * Call a function on all other processors | 53 | * Call a function on all other processors |
54 | */ | 54 | */ |
55 | extern int smp_call_function (void (*func) (void *info), void *info, | 55 | int smp_call_function(void(*func)(void *info), void *info, int retry, int wait); |
56 | int retry, int wait); | ||
57 | 56 | ||
58 | /* | 57 | /* |
59 | * Call a function on all processors | 58 | * Call a function on all processors |
60 | */ | 59 | */ |
61 | static inline int on_each_cpu(void (*func) (void *info), void *info, | 60 | int on_each_cpu(void (*func) (void *info), void *info, int retry, int wait); |
62 | int retry, int wait) | ||
63 | { | ||
64 | int ret = 0; | ||
65 | |||
66 | preempt_disable(); | ||
67 | ret = smp_call_function(func, info, retry, wait); | ||
68 | func(info); | ||
69 | preempt_enable(); | ||
70 | return ret; | ||
71 | } | ||
72 | 61 | ||
73 | #define MSG_ALL_BUT_SELF 0x8000 /* Assume <32768 CPU's */ | 62 | #define MSG_ALL_BUT_SELF 0x8000 /* Assume <32768 CPU's */ |
74 | #define MSG_ALL 0x8001 | 63 | #define MSG_ALL 0x8001 |
@@ -94,7 +83,13 @@ void smp_prepare_boot_cpu(void); | |||
94 | #define raw_smp_processor_id() 0 | 83 | #define raw_smp_processor_id() 0 |
95 | #define hard_smp_processor_id() 0 | 84 | #define hard_smp_processor_id() 0 |
96 | #define smp_call_function(func,info,retry,wait) ({ 0; }) | 85 | #define smp_call_function(func,info,retry,wait) ({ 0; }) |
97 | #define on_each_cpu(func,info,retry,wait) ({ func(info); 0; }) | 86 | #define on_each_cpu(func,info,retry,wait) \ |
87 | ({ \ | ||
88 | local_irq_disable(); \ | ||
89 | func(info); \ | ||
90 | local_irq_enable(); \ | ||
91 | 0; \ | ||
92 | }) | ||
98 | static inline void smp_send_reschedule(int cpu) { } | 93 | static inline void smp_send_reschedule(int cpu) { } |
99 | #define num_booting_cpus() 1 | 94 | #define num_booting_cpus() 1 |
100 | #define smp_prepare_boot_cpu() do {} while (0) | 95 | #define smp_prepare_boot_cpu() do {} while (0) |
diff --git a/include/linux/swap.h b/include/linux/swap.h index d572b19afb7d..12415dd94451 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -172,9 +172,24 @@ extern int rotate_reclaimable_page(struct page *page); | |||
172 | extern void swap_setup(void); | 172 | extern void swap_setup(void); |
173 | 173 | ||
174 | /* linux/mm/vmscan.c */ | 174 | /* linux/mm/vmscan.c */ |
175 | extern int try_to_free_pages(struct zone **, gfp_t); | 175 | extern unsigned long try_to_free_pages(struct zone **, gfp_t); |
176 | extern int shrink_all_memory(int); | 176 | extern unsigned long shrink_all_memory(unsigned long nr_pages); |
177 | extern int vm_swappiness; | 177 | extern int vm_swappiness; |
178 | extern int remove_mapping(struct address_space *mapping, struct page *page); | ||
179 | |||
180 | /* possible outcome of pageout() */ | ||
181 | typedef enum { | ||
182 | /* failed to write page out, page is locked */ | ||
183 | PAGE_KEEP, | ||
184 | /* move page to the active list, page is locked */ | ||
185 | PAGE_ACTIVATE, | ||
186 | /* page has been sent to the disk successfully, page is unlocked */ | ||
187 | PAGE_SUCCESS, | ||
188 | /* page is clean and locked */ | ||
189 | PAGE_CLEAN, | ||
190 | } pageout_t; | ||
191 | |||
192 | extern pageout_t pageout(struct page *page, struct address_space *mapping); | ||
178 | 193 | ||
179 | #ifdef CONFIG_NUMA | 194 | #ifdef CONFIG_NUMA |
180 | extern int zone_reclaim_mode; | 195 | extern int zone_reclaim_mode; |
@@ -188,25 +203,6 @@ static inline int zone_reclaim(struct zone *z, gfp_t mask, unsigned int order) | |||
188 | } | 203 | } |
189 | #endif | 204 | #endif |
190 | 205 | ||
191 | #ifdef CONFIG_MIGRATION | ||
192 | extern int isolate_lru_page(struct page *p); | ||
193 | extern int putback_lru_pages(struct list_head *l); | ||
194 | extern int migrate_page(struct page *, struct page *); | ||
195 | extern void migrate_page_copy(struct page *, struct page *); | ||
196 | extern int migrate_page_remove_references(struct page *, struct page *, int); | ||
197 | extern int migrate_pages(struct list_head *l, struct list_head *t, | ||
198 | struct list_head *moved, struct list_head *failed); | ||
199 | extern int fail_migrate_page(struct page *, struct page *); | ||
200 | #else | ||
201 | static inline int isolate_lru_page(struct page *p) { return -ENOSYS; } | ||
202 | static inline int putback_lru_pages(struct list_head *l) { return 0; } | ||
203 | static inline int migrate_pages(struct list_head *l, struct list_head *t, | ||
204 | struct list_head *moved, struct list_head *failed) { return -ENOSYS; } | ||
205 | /* Possible settings for the migrate_page() method in address_operations */ | ||
206 | #define migrate_page NULL | ||
207 | #define fail_migrate_page NULL | ||
208 | #endif | ||
209 | |||
210 | #ifdef CONFIG_MMU | 206 | #ifdef CONFIG_MMU |
211 | /* linux/mm/shmem.c */ | 207 | /* linux/mm/shmem.c */ |
212 | extern int shmem_unuse(swp_entry_t entry, struct page *page); | 208 | extern int shmem_unuse(swp_entry_t entry, struct page *page); |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 86b111300231..957c21c16d62 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -20,6 +20,10 @@ struct work_struct { | |||
20 | struct timer_list timer; | 20 | struct timer_list timer; |
21 | }; | 21 | }; |
22 | 22 | ||
23 | struct execute_work { | ||
24 | struct work_struct work; | ||
25 | }; | ||
26 | |||
23 | #define __WORK_INITIALIZER(n, f, d) { \ | 27 | #define __WORK_INITIALIZER(n, f, d) { \ |
24 | .entry = { &(n).entry, &(n).entry }, \ | 28 | .entry = { &(n).entry, &(n).entry }, \ |
25 | .func = (f), \ | 29 | .func = (f), \ |
@@ -74,6 +78,8 @@ extern void init_workqueues(void); | |||
74 | void cancel_rearming_delayed_work(struct work_struct *work); | 78 | void cancel_rearming_delayed_work(struct work_struct *work); |
75 | void cancel_rearming_delayed_workqueue(struct workqueue_struct *, | 79 | void cancel_rearming_delayed_workqueue(struct workqueue_struct *, |
76 | struct work_struct *); | 80 | struct work_struct *); |
81 | int execute_in_process_context(void (*fn)(void *), void *, | ||
82 | struct execute_work *); | ||
77 | 83 | ||
78 | /* | 84 | /* |
79 | * Kill off a pending schedule_delayed_work(). Note that the work callback | 85 | * Kill off a pending schedule_delayed_work(). Note that the work callback |
diff --git a/include/linux/x25.h b/include/linux/x25.h index 16d44931afa0..d035e4e87d07 100644 --- a/include/linux/x25.h +++ b/include/linux/x25.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #ifndef X25_KERNEL_H | 11 | #ifndef X25_KERNEL_H |
12 | #define X25_KERNEL_H | 12 | #define X25_KERNEL_H |
13 | 13 | ||
14 | #include <linux/types.h> | ||
15 | |||
14 | #define SIOCX25GSUBSCRIP (SIOCPROTOPRIVATE + 0) | 16 | #define SIOCX25GSUBSCRIP (SIOCPROTOPRIVATE + 0) |
15 | #define SIOCX25SSUBSCRIP (SIOCPROTOPRIVATE + 1) | 17 | #define SIOCX25SSUBSCRIP (SIOCPROTOPRIVATE + 1) |
16 | #define SIOCX25GFACILITIES (SIOCPROTOPRIVATE + 2) | 18 | #define SIOCX25GFACILITIES (SIOCPROTOPRIVATE + 2) |
@@ -21,6 +23,8 @@ | |||
21 | #define SIOCX25SCUDMATCHLEN (SIOCPROTOPRIVATE + 7) | 23 | #define SIOCX25SCUDMATCHLEN (SIOCPROTOPRIVATE + 7) |
22 | #define SIOCX25CALLACCPTAPPRV (SIOCPROTOPRIVATE + 8) | 24 | #define SIOCX25CALLACCPTAPPRV (SIOCPROTOPRIVATE + 8) |
23 | #define SIOCX25SENDCALLACCPT (SIOCPROTOPRIVATE + 9) | 25 | #define SIOCX25SENDCALLACCPT (SIOCPROTOPRIVATE + 9) |
26 | #define SIOCX25GDTEFACILITIES (SIOCPROTOPRIVATE + 10) | ||
27 | #define SIOCX25SDTEFACILITIES (SIOCPROTOPRIVATE + 11) | ||
24 | 28 | ||
25 | /* | 29 | /* |
26 | * Values for {get,set}sockopt. | 30 | * Values for {get,set}sockopt. |
@@ -77,6 +81,8 @@ struct x25_subscrip_struct { | |||
77 | #define X25_MASK_PACKET_SIZE 0x04 | 81 | #define X25_MASK_PACKET_SIZE 0x04 |
78 | #define X25_MASK_WINDOW_SIZE 0x08 | 82 | #define X25_MASK_WINDOW_SIZE 0x08 |
79 | 83 | ||
84 | #define X25_MASK_CALLING_AE 0x10 | ||
85 | #define X25_MASK_CALLED_AE 0x20 | ||
80 | 86 | ||
81 | 87 | ||
82 | /* | 88 | /* |
@@ -99,6 +105,26 @@ struct x25_facilities { | |||
99 | }; | 105 | }; |
100 | 106 | ||
101 | /* | 107 | /* |
108 | * ITU DTE facilities | ||
109 | * Only the called and calling address | ||
110 | * extension are currently implemented. | ||
111 | * The rest are in place to avoid the struct | ||
112 | * changing size if someone needs them later | ||
113 | */ | ||
114 | |||
115 | struct x25_dte_facilities { | ||
116 | __u16 delay_cumul; | ||
117 | __u16 delay_target; | ||
118 | __u16 delay_max; | ||
119 | __u8 min_throughput; | ||
120 | __u8 expedited; | ||
121 | __u8 calling_len; | ||
122 | __u8 called_len; | ||
123 | __u8 calling_ae[20]; | ||
124 | __u8 called_ae[20]; | ||
125 | }; | ||
126 | |||
127 | /* | ||
102 | * Call User Data structure. | 128 | * Call User Data structure. |
103 | */ | 129 | */ |
104 | struct x25_calluserdata { | 130 | struct x25_calluserdata { |
diff --git a/include/net/compat.h b/include/net/compat.h index 290bab46d457..8662b8f43df5 100644 --- a/include/net/compat.h +++ b/include/net/compat.h | |||
@@ -23,6 +23,9 @@ struct compat_cmsghdr { | |||
23 | compat_int_t cmsg_type; | 23 | compat_int_t cmsg_type; |
24 | }; | 24 | }; |
25 | 25 | ||
26 | struct sock; | ||
27 | extern int compat_sock_get_timestamp(struct sock *, struct timeval __user *); | ||
28 | |||
26 | #else /* defined(CONFIG_COMPAT) */ | 29 | #else /* defined(CONFIG_COMPAT) */ |
27 | #define compat_msghdr msghdr /* to avoid compiler warnings */ | 30 | #define compat_msghdr msghdr /* to avoid compiler warnings */ |
28 | #endif /* defined(CONFIG_COMPAT) */ | 31 | #endif /* defined(CONFIG_COMPAT) */ |
@@ -34,7 +37,6 @@ extern asmlinkage long compat_sys_recvmsg(int,struct compat_msghdr __user *,unsi | |||
34 | extern asmlinkage long compat_sys_getsockopt(int, int, int, char __user *, int __user *); | 37 | extern asmlinkage long compat_sys_getsockopt(int, int, int, char __user *, int __user *); |
35 | extern int put_cmsg_compat(struct msghdr*, int, int, int, void *); | 38 | extern int put_cmsg_compat(struct msghdr*, int, int, int, void *); |
36 | 39 | ||
37 | struct sock; | ||
38 | extern int cmsghdr_from_user_compat_to_kern(struct msghdr *, struct sock *, unsigned char *, int); | 40 | extern int cmsghdr_from_user_compat_to_kern(struct msghdr *, struct sock *, unsigned char *, int); |
39 | 41 | ||
40 | #endif /* NET_COMPAT_H */ | 42 | #endif /* NET_COMPAT_H */ |
diff --git a/include/net/x25.h b/include/net/x25.h index fee62ff8c194..0ad90ebcf86e 100644 --- a/include/net/x25.h +++ b/include/net/x25.h | |||
@@ -101,9 +101,17 @@ enum { | |||
101 | #define X25_FAC_PACKET_SIZE 0x42 | 101 | #define X25_FAC_PACKET_SIZE 0x42 |
102 | #define X25_FAC_WINDOW_SIZE 0x43 | 102 | #define X25_FAC_WINDOW_SIZE 0x43 |
103 | 103 | ||
104 | #define X25_MAX_FAC_LEN 20 /* Plenty to spare */ | 104 | #define X25_MAX_FAC_LEN 60 |
105 | #define X25_MAX_CUD_LEN 128 | 105 | #define X25_MAX_CUD_LEN 128 |
106 | 106 | ||
107 | #define X25_FAC_CALLING_AE 0xCB | ||
108 | #define X25_FAC_CALLED_AE 0xC9 | ||
109 | |||
110 | #define X25_MARKER 0x00 | ||
111 | #define X25_DTE_SERVICES 0x0F | ||
112 | #define X25_MAX_AE_LEN 40 /* Max num of semi-octets in AE - OSI Nw */ | ||
113 | #define X25_MAX_DTE_FACIL_LEN 21 /* Max length of DTE facility params */ | ||
114 | |||
107 | /** | 115 | /** |
108 | * struct x25_route - x25 routing entry | 116 | * struct x25_route - x25 routing entry |
109 | * @node - entry in x25_list_lock | 117 | * @node - entry in x25_list_lock |
@@ -148,6 +156,7 @@ struct x25_sock { | |||
148 | struct timer_list timer; | 156 | struct timer_list timer; |
149 | struct x25_causediag causediag; | 157 | struct x25_causediag causediag; |
150 | struct x25_facilities facilities; | 158 | struct x25_facilities facilities; |
159 | struct x25_dte_facilities dte_facilities; | ||
151 | struct x25_calluserdata calluserdata; | 160 | struct x25_calluserdata calluserdata; |
152 | unsigned long vc_facil_mask; /* inc_call facilities mask */ | 161 | unsigned long vc_facil_mask; /* inc_call facilities mask */ |
153 | }; | 162 | }; |
@@ -180,9 +189,13 @@ extern void x25_establish_link(struct x25_neigh *); | |||
180 | extern void x25_terminate_link(struct x25_neigh *); | 189 | extern void x25_terminate_link(struct x25_neigh *); |
181 | 190 | ||
182 | /* x25_facilities.c */ | 191 | /* x25_facilities.c */ |
183 | extern int x25_parse_facilities(struct sk_buff *, struct x25_facilities *, unsigned long *); | 192 | extern int x25_parse_facilities(struct sk_buff *, struct x25_facilities *, |
184 | extern int x25_create_facilities(unsigned char *, struct x25_facilities *, unsigned long); | 193 | struct x25_dte_facilities *, unsigned long *); |
185 | extern int x25_negotiate_facilities(struct sk_buff *, struct sock *, struct x25_facilities *); | 194 | extern int x25_create_facilities(unsigned char *, struct x25_facilities *, |
195 | struct x25_dte_facilities *, unsigned long); | ||
196 | extern int x25_negotiate_facilities(struct sk_buff *, struct sock *, | ||
197 | struct x25_facilities *, | ||
198 | struct x25_dte_facilities *); | ||
186 | extern void x25_limit_facilities(struct x25_facilities *, struct x25_neigh *); | 199 | extern void x25_limit_facilities(struct x25_facilities *, struct x25_neigh *); |
187 | 200 | ||
188 | /* x25_in.c */ | 201 | /* x25_in.c */ |
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 9c331258bc27..c60b8ff2f5e4 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h | |||
@@ -433,6 +433,4 @@ struct scsi_lun { | |||
433 | /* Used to obtain the PCI location of a device */ | 433 | /* Used to obtain the PCI location of a device */ |
434 | #define SCSI_IOCTL_GET_PCI 0x5387 | 434 | #define SCSI_IOCTL_GET_PCI 0x5387 |
435 | 435 | ||
436 | int scsi_execute_in_process_context(void (*fn)(void *data), void *data); | ||
437 | |||
438 | #endif /* _SCSI_SCSI_H */ | 436 | #endif /* _SCSI_SCSI_H */ |
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 7529f4388bb4..1ace1b9fe537 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h | |||
@@ -104,10 +104,10 @@ struct scsi_cmnd { | |||
104 | working on */ | 104 | working on */ |
105 | 105 | ||
106 | #define SCSI_SENSE_BUFFERSIZE 96 | 106 | #define SCSI_SENSE_BUFFERSIZE 96 |
107 | unsigned char sense_buffer[SCSI_SENSE_BUFFERSIZE]; /* obtained by REQUEST SENSE | 107 | unsigned char sense_buffer[SCSI_SENSE_BUFFERSIZE]; |
108 | * when CHECK CONDITION is | 108 | /* obtained by REQUEST SENSE when |
109 | * received on original command | 109 | * CHECK CONDITION is received on original |
110 | * (auto-sense) */ | 110 | * command (auto-sense) */ |
111 | 111 | ||
112 | /* Low-level done function - can be used by low-level driver to point | 112 | /* Low-level done function - can be used by low-level driver to point |
113 | * to completion function. Not used by mid/upper level code. */ | 113 | * to completion function. Not used by mid/upper level code. */ |
@@ -120,12 +120,12 @@ struct scsi_cmnd { | |||
120 | struct scsi_pointer SCp; /* Scratchpad used by some host adapters */ | 120 | struct scsi_pointer SCp; /* Scratchpad used by some host adapters */ |
121 | 121 | ||
122 | unsigned char *host_scribble; /* The host adapter is allowed to | 122 | unsigned char *host_scribble; /* The host adapter is allowed to |
123 | * call scsi_malloc and get some memory | 123 | * call scsi_malloc and get some memory |
124 | * and hang it here. The host adapter | 124 | * and hang it here. The host adapter |
125 | * is also expected to call scsi_free | 125 | * is also expected to call scsi_free |
126 | * to release this memory. (The memory | 126 | * to release this memory. (The memory |
127 | * obtained by scsi_malloc is guaranteed | 127 | * obtained by scsi_malloc is guaranteed |
128 | * to be at an address < 16Mb). */ | 128 | * to be at an address < 16Mb). */ |
129 | 129 | ||
130 | int result; /* Status code from lower level driver */ | 130 | int result; /* Status code from lower level driver */ |
131 | 131 | ||
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 290e3b4d2aec..895d212864cd 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/device.h> | 4 | #include <linux/device.h> |
5 | #include <linux/list.h> | 5 | #include <linux/list.h> |
6 | #include <linux/spinlock.h> | 6 | #include <linux/spinlock.h> |
7 | #include <linux/workqueue.h> | ||
7 | #include <asm/atomic.h> | 8 | #include <asm/atomic.h> |
8 | 9 | ||
9 | struct request_queue; | 10 | struct request_queue; |
@@ -73,7 +74,6 @@ struct scsi_device { | |||
73 | unsigned sector_size; /* size in bytes */ | 74 | unsigned sector_size; /* size in bytes */ |
74 | 75 | ||
75 | void *hostdata; /* available to low-level driver */ | 76 | void *hostdata; /* available to low-level driver */ |
76 | char devfs_name[256]; /* devfs junk */ | ||
77 | char type; | 77 | char type; |
78 | char scsi_level; | 78 | char scsi_level; |
79 | char inq_periph_qual; /* PQ from INQUIRY data */ | 79 | char inq_periph_qual; /* PQ from INQUIRY data */ |
@@ -138,6 +138,8 @@ struct scsi_device { | |||
138 | struct device sdev_gendev; | 138 | struct device sdev_gendev; |
139 | struct class_device sdev_classdev; | 139 | struct class_device sdev_classdev; |
140 | 140 | ||
141 | struct execute_work ew; /* used to get process context on put */ | ||
142 | |||
141 | enum scsi_device_state sdev_state; | 143 | enum scsi_device_state sdev_state; |
142 | unsigned long sdev_data[0]; | 144 | unsigned long sdev_data[0]; |
143 | } __attribute__((aligned(sizeof(unsigned long)))); | 145 | } __attribute__((aligned(sizeof(unsigned long)))); |
@@ -154,6 +156,11 @@ struct scsi_device { | |||
154 | #define scmd_printk(prefix, scmd, fmt, a...) \ | 156 | #define scmd_printk(prefix, scmd, fmt, a...) \ |
155 | dev_printk(prefix, &(scmd)->device->sdev_gendev, fmt, ##a) | 157 | dev_printk(prefix, &(scmd)->device->sdev_gendev, fmt, ##a) |
156 | 158 | ||
159 | enum scsi_target_state { | ||
160 | STARGET_RUNNING = 1, | ||
161 | STARGET_DEL, | ||
162 | }; | ||
163 | |||
157 | /* | 164 | /* |
158 | * scsi_target: representation of a scsi target, for now, this is only | 165 | * scsi_target: representation of a scsi target, for now, this is only |
159 | * used for single_lun devices. If no one has active IO to the target, | 166 | * used for single_lun devices. If no one has active IO to the target, |
@@ -168,8 +175,13 @@ struct scsi_target { | |||
168 | unsigned int channel; | 175 | unsigned int channel; |
169 | unsigned int id; /* target id ... replace | 176 | unsigned int id; /* target id ... replace |
170 | * scsi_device.id eventually */ | 177 | * scsi_device.id eventually */ |
171 | unsigned long create:1; /* signal that it needs to be added */ | 178 | unsigned int create:1; /* signal that it needs to be added */ |
179 | unsigned int pdt_1f_for_no_lun; /* PDT = 0x1f */ | ||
180 | /* means no lun present */ | ||
181 | |||
172 | char scsi_level; | 182 | char scsi_level; |
183 | struct execute_work ew; | ||
184 | enum scsi_target_state state; | ||
173 | void *hostdata; /* available to low-level driver */ | 185 | void *hostdata; /* available to low-level driver */ |
174 | unsigned long starget_data[0]; /* for the transport */ | 186 | unsigned long starget_data[0]; /* for the transport */ |
175 | /* starget_data must be the last element!!!! */ | 187 | /* starget_data must be the last element!!!! */ |
@@ -249,6 +261,11 @@ extern int scsi_mode_sense(struct scsi_device *sdev, int dbd, int modepage, | |||
249 | unsigned char *buffer, int len, int timeout, | 261 | unsigned char *buffer, int len, int timeout, |
250 | int retries, struct scsi_mode_data *data, | 262 | int retries, struct scsi_mode_data *data, |
251 | struct scsi_sense_hdr *); | 263 | struct scsi_sense_hdr *); |
264 | extern int scsi_mode_select(struct scsi_device *sdev, int pf, int sp, | ||
265 | int modepage, unsigned char *buffer, int len, | ||
266 | int timeout, int retries, | ||
267 | struct scsi_mode_data *data, | ||
268 | struct scsi_sense_hdr *); | ||
252 | extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout, | 269 | extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout, |
253 | int retries); | 270 | int retries); |
254 | extern int scsi_device_set_state(struct scsi_device *sdev, | 271 | extern int scsi_device_set_state(struct scsi_device *sdev, |
@@ -281,6 +298,11 @@ extern int scsi_execute_async(struct scsi_device *sdev, | |||
281 | void (*done)(void *, char *, int, int), | 298 | void (*done)(void *, char *, int, int), |
282 | gfp_t gfp); | 299 | gfp_t gfp); |
283 | 300 | ||
301 | static inline void scsi_device_reprobe(struct scsi_device *sdev) | ||
302 | { | ||
303 | device_reprobe(&sdev->sdev_gendev); | ||
304 | } | ||
305 | |||
284 | static inline unsigned int sdev_channel(struct scsi_device *sdev) | 306 | static inline unsigned int sdev_channel(struct scsi_device *sdev) |
285 | { | 307 | { |
286 | return sdev->channel; | 308 | return sdev->channel; |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 827992949c4b..a6cf3e535c0b 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -147,20 +147,6 @@ struct scsi_host_template { | |||
147 | int (* eh_host_reset_handler)(struct scsi_cmnd *); | 147 | int (* eh_host_reset_handler)(struct scsi_cmnd *); |
148 | 148 | ||
149 | /* | 149 | /* |
150 | * This is an optional routine to notify the host that the scsi | ||
151 | * timer just fired. The returns tell the timer routine what to | ||
152 | * do about this: | ||
153 | * | ||
154 | * EH_HANDLED: I fixed the error, please complete the command | ||
155 | * EH_RESET_TIMER: I need more time, reset the timer and | ||
156 | * begin counting again | ||
157 | * EH_NOT_HANDLED Begin normal error recovery | ||
158 | * | ||
159 | * Status: OPTIONAL | ||
160 | */ | ||
161 | enum scsi_eh_timer_return (* eh_timed_out)(struct scsi_cmnd *); | ||
162 | |||
163 | /* | ||
164 | * Before the mid layer attempts to scan for a new device where none | 150 | * Before the mid layer attempts to scan for a new device where none |
165 | * currently exists, it will call this entry in your driver. Should | 151 | * currently exists, it will call this entry in your driver. Should |
166 | * your driver need to allocate any structs or perform any other init | 152 | * your driver need to allocate any structs or perform any other init |
diff --git a/include/scsi/scsi_transport.h b/include/scsi/scsi_transport.h index e7b1054adf86..b3657f111937 100644 --- a/include/scsi/scsi_transport.h +++ b/include/scsi/scsi_transport.h | |||
@@ -48,6 +48,17 @@ struct scsi_transport_template { | |||
48 | * True if the transport wants to use a host-based work-queue | 48 | * True if the transport wants to use a host-based work-queue |
49 | */ | 49 | */ |
50 | unsigned int create_work_queue : 1; | 50 | unsigned int create_work_queue : 1; |
51 | |||
52 | /* | ||
53 | * This is an optional routine that allows the transport to become | ||
54 | * involved when a scsi io timer fires. The return value tells the | ||
55 | * timer routine how to finish the io timeout handling: | ||
56 | * EH_HANDLED: I fixed the error, please complete the command | ||
57 | * EH_RESET_TIMER: I need more time, reset the timer and | ||
58 | * begin counting again | ||
59 | * EH_NOT_HANDLED Begin normal error recovery | ||
60 | */ | ||
61 | enum scsi_eh_timer_return (* eh_timed_out)(struct scsi_cmnd *); | ||
51 | }; | 62 | }; |
52 | 63 | ||
53 | #define transport_class_to_shost(tc) \ | 64 | #define transport_class_to_shost(tc) \ |
diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h index b91400bfb02a..93cfb4bf4211 100644 --- a/include/scsi/scsi_transport_sas.h +++ b/include/scsi/scsi_transport_sas.h | |||
@@ -30,6 +30,7 @@ enum sas_linkrate { | |||
30 | SAS_SATA_PORT_SELECTOR, | 30 | SAS_SATA_PORT_SELECTOR, |
31 | SAS_LINK_RATE_1_5_GBPS, | 31 | SAS_LINK_RATE_1_5_GBPS, |
32 | SAS_LINK_RATE_3_0_GBPS, | 32 | SAS_LINK_RATE_3_0_GBPS, |
33 | SAS_LINK_RATE_6_0_GBPS, | ||
33 | SAS_LINK_VIRTUAL, | 34 | SAS_LINK_VIRTUAL, |
34 | }; | 35 | }; |
35 | 36 | ||
@@ -89,11 +90,45 @@ struct sas_rphy { | |||
89 | dev_to_rphy((cdev)->dev) | 90 | dev_to_rphy((cdev)->dev) |
90 | #define rphy_to_shost(rphy) \ | 91 | #define rphy_to_shost(rphy) \ |
91 | dev_to_shost((rphy)->dev.parent) | 92 | dev_to_shost((rphy)->dev.parent) |
93 | #define target_to_rphy(targ) \ | ||
94 | dev_to_rphy((targ)->dev.parent) | ||
95 | |||
96 | struct sas_end_device { | ||
97 | struct sas_rphy rphy; | ||
98 | /* flags */ | ||
99 | unsigned ready_led_meaning:1; | ||
100 | /* parameters */ | ||
101 | u16 I_T_nexus_loss_timeout; | ||
102 | u16 initiator_response_timeout; | ||
103 | }; | ||
104 | #define rphy_to_end_device(r) \ | ||
105 | container_of((r), struct sas_end_device, rphy) | ||
106 | |||
107 | struct sas_expander_device { | ||
108 | int level; | ||
109 | |||
110 | #define SAS_EXPANDER_VENDOR_ID_LEN 8 | ||
111 | char vendor_id[SAS_EXPANDER_VENDOR_ID_LEN+1]; | ||
112 | #define SAS_EXPANDER_PRODUCT_ID_LEN 16 | ||
113 | char product_id[SAS_EXPANDER_PRODUCT_ID_LEN+1]; | ||
114 | #define SAS_EXPANDER_PRODUCT_REV_LEN 4 | ||
115 | char product_rev[SAS_EXPANDER_PRODUCT_REV_LEN+1]; | ||
116 | #define SAS_EXPANDER_COMPONENT_VENDOR_ID_LEN 8 | ||
117 | char component_vendor_id[SAS_EXPANDER_COMPONENT_VENDOR_ID_LEN+1]; | ||
118 | u16 component_id; | ||
119 | u8 component_revision_id; | ||
92 | 120 | ||
121 | struct sas_rphy rphy; | ||
122 | |||
123 | }; | ||
124 | #define rphy_to_expander_device(r) \ | ||
125 | container_of((r), struct sas_expander_device, rphy) | ||
93 | 126 | ||
94 | /* The functions by which the transport class and the driver communicate */ | 127 | /* The functions by which the transport class and the driver communicate */ |
95 | struct sas_function_template { | 128 | struct sas_function_template { |
96 | int (*get_linkerrors)(struct sas_phy *); | 129 | int (*get_linkerrors)(struct sas_phy *); |
130 | int (*get_enclosure_identifier)(struct sas_rphy *, u64 *); | ||
131 | int (*get_bay_identifier)(struct sas_rphy *); | ||
97 | int (*phy_reset)(struct sas_phy *, int); | 132 | int (*phy_reset)(struct sas_phy *, int); |
98 | }; | 133 | }; |
99 | 134 | ||
@@ -106,7 +141,8 @@ extern int sas_phy_add(struct sas_phy *); | |||
106 | extern void sas_phy_delete(struct sas_phy *); | 141 | extern void sas_phy_delete(struct sas_phy *); |
107 | extern int scsi_is_sas_phy(const struct device *); | 142 | extern int scsi_is_sas_phy(const struct device *); |
108 | 143 | ||
109 | extern struct sas_rphy *sas_rphy_alloc(struct sas_phy *); | 144 | extern struct sas_rphy *sas_end_device_alloc(struct sas_phy *); |
145 | extern struct sas_rphy *sas_expander_alloc(struct sas_phy *, enum sas_device_type); | ||
110 | void sas_rphy_free(struct sas_rphy *); | 146 | void sas_rphy_free(struct sas_rphy *); |
111 | extern int sas_rphy_add(struct sas_rphy *); | 147 | extern int sas_rphy_add(struct sas_rphy *); |
112 | extern void sas_rphy_delete(struct sas_rphy *); | 148 | extern void sas_rphy_delete(struct sas_rphy *); |
@@ -115,5 +151,17 @@ extern int scsi_is_sas_rphy(const struct device *); | |||
115 | extern struct scsi_transport_template * | 151 | extern struct scsi_transport_template * |
116 | sas_attach_transport(struct sas_function_template *); | 152 | sas_attach_transport(struct sas_function_template *); |
117 | extern void sas_release_transport(struct scsi_transport_template *); | 153 | extern void sas_release_transport(struct scsi_transport_template *); |
154 | int sas_read_port_mode_page(struct scsi_device *); | ||
155 | |||
156 | static inline int | ||
157 | scsi_is_sas_expander_device(struct device *dev) | ||
158 | { | ||
159 | struct sas_rphy *rphy; | ||
160 | if (!scsi_is_sas_rphy(dev)) | ||
161 | return 0; | ||
162 | rphy = dev_to_rphy(dev); | ||
163 | return rphy->identify.device_type == SAS_FANOUT_EXPANDER_DEVICE || | ||
164 | rphy->identify.device_type == SAS_EDGE_EXPANDER_DEVICE; | ||
165 | } | ||
118 | 166 | ||
119 | #endif /* SCSI_TRANSPORT_SAS_H */ | 167 | #endif /* SCSI_TRANSPORT_SAS_H */ |
diff --git a/include/scsi/scsi_transport_spi.h b/include/scsi/scsi_transport_spi.h index fb5a2ffae939..5e1d61913d4e 100644 --- a/include/scsi/scsi_transport_spi.h +++ b/include/scsi/scsi_transport_spi.h | |||
@@ -148,5 +148,9 @@ void spi_schedule_dv_device(struct scsi_device *); | |||
148 | void spi_dv_device(struct scsi_device *); | 148 | void spi_dv_device(struct scsi_device *); |
149 | void spi_display_xfer_agreement(struct scsi_target *); | 149 | void spi_display_xfer_agreement(struct scsi_target *); |
150 | int spi_print_msg(const unsigned char *); | 150 | int spi_print_msg(const unsigned char *); |
151 | int spi_populate_width_msg(unsigned char *msg, int width); | ||
152 | int spi_populate_sync_msg(unsigned char *msg, int period, int offset); | ||
153 | int spi_populate_ppr_msg(unsigned char *msg, int period, int offset, int width, | ||
154 | int options); | ||
151 | 155 | ||
152 | #endif /* SCSI_TRANSPORT_SPI_H */ | 156 | #endif /* SCSI_TRANSPORT_SPI_H */ |
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h index b0b3ea7b365e..b45a73712748 100644 --- a/include/sound/ac97_codec.h +++ b/include/sound/ac97_codec.h | |||
@@ -433,6 +433,12 @@ struct snd_ac97_bus { | |||
433 | struct snd_info_entry *proc; | 433 | struct snd_info_entry *proc; |
434 | }; | 434 | }; |
435 | 435 | ||
436 | /* static resolution table */ | ||
437 | struct snd_ac97_res_table { | ||
438 | unsigned short reg; /* register */ | ||
439 | unsigned short bits; /* resolution bitmask */ | ||
440 | }; | ||
441 | |||
436 | struct snd_ac97_template { | 442 | struct snd_ac97_template { |
437 | void *private_data; | 443 | void *private_data; |
438 | void (*private_free) (struct snd_ac97 *ac97); | 444 | void (*private_free) (struct snd_ac97 *ac97); |
@@ -440,8 +446,7 @@ struct snd_ac97_template { | |||
440 | unsigned short num; /* number of codec: 0 = primary, 1 = secondary */ | 446 | unsigned short num; /* number of codec: 0 = primary, 1 = secondary */ |
441 | unsigned short addr; /* physical address of codec [0-3] */ | 447 | unsigned short addr; /* physical address of codec [0-3] */ |
442 | unsigned int scaps; /* driver capabilities */ | 448 | unsigned int scaps; /* driver capabilities */ |
443 | unsigned int limited_regs; /* allow limited registers only */ | 449 | const struct snd_ac97_res_table *res_table; /* static resolution */ |
444 | DECLARE_BITMAP(reg_accessed, 0x80); /* bit flags */ | ||
445 | }; | 450 | }; |
446 | 451 | ||
447 | struct snd_ac97 { | 452 | struct snd_ac97 { |
@@ -456,20 +461,20 @@ struct snd_ac97 { | |||
456 | struct snd_info_entry *proc_regs; | 461 | struct snd_info_entry *proc_regs; |
457 | unsigned short subsystem_vendor; | 462 | unsigned short subsystem_vendor; |
458 | unsigned short subsystem_device; | 463 | unsigned short subsystem_device; |
459 | struct semaphore reg_mutex; | 464 | struct mutex reg_mutex; |
460 | struct semaphore page_mutex; /* mutex for AD18xx multi-codecs and paging (2.3) */ | 465 | struct mutex page_mutex; /* mutex for AD18xx multi-codecs and paging (2.3) */ |
461 | unsigned short num; /* number of codec: 0 = primary, 1 = secondary */ | 466 | unsigned short num; /* number of codec: 0 = primary, 1 = secondary */ |
462 | unsigned short addr; /* physical address of codec [0-3] */ | 467 | unsigned short addr; /* physical address of codec [0-3] */ |
463 | unsigned int id; /* identification of codec */ | 468 | unsigned int id; /* identification of codec */ |
464 | unsigned short caps; /* capabilities (register 0) */ | 469 | unsigned short caps; /* capabilities (register 0) */ |
465 | unsigned short ext_id; /* extended feature identification (register 28) */ | 470 | unsigned short ext_id; /* extended feature identification (register 28) */ |
466 | unsigned short ext_mid; /* extended modem ID (register 3C) */ | 471 | unsigned short ext_mid; /* extended modem ID (register 3C) */ |
472 | const struct snd_ac97_res_table *res_table; /* static resolution */ | ||
467 | unsigned int scaps; /* driver capabilities */ | 473 | unsigned int scaps; /* driver capabilities */ |
468 | unsigned int flags; /* specific code */ | 474 | unsigned int flags; /* specific code */ |
469 | unsigned int rates[6]; /* see AC97_RATES_* defines */ | 475 | unsigned int rates[6]; /* see AC97_RATES_* defines */ |
470 | unsigned int spdif_status; | 476 | unsigned int spdif_status; |
471 | unsigned short regs[0x80]; /* register cache */ | 477 | unsigned short regs[0x80]; /* register cache */ |
472 | unsigned int limited_regs; /* allow limited registers only */ | ||
473 | DECLARE_BITMAP(reg_accessed, 0x80); /* bit flags */ | 478 | DECLARE_BITMAP(reg_accessed, 0x80); /* bit flags */ |
474 | union { /* vendor specific code */ | 479 | union { /* vendor specific code */ |
475 | struct { | 480 | struct { |
diff --git a/include/sound/ad1848.h b/include/sound/ad1848.h index 1a2759f3a292..57af1fe7b309 100644 --- a/include/sound/ad1848.h +++ b/include/sound/ad1848.h | |||
@@ -154,7 +154,7 @@ struct snd_ad1848 { | |||
154 | #endif | 154 | #endif |
155 | 155 | ||
156 | spinlock_t reg_lock; | 156 | spinlock_t reg_lock; |
157 | struct semaphore open_mutex; | 157 | struct mutex open_mutex; |
158 | }; | 158 | }; |
159 | 159 | ||
160 | /* exported functions */ | 160 | /* exported functions */ |
diff --git a/include/sound/ak4531_codec.h b/include/sound/ak4531_codec.h index edf04070ce7c..fb30faab43a8 100644 --- a/include/sound/ak4531_codec.h +++ b/include/sound/ak4531_codec.h | |||
@@ -71,7 +71,7 @@ struct snd_ak4531 { | |||
71 | void (*private_free) (struct snd_ak4531 *ak4531); | 71 | void (*private_free) (struct snd_ak4531 *ak4531); |
72 | /* --- */ | 72 | /* --- */ |
73 | unsigned char regs[0x20]; | 73 | unsigned char regs[0x20]; |
74 | struct semaphore reg_mutex; | 74 | struct mutex reg_mutex; |
75 | }; | 75 | }; |
76 | 76 | ||
77 | int snd_ak4531_mixer(struct snd_card *card, struct snd_ak4531 *_ak4531, | 77 | int snd_ak4531_mixer(struct snd_card *card, struct snd_ak4531 *_ak4531, |
diff --git a/include/sound/core.h b/include/sound/core.h index 3093e3ddcf36..144bdc2f217f 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/sched.h> /* wake_up() */ | 25 | #include <linux/sched.h> /* wake_up() */ |
26 | #include <asm/semaphore.h> /* struct semaphore */ | 26 | #include <linux/mutex.h> /* struct mutex */ |
27 | #include <linux/rwsem.h> /* struct rw_semaphore */ | 27 | #include <linux/rwsem.h> /* struct rw_semaphore */ |
28 | #include <linux/workqueue.h> /* struct workqueue_struct */ | 28 | #include <linux/workqueue.h> /* struct workqueue_struct */ |
29 | #include <linux/pm.h> /* pm_message_t */ | 29 | #include <linux/pm.h> /* pm_message_t */ |
@@ -137,7 +137,7 @@ struct snd_card { | |||
137 | 137 | ||
138 | #ifdef CONFIG_PM | 138 | #ifdef CONFIG_PM |
139 | unsigned int power_state; /* power state */ | 139 | unsigned int power_state; /* power state */ |
140 | struct semaphore power_lock; /* power lock */ | 140 | struct mutex power_lock; /* power lock */ |
141 | wait_queue_head_t power_sleep; | 141 | wait_queue_head_t power_sleep; |
142 | #endif | 142 | #endif |
143 | 143 | ||
@@ -150,12 +150,12 @@ struct snd_card { | |||
150 | #ifdef CONFIG_PM | 150 | #ifdef CONFIG_PM |
151 | static inline void snd_power_lock(struct snd_card *card) | 151 | static inline void snd_power_lock(struct snd_card *card) |
152 | { | 152 | { |
153 | down(&card->power_lock); | 153 | mutex_lock(&card->power_lock); |
154 | } | 154 | } |
155 | 155 | ||
156 | static inline void snd_power_unlock(struct snd_card *card) | 156 | static inline void snd_power_unlock(struct snd_card *card) |
157 | { | 157 | { |
158 | up(&card->power_lock); | 158 | mutex_unlock(&card->power_lock); |
159 | } | 159 | } |
160 | 160 | ||
161 | static inline unsigned int snd_power_get_state(struct snd_card *card) | 161 | static inline unsigned int snd_power_get_state(struct snd_card *card) |
diff --git a/include/sound/cs4231.h b/include/sound/cs4231.h index ac6a5d882088..60b5b92a1319 100644 --- a/include/sound/cs4231.h +++ b/include/sound/cs4231.h | |||
@@ -248,8 +248,8 @@ struct snd_cs4231 { | |||
248 | unsigned int c_dma_size; | 248 | unsigned int c_dma_size; |
249 | 249 | ||
250 | spinlock_t reg_lock; | 250 | spinlock_t reg_lock; |
251 | struct semaphore mce_mutex; | 251 | struct mutex mce_mutex; |
252 | struct semaphore open_mutex; | 252 | struct mutex open_mutex; |
253 | 253 | ||
254 | int (*rate_constraint) (struct snd_pcm_runtime *runtime); | 254 | int (*rate_constraint) (struct snd_pcm_runtime *runtime); |
255 | void (*set_playback_format) (struct snd_cs4231 *chip, struct snd_pcm_hw_params *hw_params, unsigned char pdfr); | 255 | void (*set_playback_format) (struct snd_cs4231 *chip, struct snd_pcm_hw_params *hw_params, unsigned char pdfr); |
diff --git a/include/sound/cs46xx.h b/include/sound/cs46xx.h index 199b5098ff7e..80b2979c0cba 100644 --- a/include/sound/cs46xx.h +++ b/include/sound/cs46xx.h | |||
@@ -1711,7 +1711,7 @@ struct snd_cs46xx { | |||
1711 | int current_gpio; | 1711 | int current_gpio; |
1712 | #endif | 1712 | #endif |
1713 | #ifdef CONFIG_SND_CS46XX_NEW_DSP | 1713 | #ifdef CONFIG_SND_CS46XX_NEW_DSP |
1714 | struct semaphore spos_mutex; | 1714 | struct mutex spos_mutex; |
1715 | 1715 | ||
1716 | struct dsp_spos_instance * dsp_spos_instance; | 1716 | struct dsp_spos_instance * dsp_spos_instance; |
1717 | 1717 | ||
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h index 951e40d720d9..186e00ad9e79 100644 --- a/include/sound/emu10k1.h +++ b/include/sound/emu10k1.h | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <sound/pcm-indirect.h> | 33 | #include <sound/pcm-indirect.h> |
34 | #include <sound/timer.h> | 34 | #include <sound/timer.h> |
35 | #include <linux/interrupt.h> | 35 | #include <linux/interrupt.h> |
36 | #include <linux/mutex.h> | ||
36 | #include <asm/io.h> | 37 | #include <asm/io.h> |
37 | 38 | ||
38 | /* ------------------- DEFINES -------------------- */ | 39 | /* ------------------- DEFINES -------------------- */ |
@@ -1022,7 +1023,7 @@ struct snd_emu10k1_fx8010 { | |||
1022 | int gpr_size; /* size of allocated GPR controls */ | 1023 | int gpr_size; /* size of allocated GPR controls */ |
1023 | int gpr_count; /* count of used kcontrols */ | 1024 | int gpr_count; /* count of used kcontrols */ |
1024 | struct list_head gpr_ctl; /* GPR controls */ | 1025 | struct list_head gpr_ctl; /* GPR controls */ |
1025 | struct semaphore lock; | 1026 | struct mutex lock; |
1026 | struct snd_emu10k1_fx8010_pcm pcm[8]; | 1027 | struct snd_emu10k1_fx8010_pcm pcm[8]; |
1027 | spinlock_t irq_lock; | 1028 | spinlock_t irq_lock; |
1028 | struct snd_emu10k1_fx8010_irq *irq_handlers; | 1029 | struct snd_emu10k1_fx8010_irq *irq_handlers; |
@@ -1122,7 +1123,6 @@ struct snd_emu10k1 { | |||
1122 | spinlock_t reg_lock; | 1123 | spinlock_t reg_lock; |
1123 | spinlock_t emu_lock; | 1124 | spinlock_t emu_lock; |
1124 | spinlock_t voice_lock; | 1125 | spinlock_t voice_lock; |
1125 | struct semaphore ptb_lock; | ||
1126 | 1126 | ||
1127 | struct snd_emu10k1_voice voices[NUM_G]; | 1127 | struct snd_emu10k1_voice voices[NUM_G]; |
1128 | struct snd_emu10k1_voice p16v_voices[4]; | 1128 | struct snd_emu10k1_voice p16v_voices[4]; |
diff --git a/include/sound/emux_synth.h b/include/sound/emux_synth.h index b2d6b2acc7c7..d8cb51b86c20 100644 --- a/include/sound/emux_synth.h +++ b/include/sound/emux_synth.h | |||
@@ -113,7 +113,7 @@ struct snd_emux { | |||
113 | struct snd_emux_voice *voices; /* Voices (EMU 'channel') */ | 113 | struct snd_emux_voice *voices; /* Voices (EMU 'channel') */ |
114 | int use_time; /* allocation counter */ | 114 | int use_time; /* allocation counter */ |
115 | spinlock_t voice_lock; /* Lock for voice access */ | 115 | spinlock_t voice_lock; /* Lock for voice access */ |
116 | struct semaphore register_mutex; | 116 | struct mutex register_mutex; |
117 | int client; /* For the sequencer client */ | 117 | int client; /* For the sequencer client */ |
118 | int ports[SNDRV_EMUX_MAX_PORTS]; /* The ports for this device */ | 118 | int ports[SNDRV_EMUX_MAX_PORTS]; /* The ports for this device */ |
119 | struct snd_emux_port *portptrs[SNDRV_EMUX_MAX_PORTS]; | 119 | struct snd_emux_port *portptrs[SNDRV_EMUX_MAX_PORTS]; |
diff --git a/include/sound/gus.h b/include/sound/gus.h index 63da50fae773..68a664ab97f3 100644 --- a/include/sound/gus.h +++ b/include/sound/gus.h | |||
@@ -209,7 +209,7 @@ struct snd_gf1_mem { | |||
209 | struct snd_gf1_bank_info banks_16[4]; | 209 | struct snd_gf1_bank_info banks_16[4]; |
210 | struct snd_gf1_mem_block *first; | 210 | struct snd_gf1_mem_block *first; |
211 | struct snd_gf1_mem_block *last; | 211 | struct snd_gf1_mem_block *last; |
212 | struct semaphore memory_mutex; | 212 | struct mutex memory_mutex; |
213 | }; | 213 | }; |
214 | 214 | ||
215 | struct snd_gf1_dma_block { | 215 | struct snd_gf1_dma_block { |
@@ -467,8 +467,8 @@ struct snd_gus_card { | |||
467 | spinlock_t dma_lock; | 467 | spinlock_t dma_lock; |
468 | spinlock_t pcm_volume_level_lock; | 468 | spinlock_t pcm_volume_level_lock; |
469 | spinlock_t uart_cmd_lock; | 469 | spinlock_t uart_cmd_lock; |
470 | struct semaphore dma_mutex; | 470 | struct mutex dma_mutex; |
471 | struct semaphore register_mutex; | 471 | struct mutex register_mutex; |
472 | }; | 472 | }; |
473 | 473 | ||
474 | /* I/O functions for GF1/InterWave chip - gus_io.c */ | 474 | /* I/O functions for GF1/InterWave chip - gus_io.c */ |
diff --git a/include/sound/hwdep.h b/include/sound/hwdep.h index c679e5b31111..94c387b5d724 100644 --- a/include/sound/hwdep.h +++ b/include/sound/hwdep.h | |||
@@ -60,7 +60,7 @@ struct snd_hwdep { | |||
60 | void *private_data; | 60 | void *private_data; |
61 | void (*private_free) (struct snd_hwdep *hwdep); | 61 | void (*private_free) (struct snd_hwdep *hwdep); |
62 | 62 | ||
63 | struct semaphore open_mutex; | 63 | struct mutex open_mutex; |
64 | int used; | 64 | int used; |
65 | unsigned int dsp_loaded; | 65 | unsigned int dsp_loaded; |
66 | unsigned int exclusive: 1; | 66 | unsigned int exclusive: 1; |
diff --git a/include/sound/i2c.h b/include/sound/i2c.h index 81eb23ed761f..d125ff8c85e8 100644 --- a/include/sound/i2c.h +++ b/include/sound/i2c.h | |||
@@ -55,7 +55,7 @@ struct snd_i2c_bus { | |||
55 | struct snd_card *card; /* card which I2C belongs to */ | 55 | struct snd_card *card; /* card which I2C belongs to */ |
56 | char name[32]; /* some useful label */ | 56 | char name[32]; /* some useful label */ |
57 | 57 | ||
58 | struct semaphore lock_mutex; | 58 | struct mutex lock_mutex; |
59 | 59 | ||
60 | struct snd_i2c_bus *master; /* master bus when SCK/SCL is shared */ | 60 | struct snd_i2c_bus *master; /* master bus when SCK/SCL is shared */ |
61 | struct list_head buses; /* master: slave buses sharing SCK/SCL, slave: link list */ | 61 | struct list_head buses; /* master: slave buses sharing SCK/SCL, slave: link list */ |
@@ -84,17 +84,17 @@ int snd_i2c_device_free(struct snd_i2c_device *device); | |||
84 | static inline void snd_i2c_lock(struct snd_i2c_bus *bus) | 84 | static inline void snd_i2c_lock(struct snd_i2c_bus *bus) |
85 | { | 85 | { |
86 | if (bus->master) | 86 | if (bus->master) |
87 | down(&bus->master->lock_mutex); | 87 | mutex_lock(&bus->master->lock_mutex); |
88 | else | 88 | else |
89 | down(&bus->lock_mutex); | 89 | mutex_lock(&bus->lock_mutex); |
90 | } | 90 | } |
91 | 91 | ||
92 | static inline void snd_i2c_unlock(struct snd_i2c_bus *bus) | 92 | static inline void snd_i2c_unlock(struct snd_i2c_bus *bus) |
93 | { | 93 | { |
94 | if (bus->master) | 94 | if (bus->master) |
95 | up(&bus->master->lock_mutex); | 95 | mutex_unlock(&bus->master->lock_mutex); |
96 | else | 96 | else |
97 | up(&bus->lock_mutex); | 97 | mutex_unlock(&bus->lock_mutex); |
98 | } | 98 | } |
99 | 99 | ||
100 | int snd_i2c_sendbytes(struct snd_i2c_device *device, unsigned char *bytes, int count); | 100 | int snd_i2c_sendbytes(struct snd_i2c_device *device, unsigned char *bytes, int count); |
diff --git a/include/sound/info.h b/include/sound/info.h index 8ea5c7497c03..f23d8381c216 100644 --- a/include/sound/info.h +++ b/include/sound/info.h | |||
@@ -84,7 +84,7 @@ struct snd_info_entry { | |||
84 | void *private_data; | 84 | void *private_data; |
85 | void (*private_free)(struct snd_info_entry *entry); | 85 | void (*private_free)(struct snd_info_entry *entry); |
86 | struct proc_dir_entry *p; | 86 | struct proc_dir_entry *p; |
87 | struct semaphore access; | 87 | struct mutex access; |
88 | }; | 88 | }; |
89 | 89 | ||
90 | #if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS) | 90 | #if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS) |
diff --git a/include/sound/mixer_oss.h b/include/sound/mixer_oss.h index ca5b4822b62c..197b9e3d612b 100644 --- a/include/sound/mixer_oss.h +++ b/include/sound/mixer_oss.h | |||
@@ -61,7 +61,7 @@ struct snd_mixer_oss { | |||
61 | unsigned int active_index); | 61 | unsigned int active_index); |
62 | void *private_data_recsrc; | 62 | void *private_data_recsrc; |
63 | void (*private_free_recsrc)(struct snd_mixer_oss *mixer); | 63 | void (*private_free_recsrc)(struct snd_mixer_oss *mixer); |
64 | struct semaphore reg_mutex; | 64 | struct mutex reg_mutex; |
65 | struct snd_info_entry *proc_entry; | 65 | struct snd_info_entry *proc_entry; |
66 | int oss_dev_alloc; | 66 | int oss_dev_alloc; |
67 | /* --- */ | 67 | /* --- */ |
diff --git a/include/sound/opl3.h b/include/sound/opl3.h index 83392641cb47..444907166f97 100644 --- a/include/sound/opl3.h +++ b/include/sound/opl3.h | |||
@@ -53,6 +53,7 @@ | |||
53 | 53 | ||
54 | #include "driver.h" | 54 | #include "driver.h" |
55 | #include <linux/time.h> | 55 | #include <linux/time.h> |
56 | #include <linux/mutex.h> | ||
56 | #include "core.h" | 57 | #include "core.h" |
57 | #include "hwdep.h" | 58 | #include "hwdep.h" |
58 | #include "timer.h" | 59 | #include "timer.h" |
@@ -312,7 +313,7 @@ struct snd_opl3 { | |||
312 | int sys_timer_status; /* system timer run status */ | 313 | int sys_timer_status; /* system timer run status */ |
313 | spinlock_t sys_timer_lock; /* Lock for system timer access */ | 314 | spinlock_t sys_timer_lock; /* Lock for system timer access */ |
314 | #endif | 315 | #endif |
315 | struct semaphore access_mutex; /* locking */ | 316 | struct mutex access_mutex; /* locking */ |
316 | }; | 317 | }; |
317 | 318 | ||
318 | /* opl3.c */ | 319 | /* opl3.c */ |
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 314268a11048..15b885660bf0 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -420,7 +420,7 @@ struct snd_pcm { | |||
420 | char id[64]; | 420 | char id[64]; |
421 | char name[80]; | 421 | char name[80]; |
422 | struct snd_pcm_str streams[2]; | 422 | struct snd_pcm_str streams[2]; |
423 | struct semaphore open_mutex; | 423 | struct mutex open_mutex; |
424 | wait_queue_head_t open_wait; | 424 | wait_queue_head_t open_wait; |
425 | void *private_data; | 425 | void *private_data; |
426 | void (*private_free) (struct snd_pcm *pcm); | 426 | void (*private_free) (struct snd_pcm *pcm); |
diff --git a/include/sound/pcm_oss.h b/include/sound/pcm_oss.h index fddaddde47b4..bff0778e1969 100644 --- a/include/sound/pcm_oss.h +++ b/include/sound/pcm_oss.h | |||
@@ -56,8 +56,10 @@ struct snd_pcm_oss_runtime { | |||
56 | size_t mmap_bytes; | 56 | size_t mmap_bytes; |
57 | char *buffer; /* vmallocated period */ | 57 | char *buffer; /* vmallocated period */ |
58 | size_t buffer_used; /* used length from period buffer */ | 58 | size_t buffer_used; /* used length from period buffer */ |
59 | #ifdef CONFIG_SND_PCM_OSS_PLUGINS | ||
59 | struct snd_pcm_plugin *plugin_first; | 60 | struct snd_pcm_plugin *plugin_first; |
60 | struct snd_pcm_plugin *plugin_last; | 61 | struct snd_pcm_plugin *plugin_last; |
62 | #endif | ||
61 | unsigned int prev_hw_ptr_interrupt; | 63 | unsigned int prev_hw_ptr_interrupt; |
62 | }; | 64 | }; |
63 | 65 | ||
@@ -73,7 +75,7 @@ struct snd_pcm_oss_substream { | |||
73 | 75 | ||
74 | struct snd_pcm_oss_stream { | 76 | struct snd_pcm_oss_stream { |
75 | struct snd_pcm_oss_setup *setup_list; /* setup list */ | 77 | struct snd_pcm_oss_setup *setup_list; /* setup list */ |
76 | struct semaphore setup_mutex; | 78 | struct mutex setup_mutex; |
77 | struct snd_info_entry *proc_entry; | 79 | struct snd_info_entry *proc_entry; |
78 | }; | 80 | }; |
79 | 81 | ||
diff --git a/include/sound/rawmidi.h b/include/sound/rawmidi.h index d19bddfbf995..584e73dd4793 100644 --- a/include/sound/rawmidi.h +++ b/include/sound/rawmidi.h | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/spinlock.h> | 27 | #include <linux/spinlock.h> |
28 | #include <linux/wait.h> | 28 | #include <linux/wait.h> |
29 | #include <asm/semaphore.h> | 29 | #include <linux/mutex.h> |
30 | 30 | ||
31 | #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) | 31 | #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) |
32 | #include "seq_device.h" | 32 | #include "seq_device.h" |
@@ -130,7 +130,7 @@ struct snd_rawmidi { | |||
130 | void *private_data; | 130 | void *private_data; |
131 | void (*private_free) (struct snd_rawmidi *rmidi); | 131 | void (*private_free) (struct snd_rawmidi *rmidi); |
132 | 132 | ||
133 | struct semaphore open_mutex; | 133 | struct mutex open_mutex; |
134 | wait_queue_head_t open_wait; | 134 | wait_queue_head_t open_wait; |
135 | 135 | ||
136 | struct snd_info_entry *dev; | 136 | struct snd_info_entry *dev; |
diff --git a/include/sound/sb16_csp.h b/include/sound/sb16_csp.h index 3b44d4b370f5..caf6fe21514d 100644 --- a/include/sound/sb16_csp.h +++ b/include/sound/sb16_csp.h | |||
@@ -158,7 +158,7 @@ struct snd_sb_csp { | |||
158 | struct snd_kcontrol *qsound_switch; | 158 | struct snd_kcontrol *qsound_switch; |
159 | struct snd_kcontrol *qsound_space; | 159 | struct snd_kcontrol *qsound_space; |
160 | 160 | ||
161 | struct semaphore access_mutex; /* locking */ | 161 | struct mutex access_mutex; /* locking */ |
162 | }; | 162 | }; |
163 | 163 | ||
164 | int snd_sb_csp_new(struct snd_sb *chip, int device, struct snd_hwdep ** rhwdep); | 164 | int snd_sb_csp_new(struct snd_sb *chip, int device, struct snd_hwdep ** rhwdep); |
diff --git a/include/sound/seq_instr.h b/include/sound/seq_instr.h index db764f09efb7..f2db03bfd74e 100644 --- a/include/sound/seq_instr.h +++ b/include/sound/seq_instr.h | |||
@@ -64,7 +64,7 @@ struct snd_seq_kinstr_list { | |||
64 | 64 | ||
65 | spinlock_t lock; | 65 | spinlock_t lock; |
66 | spinlock_t ops_lock; | 66 | spinlock_t ops_lock; |
67 | struct semaphore ops_mutex; | 67 | struct mutex ops_mutex; |
68 | unsigned long ops_flags; | 68 | unsigned long ops_flags; |
69 | }; | 69 | }; |
70 | 70 | ||
diff --git a/include/sound/soundfont.h b/include/sound/soundfont.h index 61a010c65d02..f95d99ba7f74 100644 --- a/include/sound/soundfont.h +++ b/include/sound/soundfont.h | |||
@@ -93,7 +93,7 @@ struct snd_sf_list { | |||
93 | int sample_locked; /* locked time for sample */ | 93 | int sample_locked; /* locked time for sample */ |
94 | struct snd_sf_callback callback; /* callback functions */ | 94 | struct snd_sf_callback callback; /* callback functions */ |
95 | int presets_locked; | 95 | int presets_locked; |
96 | struct semaphore presets_mutex; | 96 | struct mutex presets_mutex; |
97 | spinlock_t lock; | 97 | spinlock_t lock; |
98 | struct snd_util_memhdr *memhdr; | 98 | struct snd_util_memhdr *memhdr; |
99 | }; | 99 | }; |
diff --git a/include/sound/util_mem.h b/include/sound/util_mem.h index 69944bbb5445..a1fb706b59a6 100644 --- a/include/sound/util_mem.h +++ b/include/sound/util_mem.h | |||
@@ -1,5 +1,7 @@ | |||
1 | #ifndef __SOUND_UTIL_MEM_H | 1 | #ifndef __SOUND_UTIL_MEM_H |
2 | #define __SOUND_UTIL_MEM_H | 2 | #define __SOUND_UTIL_MEM_H |
3 | |||
4 | #include <linux/mutex.h> | ||
3 | /* | 5 | /* |
4 | * Copyright (C) 2000 Takashi Iwai <tiwai@suse.de> | 6 | * Copyright (C) 2000 Takashi Iwai <tiwai@suse.de> |
5 | * | 7 | * |
@@ -40,7 +42,7 @@ struct snd_util_memhdr { | |||
40 | int nblocks; /* # of allocated blocks */ | 42 | int nblocks; /* # of allocated blocks */ |
41 | unsigned int used; /* used memory size */ | 43 | unsigned int used; /* used memory size */ |
42 | int block_extra_size; /* extra data size of chunk */ | 44 | int block_extra_size; /* extra data size of chunk */ |
43 | struct semaphore block_mutex; /* lock */ | 45 | struct mutex block_mutex; /* lock */ |
44 | }; | 46 | }; |
45 | 47 | ||
46 | /* | 48 | /* |
diff --git a/include/sound/version.h b/include/sound/version.h index 919da0dd001c..4f0e65808cf1 100644 --- a/include/sound/version.h +++ b/include/sound/version.h | |||
@@ -1,3 +1,3 @@ | |||
1 | /* include/version.h. Generated by configure. */ | 1 | /* include/version.h. Generated by configure. */ |
2 | #define CONFIG_SND_VERSION "1.0.11rc2" | 2 | #define CONFIG_SND_VERSION "1.0.11rc4" |
3 | #define CONFIG_SND_DATE " (Wed Jan 04 08:57:20 2006 UTC)" | 3 | #define CONFIG_SND_DATE " (Wed Mar 22 10:27:24 2006 UTC)" |
diff --git a/include/sound/vx_core.h b/include/sound/vx_core.h index 5fd6f3305e0d..9821a6194caa 100644 --- a/include/sound/vx_core.h +++ b/include/sound/vx_core.h | |||
@@ -206,7 +206,7 @@ struct vx_core { | |||
206 | int audio_monitor[4]; /* playback hw-monitor level */ | 206 | int audio_monitor[4]; /* playback hw-monitor level */ |
207 | unsigned char audio_monitor_active[4]; /* playback hw-monitor mute/unmute */ | 207 | unsigned char audio_monitor_active[4]; /* playback hw-monitor mute/unmute */ |
208 | 208 | ||
209 | struct semaphore mixer_mutex; | 209 | struct mutex mixer_mutex; |
210 | 210 | ||
211 | const struct firmware *firmware[4]; /* loaded firmware data */ | 211 | const struct firmware *firmware[4]; /* loaded firmware data */ |
212 | }; | 212 | }; |
diff --git a/include/sound/ymfpci.h b/include/sound/ymfpci.h index d567bfdbf513..d41cda97e952 100644 --- a/include/sound/ymfpci.h +++ b/include/sound/ymfpci.h | |||
@@ -269,9 +269,10 @@ struct snd_ymfpci_pcm { | |||
269 | enum snd_ymfpci_pcm_type type; | 269 | enum snd_ymfpci_pcm_type type; |
270 | struct snd_pcm_substream *substream; | 270 | struct snd_pcm_substream *substream; |
271 | struct snd_ymfpci_voice *voices[2]; /* playback only */ | 271 | struct snd_ymfpci_voice *voices[2]; /* playback only */ |
272 | unsigned int running: 1; | 272 | unsigned int running: 1, |
273 | unsigned int output_front: 1; | 273 | output_front: 1, |
274 | unsigned int output_rear: 1; | 274 | output_rear: 1, |
275 | swap_rear: 1; | ||
275 | unsigned int update_pcm_vol; | 276 | unsigned int update_pcm_vol; |
276 | u32 period_size; /* cached from runtime->period_size */ | 277 | u32 period_size; /* cached from runtime->period_size */ |
277 | u32 buffer_size; /* cached from runtime->buffer_size */ | 278 | u32 buffer_size; /* cached from runtime->buffer_size */ |
@@ -344,6 +345,7 @@ struct snd_ymfpci { | |||
344 | struct snd_kcontrol *spdif_pcm_ctl; | 345 | struct snd_kcontrol *spdif_pcm_ctl; |
345 | int mode_dup4ch; | 346 | int mode_dup4ch; |
346 | int rear_opened; | 347 | int rear_opened; |
348 | int rear_swap; | ||
347 | int spdif_opened; | 349 | int spdif_opened; |
348 | struct { | 350 | struct { |
349 | u16 left; | 351 | u16 left; |
@@ -376,7 +378,7 @@ int snd_ymfpci_pcm(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm); | |||
376 | int snd_ymfpci_pcm2(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm); | 378 | int snd_ymfpci_pcm2(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm); |
377 | int snd_ymfpci_pcm_spdif(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm); | 379 | int snd_ymfpci_pcm_spdif(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm); |
378 | int snd_ymfpci_pcm_4ch(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm); | 380 | int snd_ymfpci_pcm_4ch(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm); |
379 | int snd_ymfpci_mixer(struct snd_ymfpci *chip, int rear_switch); | 381 | int snd_ymfpci_mixer(struct snd_ymfpci *chip, int rear_switch, int rear_swap); |
380 | int snd_ymfpci_timer(struct snd_ymfpci *chip, int device); | 382 | int snd_ymfpci_timer(struct snd_ymfpci *chip, int device); |
381 | 383 | ||
382 | #endif /* __SOUND_YMFPCI_H */ | 384 | #endif /* __SOUND_YMFPCI_H */ |