diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-03-20 04:38:03 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-03-20 04:38:03 -0500 |
commit | d378aca6ec708bfb24df5c47801b1f2399efc481 (patch) | |
tree | 7535f96bf34314df071698d2e06054b8d5223ebb | |
parent | abc71c46dc0a12ab7fddc18cfe4f4aa26808c79b (diff) | |
parent | 7705a8792b0fc82fd7d4dd923724606bbfd9fb20 (diff) |
Merge branch 'master'
37 files changed, 332 insertions, 185 deletions
@@ -120,7 +120,6 @@ D: Author of lil (Linux Interrupt Latency benchmark) | |||
120 | D: Fixed the shm swap deallocation at swapoff time (try_to_unuse message) | 120 | D: Fixed the shm swap deallocation at swapoff time (try_to_unuse message) |
121 | D: VM hacker | 121 | D: VM hacker |
122 | D: Various other kernel hacks | 122 | D: Various other kernel hacks |
123 | S: Via Cicalini 26 | ||
124 | S: Imola 40026 | 123 | S: Imola 40026 |
125 | S: Italy | 124 | S: Italy |
126 | 125 | ||
diff --git a/MAINTAINERS b/MAINTAINERS index 3d7d30dc5439..8db5c339845d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -1752,7 +1752,8 @@ P: Ralf Baechle | |||
1752 | M: ralf@linux-mips.org | 1752 | M: ralf@linux-mips.org |
1753 | W: http://www.linux-mips.org/ | 1753 | W: http://www.linux-mips.org/ |
1754 | L: linux-mips@linux-mips.org | 1754 | L: linux-mips@linux-mips.org |
1755 | S: Maintained | 1755 | T: git www.linux-mips.org:/pub/scm/linux.git |
1756 | S: Supported | ||
1756 | 1757 | ||
1757 | MISCELLANEOUS MCA-SUPPORT | 1758 | MISCELLANEOUS MCA-SUPPORT |
1758 | P: James Bottomley | 1759 | P: James Bottomley |
@@ -1,7 +1,7 @@ | |||
1 | VERSION = 2 | 1 | VERSION = 2 |
2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
3 | SUBLEVEL = 16 | 3 | SUBLEVEL = 16 |
4 | EXTRAVERSION =-rc6 | 4 | EXTRAVERSION = |
5 | NAME=Sliding Snow Leopard | 5 | NAME=Sliding Snow Leopard |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index eba7f53f8b4a..7007e1783797 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -1029,6 +1029,16 @@ int __devinit smp_prepare_cpu(int cpu) | |||
1029 | int apicid, ret; | 1029 | int apicid, ret; |
1030 | 1030 | ||
1031 | lock_cpu_hotplug(); | 1031 | lock_cpu_hotplug(); |
1032 | |||
1033 | /* | ||
1034 | * On x86, CPU0 is never offlined. Trying to bring up an | ||
1035 | * already-booted CPU will hang. So check for that case. | ||
1036 | */ | ||
1037 | if (cpu_online(cpu)) { | ||
1038 | ret = -EINVAL; | ||
1039 | goto exit; | ||
1040 | } | ||
1041 | |||
1032 | apicid = x86_cpu_to_apicid[cpu]; | 1042 | apicid = x86_cpu_to_apicid[cpu]; |
1033 | if (apicid == BAD_APICID) { | 1043 | if (apicid == BAD_APICID) { |
1034 | ret = -ENODEV; | 1044 | ret = -ENODEV; |
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index fe9da16f3a40..3d8dac681c63 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -108,7 +108,8 @@ MODFLAGS += -mlong-calls | |||
108 | cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB) | 108 | cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB) |
109 | cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL) | 109 | cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL) |
110 | 110 | ||
111 | cflags-$(CONFIG_SB1XXX_CORELIS) += -mno-sched-prolog -fno-omit-frame-pointer | 111 | cflags-$(CONFIG_SB1XXX_CORELIS) += $(call cc-option,-mno-sched-prolog) \ |
112 | -fno-omit-frame-pointer | ||
112 | 113 | ||
113 | # | 114 | # |
114 | # Use: $(call set_gccflags,<cpu0>,<isa0>,<cpu1>,<isa1>,<isa2>) | 115 | # Use: $(call set_gccflags,<cpu0>,<isa0>,<cpu1>,<isa1>,<isa2>) |
diff --git a/arch/mips/arc/misc.c b/arch/mips/arc/misc.c index 84867de22028..b2e10b9e9452 100644 --- a/arch/mips/arc/misc.c +++ b/arch/mips/arc/misc.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * Copyright (C) 1999 Ralf Baechle (ralf@gnu.org) | 9 | * Copyright (C) 1999 Ralf Baechle (ralf@gnu.org) |
10 | * Copyright (C) 1999 Silicon Graphics, Inc. | 10 | * Copyright (C) 1999 Silicon Graphics, Inc. |
11 | */ | 11 | */ |
12 | #include <linux/config.h> | ||
13 | #include <linux/init.h> | 12 | #include <linux/init.h> |
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
15 | 14 | ||
@@ -20,17 +19,11 @@ | |||
20 | #include <asm/bootinfo.h> | 19 | #include <asm/bootinfo.h> |
21 | #include <asm/system.h> | 20 | #include <asm/system.h> |
22 | 21 | ||
23 | extern void *sgiwd93_host; | ||
24 | extern void reset_wd33c93(void *instance); | ||
25 | |||
26 | VOID | 22 | VOID |
27 | ArcHalt(VOID) | 23 | ArcHalt(VOID) |
28 | { | 24 | { |
29 | bc_disable(); | 25 | bc_disable(); |
30 | local_irq_disable(); | 26 | local_irq_disable(); |
31 | #ifdef CONFIG_SCSI_SGIWD93 | ||
32 | reset_wd33c93(sgiwd93_host); | ||
33 | #endif | ||
34 | ARC_CALL0(halt); | 27 | ARC_CALL0(halt); |
35 | never: goto never; | 28 | never: goto never; |
36 | } | 29 | } |
@@ -40,9 +33,6 @@ ArcPowerDown(VOID) | |||
40 | { | 33 | { |
41 | bc_disable(); | 34 | bc_disable(); |
42 | local_irq_disable(); | 35 | local_irq_disable(); |
43 | #ifdef CONFIG_SCSI_SGIWD93 | ||
44 | reset_wd33c93(sgiwd93_host); | ||
45 | #endif | ||
46 | ARC_CALL0(pdown); | 36 | ARC_CALL0(pdown); |
47 | never: goto never; | 37 | never: goto never; |
48 | } | 38 | } |
@@ -53,9 +43,6 @@ ArcRestart(VOID) | |||
53 | { | 43 | { |
54 | bc_disable(); | 44 | bc_disable(); |
55 | local_irq_disable(); | 45 | local_irq_disable(); |
56 | #ifdef CONFIG_SCSI_SGIWD93 | ||
57 | reset_wd33c93(sgiwd93_host); | ||
58 | #endif | ||
59 | ARC_CALL0(restart); | 46 | ARC_CALL0(restart); |
60 | never: goto never; | 47 | never: goto never; |
61 | } | 48 | } |
@@ -65,9 +52,6 @@ ArcReboot(VOID) | |||
65 | { | 52 | { |
66 | bc_disable(); | 53 | bc_disable(); |
67 | local_irq_disable(); | 54 | local_irq_disable(); |
68 | #ifdef CONFIG_SCSI_SGIWD93 | ||
69 | reset_wd33c93(sgiwd93_host); | ||
70 | #endif | ||
71 | ARC_CALL0(reboot); | 55 | ARC_CALL0(reboot); |
72 | never: goto never; | 56 | never: goto never; |
73 | } | 57 | } |
@@ -77,9 +61,6 @@ ArcEnterInteractiveMode(VOID) | |||
77 | { | 61 | { |
78 | bc_disable(); | 62 | bc_disable(); |
79 | local_irq_disable(); | 63 | local_irq_disable(); |
80 | #ifdef CONFIG_SCSI_SGIWD93 | ||
81 | reset_wd33c93(sgiwd93_host); | ||
82 | #endif | ||
83 | ARC_CALL0(imode); | 64 | ARC_CALL0(imode); |
84 | never: goto never; | 65 | never: goto never; |
85 | } | 66 | } |
diff --git a/arch/mips/au1000/common/reset.c b/arch/mips/au1000/common/reset.c index 4ffccedf5967..c93af224c1b3 100644 --- a/arch/mips/au1000/common/reset.c +++ b/arch/mips/au1000/common/reset.c | |||
@@ -164,17 +164,20 @@ void au1000_restart(char *command) | |||
164 | 164 | ||
165 | void au1000_halt(void) | 165 | void au1000_halt(void) |
166 | { | 166 | { |
167 | #if defined(CONFIG_MIPS_PB1550) | 167 | #if defined(CONFIG_MIPS_PB1550) || defined(CONFIG_MIPS_DB1550) |
168 | /* power off system */ | 168 | /* power off system */ |
169 | printk("\n** Powering off Pb1550\n"); | 169 | printk("\n** Powering off...\n"); |
170 | au_writew(au_readw(0xAF00001C) | (3<<14), 0xAF00001C); | 170 | au_writew(au_readw(0xAF00001C) | (3<<14), 0xAF00001C); |
171 | au_sync(); | 171 | au_sync(); |
172 | while(1); /* should not get here */ | 172 | while(1); /* should not get here */ |
173 | #endif | 173 | #else |
174 | printk(KERN_NOTICE "\n** You can safely turn off the power\n"); | 174 | printk(KERN_NOTICE "\n** You can safely turn off the power\n"); |
175 | #ifdef CONFIG_MIPS_MIRAGE | 175 | #ifdef CONFIG_MIPS_MIRAGE |
176 | au_writel((1 << 26) | (1 << 10), GPIO2_OUTPUT); | 176 | au_writel((1 << 26) | (1 << 10), GPIO2_OUTPUT); |
177 | #endif | 177 | #endif |
178 | #ifdef CONFIG_MIPS_DB1200 | ||
179 | au_writew(au_readw(0xB980001C) | (1<<14), 0xB980001C); | ||
180 | #endif | ||
178 | #ifdef CONFIG_PM | 181 | #ifdef CONFIG_PM |
179 | au_sleep(); | 182 | au_sleep(); |
180 | 183 | ||
@@ -187,6 +190,7 @@ void au1000_halt(void) | |||
187 | "wait\n\t" | 190 | "wait\n\t" |
188 | ".set\tmips0"); | 191 | ".set\tmips0"); |
189 | #endif | 192 | #endif |
193 | #endif /* defined(CONFIG_MIPS_PB1550) || defined(CONFIG_MIPS_DB1550) */ | ||
190 | } | 194 | } |
191 | 195 | ||
192 | void au1000_power_off(void) | 196 | void au1000_power_off(void) |
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index 42c94c771afb..51273b7297a7 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c | |||
@@ -424,6 +424,8 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
424 | unsigned long j; | 424 | unsigned long j; |
425 | unsigned int count; | 425 | unsigned int count; |
426 | 426 | ||
427 | write_seqlock(&xtime_lock); | ||
428 | |||
427 | count = mips_hpt_read(); | 429 | count = mips_hpt_read(); |
428 | mips_timer_ack(); | 430 | mips_timer_ack(); |
429 | 431 | ||
@@ -441,7 +443,6 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
441 | * CMOS clock accordingly every ~11 minutes. rtc_set_time() has to be | 443 | * CMOS clock accordingly every ~11 minutes. rtc_set_time() has to be |
442 | * called as close as possible to 500 ms before the new second starts. | 444 | * called as close as possible to 500 ms before the new second starts. |
443 | */ | 445 | */ |
444 | write_seqlock(&xtime_lock); | ||
445 | if (ntp_synced() && | 446 | if (ntp_synced() && |
446 | xtime.tv_sec > last_rtc_update + 660 && | 447 | xtime.tv_sec > last_rtc_update + 660 && |
447 | (xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 && | 448 | (xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 && |
@@ -453,7 +454,6 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
453 | last_rtc_update = xtime.tv_sec - 600; | 454 | last_rtc_update = xtime.tv_sec - 600; |
454 | } | 455 | } |
455 | } | 456 | } |
456 | write_sequnlock(&xtime_lock); | ||
457 | 457 | ||
458 | /* | 458 | /* |
459 | * If jiffies has overflown in this timer_interrupt, we must | 459 | * If jiffies has overflown in this timer_interrupt, we must |
@@ -496,6 +496,8 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
496 | } | 496 | } |
497 | } | 497 | } |
498 | 498 | ||
499 | write_sequnlock(&xtime_lock); | ||
500 | |||
499 | /* | 501 | /* |
500 | * In UP mode, we call local_timer_interrupt() to do profiling | 502 | * In UP mode, we call local_timer_interrupt() to do profiling |
501 | * and process accouting. | 503 | * and process accouting. |
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index 0668e9bfce41..9572ed44f0d5 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c | |||
@@ -375,6 +375,7 @@ static void r4k_flush_cache_mm(struct mm_struct *mm) | |||
375 | struct flush_cache_page_args { | 375 | struct flush_cache_page_args { |
376 | struct vm_area_struct *vma; | 376 | struct vm_area_struct *vma; |
377 | unsigned long addr; | 377 | unsigned long addr; |
378 | unsigned long pfn; | ||
378 | }; | 379 | }; |
379 | 380 | ||
380 | static inline void local_r4k_flush_cache_page(void *args) | 381 | static inline void local_r4k_flush_cache_page(void *args) |
@@ -382,6 +383,7 @@ static inline void local_r4k_flush_cache_page(void *args) | |||
382 | struct flush_cache_page_args *fcp_args = args; | 383 | struct flush_cache_page_args *fcp_args = args; |
383 | struct vm_area_struct *vma = fcp_args->vma; | 384 | struct vm_area_struct *vma = fcp_args->vma; |
384 | unsigned long addr = fcp_args->addr; | 385 | unsigned long addr = fcp_args->addr; |
386 | unsigned long paddr = fcp_args->pfn << PAGE_SHIFT; | ||
385 | int exec = vma->vm_flags & VM_EXEC; | 387 | int exec = vma->vm_flags & VM_EXEC; |
386 | struct mm_struct *mm = vma->vm_mm; | 388 | struct mm_struct *mm = vma->vm_mm; |
387 | pgd_t *pgdp; | 389 | pgd_t *pgdp; |
@@ -431,11 +433,12 @@ static inline void local_r4k_flush_cache_page(void *args) | |||
431 | * Do indexed flush, too much work to get the (possible) TLB refills | 433 | * Do indexed flush, too much work to get the (possible) TLB refills |
432 | * to work correctly. | 434 | * to work correctly. |
433 | */ | 435 | */ |
434 | addr = INDEX_BASE + (addr & (dcache_size - 1)); | ||
435 | if (cpu_has_dc_aliases || (exec && !cpu_has_ic_fills_f_dc)) { | 436 | if (cpu_has_dc_aliases || (exec && !cpu_has_ic_fills_f_dc)) { |
436 | r4k_blast_dcache_page_indexed(addr); | 437 | r4k_blast_dcache_page_indexed(cpu_has_pindexed_dcache ? |
437 | if (exec && !cpu_icache_snoops_remote_store) | 438 | paddr : addr); |
438 | r4k_blast_scache_page_indexed(addr); | 439 | if (exec && !cpu_icache_snoops_remote_store) { |
440 | r4k_blast_scache_page_indexed(paddr); | ||
441 | } | ||
439 | } | 442 | } |
440 | if (exec) { | 443 | if (exec) { |
441 | if (cpu_has_vtag_icache) { | 444 | if (cpu_has_vtag_icache) { |
@@ -455,6 +458,7 @@ static void r4k_flush_cache_page(struct vm_area_struct *vma, | |||
455 | 458 | ||
456 | args.vma = vma; | 459 | args.vma = vma; |
457 | args.addr = addr; | 460 | args.addr = addr; |
461 | args.pfn = pfn; | ||
458 | 462 | ||
459 | on_each_cpu(local_r4k_flush_cache_page, &args, 1, 1); | 463 | on_each_cpu(local_r4k_flush_cache_page, &args, 1, 1); |
460 | } | 464 | } |
@@ -956,6 +960,7 @@ static void __init probe_pcache(void) | |||
956 | switch (c->cputype) { | 960 | switch (c->cputype) { |
957 | case CPU_20KC: | 961 | case CPU_20KC: |
958 | case CPU_25KF: | 962 | case CPU_25KF: |
963 | c->dcache.flags |= MIPS_CACHE_PINDEX; | ||
959 | case CPU_R10000: | 964 | case CPU_R10000: |
960 | case CPU_R12000: | 965 | case CPU_R12000: |
961 | case CPU_SB1: | 966 | case CPU_SB1: |
diff --git a/arch/mips/mm/c-tx39.c b/arch/mips/mm/c-tx39.c index 7c572bea4a98..fe232e3988e3 100644 --- a/arch/mips/mm/c-tx39.c +++ b/arch/mips/mm/c-tx39.c | |||
@@ -210,7 +210,6 @@ static void tx39_flush_cache_page(struct vm_area_struct *vma, unsigned long page | |||
210 | * Do indexed flush, too much work to get the (possible) TLB refills | 210 | * Do indexed flush, too much work to get the (possible) TLB refills |
211 | * to work correctly. | 211 | * to work correctly. |
212 | */ | 212 | */ |
213 | page = (KSEG0 + (page & (dcache_size - 1))); | ||
214 | if (cpu_has_dc_aliases || exec) | 213 | if (cpu_has_dc_aliases || exec) |
215 | tx39_blast_dcache_page_indexed(page); | 214 | tx39_blast_dcache_page_indexed(page); |
216 | if (exec) | 215 | if (exec) |
diff --git a/arch/mips/sibyte/sb1250/time.c b/arch/mips/sibyte/sb1250/time.c index 511c89d65f38..1588f6debd90 100644 --- a/arch/mips/sibyte/sb1250/time.c +++ b/arch/mips/sibyte/sb1250/time.c | |||
@@ -47,23 +47,51 @@ | |||
47 | #define IMR_IP3_VAL K_INT_MAP_I1 | 47 | #define IMR_IP3_VAL K_INT_MAP_I1 |
48 | #define IMR_IP4_VAL K_INT_MAP_I2 | 48 | #define IMR_IP4_VAL K_INT_MAP_I2 |
49 | 49 | ||
50 | #define SB1250_HPT_NUM 3 | ||
51 | #define SB1250_HPT_VALUE M_SCD_TIMER_CNT /* max value */ | ||
52 | #define SB1250_HPT_SHIFT ((sizeof(unsigned int)*8)-V_SCD_TIMER_WIDTH) | ||
53 | |||
54 | |||
50 | extern int sb1250_steal_irq(int irq); | 55 | extern int sb1250_steal_irq(int irq); |
51 | 56 | ||
57 | static unsigned int sb1250_hpt_read(void); | ||
58 | static void sb1250_hpt_init(unsigned int); | ||
59 | |||
60 | static unsigned int hpt_offset; | ||
61 | |||
62 | void __init sb1250_hpt_setup(void) | ||
63 | { | ||
64 | int cpu = smp_processor_id(); | ||
65 | |||
66 | if (!cpu) { | ||
67 | /* Setup hpt using timer #3 but do not enable irq for it */ | ||
68 | __raw_writeq(0, IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM, R_SCD_TIMER_CFG))); | ||
69 | __raw_writeq(SB1250_HPT_VALUE, | ||
70 | IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM, R_SCD_TIMER_INIT))); | ||
71 | __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS, | ||
72 | IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM, R_SCD_TIMER_CFG))); | ||
73 | |||
74 | /* | ||
75 | * we need to fill 32 bits, so just use the upper 23 bits and pretend | ||
76 | * the timer is going 512Mhz instead of 1Mhz | ||
77 | */ | ||
78 | mips_hpt_frequency = V_SCD_TIMER_FREQ << SB1250_HPT_SHIFT; | ||
79 | mips_hpt_init = sb1250_hpt_init; | ||
80 | mips_hpt_read = sb1250_hpt_read; | ||
81 | } | ||
82 | } | ||
83 | |||
84 | |||
52 | void sb1250_time_init(void) | 85 | void sb1250_time_init(void) |
53 | { | 86 | { |
54 | int cpu = smp_processor_id(); | 87 | int cpu = smp_processor_id(); |
55 | int irq = K_INT_TIMER_0+cpu; | 88 | int irq = K_INT_TIMER_0+cpu; |
56 | 89 | ||
57 | /* Only have 4 general purpose timers */ | 90 | /* Only have 4 general purpose timers, and we use last one as hpt */ |
58 | if (cpu > 3) { | 91 | if (cpu > 2) { |
59 | BUG(); | 92 | BUG(); |
60 | } | 93 | } |
61 | 94 | ||
62 | if (!cpu) { | ||
63 | /* Use our own gettimeoffset() routine */ | ||
64 | do_gettimeoffset = sb1250_gettimeoffset; | ||
65 | } | ||
66 | |||
67 | sb1250_mask_irq(cpu, irq); | 95 | sb1250_mask_irq(cpu, irq); |
68 | 96 | ||
69 | /* Map the timer interrupt to ip[4] of this cpu */ | 97 | /* Map the timer interrupt to ip[4] of this cpu */ |
@@ -75,10 +103,10 @@ void sb1250_time_init(void) | |||
75 | /* Disable the timer and set up the count */ | 103 | /* Disable the timer and set up the count */ |
76 | __raw_writeq(0, IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG))); | 104 | __raw_writeq(0, IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG))); |
77 | #ifdef CONFIG_SIMULATION | 105 | #ifdef CONFIG_SIMULATION |
78 | __raw_writeq(50000 / HZ, | 106 | __raw_writeq((50000 / HZ) - 1, |
79 | IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT))); | 107 | IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT))); |
80 | #else | 108 | #else |
81 | __raw_writeq(1000000 / HZ, | 109 | __raw_writeq((V_SCD_TIMER_FREQ / HZ) - 1, |
82 | IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT))); | 110 | IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT))); |
83 | #endif | 111 | #endif |
84 | 112 | ||
@@ -103,7 +131,7 @@ void sb1250_timer_interrupt(struct pt_regs *regs) | |||
103 | int cpu = smp_processor_id(); | 131 | int cpu = smp_processor_id(); |
104 | int irq = K_INT_TIMER_0 + cpu; | 132 | int irq = K_INT_TIMER_0 + cpu; |
105 | 133 | ||
106 | /* Reset the timer */ | 134 | /* ACK interrupt */ |
107 | ____raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS, | 135 | ____raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS, |
108 | IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG))); | 136 | IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG))); |
109 | 137 | ||
@@ -122,15 +150,26 @@ void sb1250_timer_interrupt(struct pt_regs *regs) | |||
122 | } | 150 | } |
123 | 151 | ||
124 | /* | 152 | /* |
125 | * We use our own do_gettimeoffset() instead of the generic one, | 153 | * The HPT is free running from SB1250_HPT_VALUE down to 0 then starts over |
126 | * because the generic one does not work for SMP case. | 154 | * again. There's no easy way to set to a specific value so store init value |
127 | * In addition, since we use general timer 0 for system time, | 155 | * in hpt_offset and subtract each time. |
128 | * we can get accurate intra-jiffy offset without calibration. | 156 | * |
157 | * Note: Timer isn't full 32bits so shift it into the upper part making | ||
158 | * it appear to run at a higher frequency. | ||
129 | */ | 159 | */ |
130 | unsigned long sb1250_gettimeoffset(void) | 160 | static unsigned int sb1250_hpt_read(void) |
131 | { | 161 | { |
132 | unsigned long count = | 162 | unsigned int count; |
133 | __raw_readq(IOADDR(A_SCD_TIMER_REGISTER(0, R_SCD_TIMER_CNT))); | ||
134 | 163 | ||
135 | return 1000000/HZ - count; | 164 | count = G_SCD_TIMER_CNT(__raw_readq(IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM, R_SCD_TIMER_CNT)))); |
136 | } | 165 | |
166 | count = (SB1250_HPT_VALUE - count) << SB1250_HPT_SHIFT; | ||
167 | |||
168 | return count - hpt_offset; | ||
169 | } | ||
170 | |||
171 | static void sb1250_hpt_init(unsigned int count) | ||
172 | { | ||
173 | hpt_offset = count; | ||
174 | return; | ||
175 | } | ||
diff --git a/arch/mips/sibyte/swarm/setup.c b/arch/mips/sibyte/swarm/setup.c index b614ca0ddb69..b661d2425a36 100644 --- a/arch/mips/sibyte/swarm/setup.c +++ b/arch/mips/sibyte/swarm/setup.c | |||
@@ -70,6 +70,12 @@ const char *get_system_type(void) | |||
70 | return "SiByte " SIBYTE_BOARD_NAME; | 70 | return "SiByte " SIBYTE_BOARD_NAME; |
71 | } | 71 | } |
72 | 72 | ||
73 | void __init swarm_time_init(void) | ||
74 | { | ||
75 | /* Setup HPT */ | ||
76 | sb1250_hpt_setup(); | ||
77 | } | ||
78 | |||
73 | void __init swarm_timer_setup(struct irqaction *irq) | 79 | void __init swarm_timer_setup(struct irqaction *irq) |
74 | { | 80 | { |
75 | /* | 81 | /* |
@@ -109,6 +115,7 @@ void __init plat_setup(void) | |||
109 | 115 | ||
110 | panic_timeout = 5; /* For debug. */ | 116 | panic_timeout = 5; /* For debug. */ |
111 | 117 | ||
118 | board_time_init = swarm_time_init; | ||
112 | board_timer_setup = swarm_timer_setup; | 119 | board_timer_setup = swarm_timer_setup; |
113 | board_be_handler = swarm_be_handler; | 120 | board_be_handler = swarm_be_handler; |
114 | 121 | ||
diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c index ab89278a56bf..697aacafb02a 100644 --- a/drivers/md/dm-stripe.c +++ b/drivers/md/dm-stripe.c | |||
@@ -103,9 +103,15 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
103 | return -EINVAL; | 103 | return -EINVAL; |
104 | } | 104 | } |
105 | 105 | ||
106 | if (((uint32_t)ti->len) & (chunk_size - 1)) { | ||
107 | ti->error = "dm-stripe: Target length not divisible by " | ||
108 | "chunk size"; | ||
109 | return -EINVAL; | ||
110 | } | ||
111 | |||
106 | width = ti->len; | 112 | width = ti->len; |
107 | if (sector_div(width, stripes)) { | 113 | if (sector_div(width, stripes)) { |
108 | ti->error = "dm-stripe: Target length not divisable by " | 114 | ti->error = "dm-stripe: Target length not divisible by " |
109 | "number of stripes"; | 115 | "number of stripes"; |
110 | return -EINVAL; | 116 | return -EINVAL; |
111 | } | 117 | } |
diff --git a/drivers/media/video/cx88/Kconfig b/drivers/media/video/cx88/Kconfig index e99dfbbf3e95..87d79df05336 100644 --- a/drivers/media/video/cx88/Kconfig +++ b/drivers/media/video/cx88/Kconfig | |||
@@ -15,20 +15,6 @@ config VIDEO_CX88 | |||
15 | To compile this driver as a module, choose M here: the | 15 | To compile this driver as a module, choose M here: the |
16 | module will be called cx8800 | 16 | module will be called cx8800 |
17 | 17 | ||
18 | config VIDEO_CX88_DVB | ||
19 | tristate "DVB/ATSC Support for cx2388x based TV cards" | ||
20 | depends on VIDEO_CX88 && DVB_CORE | ||
21 | select VIDEO_BUF_DVB | ||
22 | ---help--- | ||
23 | This adds support for DVB/ATSC cards based on the | ||
24 | Connexant 2388x chip. | ||
25 | |||
26 | To compile this driver as a module, choose M here: the | ||
27 | module will be called cx88-dvb. | ||
28 | |||
29 | You must also select one or more DVB/ATSC demodulators. | ||
30 | If you are unsure which you need, choose all of them. | ||
31 | |||
32 | config VIDEO_CX88_ALSA | 18 | config VIDEO_CX88_ALSA |
33 | tristate "ALSA DMA audio support" | 19 | tristate "ALSA DMA audio support" |
34 | depends on VIDEO_CX88 && SND && EXPERIMENTAL | 20 | depends on VIDEO_CX88 && SND && EXPERIMENTAL |
@@ -44,6 +30,20 @@ config VIDEO_CX88_ALSA | |||
44 | To compile this driver as a module, choose M here: the | 30 | To compile this driver as a module, choose M here: the |
45 | module will be called cx88-alsa. | 31 | module will be called cx88-alsa. |
46 | 32 | ||
33 | config VIDEO_CX88_DVB | ||
34 | tristate "DVB/ATSC Support for cx2388x based TV cards" | ||
35 | depends on VIDEO_CX88 && DVB_CORE | ||
36 | select VIDEO_BUF_DVB | ||
37 | ---help--- | ||
38 | This adds support for DVB/ATSC cards based on the | ||
39 | Connexant 2388x chip. | ||
40 | |||
41 | To compile this driver as a module, choose M here: the | ||
42 | module will be called cx88-dvb. | ||
43 | |||
44 | You must also select one or more DVB/ATSC demodulators. | ||
45 | If you are unsure which you need, choose all of them. | ||
46 | |||
47 | config VIDEO_CX88_DVB_ALL_FRONTENDS | 47 | config VIDEO_CX88_DVB_ALL_FRONTENDS |
48 | bool "Build all supported frontends for cx2388x based TV cards" | 48 | bool "Build all supported frontends for cx2388x based TV cards" |
49 | default y | 49 | default y |
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index 94a14a2bb6d6..5b267808a9d4 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c | |||
@@ -367,6 +367,9 @@ static int em28xx_v4l2_open(struct inode *inode, struct file *filp) | |||
367 | em28xx_capture_start(dev, 1); | 367 | em28xx_capture_start(dev, 1); |
368 | em28xx_resolution_set(dev); | 368 | em28xx_resolution_set(dev); |
369 | 369 | ||
370 | /* device needs to be initialized before isoc transfer */ | ||
371 | video_mux(dev, 0); | ||
372 | |||
370 | /* start the transfer */ | 373 | /* start the transfer */ |
371 | errCode = em28xx_init_isoc(dev); | 374 | errCode = em28xx_init_isoc(dev); |
372 | if (errCode) | 375 | if (errCode) |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index c0878f304e54..bd49b25fba6b 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -9552,12 +9552,36 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
9552 | } | 9552 | } |
9553 | } | 9553 | } |
9554 | 9554 | ||
9555 | /* Find msi capability. */ | 9555 | /* The EPB bridge inside 5714, 5715, and 5780 cannot support |
9556 | * DMA addresses > 40-bit. This bridge may have other additional | ||
9557 | * 57xx devices behind it in some 4-port NIC designs for example. | ||
9558 | * Any tg3 device found behind the bridge will also need the 40-bit | ||
9559 | * DMA workaround. | ||
9560 | */ | ||
9556 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5780 || | 9561 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5780 || |
9557 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5714) { | 9562 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5714) { |
9558 | tp->tg3_flags2 |= TG3_FLG2_5780_CLASS; | 9563 | tp->tg3_flags2 |= TG3_FLG2_5780_CLASS; |
9564 | tp->tg3_flags |= TG3_FLAG_40BIT_DMA_BUG; | ||
9559 | tp->msi_cap = pci_find_capability(tp->pdev, PCI_CAP_ID_MSI); | 9565 | tp->msi_cap = pci_find_capability(tp->pdev, PCI_CAP_ID_MSI); |
9560 | } | 9566 | } |
9567 | else { | ||
9568 | struct pci_dev *bridge = NULL; | ||
9569 | |||
9570 | do { | ||
9571 | bridge = pci_get_device(PCI_VENDOR_ID_SERVERWORKS, | ||
9572 | PCI_DEVICE_ID_SERVERWORKS_EPB, | ||
9573 | bridge); | ||
9574 | if (bridge && bridge->subordinate && | ||
9575 | (bridge->subordinate->number <= | ||
9576 | tp->pdev->bus->number) && | ||
9577 | (bridge->subordinate->subordinate >= | ||
9578 | tp->pdev->bus->number)) { | ||
9579 | tp->tg3_flags |= TG3_FLAG_40BIT_DMA_BUG; | ||
9580 | pci_dev_put(bridge); | ||
9581 | break; | ||
9582 | } | ||
9583 | } while (bridge); | ||
9584 | } | ||
9561 | 9585 | ||
9562 | /* Initialize misc host control in PCI block. */ | 9586 | /* Initialize misc host control in PCI block. */ |
9563 | tp->misc_host_ctrl |= (misc_ctrl_reg & | 9587 | tp->misc_host_ctrl |= (misc_ctrl_reg & |
@@ -10303,7 +10327,14 @@ static int __devinit tg3_test_dma(struct tg3 *tp) | |||
10303 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) { | 10327 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) { |
10304 | u32 ccval = (tr32(TG3PCI_CLOCK_CTRL) & 0x1f); | 10328 | u32 ccval = (tr32(TG3PCI_CLOCK_CTRL) & 0x1f); |
10305 | 10329 | ||
10306 | if (ccval == 0x6 || ccval == 0x7) | 10330 | /* If the 5704 is behind the EPB bridge, we can |
10331 | * do the less restrictive ONE_DMA workaround for | ||
10332 | * better performance. | ||
10333 | */ | ||
10334 | if ((tp->tg3_flags & TG3_FLAG_40BIT_DMA_BUG) && | ||
10335 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) | ||
10336 | tp->dma_rwctrl |= 0x8000; | ||
10337 | else if (ccval == 0x6 || ccval == 0x7) | ||
10307 | tp->dma_rwctrl |= DMA_RWCTRL_ONE_DMA; | 10338 | tp->dma_rwctrl |= DMA_RWCTRL_ONE_DMA; |
10308 | 10339 | ||
10309 | /* Set bit 23 to enable PCIX hw bug fix */ | 10340 | /* Set bit 23 to enable PCIX hw bug fix */ |
@@ -10759,19 +10790,20 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
10759 | goto err_out_iounmap; | 10790 | goto err_out_iounmap; |
10760 | } | 10791 | } |
10761 | 10792 | ||
10762 | /* 5714, 5715 and 5780 cannot support DMA addresses > 40-bit. | 10793 | /* The EPB bridge inside 5714, 5715, and 5780 and any |
10794 | * device behind the EPB cannot support DMA addresses > 40-bit. | ||
10763 | * On 64-bit systems with IOMMU, use 40-bit dma_mask. | 10795 | * On 64-bit systems with IOMMU, use 40-bit dma_mask. |
10764 | * On 64-bit systems without IOMMU, use 64-bit dma_mask and | 10796 | * On 64-bit systems without IOMMU, use 64-bit dma_mask and |
10765 | * do DMA address check in tg3_start_xmit(). | 10797 | * do DMA address check in tg3_start_xmit(). |
10766 | */ | 10798 | */ |
10767 | if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) { | 10799 | if (tp->tg3_flags2 & TG3_FLG2_IS_5788) |
10800 | persist_dma_mask = dma_mask = DMA_32BIT_MASK; | ||
10801 | else if (tp->tg3_flags & TG3_FLAG_40BIT_DMA_BUG) { | ||
10768 | persist_dma_mask = dma_mask = DMA_40BIT_MASK; | 10802 | persist_dma_mask = dma_mask = DMA_40BIT_MASK; |
10769 | #ifdef CONFIG_HIGHMEM | 10803 | #ifdef CONFIG_HIGHMEM |
10770 | dma_mask = DMA_64BIT_MASK; | 10804 | dma_mask = DMA_64BIT_MASK; |
10771 | #endif | 10805 | #endif |
10772 | } else if (tp->tg3_flags2 & TG3_FLG2_IS_5788) | 10806 | } else |
10773 | persist_dma_mask = dma_mask = DMA_32BIT_MASK; | ||
10774 | else | ||
10775 | persist_dma_mask = dma_mask = DMA_64BIT_MASK; | 10807 | persist_dma_mask = dma_mask = DMA_64BIT_MASK; |
10776 | 10808 | ||
10777 | /* Configure DMA attributes. */ | 10809 | /* Configure DMA attributes. */ |
@@ -10908,8 +10940,10 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
10908 | (tp->tg3_flags & TG3_FLAG_SPLIT_MODE) != 0, | 10940 | (tp->tg3_flags & TG3_FLAG_SPLIT_MODE) != 0, |
10909 | (tp->tg3_flags2 & TG3_FLG2_NO_ETH_WIRE_SPEED) == 0, | 10941 | (tp->tg3_flags2 & TG3_FLG2_NO_ETH_WIRE_SPEED) == 0, |
10910 | (tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE) != 0); | 10942 | (tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE) != 0); |
10911 | printk(KERN_INFO "%s: dma_rwctrl[%08x]\n", | 10943 | printk(KERN_INFO "%s: dma_rwctrl[%08x] dma_mask[%d-bit]\n", |
10912 | dev->name, tp->dma_rwctrl); | 10944 | dev->name, tp->dma_rwctrl, |
10945 | (pdev->dma_mask == DMA_32BIT_MASK) ? 32 : | ||
10946 | (((u64) pdev->dma_mask == DMA_40BIT_MASK) ? 40 : 64)); | ||
10913 | 10947 | ||
10914 | return 0; | 10948 | return 0; |
10915 | 10949 | ||
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index 7f4b7f6ac40d..7e3b613afb29 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -2163,6 +2163,7 @@ struct tg3 { | |||
2163 | #define TG3_FLAG_10_100_ONLY 0x01000000 | 2163 | #define TG3_FLAG_10_100_ONLY 0x01000000 |
2164 | #define TG3_FLAG_PAUSE_AUTONEG 0x02000000 | 2164 | #define TG3_FLAG_PAUSE_AUTONEG 0x02000000 |
2165 | #define TG3_FLAG_IN_RESET_TASK 0x04000000 | 2165 | #define TG3_FLAG_IN_RESET_TASK 0x04000000 |
2166 | #define TG3_FLAG_40BIT_DMA_BUG 0x08000000 | ||
2166 | #define TG3_FLAG_BROKEN_CHECKSUMS 0x10000000 | 2167 | #define TG3_FLAG_BROKEN_CHECKSUMS 0x10000000 |
2167 | #define TG3_FLAG_GOT_SERDES_FLOWCTL 0x20000000 | 2168 | #define TG3_FLAG_GOT_SERDES_FLOWCTL 0x20000000 |
2168 | #define TG3_FLAG_SPLIT_MODE 0x40000000 | 2169 | #define TG3_FLAG_SPLIT_MODE 0x40000000 |
diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c index ae6d032b9b59..cd5eeb032d64 100644 --- a/fs/9p/vfs_dir.c +++ b/fs/9p/vfs_dir.c | |||
@@ -202,7 +202,6 @@ int v9fs_dir_release(struct inode *inode, struct file *filp) | |||
202 | filp->private_data = NULL; | 202 | filp->private_data = NULL; |
203 | } | 203 | } |
204 | 204 | ||
205 | d_drop(filp->f_dentry); | ||
206 | return 0; | 205 | return 0; |
207 | } | 206 | } |
208 | 207 | ||
diff --git a/fs/nfsctl.c b/fs/nfsctl.c index 0d4cf9486068..1c72c7f85ddc 100644 --- a/fs/nfsctl.c +++ b/fs/nfsctl.c | |||
@@ -98,10 +98,8 @@ asmlinkage sys_nfsservctl(int cmd, struct nfsctl_arg __user *arg, void __user *r | |||
98 | if (copy_from_user(&version, &arg->ca_version, sizeof(int))) | 98 | if (copy_from_user(&version, &arg->ca_version, sizeof(int))) |
99 | return -EFAULT; | 99 | return -EFAULT; |
100 | 100 | ||
101 | if (version != NFSCTL_VERSION) { | 101 | if (version != NFSCTL_VERSION) |
102 | printk(KERN_WARNING "nfsd: incompatible version in syscall.\n"); | ||
103 | return -EINVAL; | 102 | return -EINVAL; |
104 | } | ||
105 | 103 | ||
106 | if (cmd < 0 || cmd >= sizeof(map)/sizeof(map[0]) || !map[cmd].name) | 104 | if (cmd < 0 || cmd >= sizeof(map)/sizeof(map[0]) || !map[cmd].name) |
107 | return -EINVAL; | 105 | return -EINVAL; |
diff --git a/include/asm-mips/cpu-features.h b/include/asm-mips/cpu-features.h index 78c9cc2735d5..3f2b6d9ac45e 100644 --- a/include/asm-mips/cpu-features.h +++ b/include/asm-mips/cpu-features.h | |||
@@ -96,6 +96,9 @@ | |||
96 | #ifndef cpu_has_ic_fills_f_dc | 96 | #ifndef cpu_has_ic_fills_f_dc |
97 | #define cpu_has_ic_fills_f_dc (cpu_data[0].icache.flags & MIPS_CACHE_IC_F_DC) | 97 | #define cpu_has_ic_fills_f_dc (cpu_data[0].icache.flags & MIPS_CACHE_IC_F_DC) |
98 | #endif | 98 | #endif |
99 | #ifndef cpu_has_pindexed_dcache | ||
100 | #define cpu_has_pindexed_dcache (cpu_data[0].dcache.flags & MIPS_CACHE_PINDEX) | ||
101 | #endif | ||
99 | 102 | ||
100 | /* | 103 | /* |
101 | * I-Cache snoops remote store. This only matters on SMP. Some multiprocessors | 104 | * I-Cache snoops remote store. This only matters on SMP. Some multiprocessors |
diff --git a/include/asm-mips/cpu-info.h b/include/asm-mips/cpu-info.h index d5cf519f8fcc..140be1c67da7 100644 --- a/include/asm-mips/cpu-info.h +++ b/include/asm-mips/cpu-info.h | |||
@@ -39,6 +39,7 @@ struct cache_desc { | |||
39 | #define MIPS_CACHE_ALIASES 0x00000004 /* Cache could have aliases */ | 39 | #define MIPS_CACHE_ALIASES 0x00000004 /* Cache could have aliases */ |
40 | #define MIPS_CACHE_IC_F_DC 0x00000008 /* Ic can refill from D-cache */ | 40 | #define MIPS_CACHE_IC_F_DC 0x00000008 /* Ic can refill from D-cache */ |
41 | #define MIPS_IC_SNOOPS_REMOTE 0x00000010 /* Ic snoops remote stores */ | 41 | #define MIPS_IC_SNOOPS_REMOTE 0x00000010 /* Ic snoops remote stores */ |
42 | #define MIPS_CACHE_PINDEX 0x00000020 /* Physically indexed cache */ | ||
42 | 43 | ||
43 | struct cpuinfo_mips { | 44 | struct cpuinfo_mips { |
44 | unsigned long udelay_val; | 45 | unsigned long udelay_val; |
diff --git a/include/asm-mips/hazards.h b/include/asm-mips/hazards.h index 6111a0ce58c4..feb29a793888 100644 --- a/include/asm-mips/hazards.h +++ b/include/asm-mips/hazards.h | |||
@@ -3,7 +3,9 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2003, 2004 Ralf Baechle | 6 | * Copyright (C) 2003, 2004 Ralf Baechle <ralf@linux-mips.org> |
7 | * Copyright (C) MIPS Technologies, Inc. | ||
8 | * written by Ralf Baechle <ralf@linux-mips.org> | ||
7 | */ | 9 | */ |
8 | #ifndef _ASM_HAZARDS_H | 10 | #ifndef _ASM_HAZARDS_H |
9 | #define _ASM_HAZARDS_H | 11 | #define _ASM_HAZARDS_H |
@@ -74,8 +76,7 @@ | |||
74 | #define irq_disable_hazard | 76 | #define irq_disable_hazard |
75 | _ehb | 77 | _ehb |
76 | 78 | ||
77 | #elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000) || \ | 79 | #elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000) |
78 | defined(CONFIG_CPU_SB1) | ||
79 | 80 | ||
80 | /* | 81 | /* |
81 | * R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer. | 82 | * R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer. |
@@ -99,13 +100,13 @@ | |||
99 | #else /* __ASSEMBLY__ */ | 100 | #else /* __ASSEMBLY__ */ |
100 | 101 | ||
101 | __asm__( | 102 | __asm__( |
102 | " .macro _ssnop \n\t" | 103 | " .macro _ssnop \n" |
103 | " sll $0, $0, 1 \n\t" | 104 | " sll $0, $0, 1 \n" |
104 | " .endm \n\t" | 105 | " .endm \n" |
105 | " \n\t" | 106 | " \n" |
106 | " .macro _ehb \n\t" | 107 | " .macro _ehb \n" |
107 | " sll $0, $0, 3 \n\t" | 108 | " sll $0, $0, 3 \n" |
108 | " .endm \n\t"); | 109 | " .endm \n"); |
109 | 110 | ||
110 | #ifdef CONFIG_CPU_RM9000 | 111 | #ifdef CONFIG_CPU_RM9000 |
111 | 112 | ||
@@ -117,17 +118,21 @@ __asm__( | |||
117 | 118 | ||
118 | #define mtc0_tlbw_hazard() \ | 119 | #define mtc0_tlbw_hazard() \ |
119 | __asm__ __volatile__( \ | 120 | __asm__ __volatile__( \ |
120 | ".set\tmips32\n\t" \ | 121 | " .set mips32 \n" \ |
121 | "_ssnop; _ssnop; _ssnop; _ssnop\n\t" \ | 122 | " _ssnop \n" \ |
122 | ".set\tmips0") | 123 | " _ssnop \n" \ |
124 | " _ssnop \n" \ | ||
125 | " _ssnop \n" \ | ||
126 | " .set mips0 \n") | ||
123 | 127 | ||
124 | #define tlbw_use_hazard() \ | 128 | #define tlbw_use_hazard() \ |
125 | __asm__ __volatile__( \ | 129 | __asm__ __volatile__( \ |
126 | ".set\tmips32\n\t" \ | 130 | " .set mips32 \n" \ |
127 | "_ssnop; _ssnop; _ssnop; _ssnop\n\t" \ | 131 | " _ssnop \n" \ |
128 | ".set\tmips0") | 132 | " _ssnop \n" \ |
129 | 133 | " _ssnop \n" \ | |
130 | #define back_to_back_c0_hazard() do { } while (0) | 134 | " _ssnop \n" \ |
135 | " .set mips0 \n") | ||
131 | 136 | ||
132 | #else | 137 | #else |
133 | 138 | ||
@@ -136,15 +141,25 @@ __asm__( | |||
136 | */ | 141 | */ |
137 | #define mtc0_tlbw_hazard() \ | 142 | #define mtc0_tlbw_hazard() \ |
138 | __asm__ __volatile__( \ | 143 | __asm__ __volatile__( \ |
139 | ".set noreorder\n\t" \ | 144 | " .set noreorder \n" \ |
140 | "nop; nop; nop; nop; nop; nop;\n\t" \ | 145 | " nop \n" \ |
141 | ".set reorder\n\t") | 146 | " nop \n" \ |
147 | " nop \n" \ | ||
148 | " nop \n" \ | ||
149 | " nop \n" \ | ||
150 | " nop \n" \ | ||
151 | " .set reorder \n") | ||
142 | 152 | ||
143 | #define tlbw_use_hazard() \ | 153 | #define tlbw_use_hazard() \ |
144 | __asm__ __volatile__( \ | 154 | __asm__ __volatile__( \ |
145 | ".set noreorder\n\t" \ | 155 | " .set noreorder \n" \ |
146 | "nop; nop; nop; nop; nop; nop;\n\t" \ | 156 | " nop \n" \ |
147 | ".set reorder\n\t") | 157 | " nop \n" \ |
158 | " nop \n" \ | ||
159 | " nop \n" \ | ||
160 | " nop \n" \ | ||
161 | " nop \n" \ | ||
162 | " .set reorder \n") | ||
148 | 163 | ||
149 | #endif | 164 | #endif |
150 | 165 | ||
@@ -156,49 +171,26 @@ __asm__( | |||
156 | 171 | ||
157 | #ifdef CONFIG_CPU_MIPSR2 | 172 | #ifdef CONFIG_CPU_MIPSR2 |
158 | 173 | ||
159 | __asm__( | 174 | __asm__(" .macro irq_enable_hazard \n" |
160 | " .macro\tirq_enable_hazard \n\t" | 175 | " _ehb \n" |
161 | " _ehb \n\t" | 176 | " .endm \n" |
162 | " .endm \n\t" | 177 | " \n" |
163 | " \n\t" | 178 | " .macro irq_disable_hazard \n" |
164 | " .macro\tirq_disable_hazard \n\t" | 179 | " _ehb \n" |
165 | " _ehb \n\t" | 180 | " .endm \n"); |
166 | " .endm \n\t" | ||
167 | " \n\t" | ||
168 | " .macro\tback_to_back_c0_hazard \n\t" | ||
169 | " _ehb \n\t" | ||
170 | " .endm"); | ||
171 | |||
172 | #define irq_enable_hazard() \ | ||
173 | __asm__ __volatile__( \ | ||
174 | "irq_enable_hazard") | ||
175 | 181 | ||
176 | #define irq_disable_hazard() \ | 182 | #elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000) |
177 | __asm__ __volatile__( \ | ||
178 | "irq_disable_hazard") | ||
179 | |||
180 | #define back_to_back_c0_hazard() \ | ||
181 | __asm__ __volatile__( \ | ||
182 | "back_to_back_c0_hazard") | ||
183 | |||
184 | #elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000) || \ | ||
185 | defined(CONFIG_CPU_SB1) | ||
186 | 183 | ||
187 | /* | 184 | /* |
188 | * R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer. | 185 | * R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer. |
189 | */ | 186 | */ |
190 | 187 | ||
191 | __asm__( | 188 | __asm__( |
192 | " .macro\tirq_enable_hazard \n\t" | 189 | " .macro irq_enable_hazard \n" |
193 | " .endm \n\t" | 190 | " .endm \n" |
194 | " \n\t" | 191 | " \n" |
195 | " .macro\tirq_disable_hazard \n\t" | 192 | " .macro irq_disable_hazard \n" |
196 | " .endm"); | 193 | " .endm \n"); |
197 | |||
198 | #define irq_enable_hazard() do { } while (0) | ||
199 | #define irq_disable_hazard() do { } while (0) | ||
200 | |||
201 | #define back_to_back_c0_hazard() do { } while (0) | ||
202 | 194 | ||
203 | #else | 195 | #else |
204 | 196 | ||
@@ -209,29 +201,63 @@ __asm__( | |||
209 | */ | 201 | */ |
210 | 202 | ||
211 | __asm__( | 203 | __asm__( |
212 | " # \n\t" | 204 | " # \n" |
213 | " # There is a hazard but we do not care \n\t" | 205 | " # There is a hazard but we do not care \n" |
214 | " # \n\t" | 206 | " # \n" |
215 | " .macro\tirq_enable_hazard \n\t" | 207 | " .macro\tirq_enable_hazard \n" |
216 | " .endm \n\t" | 208 | " .endm \n" |
217 | " \n\t" | 209 | " \n" |
218 | " .macro\tirq_disable_hazard \n\t" | 210 | " .macro\tirq_disable_hazard \n" |
219 | " _ssnop; _ssnop; _ssnop \n\t" | 211 | " _ssnop \n" |
220 | " .endm"); | 212 | " _ssnop \n" |
213 | " _ssnop \n" | ||
214 | " .endm \n"); | ||
221 | 215 | ||
222 | #define irq_enable_hazard() do { } while (0) | 216 | #endif |
217 | |||
218 | #define irq_enable_hazard() \ | ||
219 | __asm__ __volatile__("irq_enable_hazard") | ||
223 | #define irq_disable_hazard() \ | 220 | #define irq_disable_hazard() \ |
224 | __asm__ __volatile__( \ | 221 | __asm__ __volatile__("irq_disable_hazard") |
225 | "irq_disable_hazard") | ||
226 | 222 | ||
227 | #define back_to_back_c0_hazard() \ | 223 | |
228 | __asm__ __volatile__( \ | 224 | /* |
229 | " .set noreorder \n" \ | 225 | * Back-to-back hazards - |
230 | " nop; nop; nop \n" \ | 226 | * |
231 | " .set reorder \n") | 227 | * What is needed to separate a move to cp0 from a subsequent read from the |
228 | * same cp0 register? | ||
229 | */ | ||
230 | #ifdef CONFIG_CPU_MIPSR2 | ||
231 | |||
232 | __asm__(" .macro back_to_back_c0_hazard \n" | ||
233 | " _ehb \n" | ||
234 | " .endm \n"); | ||
235 | |||
236 | #elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000) || \ | ||
237 | defined(CONFIG_CPU_SB1) | ||
238 | |||
239 | __asm__(" .macro back_to_back_c0_hazard \n" | ||
240 | " .endm \n"); | ||
241 | |||
242 | #else | ||
243 | |||
244 | __asm__(" .macro back_to_back_c0_hazard \n" | ||
245 | " .set noreorder \n" | ||
246 | " _ssnop \n" | ||
247 | " _ssnop \n" | ||
248 | " _ssnop \n" | ||
249 | " .set reorder \n" | ||
250 | " .endm"); | ||
232 | 251 | ||
233 | #endif | 252 | #endif |
234 | 253 | ||
254 | #define back_to_back_c0_hazard() \ | ||
255 | __asm__ __volatile__("back_to_back_c0_hazard") | ||
256 | |||
257 | |||
258 | /* | ||
259 | * Instruction execution hazard | ||
260 | */ | ||
235 | #ifdef CONFIG_CPU_MIPSR2 | 261 | #ifdef CONFIG_CPU_MIPSR2 |
236 | /* | 262 | /* |
237 | * gcc has a tradition of misscompiling the previous construct using the | 263 | * gcc has a tradition of misscompiling the previous construct using the |
diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h index 8c011aa61afa..ba1d7bbc15d2 100644 --- a/include/asm-mips/io.h +++ b/include/asm-mips/io.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 1994, 1995 Waldorf GmbH | 6 | * Copyright (C) 1994, 1995 Waldorf GmbH |
7 | * Copyright (C) 1994 - 2000 Ralf Baechle | 7 | * Copyright (C) 1994 - 2000, 06 Ralf Baechle |
8 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. | 8 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. |
9 | * Copyright (C) 2004, 2005 MIPS Technologies, Inc. All rights reserved. | 9 | * Copyright (C) 2004, 2005 MIPS Technologies, Inc. All rights reserved. |
10 | * Author: Maciej W. Rozycki <macro@mips.com> | 10 | * Author: Maciej W. Rozycki <macro@mips.com> |
@@ -103,8 +103,20 @@ | |||
103 | */ | 103 | */ |
104 | extern const unsigned long mips_io_port_base; | 104 | extern const unsigned long mips_io_port_base; |
105 | 105 | ||
106 | #define set_io_port_base(base) \ | 106 | /* |
107 | do { * (unsigned long *) &mips_io_port_base = (base); } while (0) | 107 | * Gcc will generate code to load the value of mips_io_port_base after each |
108 | * function call which may be fairly wasteful in some cases. So we don't | ||
109 | * play quite by the book. We tell gcc mips_io_port_base is a long variable | ||
110 | * which solves the code generation issue. Now we need to violate the | ||
111 | * aliasing rules a little to make initialization possible and finally we | ||
112 | * will need the barrier() to fight side effects of the aliasing chat. | ||
113 | * This trickery will eventually collapse under gcc's optimizer. Oh well. | ||
114 | */ | ||
115 | static inline void set_io_port_base(unsigned long base) | ||
116 | { | ||
117 | * (unsigned long *) &mips_io_port_base = base; | ||
118 | barrier(); | ||
119 | } | ||
108 | 120 | ||
109 | /* | 121 | /* |
110 | * Thanks to James van Artsdalen for a better timing-fix than | 122 | * Thanks to James van Artsdalen for a better timing-fix than |
diff --git a/include/asm-mips/r4kcache.h b/include/asm-mips/r4kcache.h index 9632c27dad15..0bcb79a58ee9 100644 --- a/include/asm-mips/r4kcache.h +++ b/include/asm-mips/r4kcache.h | |||
@@ -257,7 +257,8 @@ static inline void blast_##pfx##cache##lsize##_page(unsigned long page) \ | |||
257 | \ | 257 | \ |
258 | static inline void blast_##pfx##cache##lsize##_page_indexed(unsigned long page) \ | 258 | static inline void blast_##pfx##cache##lsize##_page_indexed(unsigned long page) \ |
259 | { \ | 259 | { \ |
260 | unsigned long start = page; \ | 260 | unsigned long indexmask = current_cpu_data.desc.waysize - 1; \ |
261 | unsigned long start = INDEX_BASE + (page & indexmask); \ | ||
261 | unsigned long end = start + PAGE_SIZE; \ | 262 | unsigned long end = start + PAGE_SIZE; \ |
262 | unsigned long ws_inc = 1UL << current_cpu_data.desc.waybit; \ | 263 | unsigned long ws_inc = 1UL << current_cpu_data.desc.waybit; \ |
263 | unsigned long ws_end = current_cpu_data.desc.ways << \ | 264 | unsigned long ws_end = current_cpu_data.desc.ways << \ |
diff --git a/include/asm-mips/sibyte/sb1250.h b/include/asm-mips/sibyte/sb1250.h index a474c29cd701..b09e16c93ca0 100644 --- a/include/asm-mips/sibyte/sb1250.h +++ b/include/asm-mips/sibyte/sb1250.h | |||
@@ -45,8 +45,8 @@ extern unsigned int soc_type; | |||
45 | extern unsigned int periph_rev; | 45 | extern unsigned int periph_rev; |
46 | extern unsigned int zbbus_mhz; | 46 | extern unsigned int zbbus_mhz; |
47 | 47 | ||
48 | extern void sb1250_hpt_setup(void); | ||
48 | extern void sb1250_time_init(void); | 49 | extern void sb1250_time_init(void); |
49 | extern unsigned long sb1250_gettimeoffset(void); | ||
50 | extern void sb1250_mask_irq(int cpu, int irq); | 50 | extern void sb1250_mask_irq(int cpu, int irq); |
51 | extern void sb1250_unmask_irq(int cpu, int irq); | 51 | extern void sb1250_unmask_irq(int cpu, int irq); |
52 | extern void sb1250_smp_finish(void); | 52 | extern void sb1250_smp_finish(void); |
diff --git a/include/asm-mips/sibyte/sb1250_scd.h b/include/asm-mips/sibyte/sb1250_scd.h index a667bc14a7cd..f4178bdcfcb0 100644 --- a/include/asm-mips/sibyte/sb1250_scd.h +++ b/include/asm-mips/sibyte/sb1250_scd.h | |||
@@ -359,14 +359,15 @@ | |||
359 | */ | 359 | */ |
360 | 360 | ||
361 | #define V_SCD_TIMER_FREQ 1000000 | 361 | #define V_SCD_TIMER_FREQ 1000000 |
362 | #define V_SCD_TIMER_WIDTH 23 | ||
362 | 363 | ||
363 | #define S_SCD_TIMER_INIT 0 | 364 | #define S_SCD_TIMER_INIT 0 |
364 | #define M_SCD_TIMER_INIT _SB_MAKEMASK(20,S_SCD_TIMER_INIT) | 365 | #define M_SCD_TIMER_INIT _SB_MAKEMASK(V_SCD_TIMER_WIDTH,S_SCD_TIMER_INIT) |
365 | #define V_SCD_TIMER_INIT(x) _SB_MAKEVALUE(x,S_SCD_TIMER_INIT) | 366 | #define V_SCD_TIMER_INIT(x) _SB_MAKEVALUE(x,S_SCD_TIMER_INIT) |
366 | #define G_SCD_TIMER_INIT(x) _SB_GETVALUE(x,S_SCD_TIMER_INIT,M_SCD_TIMER_INIT) | 367 | #define G_SCD_TIMER_INIT(x) _SB_GETVALUE(x,S_SCD_TIMER_INIT,M_SCD_TIMER_INIT) |
367 | 368 | ||
368 | #define S_SCD_TIMER_CNT 0 | 369 | #define S_SCD_TIMER_CNT 0 |
369 | #define M_SCD_TIMER_CNT _SB_MAKEMASK(20,S_SCD_TIMER_CNT) | 370 | #define M_SCD_TIMER_CNT _SB_MAKEMASK(V_SCD_TIMER_WIDTH,S_SCD_TIMER_CNT) |
370 | #define V_SCD_TIMER_CNT(x) _SB_MAKEVALUE(x,S_SCD_TIMER_CNT) | 371 | #define V_SCD_TIMER_CNT(x) _SB_MAKEVALUE(x,S_SCD_TIMER_CNT) |
371 | #define G_SCD_TIMER_CNT(x) _SB_GETVALUE(x,S_SCD_TIMER_CNT,M_SCD_TIMER_CNT) | 372 | #define G_SCD_TIMER_CNT(x) _SB_GETVALUE(x,S_SCD_TIMER_CNT,M_SCD_TIMER_CNT) |
372 | 373 | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 1709b5009d2e..751eea58bde8 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1365,6 +1365,7 @@ | |||
1365 | #define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008 | 1365 | #define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008 |
1366 | #define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009 | 1366 | #define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009 |
1367 | #define PCI_DEVICE_ID_SERVERWORKS_GCNB_LE 0x0017 | 1367 | #define PCI_DEVICE_ID_SERVERWORKS_GCNB_LE 0x0017 |
1368 | #define PCI_DEVICE_ID_SERVERWORKS_EPB 0x0103 | ||
1368 | #define PCI_DEVICE_ID_SERVERWORKS_OSB4 0x0200 | 1369 | #define PCI_DEVICE_ID_SERVERWORKS_OSB4 0x0200 |
1369 | #define PCI_DEVICE_ID_SERVERWORKS_CSB5 0x0201 | 1370 | #define PCI_DEVICE_ID_SERVERWORKS_CSB5 0x0201 |
1370 | #define PCI_DEVICE_ID_SERVERWORKS_CSB6 0x0203 | 1371 | #define PCI_DEVICE_ID_SERVERWORKS_CSB6 0x0203 |
diff --git a/include/net/ax25.h b/include/net/ax25.h index 2250a18b0cbb..d052b221dbcd 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h | |||
@@ -110,8 +110,15 @@ enum { | |||
110 | enum { | 110 | enum { |
111 | AX25_PROTO_STD_SIMPLEX, | 111 | AX25_PROTO_STD_SIMPLEX, |
112 | AX25_PROTO_STD_DUPLEX, | 112 | AX25_PROTO_STD_DUPLEX, |
113 | #ifdef CONFIG_AX25_DAMA_SLAVE | ||
113 | AX25_PROTO_DAMA_SLAVE, | 114 | AX25_PROTO_DAMA_SLAVE, |
114 | AX25_PROTO_DAMA_MASTER | 115 | #ifdef CONFIG_AX25_DAMA_MASTER |
116 | AX25_PROTO_DAMA_MASTER, | ||
117 | #define AX25_PROTO_MAX AX25_PROTO_DAMA_MASTER | ||
118 | #endif | ||
119 | #endif | ||
120 | __AX25_PROTO_MAX, | ||
121 | AX25_PROTO_MAX = __AX25_PROTO_MAX -1 | ||
115 | }; | 122 | }; |
116 | 123 | ||
117 | enum { | 124 | enum { |
diff --git a/include/net/sock.h b/include/net/sock.h index 30758035d616..f63d0d56712c 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -478,9 +478,9 @@ static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb) | |||
478 | rc = __condition; \ | 478 | rc = __condition; \ |
479 | if (!rc) { \ | 479 | if (!rc) { \ |
480 | *(__timeo) = schedule_timeout(*(__timeo)); \ | 480 | *(__timeo) = schedule_timeout(*(__timeo)); \ |
481 | rc = __condition; \ | ||
482 | } \ | 481 | } \ |
483 | lock_sock(__sk); \ | 482 | lock_sock(__sk); \ |
483 | rc = __condition; \ | ||
484 | rc; \ | 484 | rc; \ |
485 | }) | 485 | }) |
486 | 486 | ||
diff --git a/kernel/fork.c b/kernel/fork.c index ccdfbb16c86d..b373322ca497 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1478,9 +1478,7 @@ static int unshare_vm(unsigned long unshare_flags, struct mm_struct **new_mmp) | |||
1478 | 1478 | ||
1479 | if ((unshare_flags & CLONE_VM) && | 1479 | if ((unshare_flags & CLONE_VM) && |
1480 | (mm && atomic_read(&mm->mm_users) > 1)) { | 1480 | (mm && atomic_read(&mm->mm_users) > 1)) { |
1481 | *new_mmp = dup_mm(current); | 1481 | return -EINVAL; |
1482 | if (!*new_mmp) | ||
1483 | return -ENOMEM; | ||
1484 | } | 1482 | } |
1485 | 1483 | ||
1486 | return 0; | 1484 | return 0; |
@@ -1569,7 +1567,7 @@ asmlinkage long sys_unshare(unsigned long unshare_flags) | |||
1569 | 1567 | ||
1570 | if (new_sigh) { | 1568 | if (new_sigh) { |
1571 | sigh = current->sighand; | 1569 | sigh = current->sighand; |
1572 | current->sighand = new_sigh; | 1570 | rcu_assign_pointer(current->sighand, new_sigh); |
1573 | new_sigh = sigh; | 1571 | new_sigh = sigh; |
1574 | } | 1572 | } |
1575 | 1573 | ||
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c index 216f574b5ffb..fa895fc2ecf5 100644 --- a/kernel/posix-timers.c +++ b/kernel/posix-timers.c | |||
@@ -353,6 +353,7 @@ static int posix_timer_fn(void *data) | |||
353 | hrtimer_forward(&timr->it.real.timer, | 353 | hrtimer_forward(&timr->it.real.timer, |
354 | timr->it.real.interval); | 354 | timr->it.real.interval); |
355 | ret = HRTIMER_RESTART; | 355 | ret = HRTIMER_RESTART; |
356 | ++timr->it_requeue_pending; | ||
356 | } | 357 | } |
357 | } | 358 | } |
358 | 359 | ||
diff --git a/kernel/timer.c b/kernel/timer.c index bf7c4193b936..2410c18dbeb1 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
@@ -1354,8 +1354,8 @@ void __init init_timers(void) | |||
1354 | 1354 | ||
1355 | #ifdef CONFIG_TIME_INTERPOLATION | 1355 | #ifdef CONFIG_TIME_INTERPOLATION |
1356 | 1356 | ||
1357 | struct time_interpolator *time_interpolator; | 1357 | struct time_interpolator *time_interpolator __read_mostly; |
1358 | static struct time_interpolator *time_interpolator_list; | 1358 | static struct time_interpolator *time_interpolator_list __read_mostly; |
1359 | static DEFINE_SPINLOCK(time_interpolator_lock); | 1359 | static DEFINE_SPINLOCK(time_interpolator_lock); |
1360 | 1360 | ||
1361 | static inline u64 time_interpolator_get_cycles(unsigned int src) | 1361 | static inline u64 time_interpolator_get_cycles(unsigned int src) |
diff --git a/mm/memory.c b/mm/memory.c index 9abc6008544b..85e80a57db29 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -623,11 +623,12 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb, | |||
623 | (*zap_work)--; | 623 | (*zap_work)--; |
624 | continue; | 624 | continue; |
625 | } | 625 | } |
626 | |||
627 | (*zap_work) -= PAGE_SIZE; | ||
628 | |||
626 | if (pte_present(ptent)) { | 629 | if (pte_present(ptent)) { |
627 | struct page *page; | 630 | struct page *page; |
628 | 631 | ||
629 | (*zap_work) -= PAGE_SIZE; | ||
630 | |||
631 | page = vm_normal_page(vma, addr, ptent); | 632 | page = vm_normal_page(vma, addr, ptent); |
632 | if (unlikely(details) && page) { | 633 | if (unlikely(details) && page) { |
633 | /* | 634 | /* |
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 2a8206009422..b21869a39f0b 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -330,9 +330,19 @@ check_range(struct mm_struct *mm, unsigned long start, unsigned long end, | |||
330 | int err; | 330 | int err; |
331 | struct vm_area_struct *first, *vma, *prev; | 331 | struct vm_area_struct *first, *vma, *prev; |
332 | 332 | ||
333 | /* Clear the LRU lists so pages can be isolated */ | 333 | if (flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL)) { |
334 | if (flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL)) | 334 | /* Must have swap device for migration */ |
335 | if (nr_swap_pages <= 0) | ||
336 | return ERR_PTR(-ENODEV); | ||
337 | |||
338 | /* | ||
339 | * Clear the LRU lists so pages can be isolated. | ||
340 | * Note that pages may be moved off the LRU after we have | ||
341 | * drained them. Those pages will fail to migrate like other | ||
342 | * pages that may be busy. | ||
343 | */ | ||
335 | lru_add_drain_all(); | 344 | lru_add_drain_all(); |
345 | } | ||
336 | 346 | ||
337 | first = find_vma(mm, start); | 347 | first = find_vma(mm, start); |
338 | if (!first) | 348 | if (!first) |
@@ -393,7 +393,8 @@ void pagevec_strip(struct pagevec *pvec) | |||
393 | struct page *page = pvec->pages[i]; | 393 | struct page *page = pvec->pages[i]; |
394 | 394 | ||
395 | if (PagePrivate(page) && !TestSetPageLocked(page)) { | 395 | if (PagePrivate(page) && !TestSetPageLocked(page)) { |
396 | try_to_release_page(page, 0); | 396 | if (PagePrivate(page)) |
397 | try_to_release_page(page, 0); | ||
397 | unlock_page(page); | 398 | unlock_page(page); |
398 | } | 399 | } |
399 | } | 400 | } |
diff --git a/net/ax25/sysctl_net_ax25.c b/net/ax25/sysctl_net_ax25.c index f67711f2ee96..894a22558d9d 100644 --- a/net/ax25/sysctl_net_ax25.c +++ b/net/ax25/sysctl_net_ax25.c | |||
@@ -24,7 +24,7 @@ static int min_t3[1], max_t3[] = {3600 * HZ}; | |||
24 | static int min_idle[1], max_idle[] = {65535 * HZ}; | 24 | static int min_idle[1], max_idle[] = {65535 * HZ}; |
25 | static int min_n2[] = {1}, max_n2[] = {31}; | 25 | static int min_n2[] = {1}, max_n2[] = {31}; |
26 | static int min_paclen[] = {1}, max_paclen[] = {512}; | 26 | static int min_paclen[] = {1}, max_paclen[] = {512}; |
27 | static int min_proto[1], max_proto[] = {3}; | 27 | static int min_proto[1], max_proto[] = { AX25_PROTO_MAX }; |
28 | static int min_ds_timeout[1], max_ds_timeout[] = {65535 * HZ}; | 28 | static int min_ds_timeout[1], max_ds_timeout[] = {65535 * HZ}; |
29 | 29 | ||
30 | static struct ctl_table_header *ax25_table_header; | 30 | static struct ctl_table_header *ax25_table_header; |
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index f70ff13d4818..b8b2a560b26b 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -508,12 +508,7 @@ buf_printf(struct buffer *buf, const char *fmt, ...) | |||
508 | 508 | ||
509 | va_start(ap, fmt); | 509 | va_start(ap, fmt); |
510 | len = vsnprintf(tmp, SZ, fmt, ap); | 510 | len = vsnprintf(tmp, SZ, fmt, ap); |
511 | if (buf->size - buf->pos < len + 1) { | 511 | buf_write(buf, tmp, len); |
512 | buf->size += 128; | ||
513 | buf->p = realloc(buf->p, buf->size); | ||
514 | } | ||
515 | strncpy(buf->p + buf->pos, tmp, len + 1); | ||
516 | buf->pos += len; | ||
517 | va_end(ap); | 512 | va_end(ap); |
518 | } | 513 | } |
519 | 514 | ||
@@ -521,7 +516,7 @@ void | |||
521 | buf_write(struct buffer *buf, const char *s, int len) | 516 | buf_write(struct buffer *buf, const char *s, int len) |
522 | { | 517 | { |
523 | if (buf->size - buf->pos < len) { | 518 | if (buf->size - buf->pos < len) { |
524 | buf->size += len; | 519 | buf->size += len + SZ; |
525 | buf->p = realloc(buf->p, buf->size); | 520 | buf->p = realloc(buf->p, buf->size); |
526 | } | 521 | } |
527 | strncpy(buf->p + buf->pos, s, len); | 522 | strncpy(buf->p + buf->pos, s, len); |