diff -Naurp linux-2.6.14-rc2.orig/arch/mips/Makefile linux-2.6.14-rc2/arch/mips/Makefile --- linux-2.6.14-rc2.orig/arch/mips/Makefile 2005-10-22 22:24:37.000000000 -0400 +++ linux-2.6.14-rc2/arch/mips/Makefile 2005-10-22 23:18:00.000000000 -0400 @@ -16,7 +16,7 @@ as-option = $(shell if $(CC) $(CFLAGS) $ -xassembler /dev/null > /dev/null 2>&1; then echo "$(1)"; \ else echo "$(2)"; fi ;) -cflags-y := +cflags-y := -ffreestanding # # Select the object file format to substitute into the linker script. @@ -142,7 +142,7 @@ if $(CC) $$gcc_abi -S -o /dev/null -xc / else \ gcc_abi=; gcc_isa=-$(5); \ fi; \ -gas_abi=-Wa,-$(gcc-abi); gas_cpu=$$cpu; gas_isa=-Wa,$$isa; \ +gas_abi=-Wa,-mabi=$(gcc-abi); gas_cpu=$$cpu; gas_isa=-Wa,$$isa; \ while :; do \ for gas_opt in -Wa,-march= -Wa,-mcpu=; do \ $(CC) $$gas_abi $$gas_opt$$cpu $$gas_isa -Wa,-Z -c \ @@ -153,7 +153,7 @@ while :; do \ break; \ done; \ if test "$(gcc-abi)" != "$(gas-abi)"; then \ - gas_abi="-Wa,-$(gas-abi) -Wa,-mgp$(gcc-abi)"; \ + gas_abi="-Wa,-mabi=$(gas-abi) -Wa,-mgp$(gcc-abi)"; \ fi; \ if test "$$gcc_opt" = -march= && test -n "$$gcc_abi"; then \ $(CC) $$gcc_abi $$gcc_opt$$gcc_cpu -S -o /dev/null \ diff -Naurp linux-2.6.14-rc2.orig/arch/mips/kernel/traps.c linux-2.6.14-rc2/arch/mips/kernel/traps.c --- linux-2.6.14-rc2.orig/arch/mips/kernel/traps.c 2005-10-22 22:24:36.000000000 -0400 +++ linux-2.6.14-rc2/arch/mips/kernel/traps.c 2005-10-22 23:18:00.000000000 -0400 @@ -1165,7 +1165,8 @@ void __init per_cpu_trap_init(void) #ifdef CONFIG_64BIT status_set |= ST0_FR|ST0_KX|ST0_SX|ST0_UX; #endif - if (current_cpu_data.isa_level == MIPS_CPU_ISA_IV) + if (current_cpu_data.isa_level == MIPS_CPU_ISA_IV + || current_cpu_data.cputype == CPU_SB1) status_set |= ST0_XX; change_c0_status(ST0_CU|ST0_MX|ST0_FR|ST0_BEV|ST0_TS|ST0_KX|ST0_SX|ST0_UX, status_set); diff -Naurp linux-2.6.14-rc2.orig/arch/mips/mm/c-r4k.c linux-2.6.14-rc2/arch/mips/mm/c-r4k.c --- linux-2.6.14-rc2.orig/arch/mips/mm/c-r4k.c 2005-10-22 22:24:36.000000000 -0400 +++ linux-2.6.14-rc2/arch/mips/mm/c-r4k.c 2005-10-22 23:21:14.000000000 -0400 @@ -245,22 +245,6 @@ static inline void r4k_blast_scache_page r4k_blast_scache_page = blast_scache128_page; } -static void (* r4k_blast_scache_page_indexed)(unsigned long addr); - -static inline void r4k_blast_scache_page_indexed_setup(void) -{ - unsigned long sc_lsize = cpu_scache_line_size(); - - if (sc_lsize == 16) - r4k_blast_scache_page_indexed = blast_scache16_page_indexed; - else if (sc_lsize == 32) - r4k_blast_scache_page_indexed = blast_scache32_page_indexed; - else if (sc_lsize == 64) - r4k_blast_scache_page_indexed = blast_scache64_page_indexed; - else if (sc_lsize == 128) - r4k_blast_scache_page_indexed = blast_scache128_page_indexed; -} - static void (* r4k_blast_scache)(void); static inline void r4k_blast_scache_setup(void) @@ -341,6 +325,9 @@ static inline void local_r4k_flush_cache { struct mm_struct *mm = args; + if (!cpu_has_dc_aliases) + return; + if (!cpu_context(smp_processor_id(), mm)) return; @@ -360,9 +347,6 @@ static inline void local_r4k_flush_cache static void r4k_flush_cache_mm(struct mm_struct *mm) { - if (!cpu_has_dc_aliases) - return; - on_each_cpu(local_r4k_flush_cache_mm, mm, 1, 1); } @@ -410,11 +394,8 @@ static inline void local_r4k_flush_cache * in that case, which doesn't overly flush the cache too much. */ if ((mm == current->active_mm) && (pte_val(*ptep) & _PAGE_VALID)) { - if (cpu_has_dc_aliases || (exec && !cpu_has_ic_fills_f_dc)) { + if (cpu_has_dc_aliases || (exec && !cpu_has_ic_fills_f_dc)) r4k_blast_dcache_page(addr); - if (exec && !cpu_icache_snoops_remote_store) - r4k_blast_scache_page(addr); - } if (exec) r4k_blast_icache_page(addr); @@ -426,11 +407,8 @@ static inline void local_r4k_flush_cache * to work correctly. */ addr = INDEX_BASE + (addr & (dcache_size - 1)); - if (cpu_has_dc_aliases || (exec && !cpu_has_ic_fills_f_dc)) { + if (cpu_has_dc_aliases || (exec && !cpu_has_ic_fills_f_dc)) r4k_blast_dcache_page_indexed(addr); - if (exec && !cpu_icache_snoops_remote_store) - r4k_blast_scache_page_indexed(addr); - } if (exec) { if (cpu_has_vtag_icache) { int cpu = smp_processor_id(); @@ -473,15 +451,14 @@ static inline void local_r4k_flush_icach struct flush_icache_range_args *fir_args = args; unsigned long dc_lsize = cpu_dcache_line_size(); unsigned long ic_lsize = cpu_icache_line_size(); - unsigned long sc_lsize = cpu_scache_line_size(); unsigned long start = fir_args->start; unsigned long end = fir_args->end; unsigned long addr, aend; if (!cpu_has_ic_fills_f_dc) { - if (end - start > dcache_size) { + if (end - start > dcache_size) r4k_blast_dcache(); - } else { + else { R4600_HIT_CACHEOP_WAR_IMPL; addr = start & ~(dc_lsize - 1); aend = (end - 1) & ~(dc_lsize - 1); @@ -494,23 +471,6 @@ static inline void local_r4k_flush_icach addr += dc_lsize; } } - - if (!cpu_icache_snoops_remote_store) { - if (end - start > scache_size) { - r4k_blast_scache(); - } else { - addr = start & ~(sc_lsize - 1); - aend = (end - 1) & ~(sc_lsize - 1); - - while (1) { - /* Hit_Writeback_Inv_SD */ - protected_writeback_scache_line(addr); - if (addr == aend) - break; - addr += sc_lsize; - } - } - } } if (end - start > icache_size) @@ -579,8 +539,6 @@ static inline void local_r4k_flush_icach if (!cpu_has_ic_fills_f_dc) { unsigned long addr = (unsigned long) page_address(page); r4k_blast_dcache_page(addr); - if (!cpu_icache_snoops_remote_store) - r4k_blast_scache_page(addr); ClearPageDcacheDirty(page); } @@ -723,13 +681,10 @@ static void local_r4k_flush_cache_sigtra { unsigned long ic_lsize = cpu_icache_line_size(); unsigned long dc_lsize = cpu_dcache_line_size(); - unsigned long sc_lsize = cpu_scache_line_size(); unsigned long addr = (unsigned long) arg; R4600_HIT_CACHEOP_WAR_IMPL; protected_writeback_dcache_line(addr & ~(dc_lsize - 1)); - if (!cpu_icache_snoops_remote_store) - protected_writeback_scache_line(addr & ~(sc_lsize - 1)); protected_flush_icache_line(addr & ~(ic_lsize - 1)); if (MIPS4K_ICACHE_REFILL_WAR) { __asm__ __volatile__ ( @@ -796,8 +751,8 @@ static inline void rm7k_erratum31(void) } } -static char *way_string[] __initdata = { NULL, "direct mapped", "2-way", - "3-way", "4-way", "5-way", "6-way", "7-way", "8-way" +static char *way_string[] = { NULL, "direct mapped", "2-way", "3-way", "4-way", + "5-way", "6-way", "7-way", "8-way" }; static void __init probe_pcache(void) @@ -1242,7 +1197,6 @@ void __init r4k_cache_init(void) r4k_blast_icache_page_indexed_setup(); r4k_blast_icache_setup(); r4k_blast_scache_page_setup(); - r4k_blast_scache_page_indexed_setup(); r4k_blast_scache_setup(); /* diff -Naurp linux-2.6.14-rc2.orig/drivers/md/md.c linux-2.6.14-rc2/drivers/md/md.c --- linux-2.6.14-rc2.orig/drivers/md/md.c 2005-10-22 22:24:30.000000000 -0400 +++ linux-2.6.14-rc2/drivers/md/md.c 2005-10-22 23:18:00.000000000 -0400 @@ -463,6 +463,7 @@ abort: return ret; } +#if 0 static unsigned int calc_sb_csum(mdp_super_t * sb) { unsigned int disk_csum, csum; @@ -473,6 +474,23 @@ static unsigned int calc_sb_csum(mdp_sup sb->sb_csum = disk_csum; return csum; } +#else +unsigned long calc_sb_csum(mdp_super_t *super) +{ + unsigned int oldcsum = super->sb_csum; + unsigned long long newcsum = 0; + unsigned long csum; + int i; + unsigned int *superc = (int*) super; + super->sb_csum = 0; + + for(i=0; i>32); + super->sb_csum = oldcsum; + return csum; +} +#endif /* diff -Naurp linux-2.6.14-rc2.orig/drivers/media/video/swarm_saa7114h.c linux-2.6.14-rc2/drivers/media/video/swarm_saa7114h.c --- linux-2.6.14-rc2.orig/drivers/media/video/swarm_saa7114h.c 2005-10-22 22:24:37.000000000 -0400 +++ linux-2.6.14-rc2/drivers/media/video/swarm_saa7114h.c 2005-10-22 23:18:00.000000000 -0400 @@ -101,8 +101,8 @@ #define IF_NAME "saa7114h" -#define MAC2_CSR(r) (KSEG1 + A_MAC_REGISTER(2, r)) -#define MAC2_DMARX0_CSR(r) (KSEG1 + A_MAC_DMA_REGISTER(2, DMA_RX, 0, r)) +#define MAC2_CSR(r) (CKSEG1 + A_MAC_REGISTER(2, r)) +#define MAC2_DMARX0_CSR(r) (CKSEG1 + A_MAC_DMA_REGISTER(2, DMA_RX, 0, r)) /* Options */ #define DMA_DEINTERLACE 1 @@ -1613,9 +1613,9 @@ static int saa7114h_attach(struct i2c_ad decoder->vd = vd; /* Turn on the ITRDY - preserve the GENO pin for syncser */ - val = __raw_readq(KSEG1 + A_MAC_REGISTER(2, R_MAC_MDIO)); + val = __raw_readq(CKSEG1 + A_MAC_REGISTER(2, R_MAC_MDIO)); __raw_writeq(M_MAC_MDIO_OUT | (val & M_MAC_GENC), - KSEG1 + A_MAC_REGISTER(2, R_MAC_MDIO)); + CKSEG1 + A_MAC_REGISTER(2, R_MAC_MDIO)); if ((err = dma_setup(decoder))) { i2c_detach_client(client); diff -Naurp linux-2.6.14-rc2.orig/drivers/video/console/newport_con.c linux-2.6.14-rc2/drivers/video/console/newport_con.c --- linux-2.6.14-rc2.orig/drivers/video/console/newport_con.c 2005-10-22 22:24:37.000000000 -0400 +++ linux-2.6.14-rc2/drivers/video/console/newport_con.c 2005-10-22 23:18:00.000000000 -0400 @@ -87,7 +87,7 @@ static inline void newport_render_backgr static inline void newport_init_cmap(void) { - unsigned short i; + unsigned long i; for (i = 0; i < 16; i++) { newport_bfwait(npregs); @@ -722,7 +722,7 @@ const struct consw newport_con = { .con_set_palette = newport_set_palette, .con_scrolldelta = newport_scrolldelta, .con_set_origin = DUMMY, - .con_save_screen = DUMMY + .con_save_screen = DUMMY, }; #ifdef MODULE diff -Naurp linux-2.6.14-rc2.orig/include/asm-mips/atomic.h linux-2.6.14-rc2/include/asm-mips/atomic.h --- linux-2.6.14-rc2.orig/include/asm-mips/atomic.h 2005-10-22 22:24:37.000000000 -0400 +++ linux-2.6.14-rc2/include/asm-mips/atomic.h 2005-10-22 23:18:00.000000000 -0400 @@ -68,8 +68,8 @@ static __inline__ void atomic_add(int i, " sc %0, %1 \n" " beqzl %0, 1b \n" " .set mips0 \n" - : "=&r" (temp), "=m" (v->counter) - : "Ir" (i), "m" (v->counter)); + : "=&r" (temp), "+m" (v->counter) + : "Ir" (i)); } else if (cpu_has_llsc) { unsigned long temp; @@ -80,8 +80,8 @@ static __inline__ void atomic_add(int i, " sc %0, %1 \n" " beqz %0, 1b \n" " .set mips0 \n" - : "=&r" (temp), "=m" (v->counter) - : "Ir" (i), "m" (v->counter)); + : "=&r" (temp), "+m" (v->counter) + : "Ir" (i)); } else { unsigned long flags; @@ -110,8 +110,8 @@ static __inline__ void atomic_sub(int i, " sc %0, %1 \n" " beqzl %0, 1b \n" " .set mips0 \n" - : "=&r" (temp), "=m" (v->counter) - : "Ir" (i), "m" (v->counter)); + : "=&r" (temp), "+m" (v->counter) + : "Ir" (i)); } else if (cpu_has_llsc) { unsigned long temp; @@ -122,8 +122,8 @@ static __inline__ void atomic_sub(int i, " sc %0, %1 \n" " beqz %0, 1b \n" " .set mips0 \n" - : "=&r" (temp), "=m" (v->counter) - : "Ir" (i), "m" (v->counter)); + : "=&r" (temp), "+m" (v->counter) + : "Ir" (i)); } else { unsigned long flags; @@ -152,9 +152,8 @@ static __inline__ int atomic_add_return( " addu %0, %1, %3 \n" " sync \n" " .set mips0 \n" - : "=&r" (result), "=&r" (temp), "=m" (v->counter) - : "Ir" (i), "m" (v->counter) - : "memory"); + : "=&r" (result), "=&r" (temp), "+m" (v->counter) + : "Ir" (i)); } else if (cpu_has_llsc) { unsigned long temp; @@ -167,9 +166,8 @@ static __inline__ int atomic_add_return( " addu %0, %1, %3 \n" " sync \n" " .set mips0 \n" - : "=&r" (result), "=&r" (temp), "=m" (v->counter) - : "Ir" (i), "m" (v->counter) - : "memory"); + : "=&r" (result), "=&r" (temp), "+m" (v->counter) + : "Ir" (i)); } else { unsigned long flags; @@ -199,9 +197,8 @@ static __inline__ int atomic_sub_return( " subu %0, %1, %3 \n" " sync \n" " .set mips0 \n" - : "=&r" (result), "=&r" (temp), "=m" (v->counter) - : "Ir" (i), "m" (v->counter) - : "memory"); + : "=&r" (result), "=&r" (temp), "+m" (v->counter) + : "Ir" (i)); } else if (cpu_has_llsc) { unsigned long temp; @@ -214,9 +211,8 @@ static __inline__ int atomic_sub_return( " subu %0, %1, %3 \n" " sync \n" " .set mips0 \n" - : "=&r" (result), "=&r" (temp), "=m" (v->counter) - : "Ir" (i), "m" (v->counter) - : "memory"); + : "=&r" (result), "=&r" (temp), "+m" (v->counter) + : "Ir" (i)); } else { unsigned long flags; @@ -254,9 +250,8 @@ static __inline__ int atomic_sub_if_posi " sync \n" "1: \n" " .set mips0 \n" - : "=&r" (result), "=&r" (temp), "=m" (v->counter) - : "Ir" (i), "m" (v->counter) - : "memory"); + : "=&r" (result), "=&r" (temp), "+m" (v->counter) + : "Ir" (i)); } else if (cpu_has_llsc) { unsigned long temp; @@ -270,9 +265,8 @@ static __inline__ int atomic_sub_if_posi " sync \n" "1: \n" " .set mips0 \n" - : "=&r" (result), "=&r" (temp), "=m" (v->counter) - : "Ir" (i), "m" (v->counter) - : "memory"); + : "=&r" (result), "=&r" (temp), "+m" (v->counter) + : "Ir" (i)); } else { unsigned long flags; @@ -393,8 +387,8 @@ static __inline__ void atomic64_add(long " scd %0, %1 \n" " beqzl %0, 1b \n" " .set mips0 \n" - : "=&r" (temp), "=m" (v->counter) - : "Ir" (i), "m" (v->counter)); + : "=&r" (temp), "+m" (v->counter) + : "Ir" (i)); } else if (cpu_has_llsc) { unsigned long temp; @@ -405,8 +399,8 @@ static __inline__ void atomic64_add(long " scd %0, %1 \n" " beqz %0, 1b \n" " .set mips0 \n" - : "=&r" (temp), "=m" (v->counter) - : "Ir" (i), "m" (v->counter)); + : "=&r" (temp), "+m" (v->counter) + : "Ir" (i)); } else { unsigned long flags; @@ -435,8 +429,8 @@ static __inline__ void atomic64_sub(long " scd %0, %1 \n" " beqzl %0, 1b \n" " .set mips0 \n" - : "=&r" (temp), "=m" (v->counter) - : "Ir" (i), "m" (v->counter)); + : "=&r" (temp), "+m" (v->counter) + : "Ir" (i)); } else if (cpu_has_llsc) { unsigned long temp; @@ -447,8 +441,8 @@ static __inline__ void atomic64_sub(long " scd %0, %1 \n" " beqz %0, 1b \n" " .set mips0 \n" - : "=&r" (temp), "=m" (v->counter) - : "Ir" (i), "m" (v->counter)); + : "=&r" (temp), "+m" (v->counter) + : "Ir" (i)); } else { unsigned long flags; @@ -477,9 +471,8 @@ static __inline__ long atomic64_add_retu " addu %0, %1, %3 \n" " sync \n" " .set mips0 \n" - : "=&r" (result), "=&r" (temp), "=m" (v->counter) - : "Ir" (i), "m" (v->counter) - : "memory"); + : "=&r" (result), "=&r" (temp), "+m" (v->counter) + : "Ir" (i)); } else if (cpu_has_llsc) { unsigned long temp; @@ -492,9 +485,8 @@ static __inline__ long atomic64_add_retu " addu %0, %1, %3 \n" " sync \n" " .set mips0 \n" - : "=&r" (result), "=&r" (temp), "=m" (v->counter) - : "Ir" (i), "m" (v->counter) - : "memory"); + : "=&r" (result), "=&r" (temp), "+m" (v->counter) + : "Ir" (i)); } else { unsigned long flags; @@ -524,9 +516,8 @@ static __inline__ long atomic64_sub_retu " subu %0, %1, %3 \n" " sync \n" " .set mips0 \n" - : "=&r" (result), "=&r" (temp), "=m" (v->counter) - : "Ir" (i), "m" (v->counter) - : "memory"); + : "=&r" (result), "=&r" (temp), "+m" (v->counter) + : "Ir" (i)); } else if (cpu_has_llsc) { unsigned long temp; @@ -539,9 +530,8 @@ static __inline__ long atomic64_sub_retu " subu %0, %1, %3 \n" " sync \n" " .set mips0 \n" - : "=&r" (result), "=&r" (temp), "=m" (v->counter) - : "Ir" (i), "m" (v->counter) - : "memory"); + : "=&r" (result), "=&r" (temp), "+m" (v->counter) + : "Ir" (i)); } else { unsigned long flags; @@ -579,9 +569,8 @@ static __inline__ long atomic64_sub_if_p " sync \n" "1: \n" " .set mips0 \n" - : "=&r" (result), "=&r" (temp), "=m" (v->counter) - : "Ir" (i), "m" (v->counter) - : "memory"); + : "=&r" (result), "=&r" (temp), "+m" (v->counter) + : "Ir" (i)); } else if (cpu_has_llsc) { unsigned long temp; @@ -595,9 +584,8 @@ static __inline__ long atomic64_sub_if_p " sync \n" "1: \n" " .set mips0 \n" - : "=&r" (result), "=&r" (temp), "=m" (v->counter) - : "Ir" (i), "m" (v->counter) - : "memory"); + : "=&r" (result), "=&r" (temp), "+m" (v->counter) + : "Ir" (i)); } else { unsigned long flags;