diff options
36 files changed, 280 insertions, 103 deletions
diff --git a/Documentation/connector/connector.txt b/Documentation/connector/connector.txt index 54a0a14bfbe3..57a314b14cf8 100644 --- a/Documentation/connector/connector.txt +++ b/Documentation/connector/connector.txt | |||
@@ -131,3 +131,47 @@ Netlink itself is not reliable protocol, that means that messages can | |||
131 | be lost due to memory pressure or process' receiving queue overflowed, | 131 | be lost due to memory pressure or process' receiving queue overflowed, |
132 | so caller is warned must be prepared. That is why struct cn_msg [main | 132 | so caller is warned must be prepared. That is why struct cn_msg [main |
133 | connector's message header] contains u32 seq and u32 ack fields. | 133 | connector's message header] contains u32 seq and u32 ack fields. |
134 | |||
135 | /*****************************************/ | ||
136 | Userspace usage. | ||
137 | /*****************************************/ | ||
138 | 2.6.14 has a new netlink socket implementation, which by default does not | ||
139 | allow to send data to netlink groups other than 1. | ||
140 | So, if to use netlink socket (for example using connector) | ||
141 | with different group number userspace application must subscribe to | ||
142 | that group. It can be achieved by following pseudocode: | ||
143 | |||
144 | s = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_CONNECTOR); | ||
145 | |||
146 | l_local.nl_family = AF_NETLINK; | ||
147 | l_local.nl_groups = 12345; | ||
148 | l_local.nl_pid = 0; | ||
149 | |||
150 | if (bind(s, (struct sockaddr *)&l_local, sizeof(struct sockaddr_nl)) == -1) { | ||
151 | perror("bind"); | ||
152 | close(s); | ||
153 | return -1; | ||
154 | } | ||
155 | |||
156 | { | ||
157 | int on = l_local.nl_groups; | ||
158 | setsockopt(s, 270, 1, &on, sizeof(on)); | ||
159 | } | ||
160 | |||
161 | Where 270 above is SOL_NETLINK, and 1 is a NETLINK_ADD_MEMBERSHIP socket | ||
162 | option. To drop multicast subscription one should call above socket option | ||
163 | with NETLINK_DROP_MEMBERSHIP parameter which is defined as 0. | ||
164 | |||
165 | 2.6.14 netlink code only allows to select a group which is less or equal to | ||
166 | the maximum group number, which is used at netlink_kernel_create() time. | ||
167 | In case of connector it is CN_NETLINK_USERS + 0xf, so if you want to use | ||
168 | group number 12345, you must increment CN_NETLINK_USERS to that number. | ||
169 | Additional 0xf numbers are allocated to be used by non-in-kernel users. | ||
170 | |||
171 | Due to this limitation, group 0xffffffff does not work now, so one can | ||
172 | not use add/remove connector's group notifications, but as far as I know, | ||
173 | only cn_test.c test module used it. | ||
174 | |||
175 | Some work in netlink area is still being done, so things can be changed in | ||
176 | 2.6.15 timeframe, if it will happen, documentation will be updated for that | ||
177 | kernel. | ||
diff --git a/MAINTAINERS b/MAINTAINERS index abf7f7a17ae0..767fb610963e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -1618,6 +1618,13 @@ M: vandrove@vc.cvut.cz | |||
1618 | L: linux-fbdev-devel@lists.sourceforge.net | 1618 | L: linux-fbdev-devel@lists.sourceforge.net |
1619 | S: Maintained | 1619 | S: Maintained |
1620 | 1620 | ||
1621 | MEGARAID SCSI DRIVERS | ||
1622 | P: Neela Syam Kolli | ||
1623 | M: Neela.Kolli@engenio.com | ||
1624 | S: linux-scsi@vger.kernel.org | ||
1625 | W: http://megaraid.lsilogic.com | ||
1626 | S: Maintained | ||
1627 | |||
1621 | MEMORY TECHNOLOGY DEVICES | 1628 | MEMORY TECHNOLOGY DEVICES |
1622 | P: David Woodhouse | 1629 | P: David Woodhouse |
1623 | M: dwmw2@infradead.org | 1630 | M: dwmw2@infradead.org |
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index 08e58ecd44be..0d5db5279c5c 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S | |||
@@ -89,13 +89,6 @@ SECTIONS | |||
89 | *(.got) /* Global offset table */ | 89 | *(.got) /* Global offset table */ |
90 | } | 90 | } |
91 | 91 | ||
92 | . = ALIGN(16); | ||
93 | __ex_table : { /* Exception table */ | ||
94 | __start___ex_table = .; | ||
95 | *(__ex_table) | ||
96 | __stop___ex_table = .; | ||
97 | } | ||
98 | |||
99 | RODATA | 92 | RODATA |
100 | 93 | ||
101 | _etext = .; /* End of text and rodata section */ | 94 | _etext = .; /* End of text and rodata section */ |
@@ -138,6 +131,14 @@ SECTIONS | |||
138 | *(.data.cacheline_aligned) | 131 | *(.data.cacheline_aligned) |
139 | 132 | ||
140 | /* | 133 | /* |
134 | * The exception fixup table (might need resorting at runtime) | ||
135 | */ | ||
136 | . = ALIGN(32); | ||
137 | __start___ex_table = .; | ||
138 | *(__ex_table) | ||
139 | __stop___ex_table = .; | ||
140 | |||
141 | /* | ||
141 | * and the usual data section | 142 | * and the usual data section |
142 | */ | 143 | */ |
143 | *(.data) | 144 | *(.data) |
diff --git a/arch/arm/mach-l7200/core.c b/arch/arm/mach-l7200/core.c index 5fd8c9f97f9a..03ed742ae2be 100644 --- a/arch/arm/mach-l7200/core.c +++ b/arch/arm/mach-l7200/core.c | |||
@@ -7,11 +7,17 @@ | |||
7 | */ | 7 | */ |
8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
10 | #include <linux/device.h> | ||
10 | 11 | ||
12 | #include <asm/types.h> | ||
13 | #include <asm/irq.h> | ||
14 | #include <asm/mach-types.h> | ||
11 | #include <asm/hardware.h> | 15 | #include <asm/hardware.h> |
12 | #include <asm/page.h> | 16 | #include <asm/page.h> |
13 | 17 | ||
18 | #include <asm/mach/arch.h> | ||
14 | #include <asm/mach/map.h> | 19 | #include <asm/mach/map.h> |
20 | #include <asm/mach/irq.h> | ||
15 | 21 | ||
16 | /* | 22 | /* |
17 | * IRQ base register | 23 | * IRQ base register |
@@ -47,6 +53,12 @@ static void l7200_unmask_irq(unsigned int irq) | |||
47 | { | 53 | { |
48 | IRQ_ENABLE = 1 << irq; | 54 | IRQ_ENABLE = 1 << irq; |
49 | } | 55 | } |
56 | |||
57 | static struct irqchip l7200_irq_chip = { | ||
58 | .ack = l7200_mask_irq, | ||
59 | .mask = l7200_mask_irq, | ||
60 | .unmask = l7200_unmask_irq | ||
61 | }; | ||
50 | 62 | ||
51 | static void __init l7200_init_irq(void) | 63 | static void __init l7200_init_irq(void) |
52 | { | 64 | { |
@@ -56,11 +68,9 @@ static void __init l7200_init_irq(void) | |||
56 | FIQ_ENABLECLEAR = 0xffffffff; /* clear all fast interrupt enables */ | 68 | FIQ_ENABLECLEAR = 0xffffffff; /* clear all fast interrupt enables */ |
57 | 69 | ||
58 | for (irq = 0; irq < NR_IRQS; irq++) { | 70 | for (irq = 0; irq < NR_IRQS; irq++) { |
59 | irq_desc[irq].valid = 1; | 71 | set_irq_chip(irq, &l7200_irq_chip); |
60 | irq_desc[irq].probe_ok = 1; | 72 | set_irq_flags(irq, IRQF_VALID); |
61 | irq_desc[irq].mask_ack = l7200_mask_irq; | 73 | set_irq_handler(irq, do_level_IRQ); |
62 | irq_desc[irq].mask = l7200_mask_irq; | ||
63 | irq_desc[irq].unmask = l7200_unmask_irq; | ||
64 | } | 74 | } |
65 | 75 | ||
66 | init_FIQ(); | 76 | init_FIQ(); |
diff --git a/arch/arm/mach-pxa/corgi_lcd.c b/arch/arm/mach-pxa/corgi_lcd.c index c02ef7c0f7ef..850538fadece 100644 --- a/arch/arm/mach-pxa/corgi_lcd.c +++ b/arch/arm/mach-pxa/corgi_lcd.c | |||
@@ -467,6 +467,7 @@ void corgi_put_hsync(void) | |||
467 | { | 467 | { |
468 | if (get_hsync_time) | 468 | if (get_hsync_time) |
469 | symbol_put(w100fb_get_hsynclen); | 469 | symbol_put(w100fb_get_hsynclen); |
470 | get_hsync_time = NULL; | ||
470 | } | 471 | } |
471 | 472 | ||
472 | void corgi_wait_hsync(void) | 473 | void corgi_wait_hsync(void) |
@@ -476,20 +477,37 @@ void corgi_wait_hsync(void) | |||
476 | #endif | 477 | #endif |
477 | 478 | ||
478 | #ifdef CONFIG_PXA_SHARP_Cxx00 | 479 | #ifdef CONFIG_PXA_SHARP_Cxx00 |
480 | static struct device *spitz_pxafb_dev; | ||
481 | |||
482 | static int is_pxafb_device(struct device * dev, void * data) | ||
483 | { | ||
484 | struct platform_device *pdev = container_of(dev, struct platform_device, dev); | ||
485 | |||
486 | return (strncmp(pdev->name, "pxa2xx-fb", 9) == 0); | ||
487 | } | ||
488 | |||
479 | unsigned long spitz_get_hsync_len(void) | 489 | unsigned long spitz_get_hsync_len(void) |
480 | { | 490 | { |
491 | if (!spitz_pxafb_dev) { | ||
492 | spitz_pxafb_dev = bus_find_device(&platform_bus_type, NULL, NULL, is_pxafb_device); | ||
493 | if (!spitz_pxafb_dev) | ||
494 | return 0; | ||
495 | } | ||
481 | if (!get_hsync_time) | 496 | if (!get_hsync_time) |
482 | get_hsync_time = symbol_get(pxafb_get_hsync_time); | 497 | get_hsync_time = symbol_get(pxafb_get_hsync_time); |
483 | if (!get_hsync_time) | 498 | if (!get_hsync_time) |
484 | return 0; | 499 | return 0; |
485 | 500 | ||
486 | return pxafb_get_hsync_time(&pxafb_device.dev); | 501 | return pxafb_get_hsync_time(spitz_pxafb_dev); |
487 | } | 502 | } |
488 | 503 | ||
489 | void spitz_put_hsync(void) | 504 | void spitz_put_hsync(void) |
490 | { | 505 | { |
506 | put_device(spitz_pxafb_dev); | ||
491 | if (get_hsync_time) | 507 | if (get_hsync_time) |
492 | symbol_put(pxafb_get_hsync_time); | 508 | symbol_put(pxafb_get_hsync_time); |
509 | spitz_pxafb_dev = NULL; | ||
510 | get_hsync_time = NULL; | ||
493 | } | 511 | } |
494 | 512 | ||
495 | void spitz_wait_hsync(void) | 513 | void spitz_wait_hsync(void) |
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index d0660a8c4b70..d327c127eddb 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c | |||
@@ -208,6 +208,11 @@ static struct platform_device pxafb_device = { | |||
208 | .resource = pxafb_resources, | 208 | .resource = pxafb_resources, |
209 | }; | 209 | }; |
210 | 210 | ||
211 | void __init set_pxa_fb_parent(struct device *parent_dev) | ||
212 | { | ||
213 | pxafb_device.dev.parent = parent_dev; | ||
214 | } | ||
215 | |||
211 | static struct platform_device ffuart_device = { | 216 | static struct platform_device ffuart_device = { |
212 | .name = "pxa2xx-uart", | 217 | .name = "pxa2xx-uart", |
213 | .id = 0, | 218 | .id = 0, |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 568afe3d6e1a..d0ab428c2d7d 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <asm/arch/irq.h> | 36 | #include <asm/arch/irq.h> |
37 | #include <asm/arch/mmc.h> | 37 | #include <asm/arch/mmc.h> |
38 | #include <asm/arch/udc.h> | 38 | #include <asm/arch/udc.h> |
39 | #include <asm/arch/ohci.h> | ||
40 | #include <asm/arch/pxafb.h> | 39 | #include <asm/arch/pxafb.h> |
41 | #include <asm/arch/akita.h> | 40 | #include <asm/arch/akita.h> |
42 | #include <asm/arch/spitz.h> | 41 | #include <asm/arch/spitz.h> |
@@ -304,7 +303,6 @@ static struct platform_device *devices[] __initdata = { | |||
304 | &spitzkbd_device, | 303 | &spitzkbd_device, |
305 | &spitzts_device, | 304 | &spitzts_device, |
306 | &spitzbl_device, | 305 | &spitzbl_device, |
307 | &spitzbattery_device, | ||
308 | }; | 306 | }; |
309 | 307 | ||
310 | static void __init common_init(void) | 308 | static void __init common_init(void) |
@@ -328,7 +326,7 @@ static void __init common_init(void) | |||
328 | 326 | ||
329 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 327 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
330 | pxa_set_mci_info(&spitz_mci_platform_data); | 328 | pxa_set_mci_info(&spitz_mci_platform_data); |
331 | pxafb_device.dev.parent = &spitzssp_device.dev; | 329 | set_pxa_fb_parent(&spitzssp_device.dev); |
332 | set_pxa_fb_info(&spitz_pxafb_info); | 330 | set_pxa_fb_info(&spitz_pxafb_info); |
333 | } | 331 | } |
334 | 332 | ||
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig index 06807c6ee68a..c796bcdd6158 100644 --- a/arch/arm/mach-s3c2410/Kconfig +++ b/arch/arm/mach-s3c2410/Kconfig | |||
@@ -12,6 +12,7 @@ config MACH_ANUBIS | |||
12 | config ARCH_BAST | 12 | config ARCH_BAST |
13 | bool "Simtec Electronics BAST (EB2410ITX)" | 13 | bool "Simtec Electronics BAST (EB2410ITX)" |
14 | select CPU_S3C2410 | 14 | select CPU_S3C2410 |
15 | select ISA | ||
15 | help | 16 | help |
16 | Say Y here if you are using the Simtec Electronics EB2410ITX | 17 | Say Y here if you are using the Simtec Electronics EB2410ITX |
17 | development board (also known as BAST) | 18 | development board (also known as BAST) |
diff --git a/arch/cris/arch-v32/kernel/smp.c b/arch/cris/arch-v32/kernel/smp.c index 2c5cae04a95c..957f551ba5ce 100644 --- a/arch/cris/arch-v32/kernel/smp.c +++ b/arch/cris/arch-v32/kernel/smp.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/cpumask.h> | 16 | #include <linux/cpumask.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/module.h> | ||
18 | 19 | ||
19 | #define IPI_SCHEDULE 1 | 20 | #define IPI_SCHEDULE 1 |
20 | #define IPI_CALL 2 | 21 | #define IPI_CALL 2 |
@@ -28,6 +29,7 @@ spinlock_t cris_atomic_locks[] = { [0 ... LOCK_COUNT - 1] = SPIN_LOCK_UNLOCKED}; | |||
28 | /* CPU masks */ | 29 | /* CPU masks */ |
29 | cpumask_t cpu_online_map = CPU_MASK_NONE; | 30 | cpumask_t cpu_online_map = CPU_MASK_NONE; |
30 | cpumask_t phys_cpu_present_map = CPU_MASK_NONE; | 31 | cpumask_t phys_cpu_present_map = CPU_MASK_NONE; |
32 | EXPORT_SYMBOL(phys_cpu_present_map); | ||
31 | 33 | ||
32 | /* Variables used during SMP boot */ | 34 | /* Variables used during SMP boot */ |
33 | volatile int cpu_now_booting = 0; | 35 | volatile int cpu_now_booting = 0; |
diff --git a/arch/m32r/kernel/smp.c b/arch/m32r/kernel/smp.c index a4576ac7e870..8b1f6eb76870 100644 --- a/arch/m32r/kernel/smp.c +++ b/arch/m32r/kernel/smp.c | |||
@@ -275,12 +275,14 @@ static void flush_tlb_all_ipi(void *info) | |||
275 | *==========================================================================*/ | 275 | *==========================================================================*/ |
276 | void smp_flush_tlb_mm(struct mm_struct *mm) | 276 | void smp_flush_tlb_mm(struct mm_struct *mm) |
277 | { | 277 | { |
278 | int cpu_id = smp_processor_id(); | 278 | int cpu_id; |
279 | cpumask_t cpu_mask; | 279 | cpumask_t cpu_mask; |
280 | unsigned long *mmc = &mm->context[cpu_id]; | 280 | unsigned long *mmc; |
281 | unsigned long flags; | 281 | unsigned long flags; |
282 | 282 | ||
283 | preempt_disable(); | 283 | preempt_disable(); |
284 | cpu_id = smp_processor_id(); | ||
285 | mmc = &mm->context[cpu_id]; | ||
284 | cpu_mask = mm->cpu_vm_mask; | 286 | cpu_mask = mm->cpu_vm_mask; |
285 | cpu_clear(cpu_id, cpu_mask); | 287 | cpu_clear(cpu_id, cpu_mask); |
286 | 288 | ||
@@ -343,12 +345,14 @@ void smp_flush_tlb_range(struct vm_area_struct *vma, unsigned long start, | |||
343 | void smp_flush_tlb_page(struct vm_area_struct *vma, unsigned long va) | 345 | void smp_flush_tlb_page(struct vm_area_struct *vma, unsigned long va) |
344 | { | 346 | { |
345 | struct mm_struct *mm = vma->vm_mm; | 347 | struct mm_struct *mm = vma->vm_mm; |
346 | int cpu_id = smp_processor_id(); | 348 | int cpu_id; |
347 | cpumask_t cpu_mask; | 349 | cpumask_t cpu_mask; |
348 | unsigned long *mmc = &mm->context[cpu_id]; | 350 | unsigned long *mmc; |
349 | unsigned long flags; | 351 | unsigned long flags; |
350 | 352 | ||
351 | preempt_disable(); | 353 | preempt_disable(); |
354 | cpu_id = smp_processor_id(); | ||
355 | mmc = &mm->context[cpu_id]; | ||
352 | cpu_mask = mm->cpu_vm_mask; | 356 | cpu_mask = mm->cpu_vm_mask; |
353 | cpu_clear(cpu_id, cpu_mask); | 357 | cpu_clear(cpu_id, cpu_mask); |
354 | 358 | ||
diff --git a/arch/mips/pci/fixup-tb0226.c b/arch/mips/pci/fixup-tb0226.c index 61513d5d97da..b5d42b12de10 100644 --- a/arch/mips/pci/fixup-tb0226.c +++ b/arch/mips/pci/fixup-tb0226.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * fixup-tb0226.c, The TANBAC TB0226 specific PCI fixups. | 2 | * fixup-tb0226.c, The TANBAC TB0226 specific PCI fixups. |
3 | * | 3 | * |
4 | * Copyright (C) 2002-2004 Yoichi Yuasa <yuasa@hh.iij4u.or.jp> | 4 | * Copyright (C) 2002-2005 Yoichi Yuasa <yuasa@hh.iij4u.or.jp> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/pci.h> | 21 | #include <linux/pci.h> |
22 | 22 | ||
23 | #include <asm/vr41xx/giu.h> | ||
23 | #include <asm/vr41xx/tb0226.h> | 24 | #include <asm/vr41xx/tb0226.h> |
24 | 25 | ||
25 | int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 26 | int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) |
@@ -29,42 +30,42 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
29 | switch (slot) { | 30 | switch (slot) { |
30 | case 12: | 31 | case 12: |
31 | vr41xx_set_irq_trigger(GD82559_1_PIN, | 32 | vr41xx_set_irq_trigger(GD82559_1_PIN, |
32 | TRIGGER_LEVEL, | 33 | IRQ_TRIGGER_LEVEL, |
33 | SIGNAL_THROUGH); | 34 | IRQ_SIGNAL_THROUGH); |
34 | vr41xx_set_irq_level(GD82559_1_PIN, LEVEL_LOW); | 35 | vr41xx_set_irq_level(GD82559_1_PIN, IRQ_LEVEL_LOW); |
35 | irq = GD82559_1_IRQ; | 36 | irq = GD82559_1_IRQ; |
36 | break; | 37 | break; |
37 | case 13: | 38 | case 13: |
38 | vr41xx_set_irq_trigger(GD82559_2_PIN, | 39 | vr41xx_set_irq_trigger(GD82559_2_PIN, |
39 | TRIGGER_LEVEL, | 40 | IRQ_TRIGGER_LEVEL, |
40 | SIGNAL_THROUGH); | 41 | IRQ_SIGNAL_THROUGH); |
41 | vr41xx_set_irq_level(GD82559_2_PIN, LEVEL_LOW); | 42 | vr41xx_set_irq_level(GD82559_2_PIN, IRQ_LEVEL_LOW); |
42 | irq = GD82559_2_IRQ; | 43 | irq = GD82559_2_IRQ; |
43 | break; | 44 | break; |
44 | case 14: | 45 | case 14: |
45 | switch (pin) { | 46 | switch (pin) { |
46 | case 1: | 47 | case 1: |
47 | vr41xx_set_irq_trigger(UPD720100_INTA_PIN, | 48 | vr41xx_set_irq_trigger(UPD720100_INTA_PIN, |
48 | TRIGGER_LEVEL, | 49 | IRQ_TRIGGER_LEVEL, |
49 | SIGNAL_THROUGH); | 50 | IRQ_SIGNAL_THROUGH); |
50 | vr41xx_set_irq_level(UPD720100_INTA_PIN, | 51 | vr41xx_set_irq_level(UPD720100_INTA_PIN, |
51 | LEVEL_LOW); | 52 | IRQ_LEVEL_LOW); |
52 | irq = UPD720100_INTA_IRQ; | 53 | irq = UPD720100_INTA_IRQ; |
53 | break; | 54 | break; |
54 | case 2: | 55 | case 2: |
55 | vr41xx_set_irq_trigger(UPD720100_INTB_PIN, | 56 | vr41xx_set_irq_trigger(UPD720100_INTB_PIN, |
56 | TRIGGER_LEVEL, | 57 | IRQ_TRIGGER_LEVEL, |
57 | SIGNAL_THROUGH); | 58 | IRQ_SIGNAL_THROUGH); |
58 | vr41xx_set_irq_level(UPD720100_INTB_PIN, | 59 | vr41xx_set_irq_level(UPD720100_INTB_PIN, |
59 | LEVEL_LOW); | 60 | IRQ_LEVEL_LOW); |
60 | irq = UPD720100_INTB_IRQ; | 61 | irq = UPD720100_INTB_IRQ; |
61 | break; | 62 | break; |
62 | case 3: | 63 | case 3: |
63 | vr41xx_set_irq_trigger(UPD720100_INTC_PIN, | 64 | vr41xx_set_irq_trigger(UPD720100_INTC_PIN, |
64 | TRIGGER_LEVEL, | 65 | IRQ_TRIGGER_LEVEL, |
65 | SIGNAL_THROUGH); | 66 | IRQ_SIGNAL_THROUGH); |
66 | vr41xx_set_irq_level(UPD720100_INTC_PIN, | 67 | vr41xx_set_irq_level(UPD720100_INTC_PIN, |
67 | LEVEL_LOW); | 68 | IRQ_LEVEL_LOW); |
68 | irq = UPD720100_INTC_IRQ; | 69 | irq = UPD720100_INTC_IRQ; |
69 | break; | 70 | break; |
70 | default: | 71 | default: |
diff --git a/arch/ppc64/kernel/pmac_setup.c b/arch/ppc64/kernel/pmac_setup.c index 25755252067a..fa8121d53b89 100644 --- a/arch/ppc64/kernel/pmac_setup.c +++ b/arch/ppc64/kernel/pmac_setup.c | |||
@@ -115,7 +115,7 @@ static void __pmac pmac_show_cpuinfo(struct seq_file *m) | |||
115 | 115 | ||
116 | /* find motherboard type */ | 116 | /* find motherboard type */ |
117 | seq_printf(m, "machine\t\t: "); | 117 | seq_printf(m, "machine\t\t: "); |
118 | np = find_devices("device-tree"); | 118 | np = of_find_node_by_path("/"); |
119 | if (np != NULL) { | 119 | if (np != NULL) { |
120 | pp = (char *) get_property(np, "model", NULL); | 120 | pp = (char *) get_property(np, "model", NULL); |
121 | if (pp != NULL) | 121 | if (pp != NULL) |
@@ -133,6 +133,7 @@ static void __pmac pmac_show_cpuinfo(struct seq_file *m) | |||
133 | } | 133 | } |
134 | seq_printf(m, "\n"); | 134 | seq_printf(m, "\n"); |
135 | } | 135 | } |
136 | of_node_put(np); | ||
136 | } else | 137 | } else |
137 | seq_printf(m, "PowerMac\n"); | 138 | seq_printf(m, "PowerMac\n"); |
138 | 139 | ||
diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c index 56a39d69e080..5ecefc02896a 100644 --- a/arch/sh/kernel/smp.c +++ b/arch/sh/kernel/smp.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/time.h> | 22 | #include <linux/time.h> |
23 | #include <linux/timex.h> | 23 | #include <linux/timex.h> |
24 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
25 | #include <linux/module.h> | ||
25 | 26 | ||
26 | #include <asm/atomic.h> | 27 | #include <asm/atomic.h> |
27 | #include <asm/processor.h> | 28 | #include <asm/processor.h> |
@@ -39,6 +40,8 @@ struct sh_cpuinfo cpu_data[NR_CPUS]; | |||
39 | extern void per_cpu_trap_init(void); | 40 | extern void per_cpu_trap_init(void); |
40 | 41 | ||
41 | cpumask_t cpu_possible_map; | 42 | cpumask_t cpu_possible_map; |
43 | EXPORT_SYMBOL(cpu_possible_map); | ||
44 | |||
42 | cpumask_t cpu_online_map; | 45 | cpumask_t cpu_online_map; |
43 | static atomic_t cpus_booted = ATOMIC_INIT(0); | 46 | static atomic_t cpus_booted = ATOMIC_INIT(0); |
44 | 47 | ||
diff --git a/drivers/char/mbcs.c b/drivers/char/mbcs.c index 3fa64c631108..c268ee04b2aa 100644 --- a/drivers/char/mbcs.c +++ b/drivers/char/mbcs.c | |||
@@ -830,6 +830,9 @@ static int __init mbcs_init(void) | |||
830 | { | 830 | { |
831 | int rv; | 831 | int rv; |
832 | 832 | ||
833 | if (!ia64_platform_is("sn2")) | ||
834 | return -ENODEV; | ||
835 | |||
833 | // Put driver into chrdevs[]. Get major number. | 836 | // Put driver into chrdevs[]. Get major number. |
834 | rv = register_chrdev(mbcs_major, DEVICE_NAME, &mbcs_ops); | 837 | rv = register_chrdev(mbcs_major, DEVICE_NAME, &mbcs_ops); |
835 | if (rv < 0) { | 838 | if (rv < 0) { |
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index 444f7756fee6..571a68691a4a 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig | |||
@@ -93,7 +93,7 @@ config KEYBOARD_LKKBD | |||
93 | 93 | ||
94 | config KEYBOARD_LOCOMO | 94 | config KEYBOARD_LOCOMO |
95 | tristate "LoCoMo Keyboard Support" | 95 | tristate "LoCoMo Keyboard Support" |
96 | depends on SHARP_LOCOMO | 96 | depends on SHARP_LOCOMO && INPUT_KEYBOARD |
97 | help | 97 | help |
98 | Say Y here if you are running Linux on a Sharp Zaurus Collie or Poodle based PDA | 98 | Say Y here if you are running Linux on a Sharp Zaurus Collie or Poodle based PDA |
99 | 99 | ||
diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c index 1714045a182b..344f46005401 100644 --- a/drivers/input/keyboard/spitzkbd.c +++ b/drivers/input/keyboard/spitzkbd.c | |||
@@ -53,7 +53,7 @@ static unsigned char spitzkbd_keycode[NR_SCANCODES] = { | |||
53 | KEY_LEFTCTRL, KEY_1, KEY_3, KEY_5, KEY_6, KEY_7, KEY_9, KEY_0, KEY_BACKSPACE, SPITZ_KEY_EXOK, SPITZ_KEY_EXCANCEL, 0, 0, 0, 0, 0, /* 1-16 */ | 53 | KEY_LEFTCTRL, KEY_1, KEY_3, KEY_5, KEY_6, KEY_7, KEY_9, KEY_0, KEY_BACKSPACE, SPITZ_KEY_EXOK, SPITZ_KEY_EXCANCEL, 0, 0, 0, 0, 0, /* 1-16 */ |
54 | 0, KEY_2, KEY_4, KEY_R, KEY_Y, KEY_8, KEY_I, KEY_O, KEY_P, SPITZ_KEY_EXJOGDOWN, SPITZ_KEY_EXJOGUP, 0, 0, 0, 0, 0, /* 17-32 */ | 54 | 0, KEY_2, KEY_4, KEY_R, KEY_Y, KEY_8, KEY_I, KEY_O, KEY_P, SPITZ_KEY_EXJOGDOWN, SPITZ_KEY_EXJOGUP, 0, 0, 0, 0, 0, /* 17-32 */ |
55 | KEY_TAB, KEY_Q, KEY_E, KEY_T, KEY_G, KEY_U, KEY_J, KEY_K, 0, 0, 0, 0, 0, 0, 0, 0, /* 33-48 */ | 55 | KEY_TAB, KEY_Q, KEY_E, KEY_T, KEY_G, KEY_U, KEY_J, KEY_K, 0, 0, 0, 0, 0, 0, 0, 0, /* 33-48 */ |
56 | SPITZ_KEY_CALENDER, KEY_W, KEY_S, KEY_F, KEY_V, KEY_H, KEY_M, KEY_L, 0, 0, KEY_RIGHTSHIFT, 0, 0, 0, 0, 0, /* 49-64 */ | 56 | SPITZ_KEY_CALENDER, KEY_W, KEY_S, KEY_F, KEY_V, KEY_H, KEY_M, KEY_L, 0, KEY_RIGHTSHIFT, 0, 0, 0, 0, 0, 0, /* 49-64 */ |
57 | SPITZ_KEY_ADDRESS, KEY_A, KEY_D, KEY_C, KEY_B, KEY_N, KEY_DOT, 0, KEY_ENTER, KEY_LEFTSHIFT, 0, 0, 0, 0, 0, 0, /* 65-80 */ | 57 | SPITZ_KEY_ADDRESS, KEY_A, KEY_D, KEY_C, KEY_B, KEY_N, KEY_DOT, 0, KEY_ENTER, KEY_LEFTSHIFT, 0, 0, 0, 0, 0, 0, /* 65-80 */ |
58 | SPITZ_KEY_MAIL, KEY_Z, KEY_X, KEY_MINUS, KEY_SPACE, KEY_COMMA, 0, KEY_UP, 0, 0, SPITZ_KEY_FN, 0, 0, 0, 0, 0, /* 81-96 */ | 58 | SPITZ_KEY_MAIL, KEY_Z, KEY_X, KEY_MINUS, KEY_SPACE, KEY_COMMA, 0, KEY_UP, 0, 0, SPITZ_KEY_FN, 0, 0, 0, 0, 0, /* 81-96 */ |
59 | KEY_SYSRQ, SPITZ_KEY_JAP1, SPITZ_KEY_JAP2, SPITZ_KEY_CANCEL, SPITZ_KEY_OK, SPITZ_KEY_MENU, KEY_LEFT, KEY_DOWN, KEY_RIGHT, 0, 0, 0, 0, 0, 0, 0 /* 97-112 */ | 59 | KEY_SYSRQ, SPITZ_KEY_JAP1, SPITZ_KEY_JAP2, SPITZ_KEY_CANCEL, SPITZ_KEY_OK, SPITZ_KEY_MENU, KEY_LEFT, KEY_DOWN, KEY_RIGHT, 0, 0, 0, 0, 0, 0, 0 /* 97-112 */ |
diff --git a/drivers/media/radio/radio-cadet.c b/drivers/media/radio/radio-cadet.c index 022913da8c59..9b0406318f2d 100644 --- a/drivers/media/radio/radio-cadet.c +++ b/drivers/media/radio/radio-cadet.c | |||
@@ -543,7 +543,7 @@ static int cadet_probe(void) | |||
543 | 543 | ||
544 | for(i=0;i<8;i++) { | 544 | for(i=0;i<8;i++) { |
545 | io=iovals[i]; | 545 | io=iovals[i]; |
546 | if(request_region(io,2, "cadet-probe")>=0) { | 546 | if (request_region(io, 2, "cadet-probe")) { |
547 | cadet_setfreq(1410); | 547 | cadet_setfreq(1410); |
548 | if(cadet_getfreq()==1410) { | 548 | if(cadet_getfreq()==1410) { |
549 | release_region(io, 2); | 549 | release_region(io, 2); |
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig index 00a07f32a81e..7187958e40ca 100644 --- a/drivers/net/wireless/Kconfig +++ b/drivers/net/wireless/Kconfig | |||
@@ -243,7 +243,7 @@ config IPW_DEBUG | |||
243 | 243 | ||
244 | config AIRO | 244 | config AIRO |
245 | tristate "Cisco/Aironet 34X/35X/4500/4800 ISA and PCI cards" | 245 | tristate "Cisco/Aironet 34X/35X/4500/4800 ISA and PCI cards" |
246 | depends on NET_RADIO && ISA && (PCI || BROKEN) | 246 | depends on NET_RADIO && ISA_DMA_API && (PCI || BROKEN) |
247 | ---help--- | 247 | ---help--- |
248 | This is the standard Linux driver to support Cisco/Aironet ISA and | 248 | This is the standard Linux driver to support Cisco/Aironet ISA and |
249 | PCI 802.11 wireless cards. | 249 | PCI 802.11 wireless cards. |
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c index 888b70e6a484..9e7ccd8a4321 100644 --- a/drivers/pcmcia/soc_common.c +++ b/drivers/pcmcia/soc_common.c | |||
@@ -66,7 +66,7 @@ void soc_pcmcia_debug(struct soc_pcmcia_socket *skt, const char *func, | |||
66 | if (pc_debug > lvl) { | 66 | if (pc_debug > lvl) { |
67 | printk(KERN_DEBUG "skt%u: %s: ", skt->nr, func); | 67 | printk(KERN_DEBUG "skt%u: %s: ", skt->nr, func); |
68 | va_start(args, fmt); | 68 | va_start(args, fmt); |
69 | printk(fmt, args); | 69 | vprintk(fmt, args); |
70 | va_end(args); | 70 | va_end(args); |
71 | } | 71 | } |
72 | } | 72 | } |
@@ -321,8 +321,6 @@ soc_common_pcmcia_get_socket(struct pcmcia_socket *sock, socket_state_t *state) | |||
321 | * less punt all of this work and let the kernel handle the details | 321 | * less punt all of this work and let the kernel handle the details |
322 | * of power configuration, reset, &c. We also record the value of | 322 | * of power configuration, reset, &c. We also record the value of |
323 | * `state' in order to regurgitate it to the PCMCIA core later. | 323 | * `state' in order to regurgitate it to the PCMCIA core later. |
324 | * | ||
325 | * Returns: 0 | ||
326 | */ | 324 | */ |
327 | static int | 325 | static int |
328 | soc_common_pcmcia_set_socket(struct pcmcia_socket *sock, socket_state_t *state) | 326 | soc_common_pcmcia_set_socket(struct pcmcia_socket *sock, socket_state_t *state) |
@@ -407,7 +405,7 @@ soc_common_pcmcia_set_io_map(struct pcmcia_socket *sock, struct pccard_io_map *m | |||
407 | * the map speed as requested, but override the address ranges | 405 | * the map speed as requested, but override the address ranges |
408 | * supplied by Card Services. | 406 | * supplied by Card Services. |
409 | * | 407 | * |
410 | * Returns: 0 on success, -1 on error | 408 | * Returns: 0 on success, -ERRNO on error |
411 | */ | 409 | */ |
412 | static int | 410 | static int |
413 | soc_common_pcmcia_set_mem_map(struct pcmcia_socket *sock, struct pccard_mem_map *map) | 411 | soc_common_pcmcia_set_mem_map(struct pcmcia_socket *sock, struct pccard_mem_map *map) |
@@ -655,8 +653,8 @@ static void soc_pcmcia_cpufreq_unregister(void) | |||
655 | } | 653 | } |
656 | 654 | ||
657 | #else | 655 | #else |
658 | #define soc_pcmcia_cpufreq_register() | 656 | static int soc_pcmcia_cpufreq_register(void) { return 0; } |
659 | #define soc_pcmcia_cpufreq_unregister() | 657 | static void soc_pcmcia_cpufreq_unregister(void) {} |
660 | #endif | 658 | #endif |
661 | 659 | ||
662 | int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, int first, int nr) | 660 | int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, int first, int nr) |
@@ -738,7 +736,7 @@ int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops | |||
738 | goto out_err_5; | 736 | goto out_err_5; |
739 | } | 737 | } |
740 | 738 | ||
741 | if ( list_empty(&soc_pcmcia_sockets) ) | 739 | if (list_empty(&soc_pcmcia_sockets)) |
742 | soc_pcmcia_cpufreq_register(); | 740 | soc_pcmcia_cpufreq_register(); |
743 | 741 | ||
744 | list_add(&skt->node, &soc_pcmcia_sockets); | 742 | list_add(&skt->node, &soc_pcmcia_sockets); |
@@ -839,7 +837,7 @@ int soc_common_drv_pcmcia_remove(struct device *dev) | |||
839 | release_resource(&skt->res_io); | 837 | release_resource(&skt->res_io); |
840 | release_resource(&skt->res_skt); | 838 | release_resource(&skt->res_skt); |
841 | } | 839 | } |
842 | if ( list_empty(&soc_pcmcia_sockets) ) | 840 | if (list_empty(&soc_pcmcia_sockets)) |
843 | soc_pcmcia_cpufreq_unregister(); | 841 | soc_pcmcia_cpufreq_unregister(); |
844 | 842 | ||
845 | up(&soc_pcmcia_sockets_lock); | 843 | up(&soc_pcmcia_sockets_lock); |
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index de8490a92831..a1f9ceef0ac9 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
@@ -453,9 +453,9 @@ static int aac_eh_reset(struct scsi_cmnd* cmd) | |||
453 | /* | 453 | /* |
454 | * We can exit If all the commands are complete | 454 | * We can exit If all the commands are complete |
455 | */ | 455 | */ |
456 | spin_unlock_irq(host->host_lock); | ||
456 | if (active == 0) | 457 | if (active == 0) |
457 | return SUCCESS; | 458 | return SUCCESS; |
458 | spin_unlock_irq(host->host_lock); | ||
459 | ssleep(1); | 459 | ssleep(1); |
460 | spin_lock_irq(host->host_lock); | 460 | spin_lock_irq(host->host_lock); |
461 | } | 461 | } |
diff --git a/drivers/serial/8250_pnp.c b/drivers/serial/8250_pnp.c index 6b321e82cafb..c2786fc41cc5 100644 --- a/drivers/serial/8250_pnp.c +++ b/drivers/serial/8250_pnp.c | |||
@@ -272,6 +272,8 @@ static const struct pnp_device_id pnp_dev_table[] = { | |||
272 | { "SUP1421", 0 }, | 272 | { "SUP1421", 0 }, |
273 | /* SupraExpress 33.6 Data/Fax PnP modem */ | 273 | /* SupraExpress 33.6 Data/Fax PnP modem */ |
274 | { "SUP1590", 0 }, | 274 | { "SUP1590", 0 }, |
275 | /* SupraExpress 336i Sp ASVD */ | ||
276 | { "SUP1620", 0 }, | ||
275 | /* SupraExpress 33.6 Data/Fax PnP modem */ | 277 | /* SupraExpress 33.6 Data/Fax PnP modem */ |
276 | { "SUP1760", 0 }, | 278 | { "SUP1760", 0 }, |
277 | /* Phoebe Micro */ | 279 | /* Phoebe Micro */ |
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index 512266307866..430754ebac8a 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c | |||
@@ -967,7 +967,7 @@ static int sci_startup(struct uart_port *port) | |||
967 | #endif | 967 | #endif |
968 | 968 | ||
969 | sci_request_irq(s); | 969 | sci_request_irq(s); |
970 | sci_start_tx(port, 1); | 970 | sci_start_tx(port); |
971 | sci_start_rx(port, 1); | 971 | sci_start_rx(port, 1); |
972 | 972 | ||
973 | return 0; | 973 | return 0; |
diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c index beeec7b51425..8000890e4271 100644 --- a/drivers/video/sa1100fb.c +++ b/drivers/video/sa1100fb.c | |||
@@ -592,6 +592,7 @@ sa1100fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, | |||
592 | return ret; | 592 | return ret; |
593 | } | 593 | } |
594 | 594 | ||
595 | #ifdef CONFIG_CPU_FREQ | ||
595 | /* | 596 | /* |
596 | * sa1100fb_display_dma_period() | 597 | * sa1100fb_display_dma_period() |
597 | * Calculate the minimum period (in picoseconds) between two DMA | 598 | * Calculate the minimum period (in picoseconds) between two DMA |
@@ -606,6 +607,7 @@ static inline unsigned int sa1100fb_display_dma_period(struct fb_var_screeninfo | |||
606 | */ | 607 | */ |
607 | return var->pixclock * 8 * 16 / var->bits_per_pixel; | 608 | return var->pixclock * 8 * 16 / var->bits_per_pixel; |
608 | } | 609 | } |
610 | #endif | ||
609 | 611 | ||
610 | /* | 612 | /* |
611 | * sa1100fb_check_var(): | 613 | * sa1100fb_check_var(): |
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index 1b6b74c116a9..14016b1cd948 100644 --- a/drivers/w1/w1.c +++ b/drivers/w1/w1.c | |||
@@ -77,8 +77,7 @@ static void w1_master_release(struct device *dev) | |||
77 | 77 | ||
78 | dev_dbg(dev, "%s: Releasing %s.\n", __func__, md->name); | 78 | dev_dbg(dev, "%s: Releasing %s.\n", __func__, md->name); |
79 | 79 | ||
80 | if (md->nls && md->nls->sk_socket) | 80 | dev_fini_netlink(md); |
81 | sock_release(md->nls->sk_socket); | ||
82 | memset(md, 0, sizeof(struct w1_master) + sizeof(struct w1_bus_master)); | 81 | memset(md, 0, sizeof(struct w1_master) + sizeof(struct w1_bus_master)); |
83 | kfree(md); | 82 | kfree(md); |
84 | } | 83 | } |
diff --git a/fs/proc/base.c b/fs/proc/base.c index 3b33f94020db..a170450aadb1 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -103,7 +103,9 @@ enum pid_directory_inos { | |||
103 | PROC_TGID_NUMA_MAPS, | 103 | PROC_TGID_NUMA_MAPS, |
104 | PROC_TGID_MOUNTS, | 104 | PROC_TGID_MOUNTS, |
105 | PROC_TGID_WCHAN, | 105 | PROC_TGID_WCHAN, |
106 | #ifdef CONFIG_MMU | ||
106 | PROC_TGID_SMAPS, | 107 | PROC_TGID_SMAPS, |
108 | #endif | ||
107 | #ifdef CONFIG_SCHEDSTATS | 109 | #ifdef CONFIG_SCHEDSTATS |
108 | PROC_TGID_SCHEDSTAT, | 110 | PROC_TGID_SCHEDSTAT, |
109 | #endif | 111 | #endif |
@@ -141,7 +143,9 @@ enum pid_directory_inos { | |||
141 | PROC_TID_NUMA_MAPS, | 143 | PROC_TID_NUMA_MAPS, |
142 | PROC_TID_MOUNTS, | 144 | PROC_TID_MOUNTS, |
143 | PROC_TID_WCHAN, | 145 | PROC_TID_WCHAN, |
146 | #ifdef CONFIG_MMU | ||
144 | PROC_TID_SMAPS, | 147 | PROC_TID_SMAPS, |
148 | #endif | ||
145 | #ifdef CONFIG_SCHEDSTATS | 149 | #ifdef CONFIG_SCHEDSTATS |
146 | PROC_TID_SCHEDSTAT, | 150 | PROC_TID_SCHEDSTAT, |
147 | #endif | 151 | #endif |
@@ -195,7 +199,9 @@ static struct pid_entry tgid_base_stuff[] = { | |||
195 | E(PROC_TGID_ROOT, "root", S_IFLNK|S_IRWXUGO), | 199 | E(PROC_TGID_ROOT, "root", S_IFLNK|S_IRWXUGO), |
196 | E(PROC_TGID_EXE, "exe", S_IFLNK|S_IRWXUGO), | 200 | E(PROC_TGID_EXE, "exe", S_IFLNK|S_IRWXUGO), |
197 | E(PROC_TGID_MOUNTS, "mounts", S_IFREG|S_IRUGO), | 201 | E(PROC_TGID_MOUNTS, "mounts", S_IFREG|S_IRUGO), |
202 | #ifdef CONFIG_MMU | ||
198 | E(PROC_TGID_SMAPS, "smaps", S_IFREG|S_IRUGO), | 203 | E(PROC_TGID_SMAPS, "smaps", S_IFREG|S_IRUGO), |
204 | #endif | ||
199 | #ifdef CONFIG_SECURITY | 205 | #ifdef CONFIG_SECURITY |
200 | E(PROC_TGID_ATTR, "attr", S_IFDIR|S_IRUGO|S_IXUGO), | 206 | E(PROC_TGID_ATTR, "attr", S_IFDIR|S_IRUGO|S_IXUGO), |
201 | #endif | 207 | #endif |
@@ -235,7 +241,9 @@ static struct pid_entry tid_base_stuff[] = { | |||
235 | E(PROC_TID_ROOT, "root", S_IFLNK|S_IRWXUGO), | 241 | E(PROC_TID_ROOT, "root", S_IFLNK|S_IRWXUGO), |
236 | E(PROC_TID_EXE, "exe", S_IFLNK|S_IRWXUGO), | 242 | E(PROC_TID_EXE, "exe", S_IFLNK|S_IRWXUGO), |
237 | E(PROC_TID_MOUNTS, "mounts", S_IFREG|S_IRUGO), | 243 | E(PROC_TID_MOUNTS, "mounts", S_IFREG|S_IRUGO), |
244 | #ifdef CONFIG_MMU | ||
238 | E(PROC_TID_SMAPS, "smaps", S_IFREG|S_IRUGO), | 245 | E(PROC_TID_SMAPS, "smaps", S_IFREG|S_IRUGO), |
246 | #endif | ||
239 | #ifdef CONFIG_SECURITY | 247 | #ifdef CONFIG_SECURITY |
240 | E(PROC_TID_ATTR, "attr", S_IFDIR|S_IRUGO|S_IXUGO), | 248 | E(PROC_TID_ATTR, "attr", S_IFDIR|S_IRUGO|S_IXUGO), |
241 | #endif | 249 | #endif |
@@ -630,6 +638,7 @@ static struct file_operations proc_numa_maps_operations = { | |||
630 | }; | 638 | }; |
631 | #endif | 639 | #endif |
632 | 640 | ||
641 | #ifdef CONFIG_MMU | ||
633 | extern struct seq_operations proc_pid_smaps_op; | 642 | extern struct seq_operations proc_pid_smaps_op; |
634 | static int smaps_open(struct inode *inode, struct file *file) | 643 | static int smaps_open(struct inode *inode, struct file *file) |
635 | { | 644 | { |
@@ -648,6 +657,7 @@ static struct file_operations proc_smaps_operations = { | |||
648 | .llseek = seq_lseek, | 657 | .llseek = seq_lseek, |
649 | .release = seq_release, | 658 | .release = seq_release, |
650 | }; | 659 | }; |
660 | #endif | ||
651 | 661 | ||
652 | extern struct seq_operations mounts_op; | 662 | extern struct seq_operations mounts_op; |
653 | static int mounts_open(struct inode *inode, struct file *file) | 663 | static int mounts_open(struct inode *inode, struct file *file) |
@@ -1681,10 +1691,12 @@ static struct dentry *proc_pident_lookup(struct inode *dir, | |||
1681 | case PROC_TGID_MOUNTS: | 1691 | case PROC_TGID_MOUNTS: |
1682 | inode->i_fop = &proc_mounts_operations; | 1692 | inode->i_fop = &proc_mounts_operations; |
1683 | break; | 1693 | break; |
1694 | #ifdef CONFIG_MMU | ||
1684 | case PROC_TID_SMAPS: | 1695 | case PROC_TID_SMAPS: |
1685 | case PROC_TGID_SMAPS: | 1696 | case PROC_TGID_SMAPS: |
1686 | inode->i_fop = &proc_smaps_operations; | 1697 | inode->i_fop = &proc_smaps_operations; |
1687 | break; | 1698 | break; |
1699 | #endif | ||
1688 | #ifdef CONFIG_SECURITY | 1700 | #ifdef CONFIG_SECURITY |
1689 | case PROC_TID_ATTR: | 1701 | case PROC_TID_ATTR: |
1690 | inode->i_nlink = 2; | 1702 | inode->i_nlink = 2; |
diff --git a/include/asm-arm/arch-pxa/pxafb.h b/include/asm-arm/arch-pxa/pxafb.h index 21c0e16dce5f..aba9b30f4249 100644 --- a/include/asm-arm/arch-pxa/pxafb.h +++ b/include/asm-arm/arch-pxa/pxafb.h | |||
@@ -66,4 +66,5 @@ struct pxafb_mach_info { | |||
66 | 66 | ||
67 | }; | 67 | }; |
68 | void set_pxa_fb_info(struct pxafb_mach_info *hard_pxa_fb_info); | 68 | void set_pxa_fb_info(struct pxafb_mach_info *hard_pxa_fb_info); |
69 | void set_pxa_fb_parent(struct device *parent_dev); | ||
69 | unsigned long pxafb_get_hsync_time(struct device *dev); | 70 | unsigned long pxafb_get_hsync_time(struct device *dev); |
diff --git a/include/asm-arm/arch-s3c2410/io.h b/include/asm-arm/arch-s3c2410/io.h index 418233a7ee6f..4bf272ed9add 100644 --- a/include/asm-arm/arch-s3c2410/io.h +++ b/include/asm-arm/arch-s3c2410/io.h | |||
@@ -9,7 +9,7 @@ | |||
9 | * 06-Dec-1997 RMK Created. | 9 | * 06-Dec-1997 RMK Created. |
10 | * 02-Sep-2003 BJD Modified for S3C2410 | 10 | * 02-Sep-2003 BJD Modified for S3C2410 |
11 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | 11 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA |
12 | * | 12 | * 13-Oct-2005 BJD Fixed problems with LDRH/STRH offset range |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #ifndef __ASM_ARM_ARCH_IO_H | 15 | #ifndef __ASM_ARM_ARCH_IO_H |
@@ -97,7 +97,7 @@ DECLARE_IO(int,l,"") | |||
97 | else \ | 97 | else \ |
98 | __asm__ __volatile__( \ | 98 | __asm__ __volatile__( \ |
99 | "strb %0, [%1, #0] @ outbc" \ | 99 | "strb %0, [%1, #0] @ outbc" \ |
100 | : : "r" (value), "r" ((port))); \ | 100 | : : "r" (value), "r" ((port))); \ |
101 | }) | 101 | }) |
102 | 102 | ||
103 | #define __inbc(port) \ | 103 | #define __inbc(port) \ |
@@ -110,35 +110,61 @@ DECLARE_IO(int,l,"") | |||
110 | else \ | 110 | else \ |
111 | __asm__ __volatile__( \ | 111 | __asm__ __volatile__( \ |
112 | "ldrb %0, [%1, #0] @ inbc" \ | 112 | "ldrb %0, [%1, #0] @ inbc" \ |
113 | : "=r" (result) : "r" ((port))); \ | 113 | : "=r" (result) : "r" ((port))); \ |
114 | result; \ | 114 | result; \ |
115 | }) | 115 | }) |
116 | 116 | ||
117 | #define __outwc(value,port) \ | 117 | #define __outwc(value,port) \ |
118 | ({ \ | 118 | ({ \ |
119 | unsigned long v = value; \ | 119 | unsigned long v = value; \ |
120 | if (__PORT_PCIO((port))) \ | 120 | if (__PORT_PCIO((port))) { \ |
121 | __asm__ __volatile__( \ | 121 | if ((port) < 256 && (port) > -256) \ |
122 | "strh %0, [%1, %2] @ outwc" \ | 122 | __asm__ __volatile__( \ |
123 | : : "r" (v), "r" (PCIO_BASE), "Jr" ((port))); \ | 123 | "strh %0, [%1, %2] @ outwc" \ |
124 | else \ | 124 | : : "r" (v), "r" (PCIO_BASE), "Jr" ((port))); \ |
125 | else if ((port) > 0) \ | ||
126 | __asm__ __volatile__( \ | ||
127 | "strh %0, [%1, %2] @ outwc" \ | ||
128 | : : "r" (v), \ | ||
129 | "r" (PCIO_BASE + ((port) & ~0xff)), \ | ||
130 | "Jr" (((port) & 0xff))); \ | ||
131 | else \ | ||
132 | __asm__ __volatile__( \ | ||
133 | "strh %0, [%1, #0] @ outwc" \ | ||
134 | : : "r" (v), \ | ||
135 | "r" (PCIO_BASE + (port))); \ | ||
136 | } else \ | ||
125 | __asm__ __volatile__( \ | 137 | __asm__ __volatile__( \ |
126 | "strh %0, [%1, #0] @ outwc" \ | 138 | "strh %0, [%1, #0] @ outwc" \ |
127 | : : "r" (v), "r" ((port))); \ | 139 | : : "r" (v), "r" ((port))); \ |
128 | }) | 140 | }) |
129 | 141 | ||
130 | #define __inwc(port) \ | 142 | #define __inwc(port) \ |
131 | ({ \ | 143 | ({ \ |
132 | unsigned short result; \ | 144 | unsigned short result; \ |
133 | if (__PORT_PCIO((port))) \ | 145 | if (__PORT_PCIO((port))) { \ |
134 | __asm__ __volatile__( \ | 146 | if ((port) < 256 && (port) > -256 ) \ |
135 | "ldrh %0, [%1, %2] @ inwc" \ | 147 | __asm__ __volatile__( \ |
136 | : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port))); \ | 148 | "ldrh %0, [%1, %2] @ inwc" \ |
137 | else \ | 149 | : "=r" (result) \ |
150 | : "r" (PCIO_BASE), \ | ||
151 | "Jr" ((port))); \ | ||
152 | else if ((port) > 0) \ | ||
153 | __asm__ __volatile__( \ | ||
154 | "ldrh %0, [%1, %2] @ inwc" \ | ||
155 | : "=r" (result) \ | ||
156 | : "r" (PCIO_BASE + ((port) & ~0xff)), \ | ||
157 | "Jr" (((port) & 0xff))); \ | ||
158 | else \ | ||
159 | __asm__ __volatile__( \ | ||
160 | "ldrh %0, [%1, #0] @ inwc" \ | ||
161 | : "=r" (result) \ | ||
162 | : "r" (PCIO_BASE + ((port)))); \ | ||
163 | } else \ | ||
138 | __asm__ __volatile__( \ | 164 | __asm__ __volatile__( \ |
139 | "ldrh %0, [%1, #0] @ inwc" \ | 165 | "ldrh %0, [%1, #0] @ inwc" \ |
140 | : "=r" (result) : "r" ((port))); \ | 166 | : "=r" (result) : "r" ((port))); \ |
141 | result; \ | 167 | result; \ |
142 | }) | 168 | }) |
143 | 169 | ||
144 | #define __outlc(value,port) \ | 170 | #define __outlc(value,port) \ |
diff --git a/include/linux/acct.h b/include/linux/acct.h index 1993a3691768..19f70462b3be 100644 --- a/include/linux/acct.h +++ b/include/linux/acct.h | |||
@@ -162,13 +162,13 @@ typedef struct acct acct_t; | |||
162 | #ifdef __KERNEL__ | 162 | #ifdef __KERNEL__ |
163 | /* | 163 | /* |
164 | * Yet another set of HZ to *HZ helper functions. | 164 | * Yet another set of HZ to *HZ helper functions. |
165 | * See <linux/times.h> for the original. | 165 | * See <linux/jiffies.h> for the original. |
166 | */ | 166 | */ |
167 | 167 | ||
168 | static inline u32 jiffies_to_AHZ(unsigned long x) | 168 | static inline u32 jiffies_to_AHZ(unsigned long x) |
169 | { | 169 | { |
170 | #if (TICK_NSEC % (NSEC_PER_SEC / AHZ)) == 0 | 170 | #if (TICK_NSEC % (NSEC_PER_SEC / AHZ)) == 0 |
171 | return x / (HZ / USER_HZ); | 171 | return x / (HZ / AHZ); |
172 | #else | 172 | #else |
173 | u64 tmp = (u64)x * TICK_NSEC; | 173 | u64 tmp = (u64)x * TICK_NSEC; |
174 | do_div(tmp, (NSEC_PER_SEC / AHZ)); | 174 | do_div(tmp, (NSEC_PER_SEC / AHZ)); |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index b15826f6e3a2..fe9778301d07 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -392,4 +392,16 @@ extern cpumask_t cpu_present_map; | |||
392 | #define for_each_online_cpu(cpu) for_each_cpu_mask((cpu), cpu_online_map) | 392 | #define for_each_online_cpu(cpu) for_each_cpu_mask((cpu), cpu_online_map) |
393 | #define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map) | 393 | #define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map) |
394 | 394 | ||
395 | /* Find the highest possible smp_processor_id() */ | ||
396 | static inline unsigned int highest_possible_processor_id(void) | ||
397 | { | ||
398 | unsigned int cpu, highest = 0; | ||
399 | |||
400 | for_each_cpu_mask(cpu, cpu_possible_map) | ||
401 | highest = cpu; | ||
402 | |||
403 | return highest; | ||
404 | } | ||
405 | |||
406 | |||
395 | #endif /* __LINUX_CPUMASK_H */ | 407 | #endif /* __LINUX_CPUMASK_H */ |
diff --git a/kernel/time.c b/kernel/time.c index dd5ae1162a8f..40c2410ac99a 100644 --- a/kernel/time.c +++ b/kernel/time.c | |||
@@ -570,6 +570,7 @@ void getnstimeofday(struct timespec *tv) | |||
570 | tv->tv_sec = x.tv_sec; | 570 | tv->tv_sec = x.tv_sec; |
571 | tv->tv_nsec = x.tv_usec * NSEC_PER_USEC; | 571 | tv->tv_nsec = x.tv_usec * NSEC_PER_USEC; |
572 | } | 572 | } |
573 | EXPORT_SYMBOL_GPL(getnstimeofday); | ||
573 | #endif | 574 | #endif |
574 | 575 | ||
575 | #if (BITS_PER_LONG < 64) | 576 | #if (BITS_PER_LONG < 64) |
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c index c4540144f0f4..f8ffbf6e2333 100644 --- a/net/bridge/netfilter/ebtables.c +++ b/net/bridge/netfilter/ebtables.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/spinlock.h> | 26 | #include <linux/spinlock.h> |
27 | #include <asm/uaccess.h> | 27 | #include <asm/uaccess.h> |
28 | #include <linux/smp.h> | 28 | #include <linux/smp.h> |
29 | #include <linux/cpumask.h> | ||
29 | #include <net/sock.h> | 30 | #include <net/sock.h> |
30 | /* needed for logical [in,out]-dev filtering */ | 31 | /* needed for logical [in,out]-dev filtering */ |
31 | #include "../br_private.h" | 32 | #include "../br_private.h" |
@@ -823,10 +824,11 @@ static int translate_table(struct ebt_replace *repl, | |||
823 | /* this will get free'd in do_replace()/ebt_register_table() | 824 | /* this will get free'd in do_replace()/ebt_register_table() |
824 | if an error occurs */ | 825 | if an error occurs */ |
825 | newinfo->chainstack = (struct ebt_chainstack **) | 826 | newinfo->chainstack = (struct ebt_chainstack **) |
826 | vmalloc(num_possible_cpus() * sizeof(struct ebt_chainstack)); | 827 | vmalloc((highest_possible_processor_id()+1) |
828 | * sizeof(struct ebt_chainstack)); | ||
827 | if (!newinfo->chainstack) | 829 | if (!newinfo->chainstack) |
828 | return -ENOMEM; | 830 | return -ENOMEM; |
829 | for (i = 0; i < num_possible_cpus(); i++) { | 831 | for_each_cpu(i) { |
830 | newinfo->chainstack[i] = | 832 | newinfo->chainstack[i] = |
831 | vmalloc(udc_cnt * sizeof(struct ebt_chainstack)); | 833 | vmalloc(udc_cnt * sizeof(struct ebt_chainstack)); |
832 | if (!newinfo->chainstack[i]) { | 834 | if (!newinfo->chainstack[i]) { |
@@ -895,9 +897,12 @@ static void get_counters(struct ebt_counter *oldcounters, | |||
895 | 897 | ||
896 | /* counters of cpu 0 */ | 898 | /* counters of cpu 0 */ |
897 | memcpy(counters, oldcounters, | 899 | memcpy(counters, oldcounters, |
898 | sizeof(struct ebt_counter) * nentries); | 900 | sizeof(struct ebt_counter) * nentries); |
901 | |||
899 | /* add other counters to those of cpu 0 */ | 902 | /* add other counters to those of cpu 0 */ |
900 | for (cpu = 1; cpu < num_possible_cpus(); cpu++) { | 903 | for_each_cpu(cpu) { |
904 | if (cpu == 0) | ||
905 | continue; | ||
901 | counter_base = COUNTER_BASE(oldcounters, nentries, cpu); | 906 | counter_base = COUNTER_BASE(oldcounters, nentries, cpu); |
902 | for (i = 0; i < nentries; i++) { | 907 | for (i = 0; i < nentries; i++) { |
903 | counters[i].pcnt += counter_base[i].pcnt; | 908 | counters[i].pcnt += counter_base[i].pcnt; |
@@ -929,7 +934,8 @@ static int do_replace(void __user *user, unsigned int len) | |||
929 | BUGPRINT("Entries_size never zero\n"); | 934 | BUGPRINT("Entries_size never zero\n"); |
930 | return -EINVAL; | 935 | return -EINVAL; |
931 | } | 936 | } |
932 | countersize = COUNTER_OFFSET(tmp.nentries) * num_possible_cpus(); | 937 | countersize = COUNTER_OFFSET(tmp.nentries) * |
938 | (highest_possible_processor_id()+1); | ||
933 | newinfo = (struct ebt_table_info *) | 939 | newinfo = (struct ebt_table_info *) |
934 | vmalloc(sizeof(struct ebt_table_info) + countersize); | 940 | vmalloc(sizeof(struct ebt_table_info) + countersize); |
935 | if (!newinfo) | 941 | if (!newinfo) |
@@ -1022,7 +1028,7 @@ static int do_replace(void __user *user, unsigned int len) | |||
1022 | 1028 | ||
1023 | vfree(table->entries); | 1029 | vfree(table->entries); |
1024 | if (table->chainstack) { | 1030 | if (table->chainstack) { |
1025 | for (i = 0; i < num_possible_cpus(); i++) | 1031 | for_each_cpu(i) |
1026 | vfree(table->chainstack[i]); | 1032 | vfree(table->chainstack[i]); |
1027 | vfree(table->chainstack); | 1033 | vfree(table->chainstack); |
1028 | } | 1034 | } |
@@ -1040,7 +1046,7 @@ free_counterstmp: | |||
1040 | vfree(counterstmp); | 1046 | vfree(counterstmp); |
1041 | /* can be initialized in translate_table() */ | 1047 | /* can be initialized in translate_table() */ |
1042 | if (newinfo->chainstack) { | 1048 | if (newinfo->chainstack) { |
1043 | for (i = 0; i < num_possible_cpus(); i++) | 1049 | for_each_cpu(i) |
1044 | vfree(newinfo->chainstack[i]); | 1050 | vfree(newinfo->chainstack[i]); |
1045 | vfree(newinfo->chainstack); | 1051 | vfree(newinfo->chainstack); |
1046 | } | 1052 | } |
@@ -1132,7 +1138,8 @@ int ebt_register_table(struct ebt_table *table) | |||
1132 | return -EINVAL; | 1138 | return -EINVAL; |
1133 | } | 1139 | } |
1134 | 1140 | ||
1135 | countersize = COUNTER_OFFSET(table->table->nentries) * num_possible_cpus(); | 1141 | countersize = COUNTER_OFFSET(table->table->nentries) * |
1142 | (highest_possible_processor_id()+1); | ||
1136 | newinfo = (struct ebt_table_info *) | 1143 | newinfo = (struct ebt_table_info *) |
1137 | vmalloc(sizeof(struct ebt_table_info) + countersize); | 1144 | vmalloc(sizeof(struct ebt_table_info) + countersize); |
1138 | ret = -ENOMEM; | 1145 | ret = -ENOMEM; |
@@ -1186,7 +1193,7 @@ free_unlock: | |||
1186 | up(&ebt_mutex); | 1193 | up(&ebt_mutex); |
1187 | free_chainstack: | 1194 | free_chainstack: |
1188 | if (newinfo->chainstack) { | 1195 | if (newinfo->chainstack) { |
1189 | for (i = 0; i < num_possible_cpus(); i++) | 1196 | for_each_cpu(i) |
1190 | vfree(newinfo->chainstack[i]); | 1197 | vfree(newinfo->chainstack[i]); |
1191 | vfree(newinfo->chainstack); | 1198 | vfree(newinfo->chainstack); |
1192 | } | 1199 | } |
@@ -1209,7 +1216,7 @@ void ebt_unregister_table(struct ebt_table *table) | |||
1209 | up(&ebt_mutex); | 1216 | up(&ebt_mutex); |
1210 | vfree(table->private->entries); | 1217 | vfree(table->private->entries); |
1211 | if (table->private->chainstack) { | 1218 | if (table->private->chainstack) { |
1212 | for (i = 0; i < num_possible_cpus(); i++) | 1219 | for_each_cpu(i) |
1213 | vfree(table->private->chainstack[i]); | 1220 | vfree(table->private->chainstack[i]); |
1214 | vfree(table->private->chainstack); | 1221 | vfree(table->private->chainstack); |
1215 | } | 1222 | } |
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c index fa1634256680..a7969286e6e7 100644 --- a/net/ipv4/netfilter/arp_tables.c +++ b/net/ipv4/netfilter/arp_tables.c | |||
@@ -716,8 +716,10 @@ static int translate_table(const char *name, | |||
716 | } | 716 | } |
717 | 717 | ||
718 | /* And one copy for every other CPU */ | 718 | /* And one copy for every other CPU */ |
719 | for (i = 1; i < num_possible_cpus(); i++) { | 719 | for_each_cpu(i) { |
720 | memcpy(newinfo->entries + SMP_ALIGN(newinfo->size)*i, | 720 | if (i == 0) |
721 | continue; | ||
722 | memcpy(newinfo->entries + SMP_ALIGN(newinfo->size) * i, | ||
721 | newinfo->entries, | 723 | newinfo->entries, |
722 | SMP_ALIGN(newinfo->size)); | 724 | SMP_ALIGN(newinfo->size)); |
723 | } | 725 | } |
@@ -767,7 +769,7 @@ static void get_counters(const struct arpt_table_info *t, | |||
767 | unsigned int cpu; | 769 | unsigned int cpu; |
768 | unsigned int i; | 770 | unsigned int i; |
769 | 771 | ||
770 | for (cpu = 0; cpu < num_possible_cpus(); cpu++) { | 772 | for_each_cpu(cpu) { |
771 | i = 0; | 773 | i = 0; |
772 | ARPT_ENTRY_ITERATE(t->entries + TABLE_OFFSET(t, cpu), | 774 | ARPT_ENTRY_ITERATE(t->entries + TABLE_OFFSET(t, cpu), |
773 | t->size, | 775 | t->size, |
@@ -885,7 +887,8 @@ static int do_replace(void __user *user, unsigned int len) | |||
885 | return -ENOMEM; | 887 | return -ENOMEM; |
886 | 888 | ||
887 | newinfo = vmalloc(sizeof(struct arpt_table_info) | 889 | newinfo = vmalloc(sizeof(struct arpt_table_info) |
888 | + SMP_ALIGN(tmp.size) * num_possible_cpus()); | 890 | + SMP_ALIGN(tmp.size) * |
891 | (highest_possible_processor_id()+1)); | ||
889 | if (!newinfo) | 892 | if (!newinfo) |
890 | return -ENOMEM; | 893 | return -ENOMEM; |
891 | 894 | ||
@@ -1158,7 +1161,8 @@ int arpt_register_table(struct arpt_table *table, | |||
1158 | = { 0, 0, 0, { 0 }, { 0 }, { } }; | 1161 | = { 0, 0, 0, { 0 }, { 0 }, { } }; |
1159 | 1162 | ||
1160 | newinfo = vmalloc(sizeof(struct arpt_table_info) | 1163 | newinfo = vmalloc(sizeof(struct arpt_table_info) |
1161 | + SMP_ALIGN(repl->size) * num_possible_cpus()); | 1164 | + SMP_ALIGN(repl->size) * |
1165 | (highest_possible_processor_id()+1)); | ||
1162 | if (!newinfo) { | 1166 | if (!newinfo) { |
1163 | ret = -ENOMEM; | 1167 | ret = -ENOMEM; |
1164 | return ret; | 1168 | return ret; |
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index eef99a1b5de6..75c27e92f6ab 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <asm/semaphore.h> | 27 | #include <asm/semaphore.h> |
28 | #include <linux/proc_fs.h> | 28 | #include <linux/proc_fs.h> |
29 | #include <linux/err.h> | 29 | #include <linux/err.h> |
30 | #include <linux/cpumask.h> | ||
30 | 31 | ||
31 | #include <linux/netfilter_ipv4/ip_tables.h> | 32 | #include <linux/netfilter_ipv4/ip_tables.h> |
32 | 33 | ||
@@ -921,8 +922,10 @@ translate_table(const char *name, | |||
921 | } | 922 | } |
922 | 923 | ||
923 | /* And one copy for every other CPU */ | 924 | /* And one copy for every other CPU */ |
924 | for (i = 1; i < num_possible_cpus(); i++) { | 925 | for_each_cpu(i) { |
925 | memcpy(newinfo->entries + SMP_ALIGN(newinfo->size)*i, | 926 | if (i == 0) |
927 | continue; | ||
928 | memcpy(newinfo->entries + SMP_ALIGN(newinfo->size) * i, | ||
926 | newinfo->entries, | 929 | newinfo->entries, |
927 | SMP_ALIGN(newinfo->size)); | 930 | SMP_ALIGN(newinfo->size)); |
928 | } | 931 | } |
@@ -943,7 +946,7 @@ replace_table(struct ipt_table *table, | |||
943 | struct ipt_entry *table_base; | 946 | struct ipt_entry *table_base; |
944 | unsigned int i; | 947 | unsigned int i; |
945 | 948 | ||
946 | for (i = 0; i < num_possible_cpus(); i++) { | 949 | for_each_cpu(i) { |
947 | table_base = | 950 | table_base = |
948 | (void *)newinfo->entries | 951 | (void *)newinfo->entries |
949 | + TABLE_OFFSET(newinfo, i); | 952 | + TABLE_OFFSET(newinfo, i); |
@@ -990,7 +993,7 @@ get_counters(const struct ipt_table_info *t, | |||
990 | unsigned int cpu; | 993 | unsigned int cpu; |
991 | unsigned int i; | 994 | unsigned int i; |
992 | 995 | ||
993 | for (cpu = 0; cpu < num_possible_cpus(); cpu++) { | 996 | for_each_cpu(cpu) { |
994 | i = 0; | 997 | i = 0; |
995 | IPT_ENTRY_ITERATE(t->entries + TABLE_OFFSET(t, cpu), | 998 | IPT_ENTRY_ITERATE(t->entries + TABLE_OFFSET(t, cpu), |
996 | t->size, | 999 | t->size, |
@@ -1128,7 +1131,8 @@ do_replace(void __user *user, unsigned int len) | |||
1128 | return -ENOMEM; | 1131 | return -ENOMEM; |
1129 | 1132 | ||
1130 | newinfo = vmalloc(sizeof(struct ipt_table_info) | 1133 | newinfo = vmalloc(sizeof(struct ipt_table_info) |
1131 | + SMP_ALIGN(tmp.size) * num_possible_cpus()); | 1134 | + SMP_ALIGN(tmp.size) * |
1135 | (highest_possible_processor_id()+1)); | ||
1132 | if (!newinfo) | 1136 | if (!newinfo) |
1133 | return -ENOMEM; | 1137 | return -ENOMEM; |
1134 | 1138 | ||
@@ -1458,7 +1462,8 @@ int ipt_register_table(struct ipt_table *table, const struct ipt_replace *repl) | |||
1458 | = { 0, 0, 0, { 0 }, { 0 }, { } }; | 1462 | = { 0, 0, 0, { 0 }, { 0 }, { } }; |
1459 | 1463 | ||
1460 | newinfo = vmalloc(sizeof(struct ipt_table_info) | 1464 | newinfo = vmalloc(sizeof(struct ipt_table_info) |
1461 | + SMP_ALIGN(repl->size) * num_possible_cpus()); | 1465 | + SMP_ALIGN(repl->size) * |
1466 | (highest_possible_processor_id()+1)); | ||
1462 | if (!newinfo) | 1467 | if (!newinfo) |
1463 | return -ENOMEM; | 1468 | return -ENOMEM; |
1464 | 1469 | ||
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index f37a50e55b68..7114031fdc70 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -436,11 +436,13 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss | |||
436 | u16 flags; | 436 | u16 flags; |
437 | 437 | ||
438 | if (unlikely(len >= skb->len)) { | 438 | if (unlikely(len >= skb->len)) { |
439 | printk(KERN_DEBUG "TCP: seg_size=%u, mss=%u, seq=%u, " | 439 | if (net_ratelimit()) { |
440 | "end_seq=%u, skb->len=%u.\n", len, mss_now, | 440 | printk(KERN_DEBUG "TCP: seg_size=%u, mss=%u, seq=%u, " |
441 | TCP_SKB_CB(skb)->seq, TCP_SKB_CB(skb)->end_seq, | 441 | "end_seq=%u, skb->len=%u.\n", len, mss_now, |
442 | skb->len); | 442 | TCP_SKB_CB(skb)->seq, TCP_SKB_CB(skb)->end_seq, |
443 | WARN_ON(1); | 443 | skb->len); |
444 | WARN_ON(1); | ||
445 | } | ||
444 | return 0; | 446 | return 0; |
445 | } | 447 | } |
446 | 448 | ||
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index 2da514b16d95..b03e90649eb5 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
29 | #include <asm/semaphore.h> | 29 | #include <asm/semaphore.h> |
30 | #include <linux/proc_fs.h> | 30 | #include <linux/proc_fs.h> |
31 | #include <linux/cpumask.h> | ||
31 | 32 | ||
32 | #include <linux/netfilter_ipv6/ip6_tables.h> | 33 | #include <linux/netfilter_ipv6/ip6_tables.h> |
33 | 34 | ||
@@ -950,8 +951,10 @@ translate_table(const char *name, | |||
950 | } | 951 | } |
951 | 952 | ||
952 | /* And one copy for every other CPU */ | 953 | /* And one copy for every other CPU */ |
953 | for (i = 1; i < num_possible_cpus(); i++) { | 954 | for_each_cpu(i) { |
954 | memcpy(newinfo->entries + SMP_ALIGN(newinfo->size)*i, | 955 | if (i == 0) |
956 | continue; | ||
957 | memcpy(newinfo->entries + SMP_ALIGN(newinfo->size) * i, | ||
955 | newinfo->entries, | 958 | newinfo->entries, |
956 | SMP_ALIGN(newinfo->size)); | 959 | SMP_ALIGN(newinfo->size)); |
957 | } | 960 | } |
@@ -973,6 +976,7 @@ replace_table(struct ip6t_table *table, | |||
973 | unsigned int i; | 976 | unsigned int i; |
974 | 977 | ||
975 | for (i = 0; i < num_possible_cpus(); i++) { | 978 | for (i = 0; i < num_possible_cpus(); i++) { |
979 | for_each_cpu(i) { | ||
976 | table_base = | 980 | table_base = |
977 | (void *)newinfo->entries | 981 | (void *)newinfo->entries |
978 | + TABLE_OFFSET(newinfo, i); | 982 | + TABLE_OFFSET(newinfo, i); |
@@ -1019,7 +1023,7 @@ get_counters(const struct ip6t_table_info *t, | |||
1019 | unsigned int cpu; | 1023 | unsigned int cpu; |
1020 | unsigned int i; | 1024 | unsigned int i; |
1021 | 1025 | ||
1022 | for (cpu = 0; cpu < num_possible_cpus(); cpu++) { | 1026 | for_each_cpu(cpu) { |
1023 | i = 0; | 1027 | i = 0; |
1024 | IP6T_ENTRY_ITERATE(t->entries + TABLE_OFFSET(t, cpu), | 1028 | IP6T_ENTRY_ITERATE(t->entries + TABLE_OFFSET(t, cpu), |
1025 | t->size, | 1029 | t->size, |
@@ -1153,7 +1157,8 @@ do_replace(void __user *user, unsigned int len) | |||
1153 | return -ENOMEM; | 1157 | return -ENOMEM; |
1154 | 1158 | ||
1155 | newinfo = vmalloc(sizeof(struct ip6t_table_info) | 1159 | newinfo = vmalloc(sizeof(struct ip6t_table_info) |
1156 | + SMP_ALIGN(tmp.size) * num_possible_cpus()); | 1160 | + SMP_ALIGN(tmp.size) * |
1161 | (highest_possible_processor_id()+1)); | ||
1157 | if (!newinfo) | 1162 | if (!newinfo) |
1158 | return -ENOMEM; | 1163 | return -ENOMEM; |
1159 | 1164 | ||
@@ -1467,7 +1472,8 @@ int ip6t_register_table(struct ip6t_table *table, | |||
1467 | = { 0, 0, 0, { 0 }, { 0 }, { } }; | 1472 | = { 0, 0, 0, { 0 }, { 0 }, { } }; |
1468 | 1473 | ||
1469 | newinfo = vmalloc(sizeof(struct ip6t_table_info) | 1474 | newinfo = vmalloc(sizeof(struct ip6t_table_info) |
1470 | + SMP_ALIGN(repl->size) * num_possible_cpus()); | 1475 | + SMP_ALIGN(repl->size) * |
1476 | (highest_possible_processor_id()+1)); | ||
1471 | if (!newinfo) | 1477 | if (!newinfo) |
1472 | return -ENOMEM; | 1478 | return -ENOMEM; |
1473 | 1479 | ||
diff --git a/net/sched/Kconfig b/net/sched/Kconfig index 45d3bc0812c8..81510da31792 100644 --- a/net/sched/Kconfig +++ b/net/sched/Kconfig | |||
@@ -72,9 +72,11 @@ config NET_SCH_CLK_GETTIMEOFDAY | |||
72 | Choose this if you need a high resolution clock source but can't use | 72 | Choose this if you need a high resolution clock source but can't use |
73 | the CPU's cycle counter. | 73 | the CPU's cycle counter. |
74 | 74 | ||
75 | # don't allow on SMP x86 because they can have unsynchronized TSCs. | ||
76 | # gettimeofday is a good alternative | ||
75 | config NET_SCH_CLK_CPU | 77 | config NET_SCH_CLK_CPU |
76 | bool "CPU cycle counter" | 78 | bool "CPU cycle counter" |
77 | depends on X86_TSC || X86_64 || ALPHA || SPARC64 || PPC64 || IA64 | 79 | depends on ((X86_TSC || X86_64) && !SMP) || ALPHA || SPARC64 || PPC64 || IA64 |
78 | help | 80 | help |
79 | Say Y here if you want to use the CPU's cycle counter as clock source. | 81 | Say Y here if you want to use the CPU's cycle counter as clock source. |
80 | This is a cheap and high resolution clock source, but on some | 82 | This is a cheap and high resolution clock source, but on some |