aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-01-24 15:31:28 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-01-24 15:31:28 -0500
commita21b0696261c2865d329afa4156ce15fcdf5e772 (patch)
tree52f9ba2bfba80a954a84f14931ebf206b79bd579
parent717d44e849219781ced028a40fcc59d3e1f49e4c (diff)
parent66218da212bf141532d678a699f5789c78145ab1 (diff)
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [MIPS] Fix wrong checksum calculation on 64-bit MIPS [MIPS] VPE loader: Initialize lists before they're actually being used ... [MIPS] Fix reported amount of freed memory - it's in kB not bytes [MIPS] vr41xx: need one more nop with mtc0_tlbw_hazard() [MIPS] SMTC: Fix module build by exporting symbol [MIPS] SMTC: Fix TLB sizing bug for TLB of 64 >= entries [MIPS] Fix APM build [MIPS] There is no __GNUC_MAJOR__
-rw-r--r--arch/mips/Makefile2
-rw-r--r--arch/mips/dec/prom/memory.c2
-rw-r--r--arch/mips/kernel/smtc.c10
-rw-r--r--arch/mips/kernel/vpe.c9
-rw-r--r--arch/mips/mm/init.c3
-rw-r--r--include/asm-mips/checksum.h3
-rw-r--r--include/asm-mips/hazards.h2
-rw-r--r--include/asm-mips/thread_info.h2
8 files changed, 22 insertions, 11 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index d1b026a0337d..c68b5d3e5d18 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -623,7 +623,7 @@ LDFLAGS += -m $(ld-emul)
623 623
624ifdef CONFIG_MIPS 624ifdef CONFIG_MIPS
625CHECKFLAGS += $(shell $(CC) $(CFLAGS) -dM -E -xc /dev/null | \ 625CHECKFLAGS += $(shell $(CC) $(CFLAGS) -dM -E -xc /dev/null | \
626 egrep -vw '__GNUC_(MAJOR|MINOR|PATCHLEVEL)__' | \ 626 egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \
627 sed -e 's/^\#define /-D/' -e "s/ /='/" -e "s/$$/'/") 627 sed -e 's/^\#define /-D/' -e "s/ /='/" -e "s/$$/'/")
628ifdef CONFIG_64BIT 628ifdef CONFIG_64BIT
629CHECKFLAGS += -m64 629CHECKFLAGS += -m64
diff --git a/arch/mips/dec/prom/memory.c b/arch/mips/dec/prom/memory.c
index 3027ce782797..3aa01d268f2d 100644
--- a/arch/mips/dec/prom/memory.c
+++ b/arch/mips/dec/prom/memory.c
@@ -122,7 +122,7 @@ unsigned long __init prom_free_prom_memory(void)
122 addr += PAGE_SIZE; 122 addr += PAGE_SIZE;
123 } 123 }
124 124
125 printk("Freeing unused PROM memory: %ldk freed\n", 125 printk("Freeing unused PROM memory: %ldkb freed\n",
126 (end - PAGE_SIZE) >> 10); 126 (end - PAGE_SIZE) >> 10);
127 127
128 return end - PAGE_SIZE; 128 return end - PAGE_SIZE;
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c
index 44238ab2fc99..6a857bf030b0 100644
--- a/arch/mips/kernel/smtc.c
+++ b/arch/mips/kernel/smtc.c
@@ -4,6 +4,7 @@
4#include <linux/sched.h> 4#include <linux/sched.h>
5#include <linux/cpumask.h> 5#include <linux/cpumask.h>
6#include <linux/interrupt.h> 6#include <linux/interrupt.h>
7#include <linux/module.h>
7 8
8#include <asm/cpu.h> 9#include <asm/cpu.h>
9#include <asm/processor.h> 10#include <asm/processor.h>
@@ -270,9 +271,12 @@ void smtc_configure_tlb(void)
270 * of their initialization in smtc_cpu_setup(). 271 * of their initialization in smtc_cpu_setup().
271 */ 272 */
272 273
273 tlbsiz = tlbsiz & 0x3f; /* MIPS32 limits TLB indices to 64 */ 274 /* MIPS32 limits TLB indices to 64 */
274 cpu_data[0].tlbsize = tlbsiz; 275 if (tlbsiz > 64)
276 tlbsiz = 64;
277 cpu_data[0].tlbsize = current_cpu_data.tlbsize = tlbsiz;
275 smtc_status |= SMTC_TLB_SHARED; 278 smtc_status |= SMTC_TLB_SHARED;
279 local_flush_tlb_all();
276 280
277 printk("TLB of %d entry pairs shared by %d VPEs\n", 281 printk("TLB of %d entry pairs shared by %d VPEs\n",
278 tlbsiz, vpes); 282 tlbsiz, vpes);
@@ -1044,6 +1048,8 @@ void smtc_ipi_replay(void)
1044 } 1048 }
1045} 1049}
1046 1050
1051EXPORT_SYMBOL(smtc_ipi_replay);
1052
1047void smtc_idle_loop_hook(void) 1053void smtc_idle_loop_hook(void)
1048{ 1054{
1049#ifdef SMTC_IDLE_HOOK_DEBUG 1055#ifdef SMTC_IDLE_HOOK_DEBUG
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c
index 666bef484dcb..458fccf87c54 100644
--- a/arch/mips/kernel/vpe.c
+++ b/arch/mips/kernel/vpe.c
@@ -139,13 +139,16 @@ struct tc {
139 struct list_head list; 139 struct list_head list;
140}; 140};
141 141
142struct vpecontrol_ { 142struct {
143 /* Virtual processing elements */ 143 /* Virtual processing elements */
144 struct list_head vpe_list; 144 struct list_head vpe_list;
145 145
146 /* Thread contexts */ 146 /* Thread contexts */
147 struct list_head tc_list; 147 struct list_head tc_list;
148} vpecontrol; 148} vpecontrol = {
149 .vpe_list = LIST_HEAD_INIT(vpecontrol.vpe_list),
150 .tc_list = LIST_HEAD_INIT(vpecontrol.tc_list)
151};
149 152
150static void release_progmem(void *ptr); 153static void release_progmem(void *ptr);
151/* static __attribute_used__ void dump_vpe(struct vpe * v); */ 154/* static __attribute_used__ void dump_vpe(struct vpe * v); */
@@ -1388,8 +1391,6 @@ static int __init vpe_module_init(void)
1388 1391
1389 /* dump_mtregs(); */ 1392 /* dump_mtregs(); */
1390 1393
1391 INIT_LIST_HEAD(&vpecontrol.vpe_list);
1392 INIT_LIST_HEAD(&vpecontrol.tc_list);
1393 1394
1394 val = read_c0_mvpconf0(); 1395 val = read_c0_mvpconf0();
1395 for (i = 0; i < ((val & MVPCONF0_PTC) + 1); i++) { 1396 for (i = 0; i < ((val & MVPCONF0_PTC) + 1); i++) {
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 30245c09d025..49065c133ebf 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -501,7 +501,8 @@ void free_initmem(void)
501 501
502 freed = prom_free_prom_memory(); 502 freed = prom_free_prom_memory();
503 if (freed) 503 if (freed)
504 printk(KERN_INFO "Freeing firmware memory: %ldk freed\n",freed); 504 printk(KERN_INFO "Freeing firmware memory: %ldkb freed\n",
505 freed >> 10);
505 506
506 free_init_pages("unused kernel memory", 507 free_init_pages("unused kernel memory",
507 __pa_symbol(&__init_begin), 508 __pa_symbol(&__init_begin),
diff --git a/include/asm-mips/checksum.h b/include/asm-mips/checksum.h
index 24cdcc6eaab8..20a81e1548f5 100644
--- a/include/asm-mips/checksum.h
+++ b/include/asm-mips/checksum.h
@@ -159,7 +159,8 @@ static inline __wsum csum_tcpudp_nofold(__be32 saddr,
159#endif 159#endif
160 " .set pop" 160 " .set pop"
161 : "=r" (sum) 161 : "=r" (sum)
162 : "0" (daddr), "r"(saddr), 162 : "0" ((__force unsigned long)daddr),
163 "r" ((__force unsigned long)saddr),
163#ifdef __MIPSEL__ 164#ifdef __MIPSEL__
164 "r" ((proto + len) << 8), 165 "r" ((proto + len) << 8),
165#else 166#else
diff --git a/include/asm-mips/hazards.h b/include/asm-mips/hazards.h
index 0fe02945feba..50073157a617 100644
--- a/include/asm-mips/hazards.h
+++ b/include/asm-mips/hazards.h
@@ -157,7 +157,7 @@ ASMMACRO(back_to_back_c0_hazard,
157 * processors. 157 * processors.
158 */ 158 */
159ASMMACRO(mtc0_tlbw_hazard, 159ASMMACRO(mtc0_tlbw_hazard,
160 nop 160 nop; nop
161 ) 161 )
162ASMMACRO(tlbw_use_hazard, 162ASMMACRO(tlbw_use_hazard,
163 nop; nop; nop 163 nop; nop; nop
diff --git a/include/asm-mips/thread_info.h b/include/asm-mips/thread_info.h
index e475c45ea263..fbcda8204473 100644
--- a/include/asm-mips/thread_info.h
+++ b/include/asm-mips/thread_info.h
@@ -118,6 +118,7 @@ register struct thread_info *__current_thread_info __asm__("$28");
118#define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ 118#define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */
119#define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ 119#define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */
120#define TIF_MEMDIE 18 120#define TIF_MEMDIE 18
121#define TIF_FREEZE 19
121#define TIF_SYSCALL_TRACE 31 /* syscall trace active */ 122#define TIF_SYSCALL_TRACE 31 /* syscall trace active */
122 123
123#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) 124#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
@@ -129,6 +130,7 @@ register struct thread_info *__current_thread_info __asm__("$28");
129#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) 130#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
130#define _TIF_USEDFPU (1<<TIF_USEDFPU) 131#define _TIF_USEDFPU (1<<TIF_USEDFPU)
131#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) 132#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
133#define _TIF_FREEZE (1<<TIF_FREEZE)
132 134
133/* work to do on interrupt/exception return */ 135/* work to do on interrupt/exception return */
134#define _TIF_WORK_MASK (0x0000ffef & ~_TIF_SECCOMP) 136#define _TIF_WORK_MASK (0x0000ffef & ~_TIF_SECCOMP)