diff options
author | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-07-19 17:49:39 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-07-19 17:49:39 -0400 |
commit | 39299d9d15c41cbdd7c7009967cd35afaf34d8fa (patch) | |
tree | 42a0c0408fcf76024eb6885a27d4f1ed0228abcf /include | |
parent | ce625a801664d8ed7344117bbb57510e4e0e872c (diff) | |
parent | f60f700876cd51de9de69f3a3c865d95e287a24d (diff) |
Merge with /shiny/git/linux-2.6/.git
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-arm/arch-shark/io.h | 147 | ||||
-rw-r--r-- | include/asm-arm/smp.h | 3 | ||||
-rw-r--r-- | include/asm-ia64/pci.h | 1 | ||||
-rw-r--r-- | include/asm-ia64/sn/pcibr_provider.h | 2 | ||||
-rw-r--r-- | include/asm-ia64/sn/pcibus_provider_defs.h | 3 | ||||
-rw-r--r-- | include/asm-ia64/sn/simulator.h | 9 | ||||
-rw-r--r-- | include/asm-ia64/topology.h | 5 | ||||
-rw-r--r-- | include/asm-ppc/mmu_context.h | 2 | ||||
-rw-r--r-- | include/asm-ppc64/iSeries/HvCallHpt.h | 11 | ||||
-rw-r--r-- | include/asm-ppc64/machdep.h | 6 | ||||
-rw-r--r-- | include/asm-ppc64/mmu.h | 83 | ||||
-rw-r--r-- | include/asm-um/ldt.h | 5 | ||||
-rw-r--r-- | include/linux/fadvise.h | 10 | ||||
-rw-r--r-- | include/linux/fs.h | 3 | ||||
-rw-r--r-- | include/linux/fsnotify.h | 2 | ||||
-rw-r--r-- | include/linux/raid/bitmap.h | 2 | ||||
-rw-r--r-- | include/linux/serial.h | 6 | ||||
-rw-r--r-- | include/linux/serialP.h | 1 | ||||
-rw-r--r-- | include/linux/serial_core.h | 5 | ||||
-rw-r--r-- | include/linux/sysctl.h | 12 |
20 files changed, 82 insertions, 236 deletions
diff --git a/include/asm-arm/arch-shark/io.h b/include/asm-arm/arch-shark/io.h index 1e7f26bc2e1d..5e6ed0038b2b 100644 --- a/include/asm-arm/arch-shark/io.h +++ b/include/asm-arm/arch-shark/io.h | |||
@@ -21,38 +21,8 @@ | |||
21 | */ | 21 | */ |
22 | #define __PORT_PCIO(x) (!((x) & 0x80000000)) | 22 | #define __PORT_PCIO(x) (!((x) & 0x80000000)) |
23 | 23 | ||
24 | /* | 24 | #define __io(a) ((void __iomem *)(PCIO_BASE + (a))) |
25 | * Dynamic IO functions - let the compiler | ||
26 | * optimize the expressions | ||
27 | */ | ||
28 | #define DECLARE_DYN_OUT(fnsuffix,instr) \ | ||
29 | static inline void __out##fnsuffix (unsigned int value, unsigned int port) \ | ||
30 | { \ | ||
31 | unsigned long temp; \ | ||
32 | __asm__ __volatile__( \ | ||
33 | "tst %2, #0x80000000\n\t" \ | ||
34 | "mov %0, %4\n\t" \ | ||
35 | "addeq %0, %0, %3\n\t" \ | ||
36 | "str" instr " %1, [%0, %2] @ out" #fnsuffix \ | ||
37 | : "=&r" (temp) \ | ||
38 | : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) \ | ||
39 | : "cc"); \ | ||
40 | } | ||
41 | 25 | ||
42 | #define DECLARE_DYN_IN(sz,fnsuffix,instr) \ | ||
43 | static inline unsigned sz __in##fnsuffix (unsigned int port) \ | ||
44 | { \ | ||
45 | unsigned long temp, value; \ | ||
46 | __asm__ __volatile__( \ | ||
47 | "tst %2, #0x80000000\n\t" \ | ||
48 | "mov %0, %4\n\t" \ | ||
49 | "addeq %0, %0, %3\n\t" \ | ||
50 | "ldr" instr " %1, [%0, %2] @ in" #fnsuffix \ | ||
51 | : "=&r" (temp), "=r" (value) \ | ||
52 | : "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) \ | ||
53 | : "cc"); \ | ||
54 | return (unsigned sz)value; \ | ||
55 | } | ||
56 | 26 | ||
57 | static inline unsigned int __ioaddr (unsigned int port) \ | 27 | static inline unsigned int __ioaddr (unsigned int port) \ |
58 | { \ | 28 | { \ |
@@ -62,123 +32,8 @@ static inline unsigned int __ioaddr (unsigned int port) \ | |||
62 | return (unsigned int)(IO_BASE + (port)); \ | 32 | return (unsigned int)(IO_BASE + (port)); \ |
63 | } | 33 | } |
64 | 34 | ||
65 | #define DECLARE_IO(sz,fnsuffix,instr) \ | ||
66 | DECLARE_DYN_OUT(fnsuffix,instr) \ | ||
67 | DECLARE_DYN_IN(sz,fnsuffix,instr) | ||
68 | |||
69 | DECLARE_IO(char,b,"b") | ||
70 | DECLARE_IO(short,w,"h") | ||
71 | DECLARE_IO(long,l,"") | ||
72 | |||
73 | #undef DECLARE_IO | ||
74 | #undef DECLARE_DYN_OUT | ||
75 | #undef DECLARE_DYN_IN | ||
76 | |||
77 | /* | ||
78 | * Constant address IO functions | ||
79 | * | ||
80 | * These have to be macros for the 'J' constraint to work - | ||
81 | * +/-4096 immediate operand. | ||
82 | */ | ||
83 | #define __outbc(value,port) \ | ||
84 | ({ \ | ||
85 | if (__PORT_PCIO((port))) \ | ||
86 | __asm__ __volatile__( \ | ||
87 | "strb %0, [%1, %2] @ outbc" \ | ||
88 | : : "r" (value), "r" (PCIO_BASE), "Jr" (port)); \ | ||
89 | else \ | ||
90 | __asm__ __volatile__( \ | ||
91 | "strb %0, [%1, %2] @ outbc" \ | ||
92 | : : "r" (value), "r" (IO_BASE), "r" (port)); \ | ||
93 | }) | ||
94 | |||
95 | #define __inbc(port) \ | ||
96 | ({ \ | ||
97 | unsigned char result; \ | ||
98 | if (__PORT_PCIO((port))) \ | ||
99 | __asm__ __volatile__( \ | ||
100 | "ldrb %0, [%1, %2] @ inbc" \ | ||
101 | : "=r" (result) : "r" (PCIO_BASE), "Jr" (port)); \ | ||
102 | else \ | ||
103 | __asm__ __volatile__( \ | ||
104 | "ldrb %0, [%1, %2] @ inbc" \ | ||
105 | : "=r" (result) : "r" (IO_BASE), "r" (port)); \ | ||
106 | result; \ | ||
107 | }) | ||
108 | |||
109 | #define __outwc(value,port) \ | ||
110 | ({ \ | ||
111 | unsigned long v = value; \ | ||
112 | if (__PORT_PCIO((port))) \ | ||
113 | __asm__ __volatile__( \ | ||
114 | "strh %0, [%1, %2] @ outwc" \ | ||
115 | : : "r" (v|v<<16), "r" (PCIO_BASE), "Jr" (port)); \ | ||
116 | else \ | ||
117 | __asm__ __volatile__( \ | ||
118 | "strh %0, [%1, %2] @ outwc" \ | ||
119 | : : "r" (v|v<<16), "r" (IO_BASE), "r" (port)); \ | ||
120 | }) | ||
121 | |||
122 | #define __inwc(port) \ | ||
123 | ({ \ | ||
124 | unsigned short result; \ | ||
125 | if (__PORT_PCIO((port))) \ | ||
126 | __asm__ __volatile__( \ | ||
127 | "ldrh %0, [%1, %2] @ inwc" \ | ||
128 | : "=r" (result) : "r" (PCIO_BASE), "Jr" (port)); \ | ||
129 | else \ | ||
130 | __asm__ __volatile__( \ | ||
131 | "ldrh %0, [%1, %2] @ inwc" \ | ||
132 | : "=r" (result) : "r" (IO_BASE), "r" (port)); \ | ||
133 | result & 0xffff; \ | ||
134 | }) | ||
135 | |||
136 | #define __outlc(value,port) \ | ||
137 | ({ \ | ||
138 | unsigned long v = value; \ | ||
139 | if (__PORT_PCIO((port))) \ | ||
140 | __asm__ __volatile__( \ | ||
141 | "str %0, [%1, %2] @ outlc" \ | ||
142 | : : "r" (v), "r" (PCIO_BASE), "Jr" (port)); \ | ||
143 | else \ | ||
144 | __asm__ __volatile__( \ | ||
145 | "str %0, [%1, %2] @ outlc" \ | ||
146 | : : "r" (v), "r" (IO_BASE), "r" (port)); \ | ||
147 | }) | ||
148 | |||
149 | #define __inlc(port) \ | ||
150 | ({ \ | ||
151 | unsigned long result; \ | ||
152 | if (__PORT_PCIO((port))) \ | ||
153 | __asm__ __volatile__( \ | ||
154 | "ldr %0, [%1, %2] @ inlc" \ | ||
155 | : "=r" (result) : "r" (PCIO_BASE), "Jr" (port)); \ | ||
156 | else \ | ||
157 | __asm__ __volatile__( \ | ||
158 | "ldr %0, [%1, %2] @ inlc" \ | ||
159 | : "=r" (result) : "r" (IO_BASE), "r" (port)); \ | ||
160 | result; \ | ||
161 | }) | ||
162 | |||
163 | #define __ioaddrc(port) \ | ||
164 | ({ \ | ||
165 | unsigned long addr; \ | ||
166 | if (__PORT_PCIO((port))) \ | ||
167 | addr = PCIO_BASE + (port); \ | ||
168 | else \ | ||
169 | addr = IO_BASE + (port); \ | ||
170 | addr; \ | ||
171 | }) | ||
172 | |||
173 | #define __mem_pci(addr) (addr) | 35 | #define __mem_pci(addr) (addr) |
174 | 36 | ||
175 | #define inb(p) (__builtin_constant_p((p)) ? __inbc(p) : __inb(p)) | ||
176 | #define inw(p) (__builtin_constant_p((p)) ? __inwc(p) : __inw(p)) | ||
177 | #define inl(p) (__builtin_constant_p((p)) ? __inlc(p) : __inl(p)) | ||
178 | #define outb(v,p) (__builtin_constant_p((p)) ? __outbc(v,p) : __outb(v,p)) | ||
179 | #define outw(v,p) (__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p)) | ||
180 | #define outl(v,p) (__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p)) | ||
181 | |||
182 | /* | 37 | /* |
183 | * Translated address IO functions | 38 | * Translated address IO functions |
184 | * | 39 | * |
diff --git a/include/asm-arm/smp.h b/include/asm-arm/smp.h index 6c6c60adbbaa..dbb4d859c586 100644 --- a/include/asm-arm/smp.h +++ b/include/asm-arm/smp.h | |||
@@ -23,9 +23,6 @@ | |||
23 | 23 | ||
24 | #define raw_smp_processor_id() (current_thread_info()->cpu) | 24 | #define raw_smp_processor_id() (current_thread_info()->cpu) |
25 | 25 | ||
26 | extern cpumask_t cpu_present_mask; | ||
27 | #define cpu_possible_map cpu_present_mask | ||
28 | |||
29 | /* | 26 | /* |
30 | * at the moment, there's not a big penalty for changing CPUs | 27 | * at the moment, there's not a big penalty for changing CPUs |
31 | * (the >big< penalty is running SMP in the first place) | 28 | * (the >big< penalty is running SMP in the first place) |
diff --git a/include/asm-ia64/pci.h b/include/asm-ia64/pci.h index f11771eadc48..dba9f220be71 100644 --- a/include/asm-ia64/pci.h +++ b/include/asm-ia64/pci.h | |||
@@ -128,6 +128,7 @@ struct pci_controller { | |||
128 | void *acpi_handle; | 128 | void *acpi_handle; |
129 | void *iommu; | 129 | void *iommu; |
130 | int segment; | 130 | int segment; |
131 | int node; /* nearest node with memory or -1 for global allocation */ | ||
131 | 132 | ||
132 | unsigned int windows; | 133 | unsigned int windows; |
133 | struct pci_window *window; | 134 | struct pci_window *window; |
diff --git a/include/asm-ia64/sn/pcibr_provider.h b/include/asm-ia64/sn/pcibr_provider.h index f9b8d2164007..2b42d9ece26b 100644 --- a/include/asm-ia64/sn/pcibr_provider.h +++ b/include/asm-ia64/sn/pcibr_provider.h | |||
@@ -128,7 +128,7 @@ pcibr_lock(struct pcibus_info *pcibus_info) | |||
128 | #define pcibr_unlock(pcibus_info, flag) spin_unlock_irqrestore(&pcibus_info->pbi_lock, flag) | 128 | #define pcibr_unlock(pcibus_info, flag) spin_unlock_irqrestore(&pcibus_info->pbi_lock, flag) |
129 | 129 | ||
130 | extern int pcibr_init_provider(void); | 130 | extern int pcibr_init_provider(void); |
131 | extern void *pcibr_bus_fixup(struct pcibus_bussoft *); | 131 | extern void *pcibr_bus_fixup(struct pcibus_bussoft *, struct pci_controller *); |
132 | extern dma_addr_t pcibr_dma_map(struct pci_dev *, unsigned long, size_t); | 132 | extern dma_addr_t pcibr_dma_map(struct pci_dev *, unsigned long, size_t); |
133 | extern dma_addr_t pcibr_dma_map_consistent(struct pci_dev *, unsigned long, size_t); | 133 | extern dma_addr_t pcibr_dma_map_consistent(struct pci_dev *, unsigned long, size_t); |
134 | extern void pcibr_dma_unmap(struct pci_dev *, dma_addr_t, int); | 134 | extern void pcibr_dma_unmap(struct pci_dev *, dma_addr_t, int); |
diff --git a/include/asm-ia64/sn/pcibus_provider_defs.h b/include/asm-ia64/sn/pcibus_provider_defs.h index 04e27d5b3820..976f5eff0539 100644 --- a/include/asm-ia64/sn/pcibus_provider_defs.h +++ b/include/asm-ia64/sn/pcibus_provider_defs.h | |||
@@ -37,6 +37,7 @@ struct pcibus_bussoft { | |||
37 | struct xwidget_info *bs_xwidget_info; | 37 | struct xwidget_info *bs_xwidget_info; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | struct pci_controller; | ||
40 | /* | 41 | /* |
41 | * SN pci bus indirection | 42 | * SN pci bus indirection |
42 | */ | 43 | */ |
@@ -45,7 +46,7 @@ struct sn_pcibus_provider { | |||
45 | dma_addr_t (*dma_map)(struct pci_dev *, unsigned long, size_t); | 46 | dma_addr_t (*dma_map)(struct pci_dev *, unsigned long, size_t); |
46 | dma_addr_t (*dma_map_consistent)(struct pci_dev *, unsigned long, size_t); | 47 | dma_addr_t (*dma_map_consistent)(struct pci_dev *, unsigned long, size_t); |
47 | void (*dma_unmap)(struct pci_dev *, dma_addr_t, int); | 48 | void (*dma_unmap)(struct pci_dev *, dma_addr_t, int); |
48 | void * (*bus_fixup)(struct pcibus_bussoft *); | 49 | void * (*bus_fixup)(struct pcibus_bussoft *, struct pci_controller *); |
49 | }; | 50 | }; |
50 | 51 | ||
51 | extern struct sn_pcibus_provider *sn_pci_provider[]; | 52 | extern struct sn_pcibus_provider *sn_pci_provider[]; |
diff --git a/include/asm-ia64/sn/simulator.h b/include/asm-ia64/sn/simulator.h index cf770e246af5..16a48b5a039c 100644 --- a/include/asm-ia64/sn/simulator.h +++ b/include/asm-ia64/sn/simulator.h | |||
@@ -13,16 +13,9 @@ | |||
13 | #define SNMAGIC 0xaeeeeeee8badbeefL | 13 | #define SNMAGIC 0xaeeeeeee8badbeefL |
14 | #define IS_MEDUSA() ({long sn; asm("mov %0=cpuid[%1]" : "=r"(sn) : "r"(2)); sn == SNMAGIC;}) | 14 | #define IS_MEDUSA() ({long sn; asm("mov %0=cpuid[%1]" : "=r"(sn) : "r"(2)); sn == SNMAGIC;}) |
15 | 15 | ||
16 | #ifdef CONFIG_IA64_SGI_SN_SIM | ||
17 | #define SIMULATOR_SLEEP() asm("nop.i 0x8beef") | 16 | #define SIMULATOR_SLEEP() asm("nop.i 0x8beef") |
18 | #define IS_RUNNING_ON_SIMULATOR() (sn_prom_type) | 17 | #define IS_RUNNING_ON_SIMULATOR() (sn_prom_type) |
19 | #define IS_RUNNING_ON_FAKE_PROM() (sn_prom_type == 2) | 18 | #define IS_RUNNING_ON_FAKE_PROM() (sn_prom_type == 2) |
20 | extern int sn_prom_type; /* 0=hardware, 1=medusa/realprom, 2=medusa/fakeprom */ | 19 | extern int sn_prom_type; /* 0=hardware, 1=medusa/realprom, 2=medusa/fakeprom */ |
21 | #else | ||
22 | #define IS_RUNNING_ON_SIMULATOR() (0) | ||
23 | #define IS_RUNNING_ON_FAKE_PROM() (0) | ||
24 | #define SIMULATOR_SLEEP() | ||
25 | |||
26 | #endif | ||
27 | 20 | ||
28 | #endif /* _ASM_IA64_SN_SIMULATOR_H */ | 21 | #endif /* _ASM_IA64_SN_SIMULATOR_H */ |
diff --git a/include/asm-ia64/topology.h b/include/asm-ia64/topology.h index 4e64c2a6b369..399bc29729fd 100644 --- a/include/asm-ia64/topology.h +++ b/include/asm-ia64/topology.h | |||
@@ -40,6 +40,11 @@ | |||
40 | */ | 40 | */ |
41 | #define node_to_first_cpu(node) (__ffs(node_to_cpumask(node))) | 41 | #define node_to_first_cpu(node) (__ffs(node_to_cpumask(node))) |
42 | 42 | ||
43 | /* | ||
44 | * Determines the node for a given pci bus | ||
45 | */ | ||
46 | #define pcibus_to_node(bus) PCI_CONTROLLER(bus)->node | ||
47 | |||
43 | void build_cpu_to_node_map(void); | 48 | void build_cpu_to_node_map(void); |
44 | 49 | ||
45 | #define SD_CPU_INIT (struct sched_domain) { \ | 50 | #define SD_CPU_INIT (struct sched_domain) { \ |
diff --git a/include/asm-ppc/mmu_context.h b/include/asm-ppc/mmu_context.h index ccabbce39d85..afe26ffc2e2d 100644 --- a/include/asm-ppc/mmu_context.h +++ b/include/asm-ppc/mmu_context.h | |||
@@ -149,6 +149,7 @@ static inline void get_mmu_context(struct mm_struct *mm) | |||
149 | */ | 149 | */ |
150 | static inline void destroy_context(struct mm_struct *mm) | 150 | static inline void destroy_context(struct mm_struct *mm) |
151 | { | 151 | { |
152 | preempt_disable(); | ||
152 | if (mm->context != NO_CONTEXT) { | 153 | if (mm->context != NO_CONTEXT) { |
153 | clear_bit(mm->context, context_map); | 154 | clear_bit(mm->context, context_map); |
154 | mm->context = NO_CONTEXT; | 155 | mm->context = NO_CONTEXT; |
@@ -156,6 +157,7 @@ static inline void destroy_context(struct mm_struct *mm) | |||
156 | atomic_inc(&nr_free_contexts); | 157 | atomic_inc(&nr_free_contexts); |
157 | #endif | 158 | #endif |
158 | } | 159 | } |
160 | preempt_enable(); | ||
159 | } | 161 | } |
160 | 162 | ||
161 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | 163 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, |
diff --git a/include/asm-ppc64/iSeries/HvCallHpt.h b/include/asm-ppc64/iSeries/HvCallHpt.h index 66f38222ff75..43a1969230b8 100644 --- a/include/asm-ppc64/iSeries/HvCallHpt.h +++ b/include/asm-ppc64/iSeries/HvCallHpt.h | |||
@@ -77,27 +77,26 @@ static inline u64 HvCallHpt_invalidateSetSwBitsGet(u32 hpteIndex, u8 bitson, | |||
77 | return compressedStatus; | 77 | return compressedStatus; |
78 | } | 78 | } |
79 | 79 | ||
80 | static inline u64 HvCallHpt_findValid(HPTE *hpte, u64 vpn) | 80 | static inline u64 HvCallHpt_findValid(hpte_t *hpte, u64 vpn) |
81 | { | 81 | { |
82 | return HvCall3Ret16(HvCallHptFindValid, hpte, vpn, 0, 0); | 82 | return HvCall3Ret16(HvCallHptFindValid, hpte, vpn, 0, 0); |
83 | } | 83 | } |
84 | 84 | ||
85 | static inline u64 HvCallHpt_findNextValid(HPTE *hpte, u32 hpteIndex, | 85 | static inline u64 HvCallHpt_findNextValid(hpte_t *hpte, u32 hpteIndex, |
86 | u8 bitson, u8 bitsoff) | 86 | u8 bitson, u8 bitsoff) |
87 | { | 87 | { |
88 | return HvCall3Ret16(HvCallHptFindNextValid, hpte, hpteIndex, | 88 | return HvCall3Ret16(HvCallHptFindNextValid, hpte, hpteIndex, |
89 | bitson, bitsoff); | 89 | bitson, bitsoff); |
90 | } | 90 | } |
91 | 91 | ||
92 | static inline void HvCallHpt_get(HPTE *hpte, u32 hpteIndex) | 92 | static inline void HvCallHpt_get(hpte_t *hpte, u32 hpteIndex) |
93 | { | 93 | { |
94 | HvCall2Ret16(HvCallHptGet, hpte, hpteIndex, 0); | 94 | HvCall2Ret16(HvCallHptGet, hpte, hpteIndex, 0); |
95 | } | 95 | } |
96 | 96 | ||
97 | static inline void HvCallHpt_addValidate(u32 hpteIndex, u32 hBit, HPTE *hpte) | 97 | static inline void HvCallHpt_addValidate(u32 hpteIndex, u32 hBit, hpte_t *hpte) |
98 | { | 98 | { |
99 | HvCall4(HvCallHptAddValidate, hpteIndex, hBit, (*((u64 *)hpte)), | 99 | HvCall4(HvCallHptAddValidate, hpteIndex, hBit, hpte->v, hpte->r); |
100 | (*(((u64 *)hpte)+1))); | ||
101 | } | 100 | } |
102 | 101 | ||
103 | #endif /* _HVCALLHPT_H */ | 102 | #endif /* _HVCALLHPT_H */ |
diff --git a/include/asm-ppc64/machdep.h b/include/asm-ppc64/machdep.h index 1e6ad4824132..f0c1d2d92672 100644 --- a/include/asm-ppc64/machdep.h +++ b/include/asm-ppc64/machdep.h | |||
@@ -53,10 +53,8 @@ struct machdep_calls { | |||
53 | long (*hpte_insert)(unsigned long hpte_group, | 53 | long (*hpte_insert)(unsigned long hpte_group, |
54 | unsigned long va, | 54 | unsigned long va, |
55 | unsigned long prpn, | 55 | unsigned long prpn, |
56 | int secondary, | 56 | unsigned long vflags, |
57 | unsigned long hpteflags, | 57 | unsigned long rflags); |
58 | int bolted, | ||
59 | int large); | ||
60 | long (*hpte_remove)(unsigned long hpte_group); | 58 | long (*hpte_remove)(unsigned long hpte_group); |
61 | void (*flush_hash_range)(unsigned long context, | 59 | void (*flush_hash_range)(unsigned long context, |
62 | unsigned long number, | 60 | unsigned long number, |
diff --git a/include/asm-ppc64/mmu.h b/include/asm-ppc64/mmu.h index f373de5e3dd9..3d07ddd11e3b 100644 --- a/include/asm-ppc64/mmu.h +++ b/include/asm-ppc64/mmu.h | |||
@@ -60,6 +60,22 @@ | |||
60 | 60 | ||
61 | #define HPTES_PER_GROUP 8 | 61 | #define HPTES_PER_GROUP 8 |
62 | 62 | ||
63 | #define HPTE_V_AVPN_SHIFT 7 | ||
64 | #define HPTE_V_AVPN ASM_CONST(0xffffffffffffff80) | ||
65 | #define HPTE_V_AVPN_VAL(x) (((x) & HPTE_V_AVPN) >> HPTE_V_AVPN_SHIFT) | ||
66 | #define HPTE_V_BOLTED ASM_CONST(0x0000000000000010) | ||
67 | #define HPTE_V_LOCK ASM_CONST(0x0000000000000008) | ||
68 | #define HPTE_V_LARGE ASM_CONST(0x0000000000000004) | ||
69 | #define HPTE_V_SECONDARY ASM_CONST(0x0000000000000002) | ||
70 | #define HPTE_V_VALID ASM_CONST(0x0000000000000001) | ||
71 | |||
72 | #define HPTE_R_PP0 ASM_CONST(0x8000000000000000) | ||
73 | #define HPTE_R_TS ASM_CONST(0x4000000000000000) | ||
74 | #define HPTE_R_RPN_SHIFT 12 | ||
75 | #define HPTE_R_RPN ASM_CONST(0x3ffffffffffff000) | ||
76 | #define HPTE_R_FLAGS ASM_CONST(0x00000000000003ff) | ||
77 | #define HPTE_R_PP ASM_CONST(0x0000000000000003) | ||
78 | |||
63 | /* Values for PP (assumes Ks=0, Kp=1) */ | 79 | /* Values for PP (assumes Ks=0, Kp=1) */ |
64 | /* pp0 will always be 0 for linux */ | 80 | /* pp0 will always be 0 for linux */ |
65 | #define PP_RWXX 0 /* Supervisor read/write, User none */ | 81 | #define PP_RWXX 0 /* Supervisor read/write, User none */ |
@@ -69,54 +85,13 @@ | |||
69 | 85 | ||
70 | #ifndef __ASSEMBLY__ | 86 | #ifndef __ASSEMBLY__ |
71 | 87 | ||
72 | /* Hardware Page Table Entry */ | ||
73 | typedef struct { | ||
74 | unsigned long avpn:57; /* vsid | api == avpn */ | ||
75 | unsigned long : 2; /* Software use */ | ||
76 | unsigned long bolted: 1; /* HPTE is "bolted" */ | ||
77 | unsigned long lock: 1; /* lock on pSeries SMP */ | ||
78 | unsigned long l: 1; /* Virtual page is large (L=1) or 4 KB (L=0) */ | ||
79 | unsigned long h: 1; /* Hash function identifier */ | ||
80 | unsigned long v: 1; /* Valid (v=1) or invalid (v=0) */ | ||
81 | } Hpte_dword0; | ||
82 | |||
83 | typedef struct { | ||
84 | unsigned long pp0: 1; /* Page protection bit 0 */ | ||
85 | unsigned long ts: 1; /* Tag set bit */ | ||
86 | unsigned long rpn: 50; /* Real page number */ | ||
87 | unsigned long : 2; /* Reserved */ | ||
88 | unsigned long ac: 1; /* Address compare */ | ||
89 | unsigned long r: 1; /* Referenced */ | ||
90 | unsigned long c: 1; /* Changed */ | ||
91 | unsigned long w: 1; /* Write-thru cache mode */ | ||
92 | unsigned long i: 1; /* Cache inhibited */ | ||
93 | unsigned long m: 1; /* Memory coherence required */ | ||
94 | unsigned long g: 1; /* Guarded */ | ||
95 | unsigned long n: 1; /* No-execute */ | ||
96 | unsigned long pp: 2; /* Page protection bits 1:2 */ | ||
97 | } Hpte_dword1; | ||
98 | |||
99 | typedef struct { | ||
100 | char padding[6]; /* padding */ | ||
101 | unsigned long : 6; /* padding */ | ||
102 | unsigned long flags: 10; /* HPTE flags */ | ||
103 | } Hpte_dword1_flags; | ||
104 | |||
105 | typedef struct { | 88 | typedef struct { |
106 | union { | 89 | unsigned long v; |
107 | unsigned long dword0; | 90 | unsigned long r; |
108 | Hpte_dword0 dw0; | 91 | } hpte_t; |
109 | } dw0; | ||
110 | |||
111 | union { | ||
112 | unsigned long dword1; | ||
113 | Hpte_dword1 dw1; | ||
114 | Hpte_dword1_flags flags; | ||
115 | } dw1; | ||
116 | } HPTE; | ||
117 | 92 | ||
118 | extern HPTE * htab_address; | 93 | extern hpte_t *htab_address; |
119 | extern unsigned long htab_hash_mask; | 94 | extern unsigned long htab_hash_mask; |
120 | 95 | ||
121 | static inline unsigned long hpt_hash(unsigned long vpn, int large) | 96 | static inline unsigned long hpt_hash(unsigned long vpn, int large) |
122 | { | 97 | { |
@@ -181,18 +156,18 @@ static inline void tlbiel(unsigned long va) | |||
181 | asm volatile("ptesync": : :"memory"); | 156 | asm volatile("ptesync": : :"memory"); |
182 | } | 157 | } |
183 | 158 | ||
184 | static inline unsigned long slot2va(unsigned long avpn, unsigned long large, | 159 | static inline unsigned long slot2va(unsigned long hpte_v, unsigned long slot) |
185 | unsigned long secondary, unsigned long slot) | ||
186 | { | 160 | { |
161 | unsigned long avpn = HPTE_V_AVPN_VAL(hpte_v); | ||
187 | unsigned long va; | 162 | unsigned long va; |
188 | 163 | ||
189 | va = avpn << 23; | 164 | va = avpn << 23; |
190 | 165 | ||
191 | if (!large) { | 166 | if (! (hpte_v & HPTE_V_LARGE)) { |
192 | unsigned long vpi, pteg; | 167 | unsigned long vpi, pteg; |
193 | 168 | ||
194 | pteg = slot / HPTES_PER_GROUP; | 169 | pteg = slot / HPTES_PER_GROUP; |
195 | if (secondary) | 170 | if (hpte_v & HPTE_V_SECONDARY) |
196 | pteg = ~pteg; | 171 | pteg = ~pteg; |
197 | 172 | ||
198 | vpi = ((va >> 28) ^ pteg) & htab_hash_mask; | 173 | vpi = ((va >> 28) ^ pteg) & htab_hash_mask; |
@@ -219,11 +194,11 @@ extern void hpte_init_iSeries(void); | |||
219 | 194 | ||
220 | extern long pSeries_lpar_hpte_insert(unsigned long hpte_group, | 195 | extern long pSeries_lpar_hpte_insert(unsigned long hpte_group, |
221 | unsigned long va, unsigned long prpn, | 196 | unsigned long va, unsigned long prpn, |
222 | int secondary, unsigned long hpteflags, | 197 | unsigned long vflags, |
223 | int bolted, int large); | 198 | unsigned long rflags); |
224 | extern long native_hpte_insert(unsigned long hpte_group, unsigned long va, | 199 | extern long native_hpte_insert(unsigned long hpte_group, unsigned long va, |
225 | unsigned long prpn, int secondary, | 200 | unsigned long prpn, |
226 | unsigned long hpteflags, int bolted, int large); | 201 | unsigned long vflags, unsigned long rflags); |
227 | 202 | ||
228 | #endif /* __ASSEMBLY__ */ | 203 | #endif /* __ASSEMBLY__ */ |
229 | 204 | ||
diff --git a/include/asm-um/ldt.h b/include/asm-um/ldt.h new file mode 100644 index 000000000000..e908439d338a --- /dev/null +++ b/include/asm-um/ldt.h | |||
@@ -0,0 +1,5 @@ | |||
1 | #ifndef __UM_LDT_H | ||
2 | #define __UM_LDT_H | ||
3 | |||
4 | #include "asm/arch/ldt.h" | ||
5 | #endif | ||
diff --git a/include/linux/fadvise.h b/include/linux/fadvise.h index 6fc656dfb93d..e8e747139b9a 100644 --- a/include/linux/fadvise.h +++ b/include/linux/fadvise.h | |||
@@ -5,7 +5,17 @@ | |||
5 | #define POSIX_FADV_RANDOM 1 /* Expect random page references. */ | 5 | #define POSIX_FADV_RANDOM 1 /* Expect random page references. */ |
6 | #define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ | 6 | #define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ |
7 | #define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ | 7 | #define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ |
8 | |||
9 | /* | ||
10 | * The advise values for POSIX_FADV_DONTNEED and POSIX_ADV_NOREUSE | ||
11 | * for s390-64 differ from the values for the rest of the world. | ||
12 | */ | ||
13 | #if defined(__s390x__) | ||
14 | #define POSIX_FADV_DONTNEED 6 /* Don't need these pages. */ | ||
15 | #define POSIX_FADV_NOREUSE 7 /* Data will be accessed once. */ | ||
16 | #else | ||
8 | #define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ | 17 | #define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ |
9 | #define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ | 18 | #define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ |
19 | #endif | ||
10 | 20 | ||
11 | #endif /* FADVISE_H_INCLUDED */ | 21 | #endif /* FADVISE_H_INCLUDED */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index c9bf3746a9fb..0f53e0124941 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1441,6 +1441,9 @@ extern int inode_needs_sync(struct inode *inode); | |||
1441 | extern void generic_delete_inode(struct inode *inode); | 1441 | extern void generic_delete_inode(struct inode *inode); |
1442 | extern void generic_drop_inode(struct inode *inode); | 1442 | extern void generic_drop_inode(struct inode *inode); |
1443 | 1443 | ||
1444 | extern struct inode *ilookup5_nowait(struct super_block *sb, | ||
1445 | unsigned long hashval, int (*test)(struct inode *, void *), | ||
1446 | void *data); | ||
1444 | extern struct inode *ilookup5(struct super_block *sb, unsigned long hashval, | 1447 | extern struct inode *ilookup5(struct super_block *sb, unsigned long hashval, |
1445 | int (*test)(struct inode *, void *), void *data); | 1448 | int (*test)(struct inode *, void *), void *data); |
1446 | extern struct inode *ilookup(struct super_block *sb, unsigned long ino); | 1449 | extern struct inode *ilookup(struct super_block *sb, unsigned long ino); |
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index eb581b6cfca9..d07a92c94776 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
@@ -125,8 +125,8 @@ static inline void fsnotify_open(struct dentry *dentry) | |||
125 | if (S_ISDIR(inode->i_mode)) | 125 | if (S_ISDIR(inode->i_mode)) |
126 | mask |= IN_ISDIR; | 126 | mask |= IN_ISDIR; |
127 | 127 | ||
128 | inotify_inode_queue_event(inode, mask, 0, NULL); | ||
129 | inotify_dentry_parent_queue_event(dentry, mask, 0, dentry->d_name.name); | 128 | inotify_dentry_parent_queue_event(dentry, mask, 0, dentry->d_name.name); |
129 | inotify_inode_queue_event(inode, mask, 0, NULL); | ||
130 | } | 130 | } |
131 | 131 | ||
132 | /* | 132 | /* |
diff --git a/include/linux/raid/bitmap.h b/include/linux/raid/bitmap.h index e24b74b11150..6213e976eade 100644 --- a/include/linux/raid/bitmap.h +++ b/include/linux/raid/bitmap.h | |||
@@ -262,7 +262,7 @@ void bitmap_write_all(struct bitmap *bitmap); | |||
262 | int bitmap_startwrite(struct bitmap *bitmap, sector_t offset, unsigned long sectors); | 262 | int bitmap_startwrite(struct bitmap *bitmap, sector_t offset, unsigned long sectors); |
263 | void bitmap_endwrite(struct bitmap *bitmap, sector_t offset, unsigned long sectors, | 263 | void bitmap_endwrite(struct bitmap *bitmap, sector_t offset, unsigned long sectors, |
264 | int success); | 264 | int success); |
265 | int bitmap_start_sync(struct bitmap *bitmap, sector_t offset, int *blocks); | 265 | int bitmap_start_sync(struct bitmap *bitmap, sector_t offset, int *blocks, int degraded); |
266 | void bitmap_end_sync(struct bitmap *bitmap, sector_t offset, int *blocks, int aborted); | 266 | void bitmap_end_sync(struct bitmap *bitmap, sector_t offset, int *blocks, int aborted); |
267 | void bitmap_close_sync(struct bitmap *bitmap); | 267 | void bitmap_close_sync(struct bitmap *bitmap); |
268 | 268 | ||
diff --git a/include/linux/serial.h b/include/linux/serial.h index 00145822fb74..9f2d85284d0b 100644 --- a/include/linux/serial.h +++ b/include/linux/serial.h | |||
@@ -174,9 +174,11 @@ struct serial_icounter_struct { | |||
174 | 174 | ||
175 | 175 | ||
176 | #ifdef __KERNEL__ | 176 | #ifdef __KERNEL__ |
177 | #include <linux/compiler.h> | ||
178 | |||
177 | /* Export to allow PCMCIA to use this - Dave Hinds */ | 179 | /* Export to allow PCMCIA to use this - Dave Hinds */ |
178 | extern int register_serial(struct serial_struct *req); | 180 | extern int __deprecated register_serial(struct serial_struct *req); |
179 | extern void unregister_serial(int line); | 181 | extern void __deprecated unregister_serial(int line); |
180 | 182 | ||
181 | /* Allow architectures to override entries in serial8250_ports[] at run time: */ | 183 | /* Allow architectures to override entries in serial8250_ports[] at run time: */ |
182 | struct uart_port; /* forward declaration */ | 184 | struct uart_port; /* forward declaration */ |
diff --git a/include/linux/serialP.h b/include/linux/serialP.h index 2307f11d8a6b..2b2f35a64d75 100644 --- a/include/linux/serialP.h +++ b/include/linux/serialP.h | |||
@@ -19,7 +19,6 @@ | |||
19 | * For definitions of the flags field, see tty.h | 19 | * For definitions of the flags field, see tty.h |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/version.h> | ||
23 | #include <linux/config.h> | 22 | #include <linux/config.h> |
24 | #include <linux/termios.h> | 23 | #include <linux/termios.h> |
25 | #include <linux/workqueue.h> | 24 | #include <linux/workqueue.h> |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index d6025af7efac..30b64f3534f4 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -122,6 +122,7 @@ | |||
122 | #ifdef __KERNEL__ | 122 | #ifdef __KERNEL__ |
123 | 123 | ||
124 | #include <linux/config.h> | 124 | #include <linux/config.h> |
125 | #include <linux/compiler.h> | ||
125 | #include <linux/interrupt.h> | 126 | #include <linux/interrupt.h> |
126 | #include <linux/circ_buf.h> | 127 | #include <linux/circ_buf.h> |
127 | #include <linux/spinlock.h> | 128 | #include <linux/spinlock.h> |
@@ -359,8 +360,8 @@ struct tty_driver *uart_console_device(struct console *co, int *index); | |||
359 | */ | 360 | */ |
360 | int uart_register_driver(struct uart_driver *uart); | 361 | int uart_register_driver(struct uart_driver *uart); |
361 | void uart_unregister_driver(struct uart_driver *uart); | 362 | void uart_unregister_driver(struct uart_driver *uart); |
362 | void uart_unregister_port(struct uart_driver *reg, int line); | 363 | void __deprecated uart_unregister_port(struct uart_driver *reg, int line); |
363 | int uart_register_port(struct uart_driver *reg, struct uart_port *port); | 364 | int __deprecated uart_register_port(struct uart_driver *reg, struct uart_port *port); |
364 | int uart_add_one_port(struct uart_driver *reg, struct uart_port *port); | 365 | int uart_add_one_port(struct uart_driver *reg, struct uart_port *port); |
365 | int uart_remove_one_port(struct uart_driver *reg, struct uart_port *port); | 366 | int uart_remove_one_port(struct uart_driver *reg, struct uart_port *port); |
366 | int uart_match_port(struct uart_port *port1, struct uart_port *port2); | 367 | int uart_match_port(struct uart_port *port1, struct uart_port *port2); |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index ce19a2aa0b21..bfbbe94b297d 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -61,8 +61,7 @@ enum | |||
61 | CTL_DEV=7, /* Devices */ | 61 | CTL_DEV=7, /* Devices */ |
62 | CTL_BUS=8, /* Busses */ | 62 | CTL_BUS=8, /* Busses */ |
63 | CTL_ABI=9, /* Binary emulation */ | 63 | CTL_ABI=9, /* Binary emulation */ |
64 | CTL_CPU=10, /* CPU stuff (speed scaling, etc) */ | 64 | CTL_CPU=10 /* CPU stuff (speed scaling, etc) */ |
65 | CTL_INOTIFY=11 /* Inotify */ | ||
66 | }; | 65 | }; |
67 | 66 | ||
68 | /* CTL_BUS names: */ | 67 | /* CTL_BUS names: */ |
@@ -71,12 +70,12 @@ enum | |||
71 | CTL_BUS_ISA=1 /* ISA */ | 70 | CTL_BUS_ISA=1 /* ISA */ |
72 | }; | 71 | }; |
73 | 72 | ||
74 | /* CTL_INOTIFY names: */ | 73 | /* /proc/sys/fs/inotify/ */ |
75 | enum | 74 | enum |
76 | { | 75 | { |
77 | INOTIFY_MAX_USER_DEVICES=1, /* max number of inotify device instances per user */ | 76 | INOTIFY_MAX_USER_INSTANCES=1, /* max instances per user */ |
78 | INOTIFY_MAX_USER_WATCHES=2, /* max number of inotify watches per user */ | 77 | INOTIFY_MAX_USER_WATCHES=2, /* max watches per user */ |
79 | INOTIFY_MAX_QUEUED_EVENTS=3 /* Max number of queued events per inotify device instance */ | 78 | INOTIFY_MAX_QUEUED_EVENTS=3 /* max queued events per instance */ |
80 | }; | 79 | }; |
81 | 80 | ||
82 | /* CTL_KERN names: */ | 81 | /* CTL_KERN names: */ |
@@ -685,6 +684,7 @@ enum | |||
685 | FS_XFS=17, /* struct: control xfs parameters */ | 684 | FS_XFS=17, /* struct: control xfs parameters */ |
686 | FS_AIO_NR=18, /* current system-wide number of aio requests */ | 685 | FS_AIO_NR=18, /* current system-wide number of aio requests */ |
687 | FS_AIO_MAX_NR=19, /* system-wide maximum number of aio requests */ | 686 | FS_AIO_MAX_NR=19, /* system-wide maximum number of aio requests */ |
687 | FS_INOTIFY=20, /* inotify submenu */ | ||
688 | }; | 688 | }; |
689 | 689 | ||
690 | /* /proc/sys/fs/quota/ */ | 690 | /* /proc/sys/fs/quota/ */ |