diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-05-22 14:28:35 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-05-22 14:28:35 -0400 |
commit | 9bd7de51ee8537094656149eaf45338cadb7d7d4 (patch) | |
tree | a691987319dfcdb07de2bce619746f88d26882c4 | |
parent | e4b636366c00738b9609cda307014d71b1225b7f (diff) | |
parent | 6a44587ee716ac911082cbdec766e5b3f051c071 (diff) |
Merge branch 'master' into for-2.6.31
Conflicts:
drivers/ide/ide-io.c
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
99 files changed, 559 insertions, 384 deletions
diff --git a/Documentation/filesystems/tmpfs.txt b/Documentation/filesystems/tmpfs.txt index 222437efd75a..3015da0c6b2a 100644 --- a/Documentation/filesystems/tmpfs.txt +++ b/Documentation/filesystems/tmpfs.txt | |||
@@ -133,4 +133,4 @@ RAM/SWAP in 10240 inodes and it is only accessible by root. | |||
133 | Author: | 133 | Author: |
134 | Christoph Rohland <cr@sap.com>, 1.12.01 | 134 | Christoph Rohland <cr@sap.com>, 1.12.01 |
135 | Updated: | 135 | Updated: |
136 | Hugh Dickins <hugh@veritas.com>, 4 June 2007 | 136 | Hugh Dickins, 4 June 2007 |
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index ec5de02f543f..b121c5db707f 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -1266,13 +1266,22 @@ sctp_rmem - vector of 3 INTEGERs: min, default, max | |||
1266 | sctp_wmem - vector of 3 INTEGERs: min, default, max | 1266 | sctp_wmem - vector of 3 INTEGERs: min, default, max |
1267 | See tcp_wmem for a description. | 1267 | See tcp_wmem for a description. |
1268 | 1268 | ||
1269 | UNDOCUMENTED: | ||
1270 | 1269 | ||
1271 | /proc/sys/net/core/* | 1270 | /proc/sys/net/core/* |
1272 | dev_weight FIXME | 1271 | dev_weight - INTEGER |
1272 | The maximum number of packets that kernel can handle on a NAPI | ||
1273 | interrupt, it's a Per-CPU variable. | ||
1274 | |||
1275 | Default: 64 | ||
1273 | 1276 | ||
1274 | /proc/sys/net/unix/* | 1277 | /proc/sys/net/unix/* |
1275 | max_dgram_qlen FIXME | 1278 | max_dgram_qlen - INTEGER |
1279 | The maximum length of dgram socket receive queue | ||
1280 | |||
1281 | Default: 10 | ||
1282 | |||
1283 | |||
1284 | UNDOCUMENTED: | ||
1276 | 1285 | ||
1277 | /proc/sys/net/irda/* | 1286 | /proc/sys/net/irda/* |
1278 | fast_poll_increase FIXME | 1287 | fast_poll_increase FIXME |
diff --git a/MAINTAINERS b/MAINTAINERS index 2b349ba4add4..64ea80e45e3b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -5579,6 +5579,14 @@ M: ian@mnementh.co.uk | |||
5579 | S: Maintained | 5579 | S: Maintained |
5580 | F: drivers/mmc/host/tmio_mmc.* | 5580 | F: drivers/mmc/host/tmio_mmc.* |
5581 | 5581 | ||
5582 | TMPFS (SHMEM FILESYSTEM) | ||
5583 | P: Hugh Dickins | ||
5584 | M: hugh.dickins@tiscali.co.uk | ||
5585 | L: linux-mm@kvack.org | ||
5586 | S: Maintained | ||
5587 | F: include/linux/shmem_fs.h | ||
5588 | F: mm/shmem.c | ||
5589 | |||
5582 | TPM DEVICE DRIVER | 5590 | TPM DEVICE DRIVER |
5583 | P: Debora Velarde | 5591 | P: Debora Velarde |
5584 | M: debora@linux.vnet.ibm.com | 5592 | M: debora@linux.vnet.ibm.com |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index e60ec54df334..9d02cdb15b23 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -273,6 +273,7 @@ config ARCH_EP93XX | |||
273 | select HAVE_CLK | 273 | select HAVE_CLK |
274 | select COMMON_CLKDEV | 274 | select COMMON_CLKDEV |
275 | select ARCH_REQUIRE_GPIOLIB | 275 | select ARCH_REQUIRE_GPIOLIB |
276 | select ARCH_HAS_HOLES_MEMORYMODEL | ||
276 | help | 277 | help |
277 | This enables support for the Cirrus EP93xx series of CPUs. | 278 | This enables support for the Cirrus EP93xx series of CPUs. |
278 | 279 | ||
@@ -976,10 +977,9 @@ config OABI_COMPAT | |||
976 | UNPREDICTABLE (in fact it can be predicted that it won't work | 977 | UNPREDICTABLE (in fact it can be predicted that it won't work |
977 | at all). If in doubt say Y. | 978 | at all). If in doubt say Y. |
978 | 979 | ||
979 | config ARCH_FLATMEM_HAS_HOLES | 980 | config ARCH_HAS_HOLES_MEMORYMODEL |
980 | bool | 981 | bool |
981 | default y | 982 | default n |
982 | depends on FLATMEM | ||
983 | 983 | ||
984 | # Discontigmem is deprecated | 984 | # Discontigmem is deprecated |
985 | config ARCH_DISCONTIGMEM_ENABLE | 985 | config ARCH_DISCONTIGMEM_ENABLE |
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index c6884ba1d5ed..3e1714c6523f 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c | |||
@@ -253,9 +253,9 @@ void __cpuinit gic_cpu_init(unsigned int gic_nr, void __iomem *base) | |||
253 | } | 253 | } |
254 | 254 | ||
255 | #ifdef CONFIG_SMP | 255 | #ifdef CONFIG_SMP |
256 | void gic_raise_softirq(cpumask_t cpumask, unsigned int irq) | 256 | void gic_raise_softirq(const struct cpumask *mask, unsigned int irq) |
257 | { | 257 | { |
258 | unsigned long map = *cpus_addr(cpumask); | 258 | unsigned long map = *cpus_addr(*mask); |
259 | 259 | ||
260 | /* this always happens on GIC0 */ | 260 | /* this always happens on GIC0 */ |
261 | writel(map << 16 | irq, gic_data[0].dist_base + GIC_DIST_SOFTINT); | 261 | writel(map << 16 | irq, gic_data[0].dist_base + GIC_DIST_SOFTINT); |
diff --git a/arch/arm/include/asm/hardware/gic.h b/arch/arm/include/asm/hardware/gic.h index 4924914af188..7f34333bb545 100644 --- a/arch/arm/include/asm/hardware/gic.h +++ b/arch/arm/include/asm/hardware/gic.h | |||
@@ -36,7 +36,7 @@ | |||
36 | void gic_dist_init(unsigned int gic_nr, void __iomem *base, unsigned int irq_start); | 36 | void gic_dist_init(unsigned int gic_nr, void __iomem *base, unsigned int irq_start); |
37 | void gic_cpu_init(unsigned int gic_nr, void __iomem *base); | 37 | void gic_cpu_init(unsigned int gic_nr, void __iomem *base); |
38 | void gic_cascade_irq(unsigned int gic_nr, unsigned int irq); | 38 | void gic_cascade_irq(unsigned int gic_nr, unsigned int irq); |
39 | void gic_raise_softirq(cpumask_t cpumask, unsigned int irq); | 39 | void gic_raise_softirq(const struct cpumask *mask, unsigned int irq); |
40 | #endif | 40 | #endif |
41 | 41 | ||
42 | #endif | 42 | #endif |
diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h index fad70da5911d..5995935338e1 100644 --- a/arch/arm/include/asm/smp.h +++ b/arch/arm/include/asm/smp.h | |||
@@ -53,17 +53,12 @@ extern void smp_store_cpu_info(unsigned int cpuid); | |||
53 | /* | 53 | /* |
54 | * Raise an IPI cross call on CPUs in callmap. | 54 | * Raise an IPI cross call on CPUs in callmap. |
55 | */ | 55 | */ |
56 | extern void smp_cross_call(cpumask_t callmap); | 56 | extern void smp_cross_call(const struct cpumask *mask); |
57 | |||
58 | /* | ||
59 | * Broadcast a timer interrupt to the other CPUs. | ||
60 | */ | ||
61 | extern void smp_send_timer(void); | ||
62 | 57 | ||
63 | /* | 58 | /* |
64 | * Broadcast a clock event to other CPUs. | 59 | * Broadcast a clock event to other CPUs. |
65 | */ | 60 | */ |
66 | extern void smp_timer_broadcast(cpumask_t mask); | 61 | extern void smp_timer_broadcast(const struct cpumask *mask); |
67 | 62 | ||
68 | /* | 63 | /* |
69 | * Boot a secondary CPU, and assign it the specified idle task. | 64 | * Boot a secondary CPU, and assign it the specified idle task. |
@@ -102,7 +97,8 @@ extern int platform_cpu_kill(unsigned int cpu); | |||
102 | extern void platform_cpu_enable(unsigned int cpu); | 97 | extern void platform_cpu_enable(unsigned int cpu); |
103 | 98 | ||
104 | extern void arch_send_call_function_single_ipi(int cpu); | 99 | extern void arch_send_call_function_single_ipi(int cpu); |
105 | extern void arch_send_call_function_ipi(cpumask_t mask); | 100 | extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); |
101 | #define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask | ||
106 | 102 | ||
107 | /* | 103 | /* |
108 | * Local timer interrupt handling function (can be IPI'ed). | 104 | * Local timer interrupt handling function (can be IPI'ed). |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 7801aac3c043..6014dfd22af4 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -326,14 +326,14 @@ void __init smp_prepare_boot_cpu(void) | |||
326 | per_cpu(cpu_data, cpu).idle = current; | 326 | per_cpu(cpu_data, cpu).idle = current; |
327 | } | 327 | } |
328 | 328 | ||
329 | static void send_ipi_message(cpumask_t callmap, enum ipi_msg_type msg) | 329 | static void send_ipi_message(const struct cpumask *mask, enum ipi_msg_type msg) |
330 | { | 330 | { |
331 | unsigned long flags; | 331 | unsigned long flags; |
332 | unsigned int cpu; | 332 | unsigned int cpu; |
333 | 333 | ||
334 | local_irq_save(flags); | 334 | local_irq_save(flags); |
335 | 335 | ||
336 | for_each_cpu_mask(cpu, callmap) { | 336 | for_each_cpu(cpu, mask) { |
337 | struct ipi_data *ipi = &per_cpu(ipi_data, cpu); | 337 | struct ipi_data *ipi = &per_cpu(ipi_data, cpu); |
338 | 338 | ||
339 | spin_lock(&ipi->lock); | 339 | spin_lock(&ipi->lock); |
@@ -344,19 +344,19 @@ static void send_ipi_message(cpumask_t callmap, enum ipi_msg_type msg) | |||
344 | /* | 344 | /* |
345 | * Call the platform specific cross-CPU call function. | 345 | * Call the platform specific cross-CPU call function. |
346 | */ | 346 | */ |
347 | smp_cross_call(callmap); | 347 | smp_cross_call(mask); |
348 | 348 | ||
349 | local_irq_restore(flags); | 349 | local_irq_restore(flags); |
350 | } | 350 | } |
351 | 351 | ||
352 | void arch_send_call_function_ipi(cpumask_t mask) | 352 | void arch_send_call_function_ipi_mask(const struct cpumask *mask) |
353 | { | 353 | { |
354 | send_ipi_message(mask, IPI_CALL_FUNC); | 354 | send_ipi_message(mask, IPI_CALL_FUNC); |
355 | } | 355 | } |
356 | 356 | ||
357 | void arch_send_call_function_single_ipi(int cpu) | 357 | void arch_send_call_function_single_ipi(int cpu) |
358 | { | 358 | { |
359 | send_ipi_message(cpumask_of_cpu(cpu), IPI_CALL_FUNC_SINGLE); | 359 | send_ipi_message(cpumask_of(cpu), IPI_CALL_FUNC_SINGLE); |
360 | } | 360 | } |
361 | 361 | ||
362 | void show_ipi_list(struct seq_file *p) | 362 | void show_ipi_list(struct seq_file *p) |
@@ -498,17 +498,10 @@ asmlinkage void __exception do_IPI(struct pt_regs *regs) | |||
498 | 498 | ||
499 | void smp_send_reschedule(int cpu) | 499 | void smp_send_reschedule(int cpu) |
500 | { | 500 | { |
501 | send_ipi_message(cpumask_of_cpu(cpu), IPI_RESCHEDULE); | 501 | send_ipi_message(cpumask_of(cpu), IPI_RESCHEDULE); |
502 | } | 502 | } |
503 | 503 | ||
504 | void smp_send_timer(void) | 504 | void smp_timer_broadcast(const struct cpumask *mask) |
505 | { | ||
506 | cpumask_t mask = cpu_online_map; | ||
507 | cpu_clear(smp_processor_id(), mask); | ||
508 | send_ipi_message(mask, IPI_TIMER); | ||
509 | } | ||
510 | |||
511 | void smp_timer_broadcast(cpumask_t mask) | ||
512 | { | 505 | { |
513 | send_ipi_message(mask, IPI_TIMER); | 506 | send_ipi_message(mask, IPI_TIMER); |
514 | } | 507 | } |
@@ -517,7 +510,7 @@ void smp_send_stop(void) | |||
517 | { | 510 | { |
518 | cpumask_t mask = cpu_online_map; | 511 | cpumask_t mask = cpu_online_map; |
519 | cpu_clear(smp_processor_id(), mask); | 512 | cpu_clear(smp_processor_id(), mask); |
520 | send_ipi_message(mask, IPI_CPU_STOP); | 513 | send_ipi_message(&mask, IPI_CPU_STOP); |
521 | } | 514 | } |
522 | 515 | ||
523 | /* | 516 | /* |
@@ -528,20 +521,17 @@ int setup_profiling_timer(unsigned int multiplier) | |||
528 | return -EINVAL; | 521 | return -EINVAL; |
529 | } | 522 | } |
530 | 523 | ||
531 | static int | 524 | static void |
532 | on_each_cpu_mask(void (*func)(void *), void *info, int wait, cpumask_t mask) | 525 | on_each_cpu_mask(void (*func)(void *), void *info, int wait, |
526 | const struct cpumask *mask) | ||
533 | { | 527 | { |
534 | int ret = 0; | ||
535 | |||
536 | preempt_disable(); | 528 | preempt_disable(); |
537 | 529 | ||
538 | ret = smp_call_function_mask(mask, func, info, wait); | 530 | smp_call_function_many(mask, func, info, wait); |
539 | if (cpu_isset(smp_processor_id(), mask)) | 531 | if (cpumask_test_cpu(smp_processor_id(), mask)) |
540 | func(info); | 532 | func(info); |
541 | 533 | ||
542 | preempt_enable(); | 534 | preempt_enable(); |
543 | |||
544 | return ret; | ||
545 | } | 535 | } |
546 | 536 | ||
547 | /**********************************************************************/ | 537 | /**********************************************************************/ |
@@ -602,20 +592,17 @@ void flush_tlb_all(void) | |||
602 | 592 | ||
603 | void flush_tlb_mm(struct mm_struct *mm) | 593 | void flush_tlb_mm(struct mm_struct *mm) |
604 | { | 594 | { |
605 | cpumask_t mask = mm->cpu_vm_mask; | 595 | on_each_cpu_mask(ipi_flush_tlb_mm, mm, 1, &mm->cpu_vm_mask); |
606 | |||
607 | on_each_cpu_mask(ipi_flush_tlb_mm, mm, 1, mask); | ||
608 | } | 596 | } |
609 | 597 | ||
610 | void flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) | 598 | void flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) |
611 | { | 599 | { |
612 | cpumask_t mask = vma->vm_mm->cpu_vm_mask; | ||
613 | struct tlb_args ta; | 600 | struct tlb_args ta; |
614 | 601 | ||
615 | ta.ta_vma = vma; | 602 | ta.ta_vma = vma; |
616 | ta.ta_start = uaddr; | 603 | ta.ta_start = uaddr; |
617 | 604 | ||
618 | on_each_cpu_mask(ipi_flush_tlb_page, &ta, 1, mask); | 605 | on_each_cpu_mask(ipi_flush_tlb_page, &ta, 1, &vma->vm_mm->cpu_vm_mask); |
619 | } | 606 | } |
620 | 607 | ||
621 | void flush_tlb_kernel_page(unsigned long kaddr) | 608 | void flush_tlb_kernel_page(unsigned long kaddr) |
@@ -630,14 +617,13 @@ void flush_tlb_kernel_page(unsigned long kaddr) | |||
630 | void flush_tlb_range(struct vm_area_struct *vma, | 617 | void flush_tlb_range(struct vm_area_struct *vma, |
631 | unsigned long start, unsigned long end) | 618 | unsigned long start, unsigned long end) |
632 | { | 619 | { |
633 | cpumask_t mask = vma->vm_mm->cpu_vm_mask; | ||
634 | struct tlb_args ta; | 620 | struct tlb_args ta; |
635 | 621 | ||
636 | ta.ta_vma = vma; | 622 | ta.ta_vma = vma; |
637 | ta.ta_start = start; | 623 | ta.ta_start = start; |
638 | ta.ta_end = end; | 624 | ta.ta_end = end; |
639 | 625 | ||
640 | on_each_cpu_mask(ipi_flush_tlb_range, &ta, 1, mask); | 626 | on_each_cpu_mask(ipi_flush_tlb_range, &ta, 1, &vma->vm_mm->cpu_vm_mask); |
641 | } | 627 | } |
642 | 628 | ||
643 | void flush_tlb_kernel_range(unsigned long start, unsigned long end) | 629 | void flush_tlb_kernel_range(unsigned long start, unsigned long end) |
diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c index e8ebeaea6c48..b2eede5531c8 100644 --- a/arch/arm/mach-ep93xx/clock.c +++ b/arch/arm/mach-ep93xx/clock.c | |||
@@ -21,15 +21,50 @@ | |||
21 | #include <asm/div64.h> | 21 | #include <asm/div64.h> |
22 | #include <mach/hardware.h> | 22 | #include <mach/hardware.h> |
23 | 23 | ||
24 | |||
25 | /* | ||
26 | * The EP93xx has two external crystal oscillators. To generate the | ||
27 | * required high-frequency clocks, the processor uses two phase-locked- | ||
28 | * loops (PLLs) to multiply the incoming external clock signal to much | ||
29 | * higher frequencies that are then divided down by programmable dividers | ||
30 | * to produce the needed clocks. The PLLs operate independently of one | ||
31 | * another. | ||
32 | */ | ||
33 | #define EP93XX_EXT_CLK_RATE 14745600 | ||
34 | #define EP93XX_EXT_RTC_RATE 32768 | ||
35 | |||
36 | |||
24 | struct clk { | 37 | struct clk { |
25 | unsigned long rate; | 38 | unsigned long rate; |
26 | int users; | 39 | int users; |
40 | int sw_locked; | ||
27 | u32 enable_reg; | 41 | u32 enable_reg; |
28 | u32 enable_mask; | 42 | u32 enable_mask; |
43 | |||
44 | unsigned long (*get_rate)(struct clk *clk); | ||
29 | }; | 45 | }; |
30 | 46 | ||
31 | static struct clk clk_uart = { | 47 | |
32 | .rate = 14745600, | 48 | static unsigned long get_uart_rate(struct clk *clk); |
49 | |||
50 | |||
51 | static struct clk clk_uart1 = { | ||
52 | .sw_locked = 1, | ||
53 | .enable_reg = EP93XX_SYSCON_DEVICE_CONFIG, | ||
54 | .enable_mask = EP93XX_SYSCON_DEVICE_CONFIG_U1EN, | ||
55 | .get_rate = get_uart_rate, | ||
56 | }; | ||
57 | static struct clk clk_uart2 = { | ||
58 | .sw_locked = 1, | ||
59 | .enable_reg = EP93XX_SYSCON_DEVICE_CONFIG, | ||
60 | .enable_mask = EP93XX_SYSCON_DEVICE_CONFIG_U2EN, | ||
61 | .get_rate = get_uart_rate, | ||
62 | }; | ||
63 | static struct clk clk_uart3 = { | ||
64 | .sw_locked = 1, | ||
65 | .enable_reg = EP93XX_SYSCON_DEVICE_CONFIG, | ||
66 | .enable_mask = EP93XX_SYSCON_DEVICE_CONFIG_U3EN, | ||
67 | .get_rate = get_uart_rate, | ||
33 | }; | 68 | }; |
34 | static struct clk clk_pll1; | 69 | static struct clk clk_pll1; |
35 | static struct clk clk_f; | 70 | static struct clk clk_f; |
@@ -95,9 +130,9 @@ static struct clk clk_m2m1 = { | |||
95 | { .dev_id = dev, .con_id = con, .clk = ck } | 130 | { .dev_id = dev, .con_id = con, .clk = ck } |
96 | 131 | ||
97 | static struct clk_lookup clocks[] = { | 132 | static struct clk_lookup clocks[] = { |
98 | INIT_CK("apb:uart1", NULL, &clk_uart), | 133 | INIT_CK("apb:uart1", NULL, &clk_uart1), |
99 | INIT_CK("apb:uart2", NULL, &clk_uart), | 134 | INIT_CK("apb:uart2", NULL, &clk_uart2), |
100 | INIT_CK("apb:uart3", NULL, &clk_uart), | 135 | INIT_CK("apb:uart3", NULL, &clk_uart3), |
101 | INIT_CK(NULL, "pll1", &clk_pll1), | 136 | INIT_CK(NULL, "pll1", &clk_pll1), |
102 | INIT_CK(NULL, "fclk", &clk_f), | 137 | INIT_CK(NULL, "fclk", &clk_f), |
103 | INIT_CK(NULL, "hclk", &clk_h), | 138 | INIT_CK(NULL, "hclk", &clk_h), |
@@ -125,6 +160,8 @@ int clk_enable(struct clk *clk) | |||
125 | u32 value; | 160 | u32 value; |
126 | 161 | ||
127 | value = __raw_readl(clk->enable_reg); | 162 | value = __raw_readl(clk->enable_reg); |
163 | if (clk->sw_locked) | ||
164 | __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK); | ||
128 | __raw_writel(value | clk->enable_mask, clk->enable_reg); | 165 | __raw_writel(value | clk->enable_mask, clk->enable_reg); |
129 | } | 166 | } |
130 | 167 | ||
@@ -138,13 +175,29 @@ void clk_disable(struct clk *clk) | |||
138 | u32 value; | 175 | u32 value; |
139 | 176 | ||
140 | value = __raw_readl(clk->enable_reg); | 177 | value = __raw_readl(clk->enable_reg); |
178 | if (clk->sw_locked) | ||
179 | __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK); | ||
141 | __raw_writel(value & ~clk->enable_mask, clk->enable_reg); | 180 | __raw_writel(value & ~clk->enable_mask, clk->enable_reg); |
142 | } | 181 | } |
143 | } | 182 | } |
144 | EXPORT_SYMBOL(clk_disable); | 183 | EXPORT_SYMBOL(clk_disable); |
145 | 184 | ||
185 | static unsigned long get_uart_rate(struct clk *clk) | ||
186 | { | ||
187 | u32 value; | ||
188 | |||
189 | value = __raw_readl(EP93XX_SYSCON_CLOCK_CONTROL); | ||
190 | if (value & EP93XX_SYSCON_CLOCK_UARTBAUD) | ||
191 | return EP93XX_EXT_CLK_RATE; | ||
192 | else | ||
193 | return EP93XX_EXT_CLK_RATE / 2; | ||
194 | } | ||
195 | |||
146 | unsigned long clk_get_rate(struct clk *clk) | 196 | unsigned long clk_get_rate(struct clk *clk) |
147 | { | 197 | { |
198 | if (clk->get_rate) | ||
199 | return clk->get_rate(clk); | ||
200 | |||
148 | return clk->rate; | 201 | return clk->rate; |
149 | } | 202 | } |
150 | EXPORT_SYMBOL(clk_get_rate); | 203 | EXPORT_SYMBOL(clk_get_rate); |
@@ -162,7 +215,7 @@ static unsigned long calc_pll_rate(u32 config_word) | |||
162 | unsigned long long rate; | 215 | unsigned long long rate; |
163 | int i; | 216 | int i; |
164 | 217 | ||
165 | rate = 14745600; | 218 | rate = EP93XX_EXT_CLK_RATE; |
166 | rate *= ((config_word >> 11) & 0x1f) + 1; /* X1FBD */ | 219 | rate *= ((config_word >> 11) & 0x1f) + 1; /* X1FBD */ |
167 | rate *= ((config_word >> 5) & 0x3f) + 1; /* X2FBD */ | 220 | rate *= ((config_word >> 5) & 0x3f) + 1; /* X2FBD */ |
168 | do_div(rate, (config_word & 0x1f) + 1); /* X2IPD */ | 221 | do_div(rate, (config_word & 0x1f) + 1); /* X2IPD */ |
@@ -195,7 +248,7 @@ static int __init ep93xx_clock_init(void) | |||
195 | 248 | ||
196 | value = __raw_readl(EP93XX_SYSCON_CLOCK_SET1); | 249 | value = __raw_readl(EP93XX_SYSCON_CLOCK_SET1); |
197 | if (!(value & 0x00800000)) { /* PLL1 bypassed? */ | 250 | if (!(value & 0x00800000)) { /* PLL1 bypassed? */ |
198 | clk_pll1.rate = 14745600; | 251 | clk_pll1.rate = EP93XX_EXT_CLK_RATE; |
199 | } else { | 252 | } else { |
200 | clk_pll1.rate = calc_pll_rate(value); | 253 | clk_pll1.rate = calc_pll_rate(value); |
201 | } | 254 | } |
@@ -206,7 +259,7 @@ static int __init ep93xx_clock_init(void) | |||
206 | 259 | ||
207 | value = __raw_readl(EP93XX_SYSCON_CLOCK_SET2); | 260 | value = __raw_readl(EP93XX_SYSCON_CLOCK_SET2); |
208 | if (!(value & 0x00080000)) { /* PLL2 bypassed? */ | 261 | if (!(value & 0x00080000)) { /* PLL2 bypassed? */ |
209 | clk_pll2.rate = 14745600; | 262 | clk_pll2.rate = EP93XX_EXT_CLK_RATE; |
210 | } else if (value & 0x00040000) { /* PLL2 enabled? */ | 263 | } else if (value & 0x00040000) { /* PLL2 enabled? */ |
211 | clk_pll2.rate = calc_pll_rate(value); | 264 | clk_pll2.rate = calc_pll_rate(value); |
212 | } else { | 265 | } else { |
diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h index f66be12b856e..1732de7629a5 100644 --- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h +++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h | |||
@@ -159,7 +159,10 @@ | |||
159 | #define EP93XX_SYSCON_CLOCK_SET1 EP93XX_SYSCON_REG(0x20) | 159 | #define EP93XX_SYSCON_CLOCK_SET1 EP93XX_SYSCON_REG(0x20) |
160 | #define EP93XX_SYSCON_CLOCK_SET2 EP93XX_SYSCON_REG(0x24) | 160 | #define EP93XX_SYSCON_CLOCK_SET2 EP93XX_SYSCON_REG(0x24) |
161 | #define EP93XX_SYSCON_DEVICE_CONFIG EP93XX_SYSCON_REG(0x80) | 161 | #define EP93XX_SYSCON_DEVICE_CONFIG EP93XX_SYSCON_REG(0x80) |
162 | #define EP93XX_SYSCON_DEVICE_CONFIG_CRUNCH_ENABLE 0x00800000 | 162 | #define EP93XX_SYSCON_DEVICE_CONFIG_U3EN (1<<24) |
163 | #define EP93XX_SYSCON_DEVICE_CONFIG_CRUNCH_ENABLE (1<<23) | ||
164 | #define EP93XX_SYSCON_DEVICE_CONFIG_U2EN (1<<20) | ||
165 | #define EP93XX_SYSCON_DEVICE_CONFIG_U1EN (1<<18) | ||
163 | #define EP93XX_SYSCON_SWLOCK EP93XX_SYSCON_REG(0xc0) | 166 | #define EP93XX_SYSCON_SWLOCK EP93XX_SYSCON_REG(0xc0) |
164 | 167 | ||
165 | #define EP93XX_WATCHDOG_BASE (EP93XX_APB_VIRT_BASE + 0x00140000) | 168 | #define EP93XX_WATCHDOG_BASE (EP93XX_APB_VIRT_BASE + 0x00140000) |
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c index 6f8872913073..a0f60e55da6a 100644 --- a/arch/arm/mach-integrator/core.c +++ b/arch/arm/mach-integrator/core.c | |||
@@ -121,7 +121,7 @@ static struct clk uartclk = { | |||
121 | .rate = 14745600, | 121 | .rate = 14745600, |
122 | }; | 122 | }; |
123 | 123 | ||
124 | static struct clk_lookup lookups[] __initdata = { | 124 | static struct clk_lookup lookups[] = { |
125 | { /* UART0 */ | 125 | { /* UART0 */ |
126 | .dev_id = "mb:16", | 126 | .dev_id = "mb:16", |
127 | .clk = &uartclk, | 127 | .clk = &uartclk, |
diff --git a/arch/arm/mach-l7200/include/mach/sys-clock.h b/arch/arm/mach-l7200/include/mach/sys-clock.h index 2d7722be60ea..e9729a35751d 100644 --- a/arch/arm/mach-l7200/include/mach/sys-clock.h +++ b/arch/arm/mach-l7200/include/mach/sys-clock.h | |||
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | /* IO_START and IO_BASE are defined in hardware.h */ | 19 | /* IO_START and IO_BASE are defined in hardware.h */ |
20 | 20 | ||
21 | #define SYS_CLOCK_START (IO_START + SYS_CLCOK_OFF) /* Physical address */ | 21 | #define SYS_CLOCK_START (IO_START + SYS_CLOCK_OFF) /* Physical address */ |
22 | #define SYS_CLOCK_BASE (IO_BASE + SYS_CLOCK_OFF) /* Virtual address */ | 22 | #define SYS_CLOCK_BASE (IO_BASE + SYS_CLOCK_OFF) /* Virtual address */ |
23 | 23 | ||
24 | /* Define the interface to the SYS_CLOCK */ | 24 | /* Define the interface to the SYS_CLOCK */ |
diff --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c index efc59c49341b..e4cef333e291 100644 --- a/arch/arm/mach-omap2/clock24xx.c +++ b/arch/arm/mach-omap2/clock24xx.c | |||
@@ -103,10 +103,10 @@ static struct omap_clk omap24xx_clks[] = { | |||
103 | CLK(NULL, "mdm_ick", &mdm_ick, CK_243X), | 103 | CLK(NULL, "mdm_ick", &mdm_ick, CK_243X), |
104 | CLK(NULL, "mdm_osc_ck", &mdm_osc_ck, CK_243X), | 104 | CLK(NULL, "mdm_osc_ck", &mdm_osc_ck, CK_243X), |
105 | /* DSS domain clocks */ | 105 | /* DSS domain clocks */ |
106 | CLK(NULL, "dss_ick", &dss_ick, CK_243X | CK_242X), | 106 | CLK("omapfb", "ick", &dss_ick, CK_243X | CK_242X), |
107 | CLK(NULL, "dss1_fck", &dss1_fck, CK_243X | CK_242X), | 107 | CLK("omapfb", "dss1_fck", &dss1_fck, CK_243X | CK_242X), |
108 | CLK(NULL, "dss2_fck", &dss2_fck, CK_243X | CK_242X), | 108 | CLK("omapfb", "dss2_fck", &dss2_fck, CK_243X | CK_242X), |
109 | CLK(NULL, "dss_54m_fck", &dss_54m_fck, CK_243X | CK_242X), | 109 | CLK("omapfb", "tv_fck", &dss_54m_fck, CK_243X | CK_242X), |
110 | /* L3 domain clocks */ | 110 | /* L3 domain clocks */ |
111 | CLK(NULL, "core_l3_ck", &core_l3_ck, CK_243X | CK_242X), | 111 | CLK(NULL, "core_l3_ck", &core_l3_ck, CK_243X | CK_242X), |
112 | CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_243X | CK_242X), | 112 | CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_243X | CK_242X), |
@@ -206,7 +206,7 @@ static struct omap_clk omap24xx_clks[] = { | |||
206 | CLK(NULL, "aes_ick", &aes_ick, CK_243X | CK_242X), | 206 | CLK(NULL, "aes_ick", &aes_ick, CK_243X | CK_242X), |
207 | CLK(NULL, "pka_ick", &pka_ick, CK_243X | CK_242X), | 207 | CLK(NULL, "pka_ick", &pka_ick, CK_243X | CK_242X), |
208 | CLK(NULL, "usb_fck", &usb_fck, CK_243X | CK_242X), | 208 | CLK(NULL, "usb_fck", &usb_fck, CK_243X | CK_242X), |
209 | CLK(NULL, "usbhs_ick", &usbhs_ick, CK_243X), | 209 | CLK("musb_hdrc", "ick", &usbhs_ick, CK_243X), |
210 | CLK("mmci-omap-hs.0", "ick", &mmchs1_ick, CK_243X), | 210 | CLK("mmci-omap-hs.0", "ick", &mmchs1_ick, CK_243X), |
211 | CLK("mmci-omap-hs.0", "fck", &mmchs1_fck, CK_243X), | 211 | CLK("mmci-omap-hs.0", "fck", &mmchs1_fck, CK_243X), |
212 | CLK("mmci-omap-hs.1", "ick", &mmchs2_ick, CK_243X), | 212 | CLK("mmci-omap-hs.1", "ick", &mmchs2_ick, CK_243X), |
diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c index 0a14dca31e30..ba05aa42bd8e 100644 --- a/arch/arm/mach-omap2/clock34xx.c +++ b/arch/arm/mach-omap2/clock34xx.c | |||
@@ -157,7 +157,7 @@ static struct omap_clk omap34xx_clks[] = { | |||
157 | CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck, CK_343X), | 157 | CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck, CK_343X), |
158 | CLK(NULL, "ssi_sst_fck", &ssi_sst_fck, CK_343X), | 158 | CLK(NULL, "ssi_sst_fck", &ssi_sst_fck, CK_343X), |
159 | CLK(NULL, "core_l3_ick", &core_l3_ick, CK_343X), | 159 | CLK(NULL, "core_l3_ick", &core_l3_ick, CK_343X), |
160 | CLK(NULL, "hsotgusb_ick", &hsotgusb_ick, CK_343X), | 160 | CLK("musb_hdrc", "ick", &hsotgusb_ick, CK_343X), |
161 | CLK(NULL, "sdrc_ick", &sdrc_ick, CK_343X), | 161 | CLK(NULL, "sdrc_ick", &sdrc_ick, CK_343X), |
162 | CLK(NULL, "gpmc_fck", &gpmc_fck, CK_343X), | 162 | CLK(NULL, "gpmc_fck", &gpmc_fck, CK_343X), |
163 | CLK(NULL, "security_l3_ick", &security_l3_ick, CK_343X), | 163 | CLK(NULL, "security_l3_ick", &security_l3_ick, CK_343X), |
@@ -197,11 +197,11 @@ static struct omap_clk omap34xx_clks[] = { | |||
197 | CLK("omap_rng", "ick", &rng_ick, CK_343X), | 197 | CLK("omap_rng", "ick", &rng_ick, CK_343X), |
198 | CLK(NULL, "sha11_ick", &sha11_ick, CK_343X), | 198 | CLK(NULL, "sha11_ick", &sha11_ick, CK_343X), |
199 | CLK(NULL, "des1_ick", &des1_ick, CK_343X), | 199 | CLK(NULL, "des1_ick", &des1_ick, CK_343X), |
200 | CLK(NULL, "dss1_alwon_fck", &dss1_alwon_fck, CK_343X), | 200 | CLK("omapfb", "dss1_fck", &dss1_alwon_fck, CK_343X), |
201 | CLK(NULL, "dss_tv_fck", &dss_tv_fck, CK_343X), | 201 | CLK("omapfb", "tv_fck", &dss_tv_fck, CK_343X), |
202 | CLK(NULL, "dss_96m_fck", &dss_96m_fck, CK_343X), | 202 | CLK("omapfb", "video_fck", &dss_96m_fck, CK_343X), |
203 | CLK(NULL, "dss2_alwon_fck", &dss2_alwon_fck, CK_343X), | 203 | CLK("omapfb", "dss2_fck", &dss2_alwon_fck, CK_343X), |
204 | CLK(NULL, "dss_ick", &dss_ick, CK_343X), | 204 | CLK("omapfb", "ick", &dss_ick, CK_343X), |
205 | CLK(NULL, "cam_mclk", &cam_mclk, CK_343X), | 205 | CLK(NULL, "cam_mclk", &cam_mclk, CK_343X), |
206 | CLK(NULL, "cam_ick", &cam_ick, CK_343X), | 206 | CLK(NULL, "cam_ick", &cam_ick, CK_343X), |
207 | CLK(NULL, "csi2_96m_fck", &csi2_96m_fck, CK_343X), | 207 | CLK(NULL, "csi2_96m_fck", &csi2_96m_fck, CK_343X), |
diff --git a/arch/arm/mach-omap2/clock34xx.h b/arch/arm/mach-omap2/clock34xx.h index 6763b8f73028..017a30e9aa1d 100644 --- a/arch/arm/mach-omap2/clock34xx.h +++ b/arch/arm/mach-omap2/clock34xx.h | |||
@@ -2182,7 +2182,7 @@ static struct clk wkup_32k_fck = { | |||
2182 | 2182 | ||
2183 | static struct clk gpio1_dbck = { | 2183 | static struct clk gpio1_dbck = { |
2184 | .name = "gpio1_dbck", | 2184 | .name = "gpio1_dbck", |
2185 | .ops = &clkops_omap2_dflt_wait, | 2185 | .ops = &clkops_omap2_dflt, |
2186 | .parent = &wkup_32k_fck, | 2186 | .parent = &wkup_32k_fck, |
2187 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN), | 2187 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN), |
2188 | .enable_bit = OMAP3430_EN_GPIO1_SHIFT, | 2188 | .enable_bit = OMAP3430_EN_GPIO1_SHIFT, |
@@ -2427,7 +2427,7 @@ static struct clk per_32k_alwon_fck = { | |||
2427 | 2427 | ||
2428 | static struct clk gpio6_dbck = { | 2428 | static struct clk gpio6_dbck = { |
2429 | .name = "gpio6_dbck", | 2429 | .name = "gpio6_dbck", |
2430 | .ops = &clkops_omap2_dflt_wait, | 2430 | .ops = &clkops_omap2_dflt, |
2431 | .parent = &per_32k_alwon_fck, | 2431 | .parent = &per_32k_alwon_fck, |
2432 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), | 2432 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), |
2433 | .enable_bit = OMAP3430_EN_GPIO6_SHIFT, | 2433 | .enable_bit = OMAP3430_EN_GPIO6_SHIFT, |
@@ -2437,7 +2437,7 @@ static struct clk gpio6_dbck = { | |||
2437 | 2437 | ||
2438 | static struct clk gpio5_dbck = { | 2438 | static struct clk gpio5_dbck = { |
2439 | .name = "gpio5_dbck", | 2439 | .name = "gpio5_dbck", |
2440 | .ops = &clkops_omap2_dflt_wait, | 2440 | .ops = &clkops_omap2_dflt, |
2441 | .parent = &per_32k_alwon_fck, | 2441 | .parent = &per_32k_alwon_fck, |
2442 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), | 2442 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), |
2443 | .enable_bit = OMAP3430_EN_GPIO5_SHIFT, | 2443 | .enable_bit = OMAP3430_EN_GPIO5_SHIFT, |
@@ -2447,7 +2447,7 @@ static struct clk gpio5_dbck = { | |||
2447 | 2447 | ||
2448 | static struct clk gpio4_dbck = { | 2448 | static struct clk gpio4_dbck = { |
2449 | .name = "gpio4_dbck", | 2449 | .name = "gpio4_dbck", |
2450 | .ops = &clkops_omap2_dflt_wait, | 2450 | .ops = &clkops_omap2_dflt, |
2451 | .parent = &per_32k_alwon_fck, | 2451 | .parent = &per_32k_alwon_fck, |
2452 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), | 2452 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), |
2453 | .enable_bit = OMAP3430_EN_GPIO4_SHIFT, | 2453 | .enable_bit = OMAP3430_EN_GPIO4_SHIFT, |
@@ -2457,7 +2457,7 @@ static struct clk gpio4_dbck = { | |||
2457 | 2457 | ||
2458 | static struct clk gpio3_dbck = { | 2458 | static struct clk gpio3_dbck = { |
2459 | .name = "gpio3_dbck", | 2459 | .name = "gpio3_dbck", |
2460 | .ops = &clkops_omap2_dflt_wait, | 2460 | .ops = &clkops_omap2_dflt, |
2461 | .parent = &per_32k_alwon_fck, | 2461 | .parent = &per_32k_alwon_fck, |
2462 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), | 2462 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), |
2463 | .enable_bit = OMAP3430_EN_GPIO3_SHIFT, | 2463 | .enable_bit = OMAP3430_EN_GPIO3_SHIFT, |
@@ -2467,7 +2467,7 @@ static struct clk gpio3_dbck = { | |||
2467 | 2467 | ||
2468 | static struct clk gpio2_dbck = { | 2468 | static struct clk gpio2_dbck = { |
2469 | .name = "gpio2_dbck", | 2469 | .name = "gpio2_dbck", |
2470 | .ops = &clkops_omap2_dflt_wait, | 2470 | .ops = &clkops_omap2_dflt, |
2471 | .parent = &per_32k_alwon_fck, | 2471 | .parent = &per_32k_alwon_fck, |
2472 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), | 2472 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), |
2473 | .enable_bit = OMAP3430_EN_GPIO2_SHIFT, | 2473 | .enable_bit = OMAP3430_EN_GPIO2_SHIFT, |
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 496983ade97e..894cc355818a 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -354,10 +354,12 @@ static void omap_init_mcspi(void) | |||
354 | platform_device_register(&omap2_mcspi1); | 354 | platform_device_register(&omap2_mcspi1); |
355 | platform_device_register(&omap2_mcspi2); | 355 | platform_device_register(&omap2_mcspi2); |
356 | #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) | 356 | #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) |
357 | platform_device_register(&omap2_mcspi3); | 357 | if (cpu_is_omap2430() || cpu_is_omap343x()) |
358 | platform_device_register(&omap2_mcspi3); | ||
358 | #endif | 359 | #endif |
359 | #ifdef CONFIG_ARCH_OMAP3 | 360 | #ifdef CONFIG_ARCH_OMAP3 |
360 | platform_device_register(&omap2_mcspi4); | 361 | if (cpu_is_omap343x()) |
362 | platform_device_register(&omap2_mcspi4); | ||
361 | #endif | 363 | #endif |
362 | } | 364 | } |
363 | 365 | ||
diff --git a/arch/arm/mach-omap2/prm-regbits-34xx.h b/arch/arm/mach-omap2/prm-regbits-34xx.h index c6a7940f4287..9fd03a2ec95c 100644 --- a/arch/arm/mach-omap2/prm-regbits-34xx.h +++ b/arch/arm/mach-omap2/prm-regbits-34xx.h | |||
@@ -409,7 +409,7 @@ | |||
409 | /* PM_PREPWSTST_CAM specific bits */ | 409 | /* PM_PREPWSTST_CAM specific bits */ |
410 | 410 | ||
411 | /* PM_PWSTCTRL_USBHOST specific bits */ | 411 | /* PM_PWSTCTRL_USBHOST specific bits */ |
412 | #define OMAP3430ES2_SAVEANDRESTORE_SHIFT (1 << 4) | 412 | #define OMAP3430ES2_SAVEANDRESTORE_SHIFT 4 |
413 | 413 | ||
414 | /* RM_RSTST_PER specific bits */ | 414 | /* RM_RSTST_PER specific bits */ |
415 | 415 | ||
diff --git a/arch/arm/mach-omap2/usb-tusb6010.c b/arch/arm/mach-omap2/usb-tusb6010.c index 8df55f40f4c0..8622c24cd270 100644 --- a/arch/arm/mach-omap2/usb-tusb6010.c +++ b/arch/arm/mach-omap2/usb-tusb6010.c | |||
@@ -187,7 +187,7 @@ int tusb6010_platform_retime(unsigned is_refclk) | |||
187 | unsigned sysclk_ps; | 187 | unsigned sysclk_ps; |
188 | int status; | 188 | int status; |
189 | 189 | ||
190 | if (!refclk_psec || sysclk_ps == 0) | 190 | if (!refclk_psec || fclk_ps == 0) |
191 | return -ENODEV; | 191 | return -ENODEV; |
192 | 192 | ||
193 | sysclk_ps = is_refclk ? refclk_psec : TUSB6010_OSCCLK_60; | 193 | sysclk_ps = is_refclk ? refclk_psec : TUSB6010_OSCCLK_60; |
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index 0e65344e9f53..dd031cc41847 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <mach/audio.h> | 46 | #include <mach/audio.h> |
47 | #include <mach/pxafb.h> | 47 | #include <mach/pxafb.h> |
48 | #include <mach/i2c.h> | 48 | #include <mach/i2c.h> |
49 | #include <mach/regs-uart.h> | ||
49 | #include <mach/viper.h> | 50 | #include <mach/viper.h> |
50 | 51 | ||
51 | #include <asm/setup.h> | 52 | #include <asm/setup.h> |
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 942e1a7eb9b2..076acbc50706 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -750,14 +750,6 @@ void __init realview_timer_init(unsigned int timer_irq) | |||
750 | { | 750 | { |
751 | u32 val; | 751 | u32 val; |
752 | 752 | ||
753 | #ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST | ||
754 | /* | ||
755 | * The dummy clock device has to be registered before the main device | ||
756 | * so that the latter will broadcast the clock events | ||
757 | */ | ||
758 | local_timer_setup(); | ||
759 | #endif | ||
760 | |||
761 | /* | 753 | /* |
762 | * set clock frequency: | 754 | * set clock frequency: |
763 | * REALVIEW_REFCLK is 32KHz | 755 | * REALVIEW_REFCLK is 32KHz |
diff --git a/arch/arm/mach-realview/include/mach/smp.h b/arch/arm/mach-realview/include/mach/smp.h index 515819efd046..dd53892d44a7 100644 --- a/arch/arm/mach-realview/include/mach/smp.h +++ b/arch/arm/mach-realview/include/mach/smp.h | |||
@@ -15,16 +15,9 @@ | |||
15 | /* | 15 | /* |
16 | * We use IRQ1 as the IPI | 16 | * We use IRQ1 as the IPI |
17 | */ | 17 | */ |
18 | static inline void smp_cross_call(cpumask_t callmap) | 18 | static inline void smp_cross_call(const struct cpumask *mask) |
19 | { | ||
20 | gic_raise_softirq(callmap, 1); | ||
21 | } | ||
22 | |||
23 | /* | ||
24 | * Do nothing on MPcore. | ||
25 | */ | ||
26 | static inline void smp_cross_call_done(cpumask_t callmap) | ||
27 | { | 19 | { |
20 | gic_raise_softirq(mask, 1); | ||
28 | } | 21 | } |
29 | 22 | ||
30 | #endif | 23 | #endif |
diff --git a/arch/arm/mach-realview/localtimer.c b/arch/arm/mach-realview/localtimer.c index d0d39adf6407..1c01d13460f0 100644 --- a/arch/arm/mach-realview/localtimer.c +++ b/arch/arm/mach-realview/localtimer.c | |||
@@ -189,8 +189,10 @@ void __cpuinit local_timer_setup(void) | |||
189 | struct clock_event_device *clk = &per_cpu(local_clockevent, cpu); | 189 | struct clock_event_device *clk = &per_cpu(local_clockevent, cpu); |
190 | 190 | ||
191 | clk->name = "dummy_timer"; | 191 | clk->name = "dummy_timer"; |
192 | clk->features = CLOCK_EVT_FEAT_DUMMY; | 192 | clk->features = CLOCK_EVT_FEAT_ONESHOT | |
193 | clk->rating = 200; | 193 | CLOCK_EVT_FEAT_PERIODIC | |
194 | CLOCK_EVT_FEAT_DUMMY; | ||
195 | clk->rating = 400; | ||
194 | clk->mult = 1; | 196 | clk->mult = 1; |
195 | clk->set_mode = dummy_timer_set_mode; | 197 | clk->set_mode = dummy_timer_set_mode; |
196 | clk->broadcast = smp_timer_broadcast; | 198 | clk->broadcast = smp_timer_broadcast; |
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c index ea3c75595fa9..30a9c68591f6 100644 --- a/arch/arm/mach-realview/platsmp.c +++ b/arch/arm/mach-realview/platsmp.c | |||
@@ -78,13 +78,6 @@ void __cpuinit platform_secondary_init(unsigned int cpu) | |||
78 | trace_hardirqs_off(); | 78 | trace_hardirqs_off(); |
79 | 79 | ||
80 | /* | 80 | /* |
81 | * the primary core may have used a "cross call" soft interrupt | ||
82 | * to get this processor out of WFI in the BootMonitor - make | ||
83 | * sure that we are no longer being sent this soft interrupt | ||
84 | */ | ||
85 | smp_cross_call_done(cpumask_of_cpu(cpu)); | ||
86 | |||
87 | /* | ||
88 | * if any interrupts are already enabled for the primary | 81 | * if any interrupts are already enabled for the primary |
89 | * core (e.g. timer irq), then they will not have been enabled | 82 | * core (e.g. timer irq), then they will not have been enabled |
90 | * for us: do so | 83 | * for us: do so |
@@ -136,7 +129,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
136 | * Use smp_cross_call() for this, since there's little | 129 | * Use smp_cross_call() for this, since there's little |
137 | * point duplicating the code here | 130 | * point duplicating the code here |
138 | */ | 131 | */ |
139 | smp_cross_call(cpumask_of_cpu(cpu)); | 132 | smp_cross_call(cpumask_of(cpu)); |
140 | 133 | ||
141 | timeout = jiffies + (1 * HZ); | 134 | timeout = jiffies + (1 * HZ); |
142 | while (time_before(jiffies, timeout)) { | 135 | while (time_before(jiffies, timeout)) { |
@@ -224,11 +217,9 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
224 | if (max_cpus > ncores) | 217 | if (max_cpus > ncores) |
225 | max_cpus = ncores; | 218 | max_cpus = ncores; |
226 | 219 | ||
227 | #ifdef CONFIG_LOCAL_TIMERS | 220 | #if defined(CONFIG_LOCAL_TIMERS) || defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) |
228 | /* | 221 | /* |
229 | * Enable the local timer for primary CPU. If the device is | 222 | * Enable the local timer or broadcast device for the boot CPU. |
230 | * dummy (!CONFIG_LOCAL_TIMERS), it was already registers in | ||
231 | * realview_timer_init | ||
232 | */ | 223 | */ |
233 | local_timer_setup(); | 224 | local_timer_setup(); |
234 | #endif | 225 | #endif |
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index 4389c160f7d0..8637dea5e150 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c | |||
@@ -588,8 +588,6 @@ static void __init bast_map_io(void) | |||
588 | 588 | ||
589 | s3c_device_nand.dev.platform_data = &bast_nand_info; | 589 | s3c_device_nand.dev.platform_data = &bast_nand_info; |
590 | 590 | ||
591 | s3c_i2c0_set_platdata(&bast_i2c_info); | ||
592 | |||
593 | s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc)); | 591 | s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc)); |
594 | s3c24xx_init_clocks(0); | 592 | s3c24xx_init_clocks(0); |
595 | s3c24xx_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs)); | 593 | s3c24xx_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs)); |
@@ -602,6 +600,7 @@ static void __init bast_init(void) | |||
602 | sysdev_class_register(&bast_pm_sysclass); | 600 | sysdev_class_register(&bast_pm_sysclass); |
603 | sysdev_register(&bast_pm_sysdev); | 601 | sysdev_register(&bast_pm_sysdev); |
604 | 602 | ||
603 | s3c_i2c0_set_platdata(&bast_i2c_info); | ||
605 | s3c24xx_fb_set_platdata(&bast_fb_info); | 604 | s3c24xx_fb_set_platdata(&bast_fb_info); |
606 | platform_add_devices(bast_devices, ARRAY_SIZE(bast_devices)); | 605 | platform_add_devices(bast_devices, ARRAY_SIZE(bast_devices)); |
607 | 606 | ||
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 1f929c391af7..b3bebcc5623b 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -413,7 +413,7 @@ static struct clk ref24_clk = { | |||
413 | .rate = 24000000, | 413 | .rate = 24000000, |
414 | }; | 414 | }; |
415 | 415 | ||
416 | static struct clk_lookup lookups[] __initdata = { | 416 | static struct clk_lookup lookups[] = { |
417 | { /* UART0 */ | 417 | { /* UART0 */ |
418 | .dev_id = "dev:f1", | 418 | .dev_id = "dev:f1", |
419 | .clk = &ref24_clk, | 419 | .clk = &ref24_clk, |
diff --git a/arch/arm/nwfpe/fpa11.h b/arch/arm/nwfpe/fpa11.h index 386cbd13eaf4..d3a6f9298e9e 100644 --- a/arch/arm/nwfpe/fpa11.h +++ b/arch/arm/nwfpe/fpa11.h | |||
@@ -114,4 +114,8 @@ extern unsigned int SingleCPDO(struct roundingData *roundData, | |||
114 | extern unsigned int DoubleCPDO(struct roundingData *roundData, | 114 | extern unsigned int DoubleCPDO(struct roundingData *roundData, |
115 | const unsigned int opcode, FPREG * rFd); | 115 | const unsigned int opcode, FPREG * rFd); |
116 | 116 | ||
117 | /* extneded_cpdo.c */ | ||
118 | extern unsigned int ExtendedCPDO(struct roundingData *roundData, | ||
119 | const unsigned int opcode, FPREG * rFd); | ||
120 | |||
117 | #endif | 121 | #endif |
diff --git a/arch/arm/nwfpe/fpa11_cprt.c b/arch/arm/nwfpe/fpa11_cprt.c index 9843dc533047..31c4eeec18b0 100644 --- a/arch/arm/nwfpe/fpa11_cprt.c +++ b/arch/arm/nwfpe/fpa11_cprt.c | |||
@@ -27,10 +27,6 @@ | |||
27 | #include "fpmodule.inl" | 27 | #include "fpmodule.inl" |
28 | #include "softfloat.h" | 28 | #include "softfloat.h" |
29 | 29 | ||
30 | #ifdef CONFIG_FPE_NWFPE_XP | ||
31 | extern flag floatx80_is_nan(floatx80); | ||
32 | #endif | ||
33 | |||
34 | unsigned int PerformFLT(const unsigned int opcode); | 30 | unsigned int PerformFLT(const unsigned int opcode); |
35 | unsigned int PerformFIX(const unsigned int opcode); | 31 | unsigned int PerformFIX(const unsigned int opcode); |
36 | 32 | ||
diff --git a/arch/arm/nwfpe/softfloat.h b/arch/arm/nwfpe/softfloat.h index 260fe29d73f5..13e479c5da57 100644 --- a/arch/arm/nwfpe/softfloat.h +++ b/arch/arm/nwfpe/softfloat.h | |||
@@ -226,6 +226,8 @@ char floatx80_le_quiet( floatx80, floatx80 ); | |||
226 | char floatx80_lt_quiet( floatx80, floatx80 ); | 226 | char floatx80_lt_quiet( floatx80, floatx80 ); |
227 | char floatx80_is_signaling_nan( floatx80 ); | 227 | char floatx80_is_signaling_nan( floatx80 ); |
228 | 228 | ||
229 | extern flag floatx80_is_nan(floatx80); | ||
230 | |||
229 | #endif | 231 | #endif |
230 | 232 | ||
231 | static inline flag extractFloat32Sign(float32 a) | 233 | static inline flag extractFloat32Sign(float32 a) |
diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c index ce6b4baeedec..3746222bed10 100644 --- a/arch/arm/plat-omap/fb.c +++ b/arch/arm/plat-omap/fb.c | |||
@@ -206,9 +206,10 @@ void __init omapfb_reserve_sdram(void) | |||
206 | config_invalid = 1; | 206 | config_invalid = 1; |
207 | return; | 207 | return; |
208 | } | 208 | } |
209 | if (rg.paddr) | 209 | if (rg.paddr) { |
210 | reserve_bootmem(rg.paddr, rg.size, BOOTMEM_DEFAULT); | 210 | reserve_bootmem(rg.paddr, rg.size, BOOTMEM_DEFAULT); |
211 | reserved += rg.size; | 211 | reserved += rg.size; |
212 | } | ||
212 | omapfb_config.mem_desc.region[i] = rg; | 213 | omapfb_config.mem_desc.region[i] = rg; |
213 | configured_regions++; | 214 | configured_regions++; |
214 | } | 215 | } |
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 17d7afe42b83..ee0b21f5b094 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -307,7 +307,7 @@ static inline int gpio_valid(int gpio) | |||
307 | return 0; | 307 | return 0; |
308 | if (cpu_is_omap24xx() && gpio < 128) | 308 | if (cpu_is_omap24xx() && gpio < 128) |
309 | return 0; | 309 | return 0; |
310 | if (cpu_is_omap34xx() && gpio < 160) | 310 | if (cpu_is_omap34xx() && gpio < 192) |
311 | return 0; | 311 | return 0; |
312 | return -1; | 312 | return -1; |
313 | } | 313 | } |
diff --git a/arch/arm/plat-s3c/clock.c b/arch/arm/plat-s3c/clock.c index b6be76e2fe51..4d01ef1a25dd 100644 --- a/arch/arm/plat-s3c/clock.c +++ b/arch/arm/plat-s3c/clock.c | |||
@@ -306,8 +306,6 @@ struct clk s3c24xx_uclk = { | |||
306 | 306 | ||
307 | int s3c24xx_register_clock(struct clk *clk) | 307 | int s3c24xx_register_clock(struct clk *clk) |
308 | { | 308 | { |
309 | clk->owner = THIS_MODULE; | ||
310 | |||
311 | if (clk->enable == NULL) | 309 | if (clk->enable == NULL) |
312 | clk->enable = clk_null_enable; | 310 | clk->enable = clk_null_enable; |
313 | 311 | ||
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c index aee2aeb46c60..07326f632361 100644 --- a/arch/arm/plat-s3c24xx/dma.c +++ b/arch/arm/plat-s3c24xx/dma.c | |||
@@ -1235,7 +1235,7 @@ int s3c2410_dma_getposition(unsigned int channel, dma_addr_t *src, dma_addr_t *d | |||
1235 | 1235 | ||
1236 | EXPORT_SYMBOL(s3c2410_dma_getposition); | 1236 | EXPORT_SYMBOL(s3c2410_dma_getposition); |
1237 | 1237 | ||
1238 | static struct s3c2410_dma_chan *to_dma_chan(struct sys_device *dev) | 1238 | static inline struct s3c2410_dma_chan *to_dma_chan(struct sys_device *dev) |
1239 | { | 1239 | { |
1240 | return container_of(dev, struct s3c2410_dma_chan, dev); | 1240 | return container_of(dev, struct s3c2410_dma_chan, dev); |
1241 | } | 1241 | } |
diff --git a/arch/arm/plat-s3c64xx/gpiolib.c b/arch/arm/plat-s3c64xx/gpiolib.c index ee9188add8fb..78ee52cffc9e 100644 --- a/arch/arm/plat-s3c64xx/gpiolib.c +++ b/arch/arm/plat-s3c64xx/gpiolib.c | |||
@@ -57,7 +57,7 @@ | |||
57 | #if 1 | 57 | #if 1 |
58 | #define gpio_dbg(x...) do { } while(0) | 58 | #define gpio_dbg(x...) do { } while(0) |
59 | #else | 59 | #else |
60 | #define gpio_dbg(x...) printk(KERN_DEBUG ## x) | 60 | #define gpio_dbg(x...) printk(KERN_DEBUG x) |
61 | #endif | 61 | #endif |
62 | 62 | ||
63 | /* The s3c64xx_gpiolib_4bit routines are to control the gpio banks where | 63 | /* The s3c64xx_gpiolib_4bit routines are to control the gpio banks where |
diff --git a/arch/arm/plat-s3c64xx/include/plat/gpio-bank-h.h b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-h.h index 81549516572f..2ba1767512d7 100644 --- a/arch/arm/plat-s3c64xx/include/plat/gpio-bank-h.h +++ b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-h.h | |||
@@ -61,14 +61,14 @@ | |||
61 | #define S3C64XX_GPH7_ADDR_CF1 (0x06 << 28) | 61 | #define S3C64XX_GPH7_ADDR_CF1 (0x06 << 28) |
62 | #define S3C64XX_GPH7_EINT_G6_7 (0x07 << 28) | 62 | #define S3C64XX_GPH7_EINT_G6_7 (0x07 << 28) |
63 | 63 | ||
64 | #define S3C64XX_GPH8_MMC1_DATA6 (0x02 << 32) | 64 | #define S3C64XX_GPH8_MMC1_DATA6 (0x02 << 0) |
65 | #define S3C64XX_GPH8_MMC2_DATA2 (0x03 << 32) | 65 | #define S3C64XX_GPH8_MMC2_DATA2 (0x03 << 0) |
66 | #define S3C64XX_GPH8_I2S_V40_LRCLK (0x05 << 32) | 66 | #define S3C64XX_GPH8_I2S_V40_LRCLK (0x05 << 0) |
67 | #define S3C64XX_GPH8_ADDR_CF2 (0x06 << 32) | 67 | #define S3C64XX_GPH8_ADDR_CF2 (0x06 << 0) |
68 | #define S3C64XX_GPH8_EINT_G6_8 (0x07 << 32) | 68 | #define S3C64XX_GPH8_EINT_G6_8 (0x07 << 0) |
69 | |||
70 | #define S3C64XX_GPH9_MMC1_DATA7 (0x02 << 36) | ||
71 | #define S3C64XX_GPH9_MMC2_DATA3 (0x03 << 36) | ||
72 | #define S3C64XX_GPH9_I2S_V40_DI (0x05 << 36) | ||
73 | #define S3C64XX_GPH9_EINT_G6_9 (0x07 << 36) | ||
74 | 69 | ||
70 | #define S3C64XX_GPH9_OUTPUT (0x01 << 4) | ||
71 | #define S3C64XX_GPH9_MMC1_DATA7 (0x02 << 4) | ||
72 | #define S3C64XX_GPH9_MMC2_DATA3 (0x03 << 4) | ||
73 | #define S3C64XX_GPH9_I2S_V40_DI (0x05 << 4) | ||
74 | #define S3C64XX_GPH9_EINT_G6_9 (0x07 << 4) | ||
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 26947ab85260..c4cae9e6b802 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -473,12 +473,12 @@ endif | |||
473 | # Simplified: what IP22 does at 128MB+ in ksegN, IP28 does at 512MB+ in xkphys | 473 | # Simplified: what IP22 does at 128MB+ in ksegN, IP28 does at 512MB+ in xkphys |
474 | # | 474 | # |
475 | ifdef CONFIG_SGI_IP28 | 475 | ifdef CONFIG_SGI_IP28 |
476 | ifeq ($(call cc-option-yn,-mr10k-cache-barrier=1), n) | 476 | ifeq ($(call cc-option-yn,-mr10k-cache-barrier=store), n) |
477 | $(error gcc doesn't support needed option -mr10k-cache-barrier=1) | 477 | $(error gcc doesn't support needed option -mr10k-cache-barrier=store) |
478 | endif | 478 | endif |
479 | endif | 479 | endif |
480 | core-$(CONFIG_SGI_IP28) += arch/mips/sgi-ip22/ | 480 | core-$(CONFIG_SGI_IP28) += arch/mips/sgi-ip22/ |
481 | cflags-$(CONFIG_SGI_IP28) += -mr10k-cache-barrier=1 -I$(srctree)/arch/mips/include/asm/mach-ip28 | 481 | cflags-$(CONFIG_SGI_IP28) += -mr10k-cache-barrier=store -I$(srctree)/arch/mips/include/asm/mach-ip28 |
482 | load-$(CONFIG_SGI_IP28) += 0xa800000020004000 | 482 | load-$(CONFIG_SGI_IP28) += 0xa800000020004000 |
483 | 483 | ||
484 | # | 484 | # |
diff --git a/arch/mips/include/asm/uaccess.h b/arch/mips/include/asm/uaccess.h index 8de858f5449f..c2d53c18fd36 100644 --- a/arch/mips/include/asm/uaccess.h +++ b/arch/mips/include/asm/uaccess.h | |||
@@ -956,7 +956,7 @@ __clear_user(void __user *addr, __kernel_size_t size) | |||
956 | void __user * __cl_addr = (addr); \ | 956 | void __user * __cl_addr = (addr); \ |
957 | unsigned long __cl_size = (n); \ | 957 | unsigned long __cl_size = (n); \ |
958 | if (__cl_size && access_ok(VERIFY_WRITE, \ | 958 | if (__cl_size && access_ok(VERIFY_WRITE, \ |
959 | ((unsigned long)(__cl_addr)), __cl_size)) \ | 959 | __cl_addr, __cl_size)) \ |
960 | __cl_size = __clear_user(__cl_addr, __cl_size); \ | 960 | __cl_size = __clear_user(__cl_addr, __cl_size); \ |
961 | __cl_size; \ | 961 | __cl_size; \ |
962 | }) | 962 | }) |
diff --git a/arch/mips/mm/tlb-r3k.c b/arch/mips/mm/tlb-r3k.c index f0cf46adb978..1c0048a6f5cf 100644 --- a/arch/mips/mm/tlb-r3k.c +++ b/arch/mips/mm/tlb-r3k.c | |||
@@ -82,8 +82,7 @@ void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start, | |||
82 | int cpu = smp_processor_id(); | 82 | int cpu = smp_processor_id(); |
83 | 83 | ||
84 | if (cpu_context(cpu, mm) != 0) { | 84 | if (cpu_context(cpu, mm) != 0) { |
85 | unsigned long flags; | 85 | unsigned long size, flags; |
86 | int size; | ||
87 | 86 | ||
88 | #ifdef DEBUG_TLB | 87 | #ifdef DEBUG_TLB |
89 | printk("[tlbrange<%lu,0x%08lx,0x%08lx>]", | 88 | printk("[tlbrange<%lu,0x%08lx,0x%08lx>]", |
@@ -121,8 +120,7 @@ void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start, | |||
121 | 120 | ||
122 | void local_flush_tlb_kernel_range(unsigned long start, unsigned long end) | 121 | void local_flush_tlb_kernel_range(unsigned long start, unsigned long end) |
123 | { | 122 | { |
124 | unsigned long flags; | 123 | unsigned long size, flags; |
125 | int size; | ||
126 | 124 | ||
127 | #ifdef DEBUG_TLB | 125 | #ifdef DEBUG_TLB |
128 | printk("[tlbrange<%lu,0x%08lx,0x%08lx>]", start, end); | 126 | printk("[tlbrange<%lu,0x%08lx,0x%08lx>]", start, end); |
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c index 9619f66e531e..892be426787c 100644 --- a/arch/mips/mm/tlb-r4k.c +++ b/arch/mips/mm/tlb-r4k.c | |||
@@ -117,8 +117,7 @@ void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start, | |||
117 | int cpu = smp_processor_id(); | 117 | int cpu = smp_processor_id(); |
118 | 118 | ||
119 | if (cpu_context(cpu, mm) != 0) { | 119 | if (cpu_context(cpu, mm) != 0) { |
120 | unsigned long flags; | 120 | unsigned long size, flags; |
121 | int size; | ||
122 | 121 | ||
123 | ENTER_CRITICAL(flags); | 122 | ENTER_CRITICAL(flags); |
124 | size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT; | 123 | size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT; |
@@ -160,8 +159,7 @@ void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start, | |||
160 | 159 | ||
161 | void local_flush_tlb_kernel_range(unsigned long start, unsigned long end) | 160 | void local_flush_tlb_kernel_range(unsigned long start, unsigned long end) |
162 | { | 161 | { |
163 | unsigned long flags; | 162 | unsigned long size, flags; |
164 | int size; | ||
165 | 163 | ||
166 | ENTER_CRITICAL(flags); | 164 | ENTER_CRITICAL(flags); |
167 | size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT; | 165 | size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT; |
diff --git a/arch/mips/mm/tlb-r8k.c b/arch/mips/mm/tlb-r8k.c index 4f01a3be215c..4ec95cc2df2f 100644 --- a/arch/mips/mm/tlb-r8k.c +++ b/arch/mips/mm/tlb-r8k.c | |||
@@ -111,8 +111,7 @@ out_restore: | |||
111 | /* Usable for KV1 addresses only! */ | 111 | /* Usable for KV1 addresses only! */ |
112 | void local_flush_tlb_kernel_range(unsigned long start, unsigned long end) | 112 | void local_flush_tlb_kernel_range(unsigned long start, unsigned long end) |
113 | { | 113 | { |
114 | unsigned long flags; | 114 | unsigned long size, flags; |
115 | int size; | ||
116 | 115 | ||
117 | size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT; | 116 | size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT; |
118 | size = (size + 1) >> 1; | 117 | size = (size + 1) >> 1; |
diff --git a/arch/mips/sgi-ip22/ip22-reset.c b/arch/mips/sgi-ip22/ip22-reset.c index 4ad5c3393fd3..45b6694c2079 100644 --- a/arch/mips/sgi-ip22/ip22-reset.c +++ b/arch/mips/sgi-ip22/ip22-reset.c | |||
@@ -148,7 +148,7 @@ static irqreturn_t panel_int(int irq, void *dev_id) | |||
148 | 148 | ||
149 | if (sgint->istat1 & SGINT_ISTAT1_PWR) { | 149 | if (sgint->istat1 & SGINT_ISTAT1_PWR) { |
150 | /* Wait until interrupt goes away */ | 150 | /* Wait until interrupt goes away */ |
151 | disable_irq(SGI_PANEL_IRQ); | 151 | disable_irq_nosync(SGI_PANEL_IRQ); |
152 | init_timer(&debounce_timer); | 152 | init_timer(&debounce_timer); |
153 | debounce_timer.function = debounce; | 153 | debounce_timer.function = debounce; |
154 | debounce_timer.expires = jiffies + 5; | 154 | debounce_timer.expires = jiffies + 5; |
diff --git a/arch/mips/sgi-ip32/ip32-reset.c b/arch/mips/sgi-ip32/ip32-reset.c index b6cab089561e..9b95d80ebc6e 100644 --- a/arch/mips/sgi-ip32/ip32-reset.c +++ b/arch/mips/sgi-ip32/ip32-reset.c | |||
@@ -53,7 +53,7 @@ static inline void ip32_machine_halt(void) | |||
53 | 53 | ||
54 | static void ip32_machine_power_off(void) | 54 | static void ip32_machine_power_off(void) |
55 | { | 55 | { |
56 | volatile unsigned char reg_a, xctrl_a, xctrl_b; | 56 | unsigned char reg_a, xctrl_a, xctrl_b; |
57 | 57 | ||
58 | disable_irq(MACEISA_RTC_IRQ); | 58 | disable_irq(MACEISA_RTC_IRQ); |
59 | reg_a = CMOS_READ(RTC_REG_A); | 59 | reg_a = CMOS_READ(RTC_REG_A); |
@@ -91,9 +91,10 @@ static void blink_timeout(unsigned long data) | |||
91 | 91 | ||
92 | static void debounce(unsigned long data) | 92 | static void debounce(unsigned long data) |
93 | { | 93 | { |
94 | volatile unsigned char reg_a, reg_c, xctrl_a; | 94 | unsigned char reg_a, reg_c, xctrl_a; |
95 | 95 | ||
96 | reg_c = CMOS_READ(RTC_INTR_FLAGS); | 96 | reg_c = CMOS_READ(RTC_INTR_FLAGS); |
97 | reg_a = CMOS_READ(RTC_REG_A); | ||
97 | CMOS_WRITE(reg_a | DS_REGA_DV0, RTC_REG_A); | 98 | CMOS_WRITE(reg_a | DS_REGA_DV0, RTC_REG_A); |
98 | wbflush(); | 99 | wbflush(); |
99 | xctrl_a = CMOS_READ(DS_B1_XCTRL4A); | 100 | xctrl_a = CMOS_READ(DS_B1_XCTRL4A); |
@@ -137,7 +138,7 @@ static inline void ip32_power_button(void) | |||
137 | 138 | ||
138 | static irqreturn_t ip32_rtc_int(int irq, void *dev_id) | 139 | static irqreturn_t ip32_rtc_int(int irq, void *dev_id) |
139 | { | 140 | { |
140 | volatile unsigned char reg_c; | 141 | unsigned char reg_c; |
141 | 142 | ||
142 | reg_c = CMOS_READ(RTC_INTR_FLAGS); | 143 | reg_c = CMOS_READ(RTC_INTR_FLAGS); |
143 | if (!(reg_c & RTC_IRQF)) { | 144 | if (!(reg_c & RTC_IRQF)) { |
@@ -145,7 +146,7 @@ static irqreturn_t ip32_rtc_int(int irq, void *dev_id) | |||
145 | "%s: RTC IRQ without RTC_IRQF\n", __func__); | 146 | "%s: RTC IRQ without RTC_IRQF\n", __func__); |
146 | } | 147 | } |
147 | /* Wait until interrupt goes away */ | 148 | /* Wait until interrupt goes away */ |
148 | disable_irq(MACEISA_RTC_IRQ); | 149 | disable_irq_nosync(MACEISA_RTC_IRQ); |
149 | init_timer(&debounce_timer); | 150 | init_timer(&debounce_timer); |
150 | debounce_timer.function = debounce; | 151 | debounce_timer.function = debounce; |
151 | debounce_timer.expires = jiffies + 50; | 152 | debounce_timer.expires = jiffies + 50; |
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c index 301855263b81..04296ffff8bf 100644 --- a/arch/powerpc/platforms/maple/pci.c +++ b/arch/powerpc/platforms/maple/pci.c | |||
@@ -592,3 +592,17 @@ int maple_pci_get_legacy_ide_irq(struct pci_dev *pdev, int channel) | |||
592 | } | 592 | } |
593 | return irq; | 593 | return irq; |
594 | } | 594 | } |
595 | |||
596 | static void __devinit quirk_ipr_msi(struct pci_dev *dev) | ||
597 | { | ||
598 | /* Something prevents MSIs from the IPR from working on Bimini, | ||
599 | * and the driver has no smarts to recover. So disable MSI | ||
600 | * on it for now. */ | ||
601 | |||
602 | if (machine_is(maple)) { | ||
603 | dev->no_msi = 1; | ||
604 | dev_info(&dev->dev, "Quirk disabled MSI\n"); | ||
605 | } | ||
606 | } | ||
607 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_OBSIDIAN, | ||
608 | quirk_ipr_msi); | ||
diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c index 39e46919df14..f2a29641b6a3 100644 --- a/arch/sh/boards/board-ap325rxa.c +++ b/arch/sh/boards/board-ap325rxa.c | |||
@@ -263,6 +263,9 @@ static int camera_probe(void) | |||
263 | struct i2c_msg msg; | 263 | struct i2c_msg msg; |
264 | int ret; | 264 | int ret; |
265 | 265 | ||
266 | if (!a) | ||
267 | return -ENODEV; | ||
268 | |||
266 | camera_power(1); | 269 | camera_power(1); |
267 | msg.addr = 0x6e; | 270 | msg.addr = 0x6e; |
268 | msg.buf = camera_ncm03j_magic; | 271 | msg.buf = camera_ncm03j_magic; |
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 6d5950839bd0..132120ae4bde 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c | |||
@@ -932,8 +932,6 @@ static void blkfront_closing(struct xenbus_device *dev) | |||
932 | 932 | ||
933 | spin_lock_irqsave(&blkif_io_lock, flags); | 933 | spin_lock_irqsave(&blkif_io_lock, flags); |
934 | 934 | ||
935 | del_gendisk(info->gd); | ||
936 | |||
937 | /* No more blkif_request(). */ | 935 | /* No more blkif_request(). */ |
938 | blk_stop_queue(info->rq); | 936 | blk_stop_queue(info->rq); |
939 | 937 | ||
@@ -947,6 +945,8 @@ static void blkfront_closing(struct xenbus_device *dev) | |||
947 | blk_cleanup_queue(info->rq); | 945 | blk_cleanup_queue(info->rq); |
948 | info->rq = NULL; | 946 | info->rq = NULL; |
949 | 947 | ||
948 | del_gendisk(info->gd); | ||
949 | |||
950 | out: | 950 | out: |
951 | xenbus_frontend_closed(dev); | 951 | xenbus_frontend_closed(dev); |
952 | } | 952 | } |
@@ -975,8 +975,10 @@ static void backend_changed(struct xenbus_device *dev, | |||
975 | break; | 975 | break; |
976 | 976 | ||
977 | case XenbusStateClosing: | 977 | case XenbusStateClosing: |
978 | if (info->gd == NULL) | 978 | if (info->gd == NULL) { |
979 | xenbus_dev_fatal(dev, -ENODEV, "gd is NULL"); | 979 | xenbus_frontend_closed(dev); |
980 | break; | ||
981 | } | ||
980 | bd = bdget_disk(info->gd, 0); | 982 | bd = bdget_disk(info->gd, 0); |
981 | if (bd == NULL) | 983 | if (bd == NULL) |
982 | xenbus_dev_fatal(dev, -ENODEV, "bdget failed"); | 984 | xenbus_dev_fatal(dev, -ENODEV, "bdget failed"); |
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c index ca741c21e4aa..f177c2d4017f 100644 --- a/drivers/cdrom/viocd.c +++ b/drivers/cdrom/viocd.c | |||
@@ -570,7 +570,7 @@ static int viocd_probe(struct vio_dev *vdev, const struct vio_device_id *id) | |||
570 | struct device_node *node = vdev->dev.archdata.of_node; | 570 | struct device_node *node = vdev->dev.archdata.of_node; |
571 | 571 | ||
572 | deviceno = vdev->unit_address; | 572 | deviceno = vdev->unit_address; |
573 | if (deviceno > VIOCD_MAX_CD) | 573 | if (deviceno >= VIOCD_MAX_CD) |
574 | return -ENODEV; | 574 | return -ENODEV; |
575 | if (!node) | 575 | if (!node) |
576 | return -ENODEV; | 576 | return -ENODEV; |
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index aa83a0865ec1..09050797c76a 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c | |||
@@ -2856,6 +2856,7 @@ int ipmi_register_smi(struct ipmi_smi_handlers *handlers, | |||
2856 | /* Assume a single IPMB channel at zero. */ | 2856 | /* Assume a single IPMB channel at zero. */ |
2857 | intf->channels[0].medium = IPMI_CHANNEL_MEDIUM_IPMB; | 2857 | intf->channels[0].medium = IPMI_CHANNEL_MEDIUM_IPMB; |
2858 | intf->channels[0].protocol = IPMI_CHANNEL_PROTOCOL_IPMB; | 2858 | intf->channels[0].protocol = IPMI_CHANNEL_PROTOCOL_IPMB; |
2859 | intf->curr_channel = IPMI_MAX_CHANNELS; | ||
2859 | } | 2860 | } |
2860 | 2861 | ||
2861 | if (rv == 0) | 2862 | if (rv == 0) |
@@ -3648,13 +3649,13 @@ static int handle_new_recv_msg(ipmi_smi_t intf, | |||
3648 | } | 3649 | } |
3649 | 3650 | ||
3650 | /* | 3651 | /* |
3651 | ** We need to make sure the channels have been initialized. | 3652 | * We need to make sure the channels have been initialized. |
3652 | ** The channel_handler routine will set the "curr_channel" | 3653 | * The channel_handler routine will set the "curr_channel" |
3653 | ** equal to or greater than IPMI_MAX_CHANNELS when all the | 3654 | * equal to or greater than IPMI_MAX_CHANNELS when all the |
3654 | ** channels for this interface have been initialized. | 3655 | * channels for this interface have been initialized. |
3655 | */ | 3656 | */ |
3656 | if (intf->curr_channel < IPMI_MAX_CHANNELS) { | 3657 | if (intf->curr_channel < IPMI_MAX_CHANNELS) { |
3657 | requeue = 1; /* Just put the message back for now */ | 3658 | requeue = 0; /* Throw the message away */ |
3658 | goto out; | 3659 | goto out; |
3659 | } | 3660 | } |
3660 | 3661 | ||
diff --git a/drivers/char/tpm/tpm_bios.c b/drivers/char/tpm/tpm_bios.c index ed306eb1057f..0c2f55a38b95 100644 --- a/drivers/char/tpm/tpm_bios.c +++ b/drivers/char/tpm/tpm_bios.c | |||
@@ -212,7 +212,8 @@ static int get_event_name(char *dest, struct tcpa_event *event, | |||
212 | unsigned char * event_entry) | 212 | unsigned char * event_entry) |
213 | { | 213 | { |
214 | const char *name = ""; | 214 | const char *name = ""; |
215 | char data[40] = ""; | 215 | /* 41 so there is room for 40 data and 1 nul */ |
216 | char data[41] = ""; | ||
216 | int i, n_len = 0, d_len = 0; | 217 | int i, n_len = 0, d_len = 0; |
217 | struct tcpa_pc_event *pc_event; | 218 | struct tcpa_pc_event *pc_event; |
218 | 219 | ||
diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c index 6d80d17f1e96..0411d912d82a 100644 --- a/drivers/gpu/drm/drm_bufs.c +++ b/drivers/gpu/drm/drm_bufs.c | |||
@@ -170,6 +170,14 @@ static int drm_addmap_core(struct drm_device * dev, resource_size_t offset, | |||
170 | } | 170 | } |
171 | DRM_DEBUG("offset = 0x%08llx, size = 0x%08lx, type = %d\n", | 171 | DRM_DEBUG("offset = 0x%08llx, size = 0x%08lx, type = %d\n", |
172 | (unsigned long long)map->offset, map->size, map->type); | 172 | (unsigned long long)map->offset, map->size, map->type); |
173 | |||
174 | /* page-align _DRM_SHM maps. They are allocated here so there is no security | ||
175 | * hole created by that and it works around various broken drivers that use | ||
176 | * a non-aligned quantity to map the SAREA. --BenH | ||
177 | */ | ||
178 | if (map->type == _DRM_SHM) | ||
179 | map->size = PAGE_ALIGN(map->size); | ||
180 | |||
173 | if ((map->offset & (~(resource_size_t)PAGE_MASK)) || (map->size & (~PAGE_MASK))) { | 181 | if ((map->offset & (~(resource_size_t)PAGE_MASK)) || (map->size & (~PAGE_MASK))) { |
174 | drm_free(map, sizeof(*map), DRM_MEM_MAPS); | 182 | drm_free(map, sizeof(*map), DRM_MEM_MAPS); |
175 | return -EINVAL; | 183 | return -EINVAL; |
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index f01def16a669..019b7c578236 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c | |||
@@ -481,7 +481,7 @@ int drm_ioctl(struct inode *inode, struct file *filp, | |||
481 | } | 481 | } |
482 | retcode = func(dev, kdata, file_priv); | 482 | retcode = func(dev, kdata, file_priv); |
483 | 483 | ||
484 | if ((retcode == 0) && (cmd & IOC_OUT)) { | 484 | if (cmd & IOC_OUT) { |
485 | if (copy_to_user((void __user *)arg, kdata, | 485 | if (copy_to_user((void __user *)arg, kdata, |
486 | _IOC_SIZE(cmd)) != 0) | 486 | _IOC_SIZE(cmd)) != 0) |
487 | retcode = -EFAULT; | 487 | retcode = -EFAULT; |
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index e4e3a0e3201e..bba4297f2f03 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -704,7 +704,7 @@ void ide_timer_expiry (unsigned long data) | |||
704 | } | 704 | } |
705 | spin_lock_irq(&hwif->lock); | 705 | spin_lock_irq(&hwif->lock); |
706 | enable_irq(hwif->irq); | 706 | enable_irq(hwif->irq); |
707 | if (startstop == ide_stopped) { | 707 | if (startstop == ide_stopped && hwif->polling == 0) { |
708 | rq_in_flight = hwif->rq; | 708 | rq_in_flight = hwif->rq; |
709 | hwif->rq = NULL; | 709 | hwif->rq = NULL; |
710 | ide_unlock_port(hwif); | 710 | ide_unlock_port(hwif); |
@@ -879,7 +879,7 @@ irqreturn_t ide_intr (int irq, void *dev_id) | |||
879 | * same irq as is currently being serviced here, and Linux | 879 | * same irq as is currently being serviced here, and Linux |
880 | * won't allow another of the same (on any CPU) until we return. | 880 | * won't allow another of the same (on any CPU) until we return. |
881 | */ | 881 | */ |
882 | if (startstop == ide_stopped) { | 882 | if (startstop == ide_stopped && hwif->polling == 0) { |
883 | BUG_ON(hwif->handler); | 883 | BUG_ON(hwif->handler); |
884 | rq_in_flight = hwif->rq; | 884 | rq_in_flight = hwif->rq; |
885 | hwif->rq = NULL; | 885 | hwif->rq = NULL; |
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index c19a221b1e18..06fe002116ec 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -206,8 +206,6 @@ EXPORT_SYMBOL_GPL(ide_in_drive_list); | |||
206 | 206 | ||
207 | /* | 207 | /* |
208 | * Early UDMA66 devices don't set bit14 to 1, only bit13 is valid. | 208 | * Early UDMA66 devices don't set bit14 to 1, only bit13 is valid. |
209 | * We list them here and depend on the device side cable detection for them. | ||
210 | * | ||
211 | * Some optical devices with the buggy firmwares have the same problem. | 209 | * Some optical devices with the buggy firmwares have the same problem. |
212 | */ | 210 | */ |
213 | static const struct drive_list_entry ivb_list[] = { | 211 | static const struct drive_list_entry ivb_list[] = { |
@@ -251,10 +249,25 @@ u8 eighty_ninty_three(ide_drive_t *drive) | |||
251 | * - force bit13 (80c cable present) check also for !ivb devices | 249 | * - force bit13 (80c cable present) check also for !ivb devices |
252 | * (unless the slave device is pre-ATA3) | 250 | * (unless the slave device is pre-ATA3) |
253 | */ | 251 | */ |
254 | if ((id[ATA_ID_HW_CONFIG] & 0x4000) || | 252 | if (id[ATA_ID_HW_CONFIG] & 0x4000) |
255 | (ivb && (id[ATA_ID_HW_CONFIG] & 0x2000))) | ||
256 | return 1; | 253 | return 1; |
257 | 254 | ||
255 | if (ivb) { | ||
256 | const char *model = (char *)&id[ATA_ID_PROD]; | ||
257 | |||
258 | if (strstr(model, "TSSTcorp CDDVDW SH-S202")) { | ||
259 | /* | ||
260 | * These ATAPI devices always report 80c cable | ||
261 | * so we have to depend on the host in this case. | ||
262 | */ | ||
263 | if (hwif->cbl == ATA_CBL_PATA80) | ||
264 | return 1; | ||
265 | } else { | ||
266 | /* Depend on the device side cable detection. */ | ||
267 | if (id[ATA_ID_HW_CONFIG] & 0x2000) | ||
268 | return 1; | ||
269 | } | ||
270 | } | ||
258 | no_80w: | 271 | no_80w: |
259 | if (drive->dev_flags & IDE_DFLAG_UDMA33_WARNED) | 272 | if (drive->dev_flags & IDE_DFLAG_UDMA33_WARNED) |
260 | return 0; | 273 | return 0; |
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c index 05b7fbc7ead5..e386a32dc9ba 100644 --- a/drivers/ide/ide-lib.c +++ b/drivers/ide/ide-lib.c | |||
@@ -31,24 +31,6 @@ void ide_toggle_bounce(ide_drive_t *drive, int on) | |||
31 | blk_queue_bounce_limit(drive->queue, addr); | 31 | blk_queue_bounce_limit(drive->queue, addr); |
32 | } | 32 | } |
33 | 33 | ||
34 | static void ide_dump_opcode(ide_drive_t *drive) | ||
35 | { | ||
36 | struct request *rq = drive->hwif->rq; | ||
37 | struct ide_cmd *cmd = NULL; | ||
38 | |||
39 | if (!rq) | ||
40 | return; | ||
41 | |||
42 | if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) | ||
43 | cmd = rq->special; | ||
44 | |||
45 | printk(KERN_ERR "ide: failed opcode was: "); | ||
46 | if (cmd == NULL) | ||
47 | printk(KERN_CONT "unknown\n"); | ||
48 | else | ||
49 | printk(KERN_CONT "0x%02x\n", cmd->tf.command); | ||
50 | } | ||
51 | |||
52 | u64 ide_get_lba_addr(struct ide_cmd *cmd, int lba48) | 34 | u64 ide_get_lba_addr(struct ide_cmd *cmd, int lba48) |
53 | { | 35 | { |
54 | struct ide_taskfile *tf = &cmd->tf; | 36 | struct ide_taskfile *tf = &cmd->tf; |
@@ -91,7 +73,7 @@ static void ide_dump_sector(ide_drive_t *drive) | |||
91 | 73 | ||
92 | static void ide_dump_ata_error(ide_drive_t *drive, u8 err) | 74 | static void ide_dump_ata_error(ide_drive_t *drive, u8 err) |
93 | { | 75 | { |
94 | printk(KERN_ERR "{ "); | 76 | printk(KERN_CONT "{ "); |
95 | if (err & ATA_ABORTED) | 77 | if (err & ATA_ABORTED) |
96 | printk(KERN_CONT "DriveStatusError "); | 78 | printk(KERN_CONT "DriveStatusError "); |
97 | if (err & ATA_ICRC) | 79 | if (err & ATA_ICRC) |
@@ -121,7 +103,7 @@ static void ide_dump_ata_error(ide_drive_t *drive, u8 err) | |||
121 | 103 | ||
122 | static void ide_dump_atapi_error(ide_drive_t *drive, u8 err) | 104 | static void ide_dump_atapi_error(ide_drive_t *drive, u8 err) |
123 | { | 105 | { |
124 | printk(KERN_ERR "{ "); | 106 | printk(KERN_CONT "{ "); |
125 | if (err & ATAPI_ILI) | 107 | if (err & ATAPI_ILI) |
126 | printk(KERN_CONT "IllegalLengthIndication "); | 108 | printk(KERN_CONT "IllegalLengthIndication "); |
127 | if (err & ATAPI_EOM) | 109 | if (err & ATAPI_EOM) |
@@ -179,7 +161,10 @@ u8 ide_dump_status(ide_drive_t *drive, const char *msg, u8 stat) | |||
179 | else | 161 | else |
180 | ide_dump_atapi_error(drive, err); | 162 | ide_dump_atapi_error(drive, err); |
181 | } | 163 | } |
182 | ide_dump_opcode(drive); | 164 | |
165 | printk(KERN_ERR "%s: possibly failed opcode: 0x%02x\n", | ||
166 | drive->name, drive->hwif->cmd.tf.command); | ||
167 | |||
183 | return err; | 168 | return err; |
184 | } | 169 | } |
185 | EXPORT_SYMBOL(ide_dump_status); | 170 | EXPORT_SYMBOL(ide_dump_status); |
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 7f264ed1141b..c895ed52b2e8 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -295,7 +295,7 @@ int ide_dev_read_id(ide_drive_t *drive, u8 cmd, u16 *id) | |||
295 | 295 | ||
296 | timeout = ((cmd == ATA_CMD_ID_ATA) ? WAIT_WORSTCASE : WAIT_PIDENTIFY) / 2; | 296 | timeout = ((cmd == ATA_CMD_ID_ATA) ? WAIT_WORSTCASE : WAIT_PIDENTIFY) / 2; |
297 | 297 | ||
298 | if (ide_busy_sleep(hwif, timeout, use_altstatus)) | 298 | if (ide_busy_sleep(drive, timeout, use_altstatus)) |
299 | return 1; | 299 | return 1; |
300 | 300 | ||
301 | /* wait for IRQ and ATA_DRQ */ | 301 | /* wait for IRQ and ATA_DRQ */ |
@@ -316,8 +316,9 @@ int ide_dev_read_id(ide_drive_t *drive, u8 cmd, u16 *id) | |||
316 | return rc; | 316 | return rc; |
317 | } | 317 | } |
318 | 318 | ||
319 | int ide_busy_sleep(ide_hwif_t *hwif, unsigned long timeout, int altstatus) | 319 | int ide_busy_sleep(ide_drive_t *drive, unsigned long timeout, int altstatus) |
320 | { | 320 | { |
321 | ide_hwif_t *hwif = drive->hwif; | ||
321 | u8 stat; | 322 | u8 stat; |
322 | 323 | ||
323 | timeout += jiffies; | 324 | timeout += jiffies; |
@@ -330,6 +331,8 @@ int ide_busy_sleep(ide_hwif_t *hwif, unsigned long timeout, int altstatus) | |||
330 | return 0; | 331 | return 0; |
331 | } while (time_before(jiffies, timeout)); | 332 | } while (time_before(jiffies, timeout)); |
332 | 333 | ||
334 | printk(KERN_ERR "%s: timeout in %s\n", drive->name, __func__); | ||
335 | |||
333 | return 1; /* drive timed-out */ | 336 | return 1; /* drive timed-out */ |
334 | } | 337 | } |
335 | 338 | ||
@@ -420,7 +423,7 @@ static int do_probe (ide_drive_t *drive, u8 cmd) | |||
420 | tp_ops->dev_select(drive); | 423 | tp_ops->dev_select(drive); |
421 | msleep(50); | 424 | msleep(50); |
422 | tp_ops->exec_command(hwif, ATA_CMD_DEV_RESET); | 425 | tp_ops->exec_command(hwif, ATA_CMD_DEV_RESET); |
423 | (void)ide_busy_sleep(hwif, WAIT_WORSTCASE, 0); | 426 | (void)ide_busy_sleep(drive, WAIT_WORSTCASE, 0); |
424 | rc = ide_dev_read_id(drive, cmd, id); | 427 | rc = ide_dev_read_id(drive, cmd, id); |
425 | } | 428 | } |
426 | 429 | ||
diff --git a/drivers/ide/via82cxxx.c b/drivers/ide/via82cxxx.c index 3ff7231e4858..028de26a25fe 100644 --- a/drivers/ide/via82cxxx.c +++ b/drivers/ide/via82cxxx.c | |||
@@ -67,6 +67,7 @@ static struct via_isa_bridge { | |||
67 | u8 udma_mask; | 67 | u8 udma_mask; |
68 | u8 flags; | 68 | u8 flags; |
69 | } via_isa_bridges[] = { | 69 | } via_isa_bridges[] = { |
70 | { "vx855", PCI_DEVICE_ID_VIA_VX855, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, | ||
70 | { "vx800", PCI_DEVICE_ID_VIA_VX800, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, | 71 | { "vx800", PCI_DEVICE_ID_VIA_VX800, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, |
71 | { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, | 72 | { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, |
72 | { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, | 73 | { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, ATA_UDMA6, VIA_BAD_AST }, |
@@ -474,6 +475,7 @@ static const struct pci_device_id via_pci_tbl[] = { | |||
474 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C576_1), 0 }, | 475 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C576_1), 0 }, |
475 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C586_1), 0 }, | 476 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C586_1), 0 }, |
476 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_CX700_IDE), 0 }, | 477 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_CX700_IDE), 0 }, |
478 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_VX855_IDE), 0 }, | ||
477 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_6410), 1 }, | 479 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_6410), 1 }, |
478 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_SATA_EIDE), 1 }, | 480 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_SATA_EIDE), 1 }, |
479 | { 0, }, | 481 | { 0, }, |
diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c index e29cdc13a199..a28c06d686e1 100644 --- a/drivers/input/serio/ambakmi.c +++ b/drivers/input/serio/ambakmi.c | |||
@@ -107,7 +107,7 @@ static void amba_kmi_close(struct serio *io) | |||
107 | clk_disable(kmi->clk); | 107 | clk_disable(kmi->clk); |
108 | } | 108 | } |
109 | 109 | ||
110 | static int amba_kmi_probe(struct amba_device *dev, void *id) | 110 | static int amba_kmi_probe(struct amba_device *dev, struct amba_id *id) |
111 | { | 111 | { |
112 | struct amba_kmi_port *kmi; | 112 | struct amba_kmi_port *kmi; |
113 | struct serio *io; | 113 | struct serio *io; |
diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c index 7793932a513b..11a6248cc1c1 100644 --- a/drivers/mfd/pcf50633-core.c +++ b/drivers/mfd/pcf50633-core.c | |||
@@ -443,7 +443,7 @@ static irqreturn_t pcf50633_irq(int irq, void *data) | |||
443 | dev_dbg(pcf->dev, "pcf50633_irq\n"); | 443 | dev_dbg(pcf->dev, "pcf50633_irq\n"); |
444 | 444 | ||
445 | get_device(pcf->dev); | 445 | get_device(pcf->dev); |
446 | disable_irq(pcf->irq); | 446 | disable_irq_nosync(pcf->irq); |
447 | schedule_work(&pcf->irq_work); | 447 | schedule_work(&pcf->irq_work); |
448 | 448 | ||
449 | return IRQ_HANDLED; | 449 | return IRQ_HANDLED; |
diff --git a/drivers/mfd/wm8350-core.c b/drivers/mfd/wm8350-core.c index c2be3088e2e1..fe24079387c5 100644 --- a/drivers/mfd/wm8350-core.c +++ b/drivers/mfd/wm8350-core.c | |||
@@ -79,10 +79,6 @@ static int wm8350_phys_read(struct wm8350 *wm8350, u8 reg, int num_regs, | |||
79 | /* Cache is CPU endian */ | 79 | /* Cache is CPU endian */ |
80 | dest[i - reg] = be16_to_cpu(dest[i - reg]); | 80 | dest[i - reg] = be16_to_cpu(dest[i - reg]); |
81 | 81 | ||
82 | /* Satisfy non-volatile bits from cache */ | ||
83 | dest[i - reg] &= wm8350_reg_io_map[i].vol; | ||
84 | dest[i - reg] |= wm8350->reg_cache[i]; | ||
85 | |||
86 | /* Mask out non-readable bits */ | 82 | /* Mask out non-readable bits */ |
87 | dest[i - reg] &= wm8350_reg_io_map[i].readable; | 83 | dest[i - reg] &= wm8350_reg_io_map[i].readable; |
88 | } | 84 | } |
@@ -182,9 +178,6 @@ static int wm8350_write(struct wm8350 *wm8350, u8 reg, int num_regs, u16 *src) | |||
182 | (wm8350->reg_cache[i] & ~wm8350_reg_io_map[i].writable) | 178 | (wm8350->reg_cache[i] & ~wm8350_reg_io_map[i].writable) |
183 | | src[i - reg]; | 179 | | src[i - reg]; |
184 | 180 | ||
185 | /* Don't store volatile bits */ | ||
186 | wm8350->reg_cache[i] &= ~wm8350_reg_io_map[i].vol; | ||
187 | |||
188 | src[i - reg] = cpu_to_be16(src[i - reg]); | 181 | src[i - reg] = cpu_to_be16(src[i - reg]); |
189 | } | 182 | } |
190 | 183 | ||
@@ -1261,7 +1254,6 @@ static int wm8350_create_cache(struct wm8350 *wm8350, int type, int mode) | |||
1261 | (i < WM8350_CLOCK_CONTROL_1 || i > WM8350_AIF_TEST)) { | 1254 | (i < WM8350_CLOCK_CONTROL_1 || i > WM8350_AIF_TEST)) { |
1262 | value = be16_to_cpu(wm8350->reg_cache[i]); | 1255 | value = be16_to_cpu(wm8350->reg_cache[i]); |
1263 | value &= wm8350_reg_io_map[i].readable; | 1256 | value &= wm8350_reg_io_map[i].readable; |
1264 | value &= ~wm8350_reg_io_map[i].vol; | ||
1265 | wm8350->reg_cache[i] = value; | 1257 | wm8350->reg_cache[i] = value; |
1266 | } else | 1258 | } else |
1267 | wm8350->reg_cache[i] = reg_map[i]; | 1259 | wm8350->reg_cache[i] = reg_map[i]; |
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 36875dcfa492..7d4febdab286 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c | |||
@@ -490,7 +490,7 @@ static void mmci_check_status(unsigned long data) | |||
490 | mod_timer(&host->timer, jiffies + HZ); | 490 | mod_timer(&host->timer, jiffies + HZ); |
491 | } | 491 | } |
492 | 492 | ||
493 | static int __devinit mmci_probe(struct amba_device *dev, void *id) | 493 | static int __devinit mmci_probe(struct amba_device *dev, struct amba_id *id) |
494 | { | 494 | { |
495 | struct mmc_platform_data *plat = dev->dev.platform_data; | 495 | struct mmc_platform_data *plat = dev->dev.platform_data; |
496 | struct mmci_host *host; | 496 | struct mmci_host *host; |
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h index c49ddd08b2aa..b4bb06fdf307 100644 --- a/drivers/net/benet/be.h +++ b/drivers/net/benet/be.h | |||
@@ -35,8 +35,22 @@ | |||
35 | #define DRV_VER "2.0.348" | 35 | #define DRV_VER "2.0.348" |
36 | #define DRV_NAME "be2net" | 36 | #define DRV_NAME "be2net" |
37 | #define BE_NAME "ServerEngines BladeEngine2 10Gbps NIC" | 37 | #define BE_NAME "ServerEngines BladeEngine2 10Gbps NIC" |
38 | #define OC_NAME "Emulex OneConnect 10Gbps NIC" | ||
38 | #define DRV_DESC BE_NAME "Driver" | 39 | #define DRV_DESC BE_NAME "Driver" |
39 | 40 | ||
41 | #define BE_VENDOR_ID 0x19a2 | ||
42 | #define BE_DEVICE_ID1 0x211 | ||
43 | #define OC_DEVICE_ID1 0x700 | ||
44 | #define OC_DEVICE_ID2 0x701 | ||
45 | |||
46 | static inline char *nic_name(struct pci_dev *pdev) | ||
47 | { | ||
48 | if (pdev->device == OC_DEVICE_ID1 || pdev->device == OC_DEVICE_ID2) | ||
49 | return OC_NAME; | ||
50 | else | ||
51 | return BE_NAME; | ||
52 | } | ||
53 | |||
40 | /* Number of bytes of an RX frame that are copied to skb->data */ | 54 | /* Number of bytes of an RX frame that are copied to skb->data */ |
41 | #define BE_HDR_LEN 64 | 55 | #define BE_HDR_LEN 64 |
42 | #define BE_MAX_JUMBO_FRAME_SIZE 9018 | 56 | #define BE_MAX_JUMBO_FRAME_SIZE 9018 |
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 30d0c81c989e..5c378b5e8e41 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
@@ -28,10 +28,10 @@ static unsigned int rx_frag_size = 2048; | |||
28 | module_param(rx_frag_size, uint, S_IRUGO); | 28 | module_param(rx_frag_size, uint, S_IRUGO); |
29 | MODULE_PARM_DESC(rx_frag_size, "Size of a fragment that holds rcvd data."); | 29 | MODULE_PARM_DESC(rx_frag_size, "Size of a fragment that holds rcvd data."); |
30 | 30 | ||
31 | #define BE_VENDOR_ID 0x19a2 | ||
32 | #define BE2_DEVICE_ID_1 0x0211 | ||
33 | static DEFINE_PCI_DEVICE_TABLE(be_dev_ids) = { | 31 | static DEFINE_PCI_DEVICE_TABLE(be_dev_ids) = { |
34 | { PCI_DEVICE(BE_VENDOR_ID, BE2_DEVICE_ID_1) }, | 32 | { PCI_DEVICE(BE_VENDOR_ID, BE_DEVICE_ID1) }, |
33 | { PCI_DEVICE(BE_VENDOR_ID, OC_DEVICE_ID1) }, | ||
34 | { PCI_DEVICE(BE_VENDOR_ID, OC_DEVICE_ID2) }, | ||
35 | { 0 } | 35 | { 0 } |
36 | }; | 36 | }; |
37 | MODULE_DEVICE_TABLE(pci, be_dev_ids); | 37 | MODULE_DEVICE_TABLE(pci, be_dev_ids); |
@@ -1859,7 +1859,7 @@ static int __devinit be_probe(struct pci_dev *pdev, | |||
1859 | if (status != 0) | 1859 | if (status != 0) |
1860 | goto stats_clean; | 1860 | goto stats_clean; |
1861 | 1861 | ||
1862 | dev_info(&pdev->dev, BE_NAME " port %d\n", adapter->port_num); | 1862 | dev_info(&pdev->dev, "%s port %d\n", nic_name(pdev), adapter->port_num); |
1863 | return 0; | 1863 | return 0; |
1864 | 1864 | ||
1865 | stats_clean: | 1865 | stats_clean: |
@@ -1873,7 +1873,7 @@ rel_reg: | |||
1873 | disable_dev: | 1873 | disable_dev: |
1874 | pci_disable_device(pdev); | 1874 | pci_disable_device(pdev); |
1875 | do_none: | 1875 | do_none: |
1876 | dev_warn(&pdev->dev, BE_NAME " initialization failed\n"); | 1876 | dev_err(&pdev->dev, "%s initialization failed\n", nic_name(pdev)); |
1877 | return status; | 1877 | return status; |
1878 | } | 1878 | } |
1879 | 1879 | ||
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index 8c2e5ab51f08..faf094abef7f 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c | |||
@@ -1465,6 +1465,12 @@ static struct aggregator *ad_agg_selection_test(struct aggregator *best, | |||
1465 | return best; | 1465 | return best; |
1466 | } | 1466 | } |
1467 | 1467 | ||
1468 | static int agg_device_up(const struct aggregator *agg) | ||
1469 | { | ||
1470 | return (netif_running(agg->slave->dev) && | ||
1471 | netif_carrier_ok(agg->slave->dev)); | ||
1472 | } | ||
1473 | |||
1468 | /** | 1474 | /** |
1469 | * ad_agg_selection_logic - select an aggregation group for a team | 1475 | * ad_agg_selection_logic - select an aggregation group for a team |
1470 | * @aggregator: the aggregator we're looking at | 1476 | * @aggregator: the aggregator we're looking at |
@@ -1496,14 +1502,13 @@ static void ad_agg_selection_logic(struct aggregator *agg) | |||
1496 | struct port *port; | 1502 | struct port *port; |
1497 | 1503 | ||
1498 | origin = agg; | 1504 | origin = agg; |
1499 | |||
1500 | active = __get_active_agg(agg); | 1505 | active = __get_active_agg(agg); |
1501 | best = active; | 1506 | best = (active && agg_device_up(active)) ? active : NULL; |
1502 | 1507 | ||
1503 | do { | 1508 | do { |
1504 | agg->is_active = 0; | 1509 | agg->is_active = 0; |
1505 | 1510 | ||
1506 | if (agg->num_of_ports) | 1511 | if (agg->num_of_ports && agg_device_up(agg)) |
1507 | best = ad_agg_selection_test(best, agg); | 1512 | best = ad_agg_selection_test(best, agg); |
1508 | 1513 | ||
1509 | } while ((agg = __get_next_agg(agg))); | 1514 | } while ((agg = __get_next_agg(agg))); |
diff --git a/drivers/net/meth.c b/drivers/net/meth.c index aa08987f6e81..dbd3436912b8 100644 --- a/drivers/net/meth.c +++ b/drivers/net/meth.c | |||
@@ -127,11 +127,11 @@ static unsigned long mdio_read(struct meth_private *priv, unsigned long phyreg) | |||
127 | static int mdio_probe(struct meth_private *priv) | 127 | static int mdio_probe(struct meth_private *priv) |
128 | { | 128 | { |
129 | int i; | 129 | int i; |
130 | unsigned long p2, p3; | 130 | unsigned long p2, p3, flags; |
131 | /* check if phy is detected already */ | 131 | /* check if phy is detected already */ |
132 | if(priv->phy_addr>=0&&priv->phy_addr<32) | 132 | if(priv->phy_addr>=0&&priv->phy_addr<32) |
133 | return 0; | 133 | return 0; |
134 | spin_lock(&priv->meth_lock); | 134 | spin_lock_irqsave(&priv->meth_lock, flags); |
135 | for (i=0;i<32;++i){ | 135 | for (i=0;i<32;++i){ |
136 | priv->phy_addr=i; | 136 | priv->phy_addr=i; |
137 | p2=mdio_read(priv,2); | 137 | p2=mdio_read(priv,2); |
@@ -157,7 +157,7 @@ static int mdio_probe(struct meth_private *priv) | |||
157 | break; | 157 | break; |
158 | } | 158 | } |
159 | } | 159 | } |
160 | spin_unlock(&priv->meth_lock); | 160 | spin_unlock_irqrestore(&priv->meth_lock, flags); |
161 | if(priv->phy_addr<32) { | 161 | if(priv->phy_addr<32) { |
162 | return 0; | 162 | return 0; |
163 | } | 163 | } |
@@ -373,14 +373,14 @@ static int meth_release(struct net_device *dev) | |||
373 | static void meth_rx(struct net_device* dev, unsigned long int_status) | 373 | static void meth_rx(struct net_device* dev, unsigned long int_status) |
374 | { | 374 | { |
375 | struct sk_buff *skb; | 375 | struct sk_buff *skb; |
376 | unsigned long status; | 376 | unsigned long status, flags; |
377 | struct meth_private *priv = netdev_priv(dev); | 377 | struct meth_private *priv = netdev_priv(dev); |
378 | unsigned long fifo_rptr = (int_status & METH_INT_RX_RPTR_MASK) >> 8; | 378 | unsigned long fifo_rptr = (int_status & METH_INT_RX_RPTR_MASK) >> 8; |
379 | 379 | ||
380 | spin_lock(&priv->meth_lock); | 380 | spin_lock_irqsave(&priv->meth_lock, flags); |
381 | priv->dma_ctrl &= ~METH_DMA_RX_INT_EN; | 381 | priv->dma_ctrl &= ~METH_DMA_RX_INT_EN; |
382 | mace->eth.dma_ctrl = priv->dma_ctrl; | 382 | mace->eth.dma_ctrl = priv->dma_ctrl; |
383 | spin_unlock(&priv->meth_lock); | 383 | spin_unlock_irqrestore(&priv->meth_lock, flags); |
384 | 384 | ||
385 | if (int_status & METH_INT_RX_UNDERFLOW) { | 385 | if (int_status & METH_INT_RX_UNDERFLOW) { |
386 | fifo_rptr = (fifo_rptr - 1) & 0x0f; | 386 | fifo_rptr = (fifo_rptr - 1) & 0x0f; |
@@ -452,12 +452,12 @@ static void meth_rx(struct net_device* dev, unsigned long int_status) | |||
452 | mace->eth.rx_fifo = priv->rx_ring_dmas[priv->rx_write]; | 452 | mace->eth.rx_fifo = priv->rx_ring_dmas[priv->rx_write]; |
453 | ADVANCE_RX_PTR(priv->rx_write); | 453 | ADVANCE_RX_PTR(priv->rx_write); |
454 | } | 454 | } |
455 | spin_lock(&priv->meth_lock); | 455 | spin_lock_irqsave(&priv->meth_lock, flags); |
456 | /* In case there was underflow, and Rx DMA was disabled */ | 456 | /* In case there was underflow, and Rx DMA was disabled */ |
457 | priv->dma_ctrl |= METH_DMA_RX_INT_EN | METH_DMA_RX_EN; | 457 | priv->dma_ctrl |= METH_DMA_RX_INT_EN | METH_DMA_RX_EN; |
458 | mace->eth.dma_ctrl = priv->dma_ctrl; | 458 | mace->eth.dma_ctrl = priv->dma_ctrl; |
459 | mace->eth.int_stat = METH_INT_RX_THRESHOLD; | 459 | mace->eth.int_stat = METH_INT_RX_THRESHOLD; |
460 | spin_unlock(&priv->meth_lock); | 460 | spin_unlock_irqrestore(&priv->meth_lock, flags); |
461 | } | 461 | } |
462 | 462 | ||
463 | static int meth_tx_full(struct net_device *dev) | 463 | static int meth_tx_full(struct net_device *dev) |
@@ -470,11 +470,11 @@ static int meth_tx_full(struct net_device *dev) | |||
470 | static void meth_tx_cleanup(struct net_device* dev, unsigned long int_status) | 470 | static void meth_tx_cleanup(struct net_device* dev, unsigned long int_status) |
471 | { | 471 | { |
472 | struct meth_private *priv = netdev_priv(dev); | 472 | struct meth_private *priv = netdev_priv(dev); |
473 | unsigned long status; | 473 | unsigned long status, flags; |
474 | struct sk_buff *skb; | 474 | struct sk_buff *skb; |
475 | unsigned long rptr = (int_status&TX_INFO_RPTR) >> 16; | 475 | unsigned long rptr = (int_status&TX_INFO_RPTR) >> 16; |
476 | 476 | ||
477 | spin_lock(&priv->meth_lock); | 477 | spin_lock_irqsave(&priv->meth_lock, flags); |
478 | 478 | ||
479 | /* Stop DMA notification */ | 479 | /* Stop DMA notification */ |
480 | priv->dma_ctrl &= ~(METH_DMA_TX_INT_EN); | 480 | priv->dma_ctrl &= ~(METH_DMA_TX_INT_EN); |
@@ -527,12 +527,13 @@ static void meth_tx_cleanup(struct net_device* dev, unsigned long int_status) | |||
527 | } | 527 | } |
528 | 528 | ||
529 | mace->eth.int_stat = METH_INT_TX_EMPTY | METH_INT_TX_PKT; | 529 | mace->eth.int_stat = METH_INT_TX_EMPTY | METH_INT_TX_PKT; |
530 | spin_unlock(&priv->meth_lock); | 530 | spin_unlock_irqrestore(&priv->meth_lock, flags); |
531 | } | 531 | } |
532 | 532 | ||
533 | static void meth_error(struct net_device* dev, unsigned status) | 533 | static void meth_error(struct net_device* dev, unsigned status) |
534 | { | 534 | { |
535 | struct meth_private *priv = netdev_priv(dev); | 535 | struct meth_private *priv = netdev_priv(dev); |
536 | unsigned long flags; | ||
536 | 537 | ||
537 | printk(KERN_WARNING "meth: error status: 0x%08x\n",status); | 538 | printk(KERN_WARNING "meth: error status: 0x%08x\n",status); |
538 | /* check for errors too... */ | 539 | /* check for errors too... */ |
@@ -547,7 +548,7 @@ static void meth_error(struct net_device* dev, unsigned status) | |||
547 | printk(KERN_WARNING "meth: Rx overflow\n"); | 548 | printk(KERN_WARNING "meth: Rx overflow\n"); |
548 | if (status & (METH_INT_RX_UNDERFLOW)) { | 549 | if (status & (METH_INT_RX_UNDERFLOW)) { |
549 | printk(KERN_WARNING "meth: Rx underflow\n"); | 550 | printk(KERN_WARNING "meth: Rx underflow\n"); |
550 | spin_lock(&priv->meth_lock); | 551 | spin_lock_irqsave(&priv->meth_lock, flags); |
551 | mace->eth.int_stat = METH_INT_RX_UNDERFLOW; | 552 | mace->eth.int_stat = METH_INT_RX_UNDERFLOW; |
552 | /* more underflow interrupts will be delivered, | 553 | /* more underflow interrupts will be delivered, |
553 | * effectively throwing us into an infinite loop. | 554 | * effectively throwing us into an infinite loop. |
@@ -555,7 +556,7 @@ static void meth_error(struct net_device* dev, unsigned status) | |||
555 | priv->dma_ctrl &= ~METH_DMA_RX_EN; | 556 | priv->dma_ctrl &= ~METH_DMA_RX_EN; |
556 | mace->eth.dma_ctrl = priv->dma_ctrl; | 557 | mace->eth.dma_ctrl = priv->dma_ctrl; |
557 | DPRINTK("Disabled meth Rx DMA temporarily\n"); | 558 | DPRINTK("Disabled meth Rx DMA temporarily\n"); |
558 | spin_unlock(&priv->meth_lock); | 559 | spin_unlock_irqrestore(&priv->meth_lock, flags); |
559 | } | 560 | } |
560 | mace->eth.int_stat = METH_INT_ERROR; | 561 | mace->eth.int_stat = METH_INT_ERROR; |
561 | } | 562 | } |
diff --git a/drivers/net/mlx4/en_cq.c b/drivers/net/mlx4/en_cq.c index 91f50de84be9..a276125b709b 100644 --- a/drivers/net/mlx4/en_cq.c +++ b/drivers/net/mlx4/en_cq.c | |||
@@ -125,8 +125,10 @@ void mlx4_en_deactivate_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq) | |||
125 | 125 | ||
126 | if (cq->is_tx) | 126 | if (cq->is_tx) |
127 | del_timer(&cq->timer); | 127 | del_timer(&cq->timer); |
128 | else | 128 | else { |
129 | napi_disable(&cq->napi); | 129 | napi_disable(&cq->napi); |
130 | netif_napi_del(&cq->napi); | ||
131 | } | ||
130 | 132 | ||
131 | mlx4_cq_free(mdev->dev, &cq->mcq); | 133 | mlx4_cq_free(mdev->dev, &cq->mcq); |
132 | } | 134 | } |
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index a400d7115f78..6bb5af35eda6 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c | |||
@@ -569,7 +569,7 @@ static int rxq_process(struct rx_queue *rxq, int budget) | |||
569 | if (rxq->rx_curr_desc == rxq->rx_ring_size) | 569 | if (rxq->rx_curr_desc == rxq->rx_ring_size) |
570 | rxq->rx_curr_desc = 0; | 570 | rxq->rx_curr_desc = 0; |
571 | 571 | ||
572 | dma_unmap_single(NULL, rx_desc->buf_ptr, | 572 | dma_unmap_single(mp->dev->dev.parent, rx_desc->buf_ptr, |
573 | rx_desc->buf_size, DMA_FROM_DEVICE); | 573 | rx_desc->buf_size, DMA_FROM_DEVICE); |
574 | rxq->rx_desc_count--; | 574 | rxq->rx_desc_count--; |
575 | rx++; | 575 | rx++; |
@@ -678,8 +678,9 @@ static int rxq_refill(struct rx_queue *rxq, int budget) | |||
678 | 678 | ||
679 | rx_desc = rxq->rx_desc_area + rx; | 679 | rx_desc = rxq->rx_desc_area + rx; |
680 | 680 | ||
681 | rx_desc->buf_ptr = dma_map_single(NULL, skb->data, | 681 | rx_desc->buf_ptr = dma_map_single(mp->dev->dev.parent, |
682 | mp->skb_size, DMA_FROM_DEVICE); | 682 | skb->data, mp->skb_size, |
683 | DMA_FROM_DEVICE); | ||
683 | rx_desc->buf_size = mp->skb_size; | 684 | rx_desc->buf_size = mp->skb_size; |
684 | rxq->rx_skb[rx] = skb; | 685 | rxq->rx_skb[rx] = skb; |
685 | wmb(); | 686 | wmb(); |
@@ -718,6 +719,7 @@ static inline unsigned int has_tiny_unaligned_frags(struct sk_buff *skb) | |||
718 | 719 | ||
719 | static void txq_submit_frag_skb(struct tx_queue *txq, struct sk_buff *skb) | 720 | static void txq_submit_frag_skb(struct tx_queue *txq, struct sk_buff *skb) |
720 | { | 721 | { |
722 | struct mv643xx_eth_private *mp = txq_to_mp(txq); | ||
721 | int nr_frags = skb_shinfo(skb)->nr_frags; | 723 | int nr_frags = skb_shinfo(skb)->nr_frags; |
722 | int frag; | 724 | int frag; |
723 | 725 | ||
@@ -746,10 +748,10 @@ static void txq_submit_frag_skb(struct tx_queue *txq, struct sk_buff *skb) | |||
746 | 748 | ||
747 | desc->l4i_chk = 0; | 749 | desc->l4i_chk = 0; |
748 | desc->byte_cnt = this_frag->size; | 750 | desc->byte_cnt = this_frag->size; |
749 | desc->buf_ptr = dma_map_page(NULL, this_frag->page, | 751 | desc->buf_ptr = dma_map_page(mp->dev->dev.parent, |
750 | this_frag->page_offset, | 752 | this_frag->page, |
751 | this_frag->size, | 753 | this_frag->page_offset, |
752 | DMA_TO_DEVICE); | 754 | this_frag->size, DMA_TO_DEVICE); |
753 | } | 755 | } |
754 | } | 756 | } |
755 | 757 | ||
@@ -826,7 +828,8 @@ no_csum: | |||
826 | 828 | ||
827 | desc->l4i_chk = l4i_chk; | 829 | desc->l4i_chk = l4i_chk; |
828 | desc->byte_cnt = length; | 830 | desc->byte_cnt = length; |
829 | desc->buf_ptr = dma_map_single(NULL, skb->data, length, DMA_TO_DEVICE); | 831 | desc->buf_ptr = dma_map_single(mp->dev->dev.parent, skb->data, |
832 | length, DMA_TO_DEVICE); | ||
830 | 833 | ||
831 | __skb_queue_tail(&txq->tx_skb, skb); | 834 | __skb_queue_tail(&txq->tx_skb, skb); |
832 | 835 | ||
@@ -956,10 +959,10 @@ static int txq_reclaim(struct tx_queue *txq, int budget, int force) | |||
956 | } | 959 | } |
957 | 960 | ||
958 | if (cmd_sts & TX_FIRST_DESC) { | 961 | if (cmd_sts & TX_FIRST_DESC) { |
959 | dma_unmap_single(NULL, desc->buf_ptr, | 962 | dma_unmap_single(mp->dev->dev.parent, desc->buf_ptr, |
960 | desc->byte_cnt, DMA_TO_DEVICE); | 963 | desc->byte_cnt, DMA_TO_DEVICE); |
961 | } else { | 964 | } else { |
962 | dma_unmap_page(NULL, desc->buf_ptr, | 965 | dma_unmap_page(mp->dev->dev.parent, desc->buf_ptr, |
963 | desc->byte_cnt, DMA_TO_DEVICE); | 966 | desc->byte_cnt, DMA_TO_DEVICE); |
964 | } | 967 | } |
965 | 968 | ||
@@ -1894,9 +1897,9 @@ static int rxq_init(struct mv643xx_eth_private *mp, int index) | |||
1894 | mp->rx_desc_sram_size); | 1897 | mp->rx_desc_sram_size); |
1895 | rxq->rx_desc_dma = mp->rx_desc_sram_addr; | 1898 | rxq->rx_desc_dma = mp->rx_desc_sram_addr; |
1896 | } else { | 1899 | } else { |
1897 | rxq->rx_desc_area = dma_alloc_coherent(NULL, size, | 1900 | rxq->rx_desc_area = dma_alloc_coherent(mp->dev->dev.parent, |
1898 | &rxq->rx_desc_dma, | 1901 | size, &rxq->rx_desc_dma, |
1899 | GFP_KERNEL); | 1902 | GFP_KERNEL); |
1900 | } | 1903 | } |
1901 | 1904 | ||
1902 | if (rxq->rx_desc_area == NULL) { | 1905 | if (rxq->rx_desc_area == NULL) { |
@@ -1947,7 +1950,7 @@ out_free: | |||
1947 | if (index == 0 && size <= mp->rx_desc_sram_size) | 1950 | if (index == 0 && size <= mp->rx_desc_sram_size) |
1948 | iounmap(rxq->rx_desc_area); | 1951 | iounmap(rxq->rx_desc_area); |
1949 | else | 1952 | else |
1950 | dma_free_coherent(NULL, size, | 1953 | dma_free_coherent(mp->dev->dev.parent, size, |
1951 | rxq->rx_desc_area, | 1954 | rxq->rx_desc_area, |
1952 | rxq->rx_desc_dma); | 1955 | rxq->rx_desc_dma); |
1953 | 1956 | ||
@@ -1979,7 +1982,7 @@ static void rxq_deinit(struct rx_queue *rxq) | |||
1979 | rxq->rx_desc_area_size <= mp->rx_desc_sram_size) | 1982 | rxq->rx_desc_area_size <= mp->rx_desc_sram_size) |
1980 | iounmap(rxq->rx_desc_area); | 1983 | iounmap(rxq->rx_desc_area); |
1981 | else | 1984 | else |
1982 | dma_free_coherent(NULL, rxq->rx_desc_area_size, | 1985 | dma_free_coherent(mp->dev->dev.parent, rxq->rx_desc_area_size, |
1983 | rxq->rx_desc_area, rxq->rx_desc_dma); | 1986 | rxq->rx_desc_area, rxq->rx_desc_dma); |
1984 | 1987 | ||
1985 | kfree(rxq->rx_skb); | 1988 | kfree(rxq->rx_skb); |
@@ -2007,9 +2010,9 @@ static int txq_init(struct mv643xx_eth_private *mp, int index) | |||
2007 | mp->tx_desc_sram_size); | 2010 | mp->tx_desc_sram_size); |
2008 | txq->tx_desc_dma = mp->tx_desc_sram_addr; | 2011 | txq->tx_desc_dma = mp->tx_desc_sram_addr; |
2009 | } else { | 2012 | } else { |
2010 | txq->tx_desc_area = dma_alloc_coherent(NULL, size, | 2013 | txq->tx_desc_area = dma_alloc_coherent(mp->dev->dev.parent, |
2011 | &txq->tx_desc_dma, | 2014 | size, &txq->tx_desc_dma, |
2012 | GFP_KERNEL); | 2015 | GFP_KERNEL); |
2013 | } | 2016 | } |
2014 | 2017 | ||
2015 | if (txq->tx_desc_area == NULL) { | 2018 | if (txq->tx_desc_area == NULL) { |
@@ -2053,7 +2056,7 @@ static void txq_deinit(struct tx_queue *txq) | |||
2053 | txq->tx_desc_area_size <= mp->tx_desc_sram_size) | 2056 | txq->tx_desc_area_size <= mp->tx_desc_sram_size) |
2054 | iounmap(txq->tx_desc_area); | 2057 | iounmap(txq->tx_desc_area); |
2055 | else | 2058 | else |
2056 | dma_free_coherent(NULL, txq->tx_desc_area_size, | 2059 | dma_free_coherent(mp->dev->dev.parent, txq->tx_desc_area_size, |
2057 | txq->tx_desc_area, txq->tx_desc_dma); | 2060 | txq->tx_desc_area, txq->tx_desc_dma); |
2058 | } | 2061 | } |
2059 | 2062 | ||
diff --git a/drivers/net/vxge/vxge-traffic.c b/drivers/net/vxge/vxge-traffic.c index 7be0ae10d69b..c2eeac4125f3 100644 --- a/drivers/net/vxge/vxge-traffic.c +++ b/drivers/net/vxge/vxge-traffic.c | |||
@@ -115,7 +115,7 @@ enum vxge_hw_status vxge_hw_vpath_intr_enable(struct __vxge_hw_vpath_handle *vp) | |||
115 | VXGE_HW_KDFCCTL_ERRORS_REG_KDFCCTL_FIFO1_POISON| | 115 | VXGE_HW_KDFCCTL_ERRORS_REG_KDFCCTL_FIFO1_POISON| |
116 | VXGE_HW_KDFCCTL_ERRORS_REG_KDFCCTL_FIFO2_POISON| | 116 | VXGE_HW_KDFCCTL_ERRORS_REG_KDFCCTL_FIFO2_POISON| |
117 | VXGE_HW_KDFCCTL_ERRORS_REG_KDFCCTL_FIFO1_DMA_ERR| | 117 | VXGE_HW_KDFCCTL_ERRORS_REG_KDFCCTL_FIFO1_DMA_ERR| |
118 | VXGE_HW_KDFCCTL_ERRORS_REG_KDFCCTL_FIFO1_DMA_ERR), 0, 32), | 118 | VXGE_HW_KDFCCTL_ERRORS_REG_KDFCCTL_FIFO2_DMA_ERR), 0, 32), |
119 | &vp_reg->kdfcctl_errors_mask); | 119 | &vp_reg->kdfcctl_errors_mask); |
120 | 120 | ||
121 | __vxge_hw_pio_mem_write32_upper(0, &vp_reg->vpath_ppif_int_mask); | 121 | __vxge_hw_pio_mem_write32_upper(0, &vp_reg->vpath_ppif_int_mask); |
diff --git a/drivers/net/wimax/i2400m/rx.c b/drivers/net/wimax/i2400m/rx.c index 02419bfd64b5..f9fc38902322 100644 --- a/drivers/net/wimax/i2400m/rx.c +++ b/drivers/net/wimax/i2400m/rx.c | |||
@@ -819,10 +819,9 @@ void i2400m_roq_queue_update_ws(struct i2400m *i2400m, struct i2400m_roq *roq, | |||
819 | roq_data = (struct i2400m_roq_data *) &skb->cb; | 819 | roq_data = (struct i2400m_roq_data *) &skb->cb; |
820 | i2400m_net_erx(i2400m, skb, roq_data->cs); | 820 | i2400m_net_erx(i2400m, skb, roq_data->cs); |
821 | } | 821 | } |
822 | else { | 822 | else |
823 | __i2400m_roq_queue(i2400m, roq, skb, sn, nsn); | 823 | __i2400m_roq_queue(i2400m, roq, skb, sn, nsn); |
824 | __i2400m_roq_update_ws(i2400m, roq, sn + 1); | 824 | __i2400m_roq_update_ws(i2400m, roq, sn + 1); |
825 | } | ||
826 | i2400m_roq_log_add(i2400m, roq, I2400M_RO_TYPE_PACKET_WS, | 825 | i2400m_roq_log_add(i2400m, roq, I2400M_RO_TYPE_PACKET_WS, |
827 | old_ws, len, sn, nsn, roq->ws); | 826 | old_ws, len, sn, nsn, roq->ws); |
828 | } | 827 | } |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 34bf0fdf5047..1a91bf9687af 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -557,7 +557,8 @@ static int pci_platform_power_transition(struct pci_dev *dev, pci_power_t state) | |||
557 | } else { | 557 | } else { |
558 | error = -ENODEV; | 558 | error = -ENODEV; |
559 | /* Fall back to PCI_D0 if native PM is not supported */ | 559 | /* Fall back to PCI_D0 if native PM is not supported */ |
560 | pci_update_current_state(dev, PCI_D0); | 560 | if (!dev->pm_cap) |
561 | dev->current_state = PCI_D0; | ||
561 | } | 562 | } |
562 | 563 | ||
563 | return error; | 564 | return error; |
diff --git a/drivers/rtc/rtc-pl030.c b/drivers/rtc/rtc-pl030.c index 826153552157..aaf1f75fa293 100644 --- a/drivers/rtc/rtc-pl030.c +++ b/drivers/rtc/rtc-pl030.c | |||
@@ -102,7 +102,7 @@ static const struct rtc_class_ops pl030_ops = { | |||
102 | .set_alarm = pl030_set_alarm, | 102 | .set_alarm = pl030_set_alarm, |
103 | }; | 103 | }; |
104 | 104 | ||
105 | static int pl030_probe(struct amba_device *dev, void *id) | 105 | static int pl030_probe(struct amba_device *dev, struct amba_id *id) |
106 | { | 106 | { |
107 | struct pl030_rtc *rtc; | 107 | struct pl030_rtc *rtc; |
108 | int ret; | 108 | int ret; |
diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c index 333eec689d2f..451fc13784d1 100644 --- a/drivers/rtc/rtc-pl031.c +++ b/drivers/rtc/rtc-pl031.c | |||
@@ -127,7 +127,7 @@ static int pl031_remove(struct amba_device *adev) | |||
127 | return 0; | 127 | return 0; |
128 | } | 128 | } |
129 | 129 | ||
130 | static int pl031_probe(struct amba_device *adev, void *id) | 130 | static int pl031_probe(struct amba_device *adev, struct amba_id *id) |
131 | { | 131 | { |
132 | int ret; | 132 | int ret; |
133 | struct pl031_local *ldata; | 133 | struct pl031_local *ldata; |
diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c index e3a5ad5ef1d6..cdc049d4350f 100644 --- a/drivers/serial/amba-pl010.c +++ b/drivers/serial/amba-pl010.c | |||
@@ -665,7 +665,7 @@ static struct uart_driver amba_reg = { | |||
665 | .cons = AMBA_CONSOLE, | 665 | .cons = AMBA_CONSOLE, |
666 | }; | 666 | }; |
667 | 667 | ||
668 | static int pl010_probe(struct amba_device *dev, void *id) | 668 | static int pl010_probe(struct amba_device *dev, struct amba_id *id) |
669 | { | 669 | { |
670 | struct uart_amba_port *uap; | 670 | struct uart_amba_port *uap; |
671 | void __iomem *base; | 671 | void __iomem *base; |
diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c index 8b2b9700f3e4..88fdac51b6c5 100644 --- a/drivers/serial/amba-pl011.c +++ b/drivers/serial/amba-pl011.c | |||
@@ -729,7 +729,7 @@ static struct uart_driver amba_reg = { | |||
729 | .cons = AMBA_CONSOLE, | 729 | .cons = AMBA_CONSOLE, |
730 | }; | 730 | }; |
731 | 731 | ||
732 | static int pl011_probe(struct amba_device *dev, void *id) | 732 | static int pl011_probe(struct amba_device *dev, struct amba_id *id) |
733 | { | 733 | { |
734 | struct uart_amba_port *uap; | 734 | struct uart_amba_port *uap; |
735 | void __iomem *base; | 735 | void __iomem *base; |
diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c index 61050ab14128..d1f80bac54f0 100644 --- a/drivers/video/amba-clcd.c +++ b/drivers/video/amba-clcd.c | |||
@@ -437,7 +437,7 @@ static int clcdfb_register(struct clcd_fb *fb) | |||
437 | return ret; | 437 | return ret; |
438 | } | 438 | } |
439 | 439 | ||
440 | static int clcdfb_probe(struct amba_device *dev, void *id) | 440 | static int clcdfb_probe(struct amba_device *dev, struct amba_id *id) |
441 | { | 441 | { |
442 | struct clcd_board *board = dev->dev.platform_data; | 442 | struct clcd_board *board = dev->dev.platform_data; |
443 | struct clcd_fb *fb; | 443 | struct clcd_fb *fb; |
diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c index dfb72f5e4c96..148cbcc39602 100644 --- a/drivers/video/omap/dispc.c +++ b/drivers/video/omap/dispc.c | |||
@@ -880,20 +880,22 @@ static irqreturn_t omap_dispc_irq_handler(int irq, void *dev) | |||
880 | 880 | ||
881 | static int get_dss_clocks(void) | 881 | static int get_dss_clocks(void) |
882 | { | 882 | { |
883 | if (IS_ERR((dispc.dss_ick = clk_get(dispc.fbdev->dev, "dss_ick")))) { | 883 | dispc.dss_ick = clk_get(dispc.fbdev->dev, "ick"); |
884 | dev_err(dispc.fbdev->dev, "can't get dss_ick\n"); | 884 | if (IS_ERR(dispc.dss_ick)) { |
885 | dev_err(dispc.fbdev->dev, "can't get ick\n"); | ||
885 | return PTR_ERR(dispc.dss_ick); | 886 | return PTR_ERR(dispc.dss_ick); |
886 | } | 887 | } |
887 | 888 | ||
888 | if (IS_ERR((dispc.dss1_fck = clk_get(dispc.fbdev->dev, "dss1_fck")))) { | 889 | dispc.dss1_fck = clk_get(dispc.fbdev->dev, "dss1_fck"); |
890 | if (IS_ERR(dispc.dss1_fck)) { | ||
889 | dev_err(dispc.fbdev->dev, "can't get dss1_fck\n"); | 891 | dev_err(dispc.fbdev->dev, "can't get dss1_fck\n"); |
890 | clk_put(dispc.dss_ick); | 892 | clk_put(dispc.dss_ick); |
891 | return PTR_ERR(dispc.dss1_fck); | 893 | return PTR_ERR(dispc.dss1_fck); |
892 | } | 894 | } |
893 | 895 | ||
894 | if (IS_ERR((dispc.dss_54m_fck = | 896 | dispc.dss_54m_fck = clk_get(dispc.fbdev->dev, "tv_fck"); |
895 | clk_get(dispc.fbdev->dev, "dss_54m_fck")))) { | 897 | if (IS_ERR(dispc.dss_54m_fck)) { |
896 | dev_err(dispc.fbdev->dev, "can't get dss_54m_fck\n"); | 898 | dev_err(dispc.fbdev->dev, "can't get tv_fck\n"); |
897 | clk_put(dispc.dss_ick); | 899 | clk_put(dispc.dss_ick); |
898 | clk_put(dispc.dss1_fck); | 900 | clk_put(dispc.dss1_fck); |
899 | return PTR_ERR(dispc.dss_54m_fck); | 901 | return PTR_ERR(dispc.dss_54m_fck); |
diff --git a/drivers/video/omap/rfbi.c b/drivers/video/omap/rfbi.c index a13c8dcad2a8..9332d6ca6456 100644 --- a/drivers/video/omap/rfbi.c +++ b/drivers/video/omap/rfbi.c | |||
@@ -83,12 +83,14 @@ static inline u32 rfbi_read_reg(int idx) | |||
83 | 83 | ||
84 | static int rfbi_get_clocks(void) | 84 | static int rfbi_get_clocks(void) |
85 | { | 85 | { |
86 | if (IS_ERR((rfbi.dss_ick = clk_get(rfbi.fbdev->dev, "dss_ick")))) { | 86 | rfbi.dss_ick = clk_get(rfbi.fbdev->dev, "ick"); |
87 | dev_err(rfbi.fbdev->dev, "can't get dss_ick\n"); | 87 | if (IS_ERR(rfbi.dss_ick)) { |
88 | dev_err(rfbi.fbdev->dev, "can't get ick\n"); | ||
88 | return PTR_ERR(rfbi.dss_ick); | 89 | return PTR_ERR(rfbi.dss_ick); |
89 | } | 90 | } |
90 | 91 | ||
91 | if (IS_ERR((rfbi.dss1_fck = clk_get(rfbi.fbdev->dev, "dss1_fck")))) { | 92 | rfbi.dss1_fck = clk_get(rfbi.fbdev->dev, "dss1_fck"); |
93 | if (IS_ERR(rfbi.dss1_fck)) { | ||
92 | dev_err(rfbi.fbdev->dev, "can't get dss1_fck\n"); | 94 | dev_err(rfbi.fbdev->dev, "can't get dss1_fck\n"); |
93 | clk_put(rfbi.dss_ick); | 95 | clk_put(rfbi.dss_ick); |
94 | return PTR_ERR(rfbi.dss1_fck); | 96 | return PTR_ERR(rfbi.dss1_fck); |
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index 92ea0ab44ce2..f10d2fbeda06 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c | |||
@@ -47,6 +47,7 @@ struct sh_mobile_lcdc_priv { | |||
47 | #endif | 47 | #endif |
48 | unsigned long lddckr; | 48 | unsigned long lddckr; |
49 | struct sh_mobile_lcdc_chan ch[2]; | 49 | struct sh_mobile_lcdc_chan ch[2]; |
50 | int started; | ||
50 | }; | 51 | }; |
51 | 52 | ||
52 | /* shared registers */ | 53 | /* shared registers */ |
@@ -451,6 +452,7 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv) | |||
451 | 452 | ||
452 | /* start the lcdc */ | 453 | /* start the lcdc */ |
453 | sh_mobile_lcdc_start_stop(priv, 1); | 454 | sh_mobile_lcdc_start_stop(priv, 1); |
455 | priv->started = 1; | ||
454 | 456 | ||
455 | /* tell the board code to enable the panel */ | 457 | /* tell the board code to enable the panel */ |
456 | for (k = 0; k < ARRAY_SIZE(priv->ch); k++) { | 458 | for (k = 0; k < ARRAY_SIZE(priv->ch); k++) { |
@@ -493,7 +495,10 @@ static void sh_mobile_lcdc_stop(struct sh_mobile_lcdc_priv *priv) | |||
493 | } | 495 | } |
494 | 496 | ||
495 | /* stop the lcdc */ | 497 | /* stop the lcdc */ |
496 | sh_mobile_lcdc_start_stop(priv, 0); | 498 | if (priv->started) { |
499 | sh_mobile_lcdc_start_stop(priv, 0); | ||
500 | priv->started = 0; | ||
501 | } | ||
497 | 502 | ||
498 | /* stop clocks */ | 503 | /* stop clocks */ |
499 | for (k = 0; k < ARRAY_SIZE(priv->ch); k++) | 504 | for (k = 0; k < ARRAY_SIZE(priv->ch); k++) |
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 5759ba53dc96..d06260251c30 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -2475,7 +2475,7 @@ querySymLinkRetry: | |||
2475 | /* BB FIXME investigate remapping reserved chars here */ | 2475 | /* BB FIXME investigate remapping reserved chars here */ |
2476 | *symlinkinfo = cifs_strndup_from_ucs(data_start, count, | 2476 | *symlinkinfo = cifs_strndup_from_ucs(data_start, count, |
2477 | is_unicode, nls_codepage); | 2477 | is_unicode, nls_codepage); |
2478 | if (!symlinkinfo) | 2478 | if (!*symlinkinfo) |
2479 | rc = -ENOMEM; | 2479 | rc = -ENOMEM; |
2480 | } | 2480 | } |
2481 | } | 2481 | } |
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 11431ed72a7f..f49d684edd96 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c | |||
@@ -225,6 +225,7 @@ int cifs_posix_open(char *full_path, struct inode **pinode, | |||
225 | if (!(oflags & FMODE_READ)) | 225 | if (!(oflags & FMODE_READ)) |
226 | write_only = true; | 226 | write_only = true; |
227 | 227 | ||
228 | mode &= ~current_umask(); | ||
228 | rc = CIFSPOSIXCreate(xid, cifs_sb->tcon, posix_flags, mode, | 229 | rc = CIFSPOSIXCreate(xid, cifs_sb->tcon, posix_flags, mode, |
229 | pnetfid, presp_data, &oplock, full_path, | 230 | pnetfid, presp_data, &oplock, full_path, |
230 | cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & | 231 | cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & |
@@ -310,7 +311,6 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, | |||
310 | return -ENOMEM; | 311 | return -ENOMEM; |
311 | } | 312 | } |
312 | 313 | ||
313 | mode &= ~current_umask(); | ||
314 | if (oplockEnabled) | 314 | if (oplockEnabled) |
315 | oplock = REQ_OPLOCK; | 315 | oplock = REQ_OPLOCK; |
316 | 316 | ||
@@ -336,7 +336,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, | |||
336 | else /* success, no need to query */ | 336 | else /* success, no need to query */ |
337 | goto cifs_create_set_dentry; | 337 | goto cifs_create_set_dentry; |
338 | } else if ((rc != -EIO) && (rc != -EREMOTE) && | 338 | } else if ((rc != -EIO) && (rc != -EREMOTE) && |
339 | (rc != -EOPNOTSUPP)) /* path not found or net err */ | 339 | (rc != -EOPNOTSUPP) && (rc != -EINVAL)) |
340 | goto cifs_create_out; | 340 | goto cifs_create_out; |
341 | /* else fallthrough to retry, using older open call, this is | 341 | /* else fallthrough to retry, using older open call, this is |
342 | case where server does not support this SMB level, and | 342 | case where server does not support this SMB level, and |
@@ -609,7 +609,6 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry, | |||
609 | int xid; | 609 | int xid; |
610 | int rc = 0; /* to get around spurious gcc warning, set to zero here */ | 610 | int rc = 0; /* to get around spurious gcc warning, set to zero here */ |
611 | int oplock = 0; | 611 | int oplock = 0; |
612 | int mode; | ||
613 | __u16 fileHandle = 0; | 612 | __u16 fileHandle = 0; |
614 | bool posix_open = false; | 613 | bool posix_open = false; |
615 | struct cifs_sb_info *cifs_sb; | 614 | struct cifs_sb_info *cifs_sb; |
@@ -660,13 +659,12 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry, | |||
660 | 659 | ||
661 | if (pTcon->unix_ext) { | 660 | if (pTcon->unix_ext) { |
662 | if (!(nd->flags & (LOOKUP_PARENT | LOOKUP_DIRECTORY)) && | 661 | if (!(nd->flags & (LOOKUP_PARENT | LOOKUP_DIRECTORY)) && |
663 | (nd->flags & LOOKUP_OPEN)) { | 662 | (nd->flags & LOOKUP_OPEN) && !pTcon->broken_posix_open) { |
664 | if (!((nd->intent.open.flags & O_CREAT) && | 663 | if (!((nd->intent.open.flags & O_CREAT) && |
665 | (nd->intent.open.flags & O_EXCL))) { | 664 | (nd->intent.open.flags & O_EXCL))) { |
666 | mode = nd->intent.open.create_mode & | ||
667 | ~current_umask(); | ||
668 | rc = cifs_posix_open(full_path, &newInode, | 665 | rc = cifs_posix_open(full_path, &newInode, |
669 | parent_dir_inode->i_sb, mode, | 666 | parent_dir_inode->i_sb, |
667 | nd->intent.open.create_mode, | ||
670 | nd->intent.open.flags, &oplock, | 668 | nd->intent.open.flags, &oplock, |
671 | &fileHandle, xid); | 669 | &fileHandle, xid); |
672 | /* | 670 | /* |
@@ -681,6 +679,8 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry, | |||
681 | */ | 679 | */ |
682 | if ((rc != -EINVAL) && (rc != -EOPNOTSUPP)) | 680 | if ((rc != -EINVAL) && (rc != -EOPNOTSUPP)) |
683 | posix_open = true; | 681 | posix_open = true; |
682 | else | ||
683 | pTcon->broken_posix_open = true; | ||
684 | } | 684 | } |
685 | } | 685 | } |
686 | if (!posix_open) | 686 | if (!posix_open) |
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 38c06f826575..302ea15f02e6 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -130,10 +130,6 @@ static inline int cifs_posix_open_inode_helper(struct inode *inode, | |||
130 | struct cifsFileInfo *pCifsFile, int oplock, u16 netfid) | 130 | struct cifsFileInfo *pCifsFile, int oplock, u16 netfid) |
131 | { | 131 | { |
132 | 132 | ||
133 | file->private_data = kmalloc(sizeof(struct cifsFileInfo), GFP_KERNEL); | ||
134 | if (file->private_data == NULL) | ||
135 | return -ENOMEM; | ||
136 | pCifsFile = cifs_init_private(file->private_data, inode, file, netfid); | ||
137 | write_lock(&GlobalSMBSeslock); | 133 | write_lock(&GlobalSMBSeslock); |
138 | 134 | ||
139 | pCifsInode = CIFS_I(file->f_path.dentry->d_inode); | 135 | pCifsInode = CIFS_I(file->f_path.dentry->d_inode); |
@@ -184,6 +180,38 @@ psx_client_can_cache: | |||
184 | return 0; | 180 | return 0; |
185 | } | 181 | } |
186 | 182 | ||
183 | static struct cifsFileInfo * | ||
184 | cifs_fill_filedata(struct file *file) | ||
185 | { | ||
186 | struct list_head *tmp; | ||
187 | struct cifsFileInfo *pCifsFile = NULL; | ||
188 | struct cifsInodeInfo *pCifsInode = NULL; | ||
189 | |||
190 | /* search inode for this file and fill in file->private_data */ | ||
191 | pCifsInode = CIFS_I(file->f_path.dentry->d_inode); | ||
192 | read_lock(&GlobalSMBSeslock); | ||
193 | list_for_each(tmp, &pCifsInode->openFileList) { | ||
194 | pCifsFile = list_entry(tmp, struct cifsFileInfo, flist); | ||
195 | if ((pCifsFile->pfile == NULL) && | ||
196 | (pCifsFile->pid == current->tgid)) { | ||
197 | /* mode set in cifs_create */ | ||
198 | |||
199 | /* needed for writepage */ | ||
200 | pCifsFile->pfile = file; | ||
201 | file->private_data = pCifsFile; | ||
202 | break; | ||
203 | } | ||
204 | } | ||
205 | read_unlock(&GlobalSMBSeslock); | ||
206 | |||
207 | if (file->private_data != NULL) { | ||
208 | return pCifsFile; | ||
209 | } else if ((file->f_flags & O_CREAT) && (file->f_flags & O_EXCL)) | ||
210 | cERROR(1, ("could not find file instance for " | ||
211 | "new file %p", file)); | ||
212 | return NULL; | ||
213 | } | ||
214 | |||
187 | /* all arguments to this function must be checked for validity in caller */ | 215 | /* all arguments to this function must be checked for validity in caller */ |
188 | static inline int cifs_open_inode_helper(struct inode *inode, struct file *file, | 216 | static inline int cifs_open_inode_helper(struct inode *inode, struct file *file, |
189 | struct cifsInodeInfo *pCifsInode, struct cifsFileInfo *pCifsFile, | 217 | struct cifsInodeInfo *pCifsInode, struct cifsFileInfo *pCifsFile, |
@@ -258,7 +286,6 @@ int cifs_open(struct inode *inode, struct file *file) | |||
258 | struct cifsTconInfo *tcon; | 286 | struct cifsTconInfo *tcon; |
259 | struct cifsFileInfo *pCifsFile; | 287 | struct cifsFileInfo *pCifsFile; |
260 | struct cifsInodeInfo *pCifsInode; | 288 | struct cifsInodeInfo *pCifsInode; |
261 | struct list_head *tmp; | ||
262 | char *full_path = NULL; | 289 | char *full_path = NULL; |
263 | int desiredAccess; | 290 | int desiredAccess; |
264 | int disposition; | 291 | int disposition; |
@@ -270,32 +297,12 @@ int cifs_open(struct inode *inode, struct file *file) | |||
270 | cifs_sb = CIFS_SB(inode->i_sb); | 297 | cifs_sb = CIFS_SB(inode->i_sb); |
271 | tcon = cifs_sb->tcon; | 298 | tcon = cifs_sb->tcon; |
272 | 299 | ||
273 | /* search inode for this file and fill in file->private_data */ | ||
274 | pCifsInode = CIFS_I(file->f_path.dentry->d_inode); | 300 | pCifsInode = CIFS_I(file->f_path.dentry->d_inode); |
275 | read_lock(&GlobalSMBSeslock); | 301 | pCifsFile = cifs_fill_filedata(file); |
276 | list_for_each(tmp, &pCifsInode->openFileList) { | 302 | if (pCifsFile) { |
277 | pCifsFile = list_entry(tmp, struct cifsFileInfo, | ||
278 | flist); | ||
279 | if ((pCifsFile->pfile == NULL) && | ||
280 | (pCifsFile->pid == current->tgid)) { | ||
281 | /* mode set in cifs_create */ | ||
282 | |||
283 | /* needed for writepage */ | ||
284 | pCifsFile->pfile = file; | ||
285 | |||
286 | file->private_data = pCifsFile; | ||
287 | break; | ||
288 | } | ||
289 | } | ||
290 | read_unlock(&GlobalSMBSeslock); | ||
291 | |||
292 | if (file->private_data != NULL) { | ||
293 | rc = 0; | ||
294 | FreeXid(xid); | 303 | FreeXid(xid); |
295 | return rc; | 304 | return 0; |
296 | } else if ((file->f_flags & O_CREAT) && (file->f_flags & O_EXCL)) | 305 | } |
297 | cERROR(1, ("could not find file instance for " | ||
298 | "new file %p", file)); | ||
299 | 306 | ||
300 | full_path = build_path_from_dentry(file->f_path.dentry); | 307 | full_path = build_path_from_dentry(file->f_path.dentry); |
301 | if (full_path == NULL) { | 308 | if (full_path == NULL) { |
@@ -325,6 +332,7 @@ int cifs_open(struct inode *inode, struct file *file) | |||
325 | /* no need for special case handling of setting mode | 332 | /* no need for special case handling of setting mode |
326 | on read only files needed here */ | 333 | on read only files needed here */ |
327 | 334 | ||
335 | pCifsFile = cifs_fill_filedata(file); | ||
328 | cifs_posix_open_inode_helper(inode, file, pCifsInode, | 336 | cifs_posix_open_inode_helper(inode, file, pCifsInode, |
329 | pCifsFile, oplock, netfid); | 337 | pCifsFile, oplock, netfid); |
330 | goto out; | 338 | goto out; |
diff --git a/fs/cifs/link.c b/fs/cifs/link.c index ea9d11e3dcbb..cd83c53fcbb5 100644 --- a/fs/cifs/link.c +++ b/fs/cifs/link.c | |||
@@ -107,48 +107,48 @@ void * | |||
107 | cifs_follow_link(struct dentry *direntry, struct nameidata *nd) | 107 | cifs_follow_link(struct dentry *direntry, struct nameidata *nd) |
108 | { | 108 | { |
109 | struct inode *inode = direntry->d_inode; | 109 | struct inode *inode = direntry->d_inode; |
110 | int rc = -EACCES; | 110 | int rc = -ENOMEM; |
111 | int xid; | 111 | int xid; |
112 | char *full_path = NULL; | 112 | char *full_path = NULL; |
113 | char *target_path = ERR_PTR(-ENOMEM); | 113 | char *target_path = NULL; |
114 | struct cifs_sb_info *cifs_sb; | 114 | struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); |
115 | struct cifsTconInfo *pTcon; | 115 | struct cifsTconInfo *tcon = cifs_sb->tcon; |
116 | 116 | ||
117 | xid = GetXid(); | 117 | xid = GetXid(); |
118 | 118 | ||
119 | full_path = build_path_from_dentry(direntry); | 119 | /* |
120 | * For now, we just handle symlinks with unix extensions enabled. | ||
121 | * Eventually we should handle NTFS reparse points, and MacOS | ||
122 | * symlink support. For instance... | ||
123 | * | ||
124 | * rc = CIFSSMBQueryReparseLinkInfo(...) | ||
125 | * | ||
126 | * For now, just return -EACCES when the server doesn't support posix | ||
127 | * extensions. Note that we still allow querying symlinks when posix | ||
128 | * extensions are manually disabled. We could disable these as well | ||
129 | * but there doesn't seem to be any harm in allowing the client to | ||
130 | * read them. | ||
131 | */ | ||
132 | if (!(tcon->ses->capabilities & CAP_UNIX)) { | ||
133 | rc = -EACCES; | ||
134 | goto out; | ||
135 | } | ||
120 | 136 | ||
137 | full_path = build_path_from_dentry(direntry); | ||
121 | if (!full_path) | 138 | if (!full_path) |
122 | goto out; | 139 | goto out; |
123 | 140 | ||
124 | cFYI(1, ("Full path: %s inode = 0x%p", full_path, inode)); | 141 | cFYI(1, ("Full path: %s inode = 0x%p", full_path, inode)); |
125 | cifs_sb = CIFS_SB(inode->i_sb); | ||
126 | pTcon = cifs_sb->tcon; | ||
127 | |||
128 | /* We could change this to: | ||
129 | if (pTcon->unix_ext) | ||
130 | but there does not seem any point in refusing to | ||
131 | get symlink info if we can, even if unix extensions | ||
132 | turned off for this mount */ | ||
133 | |||
134 | if (pTcon->ses->capabilities & CAP_UNIX) | ||
135 | rc = CIFSSMBUnixQuerySymLink(xid, pTcon, full_path, | ||
136 | &target_path, | ||
137 | cifs_sb->local_nls); | ||
138 | else { | ||
139 | /* BB add read reparse point symlink code here */ | ||
140 | /* rc = CIFSSMBQueryReparseLinkInfo */ | ||
141 | /* BB Add code to Query ReparsePoint info */ | ||
142 | /* BB Add MAC style xsymlink check here if enabled */ | ||
143 | } | ||
144 | 142 | ||
143 | rc = CIFSSMBUnixQuerySymLink(xid, tcon, full_path, &target_path, | ||
144 | cifs_sb->local_nls); | ||
145 | kfree(full_path); | ||
146 | out: | ||
145 | if (rc != 0) { | 147 | if (rc != 0) { |
146 | kfree(target_path); | 148 | kfree(target_path); |
147 | target_path = ERR_PTR(rc); | 149 | target_path = ERR_PTR(rc); |
148 | } | 150 | } |
149 | 151 | ||
150 | kfree(full_path); | ||
151 | out: | ||
152 | FreeXid(xid); | 152 | FreeXid(xid); |
153 | nd_set_link(nd, target_path); | 153 | nd_set_link(nd, target_path); |
154 | return NULL; | 154 | return NULL; |
diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c index 50ff3f2cdf24..d6759b92006f 100644 --- a/fs/nilfs2/ioctl.c +++ b/fs/nilfs2/ioctl.c | |||
@@ -576,7 +576,7 @@ static int nilfs_ioctl_clean_segments(struct inode *inode, struct file *filp, | |||
576 | ret = nilfs_clean_segments(inode->i_sb, argv, kbufs); | 576 | ret = nilfs_clean_segments(inode->i_sb, argv, kbufs); |
577 | 577 | ||
578 | out_free: | 578 | out_free: |
579 | while (--n > 0) | 579 | while (--n >= 0) |
580 | vfree(kbufs[n]); | 580 | vfree(kbufs[n]); |
581 | kfree(kbufs[4]); | 581 | kfree(kbufs[4]); |
582 | return ret; | 582 | return ret; |
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h index 51e6e54b2aa1..9b93cafa82a0 100644 --- a/include/linux/amba/bus.h +++ b/include/linux/amba/bus.h | |||
@@ -28,7 +28,7 @@ struct amba_id { | |||
28 | 28 | ||
29 | struct amba_driver { | 29 | struct amba_driver { |
30 | struct device_driver drv; | 30 | struct device_driver drv; |
31 | int (*probe)(struct amba_device *, void *); | 31 | int (*probe)(struct amba_device *, struct amba_id *); |
32 | int (*remove)(struct amba_device *); | 32 | int (*remove)(struct amba_device *); |
33 | void (*shutdown)(struct amba_device *); | 33 | void (*shutdown)(struct amba_device *); |
34 | int (*suspend)(struct amba_device *, pm_message_t); | 34 | int (*suspend)(struct amba_device *, pm_message_t); |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 34c128f0a33c..867cb68d8461 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1103,7 +1103,7 @@ void ide_fix_driveid(u16 *); | |||
1103 | 1103 | ||
1104 | extern void ide_fixstring(u8 *, const int, const int); | 1104 | extern void ide_fixstring(u8 *, const int, const int); |
1105 | 1105 | ||
1106 | int ide_busy_sleep(ide_hwif_t *, unsigned long, int); | 1106 | int ide_busy_sleep(ide_drive_t *, unsigned long, int); |
1107 | 1107 | ||
1108 | int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long); | 1108 | int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long); |
1109 | 1109 | ||
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 186ec6ab334d..a47c879e1304 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -1097,6 +1097,32 @@ unsigned long __init node_memmap_size_bytes(int, unsigned long, unsigned long); | |||
1097 | #define pfn_valid_within(pfn) (1) | 1097 | #define pfn_valid_within(pfn) (1) |
1098 | #endif | 1098 | #endif |
1099 | 1099 | ||
1100 | #ifdef CONFIG_ARCH_HAS_HOLES_MEMORYMODEL | ||
1101 | /* | ||
1102 | * pfn_valid() is meant to be able to tell if a given PFN has valid memmap | ||
1103 | * associated with it or not. In FLATMEM, it is expected that holes always | ||
1104 | * have valid memmap as long as there is valid PFNs either side of the hole. | ||
1105 | * In SPARSEMEM, it is assumed that a valid section has a memmap for the | ||
1106 | * entire section. | ||
1107 | * | ||
1108 | * However, an ARM, and maybe other embedded architectures in the future | ||
1109 | * free memmap backing holes to save memory on the assumption the memmap is | ||
1110 | * never used. The page_zone linkages are then broken even though pfn_valid() | ||
1111 | * returns true. A walker of the full memmap must then do this additional | ||
1112 | * check to ensure the memmap they are looking at is sane by making sure | ||
1113 | * the zone and PFN linkages are still valid. This is expensive, but walkers | ||
1114 | * of the full memmap are extremely rare. | ||
1115 | */ | ||
1116 | int memmap_valid_within(unsigned long pfn, | ||
1117 | struct page *page, struct zone *zone); | ||
1118 | #else | ||
1119 | static inline int memmap_valid_within(unsigned long pfn, | ||
1120 | struct page *page, struct zone *zone) | ||
1121 | { | ||
1122 | return 1; | ||
1123 | } | ||
1124 | #endif /* CONFIG_ARCH_HAS_HOLES_MEMORYMODEL */ | ||
1125 | |||
1100 | #endif /* !__GENERATING_BOUNDS.H */ | 1126 | #endif /* !__GENERATING_BOUNDS.H */ |
1101 | #endif /* !__ASSEMBLY__ */ | 1127 | #endif /* !__ASSEMBLY__ */ |
1102 | #endif /* _LINUX_MMZONE_H */ | 1128 | #endif /* _LINUX_MMZONE_H */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 06ba90c211a5..0f71812d67d3 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1406,7 +1406,7 @@ | |||
1406 | #define PCI_DEVICE_ID_VIA_82C598_1 0x8598 | 1406 | #define PCI_DEVICE_ID_VIA_82C598_1 0x8598 |
1407 | #define PCI_DEVICE_ID_VIA_838X_1 0xB188 | 1407 | #define PCI_DEVICE_ID_VIA_838X_1 0xB188 |
1408 | #define PCI_DEVICE_ID_VIA_83_87XX_1 0xB198 | 1408 | #define PCI_DEVICE_ID_VIA_83_87XX_1 0xB198 |
1409 | #define PCI_DEVICE_ID_VIA_C409_IDE 0XC409 | 1409 | #define PCI_DEVICE_ID_VIA_VX855_IDE 0xC409 |
1410 | #define PCI_DEVICE_ID_VIA_ANON 0xFFFF | 1410 | #define PCI_DEVICE_ID_VIA_ANON 0xFFFF |
1411 | 1411 | ||
1412 | #define PCI_VENDOR_ID_SIEMENS 0x110A | 1412 | #define PCI_VENDOR_ID_SIEMENS 0x110A |
diff --git a/kernel/futex.c b/kernel/futex.c index eef8cd26b5e5..d546b2d53a62 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
@@ -193,6 +193,7 @@ static void drop_futex_key_refs(union futex_key *key) | |||
193 | * @uaddr: virtual address of the futex | 193 | * @uaddr: virtual address of the futex |
194 | * @fshared: 0 for a PROCESS_PRIVATE futex, 1 for PROCESS_SHARED | 194 | * @fshared: 0 for a PROCESS_PRIVATE futex, 1 for PROCESS_SHARED |
195 | * @key: address where result is stored. | 195 | * @key: address where result is stored. |
196 | * @rw: mapping needs to be read/write (values: VERIFY_READ, VERIFY_WRITE) | ||
196 | * | 197 | * |
197 | * Returns a negative error code or 0 | 198 | * Returns a negative error code or 0 |
198 | * The key words are stored in *key on success. | 199 | * The key words are stored in *key on success. |
@@ -203,7 +204,8 @@ static void drop_futex_key_refs(union futex_key *key) | |||
203 | * | 204 | * |
204 | * lock_page() might sleep, the caller should not hold a spinlock. | 205 | * lock_page() might sleep, the caller should not hold a spinlock. |
205 | */ | 206 | */ |
206 | static int get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key) | 207 | static int |
208 | get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key, int rw) | ||
207 | { | 209 | { |
208 | unsigned long address = (unsigned long)uaddr; | 210 | unsigned long address = (unsigned long)uaddr; |
209 | struct mm_struct *mm = current->mm; | 211 | struct mm_struct *mm = current->mm; |
@@ -226,7 +228,7 @@ static int get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key) | |||
226 | * but access_ok() should be faster than find_vma() | 228 | * but access_ok() should be faster than find_vma() |
227 | */ | 229 | */ |
228 | if (!fshared) { | 230 | if (!fshared) { |
229 | if (unlikely(!access_ok(VERIFY_WRITE, uaddr, sizeof(u32)))) | 231 | if (unlikely(!access_ok(rw, uaddr, sizeof(u32)))) |
230 | return -EFAULT; | 232 | return -EFAULT; |
231 | key->private.mm = mm; | 233 | key->private.mm = mm; |
232 | key->private.address = address; | 234 | key->private.address = address; |
@@ -235,7 +237,7 @@ static int get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key) | |||
235 | } | 237 | } |
236 | 238 | ||
237 | again: | 239 | again: |
238 | err = get_user_pages_fast(address, 1, 0, &page); | 240 | err = get_user_pages_fast(address, 1, rw == VERIFY_WRITE, &page); |
239 | if (err < 0) | 241 | if (err < 0) |
240 | return err; | 242 | return err; |
241 | 243 | ||
@@ -677,7 +679,7 @@ static int futex_wake(u32 __user *uaddr, int fshared, int nr_wake, u32 bitset) | |||
677 | if (!bitset) | 679 | if (!bitset) |
678 | return -EINVAL; | 680 | return -EINVAL; |
679 | 681 | ||
680 | ret = get_futex_key(uaddr, fshared, &key); | 682 | ret = get_futex_key(uaddr, fshared, &key, VERIFY_READ); |
681 | if (unlikely(ret != 0)) | 683 | if (unlikely(ret != 0)) |
682 | goto out; | 684 | goto out; |
683 | 685 | ||
@@ -723,10 +725,10 @@ futex_wake_op(u32 __user *uaddr1, int fshared, u32 __user *uaddr2, | |||
723 | int ret, op_ret; | 725 | int ret, op_ret; |
724 | 726 | ||
725 | retry: | 727 | retry: |
726 | ret = get_futex_key(uaddr1, fshared, &key1); | 728 | ret = get_futex_key(uaddr1, fshared, &key1, VERIFY_READ); |
727 | if (unlikely(ret != 0)) | 729 | if (unlikely(ret != 0)) |
728 | goto out; | 730 | goto out; |
729 | ret = get_futex_key(uaddr2, fshared, &key2); | 731 | ret = get_futex_key(uaddr2, fshared, &key2, VERIFY_WRITE); |
730 | if (unlikely(ret != 0)) | 732 | if (unlikely(ret != 0)) |
731 | goto out_put_key1; | 733 | goto out_put_key1; |
732 | 734 | ||
@@ -814,10 +816,10 @@ static int futex_requeue(u32 __user *uaddr1, int fshared, u32 __user *uaddr2, | |||
814 | int ret, drop_count = 0; | 816 | int ret, drop_count = 0; |
815 | 817 | ||
816 | retry: | 818 | retry: |
817 | ret = get_futex_key(uaddr1, fshared, &key1); | 819 | ret = get_futex_key(uaddr1, fshared, &key1, VERIFY_READ); |
818 | if (unlikely(ret != 0)) | 820 | if (unlikely(ret != 0)) |
819 | goto out; | 821 | goto out; |
820 | ret = get_futex_key(uaddr2, fshared, &key2); | 822 | ret = get_futex_key(uaddr2, fshared, &key2, VERIFY_READ); |
821 | if (unlikely(ret != 0)) | 823 | if (unlikely(ret != 0)) |
822 | goto out_put_key1; | 824 | goto out_put_key1; |
823 | 825 | ||
@@ -1140,7 +1142,7 @@ static int futex_wait(u32 __user *uaddr, int fshared, | |||
1140 | q.bitset = bitset; | 1142 | q.bitset = bitset; |
1141 | retry: | 1143 | retry: |
1142 | q.key = FUTEX_KEY_INIT; | 1144 | q.key = FUTEX_KEY_INIT; |
1143 | ret = get_futex_key(uaddr, fshared, &q.key); | 1145 | ret = get_futex_key(uaddr, fshared, &q.key, VERIFY_READ); |
1144 | if (unlikely(ret != 0)) | 1146 | if (unlikely(ret != 0)) |
1145 | goto out; | 1147 | goto out; |
1146 | 1148 | ||
@@ -1330,7 +1332,7 @@ static int futex_lock_pi(u32 __user *uaddr, int fshared, | |||
1330 | q.pi_state = NULL; | 1332 | q.pi_state = NULL; |
1331 | retry: | 1333 | retry: |
1332 | q.key = FUTEX_KEY_INIT; | 1334 | q.key = FUTEX_KEY_INIT; |
1333 | ret = get_futex_key(uaddr, fshared, &q.key); | 1335 | ret = get_futex_key(uaddr, fshared, &q.key, VERIFY_WRITE); |
1334 | if (unlikely(ret != 0)) | 1336 | if (unlikely(ret != 0)) |
1335 | goto out; | 1337 | goto out; |
1336 | 1338 | ||
@@ -1594,7 +1596,7 @@ retry: | |||
1594 | if ((uval & FUTEX_TID_MASK) != task_pid_vnr(current)) | 1596 | if ((uval & FUTEX_TID_MASK) != task_pid_vnr(current)) |
1595 | return -EPERM; | 1597 | return -EPERM; |
1596 | 1598 | ||
1597 | ret = get_futex_key(uaddr, fshared, &key); | 1599 | ret = get_futex_key(uaddr, fshared, &key, VERIFY_WRITE); |
1598 | if (unlikely(ret != 0)) | 1600 | if (unlikely(ret != 0)) |
1599 | goto out; | 1601 | goto out; |
1600 | 1602 | ||
diff --git a/mm/mmzone.c b/mm/mmzone.c index 16ce8b955dcf..f5b7d1760213 100644 --- a/mm/mmzone.c +++ b/mm/mmzone.c | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | 7 | ||
8 | #include <linux/stddef.h> | 8 | #include <linux/stddef.h> |
9 | #include <linux/mm.h> | ||
9 | #include <linux/mmzone.h> | 10 | #include <linux/mmzone.h> |
10 | #include <linux/module.h> | 11 | #include <linux/module.h> |
11 | 12 | ||
@@ -72,3 +73,17 @@ struct zoneref *next_zones_zonelist(struct zoneref *z, | |||
72 | *zone = zonelist_zone(z); | 73 | *zone = zonelist_zone(z); |
73 | return z; | 74 | return z; |
74 | } | 75 | } |
76 | |||
77 | #ifdef CONFIG_ARCH_HAS_HOLES_MEMORYMODEL | ||
78 | int memmap_valid_within(unsigned long pfn, | ||
79 | struct page *page, struct zone *zone) | ||
80 | { | ||
81 | if (page_to_pfn(page) != pfn) | ||
82 | return 0; | ||
83 | |||
84 | if (page_zone(page) != zone) | ||
85 | return 0; | ||
86 | |||
87 | return 1; | ||
88 | } | ||
89 | #endif /* CONFIG_ARCH_HAS_HOLES_MEMORYMODEL */ | ||
@@ -14,7 +14,7 @@ | |||
14 | * Original design by Rik van Riel <riel@conectiva.com.br> 2001 | 14 | * Original design by Rik van Riel <riel@conectiva.com.br> 2001 |
15 | * File methods by Dave McCracken <dmccr@us.ibm.com> 2003, 2004 | 15 | * File methods by Dave McCracken <dmccr@us.ibm.com> 2003, 2004 |
16 | * Anonymous methods by Andrea Arcangeli <andrea@suse.de> 2004 | 16 | * Anonymous methods by Andrea Arcangeli <andrea@suse.de> 2004 |
17 | * Contributions by Hugh Dickins <hugh@veritas.com> 2003, 2004 | 17 | * Contributions by Hugh Dickins 2003, 2004 |
18 | */ | 18 | */ |
19 | 19 | ||
20 | /* | 20 | /* |
diff --git a/mm/vmstat.c b/mm/vmstat.c index 66f6130976cb..74d66dba0cbe 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c | |||
@@ -509,22 +509,11 @@ static void pagetypeinfo_showblockcount_print(struct seq_file *m, | |||
509 | continue; | 509 | continue; |
510 | 510 | ||
511 | page = pfn_to_page(pfn); | 511 | page = pfn_to_page(pfn); |
512 | #ifdef CONFIG_ARCH_FLATMEM_HAS_HOLES | 512 | |
513 | /* | 513 | /* Watch for unexpected holes punched in the memmap */ |
514 | * Ordinarily, memory holes in flatmem still have a valid | 514 | if (!memmap_valid_within(pfn, page, zone)) |
515 | * memmap for the PFN range. However, an architecture for | ||
516 | * embedded systems (e.g. ARM) can free up the memmap backing | ||
517 | * holes to save memory on the assumption the memmap is | ||
518 | * never used. The page_zone linkages are then broken even | ||
519 | * though pfn_valid() returns true. Skip the page if the | ||
520 | * linkages are broken. Even if this test passed, the impact | ||
521 | * is that the counters for the movable type are off but | ||
522 | * fragmentation monitoring is likely meaningless on small | ||
523 | * systems. | ||
524 | */ | ||
525 | if (page_zone(page) != zone) | ||
526 | continue; | 515 | continue; |
527 | #endif | 516 | |
528 | mtype = get_pageblock_migratetype(page); | 517 | mtype = get_pageblock_migratetype(page); |
529 | 518 | ||
530 | if (mtype < MIGRATE_TYPES) | 519 | if (mtype < MIGRATE_TYPES) |
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c index 30b88777c3df..5ee1a3682bf2 100644 --- a/net/bridge/br_input.c +++ b/net/bridge/br_input.c | |||
@@ -134,6 +134,10 @@ struct sk_buff *br_handle_frame(struct net_bridge_port *p, struct sk_buff *skb) | |||
134 | if (skb->protocol == htons(ETH_P_PAUSE)) | 134 | if (skb->protocol == htons(ETH_P_PAUSE)) |
135 | goto drop; | 135 | goto drop; |
136 | 136 | ||
137 | /* If STP is turned off, then forward */ | ||
138 | if (p->br->stp_enabled == BR_NO_STP && dest[5] == 0) | ||
139 | goto forward; | ||
140 | |||
137 | if (NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_IN, skb, skb->dev, | 141 | if (NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_IN, skb, skb->dev, |
138 | NULL, br_handle_local_finish)) | 142 | NULL, br_handle_local_finish)) |
139 | return NULL; /* frame consumed by filter */ | 143 | return NULL; /* frame consumed by filter */ |
@@ -141,6 +145,7 @@ struct sk_buff *br_handle_frame(struct net_bridge_port *p, struct sk_buff *skb) | |||
141 | return skb; /* continue processing */ | 145 | return skb; /* continue processing */ |
142 | } | 146 | } |
143 | 147 | ||
148 | forward: | ||
144 | switch (p->state) { | 149 | switch (p->state) { |
145 | case BR_STATE_FORWARDING: | 150 | case BR_STATE_FORWARDING: |
146 | rhook = rcu_dereference(br_should_route_hook); | 151 | rhook = rcu_dereference(br_should_route_hook); |
diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c index 6e63ec3f1fcf..0660515f3992 100644 --- a/net/bridge/br_stp.c +++ b/net/bridge/br_stp.c | |||
@@ -297,6 +297,9 @@ void br_topology_change_detection(struct net_bridge *br) | |||
297 | { | 297 | { |
298 | int isroot = br_is_root_bridge(br); | 298 | int isroot = br_is_root_bridge(br); |
299 | 299 | ||
300 | if (br->stp_enabled != BR_KERNEL_STP) | ||
301 | return; | ||
302 | |||
300 | pr_info("%s: topology change detected, %s\n", br->dev->name, | 303 | pr_info("%s: topology change detected, %s\n", br->dev->name, |
301 | isroot ? "propagating" : "sending tcn bpdu"); | 304 | isroot ? "propagating" : "sending tcn bpdu"); |
302 | 305 | ||
diff --git a/net/core/gen_estimator.c b/net/core/gen_estimator.c index 9cc9f95b109e..6d62d4618cfc 100644 --- a/net/core/gen_estimator.c +++ b/net/core/gen_estimator.c | |||
@@ -66,9 +66,9 @@ | |||
66 | 66 | ||
67 | NOTES. | 67 | NOTES. |
68 | 68 | ||
69 | * The stored value for avbps is scaled by 2^5, so that maximal | 69 | * avbps is scaled by 2^5, avpps is scaled by 2^10. |
70 | rate is ~1Gbit, avpps is scaled by 2^10. | 70 | * both values are reported as 32 bit unsigned values. bps can |
71 | 71 | overflow for fast links : max speed being 34360Mbit/sec | |
72 | * Minimal interval is HZ/4=250msec (it is the greatest common divisor | 72 | * Minimal interval is HZ/4=250msec (it is the greatest common divisor |
73 | for HZ=100 and HZ=1024 8)), maximal interval | 73 | for HZ=100 and HZ=1024 8)), maximal interval |
74 | is (HZ*2^EST_MAX_INTERVAL)/4 = 8sec. Shorter intervals | 74 | is (HZ*2^EST_MAX_INTERVAL)/4 = 8sec. Shorter intervals |
@@ -86,9 +86,9 @@ struct gen_estimator | |||
86 | spinlock_t *stats_lock; | 86 | spinlock_t *stats_lock; |
87 | int ewma_log; | 87 | int ewma_log; |
88 | u64 last_bytes; | 88 | u64 last_bytes; |
89 | u64 avbps; | ||
89 | u32 last_packets; | 90 | u32 last_packets; |
90 | u32 avpps; | 91 | u32 avpps; |
91 | u32 avbps; | ||
92 | struct rcu_head e_rcu; | 92 | struct rcu_head e_rcu; |
93 | struct rb_node node; | 93 | struct rb_node node; |
94 | }; | 94 | }; |
@@ -115,6 +115,7 @@ static void est_timer(unsigned long arg) | |||
115 | rcu_read_lock(); | 115 | rcu_read_lock(); |
116 | list_for_each_entry_rcu(e, &elist[idx].list, list) { | 116 | list_for_each_entry_rcu(e, &elist[idx].list, list) { |
117 | u64 nbytes; | 117 | u64 nbytes; |
118 | u64 brate; | ||
118 | u32 npackets; | 119 | u32 npackets; |
119 | u32 rate; | 120 | u32 rate; |
120 | 121 | ||
@@ -125,9 +126,9 @@ static void est_timer(unsigned long arg) | |||
125 | 126 | ||
126 | nbytes = e->bstats->bytes; | 127 | nbytes = e->bstats->bytes; |
127 | npackets = e->bstats->packets; | 128 | npackets = e->bstats->packets; |
128 | rate = (nbytes - e->last_bytes)<<(7 - idx); | 129 | brate = (nbytes - e->last_bytes)<<(7 - idx); |
129 | e->last_bytes = nbytes; | 130 | e->last_bytes = nbytes; |
130 | e->avbps += ((long)rate - (long)e->avbps) >> e->ewma_log; | 131 | e->avbps += ((s64)(brate - e->avbps)) >> e->ewma_log; |
131 | e->rate_est->bps = (e->avbps+0xF)>>5; | 132 | e->rate_est->bps = (e->avbps+0xF)>>5; |
132 | 133 | ||
133 | rate = (npackets - e->last_packets)<<(12 - idx); | 134 | rate = (npackets - e->last_packets)<<(12 - idx); |
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index b5873bdff612..64f51eec6576 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
@@ -175,9 +175,13 @@ static void service_arp_queue(struct netpoll_info *npi) | |||
175 | void netpoll_poll(struct netpoll *np) | 175 | void netpoll_poll(struct netpoll *np) |
176 | { | 176 | { |
177 | struct net_device *dev = np->dev; | 177 | struct net_device *dev = np->dev; |
178 | const struct net_device_ops *ops = dev->netdev_ops; | 178 | const struct net_device_ops *ops; |
179 | |||
180 | if (!dev || !netif_running(dev)) | ||
181 | return; | ||
179 | 182 | ||
180 | if (!dev || !netif_running(dev) || !ops->ndo_poll_controller) | 183 | ops = dev->netdev_ops; |
184 | if (!ops->ndo_poll_controller) | ||
181 | return; | 185 | return; |
182 | 186 | ||
183 | /* Process pending work on NIC */ | 187 | /* Process pending work on NIC */ |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index d152394b2611..e505b5392e1e 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -2288,7 +2288,7 @@ unsigned int skb_seq_read(unsigned int consumed, const u8 **data, | |||
2288 | next_skb: | 2288 | next_skb: |
2289 | block_limit = skb_headlen(st->cur_skb) + st->stepped_offset; | 2289 | block_limit = skb_headlen(st->cur_skb) + st->stepped_offset; |
2290 | 2290 | ||
2291 | if (abs_offset < block_limit) { | 2291 | if (abs_offset < block_limit && !st->frag_data) { |
2292 | *data = st->cur_skb->data + (abs_offset - st->stepped_offset); | 2292 | *data = st->cur_skb->data + (abs_offset - st->stepped_offset); |
2293 | return block_limit - abs_offset; | 2293 | return block_limit - abs_offset; |
2294 | } | 2294 | } |
diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig index 9d26a3da37e5..5b919f7b45db 100644 --- a/net/ipv4/Kconfig +++ b/net/ipv4/Kconfig | |||
@@ -408,7 +408,7 @@ config INET_XFRM_MODE_BEET | |||
408 | 408 | ||
409 | config INET_LRO | 409 | config INET_LRO |
410 | bool "Large Receive Offload (ipv4/tcp)" | 410 | bool "Large Receive Offload (ipv4/tcp)" |
411 | 411 | default y | |
412 | ---help--- | 412 | ---help--- |
413 | Support for Large Receive Offload (ipv4/tcp). | 413 | Support for Large Receive Offload (ipv4/tcp). |
414 | 414 | ||
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index 90d22ae0a419..88bf051d0cbb 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c | |||
@@ -139,6 +139,8 @@ __be32 ic_servaddr = NONE; /* Boot server IP address */ | |||
139 | __be32 root_server_addr = NONE; /* Address of NFS server */ | 139 | __be32 root_server_addr = NONE; /* Address of NFS server */ |
140 | u8 root_server_path[256] = { 0, }; /* Path to mount as root */ | 140 | u8 root_server_path[256] = { 0, }; /* Path to mount as root */ |
141 | 141 | ||
142 | u32 ic_dev_xid; /* Device under configuration */ | ||
143 | |||
142 | /* vendor class identifier */ | 144 | /* vendor class identifier */ |
143 | static char vendor_class_identifier[253] __initdata; | 145 | static char vendor_class_identifier[253] __initdata; |
144 | 146 | ||
@@ -932,6 +934,13 @@ static int __init ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, str | |||
932 | goto drop_unlock; | 934 | goto drop_unlock; |
933 | } | 935 | } |
934 | 936 | ||
937 | /* Is it a reply for the device we are configuring? */ | ||
938 | if (b->xid != ic_dev_xid) { | ||
939 | if (net_ratelimit()) | ||
940 | printk(KERN_ERR "DHCP/BOOTP: Ignoring delayed packet \n"); | ||
941 | goto drop_unlock; | ||
942 | } | ||
943 | |||
935 | /* Parse extensions */ | 944 | /* Parse extensions */ |
936 | if (ext_len >= 4 && | 945 | if (ext_len >= 4 && |
937 | !memcmp(b->exten, ic_bootp_cookie, 4)) { /* Check magic cookie */ | 946 | !memcmp(b->exten, ic_bootp_cookie, 4)) { /* Check magic cookie */ |
@@ -1115,6 +1124,9 @@ static int __init ic_dynamic(void) | |||
1115 | get_random_bytes(&timeout, sizeof(timeout)); | 1124 | get_random_bytes(&timeout, sizeof(timeout)); |
1116 | timeout = CONF_BASE_TIMEOUT + (timeout % (unsigned) CONF_TIMEOUT_RANDOM); | 1125 | timeout = CONF_BASE_TIMEOUT + (timeout % (unsigned) CONF_TIMEOUT_RANDOM); |
1117 | for (;;) { | 1126 | for (;;) { |
1127 | /* Track the device we are configuring */ | ||
1128 | ic_dev_xid = d->xid; | ||
1129 | |||
1118 | #ifdef IPCONFIG_BOOTP | 1130 | #ifdef IPCONFIG_BOOTP |
1119 | if (do_bootp && (d->able & IC_BOOTP)) | 1131 | if (do_bootp && (d->able & IC_BOOTP)) |
1120 | ic_bootp_send_if(d, jiffies - start_jiffies); | 1132 | ic_bootp_send_if(d, jiffies - start_jiffies); |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 1d7f49c6f0ca..7a0f0b27bf1f 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -1321,6 +1321,7 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
1321 | struct task_struct *user_recv = NULL; | 1321 | struct task_struct *user_recv = NULL; |
1322 | int copied_early = 0; | 1322 | int copied_early = 0; |
1323 | struct sk_buff *skb; | 1323 | struct sk_buff *skb; |
1324 | u32 urg_hole = 0; | ||
1324 | 1325 | ||
1325 | lock_sock(sk); | 1326 | lock_sock(sk); |
1326 | 1327 | ||
@@ -1532,7 +1533,8 @@ do_prequeue: | |||
1532 | } | 1533 | } |
1533 | } | 1534 | } |
1534 | } | 1535 | } |
1535 | if ((flags & MSG_PEEK) && peek_seq != tp->copied_seq) { | 1536 | if ((flags & MSG_PEEK) && |
1537 | (peek_seq - copied - urg_hole != tp->copied_seq)) { | ||
1536 | if (net_ratelimit()) | 1538 | if (net_ratelimit()) |
1537 | printk(KERN_DEBUG "TCP(%s:%d): Application bug, race in MSG_PEEK.\n", | 1539 | printk(KERN_DEBUG "TCP(%s:%d): Application bug, race in MSG_PEEK.\n", |
1538 | current->comm, task_pid_nr(current)); | 1540 | current->comm, task_pid_nr(current)); |
@@ -1553,6 +1555,7 @@ do_prequeue: | |||
1553 | if (!urg_offset) { | 1555 | if (!urg_offset) { |
1554 | if (!sock_flag(sk, SOCK_URGINLINE)) { | 1556 | if (!sock_flag(sk, SOCK_URGINLINE)) { |
1555 | ++*seq; | 1557 | ++*seq; |
1558 | urg_hole++; | ||
1556 | offset++; | 1559 | offset++; |
1557 | used--; | 1560 | used--; |
1558 | if (!used) | 1561 | if (!used) |
diff --git a/net/sched/sch_teql.c b/net/sched/sch_teql.c index ec697cebb63b..3b6418297231 100644 --- a/net/sched/sch_teql.c +++ b/net/sched/sch_teql.c | |||
@@ -303,6 +303,8 @@ restart: | |||
303 | switch (teql_resolve(skb, skb_res, slave)) { | 303 | switch (teql_resolve(skb, skb_res, slave)) { |
304 | case 0: | 304 | case 0: |
305 | if (__netif_tx_trylock(slave_txq)) { | 305 | if (__netif_tx_trylock(slave_txq)) { |
306 | unsigned int length = qdisc_pkt_len(skb); | ||
307 | |||
306 | if (!netif_tx_queue_stopped(slave_txq) && | 308 | if (!netif_tx_queue_stopped(slave_txq) && |
307 | !netif_tx_queue_frozen(slave_txq) && | 309 | !netif_tx_queue_frozen(slave_txq) && |
308 | slave_ops->ndo_start_xmit(skb, slave) == 0) { | 310 | slave_ops->ndo_start_xmit(skb, slave) == 0) { |
@@ -310,8 +312,7 @@ restart: | |||
310 | master->slaves = NEXT_SLAVE(q); | 312 | master->slaves = NEXT_SLAVE(q); |
311 | netif_wake_queue(dev); | 313 | netif_wake_queue(dev); |
312 | master->stats.tx_packets++; | 314 | master->stats.tx_packets++; |
313 | master->stats.tx_bytes += | 315 | master->stats.tx_bytes += length; |
314 | qdisc_pkt_len(skb); | ||
315 | return 0; | 316 | return 0; |
316 | } | 317 | } |
317 | __netif_tx_unlock(slave_txq); | 318 | __netif_tx_unlock(slave_txq); |
diff --git a/scripts/setlocalversion b/scripts/setlocalversion index 32c8554f3946..00790472f641 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion | |||
@@ -1,5 +1,13 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # Print additional version information for non-release trees. | 2 | # |
3 | # This scripts adds local version information from the version | ||
4 | # control systems git, mercurial (hg) and subversion (svn). | ||
5 | # | ||
6 | # If something goes wrong, send a mail the kernel build mailinglist | ||
7 | # (see MAINTAINERS) and CC Nico Schottelius | ||
8 | # <nico-linuxsetlocalversion -at- schottelius.org>. | ||
9 | # | ||
10 | # | ||
3 | 11 | ||
4 | usage() { | 12 | usage() { |
5 | echo "Usage: $0 [srctree]" >&2 | 13 | echo "Usage: $0 [srctree]" >&2 |
@@ -10,12 +18,20 @@ cd "${1:-.}" || usage | |||
10 | 18 | ||
11 | # Check for git and a git repo. | 19 | # Check for git and a git repo. |
12 | if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then | 20 | if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then |
13 | # Do we have an untagged tag? | 21 | |
14 | if atag=`git describe 2>/dev/null`; then | 22 | # If we are at a tagged commit (like "v2.6.30-rc6"), we ignore it, |
15 | echo "$atag" | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}' | 23 | # because this version is defined in the top level Makefile. |
16 | # add -g${head}, if there is no usable tag | 24 | if [ -z "`git describe --exact-match 2>/dev/null`" ]; then |
17 | else | 25 | |
18 | printf '%s%s' -g $head | 26 | # If we are past a tagged commit (like "v2.6.30-rc5-302-g72357d5"), |
27 | # we pretty print it. | ||
28 | if atag="`git describe 2>/dev/null`"; then | ||
29 | echo "$atag" | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}' | ||
30 | |||
31 | # If we don't have a tag at all we print -g{commitish}. | ||
32 | else | ||
33 | printf '%s%s' -g $head | ||
34 | fi | ||
19 | fi | 35 | fi |
20 | 36 | ||
21 | # Is this git on svn? | 37 | # Is this git on svn? |
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index 7fbd68fab944..5c48e36038f2 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c | |||
@@ -1074,7 +1074,7 @@ static unsigned int __devinit aaci_size_fifo(struct aaci *aaci) | |||
1074 | return i; | 1074 | return i; |
1075 | } | 1075 | } |
1076 | 1076 | ||
1077 | static int __devinit aaci_probe(struct amba_device *dev, void *id) | 1077 | static int __devinit aaci_probe(struct amba_device *dev, struct amba_id *id) |
1078 | { | 1078 | { |
1079 | struct aaci *aaci; | 1079 | struct aaci *aaci; |
1080 | int ret, i; | 1080 | int ret, i; |