diff options
102 files changed, 1096 insertions, 570 deletions
diff --git a/arch/arm/mach-s3c2440/mach-anubis.c b/arch/arm/mach-s3c2440/mach-anubis.c index b5d387ef37e1..bff7ddd06a52 100644 --- a/arch/arm/mach-s3c2440/mach-anubis.c +++ b/arch/arm/mach-s3c2440/mach-anubis.c | |||
@@ -76,8 +76,8 @@ static struct map_desc anubis_iodesc[] __initdata = { | |||
76 | .length = SZ_4K, | 76 | .length = SZ_4K, |
77 | .type = MT_DEVICE, | 77 | .type = MT_DEVICE, |
78 | }, { | 78 | }, { |
79 | .virtual = (u32)ANUBIS_VA_CTRL2, | 79 | .virtual = (u32)ANUBIS_VA_IDREG, |
80 | .pfn = __phys_to_pfn(ANUBIS_PA_CTRL2), | 80 | .pfn = __phys_to_pfn(ANUBIS_PA_IDREG), |
81 | .length = SZ_4K, | 81 | .length = SZ_4K, |
82 | .type = MT_DEVICE, | 82 | .type = MT_DEVICE, |
83 | }, | 83 | }, |
diff --git a/arch/arm/mach-s3c2440/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c index 4d6c7a574c1a..15811601f03d 100644 --- a/arch/arm/mach-s3c2440/mach-osiris.c +++ b/arch/arm/mach-s3c2440/mach-osiris.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/timer.h> | 16 | #include <linux/timer.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/device.h> | 18 | #include <linux/device.h> |
19 | #include <linux/sysdev.h> | ||
19 | #include <linux/serial_core.h> | 20 | #include <linux/serial_core.h> |
20 | 21 | ||
21 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
@@ -65,6 +66,11 @@ static struct map_desc osiris_iodesc[] __initdata = { | |||
65 | /* CPLD control registers */ | 66 | /* CPLD control registers */ |
66 | 67 | ||
67 | { | 68 | { |
69 | .virtual = (u32)OSIRIS_VA_CTRL0, | ||
70 | .pfn = __phys_to_pfn(OSIRIS_PA_CTRL0), | ||
71 | .length = SZ_16K, | ||
72 | .type = MT_DEVICE, | ||
73 | }, { | ||
68 | .virtual = (u32)OSIRIS_VA_CTRL1, | 74 | .virtual = (u32)OSIRIS_VA_CTRL1, |
69 | .pfn = __phys_to_pfn(OSIRIS_PA_CTRL1), | 75 | .pfn = __phys_to_pfn(OSIRIS_PA_CTRL1), |
70 | .length = SZ_16K, | 76 | .length = SZ_16K, |
@@ -74,6 +80,11 @@ static struct map_desc osiris_iodesc[] __initdata = { | |||
74 | .pfn = __phys_to_pfn(OSIRIS_PA_CTRL2), | 80 | .pfn = __phys_to_pfn(OSIRIS_PA_CTRL2), |
75 | .length = SZ_16K, | 81 | .length = SZ_16K, |
76 | .type = MT_DEVICE, | 82 | .type = MT_DEVICE, |
83 | }, { | ||
84 | .virtual = (u32)OSIRIS_VA_IDREG, | ||
85 | .pfn = __phys_to_pfn(OSIRIS_PA_IDREG), | ||
86 | .length = SZ_16K, | ||
87 | .type = MT_DEVICE, | ||
77 | }, | 88 | }, |
78 | }; | 89 | }; |
79 | 90 | ||
@@ -195,13 +206,13 @@ static void osiris_nand_select(struct s3c2410_nand_set *set, int slot) | |||
195 | pr_debug("osiris_nand: selecting slot %d (set %p,%p)\n", | 206 | pr_debug("osiris_nand: selecting slot %d (set %p,%p)\n", |
196 | slot, set, set->nr_map); | 207 | slot, set, set->nr_map); |
197 | 208 | ||
198 | tmp = __raw_readb(OSIRIS_VA_CTRL1); | 209 | tmp = __raw_readb(OSIRIS_VA_CTRL0); |
199 | tmp &= ~OSIRIS_CTRL1_NANDSEL; | 210 | tmp &= ~OSIRIS_CTRL0_NANDSEL; |
200 | tmp |= slot; | 211 | tmp |= slot; |
201 | 212 | ||
202 | pr_debug("osiris_nand: ctrl1 now %02x\n", tmp); | 213 | pr_debug("osiris_nand: ctrl0 now %02x\n", tmp); |
203 | 214 | ||
204 | __raw_writeb(tmp, OSIRIS_VA_CTRL1); | 215 | __raw_writeb(tmp, OSIRIS_VA_CTRL0); |
205 | } | 216 | } |
206 | 217 | ||
207 | static struct s3c2410_platform_nand osiris_nand_info = { | 218 | static struct s3c2410_platform_nand osiris_nand_info = { |
@@ -235,10 +246,45 @@ static struct platform_device osiris_pcmcia = { | |||
235 | .resource = osiris_pcmcia_resource, | 246 | .resource = osiris_pcmcia_resource, |
236 | }; | 247 | }; |
237 | 248 | ||
249 | /* Osiris power management device */ | ||
250 | |||
251 | #ifdef CONFIG_PM | ||
252 | static unsigned char pm_osiris_ctrl0; | ||
253 | |||
254 | static int osiris_pm_suspend(struct sys_device *sd, pm_message_t state) | ||
255 | { | ||
256 | pm_osiris_ctrl0 = __raw_readb(OSIRIS_VA_CTRL0); | ||
257 | return 0; | ||
258 | } | ||
259 | |||
260 | static int osiris_pm_resume(struct sys_device *sd) | ||
261 | { | ||
262 | if (pm_osiris_ctrl0 & OSIRIS_CTRL0_FIX8) | ||
263 | __raw_writeb(OSIRIS_CTRL1_FIX8, OSIRIS_VA_CTRL1); | ||
264 | |||
265 | return 0; | ||
266 | } | ||
267 | |||
268 | #else | ||
269 | #define osiris_pm_suspend NULL | ||
270 | #define osiris_pm_resume NULL | ||
271 | #endif | ||
272 | |||
273 | static struct sysdev_class osiris_pm_sysclass = { | ||
274 | set_kset_name("mach-osiris"), | ||
275 | .suspend = osiris_pm_suspend, | ||
276 | .resume = osiris_pm_resume, | ||
277 | }; | ||
278 | |||
279 | static struct sys_device osiris_pm_sysdev = { | ||
280 | .cls = &osiris_pm_sysclass, | ||
281 | }; | ||
282 | |||
238 | /* Standard Osiris devices */ | 283 | /* Standard Osiris devices */ |
239 | 284 | ||
240 | static struct platform_device *osiris_devices[] __initdata = { | 285 | static struct platform_device *osiris_devices[] __initdata = { |
241 | &s3c_device_i2c, | 286 | &s3c_device_i2c, |
287 | &s3c_device_wdt, | ||
242 | &s3c_device_nand, | 288 | &s3c_device_nand, |
243 | &osiris_pcmcia, | 289 | &osiris_pcmcia, |
244 | }; | 290 | }; |
@@ -288,6 +334,9 @@ static void __init osiris_map_io(void) | |||
288 | 334 | ||
289 | static void __init osiris_init(void) | 335 | static void __init osiris_init(void) |
290 | { | 336 | { |
337 | sysdev_class_register(&osiris_pm_sysclass); | ||
338 | sysdev_register(&osiris_pm_sysdev); | ||
339 | |||
291 | platform_add_devices(osiris_devices, ARRAY_SIZE(osiris_devices)); | 340 | platform_add_devices(osiris_devices, ARRAY_SIZE(osiris_devices)); |
292 | }; | 341 | }; |
293 | 342 | ||
@@ -299,5 +348,6 @@ MACHINE_START(OSIRIS, "Simtec-OSIRIS") | |||
299 | .map_io = osiris_map_io, | 348 | .map_io = osiris_map_io, |
300 | .init_machine = osiris_init, | 349 | .init_machine = osiris_init, |
301 | .init_irq = s3c24xx_init_irq, | 350 | .init_irq = s3c24xx_init_irq, |
351 | .init_machine = osiris_init, | ||
302 | .timer = &s3c24xx_timer, | 352 | .timer = &s3c24xx_timer, |
303 | MACHINE_END | 353 | MACHINE_END |
diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S index ca2a5ad19ea6..806ce26d5243 100644 --- a/arch/arm/vfp/entry.S +++ b/arch/arm/vfp/entry.S | |||
@@ -29,6 +29,10 @@ do_vfp: | |||
29 | add r10, r10, #TI_VFPSTATE @ r10 = workspace | 29 | add r10, r10, #TI_VFPSTATE @ r10 = workspace |
30 | ldr pc, [r4] @ call VFP entry point | 30 | ldr pc, [r4] @ call VFP entry point |
31 | 31 | ||
32 | ENTRY(vfp_null_entry) | ||
33 | mov pc, lr | ||
34 | ENDPROC(vfp_null_entry) | ||
35 | |||
32 | .LCvfp: | 36 | .LCvfp: |
33 | .word vfp_vector | 37 | .word vfp_vector |
34 | 38 | ||
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index f1e5951dc721..1106b5f9cf19 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
@@ -26,8 +26,9 @@ | |||
26 | */ | 26 | */ |
27 | void vfp_testing_entry(void); | 27 | void vfp_testing_entry(void); |
28 | void vfp_support_entry(void); | 28 | void vfp_support_entry(void); |
29 | void vfp_null_entry(void); | ||
29 | 30 | ||
30 | void (*vfp_vector)(void) = vfp_testing_entry; | 31 | void (*vfp_vector)(void) = vfp_null_entry; |
31 | union vfp_state *last_VFP_context[NR_CPUS]; | 32 | union vfp_state *last_VFP_context[NR_CPUS]; |
32 | 33 | ||
33 | /* | 34 | /* |
@@ -321,8 +322,10 @@ static int __init vfp_init(void) | |||
321 | * The handler is already setup to just log calls, so | 322 | * The handler is already setup to just log calls, so |
322 | * we just need to read the VFPSID register. | 323 | * we just need to read the VFPSID register. |
323 | */ | 324 | */ |
325 | vfp_vector = vfp_testing_entry; | ||
324 | vfpsid = fmrx(FPSID); | 326 | vfpsid = fmrx(FPSID); |
325 | barrier(); | 327 | barrier(); |
328 | vfp_vector = vfp_null_entry; | ||
326 | 329 | ||
327 | printk(KERN_INFO "VFP support v0.3: "); | 330 | printk(KERN_INFO "VFP support v0.3: "); |
328 | if (VFP_arch) { | 331 | if (VFP_arch) { |
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c index fe1dbe2e28f4..e253e86a1a39 100644 --- a/arch/avr32/boards/atstk1000/atstk1002.c +++ b/arch/avr32/boards/atstk1000/atstk1002.c | |||
@@ -42,6 +42,7 @@ static struct spi_board_info spi0_board_info[] __initdata = { | |||
42 | .modalias = "ltv350qv", | 42 | .modalias = "ltv350qv", |
43 | .max_speed_hz = 16000000, | 43 | .max_speed_hz = 16000000, |
44 | .chip_select = 1, | 44 | .chip_select = 1, |
45 | .mode = SPI_MODE_3, | ||
45 | }, | 46 | }, |
46 | }; | 47 | }; |
47 | 48 | ||
diff --git a/arch/avr32/mm/fault.c b/arch/avr32/mm/fault.c index e011f1ce1875..4b2495285d94 100644 --- a/arch/avr32/mm/fault.c +++ b/arch/avr32/mm/fault.c | |||
@@ -158,7 +158,7 @@ bad_area: | |||
158 | up_read(&mm->mmap_sem); | 158 | up_read(&mm->mmap_sem); |
159 | 159 | ||
160 | if (user_mode(regs)) { | 160 | if (user_mode(regs)) { |
161 | if (exception_trace) | 161 | if (exception_trace && printk_ratelimit()) |
162 | printk("%s%s[%d]: segfault at %08lx pc %08lx " | 162 | printk("%s%s[%d]: segfault at %08lx pc %08lx " |
163 | "sp %08lx ecr %lu\n", | 163 | "sp %08lx ecr %lu\n", |
164 | is_init(tsk) ? KERN_EMERG : KERN_INFO, | 164 | is_init(tsk) ? KERN_EMERG : KERN_INFO, |
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c index 64b62bdfb4f6..b8fa7ddd78f6 100644 --- a/arch/mips/kernel/smp-mt.c +++ b/arch/mips/kernel/smp-mt.c | |||
@@ -129,13 +129,13 @@ static irqreturn_t ipi_call_interrupt(int irq, void *dev_id) | |||
129 | 129 | ||
130 | static struct irqaction irq_resched = { | 130 | static struct irqaction irq_resched = { |
131 | .handler = ipi_resched_interrupt, | 131 | .handler = ipi_resched_interrupt, |
132 | .flags = IRQF_DISABLED, | 132 | .flags = IRQF_DISABLED|IRQF_PERCPU, |
133 | .name = "IPI_resched" | 133 | .name = "IPI_resched" |
134 | }; | 134 | }; |
135 | 135 | ||
136 | static struct irqaction irq_call = { | 136 | static struct irqaction irq_call = { |
137 | .handler = ipi_call_interrupt, | 137 | .handler = ipi_call_interrupt, |
138 | .flags = IRQF_DISABLED, | 138 | .flags = IRQF_DISABLED|IRQF_PERCPU, |
139 | .name = "IPI_call" | 139 | .name = "IPI_call" |
140 | }; | 140 | }; |
141 | 141 | ||
@@ -275,10 +275,7 @@ void __init plat_prepare_cpus(unsigned int max_cpus) | |||
275 | setup_irq(cpu_ipi_resched_irq, &irq_resched); | 275 | setup_irq(cpu_ipi_resched_irq, &irq_resched); |
276 | setup_irq(cpu_ipi_call_irq, &irq_call); | 276 | setup_irq(cpu_ipi_call_irq, &irq_call); |
277 | 277 | ||
278 | /* need to mark IPI's as IRQ_PER_CPU */ | ||
279 | irq_desc[cpu_ipi_resched_irq].status |= IRQ_PER_CPU; | ||
280 | set_irq_handler(cpu_ipi_resched_irq, handle_percpu_irq); | 278 | set_irq_handler(cpu_ipi_resched_irq, handle_percpu_irq); |
281 | irq_desc[cpu_ipi_call_irq].status |= IRQ_PER_CPU; | ||
282 | set_irq_handler(cpu_ipi_call_irq, handle_percpu_irq); | 279 | set_irq_handler(cpu_ipi_call_irq, handle_percpu_irq); |
283 | } | 280 | } |
284 | 281 | ||
@@ -326,8 +323,11 @@ void prom_boot_secondary(int cpu, struct task_struct *idle) | |||
326 | 323 | ||
327 | void prom_init_secondary(void) | 324 | void prom_init_secondary(void) |
328 | { | 325 | { |
326 | /* Enable per-cpu interrupts */ | ||
327 | |||
328 | /* This is Malta specific: IPI,performance and timer inetrrupts */ | ||
329 | write_c0_status((read_c0_status() & ~ST0_IM ) | | 329 | write_c0_status((read_c0_status() & ~ST0_IM ) | |
330 | (STATUSF_IP0 | STATUSF_IP1 | STATUSF_IP7)); | 330 | (STATUSF_IP0 | STATUSF_IP1 | STATUSF_IP6 | STATUSF_IP7)); |
331 | } | 331 | } |
332 | 332 | ||
333 | void prom_smp_finish(void) | 333 | void prom_smp_finish(void) |
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index 751b4a18b133..7def1ff3da94 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c | |||
@@ -199,6 +199,30 @@ int (*perf_irq)(void) = null_perf_irq; | |||
199 | EXPORT_SYMBOL(null_perf_irq); | 199 | EXPORT_SYMBOL(null_perf_irq); |
200 | EXPORT_SYMBOL(perf_irq); | 200 | EXPORT_SYMBOL(perf_irq); |
201 | 201 | ||
202 | /* | ||
203 | * Performance counter IRQ or -1 if shared with timer | ||
204 | */ | ||
205 | int mipsxx_perfcount_irq; | ||
206 | EXPORT_SYMBOL(mipsxx_perfcount_irq); | ||
207 | |||
208 | /* | ||
209 | * Possibly handle a performance counter interrupt. | ||
210 | * Return true if the timer interrupt should not be checked | ||
211 | */ | ||
212 | static inline int handle_perf_irq (int r2) | ||
213 | { | ||
214 | /* | ||
215 | * The performance counter overflow interrupt may be shared with the | ||
216 | * timer interrupt (mipsxx_perfcount_irq < 0). If it is and a | ||
217 | * performance counter has overflowed (perf_irq() == IRQ_HANDLED) | ||
218 | * and we can't reliably determine if a counter interrupt has also | ||
219 | * happened (!r2) then don't check for a timer interrupt. | ||
220 | */ | ||
221 | return (mipsxx_perfcount_irq < 0) && | ||
222 | perf_irq() == IRQ_HANDLED && | ||
223 | !r2; | ||
224 | } | ||
225 | |||
202 | asmlinkage void ll_timer_interrupt(int irq) | 226 | asmlinkage void ll_timer_interrupt(int irq) |
203 | { | 227 | { |
204 | int r2 = cpu_has_mips_r2; | 228 | int r2 = cpu_has_mips_r2; |
@@ -206,19 +230,13 @@ asmlinkage void ll_timer_interrupt(int irq) | |||
206 | irq_enter(); | 230 | irq_enter(); |
207 | kstat_this_cpu.irqs[irq]++; | 231 | kstat_this_cpu.irqs[irq]++; |
208 | 232 | ||
209 | /* | 233 | if (handle_perf_irq(r2)) |
210 | * Suckage alert: | 234 | goto out; |
211 | * Before R2 of the architecture there was no way to see if a | ||
212 | * performance counter interrupt was pending, so we have to run the | ||
213 | * performance counter interrupt handler anyway. | ||
214 | */ | ||
215 | if (!r2 || (read_c0_cause() & (1 << 26))) | ||
216 | if (perf_irq()) | ||
217 | goto out; | ||
218 | 235 | ||
219 | /* we keep interrupt disabled all the time */ | 236 | if (r2 && ((read_c0_cause() & (1 << 30)) == 0)) |
220 | if (!r2 || (read_c0_cause() & (1 << 30))) | 237 | goto out; |
221 | timer_interrupt(irq, NULL); | 238 | |
239 | timer_interrupt(irq, NULL); | ||
222 | 240 | ||
223 | out: | 241 | out: |
224 | irq_exit(); | 242 | irq_exit(); |
@@ -258,7 +276,7 @@ unsigned int mips_hpt_frequency; | |||
258 | 276 | ||
259 | static struct irqaction timer_irqaction = { | 277 | static struct irqaction timer_irqaction = { |
260 | .handler = timer_interrupt, | 278 | .handler = timer_interrupt, |
261 | .flags = IRQF_DISABLED, | 279 | .flags = IRQF_DISABLED | IRQF_PERCPU, |
262 | .name = "timer", | 280 | .name = "timer", |
263 | }; | 281 | }; |
264 | 282 | ||
diff --git a/arch/mips/mips-boards/generic/init.c b/arch/mips/mips-boards/generic/init.c index 88e9c2a7a2f9..4eabc1eadd23 100644 --- a/arch/mips/mips-boards/generic/init.c +++ b/arch/mips/mips-boards/generic/init.c | |||
@@ -57,7 +57,8 @@ int *_prom_argv, *_prom_envp; | |||
57 | 57 | ||
58 | int init_debug = 0; | 58 | int init_debug = 0; |
59 | 59 | ||
60 | unsigned int mips_revision_corid; | 60 | int mips_revision_corid; |
61 | int mips_revision_sconid; | ||
61 | 62 | ||
62 | /* Bonito64 system controller register base. */ | 63 | /* Bonito64 system controller register base. */ |
63 | unsigned long _pcictrl_bonito; | 64 | unsigned long _pcictrl_bonito; |
@@ -275,13 +276,38 @@ void __init prom_init(void) | |||
275 | else | 276 | else |
276 | mips_revision_corid = MIPS_REVISION_CORID_CORE_EMUL_MSC; | 277 | mips_revision_corid = MIPS_REVISION_CORID_CORE_EMUL_MSC; |
277 | } | 278 | } |
278 | switch(mips_revision_corid) { | 279 | |
280 | mips_revision_sconid = MIPS_REVISION_SCONID; | ||
281 | if (mips_revision_sconid == MIPS_REVISION_SCON_OTHER) { | ||
282 | switch (mips_revision_corid) { | ||
283 | case MIPS_REVISION_CORID_QED_RM5261: | ||
284 | case MIPS_REVISION_CORID_CORE_LV: | ||
285 | case MIPS_REVISION_CORID_CORE_FPGA: | ||
286 | case MIPS_REVISION_CORID_CORE_FPGAR2: | ||
287 | mips_revision_sconid = MIPS_REVISION_SCON_GT64120; | ||
288 | break; | ||
289 | case MIPS_REVISION_CORID_CORE_EMUL_BON: | ||
290 | case MIPS_REVISION_CORID_BONITO64: | ||
291 | case MIPS_REVISION_CORID_CORE_20K: | ||
292 | mips_revision_sconid = MIPS_REVISION_SCON_BONITO; | ||
293 | break; | ||
294 | case MIPS_REVISION_CORID_CORE_MSC: | ||
295 | case MIPS_REVISION_CORID_CORE_FPGA2: | ||
296 | case MIPS_REVISION_CORID_CORE_FPGA3: | ||
297 | case MIPS_REVISION_CORID_CORE_24K: | ||
298 | case MIPS_REVISION_CORID_CORE_EMUL_MSC: | ||
299 | mips_revision_sconid = MIPS_REVISION_SCON_SOCIT; | ||
300 | break; | ||
301 | default: | ||
302 | mips_display_message("CC Error"); | ||
303 | while (1); /* We die here... */ | ||
304 | } | ||
305 | } | ||
306 | |||
307 | switch (mips_revision_sconid) { | ||
279 | u32 start, map, mask, data; | 308 | u32 start, map, mask, data; |
280 | 309 | ||
281 | case MIPS_REVISION_CORID_QED_RM5261: | 310 | case MIPS_REVISION_SCON_GT64120: |
282 | case MIPS_REVISION_CORID_CORE_LV: | ||
283 | case MIPS_REVISION_CORID_CORE_FPGA: | ||
284 | case MIPS_REVISION_CORID_CORE_FPGAR2: | ||
285 | /* | 311 | /* |
286 | * Setup the North bridge to do Master byte-lane swapping | 312 | * Setup the North bridge to do Master byte-lane swapping |
287 | * when running in bigendian. | 313 | * when running in bigendian. |
@@ -305,9 +331,7 @@ void __init prom_init(void) | |||
305 | set_io_port_base(MALTA_GT_PORT_BASE); | 331 | set_io_port_base(MALTA_GT_PORT_BASE); |
306 | break; | 332 | break; |
307 | 333 | ||
308 | case MIPS_REVISION_CORID_CORE_EMUL_BON: | 334 | case MIPS_REVISION_SCON_BONITO: |
309 | case MIPS_REVISION_CORID_BONITO64: | ||
310 | case MIPS_REVISION_CORID_CORE_20K: | ||
311 | _pcictrl_bonito_pcicfg = (unsigned long)ioremap(BONITO_PCICFG_BASE, BONITO_PCICFG_SIZE); | 335 | _pcictrl_bonito_pcicfg = (unsigned long)ioremap(BONITO_PCICFG_BASE, BONITO_PCICFG_SIZE); |
312 | 336 | ||
313 | /* | 337 | /* |
@@ -334,13 +358,10 @@ void __init prom_init(void) | |||
334 | set_io_port_base(MALTA_BONITO_PORT_BASE); | 358 | set_io_port_base(MALTA_BONITO_PORT_BASE); |
335 | break; | 359 | break; |
336 | 360 | ||
337 | case MIPS_REVISION_CORID_CORE_MSC: | 361 | case MIPS_REVISION_SCON_SOCIT: |
338 | case MIPS_REVISION_CORID_CORE_FPGA2: | 362 | case MIPS_REVISION_SCON_ROCIT: |
339 | case MIPS_REVISION_CORID_CORE_FPGA3: | ||
340 | case MIPS_REVISION_CORID_CORE_24K: | ||
341 | case MIPS_REVISION_CORID_CORE_EMUL_MSC: | ||
342 | _pcictrl_msc = (unsigned long)ioremap(MIPS_MSC01_PCI_REG_BASE, 0x2000); | 363 | _pcictrl_msc = (unsigned long)ioremap(MIPS_MSC01_PCI_REG_BASE, 0x2000); |
343 | 364 | mips_pci_controller: | |
344 | mb(); | 365 | mb(); |
345 | MSC_READ(MSC01_PCI_CFG, data); | 366 | MSC_READ(MSC01_PCI_CFG, data); |
346 | MSC_WRITE(MSC01_PCI_CFG, data & ~MSC01_PCI_CFG_EN_BIT); | 367 | MSC_WRITE(MSC01_PCI_CFG, data & ~MSC01_PCI_CFG_EN_BIT); |
@@ -374,10 +395,15 @@ void __init prom_init(void) | |||
374 | set_io_port_base(MALTA_MSC_PORT_BASE); | 395 | set_io_port_base(MALTA_MSC_PORT_BASE); |
375 | break; | 396 | break; |
376 | 397 | ||
398 | case MIPS_REVISION_SCON_SOCITSC: | ||
399 | case MIPS_REVISION_SCON_SOCITSCP: | ||
400 | _pcictrl_msc = (unsigned long)ioremap(MIPS_SOCITSC_PCI_REG_BASE, 0x2000); | ||
401 | goto mips_pci_controller; | ||
402 | |||
377 | default: | 403 | default: |
378 | /* Unknown Core card */ | 404 | /* Unknown system controller */ |
379 | mips_display_message("CC Error"); | 405 | mips_display_message("SC Error"); |
380 | while(1); /* We die here... */ | 406 | while (1); /* We die here... */ |
381 | } | 407 | } |
382 | #endif | 408 | #endif |
383 | board_nmi_handler_setup = mips_nmi_setup; | 409 | board_nmi_handler_setup = mips_nmi_setup; |
diff --git a/arch/mips/mips-boards/generic/pci.c b/arch/mips/mips-boards/generic/pci.c index f98d60f78658..c9852206890a 100644 --- a/arch/mips/mips-boards/generic/pci.c +++ b/arch/mips/mips-boards/generic/pci.c | |||
@@ -92,11 +92,8 @@ void __init mips_pcibios_init(void) | |||
92 | struct pci_controller *controller; | 92 | struct pci_controller *controller; |
93 | resource_size_t start, end, map, start1, end1, map1, map2, map3, mask; | 93 | resource_size_t start, end, map, start1, end1, map1, map2, map3, mask; |
94 | 94 | ||
95 | switch (mips_revision_corid) { | 95 | switch (mips_revision_sconid) { |
96 | case MIPS_REVISION_CORID_QED_RM5261: | 96 | case MIPS_REVISION_SCON_GT64120: |
97 | case MIPS_REVISION_CORID_CORE_LV: | ||
98 | case MIPS_REVISION_CORID_CORE_FPGA: | ||
99 | case MIPS_REVISION_CORID_CORE_FPGAR2: | ||
100 | /* | 97 | /* |
101 | * Due to a bug in the Galileo system controller, we need | 98 | * Due to a bug in the Galileo system controller, we need |
102 | * to setup the PCI BAR for the Galileo internal registers. | 99 | * to setup the PCI BAR for the Galileo internal registers. |
@@ -161,9 +158,7 @@ void __init mips_pcibios_init(void) | |||
161 | controller = >64120_controller; | 158 | controller = >64120_controller; |
162 | break; | 159 | break; |
163 | 160 | ||
164 | case MIPS_REVISION_CORID_BONITO64: | 161 | case MIPS_REVISION_SCON_BONITO: |
165 | case MIPS_REVISION_CORID_CORE_20K: | ||
166 | case MIPS_REVISION_CORID_CORE_EMUL_BON: | ||
167 | /* Set up resource ranges from the controller's registers. */ | 162 | /* Set up resource ranges from the controller's registers. */ |
168 | map = BONITO_PCIMAP; | 163 | map = BONITO_PCIMAP; |
169 | map1 = (BONITO_PCIMAP & BONITO_PCIMAP_PCIMAP_LO0) >> | 164 | map1 = (BONITO_PCIMAP & BONITO_PCIMAP_PCIMAP_LO0) >> |
@@ -195,11 +190,10 @@ void __init mips_pcibios_init(void) | |||
195 | controller = &bonito64_controller; | 190 | controller = &bonito64_controller; |
196 | break; | 191 | break; |
197 | 192 | ||
198 | case MIPS_REVISION_CORID_CORE_MSC: | 193 | case MIPS_REVISION_SCON_SOCIT: |
199 | case MIPS_REVISION_CORID_CORE_FPGA2: | 194 | case MIPS_REVISION_SCON_ROCIT: |
200 | case MIPS_REVISION_CORID_CORE_FPGA3: | 195 | case MIPS_REVISION_SCON_SOCITSC: |
201 | case MIPS_REVISION_CORID_CORE_24K: | 196 | case MIPS_REVISION_SCON_SOCITSCP: |
202 | case MIPS_REVISION_CORID_CORE_EMUL_MSC: | ||
203 | /* Set up resource ranges from the controller's registers. */ | 197 | /* Set up resource ranges from the controller's registers. */ |
204 | MSC_READ(MSC01_PCI_SC2PMBASL, start); | 198 | MSC_READ(MSC01_PCI_SC2PMBASL, start); |
205 | MSC_READ(MSC01_PCI_SC2PMMSKL, mask); | 199 | MSC_READ(MSC01_PCI_SC2PMMSKL, mask); |
diff --git a/arch/mips/mips-boards/generic/time.c b/arch/mips/mips-boards/generic/time.c index b41db9e7ab1f..8f1000f51b3d 100644 --- a/arch/mips/mips-boards/generic/time.c +++ b/arch/mips/mips-boards/generic/time.c | |||
@@ -53,9 +53,8 @@ | |||
53 | 53 | ||
54 | unsigned long cpu_khz; | 54 | unsigned long cpu_khz; |
55 | 55 | ||
56 | #define CPUCTR_IMASKBIT (0x100 << MIPSCPU_INT_CPUCTR) | ||
57 | |||
58 | static int mips_cpu_timer_irq; | 56 | static int mips_cpu_timer_irq; |
57 | extern int mipsxx_perfcount_irq; | ||
59 | extern void smtc_timer_broadcast(int); | 58 | extern void smtc_timer_broadcast(int); |
60 | 59 | ||
61 | static void mips_timer_dispatch(void) | 60 | static void mips_timer_dispatch(void) |
@@ -63,6 +62,11 @@ static void mips_timer_dispatch(void) | |||
63 | do_IRQ(mips_cpu_timer_irq); | 62 | do_IRQ(mips_cpu_timer_irq); |
64 | } | 63 | } |
65 | 64 | ||
65 | static void mips_perf_dispatch(void) | ||
66 | { | ||
67 | do_IRQ(mipsxx_perfcount_irq); | ||
68 | } | ||
69 | |||
66 | /* | 70 | /* |
67 | * Redeclare until I get around mopping the timer code insanity on MIPS. | 71 | * Redeclare until I get around mopping the timer code insanity on MIPS. |
68 | */ | 72 | */ |
@@ -70,6 +74,24 @@ extern int null_perf_irq(void); | |||
70 | 74 | ||
71 | extern int (*perf_irq)(void); | 75 | extern int (*perf_irq)(void); |
72 | 76 | ||
77 | /* | ||
78 | * Possibly handle a performance counter interrupt. | ||
79 | * Return true if the timer interrupt should not be checked | ||
80 | */ | ||
81 | static inline int handle_perf_irq (int r2) | ||
82 | { | ||
83 | /* | ||
84 | * The performance counter overflow interrupt may be shared with the | ||
85 | * timer interrupt (mipsxx_perfcount_irq < 0). If it is and a | ||
86 | * performance counter has overflowed (perf_irq() == IRQ_HANDLED) | ||
87 | * and we can't reliably determine if a counter interrupt has also | ||
88 | * happened (!r2) then don't check for a timer interrupt. | ||
89 | */ | ||
90 | return (mipsxx_perfcount_irq < 0) && | ||
91 | perf_irq() == IRQ_HANDLED && | ||
92 | !r2; | ||
93 | } | ||
94 | |||
73 | irqreturn_t mips_timer_interrupt(int irq, void *dev_id) | 95 | irqreturn_t mips_timer_interrupt(int irq, void *dev_id) |
74 | { | 96 | { |
75 | int cpu = smp_processor_id(); | 97 | int cpu = smp_processor_id(); |
@@ -92,8 +114,7 @@ irqreturn_t mips_timer_interrupt(int irq, void *dev_id) | |||
92 | * We could be here due to timer interrupt, | 114 | * We could be here due to timer interrupt, |
93 | * perf counter overflow, or both. | 115 | * perf counter overflow, or both. |
94 | */ | 116 | */ |
95 | if (read_c0_cause() & (1 << 26)) | 117 | (void) handle_perf_irq(1); |
96 | perf_irq(); | ||
97 | 118 | ||
98 | if (read_c0_cause() & (1 << 30)) { | 119 | if (read_c0_cause() & (1 << 30)) { |
99 | /* | 120 | /* |
@@ -115,19 +136,19 @@ irqreturn_t mips_timer_interrupt(int irq, void *dev_id) | |||
115 | #else /* CONFIG_MIPS_MT_SMTC */ | 136 | #else /* CONFIG_MIPS_MT_SMTC */ |
116 | int r2 = cpu_has_mips_r2; | 137 | int r2 = cpu_has_mips_r2; |
117 | 138 | ||
139 | if (handle_perf_irq(r2)) | ||
140 | goto out; | ||
141 | |||
142 | if (r2 && ((read_c0_cause() & (1 << 30)) == 0)) | ||
143 | goto out; | ||
144 | |||
118 | if (cpu == 0) { | 145 | if (cpu == 0) { |
119 | /* | 146 | /* |
120 | * CPU 0 handles the global timer interrupt job and process | 147 | * CPU 0 handles the global timer interrupt job and process |
121 | * accounting resets count/compare registers to trigger next | 148 | * accounting resets count/compare registers to trigger next |
122 | * timer int. | 149 | * timer int. |
123 | */ | 150 | */ |
124 | if (!r2 || (read_c0_cause() & (1 << 26))) | 151 | timer_interrupt(irq, NULL); |
125 | if (perf_irq()) | ||
126 | goto out; | ||
127 | |||
128 | /* we keep interrupt disabled all the time */ | ||
129 | if (!r2 || (read_c0_cause() & (1 << 30))) | ||
130 | timer_interrupt(irq, NULL); | ||
131 | } else { | 152 | } else { |
132 | /* Everyone else needs to reset the timer int here as | 153 | /* Everyone else needs to reset the timer int here as |
133 | ll_local_timer_interrupt doesn't */ | 154 | ll_local_timer_interrupt doesn't */ |
@@ -225,35 +246,85 @@ void __init mips_time_init(void) | |||
225 | mips_scroll_message(); | 246 | mips_scroll_message(); |
226 | } | 247 | } |
227 | 248 | ||
249 | irqreturn_t mips_perf_interrupt(int irq, void *dev_id) | ||
250 | { | ||
251 | return perf_irq(); | ||
252 | } | ||
253 | |||
254 | static struct irqaction perf_irqaction = { | ||
255 | .handler = mips_perf_interrupt, | ||
256 | .flags = IRQF_DISABLED | IRQF_PERCPU, | ||
257 | .name = "performance", | ||
258 | }; | ||
259 | |||
260 | void __init plat_perf_setup(struct irqaction *irq) | ||
261 | { | ||
262 | int hwint = 0; | ||
263 | mipsxx_perfcount_irq = -1; | ||
264 | |||
265 | #ifdef MSC01E_INT_BASE | ||
266 | if (cpu_has_veic) { | ||
267 | set_vi_handler (MSC01E_INT_PERFCTR, mips_perf_dispatch); | ||
268 | mipsxx_perfcount_irq = MSC01E_INT_BASE + MSC01E_INT_PERFCTR; | ||
269 | } else | ||
270 | #endif | ||
271 | if (cpu_has_mips_r2) { | ||
272 | /* | ||
273 | * Read IntCtl.IPPCI to determine the performance | ||
274 | * counter interrupt | ||
275 | */ | ||
276 | hwint = (read_c0_intctl () >> 26) & 7; | ||
277 | if (hwint != MIPSCPU_INT_CPUCTR) { | ||
278 | if (cpu_has_vint) | ||
279 | set_vi_handler (hwint, mips_perf_dispatch); | ||
280 | mipsxx_perfcount_irq = MIPSCPU_INT_BASE + hwint; | ||
281 | } | ||
282 | } | ||
283 | if (mipsxx_perfcount_irq >= 0) { | ||
284 | #ifdef CONFIG_MIPS_MT_SMTC | ||
285 | setup_irq_smtc(mipsxx_perfcount_irq, irq, 0x100 << hwint); | ||
286 | #else | ||
287 | setup_irq(mipsxx_perfcount_irq, irq); | ||
288 | #endif /* CONFIG_MIPS_MT_SMTC */ | ||
289 | #ifdef CONFIG_SMP | ||
290 | set_irq_handler(mipsxx_perfcount_irq, handle_percpu_irq); | ||
291 | #endif | ||
292 | } | ||
293 | } | ||
294 | |||
228 | void __init plat_timer_setup(struct irqaction *irq) | 295 | void __init plat_timer_setup(struct irqaction *irq) |
229 | { | 296 | { |
297 | int hwint = 0; | ||
230 | #ifdef MSC01E_INT_BASE | 298 | #ifdef MSC01E_INT_BASE |
231 | if (cpu_has_veic) { | 299 | if (cpu_has_veic) { |
232 | set_vi_handler (MSC01E_INT_CPUCTR, mips_timer_dispatch); | 300 | set_vi_handler (MSC01E_INT_CPUCTR, mips_timer_dispatch); |
233 | mips_cpu_timer_irq = MSC01E_INT_BASE + MSC01E_INT_CPUCTR; | 301 | mips_cpu_timer_irq = MSC01E_INT_BASE + MSC01E_INT_CPUCTR; |
234 | } else | 302 | } |
303 | else | ||
235 | #endif | 304 | #endif |
236 | { | 305 | { |
306 | if (cpu_has_mips_r2) | ||
307 | /* | ||
308 | * Read IntCtl.IPTI to determine the timer interrupt | ||
309 | */ | ||
310 | hwint = (read_c0_intctl () >> 29) & 7; | ||
311 | else | ||
312 | hwint = MIPSCPU_INT_CPUCTR; | ||
237 | if (cpu_has_vint) | 313 | if (cpu_has_vint) |
238 | set_vi_handler (MIPSCPU_INT_CPUCTR, mips_timer_dispatch); | 314 | set_vi_handler (hwint, mips_timer_dispatch); |
239 | mips_cpu_timer_irq = MIPSCPU_INT_BASE + MIPSCPU_INT_CPUCTR; | 315 | mips_cpu_timer_irq = MIPSCPU_INT_BASE + hwint; |
240 | } | 316 | } |
241 | 317 | ||
242 | |||
243 | /* we are using the cpu counter for timer interrupts */ | 318 | /* we are using the cpu counter for timer interrupts */ |
244 | irq->handler = mips_timer_interrupt; /* we use our own handler */ | 319 | irq->handler = mips_timer_interrupt; /* we use our own handler */ |
245 | #ifdef CONFIG_MIPS_MT_SMTC | 320 | #ifdef CONFIG_MIPS_MT_SMTC |
246 | setup_irq_smtc(mips_cpu_timer_irq, irq, CPUCTR_IMASKBIT); | 321 | setup_irq_smtc(mips_cpu_timer_irq, irq, 0x100 << hwint); |
247 | #else | 322 | #else |
248 | setup_irq(mips_cpu_timer_irq, irq); | 323 | setup_irq(mips_cpu_timer_irq, irq); |
249 | #endif /* CONFIG_MIPS_MT_SMTC */ | 324 | #endif /* CONFIG_MIPS_MT_SMTC */ |
250 | |||
251 | #ifdef CONFIG_SMP | 325 | #ifdef CONFIG_SMP |
252 | /* irq_desc(riptor) is a global resource, when the interrupt overlaps | ||
253 | on seperate cpu's the first one tries to handle the second interrupt. | ||
254 | The effect is that the int remains disabled on the second cpu. | ||
255 | Mark the interrupt with IRQ_PER_CPU to avoid any confusion */ | ||
256 | irq_desc[mips_cpu_timer_irq].status |= IRQ_PER_CPU; | ||
257 | set_irq_handler(mips_cpu_timer_irq, handle_percpu_irq); | 326 | set_irq_handler(mips_cpu_timer_irq, handle_percpu_irq); |
258 | #endif | 327 | #endif |
328 | |||
329 | plat_perf_setup(&perf_irqaction); | ||
259 | } | 330 | } |
diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c index 1cd830e3d933..1668cc21d5b5 100644 --- a/arch/mips/mips-boards/malta/malta_int.c +++ b/arch/mips/mips-boards/malta/malta_int.c | |||
@@ -53,25 +53,19 @@ static inline int mips_pcibios_iack(void) | |||
53 | * Determine highest priority pending interrupt by performing | 53 | * Determine highest priority pending interrupt by performing |
54 | * a PCI Interrupt Acknowledge cycle. | 54 | * a PCI Interrupt Acknowledge cycle. |
55 | */ | 55 | */ |
56 | switch(mips_revision_corid) { | 56 | switch (mips_revision_sconid) { |
57 | case MIPS_REVISION_CORID_CORE_MSC: | 57 | case MIPS_REVISION_SCON_SOCIT: |
58 | case MIPS_REVISION_CORID_CORE_FPGA2: | 58 | case MIPS_REVISION_SCON_ROCIT: |
59 | case MIPS_REVISION_CORID_CORE_FPGA3: | 59 | case MIPS_REVISION_SCON_SOCITSC: |
60 | case MIPS_REVISION_CORID_CORE_24K: | 60 | case MIPS_REVISION_SCON_SOCITSCP: |
61 | case MIPS_REVISION_CORID_CORE_EMUL_MSC: | ||
62 | MSC_READ(MSC01_PCI_IACK, irq); | 61 | MSC_READ(MSC01_PCI_IACK, irq); |
63 | irq &= 0xff; | 62 | irq &= 0xff; |
64 | break; | 63 | break; |
65 | case MIPS_REVISION_CORID_QED_RM5261: | 64 | case MIPS_REVISION_SCON_GT64120: |
66 | case MIPS_REVISION_CORID_CORE_LV: | ||
67 | case MIPS_REVISION_CORID_CORE_FPGA: | ||
68 | case MIPS_REVISION_CORID_CORE_FPGAR2: | ||
69 | irq = GT_READ(GT_PCI0_IACK_OFS); | 65 | irq = GT_READ(GT_PCI0_IACK_OFS); |
70 | irq &= 0xff; | 66 | irq &= 0xff; |
71 | break; | 67 | break; |
72 | case MIPS_REVISION_CORID_BONITO64: | 68 | case MIPS_REVISION_SCON_BONITO: |
73 | case MIPS_REVISION_CORID_CORE_20K: | ||
74 | case MIPS_REVISION_CORID_CORE_EMUL_BON: | ||
75 | /* The following will generate a PCI IACK cycle on the | 69 | /* The following will generate a PCI IACK cycle on the |
76 | * Bonito controller. It's a little bit kludgy, but it | 70 | * Bonito controller. It's a little bit kludgy, but it |
77 | * was the easiest way to implement it in hardware at | 71 | * was the easiest way to implement it in hardware at |
@@ -89,7 +83,7 @@ static inline int mips_pcibios_iack(void) | |||
89 | BONITO_PCIMAP_CFG = 0; | 83 | BONITO_PCIMAP_CFG = 0; |
90 | break; | 84 | break; |
91 | default: | 85 | default: |
92 | printk("Unknown Core card, don't know the system controller.\n"); | 86 | printk("Unknown system controller.\n"); |
93 | return -1; | 87 | return -1; |
94 | } | 88 | } |
95 | return irq; | 89 | return irq; |
@@ -144,27 +138,21 @@ static void corehi_irqdispatch(void) | |||
144 | Do it for the others too. | 138 | Do it for the others too. |
145 | */ | 139 | */ |
146 | 140 | ||
147 | switch(mips_revision_corid) { | 141 | switch (mips_revision_sconid) { |
148 | case MIPS_REVISION_CORID_CORE_MSC: | 142 | case MIPS_REVISION_SCON_SOCIT: |
149 | case MIPS_REVISION_CORID_CORE_FPGA2: | 143 | case MIPS_REVISION_SCON_ROCIT: |
150 | case MIPS_REVISION_CORID_CORE_FPGA3: | 144 | case MIPS_REVISION_SCON_SOCITSC: |
151 | case MIPS_REVISION_CORID_CORE_24K: | 145 | case MIPS_REVISION_SCON_SOCITSCP: |
152 | case MIPS_REVISION_CORID_CORE_EMUL_MSC: | ||
153 | ll_msc_irq(); | 146 | ll_msc_irq(); |
154 | break; | 147 | break; |
155 | case MIPS_REVISION_CORID_QED_RM5261: | 148 | case MIPS_REVISION_SCON_GT64120: |
156 | case MIPS_REVISION_CORID_CORE_LV: | ||
157 | case MIPS_REVISION_CORID_CORE_FPGA: | ||
158 | case MIPS_REVISION_CORID_CORE_FPGAR2: | ||
159 | intrcause = GT_READ(GT_INTRCAUSE_OFS); | 149 | intrcause = GT_READ(GT_INTRCAUSE_OFS); |
160 | datalo = GT_READ(GT_CPUERR_ADDRLO_OFS); | 150 | datalo = GT_READ(GT_CPUERR_ADDRLO_OFS); |
161 | datahi = GT_READ(GT_CPUERR_ADDRHI_OFS); | 151 | datahi = GT_READ(GT_CPUERR_ADDRHI_OFS); |
162 | printk("GT_INTRCAUSE = %08x\n", intrcause); | 152 | printk("GT_INTRCAUSE = %08x\n", intrcause); |
163 | printk("GT_CPUERR_ADDR = %02x%08x\n", datahi, datalo); | 153 | printk("GT_CPUERR_ADDR = %02x%08x\n", datahi, datalo); |
164 | break; | 154 | break; |
165 | case MIPS_REVISION_CORID_BONITO64: | 155 | case MIPS_REVISION_SCON_BONITO: |
166 | case MIPS_REVISION_CORID_CORE_20K: | ||
167 | case MIPS_REVISION_CORID_CORE_EMUL_BON: | ||
168 | pcibadaddr = BONITO_PCIBADADDR; | 156 | pcibadaddr = BONITO_PCIBADADDR; |
169 | pcimstat = BONITO_PCIMSTAT; | 157 | pcimstat = BONITO_PCIMSTAT; |
170 | intisr = BONITO_INTISR; | 158 | intisr = BONITO_INTISR; |
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c index c14b7bf89950..8f1b78dfd89f 100644 --- a/arch/mips/mips-boards/malta/malta_setup.c +++ b/arch/mips/mips-boards/malta/malta_setup.c | |||
@@ -103,9 +103,7 @@ void __init plat_mem_setup(void) | |||
103 | kgdb_config (); | 103 | kgdb_config (); |
104 | #endif | 104 | #endif |
105 | 105 | ||
106 | if ((mips_revision_corid == MIPS_REVISION_CORID_BONITO64) || | 106 | if (mips_revision_sconid == MIPS_REVISION_SCON_BONITO) { |
107 | (mips_revision_corid == MIPS_REVISION_CORID_CORE_20K) || | ||
108 | (mips_revision_corid == MIPS_REVISION_CORID_CORE_EMUL_BON)) { | ||
109 | char *argptr; | 107 | char *argptr; |
110 | 108 | ||
111 | argptr = prom_getcmdline(); | 109 | argptr = prom_getcmdline(); |
diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c index 4f94fa261aae..1ea5c9c1010b 100644 --- a/arch/mips/oprofile/op_model_mipsxx.c +++ b/arch/mips/oprofile/op_model_mipsxx.c | |||
@@ -177,7 +177,10 @@ static int mipsxx_perfcount_handler(void) | |||
177 | unsigned int counters = op_model_mipsxx_ops.num_counters; | 177 | unsigned int counters = op_model_mipsxx_ops.num_counters; |
178 | unsigned int control; | 178 | unsigned int control; |
179 | unsigned int counter; | 179 | unsigned int counter; |
180 | int handled = 0; | 180 | int handled = IRQ_NONE; |
181 | |||
182 | if (cpu_has_mips_r2 && !(read_c0_cause() & (1 << 26))) | ||
183 | return handled; | ||
181 | 184 | ||
182 | switch (counters) { | 185 | switch (counters) { |
183 | #define HANDLE_COUNTER(n) \ | 186 | #define HANDLE_COUNTER(n) \ |
@@ -188,7 +191,7 @@ static int mipsxx_perfcount_handler(void) | |||
188 | (counter & M_COUNTER_OVERFLOW)) { \ | 191 | (counter & M_COUNTER_OVERFLOW)) { \ |
189 | oprofile_add_sample(get_irq_regs(), n); \ | 192 | oprofile_add_sample(get_irq_regs(), n); \ |
190 | w_c0_perfcntr ## n(reg.counter[n]); \ | 193 | w_c0_perfcntr ## n(reg.counter[n]); \ |
191 | handled = 1; \ | 194 | handled = IRQ_HANDLED; \ |
192 | } | 195 | } |
193 | HANDLE_COUNTER(3) | 196 | HANDLE_COUNTER(3) |
194 | HANDLE_COUNTER(2) | 197 | HANDLE_COUNTER(2) |
diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c index d86e15776779..f2042e6466a4 100644 --- a/arch/parisc/hpux/fs.c +++ b/arch/parisc/hpux/fs.c | |||
@@ -21,6 +21,7 @@ | |||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/kernel.h> | ||
24 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
25 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
26 | #include <linux/file.h> | 27 | #include <linux/file.h> |
@@ -69,7 +70,6 @@ struct getdents_callback { | |||
69 | }; | 70 | }; |
70 | 71 | ||
71 | #define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de))) | 72 | #define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de))) |
72 | #define ROUND_UP(x) (((x)+sizeof(long)-1) & ~(sizeof(long)-1)) | ||
73 | 73 | ||
74 | static int filldir(void * __buf, const char * name, int namlen, loff_t offset, | 74 | static int filldir(void * __buf, const char * name, int namlen, loff_t offset, |
75 | u64 ino, unsigned d_type) | 75 | u64 ino, unsigned d_type) |
@@ -77,7 +77,7 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset, | |||
77 | struct hpux_dirent __user * dirent; | 77 | struct hpux_dirent __user * dirent; |
78 | struct getdents_callback * buf = (struct getdents_callback *) __buf; | 78 | struct getdents_callback * buf = (struct getdents_callback *) __buf; |
79 | ino_t d_ino; | 79 | ino_t d_ino; |
80 | int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1); | 80 | int reclen = ALIGN(NAME_OFFSET(dirent) + namlen + 1, sizeof(long)); |
81 | 81 | ||
82 | buf->error = -EINVAL; /* only used if we fail.. */ | 82 | buf->error = -EINVAL; /* only used if we fail.. */ |
83 | if (reclen > buf->count) | 83 | if (reclen > buf->count) |
@@ -102,7 +102,6 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset, | |||
102 | } | 102 | } |
103 | 103 | ||
104 | #undef NAME_OFFSET | 104 | #undef NAME_OFFSET |
105 | #undef ROUND_UP | ||
106 | 105 | ||
107 | int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned int count) | 106 | int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned int count) |
108 | { | 107 | { |
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index 8474f9e5ca10..42598abf4576 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S | |||
@@ -954,21 +954,6 @@ intr_return: | |||
954 | /* NOTE: Need to enable interrupts incase we schedule. */ | 954 | /* NOTE: Need to enable interrupts incase we schedule. */ |
955 | ssm PSW_SM_I, %r0 | 955 | ssm PSW_SM_I, %r0 |
956 | 956 | ||
957 | /* Check for software interrupts */ | ||
958 | |||
959 | .import irq_stat,data | ||
960 | |||
961 | load32 irq_stat,%r19 | ||
962 | #ifdef CONFIG_SMP | ||
963 | mfctl %cr30,%r1 | ||
964 | ldw TI_CPU(%r1),%r1 /* get cpu # - int */ | ||
965 | /* shift left ____cacheline_aligned (aka L1_CACHE_BYTES) amount | ||
966 | ** irq_stat[] is defined using ____cacheline_aligned. | ||
967 | */ | ||
968 | SHLREG %r1,L1_CACHE_SHIFT,%r20 | ||
969 | add %r19,%r20,%r19 /* now have &irq_stat[smp_processor_id()] */ | ||
970 | #endif /* CONFIG_SMP */ | ||
971 | |||
972 | intr_check_resched: | 957 | intr_check_resched: |
973 | 958 | ||
974 | /* check for reschedule */ | 959 | /* check for reschedule */ |
@@ -2034,10 +2019,9 @@ ENTRY(syscall_exit) | |||
2034 | STREG %r28,TASK_PT_GR28(%r1) | 2019 | STREG %r28,TASK_PT_GR28(%r1) |
2035 | 2020 | ||
2036 | #ifdef CONFIG_HPUX | 2021 | #ifdef CONFIG_HPUX |
2037 | |||
2038 | /* <linux/personality.h> cannot be easily included */ | 2022 | /* <linux/personality.h> cannot be easily included */ |
2039 | #define PER_HPUX 0x10 | 2023 | #define PER_HPUX 0x10 |
2040 | LDREG TASK_PERSONALITY(%r1),%r19 | 2024 | ldw TASK_PERSONALITY(%r1),%r19 |
2041 | 2025 | ||
2042 | /* We can't use "CMPIB<> PER_HPUX" since "im5" field is sign extended */ | 2026 | /* We can't use "CMPIB<> PER_HPUX" since "im5" field is sign extended */ |
2043 | ldo -PER_HPUX(%r19), %r19 | 2027 | ldo -PER_HPUX(%r19), %r19 |
@@ -2055,24 +2039,6 @@ ENTRY(syscall_exit) | |||
2055 | */ | 2039 | */ |
2056 | loadgp | 2040 | loadgp |
2057 | 2041 | ||
2058 | syscall_check_bh: | ||
2059 | |||
2060 | /* Check for software interrupts */ | ||
2061 | |||
2062 | .import irq_stat,data | ||
2063 | |||
2064 | load32 irq_stat,%r19 | ||
2065 | |||
2066 | #ifdef CONFIG_SMP | ||
2067 | /* sched.h: int processor */ | ||
2068 | /* %r26 is used as scratch register to index into irq_stat[] */ | ||
2069 | ldw TI_CPU-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r26 /* cpu # */ | ||
2070 | |||
2071 | /* shift left ____cacheline_aligned (aka L1_CACHE_BYTES) bits */ | ||
2072 | SHLREG %r26,L1_CACHE_SHIFT,%r20 | ||
2073 | add %r19,%r20,%r19 /* now have &irq_stat[smp_processor_id()] */ | ||
2074 | #endif /* CONFIG_SMP */ | ||
2075 | |||
2076 | syscall_check_resched: | 2042 | syscall_check_resched: |
2077 | 2043 | ||
2078 | /* check for reschedule */ | 2044 | /* check for reschedule */ |
@@ -2114,7 +2080,7 @@ syscall_restore: | |||
2114 | /* Are we being ptraced? */ | 2080 | /* Are we being ptraced? */ |
2115 | LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 | 2081 | LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 |
2116 | 2082 | ||
2117 | LDREG TASK_PTRACE(%r1), %r19 | 2083 | ldw TASK_PTRACE(%r1), %r19 |
2118 | bb,< %r19,31,syscall_restore_rfi | 2084 | bb,< %r19,31,syscall_restore_rfi |
2119 | nop | 2085 | nop |
2120 | 2086 | ||
@@ -2244,7 +2210,7 @@ syscall_do_resched: | |||
2244 | #else | 2210 | #else |
2245 | nop | 2211 | nop |
2246 | #endif | 2212 | #endif |
2247 | b syscall_check_bh /* if resched, we start over again */ | 2213 | b syscall_check_resched /* if resched, we start over again */ |
2248 | nop | 2214 | nop |
2249 | ENDPROC(syscall_exit) | 2215 | ENDPROC(syscall_exit) |
2250 | 2216 | ||
diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c index 39dc835bf89e..fd6552c4c08c 100644 --- a/arch/parisc/kernel/firmware.c +++ b/arch/parisc/kernel/firmware.c | |||
@@ -634,7 +634,7 @@ EXPORT_SYMBOL(pdc_lan_station_id); | |||
634 | * pdc_stable_read - Read data from Stable Storage. | 634 | * pdc_stable_read - Read data from Stable Storage. |
635 | * @staddr: Stable Storage address to access. | 635 | * @staddr: Stable Storage address to access. |
636 | * @memaddr: The memory address where Stable Storage data shall be copied. | 636 | * @memaddr: The memory address where Stable Storage data shall be copied. |
637 | * @count: number of bytes to transfert. count is multiple of 4. | 637 | * @count: number of bytes to transfer. count is multiple of 4. |
638 | * | 638 | * |
639 | * This PDC call reads from the Stable Storage address supplied in staddr | 639 | * This PDC call reads from the Stable Storage address supplied in staddr |
640 | * and copies count bytes to the memory address memaddr. | 640 | * and copies count bytes to the memory address memaddr. |
@@ -660,7 +660,7 @@ EXPORT_SYMBOL(pdc_stable_read); | |||
660 | * pdc_stable_write - Write data to Stable Storage. | 660 | * pdc_stable_write - Write data to Stable Storage. |
661 | * @staddr: Stable Storage address to access. | 661 | * @staddr: Stable Storage address to access. |
662 | * @memaddr: The memory address where Stable Storage data shall be read from. | 662 | * @memaddr: The memory address where Stable Storage data shall be read from. |
663 | * @count: number of bytes to transfert. count is multiple of 4. | 663 | * @count: number of bytes to transfer. count is multiple of 4. |
664 | * | 664 | * |
665 | * This PDC call reads count bytes from the supplied memaddr address, | 665 | * This PDC call reads count bytes from the supplied memaddr address, |
666 | * and copies count bytes to the Stable Storage address staddr. | 666 | * and copies count bytes to the Stable Storage address staddr. |
diff --git a/arch/parisc/kernel/hardware.c b/arch/parisc/kernel/hardware.c index 18ba4cb9159b..04848b2b381c 100644 --- a/arch/parisc/kernel/hardware.c +++ b/arch/parisc/kernel/hardware.c | |||
@@ -38,7 +38,7 @@ | |||
38 | * so don't reference this table after starting the init process | 38 | * so don't reference this table after starting the init process |
39 | */ | 39 | */ |
40 | 40 | ||
41 | static struct hp_hardware hp_hardware_list[] __initdata = { | 41 | static struct hp_hardware hp_hardware_list[] __devinitdata = { |
42 | {HPHW_NPROC,0x01,0x4,0x0,"Indigo (840, 930)"}, | 42 | {HPHW_NPROC,0x01,0x4,0x0,"Indigo (840, 930)"}, |
43 | {HPHW_NPROC,0x8,0x4,0x01,"Firefox(825,925)"}, | 43 | {HPHW_NPROC,0x8,0x4,0x01,"Firefox(825,925)"}, |
44 | {HPHW_NPROC,0xA,0x4,0x01,"Top Gun (835,834,935,635)"}, | 44 | {HPHW_NPROC,0xA,0x4,0x01,"Top Gun (835,834,935,635)"}, |
@@ -1219,7 +1219,7 @@ static struct hp_cpu_type_mask { | |||
1219 | unsigned short model; | 1219 | unsigned short model; |
1220 | unsigned short mask; | 1220 | unsigned short mask; |
1221 | enum cpu_type cpu; | 1221 | enum cpu_type cpu; |
1222 | } hp_cpu_type_mask_list[] __initdata = { | 1222 | } hp_cpu_type_mask_list[] __devinitdata = { |
1223 | 1223 | ||
1224 | { 0x0000, 0x0ff0, pcx }, /* 0x0000 - 0x000f */ | 1224 | { 0x0000, 0x0ff0, pcx }, /* 0x0000 - 0x000f */ |
1225 | { 0x0048, 0x0ff0, pcxl }, /* 0x0040 - 0x004f */ | 1225 | { 0x0048, 0x0ff0, pcxl }, /* 0x0040 - 0x004f */ |
@@ -1296,10 +1296,11 @@ static struct hp_cpu_type_mask { | |||
1296 | { 0x05f0, 0x0ff0, pcxw2 }, /* 0x05f0 - 0x05ff */ | 1296 | { 0x05f0, 0x0ff0, pcxw2 }, /* 0x05f0 - 0x05ff */ |
1297 | { 0x0600, 0x0fe0, pcxl }, /* 0x0600 - 0x061f */ | 1297 | { 0x0600, 0x0fe0, pcxl }, /* 0x0600 - 0x061f */ |
1298 | { 0x0880, 0x0ff0, mako }, /* 0x0880 - 0x088f */ | 1298 | { 0x0880, 0x0ff0, mako }, /* 0x0880 - 0x088f */ |
1299 | { 0x0890, 0x0ff0, mako2 }, /* 0x0890 - 0x089f */ | ||
1299 | { 0x0000, 0x0000, pcx } /* terminate table */ | 1300 | { 0x0000, 0x0000, pcx } /* terminate table */ |
1300 | }; | 1301 | }; |
1301 | 1302 | ||
1302 | char *cpu_name_version[][2] = { | 1303 | const char * const cpu_name_version[][2] = { |
1303 | [pcx] = { "PA7000 (PCX)", "1.0" }, | 1304 | [pcx] = { "PA7000 (PCX)", "1.0" }, |
1304 | [pcxs] = { "PA7000 (PCX-S)", "1.1a" }, | 1305 | [pcxs] = { "PA7000 (PCX-S)", "1.1a" }, |
1305 | [pcxt] = { "PA7100 (PCX-T)", "1.1b" }, | 1306 | [pcxt] = { "PA7100 (PCX-T)", "1.1b" }, |
@@ -1311,10 +1312,11 @@ char *cpu_name_version[][2] = { | |||
1311 | [pcxw] = { "PA8500 (PCX-W)", "2.0" }, | 1312 | [pcxw] = { "PA8500 (PCX-W)", "2.0" }, |
1312 | [pcxw_] = { "PA8600 (PCX-W+)", "2.0" }, | 1313 | [pcxw_] = { "PA8600 (PCX-W+)", "2.0" }, |
1313 | [pcxw2] = { "PA8700 (PCX-W2)", "2.0" }, | 1314 | [pcxw2] = { "PA8700 (PCX-W2)", "2.0" }, |
1314 | [mako] = { "PA8800 (Mako)", "2.0" } | 1315 | [mako] = { "PA8800 (Mako)", "2.0" }, |
1316 | [mako2] = { "PA8900 (Shortfin)", "2.0" } | ||
1315 | }; | 1317 | }; |
1316 | 1318 | ||
1317 | const char * __init | 1319 | const char * __devinit |
1318 | parisc_hardware_description(struct parisc_device_id *id) | 1320 | parisc_hardware_description(struct parisc_device_id *id) |
1319 | { | 1321 | { |
1320 | struct hp_hardware *listptr; | 1322 | struct hp_hardware *listptr; |
@@ -1353,7 +1355,7 @@ parisc_hardware_description(struct parisc_device_id *id) | |||
1353 | 1355 | ||
1354 | 1356 | ||
1355 | /* Interpret hversion (ret[0]) from PDC_MODEL(4)/PDC_MODEL_INFO(0) */ | 1357 | /* Interpret hversion (ret[0]) from PDC_MODEL(4)/PDC_MODEL_INFO(0) */ |
1356 | enum cpu_type __init | 1358 | enum cpu_type __cpuinit |
1357 | parisc_get_cpu_type(unsigned long hversion) | 1359 | parisc_get_cpu_type(unsigned long hversion) |
1358 | { | 1360 | { |
1359 | struct hp_cpu_type_mask *ptr; | 1361 | struct hp_cpu_type_mask *ptr; |
diff --git a/arch/parisc/kernel/hpmc.S b/arch/parisc/kernel/hpmc.S index d8baa158d8a0..43b41df0b541 100644 --- a/arch/parisc/kernel/hpmc.S +++ b/arch/parisc/kernel/hpmc.S | |||
@@ -295,8 +295,5 @@ os_hpmc_6: | |||
295 | b . | 295 | b . |
296 | nop | 296 | nop |
297 | ENDPROC(os_hpmc) | 297 | ENDPROC(os_hpmc) |
298 | 298 | ENTRY(os_hpmc_end) /* this label used to compute os_hpmc checksum */ | |
299 | /* this label used to compute os_hpmc checksum */ | ||
300 | ENTRY(os_hpmc_end) | ||
301 | |||
302 | nop | 299 | nop |
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c index c5c9125dacec..76ce5e3b0050 100644 --- a/arch/parisc/kernel/irq.c +++ b/arch/parisc/kernel/irq.c | |||
@@ -46,14 +46,10 @@ extern irqreturn_t ipi_interrupt(int, void *); | |||
46 | static volatile unsigned long cpu_eiem = 0; | 46 | static volatile unsigned long cpu_eiem = 0; |
47 | 47 | ||
48 | /* | 48 | /* |
49 | ** ack bitmap ... habitually set to 1, but reset to zero | 49 | ** local ACK bitmap ... habitually set to 1, but reset to zero |
50 | ** between ->ack() and ->end() of the interrupt to prevent | 50 | ** between ->ack() and ->end() of the interrupt to prevent |
51 | ** re-interruption of a processing interrupt. | 51 | ** re-interruption of a processing interrupt. |
52 | */ | 52 | */ |
53 | static volatile unsigned long global_ack_eiem = ~0UL; | ||
54 | /* | ||
55 | ** Local bitmap, same as above but for per-cpu interrupts | ||
56 | */ | ||
57 | static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL; | 53 | static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL; |
58 | 54 | ||
59 | static void cpu_disable_irq(unsigned int irq) | 55 | static void cpu_disable_irq(unsigned int irq) |
@@ -94,13 +90,11 @@ void cpu_ack_irq(unsigned int irq) | |||
94 | int cpu = smp_processor_id(); | 90 | int cpu = smp_processor_id(); |
95 | 91 | ||
96 | /* Clear in EIEM so we can no longer process */ | 92 | /* Clear in EIEM so we can no longer process */ |
97 | if (CHECK_IRQ_PER_CPU(irq_desc[irq].status)) | 93 | per_cpu(local_ack_eiem, cpu) &= ~mask; |
98 | per_cpu(local_ack_eiem, cpu) &= ~mask; | ||
99 | else | ||
100 | global_ack_eiem &= ~mask; | ||
101 | 94 | ||
102 | /* disable the interrupt */ | 95 | /* disable the interrupt */ |
103 | set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu)); | 96 | set_eiem(cpu_eiem & per_cpu(local_ack_eiem, cpu)); |
97 | |||
104 | /* and now ack it */ | 98 | /* and now ack it */ |
105 | mtctl(mask, 23); | 99 | mtctl(mask, 23); |
106 | } | 100 | } |
@@ -111,13 +105,10 @@ void cpu_end_irq(unsigned int irq) | |||
111 | int cpu = smp_processor_id(); | 105 | int cpu = smp_processor_id(); |
112 | 106 | ||
113 | /* set it in the eiems---it's no longer in process */ | 107 | /* set it in the eiems---it's no longer in process */ |
114 | if (CHECK_IRQ_PER_CPU(irq_desc[irq].status)) | 108 | per_cpu(local_ack_eiem, cpu) |= mask; |
115 | per_cpu(local_ack_eiem, cpu) |= mask; | ||
116 | else | ||
117 | global_ack_eiem |= mask; | ||
118 | 109 | ||
119 | /* enable the interrupt */ | 110 | /* enable the interrupt */ |
120 | set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu)); | 111 | set_eiem(cpu_eiem & per_cpu(local_ack_eiem, cpu)); |
121 | } | 112 | } |
122 | 113 | ||
123 | #ifdef CONFIG_SMP | 114 | #ifdef CONFIG_SMP |
@@ -354,8 +345,7 @@ void do_cpu_irq_mask(struct pt_regs *regs) | |||
354 | local_irq_disable(); | 345 | local_irq_disable(); |
355 | irq_enter(); | 346 | irq_enter(); |
356 | 347 | ||
357 | eirr_val = mfctl(23) & cpu_eiem & global_ack_eiem & | 348 | eirr_val = mfctl(23) & cpu_eiem & per_cpu(local_ack_eiem, cpu); |
358 | per_cpu(local_ack_eiem, cpu); | ||
359 | if (!eirr_val) | 349 | if (!eirr_val) |
360 | goto set_out; | 350 | goto set_out; |
361 | irq = eirr_to_irq(eirr_val); | 351 | irq = eirr_to_irq(eirr_val); |
@@ -381,7 +371,7 @@ void do_cpu_irq_mask(struct pt_regs *regs) | |||
381 | return; | 371 | return; |
382 | 372 | ||
383 | set_out: | 373 | set_out: |
384 | set_eiem(cpu_eiem & global_ack_eiem & per_cpu(local_ack_eiem, cpu)); | 374 | set_eiem(cpu_eiem & per_cpu(local_ack_eiem, cpu)); |
385 | goto out; | 375 | goto out; |
386 | } | 376 | } |
387 | 377 | ||
diff --git a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c index 0c3aecb85a5c..23c1388df1f5 100644 --- a/arch/parisc/kernel/pci-dma.c +++ b/arch/parisc/kernel/pci-dma.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
22 | #include <linux/pci.h> | 22 | #include <linux/pci.h> |
23 | #include <linux/proc_fs.h> | 23 | #include <linux/proc_fs.h> |
24 | #include <linux/seq_file.h> | ||
24 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
25 | #include <linux/string.h> | 26 | #include <linux/string.h> |
26 | #include <linux/types.h> | 27 | #include <linux/types.h> |
@@ -34,7 +35,6 @@ | |||
34 | #include <asm/tlbflush.h> /* for purge_tlb_*() macros */ | 35 | #include <asm/tlbflush.h> /* for purge_tlb_*() macros */ |
35 | 36 | ||
36 | static struct proc_dir_entry * proc_gsc_root __read_mostly = NULL; | 37 | static struct proc_dir_entry * proc_gsc_root __read_mostly = NULL; |
37 | static int pcxl_proc_info(char *buffer, char **start, off_t offset, int length); | ||
38 | static unsigned long pcxl_used_bytes __read_mostly = 0; | 38 | static unsigned long pcxl_used_bytes __read_mostly = 0; |
39 | static unsigned long pcxl_used_pages __read_mostly = 0; | 39 | static unsigned long pcxl_used_pages __read_mostly = 0; |
40 | 40 | ||
@@ -330,6 +330,54 @@ pcxl_free_range(unsigned long vaddr, size_t size) | |||
330 | dump_resmap(); | 330 | dump_resmap(); |
331 | } | 331 | } |
332 | 332 | ||
333 | static int proc_pcxl_dma_show(struct seq_file *m, void *v) | ||
334 | { | ||
335 | #if 0 | ||
336 | u_long i = 0; | ||
337 | unsigned long *res_ptr = (u_long *)pcxl_res_map; | ||
338 | #endif | ||
339 | unsigned long total_pages = pcxl_res_size << 3; /* 8 bits per byte */ | ||
340 | |||
341 | seq_printf(m, "\nDMA Mapping Area size : %d bytes (%ld pages)\n", | ||
342 | PCXL_DMA_MAP_SIZE, total_pages); | ||
343 | |||
344 | seq_printf(m, "Resource bitmap : %d bytes\n", pcxl_res_size); | ||
345 | |||
346 | seq_puts(m, " total: free: used: % used:\n"); | ||
347 | seq_printf(m, "blocks %8d %8ld %8ld %8ld%%\n", pcxl_res_size, | ||
348 | pcxl_res_size - pcxl_used_bytes, pcxl_used_bytes, | ||
349 | (pcxl_used_bytes * 100) / pcxl_res_size); | ||
350 | |||
351 | seq_printf(m, "pages %8ld %8ld %8ld %8ld%%\n", total_pages, | ||
352 | total_pages - pcxl_used_pages, pcxl_used_pages, | ||
353 | (pcxl_used_pages * 100 / total_pages)); | ||
354 | |||
355 | #if 0 | ||
356 | seq_puts(m, "\nResource bitmap:"); | ||
357 | |||
358 | for(; i < (pcxl_res_size / sizeof(u_long)); ++i, ++res_ptr) { | ||
359 | if ((i & 7) == 0) | ||
360 | seq_puts(m,"\n "); | ||
361 | seq_printf(m, "%s %08lx", buf, *res_ptr); | ||
362 | } | ||
363 | #endif | ||
364 | seq_putc(m, '\n'); | ||
365 | return 0; | ||
366 | } | ||
367 | |||
368 | static int proc_pcxl_dma_open(struct inode *inode, struct file *file) | ||
369 | { | ||
370 | return single_open(file, proc_pcxl_dma_show, NULL); | ||
371 | } | ||
372 | |||
373 | static const struct file_operations proc_pcxl_dma_ops = { | ||
374 | .owner = THIS_MODULE, | ||
375 | .open = proc_pcxl_dma_open, | ||
376 | .read = seq_read, | ||
377 | .llseek = seq_lseek, | ||
378 | .release = single_release, | ||
379 | }; | ||
380 | |||
333 | static int __init | 381 | static int __init |
334 | pcxl_dma_init(void) | 382 | pcxl_dma_init(void) |
335 | { | 383 | { |
@@ -348,9 +396,10 @@ pcxl_dma_init(void) | |||
348 | "pcxl_dma_init: Unable to create gsc /proc dir entry\n"); | 396 | "pcxl_dma_init: Unable to create gsc /proc dir entry\n"); |
349 | else { | 397 | else { |
350 | struct proc_dir_entry* ent; | 398 | struct proc_dir_entry* ent; |
351 | ent = create_proc_info_entry("pcxl_dma", 0, | 399 | ent = create_proc_entry("pcxl_dma", 0, proc_gsc_root); |
352 | proc_gsc_root, pcxl_proc_info); | 400 | if (ent) |
353 | if (!ent) | 401 | ent->proc_fops = &proc_pcxl_dma_ops; |
402 | else | ||
354 | printk(KERN_WARNING | 403 | printk(KERN_WARNING |
355 | "pci-dma.c: Unable to create pcxl_dma /proc entry.\n"); | 404 | "pci-dma.c: Unable to create pcxl_dma /proc entry.\n"); |
356 | } | 405 | } |
@@ -551,40 +600,3 @@ struct hppa_dma_ops pcx_dma_ops = { | |||
551 | .dma_sync_sg_for_cpu = pa11_dma_sync_sg_for_cpu, | 600 | .dma_sync_sg_for_cpu = pa11_dma_sync_sg_for_cpu, |
552 | .dma_sync_sg_for_device = pa11_dma_sync_sg_for_device, | 601 | .dma_sync_sg_for_device = pa11_dma_sync_sg_for_device, |
553 | }; | 602 | }; |
554 | |||
555 | |||
556 | static int pcxl_proc_info(char *buf, char **start, off_t offset, int len) | ||
557 | { | ||
558 | #if 0 | ||
559 | u_long i = 0; | ||
560 | unsigned long *res_ptr = (u_long *)pcxl_res_map; | ||
561 | #endif | ||
562 | unsigned long total_pages = pcxl_res_size << 3; /* 8 bits per byte */ | ||
563 | |||
564 | sprintf(buf, "\nDMA Mapping Area size : %d bytes (%ld pages)\n", | ||
565 | PCXL_DMA_MAP_SIZE, total_pages); | ||
566 | |||
567 | sprintf(buf, "%sResource bitmap : %d bytes\n", buf, pcxl_res_size); | ||
568 | |||
569 | strcat(buf, " total: free: used: % used:\n"); | ||
570 | sprintf(buf, "%sblocks %8d %8ld %8ld %8ld%%\n", buf, pcxl_res_size, | ||
571 | pcxl_res_size - pcxl_used_bytes, pcxl_used_bytes, | ||
572 | (pcxl_used_bytes * 100) / pcxl_res_size); | ||
573 | |||
574 | sprintf(buf, "%spages %8ld %8ld %8ld %8ld%%\n", buf, total_pages, | ||
575 | total_pages - pcxl_used_pages, pcxl_used_pages, | ||
576 | (pcxl_used_pages * 100 / total_pages)); | ||
577 | |||
578 | #if 0 | ||
579 | strcat(buf, "\nResource bitmap:"); | ||
580 | |||
581 | for(; i < (pcxl_res_size / sizeof(u_long)); ++i, ++res_ptr) { | ||
582 | if ((i & 7) == 0) | ||
583 | strcat(buf,"\n "); | ||
584 | sprintf(buf, "%s %08lx", buf, *res_ptr); | ||
585 | } | ||
586 | #endif | ||
587 | strcat(buf, "\n"); | ||
588 | return strlen(buf); | ||
589 | } | ||
590 | |||
diff --git a/arch/parisc/kernel/perf.c b/arch/parisc/kernel/perf.c index a46bc62b643e..89d6d5ad44b5 100644 --- a/arch/parisc/kernel/perf.c +++ b/arch/parisc/kernel/perf.c | |||
@@ -171,7 +171,7 @@ static const uint64_t perf_bitmasks[] = { | |||
171 | 171 | ||
172 | /* | 172 | /* |
173 | * Write control bitmasks for Pa-8700 processor given | 173 | * Write control bitmasks for Pa-8700 processor given |
174 | * somethings have changed slightly. | 174 | * some things have changed slightly. |
175 | */ | 175 | */ |
176 | static const uint64_t perf_bitmasks_piranha[] = { | 176 | static const uint64_t perf_bitmasks_piranha[] = { |
177 | 0x0000000000000000ul, /* first dbl word must be zero */ | 177 | 0x0000000000000000ul, /* first dbl word must be zero */ |
@@ -511,10 +511,12 @@ static int __init perf_init(void) | |||
511 | } else if (boot_cpu_data.cpu_type == pcxw || | 511 | } else if (boot_cpu_data.cpu_type == pcxw || |
512 | boot_cpu_data.cpu_type == pcxw_ || | 512 | boot_cpu_data.cpu_type == pcxw_ || |
513 | boot_cpu_data.cpu_type == pcxw2 || | 513 | boot_cpu_data.cpu_type == pcxw2 || |
514 | boot_cpu_data.cpu_type == mako) { | 514 | boot_cpu_data.cpu_type == mako || |
515 | boot_cpu_data.cpu_type == mako2) { | ||
515 | perf_processor_interface = CUDA_INTF; | 516 | perf_processor_interface = CUDA_INTF; |
516 | if (boot_cpu_data.cpu_type == pcxw2 || | 517 | if (boot_cpu_data.cpu_type == pcxw2 || |
517 | boot_cpu_data.cpu_type == mako) | 518 | boot_cpu_data.cpu_type == mako || |
519 | boot_cpu_data.cpu_type == mako2) | ||
518 | bitmask_array = perf_bitmasks_piranha; | 520 | bitmask_array = perf_bitmasks_piranha; |
519 | } else { | 521 | } else { |
520 | perf_processor_interface = UNKNOWN_INTF; | 522 | perf_processor_interface = UNKNOWN_INTF; |
@@ -574,27 +576,27 @@ static int perf_stop_counters(uint32_t *raddr) | |||
574 | if (!perf_rdr_read_ubuf(16, userbuf)) | 576 | if (!perf_rdr_read_ubuf(16, userbuf)) |
575 | return -13; | 577 | return -13; |
576 | 578 | ||
577 | /* Counter0 is bits 1398 thru 1429 */ | 579 | /* Counter0 is bits 1398 to 1429 */ |
578 | tmp64 = (userbuf[21] << 22) & 0x00000000ffc00000; | 580 | tmp64 = (userbuf[21] << 22) & 0x00000000ffc00000; |
579 | tmp64 |= (userbuf[22] >> 42) & 0x00000000003fffff; | 581 | tmp64 |= (userbuf[22] >> 42) & 0x00000000003fffff; |
580 | /* OR sticky0 (bit 1430) to counter0 bit 32 */ | 582 | /* OR sticky0 (bit 1430) to counter0 bit 32 */ |
581 | tmp64 |= (userbuf[22] >> 10) & 0x0000000080000000; | 583 | tmp64 |= (userbuf[22] >> 10) & 0x0000000080000000; |
582 | raddr[0] = (uint32_t)tmp64; | 584 | raddr[0] = (uint32_t)tmp64; |
583 | 585 | ||
584 | /* Counter1 is bits 1431 thru 1462 */ | 586 | /* Counter1 is bits 1431 to 1462 */ |
585 | tmp64 = (userbuf[22] >> 9) & 0x00000000ffffffff; | 587 | tmp64 = (userbuf[22] >> 9) & 0x00000000ffffffff; |
586 | /* OR sticky1 (bit 1463) to counter1 bit 32 */ | 588 | /* OR sticky1 (bit 1463) to counter1 bit 32 */ |
587 | tmp64 |= (userbuf[22] << 23) & 0x0000000080000000; | 589 | tmp64 |= (userbuf[22] << 23) & 0x0000000080000000; |
588 | raddr[1] = (uint32_t)tmp64; | 590 | raddr[1] = (uint32_t)tmp64; |
589 | 591 | ||
590 | /* Counter2 is bits 1464 thru 1495 */ | 592 | /* Counter2 is bits 1464 to 1495 */ |
591 | tmp64 = (userbuf[22] << 24) & 0x00000000ff000000; | 593 | tmp64 = (userbuf[22] << 24) & 0x00000000ff000000; |
592 | tmp64 |= (userbuf[23] >> 40) & 0x0000000000ffffff; | 594 | tmp64 |= (userbuf[23] >> 40) & 0x0000000000ffffff; |
593 | /* OR sticky2 (bit 1496) to counter2 bit 32 */ | 595 | /* OR sticky2 (bit 1496) to counter2 bit 32 */ |
594 | tmp64 |= (userbuf[23] >> 8) & 0x0000000080000000; | 596 | tmp64 |= (userbuf[23] >> 8) & 0x0000000080000000; |
595 | raddr[2] = (uint32_t)tmp64; | 597 | raddr[2] = (uint32_t)tmp64; |
596 | 598 | ||
597 | /* Counter3 is bits 1497 thru 1528 */ | 599 | /* Counter3 is bits 1497 to 1528 */ |
598 | tmp64 = (userbuf[23] >> 7) & 0x00000000ffffffff; | 600 | tmp64 = (userbuf[23] >> 7) & 0x00000000ffffffff; |
599 | /* OR sticky3 (bit 1529) to counter3 bit 32 */ | 601 | /* OR sticky3 (bit 1529) to counter3 bit 32 */ |
600 | tmp64 |= (userbuf[23] << 25) & 0x0000000080000000; | 602 | tmp64 |= (userbuf[23] << 25) & 0x0000000080000000; |
@@ -616,7 +618,7 @@ static int perf_stop_counters(uint32_t *raddr) | |||
616 | userbuf[23] = 0; | 618 | userbuf[23] = 0; |
617 | 619 | ||
618 | /* | 620 | /* |
619 | * Write back the zero'ed bytes + the image given | 621 | * Write back the zeroed bytes + the image given |
620 | * the read was destructive. | 622 | * the read was destructive. |
621 | */ | 623 | */ |
622 | perf_rdr_write(16, userbuf); | 624 | perf_rdr_write(16, userbuf); |
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 0dd3847f494c..355664812b83 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c | |||
@@ -381,6 +381,10 @@ get_wchan(struct task_struct *p) | |||
381 | struct unwind_frame_info info; | 381 | struct unwind_frame_info info; |
382 | unsigned long ip; | 382 | unsigned long ip; |
383 | int count = 0; | 383 | int count = 0; |
384 | |||
385 | if (!p || p == current || p->state == TASK_RUNNING) | ||
386 | return 0; | ||
387 | |||
384 | /* | 388 | /* |
385 | * These bracket the sleeping functions.. | 389 | * These bracket the sleeping functions.. |
386 | */ | 390 | */ |
diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c index 566226d78bc9..549f5484342c 100644 --- a/arch/parisc/kernel/processor.c +++ b/arch/parisc/kernel/processor.c | |||
@@ -63,7 +63,7 @@ extern int update_cr16_clocksource(void); /* from time.c */ | |||
63 | ** will call register_parisc_driver(&cpu_driver) before calling do_inventory(). | 63 | ** will call register_parisc_driver(&cpu_driver) before calling do_inventory(). |
64 | ** | 64 | ** |
65 | ** The goal of consolidating CPU initialization into one place is | 65 | ** The goal of consolidating CPU initialization into one place is |
66 | ** to make sure all CPU's get initialized the same way. | 66 | ** to make sure all CPUs get initialized the same way. |
67 | ** The code path not shared is how PDC hands control of the CPU to the OS. | 67 | ** The code path not shared is how PDC hands control of the CPU to the OS. |
68 | ** The initialization of OS data structures is the same (done below). | 68 | ** The initialization of OS data structures is the same (done below). |
69 | */ | 69 | */ |
@@ -76,7 +76,7 @@ extern int update_cr16_clocksource(void); /* from time.c */ | |||
76 | * (return 1). If so, initialize the chip and tell other partners in crime | 76 | * (return 1). If so, initialize the chip and tell other partners in crime |
77 | * they have work to do. | 77 | * they have work to do. |
78 | */ | 78 | */ |
79 | static int __init processor_probe(struct parisc_device *dev) | 79 | static int __cpuinit processor_probe(struct parisc_device *dev) |
80 | { | 80 | { |
81 | unsigned long txn_addr; | 81 | unsigned long txn_addr; |
82 | unsigned long cpuid; | 82 | unsigned long cpuid; |
@@ -166,7 +166,7 @@ static int __init processor_probe(struct parisc_device *dev) | |||
166 | #endif | 166 | #endif |
167 | 167 | ||
168 | /* | 168 | /* |
169 | ** CONFIG_SMP: init_smp_config() will attempt to get CPU's into | 169 | ** CONFIG_SMP: init_smp_config() will attempt to get CPUs into |
170 | ** OS control. RENDEZVOUS is the default state - see mem_set above. | 170 | ** OS control. RENDEZVOUS is the default state - see mem_set above. |
171 | ** p->state = STATE_RENDEZVOUS; | 171 | ** p->state = STATE_RENDEZVOUS; |
172 | */ | 172 | */ |
@@ -334,7 +334,7 @@ int __init init_per_cpu(int cpunum) | |||
334 | } | 334 | } |
335 | 335 | ||
336 | /* | 336 | /* |
337 | * Display cpu info for all cpu's. | 337 | * Display CPU info for all CPUs. |
338 | */ | 338 | */ |
339 | int | 339 | int |
340 | show_cpuinfo (struct seq_file *m, void *v) | 340 | show_cpuinfo (struct seq_file *m, void *v) |
@@ -381,19 +381,19 @@ show_cpuinfo (struct seq_file *m, void *v) | |||
381 | return 0; | 381 | return 0; |
382 | } | 382 | } |
383 | 383 | ||
384 | static struct parisc_device_id processor_tbl[] __read_mostly = { | 384 | static const struct parisc_device_id processor_tbl[] = { |
385 | { HPHW_NPROC, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, SVERSION_ANY_ID }, | 385 | { HPHW_NPROC, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, SVERSION_ANY_ID }, |
386 | { 0, } | 386 | { 0, } |
387 | }; | 387 | }; |
388 | 388 | ||
389 | static struct parisc_driver cpu_driver __read_mostly = { | 389 | static struct parisc_driver cpu_driver = { |
390 | .name = "CPU", | 390 | .name = "CPU", |
391 | .id_table = processor_tbl, | 391 | .id_table = processor_tbl, |
392 | .probe = processor_probe | 392 | .probe = processor_probe |
393 | }; | 393 | }; |
394 | 394 | ||
395 | /** | 395 | /** |
396 | * processor_init - Processor initalization procedure. | 396 | * processor_init - Processor initialization procedure. |
397 | * | 397 | * |
398 | * Register this driver. | 398 | * Register this driver. |
399 | */ | 399 | */ |
diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c index 9818919571fd..c44b8c51f5d1 100644 --- a/arch/parisc/kernel/setup.c +++ b/arch/parisc/kernel/setup.c | |||
@@ -45,7 +45,7 @@ | |||
45 | #include <asm/io.h> | 45 | #include <asm/io.h> |
46 | #include <asm/setup.h> | 46 | #include <asm/setup.h> |
47 | 47 | ||
48 | char __initdata command_line[COMMAND_LINE_SIZE]; | 48 | static char __initdata command_line[COMMAND_LINE_SIZE]; |
49 | 49 | ||
50 | /* Intended for ccio/sba/cpu statistics under /proc/bus/{runway|gsc} */ | 50 | /* Intended for ccio/sba/cpu statistics under /proc/bus/{runway|gsc} */ |
51 | struct proc_dir_entry * proc_runway_root __read_mostly = NULL; | 51 | struct proc_dir_entry * proc_runway_root __read_mostly = NULL; |
@@ -162,7 +162,7 @@ void __init setup_arch(char **cmdline_p) | |||
162 | } | 162 | } |
163 | 163 | ||
164 | /* | 164 | /* |
165 | * Display cpu info for all cpu's. | 165 | * Display CPU info for all CPUs. |
166 | * for parisc this is in processor.c | 166 | * for parisc this is in processor.c |
167 | */ | 167 | */ |
168 | extern int show_cpuinfo (struct seq_file *m, void *v); | 168 | extern int show_cpuinfo (struct seq_file *m, void *v); |
@@ -225,6 +225,7 @@ static void __init parisc_proc_mkdir(void) | |||
225 | } | 225 | } |
226 | break; | 226 | break; |
227 | case mako: | 227 | case mako: |
228 | case mako2: | ||
228 | if (NULL == proc_mckinley_root) | 229 | if (NULL == proc_mckinley_root) |
229 | { | 230 | { |
230 | proc_mckinley_root = proc_mkdir("bus/mckinley", NULL); | 231 | proc_mckinley_root = proc_mkdir("bus/mckinley", NULL); |
diff --git a/arch/parisc/kernel/signal32.h b/arch/parisc/kernel/signal32.h index e39b38a67a87..c7800846422c 100644 --- a/arch/parisc/kernel/signal32.h +++ b/arch/parisc/kernel/signal32.h | |||
@@ -113,7 +113,7 @@ int copy_siginfo_from_user32 (siginfo_t *to, compat_siginfo_t __user *from); | |||
113 | /* In a deft move of uber-hackery, we decide to carry the top half of all | 113 | /* In a deft move of uber-hackery, we decide to carry the top half of all |
114 | * 64-bit registers in a non-portable, non-ABI, hidden structure. | 114 | * 64-bit registers in a non-portable, non-ABI, hidden structure. |
115 | * Userspace can read the hidden structure if it *wants* but is never | 115 | * Userspace can read the hidden structure if it *wants* but is never |
116 | * guaranteed to be in the same place. Infact the uc_sigmask from the | 116 | * guaranteed to be in the same place. In fact the uc_sigmask from the |
117 | * ucontext_t structure may push the hidden register file downards | 117 | * ucontext_t structure may push the hidden register file downards |
118 | */ | 118 | */ |
119 | struct compat_regfile { | 119 | struct compat_regfile { |
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index 6ba9257fdb7f..04c7e1d36cea 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c | |||
@@ -8,7 +8,7 @@ | |||
8 | ** Lots of stuff stolen from arch/alpha/kernel/smp.c | 8 | ** Lots of stuff stolen from arch/alpha/kernel/smp.c |
9 | ** ...and then parisc stole from arch/ia64/kernel/smp.c. Thanks David! :^) | 9 | ** ...and then parisc stole from arch/ia64/kernel/smp.c. Thanks David! :^) |
10 | ** | 10 | ** |
11 | ** Thanks to John Curry and Ullas Ponnadi. I learned alot from their work. | 11 | ** Thanks to John Curry and Ullas Ponnadi. I learned a lot from their work. |
12 | ** -grant (1/12/2001) | 12 | ** -grant (1/12/2001) |
13 | ** | 13 | ** |
14 | ** This program is free software; you can redistribute it and/or modify | 14 | ** This program is free software; you can redistribute it and/or modify |
@@ -419,7 +419,7 @@ smp_cpu_init(int cpunum) | |||
419 | BUG(); | 419 | BUG(); |
420 | enter_lazy_tlb(&init_mm, current); | 420 | enter_lazy_tlb(&init_mm, current); |
421 | 421 | ||
422 | init_IRQ(); /* make sure no IRQ's are enabled or pending */ | 422 | init_IRQ(); /* make sure no IRQs are enabled or pending */ |
423 | start_cpu_itimer(); | 423 | start_cpu_itimer(); |
424 | } | 424 | } |
425 | 425 | ||
@@ -461,7 +461,7 @@ void __init smp_callin(void) | |||
461 | /* | 461 | /* |
462 | * Bring one cpu online. | 462 | * Bring one cpu online. |
463 | */ | 463 | */ |
464 | int __init smp_boot_one_cpu(int cpuid) | 464 | int __cpuinit smp_boot_one_cpu(int cpuid) |
465 | { | 465 | { |
466 | struct task_struct *idle; | 466 | struct task_struct *idle; |
467 | long timeout; | 467 | long timeout; |
@@ -552,7 +552,7 @@ void __devinit smp_prepare_boot_cpu(void) | |||
552 | 552 | ||
553 | /* | 553 | /* |
554 | ** inventory.c:do_inventory() hasn't yet been run and thus we | 554 | ** inventory.c:do_inventory() hasn't yet been run and thus we |
555 | ** don't 'discover' the additional CPU's until later. | 555 | ** don't 'discover' the additional CPUs until later. |
556 | */ | 556 | */ |
557 | void __init smp_prepare_cpus(unsigned int max_cpus) | 557 | void __init smp_prepare_cpus(unsigned int max_cpus) |
558 | { | 558 | { |
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c index ce3245f87fdd..bb23ff71c28e 100644 --- a/arch/parisc/kernel/sys_parisc32.c +++ b/arch/parisc/kernel/sys_parisc32.c | |||
@@ -311,14 +311,13 @@ struct readdir32_callback { | |||
311 | int count; | 311 | int count; |
312 | }; | 312 | }; |
313 | 313 | ||
314 | #define ROUND_UP(x,a) ((__typeof__(x))(((unsigned long)(x) + ((a) - 1)) & ~((a) - 1))) | ||
315 | #define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de))) | 314 | #define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de))) |
316 | static int filldir32 (void *__buf, const char *name, int namlen, | 315 | static int filldir32 (void *__buf, const char *name, int namlen, |
317 | loff_t offset, u64 ino, unsigned int d_type) | 316 | loff_t offset, u64 ino, unsigned int d_type) |
318 | { | 317 | { |
319 | struct linux32_dirent __user * dirent; | 318 | struct linux32_dirent __user * dirent; |
320 | struct getdents32_callback * buf = (struct getdents32_callback *) __buf; | 319 | struct getdents32_callback * buf = (struct getdents32_callback *) __buf; |
321 | int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1, 4); | 320 | int reclen = ALIGN(NAME_OFFSET(dirent) + namlen + 1, 4); |
322 | u32 d_ino; | 321 | u32 d_ino; |
323 | 322 | ||
324 | buf->error = -EINVAL; /* only used if we fail.. */ | 323 | buf->error = -EINVAL; /* only used if we fail.. */ |
@@ -350,6 +349,10 @@ sys32_getdents (unsigned int fd, void __user * dirent, unsigned int count) | |||
350 | struct getdents32_callback buf; | 349 | struct getdents32_callback buf; |
351 | int error; | 350 | int error; |
352 | 351 | ||
352 | error = -EFAULT; | ||
353 | if (!access_ok(VERIFY_WRITE, dirent, count)) | ||
354 | goto out; | ||
355 | |||
353 | error = -EBADF; | 356 | error = -EBADF; |
354 | file = fget(fd); | 357 | file = fget(fd); |
355 | if (!file) | 358 | if (!file) |
@@ -366,8 +369,10 @@ sys32_getdents (unsigned int fd, void __user * dirent, unsigned int count) | |||
366 | error = buf.error; | 369 | error = buf.error; |
367 | lastdirent = buf.previous; | 370 | lastdirent = buf.previous; |
368 | if (lastdirent) { | 371 | if (lastdirent) { |
369 | put_user(file->f_pos, &lastdirent->d_off); | 372 | if (put_user(file->f_pos, &lastdirent->d_off)) |
370 | error = count - buf.count; | 373 | error = -EFAULT; |
374 | else | ||
375 | error = count - buf.count; | ||
371 | } | 376 | } |
372 | 377 | ||
373 | out_putf: | 378 | out_putf: |
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S index 10859f53e94f..56f6231cb863 100644 --- a/arch/parisc/kernel/syscall.S +++ b/arch/parisc/kernel/syscall.S | |||
@@ -181,7 +181,7 @@ linux_gateway_entry: | |||
181 | /* Are we being ptraced? */ | 181 | /* Are we being ptraced? */ |
182 | mfctl %cr30, %r1 | 182 | mfctl %cr30, %r1 |
183 | LDREG TI_TASK(%r1),%r1 | 183 | LDREG TI_TASK(%r1),%r1 |
184 | LDREG TASK_PTRACE(%r1), %r1 | 184 | ldw TASK_PTRACE(%r1), %r1 |
185 | bb,<,n %r1,31,.Ltracesys | 185 | bb,<,n %r1,31,.Ltracesys |
186 | 186 | ||
187 | /* Note! We cannot use the syscall table that is mapped | 187 | /* Note! We cannot use the syscall table that is mapped |
@@ -198,7 +198,7 @@ linux_gateway_entry: | |||
198 | ldil L%sys_call_table, %r1 | 198 | ldil L%sys_call_table, %r1 |
199 | ldo R%sys_call_table(%r1), %r19 | 199 | ldo R%sys_call_table(%r1), %r19 |
200 | #endif | 200 | #endif |
201 | comiclr,>>= __NR_Linux_syscalls, %r20, %r0 | 201 | comiclr,>> __NR_Linux_syscalls, %r20, %r0 |
202 | b,n .Lsyscall_nosys | 202 | b,n .Lsyscall_nosys |
203 | 203 | ||
204 | LDREGX %r20(%r19), %r19 | 204 | LDREGX %r20(%r19), %r19 |
@@ -501,7 +501,7 @@ lws_compare_and_swap: | |||
501 | shlw %r20, 4, %r20 | 501 | shlw %r20, 4, %r20 |
502 | add %r20, %r28, %r20 | 502 | add %r20, %r28, %r20 |
503 | 503 | ||
504 | # ifdef ENABLE_LWS_DEBUG | 504 | # if ENABLE_LWS_DEBUG |
505 | /* | 505 | /* |
506 | DEBUG, check for deadlock! | 506 | DEBUG, check for deadlock! |
507 | If the thread register values are the same | 507 | If the thread register values are the same |
@@ -550,7 +550,7 @@ cas_wouldblock: | |||
550 | perspective | 550 | perspective |
551 | */ | 551 | */ |
552 | cas_action: | 552 | cas_action: |
553 | #if defined CONFIG_SMP && defined ENABLE_LWS_DEBUG | 553 | #if defined CONFIG_SMP && ENABLE_LWS_DEBUG |
554 | /* DEBUG */ | 554 | /* DEBUG */ |
555 | mfctl %cr27, %r1 | 555 | mfctl %cr27, %r1 |
556 | stw %r1, 4(%sr2,%r20) | 556 | stw %r1, 4(%sr2,%r20) |
@@ -562,7 +562,7 @@ cas_action: | |||
562 | #ifdef CONFIG_SMP | 562 | #ifdef CONFIG_SMP |
563 | /* Free lock */ | 563 | /* Free lock */ |
564 | stw %r20, 0(%sr2,%r20) | 564 | stw %r20, 0(%sr2,%r20) |
565 | # ifdef ENABLE_LWS_DEBUG | 565 | # if ENABLE_LWS_DEBUG |
566 | /* Clear thread register indicator */ | 566 | /* Clear thread register indicator */ |
567 | stw %r0, 4(%sr2,%r20) | 567 | stw %r0, 4(%sr2,%r20) |
568 | # endif | 568 | # endif |
@@ -576,7 +576,7 @@ cas_action: | |||
576 | #ifdef CONFIG_SMP | 576 | #ifdef CONFIG_SMP |
577 | /* Free lock */ | 577 | /* Free lock */ |
578 | stw %r20, 0(%sr2,%r20) | 578 | stw %r20, 0(%sr2,%r20) |
579 | # ifdef ENABLE_LWS_DEBUG | 579 | # if ENABLE_LWS_DEBUG |
580 | stw %r0, 4(%sr2,%r20) | 580 | stw %r0, 4(%sr2,%r20) |
581 | # endif | 581 | # endif |
582 | #endif | 582 | #endif |
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S index 8bf87e5d9c37..627f3c28ad8c 100644 --- a/arch/parisc/kernel/syscall_table.S +++ b/arch/parisc/kernel/syscall_table.S | |||
@@ -30,11 +30,6 @@ | |||
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #undef ENTRY_SAME | ||
34 | #undef ENTRY_DIFF | ||
35 | #undef ENTRY_UHOH | ||
36 | #undef ENTRY_COMP | ||
37 | #undef ENTRY_OURS | ||
38 | #if defined(CONFIG_64BIT) && !defined(SYSCALL_TABLE_64BIT) | 33 | #if defined(CONFIG_64BIT) && !defined(SYSCALL_TABLE_64BIT) |
39 | /* Use ENTRY_SAME for 32-bit syscalls which are the same on wide and | 34 | /* Use ENTRY_SAME for 32-bit syscalls which are the same on wide and |
40 | * narrow palinux. Use ENTRY_DIFF for those where a 32-bit specific | 35 | * narrow palinux. Use ENTRY_DIFF for those where a 32-bit specific |
@@ -405,5 +400,16 @@ | |||
405 | ENTRY_SAME(epoll_pwait) | 400 | ENTRY_SAME(epoll_pwait) |
406 | ENTRY_COMP(statfs64) | 401 | ENTRY_COMP(statfs64) |
407 | ENTRY_COMP(fstatfs64) | 402 | ENTRY_COMP(fstatfs64) |
403 | ENTRY_COMP(kexec_load) /* 300 */ | ||
404 | ENTRY_COMP(utimensat) | ||
405 | ENTRY_COMP(signalfd) | ||
406 | ENTRY_COMP(timerfd) | ||
407 | ENTRY_SAME(eventfd) | ||
408 | |||
408 | /* Nothing yet */ | 409 | /* Nothing yet */ |
409 | 410 | ||
411 | #undef ENTRY_SAME | ||
412 | #undef ENTRY_DIFF | ||
413 | #undef ENTRY_UHOH | ||
414 | #undef ENTRY_COMP | ||
415 | #undef ENTRY_OURS | ||
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c index 07a991aa9b0c..8b3062a5c812 100644 --- a/arch/parisc/kernel/time.c +++ b/arch/parisc/kernel/time.c | |||
@@ -191,7 +191,7 @@ int update_cr16_clocksource(void) | |||
191 | { | 191 | { |
192 | int change = 0; | 192 | int change = 0; |
193 | 193 | ||
194 | /* since the cr16 cycle counters are not syncronized across CPUs, | 194 | /* since the cr16 cycle counters are not synchronized across CPUs, |
195 | we'll check if we should switch to a safe clocksource: */ | 195 | we'll check if we should switch to a safe clocksource: */ |
196 | if (clocksource_cr16.rating != 0 && num_online_cpus() > 1) { | 196 | if (clocksource_cr16.rating != 0 && num_online_cpus() > 1) { |
197 | clocksource_change_rating(&clocksource_cr16, 0); | 197 | clocksource_change_rating(&clocksource_cr16, 0); |
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c index 745ff741490a..c3ec9f1ec0f3 100644 --- a/arch/parisc/kernel/traps.c +++ b/arch/parisc/kernel/traps.c | |||
@@ -615,7 +615,7 @@ void handle_interruption(int code, struct pt_regs *regs) | |||
615 | 615 | ||
616 | case 13: | 616 | case 13: |
617 | /* Conditional Trap | 617 | /* Conditional Trap |
618 | The condition succees in an instruction which traps | 618 | The condition succeeds in an instruction which traps |
619 | on condition */ | 619 | on condition */ |
620 | if(user_mode(regs)){ | 620 | if(user_mode(regs)){ |
621 | si.si_signo = SIGFPE; | 621 | si.si_signo = SIGFPE; |
@@ -802,13 +802,14 @@ void handle_interruption(int code, struct pt_regs *regs) | |||
802 | 802 | ||
803 | int __init check_ivt(void *iva) | 803 | int __init check_ivt(void *iva) |
804 | { | 804 | { |
805 | extern const u32 os_hpmc[]; | ||
806 | extern const u32 os_hpmc_end[]; | ||
807 | |||
805 | int i; | 808 | int i; |
806 | u32 check = 0; | 809 | u32 check = 0; |
807 | u32 *ivap; | 810 | u32 *ivap; |
808 | u32 *hpmcp; | 811 | u32 *hpmcp; |
809 | u32 length; | 812 | u32 length; |
810 | extern void os_hpmc(void); | ||
811 | extern void os_hpmc_end(void); | ||
812 | 813 | ||
813 | if (strcmp((char *)iva, "cows can fly")) | 814 | if (strcmp((char *)iva, "cows can fly")) |
814 | return -1; | 815 | return -1; |
@@ -820,7 +821,7 @@ int __init check_ivt(void *iva) | |||
820 | 821 | ||
821 | /* Compute Checksum for HPMC handler */ | 822 | /* Compute Checksum for HPMC handler */ |
822 | 823 | ||
823 | length = (u32)((unsigned long)os_hpmc_end - (unsigned long)os_hpmc); | 824 | length = os_hpmc_end - os_hpmc; |
824 | ivap[7] = length; | 825 | ivap[7] = length; |
825 | 826 | ||
826 | hpmcp = (u32 *)os_hpmc; | 827 | hpmcp = (u32 *)os_hpmc; |
diff --git a/arch/parisc/kernel/unwind.c b/arch/parisc/kernel/unwind.c index 89c03707eccc..e70f57e27643 100644 --- a/arch/parisc/kernel/unwind.c +++ b/arch/parisc/kernel/unwind.c | |||
@@ -216,8 +216,10 @@ static void unwind_frame_regs(struct unwind_frame_info *info) | |||
216 | /* Handle some frequent special cases.... */ | 216 | /* Handle some frequent special cases.... */ |
217 | { | 217 | { |
218 | char symname[KSYM_NAME_LEN+1]; | 218 | char symname[KSYM_NAME_LEN+1]; |
219 | char *modname; | ||
219 | 220 | ||
220 | kallsyms_lookup(info->ip, NULL, NULL, NULL, symname); | 221 | kallsyms_lookup(info->ip, NULL, NULL, &modname, |
222 | symname); | ||
221 | 223 | ||
222 | dbg("info->ip = 0x%lx, name = %s\n", info->ip, symname); | 224 | dbg("info->ip = 0x%lx, name = %s\n", info->ip, symname); |
223 | 225 | ||
diff --git a/arch/parisc/math-emu/dbl_float.h b/arch/parisc/math-emu/dbl_float.h index 1570e2e0a327..0c2fa9a951b3 100644 --- a/arch/parisc/math-emu/dbl_float.h +++ b/arch/parisc/math-emu/dbl_float.h | |||
@@ -22,7 +22,7 @@ | |||
22 | PA header file -- do not include this header file for non-PA builds. | 22 | PA header file -- do not include this header file for non-PA builds. |
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | /* 32-bit word grabing functions */ | 25 | /* 32-bit word grabbing functions */ |
26 | #define Dbl_firstword(value) Dallp1(value) | 26 | #define Dbl_firstword(value) Dallp1(value) |
27 | #define Dbl_secondword(value) Dallp2(value) | 27 | #define Dbl_secondword(value) Dallp2(value) |
28 | #define Dbl_thirdword(value) dummy_location | 28 | #define Dbl_thirdword(value) dummy_location |
@@ -37,7 +37,7 @@ | |||
37 | #define Dbl_allp1(object) Dallp1(object) | 37 | #define Dbl_allp1(object) Dallp1(object) |
38 | #define Dbl_allp2(object) Dallp2(object) | 38 | #define Dbl_allp2(object) Dallp2(object) |
39 | 39 | ||
40 | /* dbl_and_signs ands the sign bits of each argument and puts the result | 40 | /* dbl_and_signs ANDs the sign bits of each argument and puts the result |
41 | * into the first argument. dbl_or_signs ors those same sign bits */ | 41 | * into the first argument. dbl_or_signs ors those same sign bits */ |
42 | #define Dbl_and_signs( src1dst, src2) \ | 42 | #define Dbl_and_signs( src1dst, src2) \ |
43 | Dallp1(src1dst) = (Dallp1(src2)|~((unsigned int)1<<31)) & Dallp1(src1dst) | 43 | Dallp1(src1dst) = (Dallp1(src2)|~((unsigned int)1<<31)) & Dallp1(src1dst) |
diff --git a/arch/parisc/math-emu/dfsqrt.c b/arch/parisc/math-emu/dfsqrt.c index b6ed1066f1e4..9542c6d281a5 100644 --- a/arch/parisc/math-emu/dfsqrt.c +++ b/arch/parisc/math-emu/dfsqrt.c | |||
@@ -76,7 +76,7 @@ dbl_fsqrt( | |||
76 | } | 76 | } |
77 | /* | 77 | /* |
78 | * Return quiet NaN or positive infinity. | 78 | * Return quiet NaN or positive infinity. |
79 | * Fall thru to negative test if negative infinity. | 79 | * Fall through to negative test if negative infinity. |
80 | */ | 80 | */ |
81 | if (Dbl_iszero_sign(srcp1) || | 81 | if (Dbl_iszero_sign(srcp1) || |
82 | Dbl_isnotzero_mantissa(srcp1,srcp2)) { | 82 | Dbl_isnotzero_mantissa(srcp1,srcp2)) { |
diff --git a/arch/parisc/math-emu/sfsqrt.c b/arch/parisc/math-emu/sfsqrt.c index cd3f6db1f6fb..4657a12c9107 100644 --- a/arch/parisc/math-emu/sfsqrt.c +++ b/arch/parisc/math-emu/sfsqrt.c | |||
@@ -76,7 +76,7 @@ sgl_fsqrt( | |||
76 | } | 76 | } |
77 | /* | 77 | /* |
78 | * Return quiet NaN or positive infinity. | 78 | * Return quiet NaN or positive infinity. |
79 | * Fall thru to negative test if negative infinity. | 79 | * Fall through to negative test if negative infinity. |
80 | */ | 80 | */ |
81 | if (Sgl_iszero_sign(src) || Sgl_isnotzero_mantissa(src)) { | 81 | if (Sgl_iszero_sign(src) || Sgl_isnotzero_mantissa(src)) { |
82 | *dstptr = src; | 82 | *dstptr = src; |
diff --git a/arch/parisc/math-emu/sgl_float.h b/arch/parisc/math-emu/sgl_float.h index 82519a5c2ba5..4ee4cc95e4bf 100644 --- a/arch/parisc/math-emu/sgl_float.h +++ b/arch/parisc/math-emu/sgl_float.h | |||
@@ -23,7 +23,7 @@ | |||
23 | PA header file -- do not include this header file for non-PA builds. | 23 | PA header file -- do not include this header file for non-PA builds. |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | /* 32-bit word grabing functions */ | 26 | /* 32-bit word grabbing functions */ |
27 | #define Sgl_firstword(value) Sall(value) | 27 | #define Sgl_firstword(value) Sall(value) |
28 | #define Sgl_secondword(value) dummy_location | 28 | #define Sgl_secondword(value) dummy_location |
29 | #define Sgl_thirdword(value) dummy_location | 29 | #define Sgl_thirdword(value) dummy_location |
@@ -36,7 +36,7 @@ | |||
36 | #define Sgl_exponentmantissa(object) Sexponentmantissa(object) | 36 | #define Sgl_exponentmantissa(object) Sexponentmantissa(object) |
37 | #define Sgl_all(object) Sall(object) | 37 | #define Sgl_all(object) Sall(object) |
38 | 38 | ||
39 | /* sgl_and_signs ands the sign bits of each argument and puts the result | 39 | /* sgl_and_signs ANDs the sign bits of each argument and puts the result |
40 | * into the first argument. sgl_or_signs ors those same sign bits */ | 40 | * into the first argument. sgl_or_signs ors those same sign bits */ |
41 | #define Sgl_and_signs( src1dst, src2) \ | 41 | #define Sgl_and_signs( src1dst, src2) \ |
42 | Sall(src1dst) = (Sall(src2)|~((unsigned int)1<<31)) & Sall(src1dst) | 42 | Sall(src1dst) = (Sall(src2)|~((unsigned int)1<<31)) & Sall(src1dst) |
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index 75ea9f2a8a41..e724b362c49a 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c | |||
@@ -890,7 +890,7 @@ void __init paging_init(void) | |||
890 | #ifdef CONFIG_PA20 | 890 | #ifdef CONFIG_PA20 |
891 | 891 | ||
892 | /* | 892 | /* |
893 | * Currently, all PA20 chips have 18 bit protection id's, which is the | 893 | * Currently, all PA20 chips have 18 bit protection IDs, which is the |
894 | * limiting factor (space ids are 32 bits). | 894 | * limiting factor (space ids are 32 bits). |
895 | */ | 895 | */ |
896 | 896 | ||
@@ -899,10 +899,10 @@ void __init paging_init(void) | |||
899 | #else | 899 | #else |
900 | 900 | ||
901 | /* | 901 | /* |
902 | * Currently we have a one-to-one relationship between space id's and | 902 | * Currently we have a one-to-one relationship between space IDs and |
903 | * protection id's. Older parisc chips (PCXS, PCXT, PCXL, PCXL2) only | 903 | * protection IDs. Older parisc chips (PCXS, PCXT, PCXL, PCXL2) only |
904 | * support 15 bit protection id's, so that is the limiting factor. | 904 | * support 15 bit protection IDs, so that is the limiting factor. |
905 | * PCXT' has 18 bit protection id's, but only 16 bit spaceids, so it's | 905 | * PCXT' has 18 bit protection IDs, but only 16 bit spaceids, so it's |
906 | * probably not worth the effort for a special case here. | 906 | * probably not worth the effort for a special case here. |
907 | */ | 907 | */ |
908 | 908 | ||
diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c index 87703df87509..cbca1df8bc60 100644 --- a/arch/powerpc/kernel/udbg.c +++ b/arch/powerpc/kernel/udbg.c | |||
@@ -151,12 +151,18 @@ static struct console udbg_console = { | |||
151 | 151 | ||
152 | static int early_console_initialized; | 152 | static int early_console_initialized; |
153 | 153 | ||
154 | /* called by setup_system */ | 154 | /* |
155 | * Called by setup_system after ppc_md->probe and ppc_md->early_init. | ||
156 | * Call it again after setting udbg_putc in ppc_md->setup_arch. | ||
157 | */ | ||
155 | void register_early_udbg_console(void) | 158 | void register_early_udbg_console(void) |
156 | { | 159 | { |
157 | if (early_console_initialized) | 160 | if (early_console_initialized) |
158 | return; | 161 | return; |
159 | 162 | ||
163 | if (!udbg_putc) | ||
164 | return; | ||
165 | |||
160 | if (strstr(boot_command_line, "udbg-immortal")) { | 166 | if (strstr(boot_command_line, "udbg-immortal")) { |
161 | printk(KERN_INFO "early console immortal !\n"); | 167 | printk(KERN_INFO "early console immortal !\n"); |
162 | udbg_console.flags &= ~CON_BOOT; | 168 | udbg_console.flags &= ~CON_BOOT; |
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 07b1c4ec428d..956571526a57 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -363,8 +363,19 @@ static void __init pmac_setup_arch(void) | |||
363 | smp_ops = &core99_smp_ops; | 363 | smp_ops = &core99_smp_ops; |
364 | } | 364 | } |
365 | #ifdef CONFIG_PPC32 | 365 | #ifdef CONFIG_PPC32 |
366 | else | 366 | else { |
367 | /* | ||
368 | * We have to set bits in cpu_possible_map here since the | ||
369 | * secondary CPU(s) aren't in the device tree, and | ||
370 | * setup_per_cpu_areas only allocates per-cpu data for | ||
371 | * CPUs in the cpu_possible_map. | ||
372 | */ | ||
373 | int cpu; | ||
374 | |||
375 | for (cpu = 1; cpu < 4 && cpu < NR_CPUS; ++cpu) | ||
376 | cpu_set(cpu, cpu_possible_map); | ||
367 | smp_ops = &psurge_smp_ops; | 377 | smp_ops = &psurge_smp_ops; |
378 | } | ||
368 | #endif | 379 | #endif |
369 | #endif /* CONFIG_SMP */ | 380 | #endif /* CONFIG_SMP */ |
370 | 381 | ||
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c index 686ed82bde79..cb2d894541c6 100644 --- a/arch/powerpc/platforms/powermac/smp.c +++ b/arch/powerpc/platforms/powermac/smp.c | |||
@@ -317,7 +317,6 @@ static int __init smp_psurge_probe(void) | |||
317 | ncpus = NR_CPUS; | 317 | ncpus = NR_CPUS; |
318 | for (i = 1; i < ncpus ; ++i) { | 318 | for (i = 1; i < ncpus ; ++i) { |
319 | cpu_set(i, cpu_present_map); | 319 | cpu_set(i, cpu_present_map); |
320 | cpu_set(i, cpu_possible_map); | ||
321 | set_hard_smp_processor_id(i, i); | 320 | set_hard_smp_processor_id(i, i); |
322 | } | 321 | } |
323 | 322 | ||
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index 7d1a11822a1e..8059531bf0ac 100644 --- a/arch/sparc64/kernel/entry.S +++ b/arch/sparc64/kernel/entry.S | |||
@@ -2357,8 +2357,9 @@ sun4v_ldc_unmap: | |||
2357 | nop | 2357 | nop |
2358 | .size sun4v_ldc_unmap, .-sun4v_ldc_unmap | 2358 | .size sun4v_ldc_unmap, .-sun4v_ldc_unmap |
2359 | 2359 | ||
2360 | /* %o0: cookie | 2360 | /* %o0: channel |
2361 | * %o1: mte_cookie | 2361 | * %o1: cookie |
2362 | * %o2: mte_cookie | ||
2362 | * | 2363 | * |
2363 | * returns %o0: status | 2364 | * returns %o0: status |
2364 | */ | 2365 | */ |
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index a36f8dd0c021..e60d283f60bc 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c | |||
@@ -1,7 +1,6 @@ | |||
1 | /* $Id: irq.c,v 1.114 2002/01/11 08:45:38 davem Exp $ | 1 | /* irq.c: UltraSparc IRQ handling/init/registry. |
2 | * irq.c: UltraSparc IRQ handling/init/registry. | ||
3 | * | 2 | * |
4 | * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) | 3 | * Copyright (C) 1997, 2007 David S. Miller (davem@davemloft.net) |
5 | * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) | 4 | * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) |
6 | * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz) | 5 | * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz) |
7 | */ | 6 | */ |
@@ -43,6 +42,7 @@ | |||
43 | #include <asm/cpudata.h> | 42 | #include <asm/cpudata.h> |
44 | #include <asm/auxio.h> | 43 | #include <asm/auxio.h> |
45 | #include <asm/head.h> | 44 | #include <asm/head.h> |
45 | #include <asm/hypervisor.h> | ||
46 | 46 | ||
47 | /* UPA nodes send interrupt packet to UltraSparc with first data reg | 47 | /* UPA nodes send interrupt packet to UltraSparc with first data reg |
48 | * value low 5 (7 on Starfire) bits holding the IRQ identifier being | 48 | * value low 5 (7 on Starfire) bits holding the IRQ identifier being |
@@ -380,6 +380,76 @@ static void sun4v_irq_end(unsigned int virt_irq) | |||
380 | } | 380 | } |
381 | } | 381 | } |
382 | 382 | ||
383 | static void sun4v_virq_enable(unsigned int virt_irq) | ||
384 | { | ||
385 | struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); | ||
386 | unsigned int ino = bucket - &ivector_table[0]; | ||
387 | |||
388 | if (likely(bucket)) { | ||
389 | unsigned long cpuid, dev_handle, dev_ino; | ||
390 | int err; | ||
391 | |||
392 | cpuid = irq_choose_cpu(virt_irq); | ||
393 | |||
394 | dev_handle = ino & IMAP_IGN; | ||
395 | dev_ino = ino & IMAP_INO; | ||
396 | |||
397 | err = sun4v_vintr_set_target(dev_handle, dev_ino, cpuid); | ||
398 | if (err != HV_EOK) | ||
399 | printk("sun4v_vintr_set_target(%lx,%lx,%lu): " | ||
400 | "err(%d)\n", | ||
401 | dev_handle, dev_ino, cpuid, err); | ||
402 | err = sun4v_vintr_set_state(dev_handle, dev_ino, | ||
403 | HV_INTR_ENABLED); | ||
404 | if (err != HV_EOK) | ||
405 | printk("sun4v_vintr_set_state(%lx,%lx," | ||
406 | "HV_INTR_ENABLED): err(%d)\n", | ||
407 | dev_handle, dev_ino, err); | ||
408 | } | ||
409 | } | ||
410 | |||
411 | static void sun4v_virq_disable(unsigned int virt_irq) | ||
412 | { | ||
413 | struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); | ||
414 | unsigned int ino = bucket - &ivector_table[0]; | ||
415 | |||
416 | if (likely(bucket)) { | ||
417 | unsigned long dev_handle, dev_ino; | ||
418 | int err; | ||
419 | |||
420 | dev_handle = ino & IMAP_IGN; | ||
421 | dev_ino = ino & IMAP_INO; | ||
422 | |||
423 | err = sun4v_vintr_set_state(dev_handle, dev_ino, | ||
424 | HV_INTR_DISABLED); | ||
425 | if (err != HV_EOK) | ||
426 | printk("sun4v_vintr_set_state(%lx,%lx," | ||
427 | "HV_INTR_DISABLED): err(%d)\n", | ||
428 | dev_handle, dev_ino, err); | ||
429 | } | ||
430 | } | ||
431 | |||
432 | static void sun4v_virq_end(unsigned int virt_irq) | ||
433 | { | ||
434 | struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); | ||
435 | unsigned int ino = bucket - &ivector_table[0]; | ||
436 | |||
437 | if (likely(bucket)) { | ||
438 | unsigned long dev_handle, dev_ino; | ||
439 | int err; | ||
440 | |||
441 | dev_handle = ino & IMAP_IGN; | ||
442 | dev_ino = ino & IMAP_INO; | ||
443 | |||
444 | err = sun4v_vintr_set_state(dev_handle, dev_ino, | ||
445 | HV_INTR_STATE_IDLE); | ||
446 | if (err != HV_EOK) | ||
447 | printk("sun4v_vintr_set_state(%lx,%lx," | ||
448 | "HV_INTR_STATE_IDLE): err(%d)\n", | ||
449 | dev_handle, dev_ino, err); | ||
450 | } | ||
451 | } | ||
452 | |||
383 | static void run_pre_handler(unsigned int virt_irq) | 453 | static void run_pre_handler(unsigned int virt_irq) |
384 | { | 454 | { |
385 | struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); | 455 | struct ino_bucket *bucket = virt_irq_to_bucket(virt_irq); |
@@ -434,6 +504,21 @@ static struct irq_chip sun4v_msi = { | |||
434 | }; | 504 | }; |
435 | #endif | 505 | #endif |
436 | 506 | ||
507 | static struct irq_chip sun4v_virq = { | ||
508 | .typename = "vsun4v", | ||
509 | .enable = sun4v_virq_enable, | ||
510 | .disable = sun4v_virq_disable, | ||
511 | .end = sun4v_virq_end, | ||
512 | }; | ||
513 | |||
514 | static struct irq_chip sun4v_virq_ack = { | ||
515 | .typename = "vsun4v+ack", | ||
516 | .enable = sun4v_virq_enable, | ||
517 | .disable = sun4v_virq_disable, | ||
518 | .ack = run_pre_handler, | ||
519 | .end = sun4v_virq_end, | ||
520 | }; | ||
521 | |||
437 | void irq_install_pre_handler(int virt_irq, | 522 | void irq_install_pre_handler(int virt_irq, |
438 | void (*func)(unsigned int, void *, void *), | 523 | void (*func)(unsigned int, void *, void *), |
439 | void *arg1, void *arg2) | 524 | void *arg1, void *arg2) |
@@ -447,7 +532,8 @@ void irq_install_pre_handler(int virt_irq, | |||
447 | 532 | ||
448 | chip = get_irq_chip(virt_irq); | 533 | chip = get_irq_chip(virt_irq); |
449 | if (chip == &sun4u_irq_ack || | 534 | if (chip == &sun4u_irq_ack || |
450 | chip == &sun4v_irq_ack | 535 | chip == &sun4v_irq_ack || |
536 | chip == &sun4v_virq_ack | ||
451 | #ifdef CONFIG_PCI_MSI | 537 | #ifdef CONFIG_PCI_MSI |
452 | || chip == &sun4v_msi | 538 | || chip == &sun4v_msi |
453 | #endif | 539 | #endif |
@@ -455,7 +541,9 @@ void irq_install_pre_handler(int virt_irq, | |||
455 | return; | 541 | return; |
456 | 542 | ||
457 | chip = (chip == &sun4u_irq ? | 543 | chip = (chip == &sun4u_irq ? |
458 | &sun4u_irq_ack : &sun4v_irq_ack); | 544 | &sun4u_irq_ack : |
545 | (chip == &sun4v_irq ? | ||
546 | &sun4v_irq_ack : &sun4v_virq_ack)); | ||
459 | set_irq_chip(virt_irq, chip); | 547 | set_irq_chip(virt_irq, chip); |
460 | } | 548 | } |
461 | 549 | ||
@@ -492,19 +580,18 @@ out: | |||
492 | return bucket->virt_irq; | 580 | return bucket->virt_irq; |
493 | } | 581 | } |
494 | 582 | ||
495 | unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino) | 583 | static unsigned int sun4v_build_common(unsigned long sysino, |
584 | struct irq_chip *chip) | ||
496 | { | 585 | { |
497 | struct ino_bucket *bucket; | 586 | struct ino_bucket *bucket; |
498 | struct irq_handler_data *data; | 587 | struct irq_handler_data *data; |
499 | unsigned long sysino; | ||
500 | 588 | ||
501 | BUG_ON(tlb_type != hypervisor); | 589 | BUG_ON(tlb_type != hypervisor); |
502 | 590 | ||
503 | sysino = sun4v_devino_to_sysino(devhandle, devino); | ||
504 | bucket = &ivector_table[sysino]; | 591 | bucket = &ivector_table[sysino]; |
505 | if (!bucket->virt_irq) { | 592 | if (!bucket->virt_irq) { |
506 | bucket->virt_irq = virt_irq_alloc(__irq(bucket)); | 593 | bucket->virt_irq = virt_irq_alloc(__irq(bucket)); |
507 | set_irq_chip(bucket->virt_irq, &sun4v_irq); | 594 | set_irq_chip(bucket->virt_irq, chip); |
508 | } | 595 | } |
509 | 596 | ||
510 | data = get_irq_chip_data(bucket->virt_irq); | 597 | data = get_irq_chip_data(bucket->virt_irq); |
@@ -529,6 +616,32 @@ out: | |||
529 | return bucket->virt_irq; | 616 | return bucket->virt_irq; |
530 | } | 617 | } |
531 | 618 | ||
619 | unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino) | ||
620 | { | ||
621 | unsigned long sysino = sun4v_devino_to_sysino(devhandle, devino); | ||
622 | |||
623 | return sun4v_build_common(sysino, &sun4v_irq); | ||
624 | } | ||
625 | |||
626 | unsigned int sun4v_build_virq(u32 devhandle, unsigned int devino) | ||
627 | { | ||
628 | unsigned long sysino, hv_err; | ||
629 | |||
630 | BUG_ON(devhandle & ~IMAP_IGN); | ||
631 | BUG_ON(devino & ~IMAP_INO); | ||
632 | |||
633 | sysino = devhandle | devino; | ||
634 | |||
635 | hv_err = sun4v_vintr_set_cookie(devhandle, devino, sysino); | ||
636 | if (hv_err) { | ||
637 | prom_printf("IRQ: Fatal, cannot set cookie for [%x:%x] " | ||
638 | "err=%lu\n", devhandle, devino, hv_err); | ||
639 | prom_halt(); | ||
640 | } | ||
641 | |||
642 | return sun4v_build_common(sysino, &sun4v_virq); | ||
643 | } | ||
644 | |||
532 | #ifdef CONFIG_PCI_MSI | 645 | #ifdef CONFIG_PCI_MSI |
533 | unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p, | 646 | unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p, |
534 | unsigned int msi_start, unsigned int msi_end) | 647 | unsigned int msi_start, unsigned int msi_end) |
diff --git a/arch/sparc64/kernel/pci_common.c b/arch/sparc64/kernel/pci_common.c index f974fefc3ebc..4249214608af 100644 --- a/arch/sparc64/kernel/pci_common.c +++ b/arch/sparc64/kernel/pci_common.c | |||
@@ -291,8 +291,9 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm) | |||
291 | 291 | ||
292 | for (i = 0; i < num_pbm_ranges; i++) { | 292 | for (i = 0; i < num_pbm_ranges; i++) { |
293 | const struct linux_prom_pci_ranges *pr = &pbm_ranges[i]; | 293 | const struct linux_prom_pci_ranges *pr = &pbm_ranges[i]; |
294 | unsigned long a; | 294 | unsigned long a, size; |
295 | u32 parent_phys_hi, parent_phys_lo; | 295 | u32 parent_phys_hi, parent_phys_lo; |
296 | u32 size_hi, size_lo; | ||
296 | int type; | 297 | int type; |
297 | 298 | ||
298 | parent_phys_hi = pr->parent_phys_hi; | 299 | parent_phys_hi = pr->parent_phys_hi; |
@@ -300,9 +301,14 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm) | |||
300 | if (tlb_type == hypervisor) | 301 | if (tlb_type == hypervisor) |
301 | parent_phys_hi &= 0x0fffffff; | 302 | parent_phys_hi &= 0x0fffffff; |
302 | 303 | ||
304 | size_hi = pr->size_hi; | ||
305 | size_lo = pr->size_lo; | ||
306 | |||
303 | type = (pr->child_phys_hi >> 24) & 0x3; | 307 | type = (pr->child_phys_hi >> 24) & 0x3; |
304 | a = (((unsigned long)parent_phys_hi << 32UL) | | 308 | a = (((unsigned long)parent_phys_hi << 32UL) | |
305 | ((unsigned long)parent_phys_lo << 0UL)); | 309 | ((unsigned long)parent_phys_lo << 0UL)); |
310 | size = (((unsigned long)size_hi << 32UL) | | ||
311 | ((unsigned long)size_lo << 0UL)); | ||
306 | 312 | ||
307 | switch (type) { | 313 | switch (type) { |
308 | case 0: | 314 | case 0: |
@@ -313,7 +319,7 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm) | |||
313 | case 1: | 319 | case 1: |
314 | /* 16-bit IO space, 16MB */ | 320 | /* 16-bit IO space, 16MB */ |
315 | pbm->io_space.start = a; | 321 | pbm->io_space.start = a; |
316 | pbm->io_space.end = a + ((16UL*1024UL*1024UL) - 1UL); | 322 | pbm->io_space.end = a + size - 1UL; |
317 | pbm->io_space.flags = IORESOURCE_IO; | 323 | pbm->io_space.flags = IORESOURCE_IO; |
318 | saw_io = 1; | 324 | saw_io = 1; |
319 | break; | 325 | break; |
@@ -321,7 +327,7 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm) | |||
321 | case 2: | 327 | case 2: |
322 | /* 32-bit MEM space, 2GB */ | 328 | /* 32-bit MEM space, 2GB */ |
323 | pbm->mem_space.start = a; | 329 | pbm->mem_space.start = a; |
324 | pbm->mem_space.end = a + (0x80000000UL - 1UL); | 330 | pbm->mem_space.end = a + size - 1UL; |
325 | pbm->mem_space.flags = IORESOURCE_MEM; | 331 | pbm->mem_space.flags = IORESOURCE_MEM; |
326 | saw_mem = 1; | 332 | saw_mem = 1; |
327 | break; | 333 | break; |
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index 6b5173ac8131..c99b46354859 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c | |||
@@ -340,6 +340,15 @@ unsigned blk_ordered_req_seq(struct request *rq) | |||
340 | if (rq == &q->post_flush_rq) | 340 | if (rq == &q->post_flush_rq) |
341 | return QUEUE_ORDSEQ_POSTFLUSH; | 341 | return QUEUE_ORDSEQ_POSTFLUSH; |
342 | 342 | ||
343 | /* | ||
344 | * !fs requests don't need to follow barrier ordering. Always | ||
345 | * put them at the front. This fixes the following deadlock. | ||
346 | * | ||
347 | * http://thread.gmane.org/gmane.linux.kernel/537473 | ||
348 | */ | ||
349 | if (!blk_fs_request(rq)) | ||
350 | return QUEUE_ORDSEQ_DRAIN; | ||
351 | |||
343 | if ((rq->cmd_flags & REQ_ORDERED_COLOR) == | 352 | if ((rq->cmd_flags & REQ_ORDERED_COLOR) == |
344 | (q->orig_bar_rq->cmd_flags & REQ_ORDERED_COLOR)) | 353 | (q->orig_bar_rq->cmd_flags & REQ_ORDERED_COLOR)) |
345 | return QUEUE_ORDSEQ_DRAIN; | 354 | return QUEUE_ORDSEQ_DRAIN; |
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index d383168b75fa..0439ee951a11 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c | |||
@@ -1810,68 +1810,69 @@ static int find_gmch(u16 device) | |||
1810 | static const struct intel_driver_description { | 1810 | static const struct intel_driver_description { |
1811 | unsigned int chip_id; | 1811 | unsigned int chip_id; |
1812 | unsigned int gmch_chip_id; | 1812 | unsigned int gmch_chip_id; |
1813 | unsigned int multi_gmch_chip; /* if we have more gfx chip type on this HB. */ | ||
1813 | char *name; | 1814 | char *name; |
1814 | const struct agp_bridge_driver *driver; | 1815 | const struct agp_bridge_driver *driver; |
1815 | const struct agp_bridge_driver *gmch_driver; | 1816 | const struct agp_bridge_driver *gmch_driver; |
1816 | } intel_agp_chipsets[] = { | 1817 | } intel_agp_chipsets[] = { |
1817 | { PCI_DEVICE_ID_INTEL_82443LX_0, 0, "440LX", &intel_generic_driver, NULL }, | 1818 | { PCI_DEVICE_ID_INTEL_82443LX_0, 0, 0, "440LX", &intel_generic_driver, NULL }, |
1818 | { PCI_DEVICE_ID_INTEL_82443BX_0, 0, "440BX", &intel_generic_driver, NULL }, | 1819 | { PCI_DEVICE_ID_INTEL_82443BX_0, 0, 0, "440BX", &intel_generic_driver, NULL }, |
1819 | { PCI_DEVICE_ID_INTEL_82443GX_0, 0, "440GX", &intel_generic_driver, NULL }, | 1820 | { PCI_DEVICE_ID_INTEL_82443GX_0, 0, 0, "440GX", &intel_generic_driver, NULL }, |
1820 | { PCI_DEVICE_ID_INTEL_82810_MC1, PCI_DEVICE_ID_INTEL_82810_IG1, "i810", | 1821 | { PCI_DEVICE_ID_INTEL_82810_MC1, PCI_DEVICE_ID_INTEL_82810_IG1, 0, "i810", |
1821 | NULL, &intel_810_driver }, | 1822 | NULL, &intel_810_driver }, |
1822 | { PCI_DEVICE_ID_INTEL_82810_MC3, PCI_DEVICE_ID_INTEL_82810_IG3, "i810", | 1823 | { PCI_DEVICE_ID_INTEL_82810_MC3, PCI_DEVICE_ID_INTEL_82810_IG3, 0, "i810", |
1823 | NULL, &intel_810_driver }, | 1824 | NULL, &intel_810_driver }, |
1824 | { PCI_DEVICE_ID_INTEL_82810E_MC, PCI_DEVICE_ID_INTEL_82810E_IG, "i810", | 1825 | { PCI_DEVICE_ID_INTEL_82810E_MC, PCI_DEVICE_ID_INTEL_82810E_IG, 0, "i810", |
1825 | NULL, &intel_810_driver }, | 1826 | NULL, &intel_810_driver }, |
1826 | { PCI_DEVICE_ID_INTEL_82815_MC, PCI_DEVICE_ID_INTEL_82815_CGC, "i815", | 1827 | { PCI_DEVICE_ID_INTEL_82815_MC, PCI_DEVICE_ID_INTEL_82815_CGC, 0, "i815", |
1827 | &intel_810_driver, &intel_815_driver }, | 1828 | &intel_815_driver, &intel_810_driver }, |
1828 | { PCI_DEVICE_ID_INTEL_82820_HB, 0, "i820", &intel_820_driver, NULL }, | 1829 | { PCI_DEVICE_ID_INTEL_82820_HB, 0, 0, "i820", &intel_820_driver, NULL }, |
1829 | { PCI_DEVICE_ID_INTEL_82820_UP_HB, 0, "i820", &intel_820_driver, NULL }, | 1830 | { PCI_DEVICE_ID_INTEL_82820_UP_HB, 0, 0, "i820", &intel_820_driver, NULL }, |
1830 | { PCI_DEVICE_ID_INTEL_82830_HB, PCI_DEVICE_ID_INTEL_82830_CGC, "830M", | 1831 | { PCI_DEVICE_ID_INTEL_82830_HB, PCI_DEVICE_ID_INTEL_82830_CGC, 0, "830M", |
1831 | &intel_830mp_driver, &intel_830_driver }, | 1832 | &intel_830mp_driver, &intel_830_driver }, |
1832 | { PCI_DEVICE_ID_INTEL_82840_HB, 0, "i840", &intel_840_driver, NULL }, | 1833 | { PCI_DEVICE_ID_INTEL_82840_HB, 0, 0, "i840", &intel_840_driver, NULL }, |
1833 | { PCI_DEVICE_ID_INTEL_82845_HB, 0, "845G", &intel_845_driver, NULL }, | 1834 | { PCI_DEVICE_ID_INTEL_82845_HB, 0, 0, "845G", &intel_845_driver, NULL }, |
1834 | { PCI_DEVICE_ID_INTEL_82845G_HB, PCI_DEVICE_ID_INTEL_82845G_IG, "830M", | 1835 | { PCI_DEVICE_ID_INTEL_82845G_HB, PCI_DEVICE_ID_INTEL_82845G_IG, 0, "830M", |
1835 | &intel_845_driver, &intel_830_driver }, | 1836 | &intel_845_driver, &intel_830_driver }, |
1836 | { PCI_DEVICE_ID_INTEL_82850_HB, 0, "i850", &intel_850_driver, NULL }, | 1837 | { PCI_DEVICE_ID_INTEL_82850_HB, 0, 0, "i850", &intel_850_driver, NULL }, |
1837 | { PCI_DEVICE_ID_INTEL_82855PM_HB, 0, "855PM", &intel_845_driver, NULL }, | 1838 | { PCI_DEVICE_ID_INTEL_82855PM_HB, 0, 0, "855PM", &intel_845_driver, NULL }, |
1838 | { PCI_DEVICE_ID_INTEL_82855GM_HB, PCI_DEVICE_ID_INTEL_82855GM_IG, "855GM", | 1839 | { PCI_DEVICE_ID_INTEL_82855GM_HB, PCI_DEVICE_ID_INTEL_82855GM_IG, 0, "855GM", |
1839 | &intel_845_driver, &intel_830_driver }, | 1840 | &intel_845_driver, &intel_830_driver }, |
1840 | { PCI_DEVICE_ID_INTEL_82860_HB, 0, "i860", &intel_860_driver, NULL }, | 1841 | { PCI_DEVICE_ID_INTEL_82860_HB, 0, 0, "i860", &intel_860_driver, NULL }, |
1841 | { PCI_DEVICE_ID_INTEL_82865_HB, PCI_DEVICE_ID_INTEL_82865_IG, "865", | 1842 | { PCI_DEVICE_ID_INTEL_82865_HB, PCI_DEVICE_ID_INTEL_82865_IG, 0, "865", |
1842 | &intel_845_driver, &intel_830_driver }, | 1843 | &intel_845_driver, &intel_830_driver }, |
1843 | { PCI_DEVICE_ID_INTEL_82875_HB, 0, "i875", &intel_845_driver, NULL }, | 1844 | { PCI_DEVICE_ID_INTEL_82875_HB, 0, 0, "i875", &intel_845_driver, NULL }, |
1844 | { PCI_DEVICE_ID_INTEL_82915G_HB, PCI_DEVICE_ID_INTEL_82915G_IG, "915G", | 1845 | { PCI_DEVICE_ID_INTEL_82915G_HB, PCI_DEVICE_ID_INTEL_82915G_IG, 0, "915G", |
1845 | &intel_845_driver, &intel_915_driver }, | 1846 | &intel_845_driver, &intel_915_driver }, |
1846 | { PCI_DEVICE_ID_INTEL_82915GM_HB, PCI_DEVICE_ID_INTEL_82915GM_IG, "915GM", | 1847 | { PCI_DEVICE_ID_INTEL_82915GM_HB, PCI_DEVICE_ID_INTEL_82915GM_IG, 0, "915GM", |
1847 | &intel_845_driver, &intel_915_driver }, | 1848 | &intel_845_driver, &intel_915_driver }, |
1848 | { PCI_DEVICE_ID_INTEL_82945G_HB, PCI_DEVICE_ID_INTEL_82945G_IG, "945G", | 1849 | { PCI_DEVICE_ID_INTEL_82945G_HB, PCI_DEVICE_ID_INTEL_82945G_IG, 0, "945G", |
1849 | &intel_845_driver, &intel_915_driver }, | 1850 | &intel_845_driver, &intel_915_driver }, |
1850 | { PCI_DEVICE_ID_INTEL_82945GM_HB, PCI_DEVICE_ID_INTEL_82945GM_IG, "945GM", | 1851 | { PCI_DEVICE_ID_INTEL_82945GM_HB, PCI_DEVICE_ID_INTEL_82945GM_IG, 1, "945GM", |
1851 | &intel_845_driver, &intel_915_driver }, | 1852 | &intel_845_driver, &intel_915_driver }, |
1852 | { PCI_DEVICE_ID_INTEL_82945GM_HB, PCI_DEVICE_ID_INTEL_82945GME_IG, "945GME", | 1853 | { PCI_DEVICE_ID_INTEL_82945GM_HB, PCI_DEVICE_ID_INTEL_82945GME_IG, 0, "945GME", |
1853 | &intel_845_driver, &intel_915_driver }, | 1854 | &intel_845_driver, &intel_915_driver }, |
1854 | { PCI_DEVICE_ID_INTEL_82946GZ_HB, PCI_DEVICE_ID_INTEL_82946GZ_IG, "946GZ", | 1855 | { PCI_DEVICE_ID_INTEL_82946GZ_HB, PCI_DEVICE_ID_INTEL_82946GZ_IG, 0, "946GZ", |
1855 | &intel_845_driver, &intel_i965_driver }, | 1856 | &intel_845_driver, &intel_i965_driver }, |
1856 | { PCI_DEVICE_ID_INTEL_82965G_1_HB, PCI_DEVICE_ID_INTEL_82965G_1_IG, "965G", | 1857 | { PCI_DEVICE_ID_INTEL_82965G_1_HB, PCI_DEVICE_ID_INTEL_82965G_1_IG, 0, "965G", |
1857 | &intel_845_driver, &intel_i965_driver }, | 1858 | &intel_845_driver, &intel_i965_driver }, |
1858 | { PCI_DEVICE_ID_INTEL_82965Q_HB, PCI_DEVICE_ID_INTEL_82965Q_IG, "965Q", | 1859 | { PCI_DEVICE_ID_INTEL_82965Q_HB, PCI_DEVICE_ID_INTEL_82965Q_IG, 0, "965Q", |
1859 | &intel_845_driver, &intel_i965_driver }, | 1860 | &intel_845_driver, &intel_i965_driver }, |
1860 | { PCI_DEVICE_ID_INTEL_82965G_HB, PCI_DEVICE_ID_INTEL_82965G_IG, "965G", | 1861 | { PCI_DEVICE_ID_INTEL_82965G_HB, PCI_DEVICE_ID_INTEL_82965G_IG, 0, "965G", |
1861 | &intel_845_driver, &intel_i965_driver }, | 1862 | &intel_845_driver, &intel_i965_driver }, |
1862 | { PCI_DEVICE_ID_INTEL_82965GM_HB, PCI_DEVICE_ID_INTEL_82965GM_IG, "965GM", | 1863 | { PCI_DEVICE_ID_INTEL_82965GM_HB, PCI_DEVICE_ID_INTEL_82965GM_IG, 1, "965GM", |
1863 | &intel_845_driver, &intel_i965_driver }, | 1864 | &intel_845_driver, &intel_i965_driver }, |
1864 | { PCI_DEVICE_ID_INTEL_82965GM_HB, PCI_DEVICE_ID_INTEL_82965GME_IG, "965GME/GLE", | 1865 | { PCI_DEVICE_ID_INTEL_82965GM_HB, PCI_DEVICE_ID_INTEL_82965GME_IG, 0, "965GME/GLE", |
1865 | &intel_845_driver, &intel_i965_driver }, | 1866 | &intel_845_driver, &intel_i965_driver }, |
1866 | { PCI_DEVICE_ID_INTEL_7505_0, 0, "E7505", &intel_7505_driver, NULL }, | 1867 | { PCI_DEVICE_ID_INTEL_7505_0, 0, 0, "E7505", &intel_7505_driver, NULL }, |
1867 | { PCI_DEVICE_ID_INTEL_7205_0, 0, "E7205", &intel_7505_driver, NULL }, | 1868 | { PCI_DEVICE_ID_INTEL_7205_0, 0, 0, "E7205", &intel_7505_driver, NULL }, |
1868 | { PCI_DEVICE_ID_INTEL_G33_HB, PCI_DEVICE_ID_INTEL_G33_IG, "G33", | 1869 | { PCI_DEVICE_ID_INTEL_G33_HB, PCI_DEVICE_ID_INTEL_G33_IG, 0, "G33", |
1869 | &intel_845_driver, &intel_g33_driver }, | 1870 | &intel_845_driver, &intel_g33_driver }, |
1870 | { PCI_DEVICE_ID_INTEL_Q35_HB, PCI_DEVICE_ID_INTEL_Q35_IG, "Q35", | 1871 | { PCI_DEVICE_ID_INTEL_Q35_HB, PCI_DEVICE_ID_INTEL_Q35_IG, 0, "Q35", |
1871 | &intel_845_driver, &intel_g33_driver }, | 1872 | &intel_845_driver, &intel_g33_driver }, |
1872 | { PCI_DEVICE_ID_INTEL_Q33_HB, PCI_DEVICE_ID_INTEL_Q33_IG, "Q33", | 1873 | { PCI_DEVICE_ID_INTEL_Q33_HB, PCI_DEVICE_ID_INTEL_Q33_IG, 0, "Q33", |
1873 | &intel_845_driver, &intel_g33_driver }, | 1874 | &intel_845_driver, &intel_g33_driver }, |
1874 | { 0, 0, NULL, NULL, NULL } | 1875 | { 0, 0, 0, NULL, NULL, NULL } |
1875 | }; | 1876 | }; |
1876 | 1877 | ||
1877 | static int __devinit agp_intel_probe(struct pci_dev *pdev, | 1878 | static int __devinit agp_intel_probe(struct pci_dev *pdev, |
@@ -1892,10 +1893,19 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev, | |||
1892 | /* In case that multiple models of gfx chip may | 1893 | /* In case that multiple models of gfx chip may |
1893 | stand on same host bridge type, this can be | 1894 | stand on same host bridge type, this can be |
1894 | sure we detect the right IGD. */ | 1895 | sure we detect the right IGD. */ |
1895 | if ((pdev->device == intel_agp_chipsets[i].chip_id) && | 1896 | if (pdev->device == intel_agp_chipsets[i].chip_id) { |
1896 | ((intel_agp_chipsets[i].gmch_chip_id == 0) || | 1897 | if ((intel_agp_chipsets[i].gmch_chip_id != 0) && |
1897 | find_gmch(intel_agp_chipsets[i].gmch_chip_id))) | 1898 | find_gmch(intel_agp_chipsets[i].gmch_chip_id)) { |
1898 | break; | 1899 | bridge->driver = |
1900 | intel_agp_chipsets[i].gmch_driver; | ||
1901 | break; | ||
1902 | } else if (intel_agp_chipsets[i].multi_gmch_chip) { | ||
1903 | continue; | ||
1904 | } else { | ||
1905 | bridge->driver = intel_agp_chipsets[i].driver; | ||
1906 | break; | ||
1907 | } | ||
1908 | } | ||
1899 | } | 1909 | } |
1900 | 1910 | ||
1901 | if (intel_agp_chipsets[i].name == NULL) { | 1911 | if (intel_agp_chipsets[i].name == NULL) { |
@@ -1906,11 +1916,6 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev, | |||
1906 | return -ENODEV; | 1916 | return -ENODEV; |
1907 | } | 1917 | } |
1908 | 1918 | ||
1909 | if (intel_agp_chipsets[i].gmch_chip_id != 0) | ||
1910 | bridge->driver = intel_agp_chipsets[i].gmch_driver; | ||
1911 | else | ||
1912 | bridge->driver = intel_agp_chipsets[i].driver; | ||
1913 | |||
1914 | if (bridge->driver == NULL) { | 1919 | if (bridge->driver == NULL) { |
1915 | printk(KERN_WARNING PFX "Failed to find bridge device " | 1920 | printk(KERN_WARNING PFX "Failed to find bridge device " |
1916 | "(chip_id: %04x)\n", intel_agp_chipsets[i].gmch_chip_id); | 1921 | "(chip_id: %04x)\n", intel_agp_chipsets[i].gmch_chip_id); |
diff --git a/drivers/char/drm/drm_pciids.h b/drivers/char/drm/drm_pciids.h index 177ccc07f968..aa6335032d1e 100644 --- a/drivers/char/drm/drm_pciids.h +++ b/drivers/char/drm/drm_pciids.h | |||
@@ -300,10 +300,15 @@ | |||
300 | {0x8086, 0x2592, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ | 300 | {0x8086, 0x2592, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ |
301 | {0x8086, 0x2772, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ | 301 | {0x8086, 0x2772, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ |
302 | {0x8086, 0x27a2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ | 302 | {0x8086, 0x27a2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ |
303 | {0x8086, 0x27ae, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ | ||
303 | {0x8086, 0x2972, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ | 304 | {0x8086, 0x2972, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ |
304 | {0x8086, 0x2982, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ | 305 | {0x8086, 0x2982, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ |
305 | {0x8086, 0x2992, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ | 306 | {0x8086, 0x2992, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ |
306 | {0x8086, 0x29a2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ | 307 | {0x8086, 0x29a2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ |
308 | {0x8086, 0x29b2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ | ||
309 | {0x8086, 0x29c2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ | ||
310 | {0x8086, 0x29d2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ | ||
307 | {0x8086, 0x2a02, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ | 311 | {0x8086, 0x2a02, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ |
312 | {0x8086, 0x2a12, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ | ||
308 | {0, 0, 0} | 313 | {0, 0, 0} |
309 | 314 | ||
diff --git a/drivers/char/drm/i915_dma.c b/drivers/char/drm/i915_dma.c index 1ba15d9a171a..ea52740af4f6 100644 --- a/drivers/char/drm/i915_dma.c +++ b/drivers/char/drm/i915_dma.c | |||
@@ -35,7 +35,12 @@ | |||
35 | dev->pci_device == 0x2982 || \ | 35 | dev->pci_device == 0x2982 || \ |
36 | dev->pci_device == 0x2992 || \ | 36 | dev->pci_device == 0x2992 || \ |
37 | dev->pci_device == 0x29A2 || \ | 37 | dev->pci_device == 0x29A2 || \ |
38 | dev->pci_device == 0x2A02) | 38 | dev->pci_device == 0x2A02 || \ |
39 | dev->pci_device == 0x2A12) | ||
40 | |||
41 | #define IS_G33(dev) (dev->pci_device == 0x29b2 || \ | ||
42 | dev->pci_device == 0x29c2 || \ | ||
43 | dev->pci_device == 0x29d2) | ||
39 | 44 | ||
40 | /* Really want an OS-independent resettable timer. Would like to have | 45 | /* Really want an OS-independent resettable timer. Would like to have |
41 | * this loop run for (eg) 3 sec, but have the timer reset every time | 46 | * this loop run for (eg) 3 sec, but have the timer reset every time |
@@ -106,6 +111,12 @@ static int i915_dma_cleanup(drm_device_t * dev) | |||
106 | I915_WRITE(0x02080, 0x1ffff000); | 111 | I915_WRITE(0x02080, 0x1ffff000); |
107 | } | 112 | } |
108 | 113 | ||
114 | if (dev_priv->status_gfx_addr) { | ||
115 | dev_priv->status_gfx_addr = 0; | ||
116 | drm_core_ioremapfree(&dev_priv->hws_map, dev); | ||
117 | I915_WRITE(0x2080, 0x1ffff000); | ||
118 | } | ||
119 | |||
109 | drm_free(dev->dev_private, sizeof(drm_i915_private_t), | 120 | drm_free(dev->dev_private, sizeof(drm_i915_private_t), |
110 | DRM_MEM_DRIVER); | 121 | DRM_MEM_DRIVER); |
111 | 122 | ||
@@ -179,26 +190,24 @@ static int i915_initialize(drm_device_t * dev, | |||
179 | dev_priv->allow_batchbuffer = 1; | 190 | dev_priv->allow_batchbuffer = 1; |
180 | 191 | ||
181 | /* Program Hardware Status Page */ | 192 | /* Program Hardware Status Page */ |
182 | dev_priv->status_page_dmah = drm_pci_alloc(dev, PAGE_SIZE, PAGE_SIZE, | 193 | if (!IS_G33(dev)) { |
183 | 0xffffffff); | 194 | dev_priv->status_page_dmah = |
195 | drm_pci_alloc(dev, PAGE_SIZE, PAGE_SIZE, 0xffffffff); | ||
196 | |||
197 | if (!dev_priv->status_page_dmah) { | ||
198 | dev->dev_private = (void *)dev_priv; | ||
199 | i915_dma_cleanup(dev); | ||
200 | DRM_ERROR("Can not allocate hardware status page\n"); | ||
201 | return DRM_ERR(ENOMEM); | ||
202 | } | ||
203 | dev_priv->hw_status_page = dev_priv->status_page_dmah->vaddr; | ||
204 | dev_priv->dma_status_page = dev_priv->status_page_dmah->busaddr; | ||
184 | 205 | ||
185 | if (!dev_priv->status_page_dmah) { | 206 | memset(dev_priv->hw_status_page, 0, PAGE_SIZE); |
186 | dev->dev_private = (void *)dev_priv; | 207 | I915_WRITE(0x02080, dev_priv->dma_status_page); |
187 | i915_dma_cleanup(dev); | ||
188 | DRM_ERROR("Can not allocate hardware status page\n"); | ||
189 | return DRM_ERR(ENOMEM); | ||
190 | } | 208 | } |
191 | dev_priv->hw_status_page = dev_priv->status_page_dmah->vaddr; | ||
192 | dev_priv->dma_status_page = dev_priv->status_page_dmah->busaddr; | ||
193 | |||
194 | memset(dev_priv->hw_status_page, 0, PAGE_SIZE); | ||
195 | DRM_DEBUG("hw status page @ %p\n", dev_priv->hw_status_page); | ||
196 | |||
197 | I915_WRITE(0x02080, dev_priv->dma_status_page); | ||
198 | DRM_DEBUG("Enabled hardware status page\n"); | 209 | DRM_DEBUG("Enabled hardware status page\n"); |
199 | |||
200 | dev->dev_private = (void *)dev_priv; | 210 | dev->dev_private = (void *)dev_priv; |
201 | |||
202 | return 0; | 211 | return 0; |
203 | } | 212 | } |
204 | 213 | ||
@@ -231,7 +240,10 @@ static int i915_dma_resume(drm_device_t * dev) | |||
231 | } | 240 | } |
232 | DRM_DEBUG("hw status page @ %p\n", dev_priv->hw_status_page); | 241 | DRM_DEBUG("hw status page @ %p\n", dev_priv->hw_status_page); |
233 | 242 | ||
234 | I915_WRITE(0x02080, dev_priv->dma_status_page); | 243 | if (dev_priv->status_gfx_addr != 0) |
244 | I915_WRITE(0x02080, dev_priv->status_gfx_addr); | ||
245 | else | ||
246 | I915_WRITE(0x02080, dev_priv->dma_status_page); | ||
235 | DRM_DEBUG("Enabled hardware status page\n"); | 247 | DRM_DEBUG("Enabled hardware status page\n"); |
236 | 248 | ||
237 | return 0; | 249 | return 0; |
@@ -739,6 +751,47 @@ static int i915_setparam(DRM_IOCTL_ARGS) | |||
739 | return 0; | 751 | return 0; |
740 | } | 752 | } |
741 | 753 | ||
754 | static int i915_set_status_page(DRM_IOCTL_ARGS) | ||
755 | { | ||
756 | DRM_DEVICE; | ||
757 | drm_i915_private_t *dev_priv = dev->dev_private; | ||
758 | drm_i915_hws_addr_t hws; | ||
759 | |||
760 | if (!dev_priv) { | ||
761 | DRM_ERROR("%s called with no initialization\n", __FUNCTION__); | ||
762 | return DRM_ERR(EINVAL); | ||
763 | } | ||
764 | DRM_COPY_FROM_USER_IOCTL(hws, (drm_i915_hws_addr_t __user *) data, | ||
765 | sizeof(hws)); | ||
766 | printk(KERN_DEBUG "set status page addr 0x%08x\n", (u32)hws.addr); | ||
767 | |||
768 | dev_priv->status_gfx_addr = hws.addr & (0x1ffff<<12); | ||
769 | |||
770 | dev_priv->hws_map.offset = dev->agp->agp_info.aper_base + hws.addr; | ||
771 | dev_priv->hws_map.size = 4*1024; | ||
772 | dev_priv->hws_map.type = 0; | ||
773 | dev_priv->hws_map.flags = 0; | ||
774 | dev_priv->hws_map.mtrr = 0; | ||
775 | |||
776 | drm_core_ioremap(&dev_priv->hws_map, dev); | ||
777 | if (dev_priv->hws_map.handle == NULL) { | ||
778 | dev->dev_private = (void *)dev_priv; | ||
779 | i915_dma_cleanup(dev); | ||
780 | dev_priv->status_gfx_addr = 0; | ||
781 | DRM_ERROR("can not ioremap virtual address for" | ||
782 | " G33 hw status page\n"); | ||
783 | return DRM_ERR(ENOMEM); | ||
784 | } | ||
785 | dev_priv->hw_status_page = dev_priv->hws_map.handle; | ||
786 | |||
787 | memset(dev_priv->hw_status_page, 0, PAGE_SIZE); | ||
788 | I915_WRITE(0x02080, dev_priv->status_gfx_addr); | ||
789 | DRM_DEBUG("load hws 0x2080 with gfx mem 0x%x\n", | ||
790 | dev_priv->status_gfx_addr); | ||
791 | DRM_DEBUG("load hws at %p\n", dev_priv->hw_status_page); | ||
792 | return 0; | ||
793 | } | ||
794 | |||
742 | int i915_driver_load(drm_device_t *dev, unsigned long flags) | 795 | int i915_driver_load(drm_device_t *dev, unsigned long flags) |
743 | { | 796 | { |
744 | /* i915 has 4 more counters */ | 797 | /* i915 has 4 more counters */ |
@@ -785,6 +838,7 @@ drm_ioctl_desc_t i915_ioctls[] = { | |||
785 | [DRM_IOCTL_NR(DRM_I915_SET_VBLANK_PIPE)] = { i915_vblank_pipe_set, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY }, | 838 | [DRM_IOCTL_NR(DRM_I915_SET_VBLANK_PIPE)] = { i915_vblank_pipe_set, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY }, |
786 | [DRM_IOCTL_NR(DRM_I915_GET_VBLANK_PIPE)] = { i915_vblank_pipe_get, DRM_AUTH }, | 839 | [DRM_IOCTL_NR(DRM_I915_GET_VBLANK_PIPE)] = { i915_vblank_pipe_get, DRM_AUTH }, |
787 | [DRM_IOCTL_NR(DRM_I915_VBLANK_SWAP)] = {i915_vblank_swap, DRM_AUTH}, | 840 | [DRM_IOCTL_NR(DRM_I915_VBLANK_SWAP)] = {i915_vblank_swap, DRM_AUTH}, |
841 | [DRM_IOCTL_NR(DRM_I915_HWS_ADDR)] = {i915_set_status_page, DRM_AUTH}, | ||
788 | }; | 842 | }; |
789 | 843 | ||
790 | int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls); | 844 | int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls); |
diff --git a/drivers/char/drm/i915_drm.h b/drivers/char/drm/i915_drm.h index 96a468886a7a..7b7b68b96f31 100644 --- a/drivers/char/drm/i915_drm.h +++ b/drivers/char/drm/i915_drm.h | |||
@@ -142,6 +142,7 @@ typedef struct _drm_i915_sarea { | |||
142 | #define DRM_I915_SET_VBLANK_PIPE 0x0d | 142 | #define DRM_I915_SET_VBLANK_PIPE 0x0d |
143 | #define DRM_I915_GET_VBLANK_PIPE 0x0e | 143 | #define DRM_I915_GET_VBLANK_PIPE 0x0e |
144 | #define DRM_I915_VBLANK_SWAP 0x0f | 144 | #define DRM_I915_VBLANK_SWAP 0x0f |
145 | #define DRM_I915_HWS_ADDR 0x11 | ||
145 | 146 | ||
146 | #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) | 147 | #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) |
147 | #define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) | 148 | #define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) |
@@ -262,4 +263,8 @@ typedef struct drm_i915_vblank_swap { | |||
262 | unsigned int sequence; | 263 | unsigned int sequence; |
263 | } drm_i915_vblank_swap_t; | 264 | } drm_i915_vblank_swap_t; |
264 | 265 | ||
266 | typedef struct drm_i915_hws_addr { | ||
267 | uint64_t addr; | ||
268 | } drm_i915_hws_addr_t; | ||
269 | |||
265 | #endif /* _I915_DRM_H_ */ | 270 | #endif /* _I915_DRM_H_ */ |
diff --git a/drivers/char/drm/i915_drv.h b/drivers/char/drm/i915_drv.h index 93cdcfe6aa84..85e323acb95d 100644 --- a/drivers/char/drm/i915_drv.h +++ b/drivers/char/drm/i915_drv.h | |||
@@ -91,6 +91,8 @@ typedef struct drm_i915_private { | |||
91 | void *hw_status_page; | 91 | void *hw_status_page; |
92 | dma_addr_t dma_status_page; | 92 | dma_addr_t dma_status_page; |
93 | unsigned long counter; | 93 | unsigned long counter; |
94 | unsigned int status_gfx_addr; | ||
95 | drm_local_map_t hws_map; | ||
94 | 96 | ||
95 | unsigned int cpp; | 97 | unsigned int cpp; |
96 | int back_offset; | 98 | int back_offset; |
diff --git a/drivers/char/drm/radeon_ioc32.c b/drivers/char/drm/radeon_ioc32.c index 1f1f9cc055a4..04126c2e79ab 100644 --- a/drivers/char/drm/radeon_ioc32.c +++ b/drivers/char/drm/radeon_ioc32.c | |||
@@ -349,6 +349,31 @@ static int compat_radeon_irq_emit(struct file *file, unsigned int cmd, | |||
349 | DRM_IOCTL_RADEON_IRQ_EMIT, (unsigned long)request); | 349 | DRM_IOCTL_RADEON_IRQ_EMIT, (unsigned long)request); |
350 | } | 350 | } |
351 | 351 | ||
352 | typedef struct drm_radeon_setparam32 { | ||
353 | int param; | ||
354 | u64 value; | ||
355 | } __attribute__((packed)) drm_radeon_setparam32_t; | ||
356 | |||
357 | static int compat_radeon_cp_setparam(struct file *file, unsigned int cmd, | ||
358 | unsigned long arg) | ||
359 | { | ||
360 | drm_radeon_setparam32_t req32; | ||
361 | drm_radeon_setparam_t __user *request; | ||
362 | |||
363 | if (copy_from_user(&req32, (void __user *) arg, sizeof(req32))) | ||
364 | return -EFAULT; | ||
365 | |||
366 | request = compat_alloc_user_space(sizeof(*request)); | ||
367 | if (!access_ok(VERIFY_WRITE, request, sizeof(*request)) | ||
368 | || __put_user(req32.param, &request->param) | ||
369 | || __put_user((void __user *)(unsigned long)req32.value, | ||
370 | &request->value)) | ||
371 | return -EFAULT; | ||
372 | |||
373 | return drm_ioctl(file->f_dentry->d_inode, file, | ||
374 | DRM_IOCTL_RADEON_SETPARAM, (unsigned long) request); | ||
375 | } | ||
376 | |||
352 | drm_ioctl_compat_t *radeon_compat_ioctls[] = { | 377 | drm_ioctl_compat_t *radeon_compat_ioctls[] = { |
353 | [DRM_RADEON_CP_INIT] = compat_radeon_cp_init, | 378 | [DRM_RADEON_CP_INIT] = compat_radeon_cp_init, |
354 | [DRM_RADEON_CLEAR] = compat_radeon_cp_clear, | 379 | [DRM_RADEON_CLEAR] = compat_radeon_cp_clear, |
@@ -357,6 +382,7 @@ drm_ioctl_compat_t *radeon_compat_ioctls[] = { | |||
357 | [DRM_RADEON_VERTEX2] = compat_radeon_cp_vertex2, | 382 | [DRM_RADEON_VERTEX2] = compat_radeon_cp_vertex2, |
358 | [DRM_RADEON_CMDBUF] = compat_radeon_cp_cmdbuf, | 383 | [DRM_RADEON_CMDBUF] = compat_radeon_cp_cmdbuf, |
359 | [DRM_RADEON_GETPARAM] = compat_radeon_cp_getparam, | 384 | [DRM_RADEON_GETPARAM] = compat_radeon_cp_getparam, |
385 | [DRM_RADEON_SETPARAM] = compat_radeon_cp_setparam, | ||
360 | [DRM_RADEON_ALLOC] = compat_radeon_mem_alloc, | 386 | [DRM_RADEON_ALLOC] = compat_radeon_mem_alloc, |
361 | [DRM_RADEON_IRQ_EMIT] = compat_radeon_irq_emit, | 387 | [DRM_RADEON_IRQ_EMIT] = compat_radeon_irq_emit, |
362 | }; | 388 | }; |
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index 1c040d80c641..152312c1fafa 100644 --- a/drivers/kvm/kvm.h +++ b/drivers/kvm/kvm.h | |||
@@ -304,6 +304,7 @@ struct kvm_vcpu { | |||
304 | char *host_fx_image; | 304 | char *host_fx_image; |
305 | char *guest_fx_image; | 305 | char *guest_fx_image; |
306 | int fpu_active; | 306 | int fpu_active; |
307 | int guest_fpu_loaded; | ||
307 | 308 | ||
308 | int mmio_needed; | 309 | int mmio_needed; |
309 | int mmio_read_completed; | 310 | int mmio_read_completed; |
@@ -508,6 +509,8 @@ void fx_init(struct kvm_vcpu *vcpu); | |||
508 | void load_msrs(struct vmx_msr_entry *e, int n); | 509 | void load_msrs(struct vmx_msr_entry *e, int n); |
509 | void save_msrs(struct vmx_msr_entry *e, int n); | 510 | void save_msrs(struct vmx_msr_entry *e, int n); |
510 | void kvm_resched(struct kvm_vcpu *vcpu); | 511 | void kvm_resched(struct kvm_vcpu *vcpu); |
512 | void kvm_load_guest_fpu(struct kvm_vcpu *vcpu); | ||
513 | void kvm_put_guest_fpu(struct kvm_vcpu *vcpu); | ||
511 | 514 | ||
512 | int kvm_read_guest(struct kvm_vcpu *vcpu, | 515 | int kvm_read_guest(struct kvm_vcpu *vcpu, |
513 | gva_t addr, | 516 | gva_t addr, |
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index da985b31b17e..8f1f07adb04e 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c | |||
@@ -253,6 +253,28 @@ int kvm_write_guest(struct kvm_vcpu *vcpu, gva_t addr, unsigned long size, | |||
253 | } | 253 | } |
254 | EXPORT_SYMBOL_GPL(kvm_write_guest); | 254 | EXPORT_SYMBOL_GPL(kvm_write_guest); |
255 | 255 | ||
256 | void kvm_load_guest_fpu(struct kvm_vcpu *vcpu) | ||
257 | { | ||
258 | if (!vcpu->fpu_active || vcpu->guest_fpu_loaded) | ||
259 | return; | ||
260 | |||
261 | vcpu->guest_fpu_loaded = 1; | ||
262 | fx_save(vcpu->host_fx_image); | ||
263 | fx_restore(vcpu->guest_fx_image); | ||
264 | } | ||
265 | EXPORT_SYMBOL_GPL(kvm_load_guest_fpu); | ||
266 | |||
267 | void kvm_put_guest_fpu(struct kvm_vcpu *vcpu) | ||
268 | { | ||
269 | if (!vcpu->guest_fpu_loaded) | ||
270 | return; | ||
271 | |||
272 | vcpu->guest_fpu_loaded = 0; | ||
273 | fx_save(vcpu->guest_fx_image); | ||
274 | fx_restore(vcpu->host_fx_image); | ||
275 | } | ||
276 | EXPORT_SYMBOL_GPL(kvm_put_guest_fpu); | ||
277 | |||
256 | /* | 278 | /* |
257 | * Switches to specified vcpu, until a matching vcpu_put() | 279 | * Switches to specified vcpu, until a matching vcpu_put() |
258 | */ | 280 | */ |
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 184238e2ece4..c1ac106ace8c 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c | |||
@@ -280,6 +280,7 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu) | |||
280 | 280 | ||
281 | static void vmx_vcpu_put(struct kvm_vcpu *vcpu) | 281 | static void vmx_vcpu_put(struct kvm_vcpu *vcpu) |
282 | { | 282 | { |
283 | kvm_put_guest_fpu(vcpu); | ||
283 | put_cpu(); | 284 | put_cpu(); |
284 | } | 285 | } |
285 | 286 | ||
@@ -1847,10 +1848,8 @@ again: | |||
1847 | if (vcpu->guest_debug.enabled) | 1848 | if (vcpu->guest_debug.enabled) |
1848 | kvm_guest_debug_pre(vcpu); | 1849 | kvm_guest_debug_pre(vcpu); |
1849 | 1850 | ||
1850 | if (vcpu->fpu_active) { | 1851 | kvm_load_guest_fpu(vcpu); |
1851 | fx_save(vcpu->host_fx_image); | 1852 | |
1852 | fx_restore(vcpu->guest_fx_image); | ||
1853 | } | ||
1854 | /* | 1853 | /* |
1855 | * Loading guest fpu may have cleared host cr0.ts | 1854 | * Loading guest fpu may have cleared host cr0.ts |
1856 | */ | 1855 | */ |
@@ -2012,11 +2011,6 @@ again: | |||
2012 | } | 2011 | } |
2013 | #endif | 2012 | #endif |
2014 | 2013 | ||
2015 | if (vcpu->fpu_active) { | ||
2016 | fx_save(vcpu->guest_fx_image); | ||
2017 | fx_restore(vcpu->host_fx_image); | ||
2018 | } | ||
2019 | |||
2020 | vcpu->interrupt_window_open = (vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) & 3) == 0; | 2014 | vcpu->interrupt_window_open = (vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) & 3) == 0; |
2021 | 2015 | ||
2022 | asm ("mov %0, %%ds; mov %0, %%es" : : "r"(__USER_DS)); | 2016 | asm ("mov %0, %%ds; mov %0, %%es" : : "r"(__USER_DS)); |
diff --git a/drivers/net/lasi_82596.c b/drivers/net/lasi_82596.c index 6b49fc4bd1a1..741780e14b2c 100644 --- a/drivers/net/lasi_82596.c +++ b/drivers/net/lasi_82596.c | |||
@@ -83,6 +83,7 @@ | |||
83 | #include <linux/init.h> | 83 | #include <linux/init.h> |
84 | #include <linux/types.h> | 84 | #include <linux/types.h> |
85 | #include <linux/bitops.h> | 85 | #include <linux/bitops.h> |
86 | #include <linux/dma-mapping.h> | ||
86 | 87 | ||
87 | #include <asm/io.h> | 88 | #include <asm/io.h> |
88 | #include <asm/pgtable.h> | 89 | #include <asm/pgtable.h> |
diff --git a/drivers/net/ppp_mppe.c b/drivers/net/ppp_mppe.c index d5bdd2574659..5ae80bbe2edc 100644 --- a/drivers/net/ppp_mppe.c +++ b/drivers/net/ppp_mppe.c | |||
@@ -493,14 +493,14 @@ mppe_decompress(void *arg, unsigned char *ibuf, int isize, unsigned char *obuf, | |||
493 | 493 | ||
494 | /* | 494 | /* |
495 | * Make sure we have enough room to decrypt the packet. | 495 | * Make sure we have enough room to decrypt the packet. |
496 | * Note that for our test we only subtract 1 byte whereas in | 496 | * To account for possible PFC we should only subtract 1 |
497 | * mppe_compress() we added 2 bytes (+MPPE_OVHD); | 497 | * byte whereas in mppe_compress() we added 2 bytes (+MPPE_OVHD); |
498 | * this is to account for possible PFC. | 498 | * However, we assume no PFC, thus subtracting 2 bytes. |
499 | */ | 499 | */ |
500 | if (osize < isize - MPPE_OVHD - 1) { | 500 | if (osize < isize - MPPE_OVHD - 2) { |
501 | printk(KERN_DEBUG "mppe_decompress[%d]: osize too small! " | 501 | printk(KERN_DEBUG "mppe_decompress[%d]: osize too small! " |
502 | "(have: %d need: %d)\n", state->unit, | 502 | "(have: %d need: %d)\n", state->unit, |
503 | osize, isize - MPPE_OVHD - 1); | 503 | osize, isize - MPPE_OVHD - 2); |
504 | return DECOMP_ERROR; | 504 | return DECOMP_ERROR; |
505 | } | 505 | } |
506 | osize = isize - MPPE_OVHD - 2; /* assume no PFC */ | 506 | osize = isize - MPPE_OVHD - 2; /* assume no PFC */ |
diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index 894fdb9d44c0..b3c4dbff26b8 100644 --- a/drivers/parisc/ccio-dma.c +++ b/drivers/parisc/ccio-dma.c | |||
@@ -32,6 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/types.h> | 34 | #include <linux/types.h> |
35 | #include <linux/kernel.h> | ||
35 | #include <linux/init.h> | 36 | #include <linux/init.h> |
36 | #include <linux/mm.h> | 37 | #include <linux/mm.h> |
37 | #include <linux/spinlock.h> | 38 | #include <linux/spinlock.h> |
@@ -292,7 +293,6 @@ static int ioc_count; | |||
292 | #define PDIR_INDEX(iovp) ((iovp)>>IOVP_SHIFT) | 293 | #define PDIR_INDEX(iovp) ((iovp)>>IOVP_SHIFT) |
293 | #define MKIOVP(pdir_idx) ((long)(pdir_idx) << IOVP_SHIFT) | 294 | #define MKIOVP(pdir_idx) ((long)(pdir_idx) << IOVP_SHIFT) |
294 | #define MKIOVA(iovp,offset) (dma_addr_t)((long)iovp | (long)offset) | 295 | #define MKIOVA(iovp,offset) (dma_addr_t)((long)iovp | (long)offset) |
295 | #define ROUNDUP(x,y) ((x + ((y)-1)) & ~((y)-1)) | ||
296 | 296 | ||
297 | /* | 297 | /* |
298 | ** Don't worry about the 150% average search length on a miss. | 298 | ** Don't worry about the 150% average search length on a miss. |
@@ -668,7 +668,7 @@ ccio_mark_invalid(struct ioc *ioc, dma_addr_t iova, size_t byte_cnt) | |||
668 | size_t saved_byte_cnt; | 668 | size_t saved_byte_cnt; |
669 | 669 | ||
670 | /* round up to nearest page size */ | 670 | /* round up to nearest page size */ |
671 | saved_byte_cnt = byte_cnt = ROUNDUP(byte_cnt, IOVP_SIZE); | 671 | saved_byte_cnt = byte_cnt = ALIGN(byte_cnt, IOVP_SIZE); |
672 | 672 | ||
673 | while(byte_cnt > 0) { | 673 | while(byte_cnt > 0) { |
674 | /* invalidate one page at a time */ | 674 | /* invalidate one page at a time */ |
@@ -751,7 +751,7 @@ ccio_map_single(struct device *dev, void *addr, size_t size, | |||
751 | offset = ((unsigned long) addr) & ~IOVP_MASK; | 751 | offset = ((unsigned long) addr) & ~IOVP_MASK; |
752 | 752 | ||
753 | /* round up to nearest IOVP_SIZE */ | 753 | /* round up to nearest IOVP_SIZE */ |
754 | size = ROUNDUP(size + offset, IOVP_SIZE); | 754 | size = ALIGN(size + offset, IOVP_SIZE); |
755 | spin_lock_irqsave(&ioc->res_lock, flags); | 755 | spin_lock_irqsave(&ioc->res_lock, flags); |
756 | 756 | ||
757 | #ifdef CCIO_MAP_STATS | 757 | #ifdef CCIO_MAP_STATS |
@@ -814,7 +814,7 @@ ccio_unmap_single(struct device *dev, dma_addr_t iova, size_t size, | |||
814 | 814 | ||
815 | iova ^= offset; /* clear offset bits */ | 815 | iova ^= offset; /* clear offset bits */ |
816 | size += offset; | 816 | size += offset; |
817 | size = ROUNDUP(size, IOVP_SIZE); | 817 | size = ALIGN(size, IOVP_SIZE); |
818 | 818 | ||
819 | spin_lock_irqsave(&ioc->res_lock, flags); | 819 | spin_lock_irqsave(&ioc->res_lock, flags); |
820 | 820 | ||
@@ -1227,7 +1227,7 @@ ccio_get_iotlb_size(struct parisc_device *dev) | |||
1227 | #endif /* 0 */ | 1227 | #endif /* 0 */ |
1228 | 1228 | ||
1229 | /* We *can't* support JAVA (T600). Venture there at your own risk. */ | 1229 | /* We *can't* support JAVA (T600). Venture there at your own risk. */ |
1230 | static struct parisc_device_id ccio_tbl[] = { | 1230 | static const struct parisc_device_id ccio_tbl[] = { |
1231 | { HPHW_IOA, HVERSION_REV_ANY_ID, U2_IOA_RUNWAY, 0xb }, /* U2 */ | 1231 | { HPHW_IOA, HVERSION_REV_ANY_ID, U2_IOA_RUNWAY, 0xb }, /* U2 */ |
1232 | { HPHW_IOA, HVERSION_REV_ANY_ID, UTURN_IOA_RUNWAY, 0xb }, /* UTurn */ | 1232 | { HPHW_IOA, HVERSION_REV_ANY_ID, UTURN_IOA_RUNWAY, 0xb }, /* UTurn */ |
1233 | { 0, } | 1233 | { 0, } |
@@ -1370,7 +1370,7 @@ ccio_ioc_init(struct ioc *ioc) | |||
1370 | } | 1370 | } |
1371 | } | 1371 | } |
1372 | 1372 | ||
1373 | static void | 1373 | static void __init |
1374 | ccio_init_resource(struct resource *res, char *name, void __iomem *ioaddr) | 1374 | ccio_init_resource(struct resource *res, char *name, void __iomem *ioaddr) |
1375 | { | 1375 | { |
1376 | int result; | 1376 | int result; |
@@ -1537,7 +1537,7 @@ int ccio_request_resource(const struct parisc_device *dev, | |||
1537 | * If so, initialize the chip and tell other partners in crime they | 1537 | * If so, initialize the chip and tell other partners in crime they |
1538 | * have work to do. | 1538 | * have work to do. |
1539 | */ | 1539 | */ |
1540 | static int ccio_probe(struct parisc_device *dev) | 1540 | static int __init ccio_probe(struct parisc_device *dev) |
1541 | { | 1541 | { |
1542 | int i; | 1542 | int i; |
1543 | struct ioc *ioc, **ioc_p = &ioc_list; | 1543 | struct ioc *ioc, **ioc_p = &ioc_list; |
diff --git a/drivers/parisc/eisa.c b/drivers/parisc/eisa.c index 309076b39853..771cef592542 100644 --- a/drivers/parisc/eisa.c +++ b/drivers/parisc/eisa.c | |||
@@ -307,7 +307,7 @@ static void init_eisa_pic(void) | |||
307 | 307 | ||
308 | #define is_mongoose(dev) (dev->id.sversion == 0x00076) | 308 | #define is_mongoose(dev) (dev->id.sversion == 0x00076) |
309 | 309 | ||
310 | static int __devinit eisa_probe(struct parisc_device *dev) | 310 | static int __init eisa_probe(struct parisc_device *dev) |
311 | { | 311 | { |
312 | int i, result; | 312 | int i, result; |
313 | 313 | ||
@@ -387,7 +387,7 @@ static int __devinit eisa_probe(struct parisc_device *dev) | |||
387 | return 0; | 387 | return 0; |
388 | } | 388 | } |
389 | 389 | ||
390 | static struct parisc_device_id eisa_tbl[] = { | 390 | static const struct parisc_device_id eisa_tbl[] = { |
391 | { HPHW_BA, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00076 }, /* Mongoose */ | 391 | { HPHW_BA, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00076 }, /* Mongoose */ |
392 | { HPHW_BA, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00090 }, /* Wax EISA */ | 392 | { HPHW_BA, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00090 }, /* Wax EISA */ |
393 | { 0, } | 393 | { 0, } |
diff --git a/drivers/parisc/iommu-helpers.h b/drivers/parisc/iommu-helpers.h index 38d9e1aba1d0..0a1f99a2e93e 100644 --- a/drivers/parisc/iommu-helpers.h +++ b/drivers/parisc/iommu-helpers.h | |||
@@ -138,7 +138,7 @@ iommu_coalesce_chunks(struct ioc *ioc, struct scatterlist *startsg, int nents, | |||
138 | ** exceed DMA_CHUNK_SIZE if we coalesce the | 138 | ** exceed DMA_CHUNK_SIZE if we coalesce the |
139 | ** next entry. | 139 | ** next entry. |
140 | */ | 140 | */ |
141 | if(unlikely(ROUNDUP(dma_len + dma_offset + startsg->length, | 141 | if(unlikely(ALIGN(dma_len + dma_offset + startsg->length, |
142 | IOVP_SIZE) > DMA_CHUNK_SIZE)) | 142 | IOVP_SIZE) > DMA_CHUNK_SIZE)) |
143 | break; | 143 | break; |
144 | 144 | ||
@@ -158,7 +158,7 @@ iommu_coalesce_chunks(struct ioc *ioc, struct scatterlist *startsg, int nents, | |||
158 | ** Allocate space for DMA stream. | 158 | ** Allocate space for DMA stream. |
159 | */ | 159 | */ |
160 | sg_dma_len(contig_sg) = dma_len; | 160 | sg_dma_len(contig_sg) = dma_len; |
161 | dma_len = ROUNDUP(dma_len + dma_offset, IOVP_SIZE); | 161 | dma_len = ALIGN(dma_len + dma_offset, IOVP_SIZE); |
162 | sg_dma_address(contig_sg) = | 162 | sg_dma_address(contig_sg) = |
163 | PIDE_FLAG | 163 | PIDE_FLAG |
164 | | (iommu_alloc_range(ioc, dma_len) << IOVP_SHIFT) | 164 | | (iommu_alloc_range(ioc, dma_len) << IOVP_SHIFT) |
diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c index 815e445c3125..924ef0609460 100644 --- a/drivers/parisc/pdc_stable.c +++ b/drivers/parisc/pdc_stable.c | |||
@@ -1067,7 +1067,7 @@ pdc_stable_init(void) | |||
1067 | error = subsys_create_file(&stable_subsys, attr); | 1067 | error = subsys_create_file(&stable_subsys, attr); |
1068 | 1068 | ||
1069 | /* register the paths subsys as a subsystem of stable subsys */ | 1069 | /* register the paths subsys as a subsystem of stable subsys */ |
1070 | kset_set_kset_s(&paths_subsys, stable_subsys); | 1070 | kobj_set_kset_s(&paths_subsys, stable_subsys); |
1071 | if ((rc = subsystem_register(&paths_subsys))) | 1071 | if ((rc = subsystem_register(&paths_subsys))) |
1072 | goto fail_subsysreg; | 1072 | goto fail_subsysreg; |
1073 | 1073 | ||
diff --git a/drivers/parisc/power.c b/drivers/parisc/power.c index 6dedbdef7106..90cca5e3805f 100644 --- a/drivers/parisc/power.c +++ b/drivers/parisc/power.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/reboot.h> | 41 | #include <linux/reboot.h> |
42 | #include <linux/sched.h> | 42 | #include <linux/sched.h> |
43 | #include <linux/kthread.h> | 43 | #include <linux/kthread.h> |
44 | #include <linux/pm.h> | ||
44 | 45 | ||
45 | #include <asm/pdc.h> | 46 | #include <asm/pdc.h> |
46 | #include <asm/io.h> | 47 | #include <asm/io.h> |
diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c index 322957ac2ad1..d044c48323e6 100644 --- a/drivers/parisc/sba_iommu.c +++ b/drivers/parisc/sba_iommu.c | |||
@@ -113,8 +113,6 @@ module_param(sba_reserve_agpgart, int, 0444); | |||
113 | MODULE_PARM_DESC(sba_reserve_agpgart, "Reserve half of IO pdir as AGPGART"); | 113 | MODULE_PARM_DESC(sba_reserve_agpgart, "Reserve half of IO pdir as AGPGART"); |
114 | #endif | 114 | #endif |
115 | 115 | ||
116 | #define ROUNDUP(x,y) ((x + ((y)-1)) & ~((y)-1)) | ||
117 | |||
118 | 116 | ||
119 | /************************************ | 117 | /************************************ |
120 | ** SBA register read and write support | 118 | ** SBA register read and write support |
@@ -352,7 +350,7 @@ sba_search_bitmap(struct ioc *ioc, unsigned long bits_wanted) | |||
352 | ** SBA HW features in the unmap path. | 350 | ** SBA HW features in the unmap path. |
353 | */ | 351 | */ |
354 | unsigned long o = 1 << get_order(bits_wanted << PAGE_SHIFT); | 352 | unsigned long o = 1 << get_order(bits_wanted << PAGE_SHIFT); |
355 | uint bitshiftcnt = ROUNDUP(ioc->res_bitshift, o); | 353 | uint bitshiftcnt = ALIGN(ioc->res_bitshift, o); |
356 | unsigned long mask; | 354 | unsigned long mask; |
357 | 355 | ||
358 | if (bitshiftcnt >= BITS_PER_LONG) { | 356 | if (bitshiftcnt >= BITS_PER_LONG) { |
@@ -779,7 +777,7 @@ sba_unmap_single(struct device *dev, dma_addr_t iova, size_t size, | |||
779 | offset = iova & ~IOVP_MASK; | 777 | offset = iova & ~IOVP_MASK; |
780 | iova ^= offset; /* clear offset bits */ | 778 | iova ^= offset; /* clear offset bits */ |
781 | size += offset; | 779 | size += offset; |
782 | size = ROUNDUP(size, IOVP_SIZE); | 780 | size = ALIGN(size, IOVP_SIZE); |
783 | 781 | ||
784 | spin_lock_irqsave(&ioc->res_lock, flags); | 782 | spin_lock_irqsave(&ioc->res_lock, flags); |
785 | 783 | ||
diff --git a/drivers/parisc/superio.c b/drivers/parisc/superio.c index 1fd97f7c8b98..a708c329675e 100644 --- a/drivers/parisc/superio.c +++ b/drivers/parisc/superio.c | |||
@@ -389,7 +389,7 @@ int superio_fixup_irq(struct pci_dev *pcidev) | |||
389 | return local_irq; | 389 | return local_irq; |
390 | } | 390 | } |
391 | 391 | ||
392 | static void __devinit superio_serial_init(void) | 392 | static void __init superio_serial_init(void) |
393 | { | 393 | { |
394 | #ifdef CONFIG_SERIAL_8250 | 394 | #ifdef CONFIG_SERIAL_8250 |
395 | int retval; | 395 | int retval; |
@@ -423,7 +423,7 @@ static void __devinit superio_serial_init(void) | |||
423 | } | 423 | } |
424 | 424 | ||
425 | 425 | ||
426 | static void __devinit superio_parport_init(void) | 426 | static void __init superio_parport_init(void) |
427 | { | 427 | { |
428 | #ifdef CONFIG_PARPORT_PC | 428 | #ifdef CONFIG_PARPORT_PC |
429 | if (!parport_pc_probe_port(sio_dev.pp_base, | 429 | if (!parport_pc_probe_port(sio_dev.pp_base, |
@@ -450,7 +450,7 @@ static void superio_fixup_pci(struct pci_dev *pdev) | |||
450 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415, superio_fixup_pci); | 450 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415, superio_fixup_pci); |
451 | 451 | ||
452 | 452 | ||
453 | static int __devinit | 453 | static int __init |
454 | superio_probe(struct pci_dev *dev, const struct pci_device_id *id) | 454 | superio_probe(struct pci_dev *dev, const struct pci_device_id *id) |
455 | { | 455 | { |
456 | struct superio_device *sio = &sio_dev; | 456 | struct superio_device *sio = &sio_dev; |
@@ -485,7 +485,7 @@ superio_probe(struct pci_dev *dev, const struct pci_device_id *id) | |||
485 | return -ENODEV; | 485 | return -ENODEV; |
486 | } | 486 | } |
487 | 487 | ||
488 | static struct pci_device_id superio_tbl[] = { | 488 | static const struct pci_device_id superio_tbl[] = { |
489 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87560_LIO) }, | 489 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87560_LIO) }, |
490 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87560_USB) }, | 490 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87560_USB) }, |
491 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415) }, | 491 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415) }, |
diff --git a/drivers/parport/parport_gsc.c b/drivers/parport/parport_gsc.c index 17bf9937d276..43652ba523eb 100644 --- a/drivers/parport/parport_gsc.c +++ b/drivers/parport/parport_gsc.c | |||
@@ -350,7 +350,7 @@ struct parport *__devinit parport_gsc_probe_port (unsigned long base, | |||
350 | 350 | ||
351 | #define PARPORT_GSC_OFFSET 0x800 | 351 | #define PARPORT_GSC_OFFSET 0x800 |
352 | 352 | ||
353 | static int __initdata parport_count; | 353 | static int __devinitdata parport_count; |
354 | 354 | ||
355 | static int __devinit parport_init_chip(struct parisc_device *dev) | 355 | static int __devinit parport_init_chip(struct parisc_device *dev) |
356 | { | 356 | { |
diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c index 717b360d0415..870017d44970 100644 --- a/drivers/video/console/sticore.c +++ b/drivers/video/console/sticore.c | |||
@@ -240,7 +240,7 @@ static void sti_flush(unsigned long from, unsigned long len) | |||
240 | flush_icache_range(from, from+len); | 240 | flush_icache_range(from, from+len); |
241 | } | 241 | } |
242 | 242 | ||
243 | void __init | 243 | void __devinit |
244 | sti_rom_copy(unsigned long base, unsigned long count, void *dest) | 244 | sti_rom_copy(unsigned long base, unsigned long count, void *dest) |
245 | { | 245 | { |
246 | unsigned long dest_len = count; | 246 | unsigned long dest_len = count; |
@@ -269,7 +269,7 @@ sti_rom_copy(unsigned long base, unsigned long count, void *dest) | |||
269 | static char default_sti_path[21] __read_mostly; | 269 | static char default_sti_path[21] __read_mostly; |
270 | 270 | ||
271 | #ifndef MODULE | 271 | #ifndef MODULE |
272 | static int __init sti_setup(char *str) | 272 | static int __devinit sti_setup(char *str) |
273 | { | 273 | { |
274 | if (str) | 274 | if (str) |
275 | strlcpy (default_sti_path, str, sizeof (default_sti_path)); | 275 | strlcpy (default_sti_path, str, sizeof (default_sti_path)); |
@@ -288,12 +288,12 @@ __setup("sti=", sti_setup); | |||
288 | 288 | ||
289 | 289 | ||
290 | 290 | ||
291 | static char __initdata *font_name[MAX_STI_ROMS] = { "VGA8x16", }; | 291 | static char __devinitdata *font_name[MAX_STI_ROMS] = { "VGA8x16", }; |
292 | static int __initdata font_index[MAX_STI_ROMS], | 292 | static int __devinitdata font_index[MAX_STI_ROMS], |
293 | font_height[MAX_STI_ROMS], | 293 | font_height[MAX_STI_ROMS], |
294 | font_width[MAX_STI_ROMS]; | 294 | font_width[MAX_STI_ROMS]; |
295 | #ifndef MODULE | 295 | #ifndef MODULE |
296 | static int __init sti_font_setup(char *str) | 296 | static int __devinit sti_font_setup(char *str) |
297 | { | 297 | { |
298 | char *x; | 298 | char *x; |
299 | int i = 0; | 299 | int i = 0; |
@@ -346,7 +346,7 @@ __setup("sti_font=", sti_font_setup); | |||
346 | 346 | ||
347 | 347 | ||
348 | 348 | ||
349 | static void __init | 349 | static void __devinit |
350 | sti_dump_globcfg(struct sti_glob_cfg *glob_cfg, unsigned int sti_mem_request) | 350 | sti_dump_globcfg(struct sti_glob_cfg *glob_cfg, unsigned int sti_mem_request) |
351 | { | 351 | { |
352 | struct sti_glob_cfg_ext *cfg; | 352 | struct sti_glob_cfg_ext *cfg; |
@@ -386,7 +386,7 @@ sti_dump_globcfg(struct sti_glob_cfg *glob_cfg, unsigned int sti_mem_request) | |||
386 | cfg->sti_mem_addr, sti_mem_request)); | 386 | cfg->sti_mem_addr, sti_mem_request)); |
387 | } | 387 | } |
388 | 388 | ||
389 | static void __init | 389 | static void __devinit |
390 | sti_dump_outptr(struct sti_struct *sti) | 390 | sti_dump_outptr(struct sti_struct *sti) |
391 | { | 391 | { |
392 | DPRINTK((KERN_INFO | 392 | DPRINTK((KERN_INFO |
@@ -400,7 +400,7 @@ sti_dump_outptr(struct sti_struct *sti) | |||
400 | sti->outptr.attributes)); | 400 | sti->outptr.attributes)); |
401 | } | 401 | } |
402 | 402 | ||
403 | static int __init | 403 | static int __devinit |
404 | sti_init_glob_cfg(struct sti_struct *sti, | 404 | sti_init_glob_cfg(struct sti_struct *sti, |
405 | unsigned long rom_address, unsigned long hpa) | 405 | unsigned long rom_address, unsigned long hpa) |
406 | { | 406 | { |
@@ -482,7 +482,7 @@ sti_init_glob_cfg(struct sti_struct *sti, | |||
482 | } | 482 | } |
483 | 483 | ||
484 | #ifdef CONFIG_FB | 484 | #ifdef CONFIG_FB |
485 | struct sti_cooked_font * __init | 485 | struct sti_cooked_font * __devinit |
486 | sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) | 486 | sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) |
487 | { | 487 | { |
488 | const struct font_desc *fbfont; | 488 | const struct font_desc *fbfont; |
@@ -538,14 +538,14 @@ sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) | |||
538 | return cooked_font; | 538 | return cooked_font; |
539 | } | 539 | } |
540 | #else | 540 | #else |
541 | struct sti_cooked_font * __init | 541 | struct sti_cooked_font * __devinit |
542 | sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) | 542 | sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name) |
543 | { | 543 | { |
544 | return NULL; | 544 | return NULL; |
545 | } | 545 | } |
546 | #endif | 546 | #endif |
547 | 547 | ||
548 | struct sti_cooked_font * __init | 548 | struct sti_cooked_font * __devinit |
549 | sti_select_font(struct sti_cooked_rom *rom, | 549 | sti_select_font(struct sti_cooked_rom *rom, |
550 | int (*search_font_fnc) (struct sti_cooked_rom *,int,int) ) | 550 | int (*search_font_fnc) (struct sti_cooked_rom *,int,int) ) |
551 | { | 551 | { |
@@ -572,7 +572,7 @@ sti_select_font(struct sti_cooked_rom *rom, | |||
572 | } | 572 | } |
573 | 573 | ||
574 | 574 | ||
575 | static void __init | 575 | static void __devinit |
576 | sti_dump_rom(struct sti_rom *rom) | 576 | sti_dump_rom(struct sti_rom *rom) |
577 | { | 577 | { |
578 | printk(KERN_INFO " id %04x-%04x, conforms to spec rev. %d.%02x\n", | 578 | printk(KERN_INFO " id %04x-%04x, conforms to spec rev. %d.%02x\n", |
@@ -590,7 +590,7 @@ sti_dump_rom(struct sti_rom *rom) | |||
590 | } | 590 | } |
591 | 591 | ||
592 | 592 | ||
593 | static int __init | 593 | static int __devinit |
594 | sti_cook_fonts(struct sti_cooked_rom *cooked_rom, | 594 | sti_cook_fonts(struct sti_cooked_rom *cooked_rom, |
595 | struct sti_rom *raw_rom) | 595 | struct sti_rom *raw_rom) |
596 | { | 596 | { |
@@ -625,7 +625,7 @@ sti_cook_fonts(struct sti_cooked_rom *cooked_rom, | |||
625 | } | 625 | } |
626 | 626 | ||
627 | 627 | ||
628 | static int __init | 628 | static int __devinit |
629 | sti_search_font(struct sti_cooked_rom *rom, int height, int width) | 629 | sti_search_font(struct sti_cooked_rom *rom, int height, int width) |
630 | { | 630 | { |
631 | struct sti_cooked_font *font; | 631 | struct sti_cooked_font *font; |
@@ -642,7 +642,7 @@ sti_search_font(struct sti_cooked_rom *rom, int height, int width) | |||
642 | #define BMODE_RELOCATE(offset) offset = (offset) / 4; | 642 | #define BMODE_RELOCATE(offset) offset = (offset) / 4; |
643 | #define BMODE_LAST_ADDR_OFFS 0x50 | 643 | #define BMODE_LAST_ADDR_OFFS 0x50 |
644 | 644 | ||
645 | static void * __init | 645 | static void * __devinit |
646 | sti_bmode_font_raw(struct sti_cooked_font *f) | 646 | sti_bmode_font_raw(struct sti_cooked_font *f) |
647 | { | 647 | { |
648 | unsigned char *n, *p, *q; | 648 | unsigned char *n, *p, *q; |
@@ -660,7 +660,7 @@ sti_bmode_font_raw(struct sti_cooked_font *f) | |||
660 | return n + 3; | 660 | return n + 3; |
661 | } | 661 | } |
662 | 662 | ||
663 | static void __init | 663 | static void __devinit |
664 | sti_bmode_rom_copy(unsigned long base, unsigned long count, void *dest) | 664 | sti_bmode_rom_copy(unsigned long base, unsigned long count, void *dest) |
665 | { | 665 | { |
666 | unsigned long dest_len = count; | 666 | unsigned long dest_len = count; |
@@ -675,7 +675,7 @@ sti_bmode_rom_copy(unsigned long base, unsigned long count, void *dest) | |||
675 | sti_flush(dest_start, dest_len); | 675 | sti_flush(dest_start, dest_len); |
676 | } | 676 | } |
677 | 677 | ||
678 | static struct sti_rom * __init | 678 | static struct sti_rom * __devinit |
679 | sti_get_bmode_rom (unsigned long address) | 679 | sti_get_bmode_rom (unsigned long address) |
680 | { | 680 | { |
681 | struct sti_rom *raw; | 681 | struct sti_rom *raw; |
@@ -711,7 +711,7 @@ sti_get_bmode_rom (unsigned long address) | |||
711 | return raw; | 711 | return raw; |
712 | } | 712 | } |
713 | 713 | ||
714 | struct sti_rom * __init | 714 | struct sti_rom * __devinit |
715 | sti_get_wmode_rom (unsigned long address) | 715 | sti_get_wmode_rom (unsigned long address) |
716 | { | 716 | { |
717 | struct sti_rom *raw; | 717 | struct sti_rom *raw; |
@@ -727,7 +727,7 @@ sti_get_wmode_rom (unsigned long address) | |||
727 | return raw; | 727 | return raw; |
728 | } | 728 | } |
729 | 729 | ||
730 | int __init | 730 | int __devinit |
731 | sti_read_rom(int wordmode, struct sti_struct *sti, unsigned long address) | 731 | sti_read_rom(int wordmode, struct sti_struct *sti, unsigned long address) |
732 | { | 732 | { |
733 | struct sti_cooked_rom *cooked; | 733 | struct sti_cooked_rom *cooked; |
@@ -783,7 +783,7 @@ out_err: | |||
783 | return 0; | 783 | return 0; |
784 | } | 784 | } |
785 | 785 | ||
786 | static struct sti_struct * __init | 786 | static struct sti_struct * __devinit |
787 | sti_try_rom_generic(unsigned long address, unsigned long hpa, struct pci_dev *pd) | 787 | sti_try_rom_generic(unsigned long address, unsigned long hpa, struct pci_dev *pd) |
788 | { | 788 | { |
789 | struct sti_struct *sti; | 789 | struct sti_struct *sti; |
@@ -898,7 +898,7 @@ out_err: | |||
898 | return NULL; | 898 | return NULL; |
899 | } | 899 | } |
900 | 900 | ||
901 | static void __init sticore_check_for_default_sti(struct sti_struct *sti, char *path) | 901 | static void __devinit sticore_check_for_default_sti(struct sti_struct *sti, char *path) |
902 | { | 902 | { |
903 | if (strcmp (path, default_sti_path) == 0) | 903 | if (strcmp (path, default_sti_path) == 0) |
904 | default_sti = sti; | 904 | default_sti = sti; |
@@ -909,7 +909,7 @@ static void __init sticore_check_for_default_sti(struct sti_struct *sti, char *p | |||
909 | * in the additional address field addr[1] while on | 909 | * in the additional address field addr[1] while on |
910 | * older Systems the PDC stores it in page0->proc_sti | 910 | * older Systems the PDC stores it in page0->proc_sti |
911 | */ | 911 | */ |
912 | static int __init sticore_pa_init(struct parisc_device *dev) | 912 | static int __devinit sticore_pa_init(struct parisc_device *dev) |
913 | { | 913 | { |
914 | char pa_path[21]; | 914 | char pa_path[21]; |
915 | struct sti_struct *sti = NULL; | 915 | struct sti_struct *sti = NULL; |
@@ -1015,7 +1015,7 @@ static struct parisc_driver pa_sti_driver = { | |||
1015 | 1015 | ||
1016 | static int sticore_initialized __read_mostly; | 1016 | static int sticore_initialized __read_mostly; |
1017 | 1017 | ||
1018 | static void __init sti_init_roms(void) | 1018 | static void __devinit sti_init_roms(void) |
1019 | { | 1019 | { |
1020 | if (sticore_initialized) | 1020 | if (sticore_initialized) |
1021 | return; | 1021 | return; |
diff --git a/fs/splice.c b/fs/splice.c index cb211360273a..e7d7080de2f9 100644 --- a/fs/splice.c +++ b/fs/splice.c | |||
@@ -176,6 +176,7 @@ static const struct pipe_buf_operations user_page_pipe_buf_ops = { | |||
176 | static ssize_t splice_to_pipe(struct pipe_inode_info *pipe, | 176 | static ssize_t splice_to_pipe(struct pipe_inode_info *pipe, |
177 | struct splice_pipe_desc *spd) | 177 | struct splice_pipe_desc *spd) |
178 | { | 178 | { |
179 | unsigned int spd_pages = spd->nr_pages; | ||
179 | int ret, do_wakeup, page_nr; | 180 | int ret, do_wakeup, page_nr; |
180 | 181 | ||
181 | ret = 0; | 182 | ret = 0; |
@@ -244,17 +245,18 @@ static ssize_t splice_to_pipe(struct pipe_inode_info *pipe, | |||
244 | pipe->waiting_writers--; | 245 | pipe->waiting_writers--; |
245 | } | 246 | } |
246 | 247 | ||
247 | if (pipe->inode) | 248 | if (pipe->inode) { |
248 | mutex_unlock(&pipe->inode->i_mutex); | 249 | mutex_unlock(&pipe->inode->i_mutex); |
249 | 250 | ||
250 | if (do_wakeup) { | 251 | if (do_wakeup) { |
251 | smp_mb(); | 252 | smp_mb(); |
252 | if (waitqueue_active(&pipe->wait)) | 253 | if (waitqueue_active(&pipe->wait)) |
253 | wake_up_interruptible(&pipe->wait); | 254 | wake_up_interruptible(&pipe->wait); |
254 | kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN); | 255 | kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN); |
256 | } | ||
255 | } | 257 | } |
256 | 258 | ||
257 | while (page_nr < spd->nr_pages) | 259 | while (page_nr < spd_pages) |
258 | page_cache_release(spd->pages[page_nr++]); | 260 | page_cache_release(spd->pages[page_nr++]); |
259 | 261 | ||
260 | return ret; | 262 | return ret; |
@@ -811,7 +813,10 @@ generic_file_splice_write_nolock(struct pipe_inode_info *pipe, struct file *out, | |||
811 | 813 | ||
812 | ret = __splice_from_pipe(pipe, out, ppos, len, flags, pipe_to_file); | 814 | ret = __splice_from_pipe(pipe, out, ppos, len, flags, pipe_to_file); |
813 | if (ret > 0) { | 815 | if (ret > 0) { |
816 | unsigned long nr_pages; | ||
817 | |||
814 | *ppos += ret; | 818 | *ppos += ret; |
819 | nr_pages = (ret + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; | ||
815 | 820 | ||
816 | /* | 821 | /* |
817 | * If file or inode is SYNC and we actually wrote some data, | 822 | * If file or inode is SYNC and we actually wrote some data, |
@@ -824,7 +829,7 @@ generic_file_splice_write_nolock(struct pipe_inode_info *pipe, struct file *out, | |||
824 | if (err) | 829 | if (err) |
825 | ret = err; | 830 | ret = err; |
826 | } | 831 | } |
827 | balance_dirty_pages_ratelimited(mapping); | 832 | balance_dirty_pages_ratelimited_nr(mapping, nr_pages); |
828 | } | 833 | } |
829 | 834 | ||
830 | return ret; | 835 | return ret; |
@@ -863,7 +868,10 @@ generic_file_splice_write(struct pipe_inode_info *pipe, struct file *out, | |||
863 | 868 | ||
864 | ret = splice_from_pipe(pipe, out, ppos, len, flags, pipe_to_file); | 869 | ret = splice_from_pipe(pipe, out, ppos, len, flags, pipe_to_file); |
865 | if (ret > 0) { | 870 | if (ret > 0) { |
871 | unsigned long nr_pages; | ||
872 | |||
866 | *ppos += ret; | 873 | *ppos += ret; |
874 | nr_pages = (ret + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; | ||
867 | 875 | ||
868 | /* | 876 | /* |
869 | * If file or inode is SYNC and we actually wrote some data, | 877 | * If file or inode is SYNC and we actually wrote some data, |
@@ -878,7 +886,7 @@ generic_file_splice_write(struct pipe_inode_info *pipe, struct file *out, | |||
878 | if (err) | 886 | if (err) |
879 | ret = err; | 887 | ret = err; |
880 | } | 888 | } |
881 | balance_dirty_pages_ratelimited(mapping); | 889 | balance_dirty_pages_ratelimited_nr(mapping, nr_pages); |
882 | } | 890 | } |
883 | 891 | ||
884 | return ret; | 892 | return ret; |
diff --git a/include/asm-arm/arch-s3c2410/anubis-cpld.h b/include/asm-arm/arch-s3c2410/anubis-cpld.h index dcebf6d61903..168b93fee529 100644 --- a/include/asm-arm/arch-s3c2410/anubis-cpld.h +++ b/include/asm-arm/arch-s3c2410/anubis-cpld.h | |||
@@ -18,4 +18,8 @@ | |||
18 | 18 | ||
19 | #define ANUBIS_CTRL1_NANDSEL (0x3) | 19 | #define ANUBIS_CTRL1_NANDSEL (0x3) |
20 | 20 | ||
21 | /* IDREG - revision */ | ||
22 | |||
23 | #define ANUBIS_IDREG_REVMASK (0x7) | ||
24 | |||
21 | #endif /* __ASM_ARCH_ANUBISCPLD_H */ | 25 | #endif /* __ASM_ARCH_ANUBISCPLD_H */ |
diff --git a/include/asm-arm/arch-s3c2410/anubis-map.h b/include/asm-arm/arch-s3c2410/anubis-map.h index ab076de4a0d0..830d114261da 100644 --- a/include/asm-arm/arch-s3c2410/anubis-map.h +++ b/include/asm-arm/arch-s3c2410/anubis-map.h | |||
@@ -27,14 +27,8 @@ | |||
27 | #define ANUBIS_VA_CTRL1 ANUBIS_IOADDR(0x00000000) /* 0x01800000 */ | 27 | #define ANUBIS_VA_CTRL1 ANUBIS_IOADDR(0x00000000) /* 0x01800000 */ |
28 | #define ANUBIS_PA_CTRL1 (ANUBIS_PA_CPLD) | 28 | #define ANUBIS_PA_CTRL1 (ANUBIS_PA_CPLD) |
29 | 29 | ||
30 | #define ANUBIS_VA_CTRL2 ANUBIS_IOADDR(0x00100000) /* 0x01900000 */ | 30 | #define ANUBIS_VA_IDREG ANUBIS_IOADDR(0x00300000) /* 0x01B00000 */ |
31 | #define ANUBIS_PA_CTRL2 (ANUBIS_PA_CPLD) | 31 | #define ANUBIS_PA_IDREG (ANUBIS_PA_CPLD + (3<<23)) |
32 | |||
33 | #define ANUBIS_VA_CTRL3 ANUBIS_IOADDR(0x00200000) /* 0x01A00000 */ | ||
34 | #define ANUBIS_PA_CTRL3 (ANUBIS_PA_CPLD) | ||
35 | |||
36 | #define ANUBIS_VA_CTRL4 ANUBIS_IOADDR(0x00300000) /* 0x01B00000 */ | ||
37 | #define ANUBIS_PA_CTRL4 (ANUBIS_PA_CPLD) | ||
38 | 32 | ||
39 | #define ANUBIS_IDEPRI ANUBIS_IOADDR(0x01000000) | 33 | #define ANUBIS_IDEPRI ANUBIS_IOADDR(0x01000000) |
40 | #define ANUBIS_IDEPRIAUX ANUBIS_IOADDR(0x01100000) | 34 | #define ANUBIS_IDEPRIAUX ANUBIS_IOADDR(0x01100000) |
diff --git a/include/asm-arm/arch-s3c2410/osiris-cpld.h b/include/asm-arm/arch-s3c2410/osiris-cpld.h index 3b6498468d62..229ab2351db6 100644 --- a/include/asm-arm/arch-s3c2410/osiris-cpld.h +++ b/include/asm-arm/arch-s3c2410/osiris-cpld.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* linux/include/asm-arm/arch-s3c2410/osiris-cpld.h | 1 | /* linux/include/asm-arm/arch-s3c2410/osiris-cpld.h |
2 | * | 2 | * |
3 | * Copyright (c) 2005 Simtec Electronics | 3 | * Copyright 2005 Simtec Electronics |
4 | * http://www.simtec.co.uk/products/ | 4 | * http://www.simtec.co.uk/products/ |
5 | * Ben Dooks <ben@simtec.co.uk> | 5 | * Ben Dooks <ben@simtec.co.uk> |
6 | * | 6 | * |
@@ -14,12 +14,17 @@ | |||
14 | #ifndef __ASM_ARCH_OSIRISCPLD_H | 14 | #ifndef __ASM_ARCH_OSIRISCPLD_H |
15 | #define __ASM_ARCH_OSIRISCPLD_H | 15 | #define __ASM_ARCH_OSIRISCPLD_H |
16 | 16 | ||
17 | /* CTRL1 - NAND WP control */ | 17 | /* CTRL0 - NAND WP control */ |
18 | 18 | ||
19 | #define OSIRIS_CTRL1_NANDSEL (0x3) | 19 | #define OSIRIS_CTRL0_NANDSEL (0x3) |
20 | #define OSIRIS_CTRL1_BOOT_INT (1<<3) | 20 | #define OSIRIS_CTRL0_BOOT_INT (1<<3) |
21 | #define OSIRIS_CTRL1_PCMCIA (1<<4) | 21 | #define OSIRIS_CTRL0_PCMCIA (1<<4) |
22 | #define OSIRIS_CTRL1_PCMCIA_nWAIT (1<<6) | 22 | #define OSIRIS_CTRL0_FIX8 (1<<5) |
23 | #define OSIRIS_CTRL1_PCMCIA_nIOIS16 (1<<7) | 23 | #define OSIRIS_CTRL0_PCMCIA_nWAIT (1<<6) |
24 | #define OSIRIS_CTRL0_PCMCIA_nIOIS16 (1<<7) | ||
25 | |||
26 | #define OSIRIS_CTRL1_FIX8 (1<<0) | ||
27 | |||
28 | #define OSIRIS_ID_REVMASK (0x7) | ||
24 | 29 | ||
25 | #endif /* __ASM_ARCH_OSIRISCPLD_H */ | 30 | #endif /* __ASM_ARCH_OSIRISCPLD_H */ |
diff --git a/include/asm-arm/arch-s3c2410/osiris-map.h b/include/asm-arm/arch-s3c2410/osiris-map.h index a14164dfa525..b5c74d2b9aaa 100644 --- a/include/asm-arm/arch-s3c2410/osiris-map.h +++ b/include/asm-arm/arch-s3c2410/osiris-map.h | |||
@@ -24,16 +24,19 @@ | |||
24 | 24 | ||
25 | /* we put the CPLD registers next, to get them out of the way */ | 25 | /* we put the CPLD registers next, to get them out of the way */ |
26 | 26 | ||
27 | #define OSIRIS_VA_CTRL1 OSIRIS_IOADDR(0x00000000) | 27 | #define OSIRIS_VA_CTRL0 OSIRIS_IOADDR(0x00000000) |
28 | #define OSIRIS_PA_CTRL1 (OSIRIS_PA_CPLD) | 28 | #define OSIRIS_PA_CTRL0 (OSIRIS_PA_CPLD) |
29 | 29 | ||
30 | #define OSIRIS_VA_CTRL2 OSIRIS_IOADDR(0x00100000) | 30 | #define OSIRIS_VA_CTRL1 OSIRIS_IOADDR(0x00100000) |
31 | #define OSIRIS_PA_CTRL2 (OSIRIS_PA_CPLD + (1<<23)) | 31 | #define OSIRIS_PA_CTRL1 (OSIRIS_PA_CPLD + (1<<23)) |
32 | 32 | ||
33 | #define OSIRIS_VA_CTRL3 OSIRIS_IOADDR(0x00200000) | 33 | #define OSIRIS_VA_CTRL2 OSIRIS_IOADDR(0x00200000) |
34 | #define OSIRIS_PA_CTRL3 (OSIRIS_PA_CPLD + (2<<23)) | 34 | #define OSIRIS_PA_CTRL2 (OSIRIS_PA_CPLD + (2<<23)) |
35 | 35 | ||
36 | #define OSIRIS_VA_CTRL4 OSIRIS_IOADDR(0x00300000) | 36 | #define OSIRIS_VA_CTRL3 OSIRIS_IOADDR(0x00300000) |
37 | #define OSIRIS_PA_CTRL4 (OSIRIS_PA_CPLD + (3<<23)) | 37 | #define OSIRIS_PA_CTRL3 (OSIRIS_PA_CPLD + (2<<23)) |
38 | |||
39 | #define OSIRIS_VA_IDREG OSIRIS_IOADDR(0x00700000) | ||
40 | #define OSIRIS_PA_IDREG (OSIRIS_PA_CPLD + (7<<23)) | ||
38 | 41 | ||
39 | #endif /* __ASM_ARCH_OSIRISMAP_H */ | 42 | #endif /* __ASM_ARCH_OSIRISMAP_H */ |
diff --git a/include/asm-arm/linkage.h b/include/asm-arm/linkage.h index dbe4b4e31a5b..5a25632b1bc0 100644 --- a/include/asm-arm/linkage.h +++ b/include/asm-arm/linkage.h | |||
@@ -4,4 +4,8 @@ | |||
4 | #define __ALIGN .align 0 | 4 | #define __ALIGN .align 0 |
5 | #define __ALIGN_STR ".align 0" | 5 | #define __ALIGN_STR ".align 0" |
6 | 6 | ||
7 | #define ENDPROC(name) \ | ||
8 | .type name, %function; \ | ||
9 | END(name) | ||
10 | |||
7 | #endif | 11 | #endif |
diff --git a/include/asm-avr32/arch-at32ap/gpio.h b/include/asm-avr32/arch-at32ap/gpio.h index 80a21aa9ae77..af7f9535bab3 100644 --- a/include/asm-avr32/arch-at32ap/gpio.h +++ b/include/asm-avr32/arch-at32ap/gpio.h | |||
@@ -14,6 +14,8 @@ int gpio_direction_output(unsigned int gpio, int value); | |||
14 | int gpio_get_value(unsigned int gpio); | 14 | int gpio_get_value(unsigned int gpio); |
15 | void gpio_set_value(unsigned int gpio, int value); | 15 | void gpio_set_value(unsigned int gpio, int value); |
16 | 16 | ||
17 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
18 | |||
17 | static inline int gpio_to_irq(unsigned int gpio) | 19 | static inline int gpio_to_irq(unsigned int gpio) |
18 | { | 20 | { |
19 | return gpio + GPIO_IRQ_BASE; | 21 | return gpio + GPIO_IRQ_BASE; |
diff --git a/include/asm-avr32/cache.h b/include/asm-avr32/cache.h index dabb955f3c00..d3cf35ab11ab 100644 --- a/include/asm-avr32/cache.h +++ b/include/asm-avr32/cache.h | |||
@@ -4,6 +4,15 @@ | |||
4 | #define L1_CACHE_SHIFT 5 | 4 | #define L1_CACHE_SHIFT 5 |
5 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | 5 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) |
6 | 6 | ||
7 | /* | ||
8 | * Memory returned by kmalloc() may be used for DMA, so we must make | ||
9 | * sure that all such allocations are cache aligned. Otherwise, | ||
10 | * unrelated code may cause parts of the buffer to be read into the | ||
11 | * cache before the transfer is done, causing old data to be seen by | ||
12 | * the CPU. | ||
13 | */ | ||
14 | #define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES | ||
15 | |||
7 | #ifndef __ASSEMBLER__ | 16 | #ifndef __ASSEMBLER__ |
8 | struct cache_info { | 17 | struct cache_info { |
9 | unsigned int ways; | 18 | unsigned int ways; |
diff --git a/include/asm-mips/mips-boards/generic.h b/include/asm-mips/mips-boards/generic.h index b98f1658cfd0..c8ebcc3e1267 100644 --- a/include/asm-mips/mips-boards/generic.h +++ b/include/asm-mips/mips-boards/generic.h | |||
@@ -73,12 +73,28 @@ | |||
73 | * CoreEMUL with Bonito System Controller is treated like a Core20K | 73 | * CoreEMUL with Bonito System Controller is treated like a Core20K |
74 | * CoreEMUL with SOC-it 101 System Controller is treated like a CoreMSC | 74 | * CoreEMUL with SOC-it 101 System Controller is treated like a CoreMSC |
75 | */ | 75 | */ |
76 | #define MIPS_REVISION_CORID_CORE_EMUL_BON 0x63 | 76 | #define MIPS_REVISION_CORID_CORE_EMUL_BON -1 |
77 | #define MIPS_REVISION_CORID_CORE_EMUL_MSC 0x65 | 77 | #define MIPS_REVISION_CORID_CORE_EMUL_MSC -2 |
78 | 78 | ||
79 | #define MIPS_REVISION_CORID (((*(volatile u32 *)ioremap(MIPS_REVISION_REG, 4)) >> 10) & 0x3f) | 79 | #define MIPS_REVISION_CORID (((*(volatile u32 *)ioremap(MIPS_REVISION_REG, 4)) >> 10) & 0x3f) |
80 | 80 | ||
81 | extern unsigned int mips_revision_corid; | 81 | extern int mips_revision_corid; |
82 | |||
83 | #define MIPS_REVISION_SCON_OTHER 0 | ||
84 | #define MIPS_REVISION_SCON_SOCITSC 1 | ||
85 | #define MIPS_REVISION_SCON_SOCITSCP 2 | ||
86 | |||
87 | /* Artificial SCON defines for MIPS_REVISION_SCON_OTHER */ | ||
88 | #define MIPS_REVISION_SCON_UNKNOWN -1 | ||
89 | #define MIPS_REVISION_SCON_GT64120 -2 | ||
90 | #define MIPS_REVISION_SCON_BONITO -3 | ||
91 | #define MIPS_REVISION_SCON_BRTL -4 | ||
92 | #define MIPS_REVISION_SCON_SOCIT -5 | ||
93 | #define MIPS_REVISION_SCON_ROCIT -6 | ||
94 | |||
95 | #define MIPS_REVISION_SCONID (((*(volatile u32 *)ioremap(MIPS_REVISION_REG, 4)) >> 24) & 0xff) | ||
96 | |||
97 | extern int mips_revision_sconid; | ||
82 | 98 | ||
83 | #ifdef CONFIG_PCI | 99 | #ifdef CONFIG_PCI |
84 | extern void mips_pcibios_init(void); | 100 | extern void mips_pcibios_init(void); |
diff --git a/include/asm-mips/mips-boards/msc01_pci.h b/include/asm-mips/mips-boards/msc01_pci.h index 8eaefb837b9d..e036b7dd6deb 100644 --- a/include/asm-mips/mips-boards/msc01_pci.h +++ b/include/asm-mips/mips-boards/msc01_pci.h | |||
@@ -208,6 +208,7 @@ | |||
208 | * latter, they should be moved elsewhere. | 208 | * latter, they should be moved elsewhere. |
209 | */ | 209 | */ |
210 | #define MIPS_MSC01_PCI_REG_BASE 0x1bd00000 | 210 | #define MIPS_MSC01_PCI_REG_BASE 0x1bd00000 |
211 | #define MIPS_SOCITSC_PCI_REG_BASE 0x1ff10000 | ||
211 | 212 | ||
212 | extern unsigned long _pcictrl_msc; | 213 | extern unsigned long _pcictrl_msc; |
213 | 214 | ||
diff --git a/include/asm-parisc/hardware.h b/include/asm-parisc/hardware.h index 76d880dc4bae..4e9626836bab 100644 --- a/include/asm-parisc/hardware.h +++ b/include/asm-parisc/hardware.h | |||
@@ -31,10 +31,11 @@ enum cpu_type { | |||
31 | pcxw = 8, /* pa8500 pa 2.0 */ | 31 | pcxw = 8, /* pa8500 pa 2.0 */ |
32 | pcxw_ = 9, /* pa8600 (w+) pa 2.0 */ | 32 | pcxw_ = 9, /* pa8600 (w+) pa 2.0 */ |
33 | pcxw2 = 10, /* pa8700 pa 2.0 */ | 33 | pcxw2 = 10, /* pa8700 pa 2.0 */ |
34 | mako = 11 /* pa8800 pa 2.0 */ | 34 | mako = 11, /* pa8800 pa 2.0 */ |
35 | mako2 = 12 /* pa8900 pa 2.0 */ | ||
35 | }; | 36 | }; |
36 | 37 | ||
37 | extern char *cpu_name_version[][2]; /* mapping from enum cpu_type to strings */ | 38 | extern const char * const cpu_name_version[][2]; /* mapping from enum cpu_type to strings */ |
38 | 39 | ||
39 | struct parisc_driver; | 40 | struct parisc_driver; |
40 | 41 | ||
diff --git a/include/asm-parisc/linkage.h b/include/asm-parisc/linkage.h index 7a09d911b538..ad8cd0d069ea 100644 --- a/include/asm-parisc/linkage.h +++ b/include/asm-parisc/linkage.h | |||
@@ -8,8 +8,10 @@ | |||
8 | 8 | ||
9 | /* | 9 | /* |
10 | * In parisc assembly a semicolon marks a comment while a | 10 | * In parisc assembly a semicolon marks a comment while a |
11 | * exclamation mark is used to seperate independend lines. | 11 | * exclamation mark is used to seperate independent lines. |
12 | */ | 12 | */ |
13 | #ifdef __ASSEMBLY__ | ||
14 | |||
13 | #define ENTRY(name) \ | 15 | #define ENTRY(name) \ |
14 | .export name !\ | 16 | .export name !\ |
15 | ALIGN !\ | 17 | ALIGN !\ |
@@ -24,5 +26,6 @@ name: | |||
24 | END(name) | 26 | END(name) |
25 | #endif | 27 | #endif |
26 | 28 | ||
29 | #endif /* __ASSEMBLY__ */ | ||
27 | 30 | ||
28 | #endif /* __ASM_PARISC_LINKAGE_H */ | 31 | #endif /* __ASM_PARISC_LINKAGE_H */ |
diff --git a/include/asm-parisc/processor.h b/include/asm-parisc/processor.h index d2f396721d3e..6b294fb07a23 100644 --- a/include/asm-parisc/processor.h +++ b/include/asm-parisc/processor.h | |||
@@ -69,8 +69,8 @@ struct system_cpuinfo_parisc { | |||
69 | char sys_model_name[81]; /* PDC-ROM returnes this model name */ | 69 | char sys_model_name[81]; /* PDC-ROM returnes this model name */ |
70 | } pdc; | 70 | } pdc; |
71 | 71 | ||
72 | char *cpu_name; /* e.g. "PA7300LC (PCX-L2)" */ | 72 | const char *cpu_name; /* e.g. "PA7300LC (PCX-L2)" */ |
73 | char *family_name; /* e.g. "1.1e" */ | 73 | const char *family_name; /* e.g. "1.1e" */ |
74 | }; | 74 | }; |
75 | 75 | ||
76 | 76 | ||
@@ -334,8 +334,8 @@ extern unsigned long get_wchan(struct task_struct *p); | |||
334 | static inline int parisc_requires_coherency(void) | 334 | static inline int parisc_requires_coherency(void) |
335 | { | 335 | { |
336 | #ifdef CONFIG_PA8X00 | 336 | #ifdef CONFIG_PA8X00 |
337 | /* FIXME: also pa8900 - when we see one */ | 337 | return (boot_cpu_data.cpu_type == mako) || |
338 | return boot_cpu_data.cpu_type == mako; | 338 | (boot_cpu_data.cpu_type == mako2); |
339 | #else | 339 | #else |
340 | return 0; | 340 | return 0; |
341 | #endif | 341 | #endif |
diff --git a/include/asm-parisc/unistd.h b/include/asm-parisc/unistd.h index 2f7c40861c91..f74099bdca3c 100644 --- a/include/asm-parisc/unistd.h +++ b/include/asm-parisc/unistd.h | |||
@@ -792,8 +792,19 @@ | |||
792 | #define __NR_epoll_pwait (__NR_Linux + 297) | 792 | #define __NR_epoll_pwait (__NR_Linux + 297) |
793 | #define __NR_statfs64 (__NR_Linux + 298) | 793 | #define __NR_statfs64 (__NR_Linux + 298) |
794 | #define __NR_fstatfs64 (__NR_Linux + 299) | 794 | #define __NR_fstatfs64 (__NR_Linux + 299) |
795 | #define __NR_kexec_load (__NR_Linux + 300) | ||
796 | #define __NR_utimensat (__NR_Linux + 301) | ||
797 | #define __NR_signalfd (__NR_Linux + 302) | ||
798 | #define __NR_timerfd (__NR_Linux + 303) | ||
799 | #define __NR_eventfd (__NR_Linux + 304) | ||
800 | |||
801 | #define __NR_Linux_syscalls (__NR_eventfd + 1) | ||
802 | |||
803 | |||
804 | #define __IGNORE_select /* newselect */ | ||
805 | #define __IGNORE_fadvise64 /* fadvise64_64 */ | ||
806 | #define __IGNORE_utimes /* utime */ | ||
795 | 807 | ||
796 | #define __NR_Linux_syscalls (__NR_fstatfs64 + 1) | ||
797 | 808 | ||
798 | #define HPUX_GATEWAY_ADDR 0xC0000004 | 809 | #define HPUX_GATEWAY_ADDR 0xC0000004 |
799 | #define LINUX_GATEWAY_ADDR 0x100 | 810 | #define LINUX_GATEWAY_ADDR 0x100 |
diff --git a/include/asm-sparc64/dma-mapping.h b/include/asm-sparc64/dma-mapping.h index 4e21c2f3065c..c58ec1661df8 100644 --- a/include/asm-sparc64/dma-mapping.h +++ b/include/asm-sparc64/dma-mapping.h | |||
@@ -15,8 +15,7 @@ | |||
15 | static inline int | 15 | static inline int |
16 | dma_supported(struct device *dev, u64 mask) | 16 | dma_supported(struct device *dev, u64 mask) |
17 | { | 17 | { |
18 | BUG_ON(dev->bus != &pci_bus_type && | 18 | BUG_ON(dev->bus != &pci_bus_type); |
19 | dev->bus != &ebus_bus_type); | ||
20 | 19 | ||
21 | return pci_dma_supported(to_pci_dev(dev), mask); | 20 | return pci_dma_supported(to_pci_dev(dev), mask); |
22 | } | 21 | } |
@@ -24,8 +23,7 @@ dma_supported(struct device *dev, u64 mask) | |||
24 | static inline int | 23 | static inline int |
25 | dma_set_mask(struct device *dev, u64 dma_mask) | 24 | dma_set_mask(struct device *dev, u64 dma_mask) |
26 | { | 25 | { |
27 | BUG_ON(dev->bus != &pci_bus_type && | 26 | BUG_ON(dev->bus != &pci_bus_type); |
28 | dev->bus != &ebus_bus_type); | ||
29 | 27 | ||
30 | return pci_set_dma_mask(to_pci_dev(dev), dma_mask); | 28 | return pci_set_dma_mask(to_pci_dev(dev), dma_mask); |
31 | } | 29 | } |
@@ -34,8 +32,7 @@ static inline void * | |||
34 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, | 32 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, |
35 | gfp_t flag) | 33 | gfp_t flag) |
36 | { | 34 | { |
37 | BUG_ON(dev->bus != &pci_bus_type && | 35 | BUG_ON(dev->bus != &pci_bus_type); |
38 | dev->bus != &ebus_bus_type); | ||
39 | 36 | ||
40 | return pci_iommu_ops->alloc_consistent(to_pci_dev(dev), size, dma_handle, flag); | 37 | return pci_iommu_ops->alloc_consistent(to_pci_dev(dev), size, dma_handle, flag); |
41 | } | 38 | } |
@@ -44,8 +41,7 @@ static inline void | |||
44 | dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, | 41 | dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, |
45 | dma_addr_t dma_handle) | 42 | dma_addr_t dma_handle) |
46 | { | 43 | { |
47 | BUG_ON(dev->bus != &pci_bus_type && | 44 | BUG_ON(dev->bus != &pci_bus_type); |
48 | dev->bus != &ebus_bus_type); | ||
49 | 45 | ||
50 | pci_free_consistent(to_pci_dev(dev), size, cpu_addr, dma_handle); | 46 | pci_free_consistent(to_pci_dev(dev), size, cpu_addr, dma_handle); |
51 | } | 47 | } |
@@ -54,8 +50,7 @@ static inline dma_addr_t | |||
54 | dma_map_single(struct device *dev, void *cpu_addr, size_t size, | 50 | dma_map_single(struct device *dev, void *cpu_addr, size_t size, |
55 | enum dma_data_direction direction) | 51 | enum dma_data_direction direction) |
56 | { | 52 | { |
57 | BUG_ON(dev->bus != &pci_bus_type && | 53 | BUG_ON(dev->bus != &pci_bus_type); |
58 | dev->bus != &ebus_bus_type); | ||
59 | 54 | ||
60 | return pci_map_single(to_pci_dev(dev), cpu_addr, size, (int)direction); | 55 | return pci_map_single(to_pci_dev(dev), cpu_addr, size, (int)direction); |
61 | } | 56 | } |
@@ -64,8 +59,7 @@ static inline void | |||
64 | dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, | 59 | dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, |
65 | enum dma_data_direction direction) | 60 | enum dma_data_direction direction) |
66 | { | 61 | { |
67 | BUG_ON(dev->bus != &pci_bus_type && | 62 | BUG_ON(dev->bus != &pci_bus_type); |
68 | dev->bus != &ebus_bus_type); | ||
69 | 63 | ||
70 | pci_unmap_single(to_pci_dev(dev), dma_addr, size, (int)direction); | 64 | pci_unmap_single(to_pci_dev(dev), dma_addr, size, (int)direction); |
71 | } | 65 | } |
@@ -75,8 +69,7 @@ dma_map_page(struct device *dev, struct page *page, | |||
75 | unsigned long offset, size_t size, | 69 | unsigned long offset, size_t size, |
76 | enum dma_data_direction direction) | 70 | enum dma_data_direction direction) |
77 | { | 71 | { |
78 | BUG_ON(dev->bus != &pci_bus_type && | 72 | BUG_ON(dev->bus != &pci_bus_type); |
79 | dev->bus != &ebus_bus_type); | ||
80 | 73 | ||
81 | return pci_map_page(to_pci_dev(dev), page, offset, size, (int)direction); | 74 | return pci_map_page(to_pci_dev(dev), page, offset, size, (int)direction); |
82 | } | 75 | } |
@@ -85,8 +78,7 @@ static inline void | |||
85 | dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size, | 78 | dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size, |
86 | enum dma_data_direction direction) | 79 | enum dma_data_direction direction) |
87 | { | 80 | { |
88 | BUG_ON(dev->bus != &pci_bus_type && | 81 | BUG_ON(dev->bus != &pci_bus_type); |
89 | dev->bus != &ebus_bus_type); | ||
90 | 82 | ||
91 | pci_unmap_page(to_pci_dev(dev), dma_address, size, (int)direction); | 83 | pci_unmap_page(to_pci_dev(dev), dma_address, size, (int)direction); |
92 | } | 84 | } |
@@ -95,8 +87,7 @@ static inline int | |||
95 | dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | 87 | dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, |
96 | enum dma_data_direction direction) | 88 | enum dma_data_direction direction) |
97 | { | 89 | { |
98 | BUG_ON(dev->bus != &pci_bus_type && | 90 | BUG_ON(dev->bus != &pci_bus_type); |
99 | dev->bus != &ebus_bus_type); | ||
100 | 91 | ||
101 | return pci_map_sg(to_pci_dev(dev), sg, nents, (int)direction); | 92 | return pci_map_sg(to_pci_dev(dev), sg, nents, (int)direction); |
102 | } | 93 | } |
@@ -105,8 +96,7 @@ static inline void | |||
105 | dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries, | 96 | dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries, |
106 | enum dma_data_direction direction) | 97 | enum dma_data_direction direction) |
107 | { | 98 | { |
108 | BUG_ON(dev->bus != &pci_bus_type && | 99 | BUG_ON(dev->bus != &pci_bus_type); |
109 | dev->bus != &ebus_bus_type); | ||
110 | 100 | ||
111 | pci_unmap_sg(to_pci_dev(dev), sg, nhwentries, (int)direction); | 101 | pci_unmap_sg(to_pci_dev(dev), sg, nhwentries, (int)direction); |
112 | } | 102 | } |
@@ -115,8 +105,7 @@ static inline void | |||
115 | dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size, | 105 | dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size, |
116 | enum dma_data_direction direction) | 106 | enum dma_data_direction direction) |
117 | { | 107 | { |
118 | BUG_ON(dev->bus != &pci_bus_type && | 108 | BUG_ON(dev->bus != &pci_bus_type); |
119 | dev->bus != &ebus_bus_type); | ||
120 | 109 | ||
121 | pci_dma_sync_single_for_cpu(to_pci_dev(dev), dma_handle, | 110 | pci_dma_sync_single_for_cpu(to_pci_dev(dev), dma_handle, |
122 | size, (int)direction); | 111 | size, (int)direction); |
@@ -126,8 +115,7 @@ static inline void | |||
126 | dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size, | 115 | dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size, |
127 | enum dma_data_direction direction) | 116 | enum dma_data_direction direction) |
128 | { | 117 | { |
129 | BUG_ON(dev->bus != &pci_bus_type && | 118 | BUG_ON(dev->bus != &pci_bus_type); |
130 | dev->bus != &ebus_bus_type); | ||
131 | 119 | ||
132 | pci_dma_sync_single_for_device(to_pci_dev(dev), dma_handle, | 120 | pci_dma_sync_single_for_device(to_pci_dev(dev), dma_handle, |
133 | size, (int)direction); | 121 | size, (int)direction); |
@@ -137,8 +125,7 @@ static inline void | |||
137 | dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems, | 125 | dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems, |
138 | enum dma_data_direction direction) | 126 | enum dma_data_direction direction) |
139 | { | 127 | { |
140 | BUG_ON(dev->bus != &pci_bus_type && | 128 | BUG_ON(dev->bus != &pci_bus_type); |
141 | dev->bus != &ebus_bus_type); | ||
142 | 129 | ||
143 | pci_dma_sync_sg_for_cpu(to_pci_dev(dev), sg, nelems, (int)direction); | 130 | pci_dma_sync_sg_for_cpu(to_pci_dev(dev), sg, nelems, (int)direction); |
144 | } | 131 | } |
@@ -147,8 +134,7 @@ static inline void | |||
147 | dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems, | 134 | dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems, |
148 | enum dma_data_direction direction) | 135 | enum dma_data_direction direction) |
149 | { | 136 | { |
150 | BUG_ON(dev->bus != &pci_bus_type && | 137 | BUG_ON(dev->bus != &pci_bus_type); |
151 | dev->bus != &ebus_bus_type); | ||
152 | 138 | ||
153 | pci_dma_sync_sg_for_device(to_pci_dev(dev), sg, nelems, (int)direction); | 139 | pci_dma_sync_sg_for_device(to_pci_dev(dev), sg, nelems, (int)direction); |
154 | } | 140 | } |
diff --git a/include/asm-sparc64/hypervisor.h b/include/asm-sparc64/hypervisor.h index 5c2f9d4b9f06..db2130a95d68 100644 --- a/include/asm-sparc64/hypervisor.h +++ b/include/asm-sparc64/hypervisor.h | |||
@@ -2615,8 +2615,9 @@ struct ldc_mtable_entry { | |||
2615 | /* ldc_revoke() | 2615 | /* ldc_revoke() |
2616 | * TRAP: HV_FAST_TRAP | 2616 | * TRAP: HV_FAST_TRAP |
2617 | * FUNCTION: HV_FAST_LDC_REVOKE | 2617 | * FUNCTION: HV_FAST_LDC_REVOKE |
2618 | * ARG0: cookie | 2618 | * ARG0: channel ID |
2619 | * ARG1: ldc_mtable_entry cookie | 2619 | * ARG1: cookie |
2620 | * ARG2: ldc_mtable_entry cookie | ||
2620 | * RET0: status | 2621 | * RET0: status |
2621 | */ | 2622 | */ |
2622 | #define HV_FAST_LDC_REVOKE 0xef | 2623 | #define HV_FAST_LDC_REVOKE 0xef |
@@ -2663,7 +2664,8 @@ extern unsigned long sun4v_ldc_mapin(unsigned long channel, | |||
2663 | unsigned long *ra, | 2664 | unsigned long *ra, |
2664 | unsigned long *perm); | 2665 | unsigned long *perm); |
2665 | extern unsigned long sun4v_ldc_unmap(unsigned long ra); | 2666 | extern unsigned long sun4v_ldc_unmap(unsigned long ra); |
2666 | extern unsigned long sun4v_ldc_revoke(unsigned long cookie, | 2667 | extern unsigned long sun4v_ldc_revoke(unsigned long channel, |
2668 | unsigned long cookie, | ||
2667 | unsigned long mte_cookie); | 2669 | unsigned long mte_cookie); |
2668 | #endif | 2670 | #endif |
2669 | 2671 | ||
diff --git a/include/asm-sparc64/irq.h b/include/asm-sparc64/irq.h index 5d233b42fe13..90781e34a95c 100644 --- a/include/asm-sparc64/irq.h +++ b/include/asm-sparc64/irq.h | |||
@@ -46,6 +46,7 @@ extern void irq_install_pre_handler(int virt_irq, | |||
46 | #define irq_canonicalize(irq) (irq) | 46 | #define irq_canonicalize(irq) (irq) |
47 | extern unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap); | 47 | extern unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap); |
48 | extern unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino); | 48 | extern unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino); |
49 | extern unsigned int sun4v_build_virq(u32 devhandle, unsigned int devino); | ||
49 | extern unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p, | 50 | extern unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p, |
50 | unsigned int msi_devino_start, | 51 | unsigned int msi_devino_start, |
51 | unsigned int msi_devino_end); | 52 | unsigned int msi_devino_end); |
diff --git a/include/asm-sparc64/parport.h b/include/asm-sparc64/parport.h index 6340a5253a34..23cc63f049a8 100644 --- a/include/asm-sparc64/parport.h +++ b/include/asm-sparc64/parport.h | |||
@@ -145,7 +145,7 @@ static int parport_isa_probe(int count) | |||
145 | */ | 145 | */ |
146 | if (parport_pc_probe_port(base, base + 0x400, | 146 | if (parport_pc_probe_port(base, base + 0x400, |
147 | child->irq, PARPORT_DMA_NOFIFO, | 147 | child->irq, PARPORT_DMA_NOFIFO, |
148 | child->bus->self)) | 148 | &child->bus->self->dev)) |
149 | count++; | 149 | count++; |
150 | } | 150 | } |
151 | } | 151 | } |
@@ -199,7 +199,8 @@ static int parport_pc_find_nonpci_ports (int autoirq, int autodma) | |||
199 | 199 | ||
200 | if (parport_pc_probe_port(base, base + 0x400, | 200 | if (parport_pc_probe_port(base, base + 0x400, |
201 | edev->irqs[0], | 201 | edev->irqs[0], |
202 | count, ebus->self)) | 202 | count, |
203 | &ebus->self->dev)) | ||
203 | count++; | 204 | count++; |
204 | } | 205 | } |
205 | } | 206 | } |
diff --git a/include/net/irda/irlap.h b/include/net/irda/irlap.h index f0248fb8e196..a3d370efb903 100644 --- a/include/net/irda/irlap.h +++ b/include/net/irda/irlap.h | |||
@@ -289,4 +289,21 @@ static inline void irlap_clear_disconnect(struct irlap_cb *self) | |||
289 | self->disconnect_pending = FALSE; | 289 | self->disconnect_pending = FALSE; |
290 | } | 290 | } |
291 | 291 | ||
292 | /* | ||
293 | * Function irlap_next_state (self, state) | ||
294 | * | ||
295 | * Switches state and provides debug information | ||
296 | * | ||
297 | */ | ||
298 | static inline void irlap_next_state(struct irlap_cb *self, IRLAP_STATE state) | ||
299 | { | ||
300 | /* | ||
301 | if (!self || self->magic != LAP_MAGIC) | ||
302 | return; | ||
303 | |||
304 | IRDA_DEBUG(4, "next LAP state = %s\n", irlap_state[state]); | ||
305 | */ | ||
306 | self->state = state; | ||
307 | } | ||
308 | |||
292 | #endif | 309 | #endif |
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index dda72bf5b9b4..16baef4dab7e 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -503,6 +503,13 @@ static inline int sctp_frag_point(const struct sctp_sock *sp, int pmtu) | |||
503 | return frag; | 503 | return frag; |
504 | } | 504 | } |
505 | 505 | ||
506 | static inline void sctp_assoc_pending_pmtu(struct sctp_association *asoc) | ||
507 | { | ||
508 | |||
509 | sctp_assoc_sync_pmtu(asoc); | ||
510 | asoc->pmtu_pending = 0; | ||
511 | } | ||
512 | |||
506 | /* Walk through a list of TLV parameters. Don't trust the | 513 | /* Walk through a list of TLV parameters. Don't trust the |
507 | * individual parameter lengths and instead depend on | 514 | * individual parameter lengths and instead depend on |
508 | * the chunk length to indicate when to stop. Make sure | 515 | * the chunk length to indicate when to stop. Make sure |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 5e81984b8478..ee4559b11302 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -912,6 +912,9 @@ struct sctp_transport { | |||
912 | */ | 912 | */ |
913 | __u16 pathmaxrxt; | 913 | __u16 pathmaxrxt; |
914 | 914 | ||
915 | /* is the Path MTU update pending on this tranport */ | ||
916 | __u8 pmtu_pending; | ||
917 | |||
915 | /* PMTU : The current known path MTU. */ | 918 | /* PMTU : The current known path MTU. */ |
916 | __u32 pathmtu; | 919 | __u32 pathmtu; |
917 | 920 | ||
@@ -1006,6 +1009,7 @@ void sctp_transport_raise_cwnd(struct sctp_transport *, __u32, __u32); | |||
1006 | void sctp_transport_lower_cwnd(struct sctp_transport *, sctp_lower_cwnd_t); | 1009 | void sctp_transport_lower_cwnd(struct sctp_transport *, sctp_lower_cwnd_t); |
1007 | unsigned long sctp_transport_timeout(struct sctp_transport *); | 1010 | unsigned long sctp_transport_timeout(struct sctp_transport *); |
1008 | void sctp_transport_reset(struct sctp_transport *); | 1011 | void sctp_transport_reset(struct sctp_transport *); |
1012 | void sctp_transport_update_pmtu(struct sctp_transport *, u32); | ||
1009 | 1013 | ||
1010 | 1014 | ||
1011 | /* This is the structure we use to queue packets as they come into | 1015 | /* This is the structure we use to queue packets as they come into |
@@ -1565,6 +1569,9 @@ struct sctp_association { | |||
1565 | */ | 1569 | */ |
1566 | __u16 pathmaxrxt; | 1570 | __u16 pathmaxrxt; |
1567 | 1571 | ||
1572 | /* Flag that path mtu update is pending */ | ||
1573 | __u8 pmtu_pending; | ||
1574 | |||
1568 | /* Association : The smallest PMTU discovered for all of the | 1575 | /* Association : The smallest PMTU discovered for all of the |
1569 | * PMTU : peer's transport addresses. | 1576 | * PMTU : peer's transport addresses. |
1570 | */ | 1577 | */ |
diff --git a/net/ipv4/tcp_bic.c b/net/ipv4/tcp_bic.c index 281c9f913257..dd9ef65ad3ff 100644 --- a/net/ipv4/tcp_bic.c +++ b/net/ipv4/tcp_bic.c | |||
@@ -29,7 +29,7 @@ static int fast_convergence = 1; | |||
29 | static int max_increment = 16; | 29 | static int max_increment = 16; |
30 | static int low_window = 14; | 30 | static int low_window = 14; |
31 | static int beta = 819; /* = 819/1024 (BICTCP_BETA_SCALE) */ | 31 | static int beta = 819; /* = 819/1024 (BICTCP_BETA_SCALE) */ |
32 | static int initial_ssthresh = 100; | 32 | static int initial_ssthresh; |
33 | static int smooth_part = 20; | 33 | static int smooth_part = 20; |
34 | 34 | ||
35 | module_param(fast_convergence, int, 0644); | 35 | module_param(fast_convergence, int, 0644); |
diff --git a/net/ipv4/tcp_cubic.c b/net/ipv4/tcp_cubic.c index 14224487b16b..ebfaac2f9f46 100644 --- a/net/ipv4/tcp_cubic.c +++ b/net/ipv4/tcp_cubic.c | |||
@@ -29,7 +29,7 @@ | |||
29 | static int fast_convergence __read_mostly = 1; | 29 | static int fast_convergence __read_mostly = 1; |
30 | static int max_increment __read_mostly = 16; | 30 | static int max_increment __read_mostly = 16; |
31 | static int beta __read_mostly = 819; /* = 819/1024 (BICTCP_BETA_SCALE) */ | 31 | static int beta __read_mostly = 819; /* = 819/1024 (BICTCP_BETA_SCALE) */ |
32 | static int initial_ssthresh __read_mostly = 100; | 32 | static int initial_ssthresh __read_mostly; |
33 | static int bic_scale __read_mostly = 41; | 33 | static int bic_scale __read_mostly = 41; |
34 | static int tcp_friendliness __read_mostly = 1; | 34 | static int tcp_friendliness __read_mostly = 1; |
35 | 35 | ||
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 74683d81c3f1..d6d0f9b6cdc6 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -2037,7 +2037,7 @@ static void tcp_try_to_open(struct sock *sk, int flag) | |||
2037 | { | 2037 | { |
2038 | struct tcp_sock *tp = tcp_sk(sk); | 2038 | struct tcp_sock *tp = tcp_sk(sk); |
2039 | 2039 | ||
2040 | tp->left_out = tp->sacked_out; | 2040 | tcp_sync_left_out(tp); |
2041 | 2041 | ||
2042 | if (tp->retrans_out == 0) | 2042 | if (tp->retrans_out == 0) |
2043 | tp->retrans_stamp = 0; | 2043 | tp->retrans_stamp = 0; |
@@ -2932,6 +2932,7 @@ void tcp_parse_options(struct sk_buff *skb, struct tcp_options_received *opt_rx, | |||
2932 | opt_rx->sack_ok) { | 2932 | opt_rx->sack_ok) { |
2933 | TCP_SKB_CB(skb)->sacked = (ptr - 2) - (unsigned char *)th; | 2933 | TCP_SKB_CB(skb)->sacked = (ptr - 2) - (unsigned char *)th; |
2934 | } | 2934 | } |
2935 | break; | ||
2935 | #ifdef CONFIG_TCP_MD5SIG | 2936 | #ifdef CONFIG_TCP_MD5SIG |
2936 | case TCPOPT_MD5SIG: | 2937 | case TCPOPT_MD5SIG: |
2937 | /* | 2938 | /* |
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 97e294e82679..354721d67f69 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -878,6 +878,7 @@ int tcp_v4_md5_do_add(struct sock *sk, __be32 addr, | |||
878 | kfree(newkey); | 878 | kfree(newkey); |
879 | return -ENOMEM; | 879 | return -ENOMEM; |
880 | } | 880 | } |
881 | sk->sk_route_caps &= ~NETIF_F_GSO_MASK; | ||
881 | } | 882 | } |
882 | if (tcp_alloc_md5sig_pool() == NULL) { | 883 | if (tcp_alloc_md5sig_pool() == NULL) { |
883 | kfree(newkey); | 884 | kfree(newkey); |
@@ -1007,7 +1008,7 @@ static int tcp_v4_parse_md5_keys(struct sock *sk, char __user *optval, | |||
1007 | return -EINVAL; | 1008 | return -EINVAL; |
1008 | 1009 | ||
1009 | tp->md5sig_info = p; | 1010 | tp->md5sig_info = p; |
1010 | 1011 | sk->sk_route_caps &= ~NETIF_F_GSO_MASK; | |
1011 | } | 1012 | } |
1012 | 1013 | ||
1013 | newkey = kmemdup(cmd.tcpm_key, cmd.tcpm_keylen, GFP_KERNEL); | 1014 | newkey = kmemdup(cmd.tcpm_key, cmd.tcpm_keylen, GFP_KERNEL); |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 5a5f8bd4597a..f96ed76d8fa4 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -2154,6 +2154,15 @@ static void addrconf_dev_config(struct net_device *dev) | |||
2154 | 2154 | ||
2155 | ASSERT_RTNL(); | 2155 | ASSERT_RTNL(); |
2156 | 2156 | ||
2157 | if ((dev->type != ARPHRD_ETHER) && | ||
2158 | (dev->type != ARPHRD_FDDI) && | ||
2159 | (dev->type != ARPHRD_IEEE802_TR) && | ||
2160 | (dev->type != ARPHRD_ARCNET) && | ||
2161 | (dev->type != ARPHRD_INFINIBAND)) { | ||
2162 | /* Alas, we support only Ethernet autoconfiguration. */ | ||
2163 | return; | ||
2164 | } | ||
2165 | |||
2157 | idev = addrconf_add_dev(dev); | 2166 | idev = addrconf_add_dev(dev); |
2158 | if (idev == NULL) | 2167 | if (idev == NULL) |
2159 | return; | 2168 | return; |
@@ -2241,36 +2250,16 @@ static void addrconf_ip6_tnl_config(struct net_device *dev) | |||
2241 | ip6_tnl_add_linklocal(idev); | 2250 | ip6_tnl_add_linklocal(idev); |
2242 | } | 2251 | } |
2243 | 2252 | ||
2244 | static int ipv6_hwtype(struct net_device *dev) | ||
2245 | { | ||
2246 | if ((dev->type == ARPHRD_ETHER) || | ||
2247 | (dev->type == ARPHRD_LOOPBACK) || | ||
2248 | (dev->type == ARPHRD_SIT) || | ||
2249 | (dev->type == ARPHRD_TUNNEL6) || | ||
2250 | (dev->type == ARPHRD_FDDI) || | ||
2251 | (dev->type == ARPHRD_IEEE802_TR) || | ||
2252 | (dev->type == ARPHRD_ARCNET) || | ||
2253 | (dev->type == ARPHRD_INFINIBAND)) | ||
2254 | return 1; | ||
2255 | |||
2256 | return 0; | ||
2257 | } | ||
2258 | |||
2259 | static int addrconf_notify(struct notifier_block *this, unsigned long event, | 2253 | static int addrconf_notify(struct notifier_block *this, unsigned long event, |
2260 | void * data) | 2254 | void * data) |
2261 | { | 2255 | { |
2262 | struct net_device *dev = (struct net_device *) data; | 2256 | struct net_device *dev = (struct net_device *) data; |
2263 | struct inet6_dev *idev; | 2257 | struct inet6_dev *idev = __in6_dev_get(dev); |
2264 | int run_pending = 0; | 2258 | int run_pending = 0; |
2265 | 2259 | ||
2266 | if (!ipv6_hwtype(dev)) | ||
2267 | return NOTIFY_OK; | ||
2268 | |||
2269 | idev = __in6_dev_get(dev); | ||
2270 | |||
2271 | switch(event) { | 2260 | switch(event) { |
2272 | case NETDEV_REGISTER: | 2261 | case NETDEV_REGISTER: |
2273 | if (!idev) { | 2262 | if (!idev && dev->mtu >= IPV6_MIN_MTU) { |
2274 | idev = ipv6_add_dev(dev); | 2263 | idev = ipv6_add_dev(dev); |
2275 | if (!idev) | 2264 | if (!idev) |
2276 | printk(KERN_WARNING "IPv6: add_dev failed for %s\n", | 2265 | printk(KERN_WARNING "IPv6: add_dev failed for %s\n", |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 4f06a51ad4fd..193d9d60bb7a 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -590,6 +590,7 @@ static int tcp_v6_md5_do_add(struct sock *sk, struct in6_addr *peer, | |||
590 | kfree(newkey); | 590 | kfree(newkey); |
591 | return -ENOMEM; | 591 | return -ENOMEM; |
592 | } | 592 | } |
593 | sk->sk_route_caps &= ~NETIF_F_GSO_MASK; | ||
593 | } | 594 | } |
594 | tcp_alloc_md5sig_pool(); | 595 | tcp_alloc_md5sig_pool(); |
595 | if (tp->md5sig_info->alloced6 == tp->md5sig_info->entries6) { | 596 | if (tp->md5sig_info->alloced6 == tp->md5sig_info->entries6) { |
@@ -724,6 +725,7 @@ static int tcp_v6_parse_md5_keys (struct sock *sk, char __user *optval, | |||
724 | return -ENOMEM; | 725 | return -ENOMEM; |
725 | 726 | ||
726 | tp->md5sig_info = p; | 727 | tp->md5sig_info = p; |
728 | sk->sk_route_caps &= ~NETIF_F_GSO_MASK; | ||
727 | } | 729 | } |
728 | 730 | ||
729 | newkey = kmemdup(cmd.tcpm_key, cmd.tcpm_keylen, GFP_KERNEL); | 731 | newkey = kmemdup(cmd.tcpm_key, cmd.tcpm_keylen, GFP_KERNEL); |
diff --git a/net/irda/irlap_event.c b/net/irda/irlap_event.c index 0b02073ffdf3..a8b8873aa263 100644 --- a/net/irda/irlap_event.c +++ b/net/irda/irlap_event.c | |||
@@ -317,23 +317,6 @@ void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event, | |||
317 | } | 317 | } |
318 | 318 | ||
319 | /* | 319 | /* |
320 | * Function irlap_next_state (self, state) | ||
321 | * | ||
322 | * Switches state and provides debug information | ||
323 | * | ||
324 | */ | ||
325 | static inline void irlap_next_state(struct irlap_cb *self, IRLAP_STATE state) | ||
326 | { | ||
327 | /* | ||
328 | if (!self || self->magic != LAP_MAGIC) | ||
329 | return; | ||
330 | |||
331 | IRDA_DEBUG(4, "next LAP state = %s\n", irlap_state[state]); | ||
332 | */ | ||
333 | self->state = state; | ||
334 | } | ||
335 | |||
336 | /* | ||
337 | * Function irlap_state_ndm (event, skb, frame) | 320 | * Function irlap_state_ndm (event, skb, frame) |
338 | * | 321 | * |
339 | * NDM (Normal Disconnected Mode) state | 322 | * NDM (Normal Disconnected Mode) state |
@@ -1086,7 +1069,6 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1086 | } else { | 1069 | } else { |
1087 | /* Final packet of window */ | 1070 | /* Final packet of window */ |
1088 | irlap_send_data_primary_poll(self, skb); | 1071 | irlap_send_data_primary_poll(self, skb); |
1089 | irlap_next_state(self, LAP_NRM_P); | ||
1090 | 1072 | ||
1091 | /* | 1073 | /* |
1092 | * Make sure state machine does not try to send | 1074 | * Make sure state machine does not try to send |
@@ -1436,14 +1418,14 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1436 | */ | 1418 | */ |
1437 | self->remote_busy = FALSE; | 1419 | self->remote_busy = FALSE; |
1438 | 1420 | ||
1421 | /* Stop final timer */ | ||
1422 | del_timer(&self->final_timer); | ||
1423 | |||
1439 | /* | 1424 | /* |
1440 | * Nr as expected? | 1425 | * Nr as expected? |
1441 | */ | 1426 | */ |
1442 | ret = irlap_validate_nr_received(self, info->nr); | 1427 | ret = irlap_validate_nr_received(self, info->nr); |
1443 | if (ret == NR_EXPECTED) { | 1428 | if (ret == NR_EXPECTED) { |
1444 | /* Stop final timer */ | ||
1445 | del_timer(&self->final_timer); | ||
1446 | |||
1447 | /* Update Nr received */ | 1429 | /* Update Nr received */ |
1448 | irlap_update_nr_received(self, info->nr); | 1430 | irlap_update_nr_received(self, info->nr); |
1449 | 1431 | ||
@@ -1475,14 +1457,12 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1475 | 1457 | ||
1476 | /* Resend rejected frames */ | 1458 | /* Resend rejected frames */ |
1477 | irlap_resend_rejected_frames(self, CMD_FRAME); | 1459 | irlap_resend_rejected_frames(self, CMD_FRAME); |
1478 | 1460 | irlap_start_final_timer(self, self->final_timeout * 2); | |
1479 | /* Final timer ??? Jean II */ | ||
1480 | 1461 | ||
1481 | irlap_next_state(self, LAP_NRM_P); | 1462 | irlap_next_state(self, LAP_NRM_P); |
1482 | } else if (ret == NR_INVALID) { | 1463 | } else if (ret == NR_INVALID) { |
1483 | IRDA_DEBUG(1, "%s(), Received RR with " | 1464 | IRDA_DEBUG(1, "%s(), Received RR with " |
1484 | "invalid nr !\n", __FUNCTION__); | 1465 | "invalid nr !\n", __FUNCTION__); |
1485 | del_timer(&self->final_timer); | ||
1486 | 1466 | ||
1487 | irlap_next_state(self, LAP_RESET_WAIT); | 1467 | irlap_next_state(self, LAP_RESET_WAIT); |
1488 | 1468 | ||
diff --git a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c index 3c5a68e36414..3013c49ab975 100644 --- a/net/irda/irlap_frame.c +++ b/net/irda/irlap_frame.c | |||
@@ -798,16 +798,19 @@ void irlap_send_data_primary_poll(struct irlap_cb *self, struct sk_buff *skb) | |||
798 | self->vs = (self->vs + 1) % 8; | 798 | self->vs = (self->vs + 1) % 8; |
799 | self->ack_required = FALSE; | 799 | self->ack_required = FALSE; |
800 | 800 | ||
801 | irlap_next_state(self, LAP_NRM_P); | ||
801 | irlap_send_i_frame(self, tx_skb, CMD_FRAME); | 802 | irlap_send_i_frame(self, tx_skb, CMD_FRAME); |
802 | } else { | 803 | } else { |
803 | IRDA_DEBUG(4, "%s(), sending unreliable frame\n", __FUNCTION__); | 804 | IRDA_DEBUG(4, "%s(), sending unreliable frame\n", __FUNCTION__); |
804 | 805 | ||
805 | if (self->ack_required) { | 806 | if (self->ack_required) { |
806 | irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME); | 807 | irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME); |
808 | irlap_next_state(self, LAP_NRM_P); | ||
807 | irlap_send_rr_frame(self, CMD_FRAME); | 809 | irlap_send_rr_frame(self, CMD_FRAME); |
808 | self->ack_required = FALSE; | 810 | self->ack_required = FALSE; |
809 | } else { | 811 | } else { |
810 | skb->data[1] |= PF_BIT; | 812 | skb->data[1] |= PF_BIT; |
813 | irlap_next_state(self, LAP_NRM_P); | ||
811 | irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME); | 814 | irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME); |
812 | } | 815 | } |
813 | } | 816 | } |
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c index bb6c0feb2d48..476c8486f789 100644 --- a/net/mac80211/debugfs.c +++ b/net/mac80211/debugfs.c | |||
@@ -112,7 +112,7 @@ DEBUGFS_READONLY_FILE(wep_iv, 20, "%#06x", | |||
112 | local->wep_iv & 0xffffff); | 112 | local->wep_iv & 0xffffff); |
113 | DEBUGFS_READONLY_FILE(tx_power_reduction, 20, "%d.%d dBm", | 113 | DEBUGFS_READONLY_FILE(tx_power_reduction, 20, "%d.%d dBm", |
114 | local->hw.conf.tx_power_reduction / 10, | 114 | local->hw.conf.tx_power_reduction / 10, |
115 | local->hw.conf.tx_power_reduction & 10); | 115 | local->hw.conf.tx_power_reduction % 10); |
116 | DEBUGFS_READONLY_FILE(rate_ctrl_alg, 100, "%s", | 116 | DEBUGFS_READONLY_FILE(rate_ctrl_alg, 100, "%s", |
117 | local->rate_ctrl ? local->rate_ctrl->ops->name : "<unset>"); | 117 | local->rate_ctrl ? local->rate_ctrl->ops->name : "<unset>"); |
118 | 118 | ||
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index 9f30ae4c2ab3..91b545c144c1 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c | |||
@@ -2592,11 +2592,17 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw) | |||
2592 | 2592 | ||
2593 | read_lock(&local->sub_if_lock); | 2593 | read_lock(&local->sub_if_lock); |
2594 | list_for_each_entry(sdata, &local->sub_if_list, list) { | 2594 | list_for_each_entry(sdata, &local->sub_if_list, list) { |
2595 | |||
2596 | /* No need to wake the master device. */ | ||
2597 | if (sdata->dev == local->mdev) | ||
2598 | continue; | ||
2599 | |||
2595 | if (sdata->type == IEEE80211_IF_TYPE_STA) { | 2600 | if (sdata->type == IEEE80211_IF_TYPE_STA) { |
2596 | if (sdata->u.sta.associated) | 2601 | if (sdata->u.sta.associated) |
2597 | ieee80211_send_nullfunc(local, sdata, 0); | 2602 | ieee80211_send_nullfunc(local, sdata, 0); |
2598 | ieee80211_sta_timer((unsigned long)sdata); | 2603 | ieee80211_sta_timer((unsigned long)sdata); |
2599 | } | 2604 | } |
2605 | |||
2600 | netif_wake_queue(sdata->dev); | 2606 | netif_wake_queue(sdata->dev); |
2601 | } | 2607 | } |
2602 | read_unlock(&local->sub_if_lock); | 2608 | read_unlock(&local->sub_if_lock); |
@@ -2738,6 +2744,12 @@ static int ieee80211_sta_start_scan(struct net_device *dev, | |||
2738 | 2744 | ||
2739 | read_lock(&local->sub_if_lock); | 2745 | read_lock(&local->sub_if_lock); |
2740 | list_for_each_entry(sdata, &local->sub_if_list, list) { | 2746 | list_for_each_entry(sdata, &local->sub_if_list, list) { |
2747 | |||
2748 | /* Don't stop the master interface, otherwise we can't transmit | ||
2749 | * probes! */ | ||
2750 | if (sdata->dev == local->mdev) | ||
2751 | continue; | ||
2752 | |||
2741 | netif_stop_queue(sdata->dev); | 2753 | netif_stop_queue(sdata->dev); |
2742 | if (sdata->type == IEEE80211_IF_TYPE_STA && | 2754 | if (sdata->type == IEEE80211_IF_TYPE_STA && |
2743 | sdata->u.sta.associated) | 2755 | sdata->u.sta.associated) |
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index df94e3cdfba3..498edb0cd4e5 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c | |||
@@ -1231,6 +1231,10 @@ void sctp_assoc_sync_pmtu(struct sctp_association *asoc) | |||
1231 | /* Get the lowest pmtu of all the transports. */ | 1231 | /* Get the lowest pmtu of all the transports. */ |
1232 | list_for_each(pos, &asoc->peer.transport_addr_list) { | 1232 | list_for_each(pos, &asoc->peer.transport_addr_list) { |
1233 | t = list_entry(pos, struct sctp_transport, transports); | 1233 | t = list_entry(pos, struct sctp_transport, transports); |
1234 | if (t->pmtu_pending && t->dst) { | ||
1235 | sctp_transport_update_pmtu(t, dst_mtu(t->dst)); | ||
1236 | t->pmtu_pending = 0; | ||
1237 | } | ||
1234 | if (!pmtu || (t->pathmtu < pmtu)) | 1238 | if (!pmtu || (t->pathmtu < pmtu)) |
1235 | pmtu = t->pathmtu; | 1239 | pmtu = t->pathmtu; |
1236 | } | 1240 | } |
diff --git a/net/sctp/input.c b/net/sctp/input.c index 885109fb3dda..d57ff7f3c576 100644 --- a/net/sctp/input.c +++ b/net/sctp/input.c | |||
@@ -367,24 +367,18 @@ static void sctp_add_backlog(struct sock *sk, struct sk_buff *skb) | |||
367 | void sctp_icmp_frag_needed(struct sock *sk, struct sctp_association *asoc, | 367 | void sctp_icmp_frag_needed(struct sock *sk, struct sctp_association *asoc, |
368 | struct sctp_transport *t, __u32 pmtu) | 368 | struct sctp_transport *t, __u32 pmtu) |
369 | { | 369 | { |
370 | if (sock_owned_by_user(sk) || !t || (t->pathmtu == pmtu)) | 370 | if (!t || (t->pathmtu == pmtu)) |
371 | return; | 371 | return; |
372 | 372 | ||
373 | if (sock_owned_by_user(sk)) { | ||
374 | asoc->pmtu_pending = 1; | ||
375 | t->pmtu_pending = 1; | ||
376 | return; | ||
377 | } | ||
378 | |||
373 | if (t->param_flags & SPP_PMTUD_ENABLE) { | 379 | if (t->param_flags & SPP_PMTUD_ENABLE) { |
374 | if (unlikely(pmtu < SCTP_DEFAULT_MINSEGMENT)) { | 380 | /* Update transports view of the MTU */ |
375 | printk(KERN_WARNING "%s: Reported pmtu %d too low, " | 381 | sctp_transport_update_pmtu(t, pmtu); |
376 | "using default minimum of %d\n", | ||
377 | __FUNCTION__, pmtu, | ||
378 | SCTP_DEFAULT_MINSEGMENT); | ||
379 | /* Use default minimum segment size and disable | ||
380 | * pmtu discovery on this transport. | ||
381 | */ | ||
382 | t->pathmtu = SCTP_DEFAULT_MINSEGMENT; | ||
383 | t->param_flags = (t->param_flags & ~SPP_PMTUD) | | ||
384 | SPP_PMTUD_DISABLE; | ||
385 | } else { | ||
386 | t->pathmtu = pmtu; | ||
387 | } | ||
388 | 382 | ||
389 | /* Update association pmtu. */ | 383 | /* Update association pmtu. */ |
390 | sctp_assoc_sync_pmtu(asoc); | 384 | sctp_assoc_sync_pmtu(asoc); |
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 4dcdabf56473..6edaaa009d62 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -333,12 +333,19 @@ SCTP_STATIC int sctp_do_bind(struct sock *sk, union sctp_addr *addr, int len) | |||
333 | if (!sp->pf->bind_verify(sp, addr)) | 333 | if (!sp->pf->bind_verify(sp, addr)) |
334 | return -EADDRNOTAVAIL; | 334 | return -EADDRNOTAVAIL; |
335 | 335 | ||
336 | /* We must either be unbound, or bind to the same port. */ | 336 | /* We must either be unbound, or bind to the same port. |
337 | if (bp->port && (snum != bp->port)) { | 337 | * It's OK to allow 0 ports if we are already bound. |
338 | SCTP_DEBUG_PRINTK("sctp_do_bind:" | 338 | * We'll just inhert an already bound port in this case |
339 | */ | ||
340 | if (bp->port) { | ||
341 | if (!snum) | ||
342 | snum = bp->port; | ||
343 | else if (snum != bp->port) { | ||
344 | SCTP_DEBUG_PRINTK("sctp_do_bind:" | ||
339 | " New port %d does not match existing port " | 345 | " New port %d does not match existing port " |
340 | "%d.\n", snum, bp->port); | 346 | "%d.\n", snum, bp->port); |
341 | return -EINVAL; | 347 | return -EINVAL; |
348 | } | ||
342 | } | 349 | } |
343 | 350 | ||
344 | if (snum && snum < PROT_SOCK && !capable(CAP_NET_BIND_SERVICE)) | 351 | if (snum && snum < PROT_SOCK && !capable(CAP_NET_BIND_SERVICE)) |
@@ -1655,6 +1662,9 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk, | |||
1655 | goto out_free; | 1662 | goto out_free; |
1656 | } | 1663 | } |
1657 | 1664 | ||
1665 | if (asoc->pmtu_pending) | ||
1666 | sctp_assoc_pending_pmtu(asoc); | ||
1667 | |||
1658 | /* If fragmentation is disabled and the message length exceeds the | 1668 | /* If fragmentation is disabled and the message length exceeds the |
1659 | * association fragmentation point, return EMSGSIZE. The I-D | 1669 | * association fragmentation point, return EMSGSIZE. The I-D |
1660 | * does not specify what this error is, but this looks like | 1670 | * does not specify what this error is, but this looks like |
@@ -3550,6 +3560,7 @@ SCTP_STATIC int sctp_do_peeloff(struct sctp_association *asoc, | |||
3550 | struct sock *sk = asoc->base.sk; | 3560 | struct sock *sk = asoc->base.sk; |
3551 | struct socket *sock; | 3561 | struct socket *sock; |
3552 | struct inet_sock *inetsk; | 3562 | struct inet_sock *inetsk; |
3563 | struct sctp_af *af; | ||
3553 | int err = 0; | 3564 | int err = 0; |
3554 | 3565 | ||
3555 | /* An association cannot be branched off from an already peeled-off | 3566 | /* An association cannot be branched off from an already peeled-off |
@@ -3571,8 +3582,9 @@ SCTP_STATIC int sctp_do_peeloff(struct sctp_association *asoc, | |||
3571 | /* Make peeled-off sockets more like 1-1 accepted sockets. | 3582 | /* Make peeled-off sockets more like 1-1 accepted sockets. |
3572 | * Set the daddr and initialize id to something more random | 3583 | * Set the daddr and initialize id to something more random |
3573 | */ | 3584 | */ |
3585 | af = sctp_get_af_specific(asoc->peer.primary_addr.sa.sa_family); | ||
3586 | af->to_sk_daddr(&asoc->peer.primary_addr, sk); | ||
3574 | inetsk = inet_sk(sock->sk); | 3587 | inetsk = inet_sk(sock->sk); |
3575 | inetsk->daddr = asoc->peer.primary_addr.v4.sin_addr.s_addr; | ||
3576 | inetsk->id = asoc->next_tsn ^ jiffies; | 3588 | inetsk->id = asoc->next_tsn ^ jiffies; |
3577 | 3589 | ||
3578 | *sockp = sock; | 3590 | *sockp = sock; |
@@ -4343,11 +4355,12 @@ copy_getaddrs: | |||
4343 | err = -EFAULT; | 4355 | err = -EFAULT; |
4344 | goto error; | 4356 | goto error; |
4345 | } | 4357 | } |
4346 | if (put_user(cnt, &((struct sctp_getaddrs __user *)optval)->addr_num)) | 4358 | if (put_user(cnt, &((struct sctp_getaddrs __user *)optval)->addr_num)) { |
4347 | return -EFAULT; | 4359 | err = -EFAULT; |
4360 | goto error; | ||
4361 | } | ||
4348 | if (put_user(bytes_copied, optlen)) | 4362 | if (put_user(bytes_copied, optlen)) |
4349 | return -EFAULT; | 4363 | err = -EFAULT; |
4350 | |||
4351 | error: | 4364 | error: |
4352 | kfree(addrs); | 4365 | kfree(addrs); |
4353 | return err; | 4366 | return err; |
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index 961df275d5b9..5f467c914f80 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c | |||
@@ -241,6 +241,45 @@ void sctp_transport_pmtu(struct sctp_transport *transport) | |||
241 | transport->pathmtu = SCTP_DEFAULT_MAXSEGMENT; | 241 | transport->pathmtu = SCTP_DEFAULT_MAXSEGMENT; |
242 | } | 242 | } |
243 | 243 | ||
244 | /* this is a complete rip-off from __sk_dst_check | ||
245 | * the cookie is always 0 since this is how it's used in the | ||
246 | * pmtu code | ||
247 | */ | ||
248 | static struct dst_entry *sctp_transport_dst_check(struct sctp_transport *t) | ||
249 | { | ||
250 | struct dst_entry *dst = t->dst; | ||
251 | |||
252 | if (dst && dst->obsolete && dst->ops->check(dst, 0) == NULL) { | ||
253 | dst_release(t->dst); | ||
254 | t->dst = NULL; | ||
255 | return NULL; | ||
256 | } | ||
257 | |||
258 | return dst; | ||
259 | } | ||
260 | |||
261 | void sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu) | ||
262 | { | ||
263 | struct dst_entry *dst; | ||
264 | |||
265 | if (unlikely(pmtu < SCTP_DEFAULT_MINSEGMENT)) { | ||
266 | printk(KERN_WARNING "%s: Reported pmtu %d too low, " | ||
267 | "using default minimum of %d\n", | ||
268 | __FUNCTION__, pmtu, | ||
269 | SCTP_DEFAULT_MINSEGMENT); | ||
270 | /* Use default minimum segment size and disable | ||
271 | * pmtu discovery on this transport. | ||
272 | */ | ||
273 | t->pathmtu = SCTP_DEFAULT_MINSEGMENT; | ||
274 | } else { | ||
275 | t->pathmtu = pmtu; | ||
276 | } | ||
277 | |||
278 | dst = sctp_transport_dst_check(t); | ||
279 | if (dst) | ||
280 | dst->ops->update_pmtu(dst, pmtu); | ||
281 | } | ||
282 | |||
244 | /* Caches the dst entry and source address for a transport's destination | 283 | /* Caches the dst entry and source address for a transport's destination |
245 | * address. | 284 | * address. |
246 | */ | 285 | */ |
diff --git a/net/wireless/sysfs.c b/net/wireless/sysfs.c index 3ebae1442963..88aaacd9f822 100644 --- a/net/wireless/sysfs.c +++ b/net/wireless/sysfs.c | |||
@@ -33,7 +33,7 @@ static ssize_t _show_permaddr(struct device *dev, | |||
33 | struct device_attribute *attr, | 33 | struct device_attribute *attr, |
34 | char *buf) | 34 | char *buf) |
35 | { | 35 | { |
36 | char *addr = dev_to_rdev(dev)->wiphy.perm_addr; | 36 | unsigned char *addr = dev_to_rdev(dev)->wiphy.perm_addr; |
37 | 37 | ||
38 | return sprintf(buf, "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n", | 38 | return sprintf(buf, "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n", |
39 | addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]); | 39 | addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]); |
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 8e5610d428c5..3645e980da71 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -1052,6 +1052,7 @@ static int init_section_ref_ok(const char *name) | |||
1052 | ".plt", /* seen on ARCH=um build on x86_64. Harmless */ | 1052 | ".plt", /* seen on ARCH=um build on x86_64. Harmless */ |
1053 | "__ftr_fixup", /* powerpc cpu feature fixup */ | 1053 | "__ftr_fixup", /* powerpc cpu feature fixup */ |
1054 | "__fw_ftr_fixup", /* powerpc firmware feature fixup */ | 1054 | "__fw_ftr_fixup", /* powerpc firmware feature fixup */ |
1055 | ".cranges", /* used by sh64 */ | ||
1055 | NULL | 1056 | NULL |
1056 | }; | 1057 | }; |
1057 | /* Start of section names */ | 1058 | /* Start of section names */ |
@@ -1132,6 +1133,7 @@ static int exit_section_ref_ok(const char *name) | |||
1132 | ".fixup", | 1133 | ".fixup", |
1133 | ".smp_locks", | 1134 | ".smp_locks", |
1134 | ".plt", /* seen on ARCH=um build on x86_64. Harmless */ | 1135 | ".plt", /* seen on ARCH=um build on x86_64. Harmless */ |
1136 | ".cranges", /* used by sh64 */ | ||
1135 | NULL | 1137 | NULL |
1136 | }; | 1138 | }; |
1137 | /* Start of section names */ | 1139 | /* Start of section names */ |