diff options
59 files changed, 368 insertions, 209 deletions
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index d7d932c02866..d6bd435a6857 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c | |||
@@ -422,12 +422,14 @@ static int timer_dyn_tick_disable(void) | |||
422 | void timer_dyn_reprogram(void) | 422 | void timer_dyn_reprogram(void) |
423 | { | 423 | { |
424 | struct dyn_tick_timer *dyn_tick = system_timer->dyn_tick; | 424 | struct dyn_tick_timer *dyn_tick = system_timer->dyn_tick; |
425 | unsigned long next, seq; | ||
425 | 426 | ||
426 | if (dyn_tick) { | 427 | if (dyn_tick && (dyn_tick->state & DYN_TICK_ENABLED)) { |
427 | write_seqlock(&xtime_lock); | 428 | next = next_timer_interrupt(); |
428 | if (dyn_tick->state & DYN_TICK_ENABLED) | 429 | do { |
430 | seq = read_seqbegin(&xtime_lock); | ||
429 | dyn_tick->reprogram(next_timer_interrupt() - jiffies); | 431 | dyn_tick->reprogram(next_timer_interrupt() - jiffies); |
430 | write_sequnlock(&xtime_lock); | 432 | } while (read_seqretry(&xtime_lock, seq)); |
431 | } | 433 | } |
432 | } | 434 | } |
433 | 435 | ||
diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c index ed79ae20e88d..dd344f112cfe 100644 --- a/arch/h8300/kernel/process.c +++ b/arch/h8300/kernel/process.c | |||
@@ -45,6 +45,9 @@ | |||
45 | #include <asm/setup.h> | 45 | #include <asm/setup.h> |
46 | #include <asm/pgtable.h> | 46 | #include <asm/pgtable.h> |
47 | 47 | ||
48 | void (*pm_power_off)(void) = NULL; | ||
49 | EXPORT_SYMBOL(pm_power_off); | ||
50 | |||
48 | asmlinkage void ret_from_fork(void); | 51 | asmlinkage void ret_from_fork(void); |
49 | 52 | ||
50 | /* | 53 | /* |
diff --git a/arch/i386/kernel/efi.c b/arch/i386/kernel/efi.c index e3e42fd62401..c9cad7ba0d2d 100644 --- a/arch/i386/kernel/efi.c +++ b/arch/i386/kernel/efi.c | |||
@@ -70,10 +70,13 @@ static void efi_call_phys_prelog(void) | |||
70 | { | 70 | { |
71 | unsigned long cr4; | 71 | unsigned long cr4; |
72 | unsigned long temp; | 72 | unsigned long temp; |
73 | struct Xgt_desc_struct *cpu_gdt_descr; | ||
73 | 74 | ||
74 | spin_lock(&efi_rt_lock); | 75 | spin_lock(&efi_rt_lock); |
75 | local_irq_save(efi_rt_eflags); | 76 | local_irq_save(efi_rt_eflags); |
76 | 77 | ||
78 | cpu_gdt_descr = &per_cpu(cpu_gdt_descr, 0); | ||
79 | |||
77 | /* | 80 | /* |
78 | * If I don't have PSE, I should just duplicate two entries in page | 81 | * If I don't have PSE, I should just duplicate two entries in page |
79 | * directory. If I have PSE, I just need to duplicate one entry in | 82 | * directory. If I have PSE, I just need to duplicate one entry in |
@@ -103,18 +106,17 @@ static void efi_call_phys_prelog(void) | |||
103 | */ | 106 | */ |
104 | local_flush_tlb(); | 107 | local_flush_tlb(); |
105 | 108 | ||
106 | per_cpu(cpu_gdt_descr, 0).address = | 109 | cpu_gdt_descr->address = __pa(cpu_gdt_descr->address); |
107 | __pa(per_cpu(cpu_gdt_descr, 0).address); | 110 | load_gdt(cpu_gdt_descr); |
108 | load_gdt((struct Xgt_desc_struct *)__pa(&per_cpu(cpu_gdt_descr, 0))); | ||
109 | } | 111 | } |
110 | 112 | ||
111 | static void efi_call_phys_epilog(void) | 113 | static void efi_call_phys_epilog(void) |
112 | { | 114 | { |
113 | unsigned long cr4; | 115 | unsigned long cr4; |
116 | struct Xgt_desc_struct *cpu_gdt_descr = &per_cpu(cpu_gdt_descr, 0); | ||
114 | 117 | ||
115 | per_cpu(cpu_gdt_descr, 0).address = | 118 | cpu_gdt_descr->address = __va(cpu_gdt_descr->address); |
116 | (unsigned long)__va(per_cpu(cpu_gdt_descr, 0).address); | 119 | load_gdt(cpu_gdt_descr); |
117 | load_gdt((struct Xgt_desc_struct *)__va(&per_cpu(cpu_gdt_descr, 0))); | ||
118 | 120 | ||
119 | cr4 = read_cr4(); | 121 | cr4 = read_cr4(); |
120 | 122 | ||
diff --git a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c index a14d594bfbeb..9d3074759856 100644 --- a/arch/i386/kernel/time.c +++ b/arch/i386/kernel/time.c | |||
@@ -412,9 +412,9 @@ static int timer_resume(struct sys_device *dev) | |||
412 | write_seqlock_irqsave(&xtime_lock, flags); | 412 | write_seqlock_irqsave(&xtime_lock, flags); |
413 | xtime.tv_sec = sec; | 413 | xtime.tv_sec = sec; |
414 | xtime.tv_nsec = 0; | 414 | xtime.tv_nsec = 0; |
415 | write_sequnlock_irqrestore(&xtime_lock, flags); | 415 | jiffies_64 += sleep_length; |
416 | jiffies += sleep_length; | ||
417 | wall_jiffies += sleep_length; | 416 | wall_jiffies += sleep_length; |
417 | write_sequnlock_irqrestore(&xtime_lock, flags); | ||
418 | if (last_timer->resume) | 418 | if (last_timer->resume) |
419 | last_timer->resume(); | 419 | last_timer->resume(); |
420 | cur_timer = last_timer; | 420 | cur_timer = last_timer; |
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 11f2cd5af7dc..9b65029dd2a3 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -1537,6 +1537,9 @@ _STATIC(__boot_from_prom) | |||
1537 | mr r28,r6 | 1537 | mr r28,r6 |
1538 | mr r27,r7 | 1538 | mr r27,r7 |
1539 | 1539 | ||
1540 | /* Align the stack to 16-byte boundary for broken yaboot */ | ||
1541 | rldicr r1,r1,0,59 | ||
1542 | |||
1540 | /* Make sure we are running in 64 bits mode */ | 1543 | /* Make sure we are running in 64 bits mode */ |
1541 | bl .enable_64b_mode | 1544 | bl .enable_64b_mode |
1542 | 1545 | ||
diff --git a/arch/sparc64/kernel/sys32.S b/arch/sparc64/kernel/sys32.S index 60b59375aa78..c4a1cef4b1e5 100644 --- a/arch/sparc64/kernel/sys32.S +++ b/arch/sparc64/kernel/sys32.S | |||
@@ -318,7 +318,7 @@ do_sys_recvmsg: /* compat_sys_recvmsg(int, struct compat_msghdr *, unsigned int) | |||
318 | nop | 318 | nop |
319 | nop | 319 | nop |
320 | 320 | ||
321 | .section __ex_table | 321 | .section __ex_table,"a" |
322 | .align 4 | 322 | .align 4 |
323 | .word 1b, __retl_efault, 2b, __retl_efault | 323 | .word 1b, __retl_efault, 2b, __retl_efault |
324 | .word 3b, __retl_efault, 4b, __retl_efault | 324 | .word 3b, __retl_efault, 4b, __retl_efault |
diff --git a/arch/sparc64/kernel/una_asm.S b/arch/sparc64/kernel/una_asm.S index 1f5b5b708ce7..be183fe41443 100644 --- a/arch/sparc64/kernel/una_asm.S +++ b/arch/sparc64/kernel/una_asm.S | |||
@@ -47,7 +47,7 @@ __do_int_store: | |||
47 | mov 0, %o0 | 47 | mov 0, %o0 |
48 | .size __do_int_store, .-__do_int_store | 48 | .size __do_int_store, .-__do_int_store |
49 | 49 | ||
50 | .section __ex_table | 50 | .section __ex_table,"a" |
51 | .word 4b, __retl_efault | 51 | .word 4b, __retl_efault |
52 | .word 5b, __retl_efault | 52 | .word 5b, __retl_efault |
53 | .word 6b, __retl_efault | 53 | .word 6b, __retl_efault |
@@ -129,7 +129,7 @@ do_int_load: | |||
129 | mov 0, %o0 | 129 | mov 0, %o0 |
130 | .size __do_int_load, .-__do_int_load | 130 | .size __do_int_load, .-__do_int_load |
131 | 131 | ||
132 | .section __ex_table | 132 | .section __ex_table,"a" |
133 | .word 4b, __retl_efault | 133 | .word 4b, __retl_efault |
134 | .word 5b, __retl_efault | 134 | .word 5b, __retl_efault |
135 | .word 6b, __retl_efault | 135 | .word 6b, __retl_efault |
diff --git a/arch/sparc64/lib/U1copy_from_user.S b/arch/sparc64/lib/U1copy_from_user.S index 93146a81e2d3..3192b0bf4fab 100644 --- a/arch/sparc64/lib/U1copy_from_user.S +++ b/arch/sparc64/lib/U1copy_from_user.S | |||
@@ -9,7 +9,7 @@ | |||
9 | .align 4; \ | 9 | .align 4; \ |
10 | 99: retl; \ | 10 | 99: retl; \ |
11 | mov 1, %o0; \ | 11 | mov 1, %o0; \ |
12 | .section __ex_table; \ | 12 | .section __ex_table,"a";\ |
13 | .align 4; \ | 13 | .align 4; \ |
14 | .word 98b, 99b; \ | 14 | .word 98b, 99b; \ |
15 | .text; \ | 15 | .text; \ |
diff --git a/arch/sparc64/lib/U1copy_to_user.S b/arch/sparc64/lib/U1copy_to_user.S index 1fccc521e2bd..d1210ffb0b82 100644 --- a/arch/sparc64/lib/U1copy_to_user.S +++ b/arch/sparc64/lib/U1copy_to_user.S | |||
@@ -9,7 +9,7 @@ | |||
9 | .align 4; \ | 9 | .align 4; \ |
10 | 99: retl; \ | 10 | 99: retl; \ |
11 | mov 1, %o0; \ | 11 | mov 1, %o0; \ |
12 | .section __ex_table; \ | 12 | .section __ex_table,"a";\ |
13 | .align 4; \ | 13 | .align 4; \ |
14 | .word 98b, 99b; \ | 14 | .word 98b, 99b; \ |
15 | .text; \ | 15 | .text; \ |
diff --git a/arch/sparc64/lib/U3copy_from_user.S b/arch/sparc64/lib/U3copy_from_user.S index df600b667e48..f5bfc8d9d216 100644 --- a/arch/sparc64/lib/U3copy_from_user.S +++ b/arch/sparc64/lib/U3copy_from_user.S | |||
@@ -9,7 +9,7 @@ | |||
9 | .align 4; \ | 9 | .align 4; \ |
10 | 99: retl; \ | 10 | 99: retl; \ |
11 | mov 1, %o0; \ | 11 | mov 1, %o0; \ |
12 | .section __ex_table; \ | 12 | .section __ex_table,"a";\ |
13 | .align 4; \ | 13 | .align 4; \ |
14 | .word 98b, 99b; \ | 14 | .word 98b, 99b; \ |
15 | .text; \ | 15 | .text; \ |
diff --git a/arch/sparc64/lib/U3copy_to_user.S b/arch/sparc64/lib/U3copy_to_user.S index f337f22ed82e..2334f111bb0c 100644 --- a/arch/sparc64/lib/U3copy_to_user.S +++ b/arch/sparc64/lib/U3copy_to_user.S | |||
@@ -9,7 +9,7 @@ | |||
9 | .align 4; \ | 9 | .align 4; \ |
10 | 99: retl; \ | 10 | 99: retl; \ |
11 | mov 1, %o0; \ | 11 | mov 1, %o0; \ |
12 | .section __ex_table; \ | 12 | .section __ex_table,"a";\ |
13 | .align 4; \ | 13 | .align 4; \ |
14 | .word 98b, 99b; \ | 14 | .word 98b, 99b; \ |
15 | .text; \ | 15 | .text; \ |
diff --git a/arch/sparc64/lib/bzero.S b/arch/sparc64/lib/bzero.S index 21a933ffb7c2..1d2abcfa4e52 100644 --- a/arch/sparc64/lib/bzero.S +++ b/arch/sparc64/lib/bzero.S | |||
@@ -92,7 +92,7 @@ __bzero_done: | |||
92 | .align 4; \ | 92 | .align 4; \ |
93 | 99: retl; \ | 93 | 99: retl; \ |
94 | mov %o1, %o0; \ | 94 | mov %o1, %o0; \ |
95 | .section __ex_table; \ | 95 | .section __ex_table,"a";\ |
96 | .align 4; \ | 96 | .align 4; \ |
97 | .word 98b, 99b; \ | 97 | .word 98b, 99b; \ |
98 | .text; \ | 98 | .text; \ |
diff --git a/arch/sparc64/lib/copy_in_user.S b/arch/sparc64/lib/copy_in_user.S index 816076c0bc06..650af3f21f78 100644 --- a/arch/sparc64/lib/copy_in_user.S +++ b/arch/sparc64/lib/copy_in_user.S | |||
@@ -13,7 +13,7 @@ | |||
13 | .align 4; \ | 13 | .align 4; \ |
14 | 99: retl; \ | 14 | 99: retl; \ |
15 | mov 1, %o0; \ | 15 | mov 1, %o0; \ |
16 | .section __ex_table; \ | 16 | .section __ex_table,"a";\ |
17 | .align 4; \ | 17 | .align 4; \ |
18 | .word 98b, 99b; \ | 18 | .word 98b, 99b; \ |
19 | .text; \ | 19 | .text; \ |
diff --git a/arch/sparc64/lib/csum_copy_from_user.S b/arch/sparc64/lib/csum_copy_from_user.S index 817ebdae39f8..a22eddbe5dba 100644 --- a/arch/sparc64/lib/csum_copy_from_user.S +++ b/arch/sparc64/lib/csum_copy_from_user.S | |||
@@ -9,7 +9,7 @@ | |||
9 | .align 4; \ | 9 | .align 4; \ |
10 | 99: retl; \ | 10 | 99: retl; \ |
11 | mov -1, %o0; \ | 11 | mov -1, %o0; \ |
12 | .section __ex_table; \ | 12 | .section __ex_table,"a";\ |
13 | .align 4; \ | 13 | .align 4; \ |
14 | .word 98b, 99b; \ | 14 | .word 98b, 99b; \ |
15 | .text; \ | 15 | .text; \ |
diff --git a/arch/sparc64/lib/csum_copy_to_user.S b/arch/sparc64/lib/csum_copy_to_user.S index c2f9463ea1e2..d5b12f441f02 100644 --- a/arch/sparc64/lib/csum_copy_to_user.S +++ b/arch/sparc64/lib/csum_copy_to_user.S | |||
@@ -9,7 +9,7 @@ | |||
9 | .align 4; \ | 9 | .align 4; \ |
10 | 99: retl; \ | 10 | 99: retl; \ |
11 | mov -1, %o0; \ | 11 | mov -1, %o0; \ |
12 | .section __ex_table; \ | 12 | .section __ex_table,"a";\ |
13 | .align 4; \ | 13 | .align 4; \ |
14 | .word 98b, 99b; \ | 14 | .word 98b, 99b; \ |
15 | .text; \ | 15 | .text; \ |
diff --git a/arch/sparc64/lib/strlen_user.S b/arch/sparc64/lib/strlen_user.S index 9ed54ba14fc6..114ed111e251 100644 --- a/arch/sparc64/lib/strlen_user.S +++ b/arch/sparc64/lib/strlen_user.S | |||
@@ -85,7 +85,7 @@ __strnlen_user: | |||
85 | retl | 85 | retl |
86 | clr %o0 | 86 | clr %o0 |
87 | 87 | ||
88 | .section __ex_table,#alloc | 88 | .section __ex_table,"a" |
89 | .align 4 | 89 | .align 4 |
90 | 90 | ||
91 | .word 10b, 30b | 91 | .word 10b, 30b |
diff --git a/arch/sparc64/lib/strncpy_from_user.S b/arch/sparc64/lib/strncpy_from_user.S index e1264650ca7a..b2f499f79427 100644 --- a/arch/sparc64/lib/strncpy_from_user.S +++ b/arch/sparc64/lib/strncpy_from_user.S | |||
@@ -125,7 +125,7 @@ __strncpy_from_user: | |||
125 | add %o2, %o3, %o0 | 125 | add %o2, %o3, %o0 |
126 | .size __strncpy_from_user, .-__strncpy_from_user | 126 | .size __strncpy_from_user, .-__strncpy_from_user |
127 | 127 | ||
128 | .section __ex_table,#alloc | 128 | .section __ex_table,"a" |
129 | .align 4 | 129 | .align 4 |
130 | .word 60b, __retl_efault | 130 | .word 60b, __retl_efault |
131 | .word 61b, __retl_efault | 131 | .word 61b, __retl_efault |
diff --git a/arch/sparc64/solaris/entry64.S b/arch/sparc64/solaris/entry64.S index eb314ed23cdb..f170324e8bf2 100644 --- a/arch/sparc64/solaris/entry64.S +++ b/arch/sparc64/solaris/entry64.S | |||
@@ -217,7 +217,7 @@ solaris_unimplemented: | |||
217 | ba,pt %xcc, ret_from_solaris | 217 | ba,pt %xcc, ret_from_solaris |
218 | nop | 218 | nop |
219 | 219 | ||
220 | .section __ex_table,#alloc | 220 | .section __ex_table,"a" |
221 | .align 4 | 221 | .align 4 |
222 | .word exen, exenf | 222 | .word exen, exenf |
223 | 223 | ||
diff --git a/arch/v850/kernel/process.c b/arch/v850/kernel/process.c index eb909937958b..621111ddf907 100644 --- a/arch/v850/kernel/process.c +++ b/arch/v850/kernel/process.c | |||
@@ -30,6 +30,9 @@ | |||
30 | #include <asm/system.h> | 30 | #include <asm/system.h> |
31 | #include <asm/pgtable.h> | 31 | #include <asm/pgtable.h> |
32 | 32 | ||
33 | void (*pm_power_off)(void) = NULL; | ||
34 | EXPORT_SYMBOL(pm_power_off); | ||
35 | |||
33 | extern void ret_from_fork (void); | 36 | extern void ret_from_fork (void); |
34 | 37 | ||
35 | 38 | ||
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c index f1f596644bfc..64a649eb883f 100644 --- a/arch/xtensa/kernel/process.c +++ b/arch/xtensa/kernel/process.c | |||
@@ -64,6 +64,9 @@ EXPORT_SYMBOL(init_task); | |||
64 | 64 | ||
65 | struct task_struct *current_set[NR_CPUS] = {&init_task, }; | 65 | struct task_struct *current_set[NR_CPUS] = {&init_task, }; |
66 | 66 | ||
67 | void (*pm_power_off)(void) = NULL; | ||
68 | EXPORT_SYMBOL(pm_power_off); | ||
69 | |||
67 | 70 | ||
68 | #if XCHAL_CP_NUM > 0 | 71 | #if XCHAL_CP_NUM > 0 |
69 | 72 | ||
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c index 14f6a6201da3..05983a312d50 100644 --- a/drivers/atm/fore200e.c +++ b/drivers/atm/fore200e.c | |||
@@ -555,7 +555,7 @@ fore200e_pca_reset(struct fore200e* fore200e) | |||
555 | } | 555 | } |
556 | 556 | ||
557 | 557 | ||
558 | static int __init | 558 | static int __devinit |
559 | fore200e_pca_map(struct fore200e* fore200e) | 559 | fore200e_pca_map(struct fore200e* fore200e) |
560 | { | 560 | { |
561 | DPRINTK(2, "device %s being mapped in memory\n", fore200e->name); | 561 | DPRINTK(2, "device %s being mapped in memory\n", fore200e->name); |
@@ -589,7 +589,7 @@ fore200e_pca_unmap(struct fore200e* fore200e) | |||
589 | } | 589 | } |
590 | 590 | ||
591 | 591 | ||
592 | static int __init | 592 | static int __devinit |
593 | fore200e_pca_configure(struct fore200e* fore200e) | 593 | fore200e_pca_configure(struct fore200e* fore200e) |
594 | { | 594 | { |
595 | struct pci_dev* pci_dev = (struct pci_dev*)fore200e->bus_dev; | 595 | struct pci_dev* pci_dev = (struct pci_dev*)fore200e->bus_dev; |
@@ -2125,7 +2125,7 @@ fore200e_change_qos(struct atm_vcc* vcc,struct atm_qos* qos, int flags) | |||
2125 | } | 2125 | } |
2126 | 2126 | ||
2127 | 2127 | ||
2128 | static int __init | 2128 | static int __devinit |
2129 | fore200e_irq_request(struct fore200e* fore200e) | 2129 | fore200e_irq_request(struct fore200e* fore200e) |
2130 | { | 2130 | { |
2131 | if (request_irq(fore200e->irq, fore200e_interrupt, SA_SHIRQ, fore200e->name, fore200e->atm_dev) < 0) { | 2131 | if (request_irq(fore200e->irq, fore200e_interrupt, SA_SHIRQ, fore200e->name, fore200e->atm_dev) < 0) { |
@@ -2148,7 +2148,7 @@ fore200e_irq_request(struct fore200e* fore200e) | |||
2148 | } | 2148 | } |
2149 | 2149 | ||
2150 | 2150 | ||
2151 | static int __init | 2151 | static int __devinit |
2152 | fore200e_get_esi(struct fore200e* fore200e) | 2152 | fore200e_get_esi(struct fore200e* fore200e) |
2153 | { | 2153 | { |
2154 | struct prom_data* prom = fore200e_kmalloc(sizeof(struct prom_data), GFP_KERNEL | GFP_DMA); | 2154 | struct prom_data* prom = fore200e_kmalloc(sizeof(struct prom_data), GFP_KERNEL | GFP_DMA); |
@@ -2180,7 +2180,7 @@ fore200e_get_esi(struct fore200e* fore200e) | |||
2180 | } | 2180 | } |
2181 | 2181 | ||
2182 | 2182 | ||
2183 | static int __init | 2183 | static int __devinit |
2184 | fore200e_alloc_rx_buf(struct fore200e* fore200e) | 2184 | fore200e_alloc_rx_buf(struct fore200e* fore200e) |
2185 | { | 2185 | { |
2186 | int scheme, magn, nbr, size, i; | 2186 | int scheme, magn, nbr, size, i; |
@@ -2245,7 +2245,7 @@ fore200e_alloc_rx_buf(struct fore200e* fore200e) | |||
2245 | } | 2245 | } |
2246 | 2246 | ||
2247 | 2247 | ||
2248 | static int __init | 2248 | static int __devinit |
2249 | fore200e_init_bs_queue(struct fore200e* fore200e) | 2249 | fore200e_init_bs_queue(struct fore200e* fore200e) |
2250 | { | 2250 | { |
2251 | int scheme, magn, i; | 2251 | int scheme, magn, i; |
@@ -2308,7 +2308,7 @@ fore200e_init_bs_queue(struct fore200e* fore200e) | |||
2308 | } | 2308 | } |
2309 | 2309 | ||
2310 | 2310 | ||
2311 | static int __init | 2311 | static int __devinit |
2312 | fore200e_init_rx_queue(struct fore200e* fore200e) | 2312 | fore200e_init_rx_queue(struct fore200e* fore200e) |
2313 | { | 2313 | { |
2314 | struct host_rxq* rxq = &fore200e->host_rxq; | 2314 | struct host_rxq* rxq = &fore200e->host_rxq; |
@@ -2368,7 +2368,7 @@ fore200e_init_rx_queue(struct fore200e* fore200e) | |||
2368 | } | 2368 | } |
2369 | 2369 | ||
2370 | 2370 | ||
2371 | static int __init | 2371 | static int __devinit |
2372 | fore200e_init_tx_queue(struct fore200e* fore200e) | 2372 | fore200e_init_tx_queue(struct fore200e* fore200e) |
2373 | { | 2373 | { |
2374 | struct host_txq* txq = &fore200e->host_txq; | 2374 | struct host_txq* txq = &fore200e->host_txq; |
@@ -2431,7 +2431,7 @@ fore200e_init_tx_queue(struct fore200e* fore200e) | |||
2431 | } | 2431 | } |
2432 | 2432 | ||
2433 | 2433 | ||
2434 | static int __init | 2434 | static int __devinit |
2435 | fore200e_init_cmd_queue(struct fore200e* fore200e) | 2435 | fore200e_init_cmd_queue(struct fore200e* fore200e) |
2436 | { | 2436 | { |
2437 | struct host_cmdq* cmdq = &fore200e->host_cmdq; | 2437 | struct host_cmdq* cmdq = &fore200e->host_cmdq; |
@@ -2487,7 +2487,7 @@ fore200e_param_bs_queue(struct fore200e* fore200e, | |||
2487 | } | 2487 | } |
2488 | 2488 | ||
2489 | 2489 | ||
2490 | static int __init | 2490 | static int __devinit |
2491 | fore200e_initialize(struct fore200e* fore200e) | 2491 | fore200e_initialize(struct fore200e* fore200e) |
2492 | { | 2492 | { |
2493 | struct cp_queues __iomem * cpq; | 2493 | struct cp_queues __iomem * cpq; |
@@ -2539,7 +2539,7 @@ fore200e_initialize(struct fore200e* fore200e) | |||
2539 | } | 2539 | } |
2540 | 2540 | ||
2541 | 2541 | ||
2542 | static void __init | 2542 | static void __devinit |
2543 | fore200e_monitor_putc(struct fore200e* fore200e, char c) | 2543 | fore200e_monitor_putc(struct fore200e* fore200e, char c) |
2544 | { | 2544 | { |
2545 | struct cp_monitor __iomem * monitor = fore200e->cp_monitor; | 2545 | struct cp_monitor __iomem * monitor = fore200e->cp_monitor; |
@@ -2551,7 +2551,7 @@ fore200e_monitor_putc(struct fore200e* fore200e, char c) | |||
2551 | } | 2551 | } |
2552 | 2552 | ||
2553 | 2553 | ||
2554 | static int __init | 2554 | static int __devinit |
2555 | fore200e_monitor_getc(struct fore200e* fore200e) | 2555 | fore200e_monitor_getc(struct fore200e* fore200e) |
2556 | { | 2556 | { |
2557 | struct cp_monitor __iomem * monitor = fore200e->cp_monitor; | 2557 | struct cp_monitor __iomem * monitor = fore200e->cp_monitor; |
@@ -2576,7 +2576,7 @@ fore200e_monitor_getc(struct fore200e* fore200e) | |||
2576 | } | 2576 | } |
2577 | 2577 | ||
2578 | 2578 | ||
2579 | static void __init | 2579 | static void __devinit |
2580 | fore200e_monitor_puts(struct fore200e* fore200e, char* str) | 2580 | fore200e_monitor_puts(struct fore200e* fore200e, char* str) |
2581 | { | 2581 | { |
2582 | while (*str) { | 2582 | while (*str) { |
@@ -2591,7 +2591,7 @@ fore200e_monitor_puts(struct fore200e* fore200e, char* str) | |||
2591 | } | 2591 | } |
2592 | 2592 | ||
2593 | 2593 | ||
2594 | static int __init | 2594 | static int __devinit |
2595 | fore200e_start_fw(struct fore200e* fore200e) | 2595 | fore200e_start_fw(struct fore200e* fore200e) |
2596 | { | 2596 | { |
2597 | int ok; | 2597 | int ok; |
@@ -2622,7 +2622,7 @@ fore200e_start_fw(struct fore200e* fore200e) | |||
2622 | } | 2622 | } |
2623 | 2623 | ||
2624 | 2624 | ||
2625 | static int __init | 2625 | static int __devinit |
2626 | fore200e_load_fw(struct fore200e* fore200e) | 2626 | fore200e_load_fw(struct fore200e* fore200e) |
2627 | { | 2627 | { |
2628 | u32* fw_data = (u32*) fore200e->bus->fw_data; | 2628 | u32* fw_data = (u32*) fore200e->bus->fw_data; |
@@ -2648,7 +2648,7 @@ fore200e_load_fw(struct fore200e* fore200e) | |||
2648 | } | 2648 | } |
2649 | 2649 | ||
2650 | 2650 | ||
2651 | static int __init | 2651 | static int __devinit |
2652 | fore200e_register(struct fore200e* fore200e) | 2652 | fore200e_register(struct fore200e* fore200e) |
2653 | { | 2653 | { |
2654 | struct atm_dev* atm_dev; | 2654 | struct atm_dev* atm_dev; |
@@ -2675,7 +2675,7 @@ fore200e_register(struct fore200e* fore200e) | |||
2675 | } | 2675 | } |
2676 | 2676 | ||
2677 | 2677 | ||
2678 | static int __init | 2678 | static int __devinit |
2679 | fore200e_init(struct fore200e* fore200e) | 2679 | fore200e_init(struct fore200e* fore200e) |
2680 | { | 2680 | { |
2681 | if (fore200e_register(fore200e) < 0) | 2681 | if (fore200e_register(fore200e) < 0) |
@@ -2721,7 +2721,7 @@ fore200e_init(struct fore200e* fore200e) | |||
2721 | return -EBUSY; | 2721 | return -EBUSY; |
2722 | 2722 | ||
2723 | fore200e_supply(fore200e); | 2723 | fore200e_supply(fore200e); |
2724 | 2724 | ||
2725 | /* all done, board initialization is now complete */ | 2725 | /* all done, board initialization is now complete */ |
2726 | fore200e->state = FORE200E_STATE_COMPLETE; | 2726 | fore200e->state = FORE200E_STATE_COMPLETE; |
2727 | return 0; | 2727 | return 0; |
diff --git a/drivers/char/hw_random.c b/drivers/char/hw_random.c index b3bc2e37e616..29dc87e59020 100644 --- a/drivers/char/hw_random.c +++ b/drivers/char/hw_random.c | |||
@@ -131,7 +131,9 @@ enum { | |||
131 | rng_hw_none, | 131 | rng_hw_none, |
132 | rng_hw_intel, | 132 | rng_hw_intel, |
133 | rng_hw_amd, | 133 | rng_hw_amd, |
134 | #ifdef __i386__ | ||
134 | rng_hw_via, | 135 | rng_hw_via, |
136 | #endif | ||
135 | rng_hw_geode, | 137 | rng_hw_geode, |
136 | }; | 138 | }; |
137 | 139 | ||
diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c index 8159bcecd0c2..df9d65201819 100644 --- a/drivers/isdn/hisax/config.c +++ b/drivers/isdn/hisax/config.c | |||
@@ -1929,6 +1929,8 @@ static struct pci_device_id hisax_pci_tbl[] __initdata = { | |||
1929 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00B, PCI_ANY_ID, PCI_ANY_ID}, | 1929 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00B, PCI_ANY_ID, PCI_ANY_ID}, |
1930 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00C, PCI_ANY_ID, PCI_ANY_ID}, | 1930 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00C, PCI_ANY_ID, PCI_ANY_ID}, |
1931 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B100, PCI_ANY_ID, PCI_ANY_ID}, | 1931 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B100, PCI_ANY_ID, PCI_ANY_ID}, |
1932 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B700, PCI_ANY_ID, PCI_ANY_ID}, | ||
1933 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B701, PCI_ANY_ID, PCI_ANY_ID}, | ||
1932 | {PCI_VENDOR_ID_ABOCOM, PCI_DEVICE_ID_ABOCOM_2BD1, PCI_ANY_ID, PCI_ANY_ID}, | 1934 | {PCI_VENDOR_ID_ABOCOM, PCI_DEVICE_ID_ABOCOM_2BD1, PCI_ANY_ID, PCI_ANY_ID}, |
1933 | {PCI_VENDOR_ID_ASUSTEK, PCI_DEVICE_ID_ASUSTEK_0675, PCI_ANY_ID, PCI_ANY_ID}, | 1935 | {PCI_VENDOR_ID_ASUSTEK, PCI_DEVICE_ID_ASUSTEK_0675, PCI_ANY_ID, PCI_ANY_ID}, |
1934 | {PCI_VENDOR_ID_BERKOM, PCI_DEVICE_ID_BERKOM_T_CONCEPT, PCI_ANY_ID, PCI_ANY_ID}, | 1936 | {PCI_VENDOR_ID_BERKOM, PCI_DEVICE_ID_BERKOM_T_CONCEPT, PCI_ANY_ID, PCI_ANY_ID}, |
diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c index 4866fc32d8d9..91d25acb5ede 100644 --- a/drivers/isdn/hisax/hfc_pci.c +++ b/drivers/isdn/hisax/hfc_pci.c | |||
@@ -51,6 +51,8 @@ static const PCI_ENTRY id_list[] = | |||
51 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00B, "Billion", "B00B"}, | 51 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00B, "Billion", "B00B"}, |
52 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00C, "Billion", "B00C"}, | 52 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00C, "Billion", "B00C"}, |
53 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B100, "Seyeon", "B100"}, | 53 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B100, "Seyeon", "B100"}, |
54 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B700, "Primux II S0", "B700"}, | ||
55 | {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B701, "Primux II S0 NT", "B701"}, | ||
54 | {PCI_VENDOR_ID_ABOCOM, PCI_DEVICE_ID_ABOCOM_2BD1, "Abocom/Magitek", "2BD1"}, | 56 | {PCI_VENDOR_ID_ABOCOM, PCI_DEVICE_ID_ABOCOM_2BD1, "Abocom/Magitek", "2BD1"}, |
55 | {PCI_VENDOR_ID_ASUSTEK, PCI_DEVICE_ID_ASUSTEK_0675, "Asuscom/Askey", "675"}, | 57 | {PCI_VENDOR_ID_ASUSTEK, PCI_DEVICE_ID_ASUSTEK_0675, "Asuscom/Askey", "675"}, |
56 | {PCI_VENDOR_ID_BERKOM, PCI_DEVICE_ID_BERKOM_T_CONCEPT, "German telekom", "T-Concept"}, | 58 | {PCI_VENDOR_ID_BERKOM, PCI_DEVICE_ID_BERKOM_T_CONCEPT, "German telekom", "T-Concept"}, |
diff --git a/drivers/isdn/hisax/hfc_usb.c b/drivers/isdn/hisax/hfc_usb.c index ca5b4a3b683e..262c44127419 100644 --- a/drivers/isdn/hisax/hfc_usb.c +++ b/drivers/isdn/hisax/hfc_usb.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * hfc_usb.c | 2 | * hfc_usb.c |
3 | * | 3 | * |
4 | * $Id: hfc_usb.c,v 4.36 2005/04/08 09:55:13 martinb1 Exp $ | 4 | * $Id: hfc_usb.c,v 2.3.2.13 2006/02/17 17:17:22 mbachem Exp $ |
5 | * | 5 | * |
6 | * modular HiSax ISDN driver for Colognechip HFC-S USB chip | 6 | * modular HiSax ISDN driver for Colognechip HFC-S USB chip |
7 | * | 7 | * |
@@ -45,7 +45,7 @@ | |||
45 | #include "hfc_usb.h" | 45 | #include "hfc_usb.h" |
46 | 46 | ||
47 | static const char *hfcusb_revision = | 47 | static const char *hfcusb_revision = |
48 | "$Revision: 4.36 $ $Date: 2005/04/08 09:55:13 $ "; | 48 | "$Revision: 2.3.2.13 $ $Date: 2006/02/17 17:17:22 $ "; |
49 | 49 | ||
50 | /* Hisax debug support | 50 | /* Hisax debug support |
51 | * use "modprobe debug=x" where x is bitfield of USB_DBG & ISDN_DBG | 51 | * use "modprobe debug=x" where x is bitfield of USB_DBG & ISDN_DBG |
@@ -219,7 +219,7 @@ symbolic(struct hfcusb_symbolic_list list[], const int num) | |||
219 | for (i = 0; list[i].name != NULL; i++) | 219 | for (i = 0; list[i].name != NULL; i++) |
220 | if (list[i].num == num) | 220 | if (list[i].num == num) |
221 | return (list[i].name); | 221 | return (list[i].name); |
222 | return "<unkown ERROR>"; | 222 | return "<unknown ERROR>"; |
223 | } | 223 | } |
224 | 224 | ||
225 | 225 | ||
@@ -235,9 +235,9 @@ ctrl_start_transfer(hfcusb_data * hfc) | |||
235 | hfc->ctrl_urb->transfer_buffer = NULL; | 235 | hfc->ctrl_urb->transfer_buffer = NULL; |
236 | hfc->ctrl_urb->transfer_buffer_length = 0; | 236 | hfc->ctrl_urb->transfer_buffer_length = 0; |
237 | hfc->ctrl_write.wIndex = | 237 | hfc->ctrl_write.wIndex = |
238 | hfc->ctrl_buff[hfc->ctrl_out_idx].hfc_reg; | 238 | cpu_to_le16(hfc->ctrl_buff[hfc->ctrl_out_idx].hfc_reg); |
239 | hfc->ctrl_write.wValue = | 239 | hfc->ctrl_write.wValue = |
240 | hfc->ctrl_buff[hfc->ctrl_out_idx].reg_val; | 240 | cpu_to_le16(hfc->ctrl_buff[hfc->ctrl_out_idx].reg_val); |
241 | 241 | ||
242 | usb_submit_urb(hfc->ctrl_urb, GFP_ATOMIC); /* start transfer */ | 242 | usb_submit_urb(hfc->ctrl_urb, GFP_ATOMIC); /* start transfer */ |
243 | } | 243 | } |
@@ -1282,7 +1282,7 @@ usb_init(hfcusb_data * hfc) | |||
1282 | /* init the background machinery for control requests */ | 1282 | /* init the background machinery for control requests */ |
1283 | hfc->ctrl_read.bRequestType = 0xc0; | 1283 | hfc->ctrl_read.bRequestType = 0xc0; |
1284 | hfc->ctrl_read.bRequest = 1; | 1284 | hfc->ctrl_read.bRequest = 1; |
1285 | hfc->ctrl_read.wLength = 1; | 1285 | hfc->ctrl_read.wLength = cpu_to_le16(1); |
1286 | hfc->ctrl_write.bRequestType = 0x40; | 1286 | hfc->ctrl_write.bRequestType = 0x40; |
1287 | hfc->ctrl_write.bRequest = 0; | 1287 | hfc->ctrl_write.bRequest = 0; |
1288 | hfc->ctrl_write.wLength = 0; | 1288 | hfc->ctrl_write.wLength = 0; |
@@ -1373,9 +1373,8 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
1373 | 1373 | ||
1374 | vend_idx = 0xffff; | 1374 | vend_idx = 0xffff; |
1375 | for (i = 0; hfcusb_idtab[i].idVendor; i++) { | 1375 | for (i = 0; hfcusb_idtab[i].idVendor; i++) { |
1376 | if (dev->descriptor.idVendor == hfcusb_idtab[i].idVendor | 1376 | if ((le16_to_cpu(dev->descriptor.idVendor) == hfcusb_idtab[i].idVendor) |
1377 | && dev->descriptor.idProduct == | 1377 | && (le16_to_cpu(dev->descriptor.idProduct) == hfcusb_idtab[i].idProduct)) { |
1378 | hfcusb_idtab[i].idProduct) { | ||
1379 | vend_idx = i; | 1378 | vend_idx = i; |
1380 | continue; | 1379 | continue; |
1381 | } | 1380 | } |
@@ -1516,8 +1515,7 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
1516 | usb_transfer_mode | 1515 | usb_transfer_mode |
1517 | = USB_INT; | 1516 | = USB_INT; |
1518 | packet_size = | 1517 | packet_size = |
1519 | ep->desc. | 1518 | le16_to_cpu(ep->desc.wMaxPacketSize); |
1520 | wMaxPacketSize; | ||
1521 | break; | 1519 | break; |
1522 | case USB_ENDPOINT_XFER_BULK: | 1520 | case USB_ENDPOINT_XFER_BULK: |
1523 | if (ep_addr & 0x80) | 1521 | if (ep_addr & 0x80) |
@@ -1545,8 +1543,7 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
1545 | usb_transfer_mode | 1543 | usb_transfer_mode |
1546 | = USB_BULK; | 1544 | = USB_BULK; |
1547 | packet_size = | 1545 | packet_size = |
1548 | ep->desc. | 1546 | le16_to_cpu(ep->desc.wMaxPacketSize); |
1549 | wMaxPacketSize; | ||
1550 | break; | 1547 | break; |
1551 | case USB_ENDPOINT_XFER_ISOC: | 1548 | case USB_ENDPOINT_XFER_ISOC: |
1552 | if (ep_addr & 0x80) | 1549 | if (ep_addr & 0x80) |
@@ -1574,8 +1571,7 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
1574 | usb_transfer_mode | 1571 | usb_transfer_mode |
1575 | = USB_ISOC; | 1572 | = USB_ISOC; |
1576 | iso_packet_size = | 1573 | iso_packet_size = |
1577 | ep->desc. | 1574 | le16_to_cpu(ep->desc.wMaxPacketSize); |
1578 | wMaxPacketSize; | ||
1579 | break; | 1575 | break; |
1580 | default: | 1576 | default: |
1581 | context-> | 1577 | context-> |
@@ -1588,10 +1584,8 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
1588 | fifonum = cidx; | 1584 | fifonum = cidx; |
1589 | context->fifos[cidx].hfc = | 1585 | context->fifos[cidx].hfc = |
1590 | context; | 1586 | context; |
1591 | context->fifos[cidx]. | 1587 | context->fifos[cidx].usb_packet_maxlen = |
1592 | usb_packet_maxlen = | 1588 | le16_to_cpu(ep->desc.wMaxPacketSize); |
1593 | ep->desc. | ||
1594 | wMaxPacketSize; | ||
1595 | context->fifos[cidx]. | 1589 | context->fifos[cidx]. |
1596 | intervall = | 1590 | intervall = |
1597 | ep->desc.bInterval; | 1591 | ep->desc.bInterval; |
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c index 393633681f49..aeaa1db74bd8 100644 --- a/drivers/isdn/i4l/isdn_tty.c +++ b/drivers/isdn/i4l/isdn_tty.c | |||
@@ -1682,6 +1682,7 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp) | |||
1682 | #ifdef ISDN_DEBUG_MODEM_OPEN | 1682 | #ifdef ISDN_DEBUG_MODEM_OPEN |
1683 | printk(KERN_DEBUG "isdn_tty_close after info->count != 0\n"); | 1683 | printk(KERN_DEBUG "isdn_tty_close after info->count != 0\n"); |
1684 | #endif | 1684 | #endif |
1685 | module_put(info->owner); | ||
1685 | return; | 1686 | return; |
1686 | } | 1687 | } |
1687 | info->flags |= ISDN_ASYNC_CLOSING; | 1688 | info->flags |= ISDN_ASYNC_CLOSING; |
diff --git a/drivers/macintosh/windfarm_pid.c b/drivers/macintosh/windfarm_pid.c index 0842432e27ad..f10efb28cae4 100644 --- a/drivers/macintosh/windfarm_pid.c +++ b/drivers/macintosh/windfarm_pid.c | |||
@@ -143,3 +143,7 @@ s32 wf_cpu_pid_run(struct wf_cpu_pid_state *st, s32 new_power, s32 new_temp) | |||
143 | return st->target; | 143 | return st->target; |
144 | } | 144 | } |
145 | EXPORT_SYMBOL_GPL(wf_cpu_pid_run); | 145 | EXPORT_SYMBOL_GPL(wf_cpu_pid_run); |
146 | |||
147 | MODULE_AUTHOR("Benjamin Herrenschmidt <benh@kernel.crashing.org>"); | ||
148 | MODULE_DESCRIPTION("PID algorithm for PowerMacs thermal control"); | ||
149 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/mmc/au1xmmc.c b/drivers/mmc/au1xmmc.c index 227c39a7c1b4..8d84b045bc83 100644 --- a/drivers/mmc/au1xmmc.c +++ b/drivers/mmc/au1xmmc.c | |||
@@ -37,7 +37,7 @@ | |||
37 | #include <linux/config.h> | 37 | #include <linux/config.h> |
38 | #include <linux/module.h> | 38 | #include <linux/module.h> |
39 | #include <linux/init.h> | 39 | #include <linux/init.h> |
40 | #include <linux/device.h> | 40 | #include <linux/platform_device.h> |
41 | #include <linux/mm.h> | 41 | #include <linux/mm.h> |
42 | #include <linux/interrupt.h> | 42 | #include <linux/interrupt.h> |
43 | #include <linux/dma-mapping.h> | 43 | #include <linux/dma-mapping.h> |
@@ -194,7 +194,7 @@ static int au1xmmc_send_command(struct au1xmmc_host *host, int wait, | |||
194 | 194 | ||
195 | u32 mmccmd = (cmd->opcode << SD_CMD_CI_SHIFT); | 195 | u32 mmccmd = (cmd->opcode << SD_CMD_CI_SHIFT); |
196 | 196 | ||
197 | switch (mmc_rsp_type(cmd->flags)) { | 197 | switch (mmc_resp_type(cmd)) { |
198 | case MMC_RSP_R1: | 198 | case MMC_RSP_R1: |
199 | mmccmd |= SD_CMD_RT_1; | 199 | mmccmd |= SD_CMD_RT_1; |
200 | break; | 200 | break; |
@@ -740,7 +740,6 @@ static void au1xmmc_set_ios(struct mmc_host* mmc, struct mmc_ios* ios) | |||
740 | static void au1xmmc_dma_callback(int irq, void *dev_id, struct pt_regs *regs) | 740 | static void au1xmmc_dma_callback(int irq, void *dev_id, struct pt_regs *regs) |
741 | { | 741 | { |
742 | struct au1xmmc_host *host = (struct au1xmmc_host *) dev_id; | 742 | struct au1xmmc_host *host = (struct au1xmmc_host *) dev_id; |
743 | u32 status; | ||
744 | 743 | ||
745 | /* Avoid spurious interrupts */ | 744 | /* Avoid spurious interrupts */ |
746 | 745 | ||
@@ -887,7 +886,7 @@ struct mmc_host_ops au1xmmc_ops = { | |||
887 | .set_ios = au1xmmc_set_ios, | 886 | .set_ios = au1xmmc_set_ios, |
888 | }; | 887 | }; |
889 | 888 | ||
890 | static int au1xmmc_probe(struct device *dev) | 889 | static int __devinit au1xmmc_probe(struct platform_device *pdev) |
891 | { | 890 | { |
892 | 891 | ||
893 | int i, ret = 0; | 892 | int i, ret = 0; |
@@ -904,7 +903,7 @@ static int au1xmmc_probe(struct device *dev) | |||
904 | disable_irq(AU1100_SD_IRQ); | 903 | disable_irq(AU1100_SD_IRQ); |
905 | 904 | ||
906 | for(i = 0; i < AU1XMMC_CONTROLLER_COUNT; i++) { | 905 | for(i = 0; i < AU1XMMC_CONTROLLER_COUNT; i++) { |
907 | struct mmc_host *mmc = mmc_alloc_host(sizeof(struct au1xmmc_host), dev); | 906 | struct mmc_host *mmc = mmc_alloc_host(sizeof(struct au1xmmc_host), &pdev->dev); |
908 | struct au1xmmc_host *host = 0; | 907 | struct au1xmmc_host *host = 0; |
909 | 908 | ||
910 | if (!mmc) { | 909 | if (!mmc) { |
@@ -967,7 +966,7 @@ static int au1xmmc_probe(struct device *dev) | |||
967 | return 0; | 966 | return 0; |
968 | } | 967 | } |
969 | 968 | ||
970 | static int au1xmmc_remove(struct device *dev) | 969 | static int __devexit au1xmmc_remove(struct platform_device *pdev) |
971 | { | 970 | { |
972 | 971 | ||
973 | int i; | 972 | int i; |
@@ -997,23 +996,24 @@ static int au1xmmc_remove(struct device *dev) | |||
997 | return 0; | 996 | return 0; |
998 | } | 997 | } |
999 | 998 | ||
1000 | static struct device_driver au1xmmc_driver = { | 999 | static struct platform_driver au1xmmc_driver = { |
1001 | .name = DRIVER_NAME, | ||
1002 | .bus = &platform_bus_type, | ||
1003 | .probe = au1xmmc_probe, | 1000 | .probe = au1xmmc_probe, |
1004 | .remove = au1xmmc_remove, | 1001 | .remove = au1xmmc_remove, |
1005 | .suspend = NULL, | 1002 | .suspend = NULL, |
1006 | .resume = NULL | 1003 | .resume = NULL, |
1004 | .driver = { | ||
1005 | .name = DRIVER_NAME, | ||
1006 | }, | ||
1007 | }; | 1007 | }; |
1008 | 1008 | ||
1009 | static int __init au1xmmc_init(void) | 1009 | static int __init au1xmmc_init(void) |
1010 | { | 1010 | { |
1011 | return driver_register(&au1xmmc_driver); | 1011 | return platform_driver_register(&au1xmmc_driver); |
1012 | } | 1012 | } |
1013 | 1013 | ||
1014 | static void __exit au1xmmc_exit(void) | 1014 | static void __exit au1xmmc_exit(void) |
1015 | { | 1015 | { |
1016 | driver_unregister(&au1xmmc_driver); | 1016 | platform_driver_unregister(&au1xmmc_driver); |
1017 | } | 1017 | } |
1018 | 1018 | ||
1019 | module_init(au1xmmc_init); | 1019 | module_init(au1xmmc_init); |
diff --git a/drivers/net/chelsio/espi.c b/drivers/net/chelsio/espi.c index 230642571c92..e824acaf188a 100644 --- a/drivers/net/chelsio/espi.c +++ b/drivers/net/chelsio/espi.c | |||
@@ -296,9 +296,7 @@ void t1_espi_destroy(struct peespi *espi) | |||
296 | 296 | ||
297 | struct peespi *t1_espi_create(adapter_t *adapter) | 297 | struct peespi *t1_espi_create(adapter_t *adapter) |
298 | { | 298 | { |
299 | struct peespi *espi = kmalloc(sizeof(*espi), GFP_KERNEL); | 299 | struct peespi *espi = kzalloc(sizeof(*espi), GFP_KERNEL); |
300 | |||
301 | memset(espi, 0, sizeof(*espi)); | ||
302 | 300 | ||
303 | if (espi) | 301 | if (espi) |
304 | espi->adapter = adapter; | 302 | espi->adapter = adapter; |
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 49b597cbc19a..b7f00d6eb6a6 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -4092,6 +4092,7 @@ static void s2io_set_multicast(struct net_device *dev) | |||
4092 | i++, mclist = mclist->next) { | 4092 | i++, mclist = mclist->next) { |
4093 | memcpy(sp->usr_addrs[i].addr, mclist->dmi_addr, | 4093 | memcpy(sp->usr_addrs[i].addr, mclist->dmi_addr, |
4094 | ETH_ALEN); | 4094 | ETH_ALEN); |
4095 | mac_addr = 0; | ||
4095 | for (j = 0; j < ETH_ALEN; j++) { | 4096 | for (j = 0; j < ETH_ALEN; j++) { |
4096 | mac_addr |= mclist->dmi_addr[j]; | 4097 | mac_addr |= mclist->dmi_addr[j]; |
4097 | mac_addr <<= 8; | 4098 | mac_addr <<= 8; |
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index 8cf9905d484b..f4183d660258 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c | |||
@@ -1115,6 +1115,9 @@ chsc_enable_facility(int operation_code) | |||
1115 | goto out; | 1115 | goto out; |
1116 | } | 1116 | } |
1117 | switch (sda_area->response.code) { | 1117 | switch (sda_area->response.code) { |
1118 | case 0x0001: /* everything ok */ | ||
1119 | ret = 0; | ||
1120 | break; | ||
1118 | case 0x0003: /* invalid request block */ | 1121 | case 0x0003: /* invalid request block */ |
1119 | case 0x0007: | 1122 | case 0x0007: |
1120 | ret = -EINVAL; | 1123 | ret = -EINVAL; |
@@ -1123,6 +1126,8 @@ chsc_enable_facility(int operation_code) | |||
1123 | case 0x0101: /* facility not provided */ | 1126 | case 0x0101: /* facility not provided */ |
1124 | ret = -EOPNOTSUPP; | 1127 | ret = -EOPNOTSUPP; |
1125 | break; | 1128 | break; |
1129 | default: /* something went wrong */ | ||
1130 | ret = -EIO; | ||
1126 | } | 1131 | } |
1127 | out: | 1132 | out: |
1128 | free_page((unsigned long)sda_area); | 1133 | free_page((unsigned long)sda_area); |
diff --git a/drivers/scsi/sr_ioctl.c b/drivers/scsi/sr_ioctl.c index 5d02ff4db6cc..b65462f76484 100644 --- a/drivers/scsi/sr_ioctl.c +++ b/drivers/scsi/sr_ioctl.c | |||
@@ -192,7 +192,7 @@ int sr_do_ioctl(Scsi_CD *cd, struct packet_command *cgc) | |||
192 | SDev = cd->device; | 192 | SDev = cd->device; |
193 | 193 | ||
194 | if (!sense) { | 194 | if (!sense) { |
195 | sense = kmalloc(sizeof(*sense), GFP_KERNEL); | 195 | sense = kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_KERNEL); |
196 | if (!sense) { | 196 | if (!sense) { |
197 | err = -ENOMEM; | 197 | err = -ENOMEM; |
198 | goto out; | 198 | goto out; |
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 4dd6865d32b0..b5c96e74a903 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -242,8 +242,10 @@ static void serial_close(struct tty_struct *tty, struct file * filp) | |||
242 | 242 | ||
243 | down(&port->sem); | 243 | down(&port->sem); |
244 | 244 | ||
245 | if (port->open_count == 0) | 245 | if (port->open_count == 0) { |
246 | goto out; | 246 | up(&port->sem); |
247 | return; | ||
248 | } | ||
247 | 249 | ||
248 | --port->open_count; | 250 | --port->open_count; |
249 | if (port->open_count == 0) { | 251 | if (port->open_count == 0) { |
@@ -260,10 +262,8 @@ static void serial_close(struct tty_struct *tty, struct file * filp) | |||
260 | module_put(port->serial->type->driver.owner); | 262 | module_put(port->serial->type->driver.owner); |
261 | } | 263 | } |
262 | 264 | ||
263 | kref_put(&port->serial->kref, destroy_serial); | ||
264 | |||
265 | out: | ||
266 | up(&port->sem); | 265 | up(&port->sem); |
266 | kref_put(&port->serial->kref, destroy_serial); | ||
267 | } | 267 | } |
268 | 268 | ||
269 | static int serial_write (struct tty_struct * tty, const unsigned char *buf, int count) | 269 | static int serial_write (struct tty_struct * tty, const unsigned char *buf, int count) |
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index 3c03aadaff0c..7b25463d3c14 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h | |||
@@ -52,7 +52,7 @@ extern int SendReceive2(const unsigned int /* xid */ , struct cifsSesInfo *, | |||
52 | int * /* type of buf returned */ , const int long_op); | 52 | int * /* type of buf returned */ , const int long_op); |
53 | extern int checkSMBhdr(struct smb_hdr *smb, __u16 mid); | 53 | extern int checkSMBhdr(struct smb_hdr *smb, __u16 mid); |
54 | extern int checkSMB(struct smb_hdr *smb, __u16 mid, int length); | 54 | extern int checkSMB(struct smb_hdr *smb, __u16 mid, int length); |
55 | extern int is_valid_oplock_break(struct smb_hdr *smb); | 55 | extern int is_valid_oplock_break(struct smb_hdr *smb, struct TCP_Server_Info *); |
56 | extern int is_size_safe_to_change(struct cifsInodeInfo *); | 56 | extern int is_size_safe_to_change(struct cifsInodeInfo *); |
57 | extern struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *); | 57 | extern struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *); |
58 | extern unsigned int smbCalcSize(struct smb_hdr *ptr); | 58 | extern unsigned int smbCalcSize(struct smb_hdr *ptr); |
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index ef5ae6f93c75..2a0c1f4ca0ae 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -630,7 +630,7 @@ multi_t2_fnd: | |||
630 | smallbuf = NULL; | 630 | smallbuf = NULL; |
631 | } | 631 | } |
632 | wake_up_process(task_to_wake); | 632 | wake_up_process(task_to_wake); |
633 | } else if ((is_valid_oplock_break(smb_buffer) == FALSE) | 633 | } else if ((is_valid_oplock_break(smb_buffer, server) == FALSE) |
634 | && (isMultiRsp == FALSE)) { | 634 | && (isMultiRsp == FALSE)) { |
635 | cERROR(1, ("No task to wake, unknown frame rcvd!")); | 635 | cERROR(1, ("No task to wake, unknown frame rcvd!")); |
636 | cifs_dump_mem("Received Data is: ",(char *)smb_buffer, | 636 | cifs_dump_mem("Received Data is: ",(char *)smb_buffer, |
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index 812c6bb0fe38..432ba15e2c2d 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c | |||
@@ -475,7 +475,7 @@ checkSMB(struct smb_hdr *smb, __u16 mid, int length) | |||
475 | return 0; | 475 | return 0; |
476 | } | 476 | } |
477 | int | 477 | int |
478 | is_valid_oplock_break(struct smb_hdr *buf) | 478 | is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) |
479 | { | 479 | { |
480 | struct smb_com_lock_req * pSMB = (struct smb_com_lock_req *)buf; | 480 | struct smb_com_lock_req * pSMB = (struct smb_com_lock_req *)buf; |
481 | struct list_head *tmp; | 481 | struct list_head *tmp; |
@@ -535,7 +535,7 @@ is_valid_oplock_break(struct smb_hdr *buf) | |||
535 | read_lock(&GlobalSMBSeslock); | 535 | read_lock(&GlobalSMBSeslock); |
536 | list_for_each(tmp, &GlobalTreeConnectionList) { | 536 | list_for_each(tmp, &GlobalTreeConnectionList) { |
537 | tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList); | 537 | tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList); |
538 | if (tcon->tid == buf->Tid) { | 538 | if ((tcon->tid == buf->Tid) && (srv == tcon->ses->server)) { |
539 | cifs_stats_inc(&tcon->num_oplock_brks); | 539 | cifs_stats_inc(&tcon->num_oplock_brks); |
540 | list_for_each(tmp1,&tcon->openFileList){ | 540 | list_for_each(tmp1,&tcon->openFileList){ |
541 | netfile = list_entry(tmp1,struct cifsFileInfo, | 541 | netfile = list_entry(tmp1,struct cifsFileInfo, |
diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c index 7fe85415ae7c..8ad52f5bf255 100644 --- a/fs/cramfs/inode.c +++ b/fs/cramfs/inode.c | |||
@@ -36,7 +36,7 @@ static DECLARE_MUTEX(read_mutex); | |||
36 | 36 | ||
37 | /* These two macros may change in future, to provide better st_ino | 37 | /* These two macros may change in future, to provide better st_ino |
38 | semantics. */ | 38 | semantics. */ |
39 | #define CRAMINO(x) ((x)->offset?(x)->offset<<2:1) | 39 | #define CRAMINO(x) (((x)->offset && (x)->size)?(x)->offset<<2:1) |
40 | #define OFFSET(x) ((x)->i_ino) | 40 | #define OFFSET(x) ((x)->i_ino) |
41 | 41 | ||
42 | 42 | ||
@@ -66,8 +66,36 @@ static int cramfs_iget5_test(struct inode *inode, void *opaque) | |||
66 | 66 | ||
67 | static int cramfs_iget5_set(struct inode *inode, void *opaque) | 67 | static int cramfs_iget5_set(struct inode *inode, void *opaque) |
68 | { | 68 | { |
69 | static struct timespec zerotime; | ||
69 | struct cramfs_inode *cramfs_inode = opaque; | 70 | struct cramfs_inode *cramfs_inode = opaque; |
71 | inode->i_mode = cramfs_inode->mode; | ||
72 | inode->i_uid = cramfs_inode->uid; | ||
73 | inode->i_size = cramfs_inode->size; | ||
74 | inode->i_blocks = (cramfs_inode->size - 1) / 512 + 1; | ||
75 | inode->i_blksize = PAGE_CACHE_SIZE; | ||
76 | inode->i_gid = cramfs_inode->gid; | ||
77 | /* Struct copy intentional */ | ||
78 | inode->i_mtime = inode->i_atime = inode->i_ctime = zerotime; | ||
70 | inode->i_ino = CRAMINO(cramfs_inode); | 79 | inode->i_ino = CRAMINO(cramfs_inode); |
80 | /* inode->i_nlink is left 1 - arguably wrong for directories, | ||
81 | but it's the best we can do without reading the directory | ||
82 | contents. 1 yields the right result in GNU find, even | ||
83 | without -noleaf option. */ | ||
84 | if (S_ISREG(inode->i_mode)) { | ||
85 | inode->i_fop = &generic_ro_fops; | ||
86 | inode->i_data.a_ops = &cramfs_aops; | ||
87 | } else if (S_ISDIR(inode->i_mode)) { | ||
88 | inode->i_op = &cramfs_dir_inode_operations; | ||
89 | inode->i_fop = &cramfs_directory_operations; | ||
90 | } else if (S_ISLNK(inode->i_mode)) { | ||
91 | inode->i_op = &page_symlink_inode_operations; | ||
92 | inode->i_data.a_ops = &cramfs_aops; | ||
93 | } else { | ||
94 | inode->i_size = 0; | ||
95 | inode->i_blocks = 0; | ||
96 | init_special_inode(inode, inode->i_mode, | ||
97 | old_decode_dev(cramfs_inode->size)); | ||
98 | } | ||
71 | return 0; | 99 | return 0; |
72 | } | 100 | } |
73 | 101 | ||
@@ -77,37 +105,7 @@ static struct inode *get_cramfs_inode(struct super_block *sb, | |||
77 | struct inode *inode = iget5_locked(sb, CRAMINO(cramfs_inode), | 105 | struct inode *inode = iget5_locked(sb, CRAMINO(cramfs_inode), |
78 | cramfs_iget5_test, cramfs_iget5_set, | 106 | cramfs_iget5_test, cramfs_iget5_set, |
79 | cramfs_inode); | 107 | cramfs_inode); |
80 | static struct timespec zerotime; | ||
81 | |||
82 | if (inode && (inode->i_state & I_NEW)) { | 108 | if (inode && (inode->i_state & I_NEW)) { |
83 | inode->i_mode = cramfs_inode->mode; | ||
84 | inode->i_uid = cramfs_inode->uid; | ||
85 | inode->i_size = cramfs_inode->size; | ||
86 | inode->i_blocks = (cramfs_inode->size - 1) / 512 + 1; | ||
87 | inode->i_blksize = PAGE_CACHE_SIZE; | ||
88 | inode->i_gid = cramfs_inode->gid; | ||
89 | /* Struct copy intentional */ | ||
90 | inode->i_mtime = inode->i_atime = inode->i_ctime = zerotime; | ||
91 | inode->i_ino = CRAMINO(cramfs_inode); | ||
92 | /* inode->i_nlink is left 1 - arguably wrong for directories, | ||
93 | but it's the best we can do without reading the directory | ||
94 | contents. 1 yields the right result in GNU find, even | ||
95 | without -noleaf option. */ | ||
96 | if (S_ISREG(inode->i_mode)) { | ||
97 | inode->i_fop = &generic_ro_fops; | ||
98 | inode->i_data.a_ops = &cramfs_aops; | ||
99 | } else if (S_ISDIR(inode->i_mode)) { | ||
100 | inode->i_op = &cramfs_dir_inode_operations; | ||
101 | inode->i_fop = &cramfs_directory_operations; | ||
102 | } else if (S_ISLNK(inode->i_mode)) { | ||
103 | inode->i_op = &page_symlink_inode_operations; | ||
104 | inode->i_data.a_ops = &cramfs_aops; | ||
105 | } else { | ||
106 | inode->i_size = 0; | ||
107 | inode->i_blocks = 0; | ||
108 | init_special_inode(inode, inode->i_mode, | ||
109 | old_decode_dev(cramfs_inode->size)); | ||
110 | } | ||
111 | unlock_new_inode(inode); | 109 | unlock_new_inode(inode); |
112 | } | 110 | } |
113 | return inode; | 111 | return inode; |
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 0eaad41f4658..91b7c15ab373 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c | |||
@@ -204,7 +204,6 @@ static void smaps_pte_range(struct vm_area_struct *vma, pmd_t *pmd, | |||
204 | { | 204 | { |
205 | pte_t *pte, ptent; | 205 | pte_t *pte, ptent; |
206 | spinlock_t *ptl; | 206 | spinlock_t *ptl; |
207 | unsigned long pfn; | ||
208 | struct page *page; | 207 | struct page *page; |
209 | 208 | ||
210 | pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl); | 209 | pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl); |
@@ -214,12 +213,12 @@ static void smaps_pte_range(struct vm_area_struct *vma, pmd_t *pmd, | |||
214 | continue; | 213 | continue; |
215 | 214 | ||
216 | mss->resident += PAGE_SIZE; | 215 | mss->resident += PAGE_SIZE; |
217 | pfn = pte_pfn(ptent); | 216 | |
218 | if (!pfn_valid(pfn)) | 217 | page = vm_normal_page(vma, addr, ptent); |
218 | if (!page) | ||
219 | continue; | 219 | continue; |
220 | 220 | ||
221 | page = pfn_to_page(pfn); | 221 | if (page_mapcount(page) >= 2) { |
222 | if (page_count(page) >= 2) { | ||
223 | if (pte_dirty(ptent)) | 222 | if (pte_dirty(ptent)) |
224 | mss->shared_dirty += PAGE_SIZE; | 223 | mss->shared_dirty += PAGE_SIZE; |
225 | else | 224 | else |
@@ -289,7 +288,7 @@ static int show_smap(struct seq_file *m, void *v) | |||
289 | struct mem_size_stats mss; | 288 | struct mem_size_stats mss; |
290 | 289 | ||
291 | memset(&mss, 0, sizeof mss); | 290 | memset(&mss, 0, sizeof mss); |
292 | if (vma->vm_mm) | 291 | if (vma->vm_mm && !is_vm_hugetlb_page(vma)) |
293 | smaps_pgd_range(vma, vma->vm_start, vma->vm_end, &mss); | 292 | smaps_pgd_range(vma, vma->vm_start, vma->vm_end, &mss); |
294 | return show_map_internal(m, v, &mss); | 293 | return show_map_internal(m, v, &mss); |
295 | } | 294 | } |
diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c index cde5d48994ae..14bd2246fb6d 100644 --- a/fs/ramfs/inode.c +++ b/fs/ramfs/inode.c | |||
@@ -137,6 +137,7 @@ static int ramfs_symlink(struct inode * dir, struct dentry *dentry, const char * | |||
137 | inode->i_gid = dir->i_gid; | 137 | inode->i_gid = dir->i_gid; |
138 | d_instantiate(dentry, inode); | 138 | d_instantiate(dentry, inode); |
139 | dget(dentry); | 139 | dget(dentry); |
140 | dir->i_mtime = dir->i_ctime = CURRENT_TIME; | ||
140 | } else | 141 | } else |
141 | iput(inode); | 142 | iput(inode); |
142 | } | 143 | } |
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c index c8123308e060..284f7852de8b 100644 --- a/fs/reiserfs/namei.c +++ b/fs/reiserfs/namei.c | |||
@@ -247,7 +247,7 @@ static int linear_search_in_dir_item(struct cpu_key *key, | |||
247 | /* mark, that this generation number is used */ | 247 | /* mark, that this generation number is used */ |
248 | if (de->de_gen_number_bit_string) | 248 | if (de->de_gen_number_bit_string) |
249 | set_bit(GET_GENERATION_NUMBER(deh_offset(deh)), | 249 | set_bit(GET_GENERATION_NUMBER(deh_offset(deh)), |
250 | (unsigned long *)de->de_gen_number_bit_string); | 250 | de->de_gen_number_bit_string); |
251 | 251 | ||
252 | // calculate pointer to name and namelen | 252 | // calculate pointer to name and namelen |
253 | de->de_entry_num = i; | 253 | de->de_entry_num = i; |
@@ -431,7 +431,7 @@ static int reiserfs_add_entry(struct reiserfs_transaction_handle *th, | |||
431 | struct reiserfs_de_head *deh; | 431 | struct reiserfs_de_head *deh; |
432 | INITIALIZE_PATH(path); | 432 | INITIALIZE_PATH(path); |
433 | struct reiserfs_dir_entry de; | 433 | struct reiserfs_dir_entry de; |
434 | int bit_string[MAX_GENERATION_NUMBER / (sizeof(int) * 8) + 1]; | 434 | DECLARE_BITMAP(bit_string, MAX_GENERATION_NUMBER + 1); |
435 | int gen_number; | 435 | int gen_number; |
436 | char small_buf[32 + DEH_SIZE]; /* 48 bytes now and we avoid kmalloc | 436 | char small_buf[32 + DEH_SIZE]; /* 48 bytes now and we avoid kmalloc |
437 | if we create file with short name */ | 437 | if we create file with short name */ |
@@ -486,7 +486,7 @@ static int reiserfs_add_entry(struct reiserfs_transaction_handle *th, | |||
486 | 486 | ||
487 | /* find the proper place for the new entry */ | 487 | /* find the proper place for the new entry */ |
488 | memset(bit_string, 0, sizeof(bit_string)); | 488 | memset(bit_string, 0, sizeof(bit_string)); |
489 | de.de_gen_number_bit_string = (char *)bit_string; | 489 | de.de_gen_number_bit_string = bit_string; |
490 | retval = reiserfs_find_entry(dir, name, namelen, &path, &de); | 490 | retval = reiserfs_find_entry(dir, name, namelen, &path, &de); |
491 | if (retval != NAME_NOT_FOUND) { | 491 | if (retval != NAME_NOT_FOUND) { |
492 | if (buffer != small_buf) | 492 | if (buffer != small_buf) |
@@ -508,7 +508,7 @@ static int reiserfs_add_entry(struct reiserfs_transaction_handle *th, | |||
508 | } | 508 | } |
509 | 509 | ||
510 | gen_number = | 510 | gen_number = |
511 | find_first_zero_bit((unsigned long *)bit_string, | 511 | find_first_zero_bit(bit_string, |
512 | MAX_GENERATION_NUMBER + 1); | 512 | MAX_GENERATION_NUMBER + 1); |
513 | if (gen_number > MAX_GENERATION_NUMBER) { | 513 | if (gen_number > MAX_GENERATION_NUMBER) { |
514 | /* there is no free generation number */ | 514 | /* there is no free generation number */ |
diff --git a/include/asm-s390/system.h b/include/asm-s390/system.h index b2e65e8bf812..6a89dbb03c1e 100644 --- a/include/asm-s390/system.h +++ b/include/asm-s390/system.h | |||
@@ -118,6 +118,8 @@ static inline void sched_cacheflush(void) | |||
118 | extern void account_vtime(struct task_struct *); | 118 | extern void account_vtime(struct task_struct *); |
119 | extern void account_tick_vtime(struct task_struct *); | 119 | extern void account_tick_vtime(struct task_struct *); |
120 | extern void account_system_vtime(struct task_struct *); | 120 | extern void account_system_vtime(struct task_struct *); |
121 | #else | ||
122 | #define account_vtime(x) do { /* empty */ } while (0) | ||
121 | #endif | 123 | #endif |
122 | 124 | ||
123 | #define finish_arch_switch(prev) do { \ | 125 | #define finish_arch_switch(prev) do { \ |
diff --git a/include/asm-sparc64/futex.h b/include/asm-sparc64/futex.h index 0caf60147e97..34c4b43d3f98 100644 --- a/include/asm-sparc64/futex.h +++ b/include/asm-sparc64/futex.h | |||
@@ -20,7 +20,7 @@ | |||
20 | "4: ba 3b\n" \ | 20 | "4: ba 3b\n" \ |
21 | " mov %5, %0\n" \ | 21 | " mov %5, %0\n" \ |
22 | " .previous\n" \ | 22 | " .previous\n" \ |
23 | " .section __ex_table,#alloc\n" \ | 23 | " .section __ex_table,\"a\"\n" \ |
24 | " .align 4\n" \ | 24 | " .align 4\n" \ |
25 | " .word 1b, 4b\n" \ | 25 | " .word 1b, 4b\n" \ |
26 | " .word 2b, 4b\n" \ | 26 | " .word 2b, 4b\n" \ |
diff --git a/include/asm-sparc64/uaccess.h b/include/asm-sparc64/uaccess.h index 203e8eee6351..c91d1e38eac6 100644 --- a/include/asm-sparc64/uaccess.h +++ b/include/asm-sparc64/uaccess.h | |||
@@ -136,7 +136,7 @@ __asm__ __volatile__( \ | |||
136 | "b 2b\n\t" \ | 136 | "b 2b\n\t" \ |
137 | " mov %3, %0\n\n\t" \ | 137 | " mov %3, %0\n\n\t" \ |
138 | ".previous\n\t" \ | 138 | ".previous\n\t" \ |
139 | ".section __ex_table,#alloc\n\t" \ | 139 | ".section __ex_table,\"a\"\n\t" \ |
140 | ".align 4\n\t" \ | 140 | ".align 4\n\t" \ |
141 | ".word 1b, 3b\n\t" \ | 141 | ".word 1b, 3b\n\t" \ |
142 | ".previous\n\n\t" \ | 142 | ".previous\n\n\t" \ |
@@ -148,7 +148,7 @@ if (__builtin_constant_p(ret) && ret == -EFAULT) \ | |||
148 | __asm__ __volatile__( \ | 148 | __asm__ __volatile__( \ |
149 | "/* Put user asm ret, inline. */\n" \ | 149 | "/* Put user asm ret, inline. */\n" \ |
150 | "1:\t" "st"#size "a %1, [%2] %%asi\n\n\t" \ | 150 | "1:\t" "st"#size "a %1, [%2] %%asi\n\n\t" \ |
151 | ".section __ex_table,#alloc\n\t" \ | 151 | ".section __ex_table,\"a\"\n\t" \ |
152 | ".align 4\n\t" \ | 152 | ".align 4\n\t" \ |
153 | ".word 1b, __ret_efault\n\n\t" \ | 153 | ".word 1b, __ret_efault\n\n\t" \ |
154 | ".previous\n\n\t" \ | 154 | ".previous\n\n\t" \ |
@@ -163,7 +163,7 @@ __asm__ __volatile__( \ | |||
163 | "ret\n\t" \ | 163 | "ret\n\t" \ |
164 | " restore %%g0, %3, %%o0\n\n\t" \ | 164 | " restore %%g0, %3, %%o0\n\n\t" \ |
165 | ".previous\n\t" \ | 165 | ".previous\n\t" \ |
166 | ".section __ex_table,#alloc\n\t" \ | 166 | ".section __ex_table,\"a\"\n\t" \ |
167 | ".align 4\n\t" \ | 167 | ".align 4\n\t" \ |
168 | ".word 1b, 3b\n\n\t" \ | 168 | ".word 1b, 3b\n\n\t" \ |
169 | ".previous\n\n\t" \ | 169 | ".previous\n\n\t" \ |
@@ -206,7 +206,7 @@ __asm__ __volatile__( \ | |||
206 | "b 2b\n\t" \ | 206 | "b 2b\n\t" \ |
207 | " mov %3, %0\n\n\t" \ | 207 | " mov %3, %0\n\n\t" \ |
208 | ".previous\n\t" \ | 208 | ".previous\n\t" \ |
209 | ".section __ex_table,#alloc\n\t" \ | 209 | ".section __ex_table,\"a\"\n\t" \ |
210 | ".align 4\n\t" \ | 210 | ".align 4\n\t" \ |
211 | ".word 1b, 3b\n\n\t" \ | 211 | ".word 1b, 3b\n\n\t" \ |
212 | ".previous\n\t" \ | 212 | ".previous\n\t" \ |
@@ -218,7 +218,7 @@ if (__builtin_constant_p(retval) && retval == -EFAULT) \ | |||
218 | __asm__ __volatile__( \ | 218 | __asm__ __volatile__( \ |
219 | "/* Get user asm ret, inline. */\n" \ | 219 | "/* Get user asm ret, inline. */\n" \ |
220 | "1:\t" "ld"#size "a [%1] %%asi, %0\n\n\t" \ | 220 | "1:\t" "ld"#size "a [%1] %%asi, %0\n\n\t" \ |
221 | ".section __ex_table,#alloc\n\t" \ | 221 | ".section __ex_table,\"a\"\n\t" \ |
222 | ".align 4\n\t" \ | 222 | ".align 4\n\t" \ |
223 | ".word 1b,__ret_efault\n\n\t" \ | 223 | ".word 1b,__ret_efault\n\n\t" \ |
224 | ".previous\n\t" \ | 224 | ".previous\n\t" \ |
@@ -233,7 +233,7 @@ __asm__ __volatile__( \ | |||
233 | "ret\n\t" \ | 233 | "ret\n\t" \ |
234 | " restore %%g0, %2, %%o0\n\n\t" \ | 234 | " restore %%g0, %2, %%o0\n\n\t" \ |
235 | ".previous\n\t" \ | 235 | ".previous\n\t" \ |
236 | ".section __ex_table,#alloc\n\t" \ | 236 | ".section __ex_table,\"a\"\n\t" \ |
237 | ".align 4\n\t" \ | 237 | ".align 4\n\t" \ |
238 | ".word 1b, 3b\n\n\t" \ | 238 | ".word 1b, 3b\n\n\t" \ |
239 | ".previous\n\t" \ | 239 | ".previous\n\t" \ |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 6361544bb6ae..6401c31d6add 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -116,6 +116,10 @@ extern int hrtimer_try_to_cancel(struct hrtimer *timer); | |||
116 | extern ktime_t hrtimer_get_remaining(const struct hrtimer *timer); | 116 | extern ktime_t hrtimer_get_remaining(const struct hrtimer *timer); |
117 | extern int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp); | 117 | extern int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp); |
118 | 118 | ||
119 | #ifdef CONFIG_NO_IDLE_HZ | ||
120 | extern ktime_t hrtimer_get_next_event(void); | ||
121 | #endif | ||
122 | |||
119 | static inline int hrtimer_active(const struct hrtimer *timer) | 123 | static inline int hrtimer_active(const struct hrtimer *timer) |
120 | { | 124 | { |
121 | return timer->state == HRTIMER_PENDING; | 125 | return timer->state == HRTIMER_PENDING; |
diff --git a/include/linux/kmalloc_sizes.h b/include/linux/kmalloc_sizes.h index d82d4c05c12d..bda23e00ed71 100644 --- a/include/linux/kmalloc_sizes.h +++ b/include/linux/kmalloc_sizes.h | |||
@@ -19,8 +19,10 @@ | |||
19 | CACHE(32768) | 19 | CACHE(32768) |
20 | CACHE(65536) | 20 | CACHE(65536) |
21 | CACHE(131072) | 21 | CACHE(131072) |
22 | #ifndef CONFIG_MMU | 22 | #if (NR_CPUS > 512) || (MAX_NUMNODES > 256) || !defined(CONFIG_MMU) |
23 | CACHE(262144) | 23 | CACHE(262144) |
24 | #endif | ||
25 | #ifndef CONFIG_MMU | ||
24 | CACHE(524288) | 26 | CACHE(524288) |
25 | CACHE(1048576) | 27 | CACHE(1048576) |
26 | #ifdef CONFIG_LARGE_ALLOCS | 28 | #ifdef CONFIG_LARGE_ALLOCS |
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 01f03bc06eff..968b1aa3732c 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
@@ -6,6 +6,10 @@ | |||
6 | #include <linux/mmzone.h> | 6 | #include <linux/mmzone.h> |
7 | #include <linux/notifier.h> | 7 | #include <linux/notifier.h> |
8 | 8 | ||
9 | struct page; | ||
10 | struct zone; | ||
11 | struct pglist_data; | ||
12 | |||
9 | #ifdef CONFIG_MEMORY_HOTPLUG | 13 | #ifdef CONFIG_MEMORY_HOTPLUG |
10 | /* | 14 | /* |
11 | * pgdat resizing functions | 15 | * pgdat resizing functions |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 82b83da25d77..1709b5009d2e 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1752,6 +1752,8 @@ | |||
1752 | #define PCI_DEVICE_ID_CCD_B00B 0xb00b | 1752 | #define PCI_DEVICE_ID_CCD_B00B 0xb00b |
1753 | #define PCI_DEVICE_ID_CCD_B00C 0xb00c | 1753 | #define PCI_DEVICE_ID_CCD_B00C 0xb00c |
1754 | #define PCI_DEVICE_ID_CCD_B100 0xb100 | 1754 | #define PCI_DEVICE_ID_CCD_B100 0xb100 |
1755 | #define PCI_DEVICE_ID_CCD_B700 0xb700 | ||
1756 | #define PCI_DEVICE_ID_CCD_B701 0xb701 | ||
1755 | 1757 | ||
1756 | #define PCI_VENDOR_ID_EXAR 0x13a8 | 1758 | #define PCI_VENDOR_ID_EXAR 0x13a8 |
1757 | #define PCI_DEVICE_ID_EXAR_XR17C152 0x0152 | 1759 | #define PCI_DEVICE_ID_EXAR_XR17C152 0x0152 |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index 7d51149bd793..dad78cecfd20 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -1052,7 +1052,7 @@ struct reiserfs_dir_entry { | |||
1052 | int de_entrylen; | 1052 | int de_entrylen; |
1053 | int de_namelen; | 1053 | int de_namelen; |
1054 | char *de_name; | 1054 | char *de_name; |
1055 | char *de_gen_number_bit_string; | 1055 | unsigned long *de_gen_number_bit_string; |
1056 | 1056 | ||
1057 | __u32 de_dir_id; | 1057 | __u32 de_dir_id; |
1058 | __u32 de_objectid; | 1058 | __u32 de_objectid; |
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 5ae51f1bc7c8..14bc9cfa6399 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c | |||
@@ -505,6 +505,41 @@ ktime_t hrtimer_get_remaining(const struct hrtimer *timer) | |||
505 | return rem; | 505 | return rem; |
506 | } | 506 | } |
507 | 507 | ||
508 | #ifdef CONFIG_NO_IDLE_HZ | ||
509 | /** | ||
510 | * hrtimer_get_next_event - get the time until next expiry event | ||
511 | * | ||
512 | * Returns the delta to the next expiry event or KTIME_MAX if no timer | ||
513 | * is pending. | ||
514 | */ | ||
515 | ktime_t hrtimer_get_next_event(void) | ||
516 | { | ||
517 | struct hrtimer_base *base = __get_cpu_var(hrtimer_bases); | ||
518 | ktime_t delta, mindelta = { .tv64 = KTIME_MAX }; | ||
519 | unsigned long flags; | ||
520 | int i; | ||
521 | |||
522 | for (i = 0; i < MAX_HRTIMER_BASES; i++, base++) { | ||
523 | struct hrtimer *timer; | ||
524 | |||
525 | spin_lock_irqsave(&base->lock, flags); | ||
526 | if (!base->first) { | ||
527 | spin_unlock_irqrestore(&base->lock, flags); | ||
528 | continue; | ||
529 | } | ||
530 | timer = rb_entry(base->first, struct hrtimer, node); | ||
531 | delta.tv64 = timer->expires.tv64; | ||
532 | spin_unlock_irqrestore(&base->lock, flags); | ||
533 | delta = ktime_sub(delta, base->get_time()); | ||
534 | if (delta.tv64 < mindelta.tv64) | ||
535 | mindelta.tv64 = delta.tv64; | ||
536 | } | ||
537 | if (mindelta.tv64 < 0) | ||
538 | mindelta.tv64 = 0; | ||
539 | return mindelta; | ||
540 | } | ||
541 | #endif | ||
542 | |||
508 | /** | 543 | /** |
509 | * hrtimer_init - initialize a timer to the given clock | 544 | * hrtimer_init - initialize a timer to the given clock |
510 | * | 545 | * |
diff --git a/kernel/sched.c b/kernel/sched.c index 12d291bf3379..3454bb869fd0 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -4028,6 +4028,8 @@ static inline void __cond_resched(void) | |||
4028 | */ | 4028 | */ |
4029 | if (unlikely(preempt_count())) | 4029 | if (unlikely(preempt_count())) |
4030 | return; | 4030 | return; |
4031 | if (unlikely(system_state != SYSTEM_RUNNING)) | ||
4032 | return; | ||
4031 | do { | 4033 | do { |
4032 | add_preempt_count(PREEMPT_ACTIVE); | 4034 | add_preempt_count(PREEMPT_ACTIVE); |
4033 | schedule(); | 4035 | schedule(); |
diff --git a/kernel/timer.c b/kernel/timer.c index fc6646fd5aab..bf7c4193b936 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
@@ -489,9 +489,21 @@ unsigned long next_timer_interrupt(void) | |||
489 | struct list_head *list; | 489 | struct list_head *list; |
490 | struct timer_list *nte; | 490 | struct timer_list *nte; |
491 | unsigned long expires; | 491 | unsigned long expires; |
492 | unsigned long hr_expires = MAX_JIFFY_OFFSET; | ||
493 | ktime_t hr_delta; | ||
492 | tvec_t *varray[4]; | 494 | tvec_t *varray[4]; |
493 | int i, j; | 495 | int i, j; |
494 | 496 | ||
497 | hr_delta = hrtimer_get_next_event(); | ||
498 | if (hr_delta.tv64 != KTIME_MAX) { | ||
499 | struct timespec tsdelta; | ||
500 | tsdelta = ktime_to_timespec(hr_delta); | ||
501 | hr_expires = timespec_to_jiffies(&tsdelta); | ||
502 | if (hr_expires < 3) | ||
503 | return hr_expires + jiffies; | ||
504 | } | ||
505 | hr_expires += jiffies; | ||
506 | |||
495 | base = &__get_cpu_var(tvec_bases); | 507 | base = &__get_cpu_var(tvec_bases); |
496 | spin_lock(&base->t_base.lock); | 508 | spin_lock(&base->t_base.lock); |
497 | expires = base->timer_jiffies + (LONG_MAX >> 1); | 509 | expires = base->timer_jiffies + (LONG_MAX >> 1); |
@@ -542,6 +554,10 @@ found: | |||
542 | } | 554 | } |
543 | } | 555 | } |
544 | spin_unlock(&base->t_base.lock); | 556 | spin_unlock(&base->t_base.lock); |
557 | |||
558 | if (time_before(hr_expires, expires)) | ||
559 | return hr_expires; | ||
560 | |||
545 | return expires; | 561 | return expires; |
546 | } | 562 | } |
547 | #endif | 563 | #endif |
@@ -925,6 +941,8 @@ static inline void update_times(void) | |||
925 | void do_timer(struct pt_regs *regs) | 941 | void do_timer(struct pt_regs *regs) |
926 | { | 942 | { |
927 | jiffies_64++; | 943 | jiffies_64++; |
944 | /* prevent loading jiffies before storing new jiffies_64 value. */ | ||
945 | barrier(); | ||
928 | update_times(); | 946 | update_times(); |
929 | softlockup_tick(regs); | 947 | softlockup_tick(regs); |
930 | } | 948 | } |
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 1a210088ad80..d80fa7d8f720 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -197,7 +197,7 @@ static struct mempolicy *mpol_new(int mode, nodemask_t *nodes) | |||
197 | return policy; | 197 | return policy; |
198 | } | 198 | } |
199 | 199 | ||
200 | static void gather_stats(struct page *, void *); | 200 | static void gather_stats(struct page *, void *, int pte_dirty); |
201 | static void migrate_page_add(struct page *page, struct list_head *pagelist, | 201 | static void migrate_page_add(struct page *page, struct list_head *pagelist, |
202 | unsigned long flags); | 202 | unsigned long flags); |
203 | 203 | ||
@@ -239,7 +239,7 @@ static int check_pte_range(struct vm_area_struct *vma, pmd_t *pmd, | |||
239 | continue; | 239 | continue; |
240 | 240 | ||
241 | if (flags & MPOL_MF_STATS) | 241 | if (flags & MPOL_MF_STATS) |
242 | gather_stats(page, private); | 242 | gather_stats(page, private, pte_dirty(*pte)); |
243 | else if (flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL)) | 243 | else if (flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL)) |
244 | migrate_page_add(page, private, flags); | 244 | migrate_page_add(page, private, flags); |
245 | else | 245 | else |
@@ -1753,67 +1753,137 @@ static inline int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol) | |||
1753 | struct numa_maps { | 1753 | struct numa_maps { |
1754 | unsigned long pages; | 1754 | unsigned long pages; |
1755 | unsigned long anon; | 1755 | unsigned long anon; |
1756 | unsigned long mapped; | 1756 | unsigned long active; |
1757 | unsigned long writeback; | ||
1757 | unsigned long mapcount_max; | 1758 | unsigned long mapcount_max; |
1759 | unsigned long dirty; | ||
1760 | unsigned long swapcache; | ||
1758 | unsigned long node[MAX_NUMNODES]; | 1761 | unsigned long node[MAX_NUMNODES]; |
1759 | }; | 1762 | }; |
1760 | 1763 | ||
1761 | static void gather_stats(struct page *page, void *private) | 1764 | static void gather_stats(struct page *page, void *private, int pte_dirty) |
1762 | { | 1765 | { |
1763 | struct numa_maps *md = private; | 1766 | struct numa_maps *md = private; |
1764 | int count = page_mapcount(page); | 1767 | int count = page_mapcount(page); |
1765 | 1768 | ||
1766 | if (count) | 1769 | md->pages++; |
1767 | md->mapped++; | 1770 | if (pte_dirty || PageDirty(page)) |
1771 | md->dirty++; | ||
1768 | 1772 | ||
1769 | if (count > md->mapcount_max) | 1773 | if (PageSwapCache(page)) |
1770 | md->mapcount_max = count; | 1774 | md->swapcache++; |
1771 | 1775 | ||
1772 | md->pages++; | 1776 | if (PageActive(page)) |
1777 | md->active++; | ||
1778 | |||
1779 | if (PageWriteback(page)) | ||
1780 | md->writeback++; | ||
1773 | 1781 | ||
1774 | if (PageAnon(page)) | 1782 | if (PageAnon(page)) |
1775 | md->anon++; | 1783 | md->anon++; |
1776 | 1784 | ||
1785 | if (count > md->mapcount_max) | ||
1786 | md->mapcount_max = count; | ||
1787 | |||
1777 | md->node[page_to_nid(page)]++; | 1788 | md->node[page_to_nid(page)]++; |
1778 | cond_resched(); | 1789 | cond_resched(); |
1779 | } | 1790 | } |
1780 | 1791 | ||
1792 | static void check_huge_range(struct vm_area_struct *vma, | ||
1793 | unsigned long start, unsigned long end, | ||
1794 | struct numa_maps *md) | ||
1795 | { | ||
1796 | unsigned long addr; | ||
1797 | struct page *page; | ||
1798 | |||
1799 | for (addr = start; addr < end; addr += HPAGE_SIZE) { | ||
1800 | pte_t *ptep = huge_pte_offset(vma->vm_mm, addr & HPAGE_MASK); | ||
1801 | pte_t pte; | ||
1802 | |||
1803 | if (!ptep) | ||
1804 | continue; | ||
1805 | |||
1806 | pte = *ptep; | ||
1807 | if (pte_none(pte)) | ||
1808 | continue; | ||
1809 | |||
1810 | page = pte_page(pte); | ||
1811 | if (!page) | ||
1812 | continue; | ||
1813 | |||
1814 | gather_stats(page, md, pte_dirty(*ptep)); | ||
1815 | } | ||
1816 | } | ||
1817 | |||
1781 | int show_numa_map(struct seq_file *m, void *v) | 1818 | int show_numa_map(struct seq_file *m, void *v) |
1782 | { | 1819 | { |
1783 | struct task_struct *task = m->private; | 1820 | struct task_struct *task = m->private; |
1784 | struct vm_area_struct *vma = v; | 1821 | struct vm_area_struct *vma = v; |
1785 | struct numa_maps *md; | 1822 | struct numa_maps *md; |
1823 | struct file *file = vma->vm_file; | ||
1824 | struct mm_struct *mm = vma->vm_mm; | ||
1786 | int n; | 1825 | int n; |
1787 | char buffer[50]; | 1826 | char buffer[50]; |
1788 | 1827 | ||
1789 | if (!vma->vm_mm) | 1828 | if (!mm) |
1790 | return 0; | 1829 | return 0; |
1791 | 1830 | ||
1792 | md = kzalloc(sizeof(struct numa_maps), GFP_KERNEL); | 1831 | md = kzalloc(sizeof(struct numa_maps), GFP_KERNEL); |
1793 | if (!md) | 1832 | if (!md) |
1794 | return 0; | 1833 | return 0; |
1795 | 1834 | ||
1796 | if (!is_vm_hugetlb_page(vma)) | 1835 | mpol_to_str(buffer, sizeof(buffer), |
1836 | get_vma_policy(task, vma, vma->vm_start)); | ||
1837 | |||
1838 | seq_printf(m, "%08lx %s", vma->vm_start, buffer); | ||
1839 | |||
1840 | if (file) { | ||
1841 | seq_printf(m, " file="); | ||
1842 | seq_path(m, file->f_vfsmnt, file->f_dentry, "\n\t= "); | ||
1843 | } else if (vma->vm_start <= mm->brk && vma->vm_end >= mm->start_brk) { | ||
1844 | seq_printf(m, " heap"); | ||
1845 | } else if (vma->vm_start <= mm->start_stack && | ||
1846 | vma->vm_end >= mm->start_stack) { | ||
1847 | seq_printf(m, " stack"); | ||
1848 | } | ||
1849 | |||
1850 | if (is_vm_hugetlb_page(vma)) { | ||
1851 | check_huge_range(vma, vma->vm_start, vma->vm_end, md); | ||
1852 | seq_printf(m, " huge"); | ||
1853 | } else { | ||
1797 | check_pgd_range(vma, vma->vm_start, vma->vm_end, | 1854 | check_pgd_range(vma, vma->vm_start, vma->vm_end, |
1798 | &node_online_map, MPOL_MF_STATS, md); | 1855 | &node_online_map, MPOL_MF_STATS, md); |
1856 | } | ||
1857 | |||
1858 | if (!md->pages) | ||
1859 | goto out; | ||
1799 | 1860 | ||
1800 | if (md->pages) { | 1861 | if (md->anon) |
1801 | mpol_to_str(buffer, sizeof(buffer), | 1862 | seq_printf(m," anon=%lu",md->anon); |
1802 | get_vma_policy(task, vma, vma->vm_start)); | ||
1803 | 1863 | ||
1804 | seq_printf(m, "%08lx %s pages=%lu mapped=%lu maxref=%lu", | 1864 | if (md->dirty) |
1805 | vma->vm_start, buffer, md->pages, | 1865 | seq_printf(m," dirty=%lu",md->dirty); |
1806 | md->mapped, md->mapcount_max); | ||
1807 | 1866 | ||
1808 | if (md->anon) | 1867 | if (md->pages != md->anon && md->pages != md->dirty) |
1809 | seq_printf(m," anon=%lu",md->anon); | 1868 | seq_printf(m, " mapped=%lu", md->pages); |
1810 | 1869 | ||
1811 | for_each_online_node(n) | 1870 | if (md->mapcount_max > 1) |
1812 | if (md->node[n]) | 1871 | seq_printf(m, " mapmax=%lu", md->mapcount_max); |
1813 | seq_printf(m, " N%d=%lu", n, md->node[n]); | ||
1814 | 1872 | ||
1815 | seq_putc(m, '\n'); | 1873 | if (md->swapcache) |
1816 | } | 1874 | seq_printf(m," swapcache=%lu", md->swapcache); |
1875 | |||
1876 | if (md->active < md->pages && !is_vm_hugetlb_page(vma)) | ||
1877 | seq_printf(m," active=%lu", md->active); | ||
1878 | |||
1879 | if (md->writeback) | ||
1880 | seq_printf(m," writeback=%lu", md->writeback); | ||
1881 | |||
1882 | for_each_online_node(n) | ||
1883 | if (md->node[n]) | ||
1884 | seq_printf(m, " N%d=%lu", n, md->node[n]); | ||
1885 | out: | ||
1886 | seq_putc(m, '\n'); | ||
1817 | kfree(md); | 1887 | kfree(md); |
1818 | 1888 | ||
1819 | if (m->count < m->size) | 1889 | if (m->count < m->size) |
@@ -1628,36 +1628,36 @@ static inline size_t calculate_slab_order(struct kmem_cache *cachep, | |||
1628 | size_t size, size_t align, unsigned long flags) | 1628 | size_t size, size_t align, unsigned long flags) |
1629 | { | 1629 | { |
1630 | size_t left_over = 0; | 1630 | size_t left_over = 0; |
1631 | int gfporder; | ||
1631 | 1632 | ||
1632 | for (;; cachep->gfporder++) { | 1633 | for (gfporder = 0 ; gfporder <= MAX_GFP_ORDER; gfporder++) { |
1633 | unsigned int num; | 1634 | unsigned int num; |
1634 | size_t remainder; | 1635 | size_t remainder; |
1635 | 1636 | ||
1636 | if (cachep->gfporder > MAX_GFP_ORDER) { | 1637 | cache_estimate(gfporder, size, align, flags, &remainder, &num); |
1637 | cachep->num = 0; | ||
1638 | break; | ||
1639 | } | ||
1640 | |||
1641 | cache_estimate(cachep->gfporder, size, align, flags, | ||
1642 | &remainder, &num); | ||
1643 | if (!num) | 1638 | if (!num) |
1644 | continue; | 1639 | continue; |
1640 | |||
1645 | /* More than offslab_limit objects will cause problems */ | 1641 | /* More than offslab_limit objects will cause problems */ |
1646 | if (flags & CFLGS_OFF_SLAB && cachep->num > offslab_limit) | 1642 | if ((flags & CFLGS_OFF_SLAB) && num > offslab_limit) |
1647 | break; | 1643 | break; |
1648 | 1644 | ||
1645 | /* Found something acceptable - save it away */ | ||
1649 | cachep->num = num; | 1646 | cachep->num = num; |
1647 | cachep->gfporder = gfporder; | ||
1650 | left_over = remainder; | 1648 | left_over = remainder; |
1651 | 1649 | ||
1652 | /* | 1650 | /* |
1653 | * Large number of objects is good, but very large slabs are | 1651 | * Large number of objects is good, but very large slabs are |
1654 | * currently bad for the gfp()s. | 1652 | * currently bad for the gfp()s. |
1655 | */ | 1653 | */ |
1656 | if (cachep->gfporder >= slab_break_gfp_order) | 1654 | if (gfporder >= slab_break_gfp_order) |
1657 | break; | 1655 | break; |
1658 | 1656 | ||
1659 | if ((left_over * 8) <= (PAGE_SIZE << cachep->gfporder)) | 1657 | /* |
1660 | /* Acceptable internal fragmentation */ | 1658 | * Acceptable internal fragmentation? |
1659 | */ | ||
1660 | if ((left_over * 8) <= (PAGE_SIZE << gfporder)) | ||
1661 | break; | 1661 | break; |
1662 | } | 1662 | } |
1663 | return left_over; | 1663 | return left_over; |
@@ -2554,7 +2554,7 @@ static void check_slabp(struct kmem_cache *cachep, struct slab *slabp) | |||
2554 | "slab: Internal list corruption detected in cache '%s'(%d), slabp %p(%d). Hexdump:\n", | 2554 | "slab: Internal list corruption detected in cache '%s'(%d), slabp %p(%d). Hexdump:\n", |
2555 | cachep->name, cachep->num, slabp, slabp->inuse); | 2555 | cachep->name, cachep->num, slabp, slabp->inuse); |
2556 | for (i = 0; | 2556 | for (i = 0; |
2557 | i < sizeof(slabp) + cachep->num * sizeof(kmem_bufctl_t); | 2557 | i < sizeof(*slabp) + cachep->num * sizeof(kmem_bufctl_t); |
2558 | i++) { | 2558 | i++) { |
2559 | if ((i % 16) == 0) | 2559 | if ((i % 16) == 0) |
2560 | printk("\n%03x:", i); | 2560 | printk("\n%03x:", i); |
diff --git a/net/atm/signaling.c b/net/atm/signaling.c index 93ad59a28ef5..31d98b57e1de 100644 --- a/net/atm/signaling.c +++ b/net/atm/signaling.c | |||
@@ -39,25 +39,19 @@ static DECLARE_WAIT_QUEUE_HEAD(sigd_sleep); | |||
39 | static void sigd_put_skb(struct sk_buff *skb) | 39 | static void sigd_put_skb(struct sk_buff *skb) |
40 | { | 40 | { |
41 | #ifdef WAIT_FOR_DEMON | 41 | #ifdef WAIT_FOR_DEMON |
42 | static unsigned long silence; | ||
43 | DECLARE_WAITQUEUE(wait,current); | 42 | DECLARE_WAITQUEUE(wait,current); |
44 | 43 | ||
45 | add_wait_queue(&sigd_sleep,&wait); | 44 | add_wait_queue(&sigd_sleep,&wait); |
46 | while (!sigd) { | 45 | while (!sigd) { |
47 | set_current_state(TASK_UNINTERRUPTIBLE); | 46 | set_current_state(TASK_UNINTERRUPTIBLE); |
48 | if (time_after(jiffies, silence) || silence == 0) { | 47 | DPRINTK("atmsvc: waiting for signaling demon...\n"); |
49 | printk(KERN_INFO "atmsvc: waiting for signaling demon " | ||
50 | "...\n"); | ||
51 | silence = (jiffies+30*HZ)|1; | ||
52 | } | ||
53 | schedule(); | 48 | schedule(); |
54 | } | 49 | } |
55 | current->state = TASK_RUNNING; | 50 | current->state = TASK_RUNNING; |
56 | remove_wait_queue(&sigd_sleep,&wait); | 51 | remove_wait_queue(&sigd_sleep,&wait); |
57 | #else | 52 | #else |
58 | if (!sigd) { | 53 | if (!sigd) { |
59 | if (net_ratelimit()) | 54 | DPRINTK("atmsvc: no signaling demon\n"); |
60 | printk(KERN_WARNING "atmsvc: no signaling demon\n"); | ||
61 | kfree_skb(skb); | 55 | kfree_skb(skb); |
62 | return; | 56 | return; |
63 | } | 57 | } |
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index 7fa3a5a9971f..f36b35edd60c 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c | |||
@@ -81,26 +81,27 @@ static void port_carrier_check(void *arg) | |||
81 | { | 81 | { |
82 | struct net_device *dev = arg; | 82 | struct net_device *dev = arg; |
83 | struct net_bridge_port *p; | 83 | struct net_bridge_port *p; |
84 | struct net_bridge *br; | ||
84 | 85 | ||
85 | rtnl_lock(); | 86 | rtnl_lock(); |
86 | p = dev->br_port; | 87 | p = dev->br_port; |
87 | if (!p) | 88 | if (!p) |
88 | goto done; | 89 | goto done; |
89 | 90 | br = p->br; | |
90 | if (netif_carrier_ok(p->dev)) { | 91 | |
91 | u32 cost = port_cost(p->dev); | 92 | if (netif_carrier_ok(dev)) |
92 | 93 | p->path_cost = port_cost(dev); | |
93 | spin_lock_bh(&p->br->lock); | 94 | |
94 | if (p->state == BR_STATE_DISABLED) { | 95 | if (br->dev->flags & IFF_UP) { |
95 | p->path_cost = cost; | 96 | spin_lock_bh(&br->lock); |
96 | br_stp_enable_port(p); | 97 | if (netif_carrier_ok(dev)) { |
98 | if (p->state == BR_STATE_DISABLED) | ||
99 | br_stp_enable_port(p); | ||
100 | } else { | ||
101 | if (p->state != BR_STATE_DISABLED) | ||
102 | br_stp_disable_port(p); | ||
97 | } | 103 | } |
98 | spin_unlock_bh(&p->br->lock); | 104 | spin_unlock_bh(&br->lock); |
99 | } else { | ||
100 | spin_lock_bh(&p->br->lock); | ||
101 | if (p->state != BR_STATE_DISABLED) | ||
102 | br_stp_disable_port(p); | ||
103 | spin_unlock_bh(&p->br->lock); | ||
104 | } | 105 | } |
105 | done: | 106 | done: |
106 | rtnl_unlock(); | 107 | rtnl_unlock(); |
@@ -168,6 +169,7 @@ static void del_nbp(struct net_bridge_port *p) | |||
168 | 169 | ||
169 | rcu_assign_pointer(dev->br_port, NULL); | 170 | rcu_assign_pointer(dev->br_port, NULL); |
170 | 171 | ||
172 | kobject_uevent(&p->kobj, KOBJ_REMOVE); | ||
171 | kobject_del(&p->kobj); | 173 | kobject_del(&p->kobj); |
172 | 174 | ||
173 | call_rcu(&p->rcu, destroy_nbp_rcu); | 175 | call_rcu(&p->rcu, destroy_nbp_rcu); |
@@ -276,8 +278,9 @@ static struct net_bridge_port *new_nbp(struct net_bridge *br, | |||
276 | br_init_port(p); | 278 | br_init_port(p); |
277 | p->state = BR_STATE_DISABLED; | 279 | p->state = BR_STATE_DISABLED; |
278 | INIT_WORK(&p->carrier_check, port_carrier_check, dev); | 280 | INIT_WORK(&p->carrier_check, port_carrier_check, dev); |
279 | kobject_init(&p->kobj); | 281 | br_stp_port_timer_init(p); |
280 | 282 | ||
283 | kobject_init(&p->kobj); | ||
281 | kobject_set_name(&p->kobj, SYSFS_BRIDGE_PORT_ATTR); | 284 | kobject_set_name(&p->kobj, SYSFS_BRIDGE_PORT_ATTR); |
282 | p->kobj.ktype = &brport_ktype; | 285 | p->kobj.ktype = &brport_ktype; |
283 | p->kobj.parent = &(dev->class_dev.kobj); | 286 | p->kobj.parent = &(dev->class_dev.kobj); |
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c index 35cf3a074087..23dea1422c9a 100644 --- a/net/bridge/br_stp_if.c +++ b/net/bridge/br_stp_if.c | |||
@@ -39,8 +39,6 @@ void br_init_port(struct net_bridge_port *p) | |||
39 | p->state = BR_STATE_BLOCKING; | 39 | p->state = BR_STATE_BLOCKING; |
40 | p->topology_change_ack = 0; | 40 | p->topology_change_ack = 0; |
41 | p->config_pending = 0; | 41 | p->config_pending = 0; |
42 | |||
43 | br_stp_port_timer_init(p); | ||
44 | } | 42 | } |
45 | 43 | ||
46 | /* called under bridge lock */ | 44 | /* called under bridge lock */ |
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index aa68e0ab274d..35d1d347541c 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * net/dccp/ccids/ccid3.c | 2 | * net/dccp/ccids/ccid3.c |
3 | * | 3 | * |
4 | * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. | 4 | * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. |
5 | * Copyright (c) 2005 Ian McDonald <iam4@cs.waikato.ac.nz> | 5 | * Copyright (c) 2005-6 Ian McDonald <imcdnzl@gmail.com> |
6 | * | 6 | * |
7 | * An implementation of the DCCP protocol | 7 | * An implementation of the DCCP protocol |
8 | * | 8 | * |
@@ -1033,9 +1033,13 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb) | |||
1033 | p_prev = hcrx->ccid3hcrx_p; | 1033 | p_prev = hcrx->ccid3hcrx_p; |
1034 | 1034 | ||
1035 | /* Calculate loss event rate */ | 1035 | /* Calculate loss event rate */ |
1036 | if (!list_empty(&hcrx->ccid3hcrx_li_hist)) | 1036 | if (!list_empty(&hcrx->ccid3hcrx_li_hist)) { |
1037 | u32 i_mean = dccp_li_hist_calc_i_mean(&hcrx->ccid3hcrx_li_hist); | ||
1038 | |||
1037 | /* Scaling up by 1000000 as fixed decimal */ | 1039 | /* Scaling up by 1000000 as fixed decimal */ |
1038 | hcrx->ccid3hcrx_p = 1000000 / dccp_li_hist_calc_i_mean(&hcrx->ccid3hcrx_li_hist); | 1040 | if (i_mean != 0) |
1041 | hcrx->ccid3hcrx_p = 1000000 / i_mean; | ||
1042 | } | ||
1039 | 1043 | ||
1040 | if (hcrx->ccid3hcrx_p > p_prev) { | 1044 | if (hcrx->ccid3hcrx_p > p_prev) { |
1041 | ccid3_hc_rx_send_feedback(sk); | 1045 | ccid3_hc_rx_send_feedback(sk); |
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index be97caf664bb..c164b230ad6f 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
@@ -246,7 +246,7 @@ static int do_ccw_entry(const char *filename, | |||
246 | id->cu_model); | 246 | id->cu_model); |
247 | ADD(alias, "dt", id->match_flags&CCW_DEVICE_ID_MATCH_DEVICE_TYPE, | 247 | ADD(alias, "dt", id->match_flags&CCW_DEVICE_ID_MATCH_DEVICE_TYPE, |
248 | id->dev_type); | 248 | id->dev_type); |
249 | ADD(alias, "dm", id->match_flags&CCW_DEVICE_ID_MATCH_DEVICE_TYPE, | 249 | ADD(alias, "dm", id->match_flags&CCW_DEVICE_ID_MATCH_DEVICE_MODEL, |
250 | id->dev_model); | 250 | id->dev_model); |
251 | return 1; | 251 | return 1; |
252 | } | 252 | } |
diff --git a/sound/core/control.c b/sound/core/control.c index abd62f943726..0c29679a8576 100644 --- a/sound/core/control.c +++ b/sound/core/control.c | |||
@@ -959,17 +959,15 @@ static int snd_ctl_elem_add(struct snd_ctl_file *file, | |||
959 | kctl.private_free = snd_ctl_elem_user_free; | 959 | kctl.private_free = snd_ctl_elem_user_free; |
960 | _kctl = snd_ctl_new(&kctl, access); | 960 | _kctl = snd_ctl_new(&kctl, access); |
961 | if (_kctl == NULL) { | 961 | if (_kctl == NULL) { |
962 | kfree(_kctl->private_data); | 962 | kfree(ue); |
963 | return -ENOMEM; | 963 | return -ENOMEM; |
964 | } | 964 | } |
965 | _kctl->private_data = ue; | 965 | _kctl->private_data = ue; |
966 | for (idx = 0; idx < _kctl->count; idx++) | 966 | for (idx = 0; idx < _kctl->count; idx++) |
967 | _kctl->vd[idx].owner = file; | 967 | _kctl->vd[idx].owner = file; |
968 | err = snd_ctl_add(card, _kctl); | 968 | err = snd_ctl_add(card, _kctl); |
969 | if (err < 0) { | 969 | if (err < 0) |
970 | snd_ctl_free_one(_kctl); | ||
971 | return err; | 970 | return err; |
972 | } | ||
973 | 971 | ||
974 | down_write(&card->controls_rwsem); | 972 | down_write(&card->controls_rwsem); |
975 | card->user_ctl_count++; | 973 | card->user_ctl_count++; |