1 diff -Nru a/arch/ppc/boot/common/util.S b/arch/ppc/boot/common/util.S
2 --- a/arch/ppc/boot/common/util.S 2004-03-01 15:34:28 -08:00
3 +++ b/arch/ppc/boot/common/util.S 2004-10-07 11:15:16 -07:00
8 - cmpi 0,r10,1 /* 601 ? */
9 + cmpwi 0,r10,1 /* 601 ? */
14 /* Wait for the invalidation to complete */
17 - cmpli cr0,r8,0x8000 /* 7450 */
18 - cmpli cr1,r8,0x8001 /* 7455 */
19 - cmpli cr2,r8,0x8002 /* 7457 */
20 + cmplwi cr0,r8,0x8000 /* 7450 */
21 + cmplwi cr1,r8,0x8001 /* 7455 */
22 + cmplwi cr2,r8,0x8002 /* 7457 */
23 cror 4*cr0+eq,4*cr0+eq,4*cr1+eq /* Now test if any are true. */
24 cror 4*cr0+eq,4*cr0+eq,4*cr2+eq
30 - cmpi 0,r4,1 /* 601 ? */
31 + cmpwi 0,r4,1 /* 601 ? */
33 00: li r0,86 /* Instructions / microsecond? */
41 bne 1b /* Get [synced] base time */
42 addc r9,r6,r4 /* Compute end time */
55 diff -Nru a/arch/ppc/boot/openfirmware/misc.S b/arch/ppc/boot/openfirmware/misc.S
56 --- a/arch/ppc/boot/openfirmware/misc.S 2003-08-25 05:13:38 -07:00
57 +++ b/arch/ppc/boot/openfirmware/misc.S 2004-10-07 12:17:53 -07:00
61 rlwinm 5,5,16,16,31 /* r3 = 1 for 601, 4 for 604 */
66 mtibatl 3,0 /* invalidate BAT first */
67 diff -Nru a/arch/ppc/boot/simple/misc.c b/arch/ppc/boot/simple/misc.c
68 --- a/arch/ppc/boot/simple/misc.c 2004-09-07 23:33:06 -07:00
69 +++ b/arch/ppc/boot/simple/misc.c 2004-10-08 02:57:32 -07:00
73 struct bi_record *rec;
74 - unsigned long initrd_loc, TotalMemory = 0;
75 + unsigned long initrd_loc = 0, TotalMemory = 0;
77 #ifdef CONFIG_SERIAL_8250_CONSOLE
78 com_port = serial_init(0, NULL);
79 diff -Nru a/arch/ppc/boot/simple/relocate.S b/arch/ppc/boot/simple/relocate.S
80 --- a/arch/ppc/boot/simple/relocate.S 2004-04-02 19:13:47 -08:00
81 +++ b/arch/ppc/boot/simple/relocate.S 2004-10-07 12:17:13 -07:00
83 * Check if we need to relocate ourselves to the link addr or were
84 * we loaded there to begin with.
88 beq start_ldr /* If 0, we don't need to relocate */
90 /* Move this code somewhere safe. This is max(load + size, end)
93 mr r3,r8 /* Get the load addr */
95 - cmp cr0,r4,r3 /* If we need to copy from the end, do so */
96 + cmpw cr0,r4,r3 /* If we need to copy from the end, do so */
97 bgt do_relocate_from_end
99 do_relocate_from_start:
107 90: mr r9,r1 /* Save old stack pointer (in case it matters) */
109 diff -Nru a/arch/ppc/kernel/cpu_setup_6xx.S b/arch/ppc/kernel/cpu_setup_6xx.S
110 --- a/arch/ppc/kernel/cpu_setup_6xx.S 2004-08-26 02:16:36 -07:00
111 +++ b/arch/ppc/kernel/cpu_setup_6xx.S 2004-10-07 09:45:55 -07:00
115 rlwinm r10,r10,4,28,31
122 cror 4*cr0+eq,4*cr0+eq,4*cr1+eq
123 cror 4*cr0+eq,4*cr0+eq,4*cr2+eq
125 @@ -287,12 +287,12 @@
126 /* Now deal with CPU type dependent registers */
129 - cmpli cr0,r3,0x8000 /* 7450 */
130 - cmpli cr1,r3,0x000c /* 7400 */
131 - cmpli cr2,r3,0x800c /* 7410 */
132 - cmpli cr3,r3,0x8001 /* 7455 */
133 - cmpli cr4,r3,0x8002 /* 7457 */
134 - cmpli cr5,r3,0x7000 /* 750FX */
135 + cmplwi cr0,r3,0x8000 /* 7450 */
136 + cmplwi cr1,r3,0x000c /* 7400 */
137 + cmplwi cr2,r3,0x800c /* 7410 */
138 + cmplwi cr3,r3,0x8001 /* 7455 */
139 + cmplwi cr4,r3,0x8002 /* 7457 */
140 + cmplwi cr5,r3,0x7000 /* 750FX */
141 /* cr1 is 7400 || 7410 */
142 cror 4*cr1+eq,4*cr1+eq,4*cr2+eq
145 /* If rev 2.x, backup HID2 */
149 + cmpwi cr0,r3,0x0200
153 @@ -354,12 +354,12 @@
154 /* Now deal with CPU type dependent registers */
157 - cmpli cr0,r3,0x8000 /* 7450 */
158 - cmpli cr1,r3,0x000c /* 7400 */
159 - cmpli cr2,r3,0x800c /* 7410 */
160 - cmpli cr3,r3,0x8001 /* 7455 */
161 - cmpli cr4,r3,0x8002 /* 7457 */
162 - cmpli cr5,r3,0x7000 /* 750FX */
163 + cmplwi cr0,r3,0x8000 /* 7450 */
164 + cmplwi cr1,r3,0x000c /* 7400 */
165 + cmplwi cr2,r3,0x800c /* 7410 */
166 + cmplwi cr3,r3,0x8001 /* 7455 */
167 + cmplwi cr4,r3,0x8002 /* 7457 */
168 + cmplwi cr5,r3,0x7000 /* 750FX */
169 /* cr1 is 7400 || 7410 */
170 cror 4*cr1+eq,4*cr1+eq,4*cr2+eq
173 /* If rev 2.x, restore HID2 with low voltage bit cleared */
177 + cmpwi cr0,r3,0x0200
186 + cmplwi cr0,r6,10000
188 /* Setup final PLL */
190 diff -Nru a/arch/ppc/kernel/entry.S b/arch/ppc/kernel/entry.S
191 --- a/arch/ppc/kernel/entry.S 2004-06-17 23:41:08 -07:00
192 +++ b/arch/ppc/kernel/entry.S 2004-10-07 09:11:33 -07:00
194 andi. r11,r11,_TIF_SYSCALL_TRACE
196 syscall_dotrace_cont:
197 - cmpli 0,r0,NR_syscalls
198 + cmplwi 0,r0,NR_syscalls
199 lis r10,sys_call_table@h
200 ori r10,r10,sys_call_table@l
208 rlwinm r12,r1,0,0,18 /* current_thread_info() */
210 lwz r11,TI_LOCAL_FLAGS(r12)
211 diff -Nru a/arch/ppc/kernel/head.S b/arch/ppc/kernel/head.S
212 --- a/arch/ppc/kernel/head.S 2004-07-26 15:12:27 -07:00
213 +++ b/arch/ppc/kernel/head.S 2004-10-07 09:46:47 -07:00
215 tophys(r6,0) /* get __pa constant */
216 addis r3,r6,last_task_used_math@ha
217 lwz r4,last_task_used_math@l(r3)
222 addi r4,r4,THREAD /* want last_task_used_math->thread */
225 addis r3,r6,last_task_used_altivec@ha
226 lwz r4,last_task_used_altivec@l(r3)
231 addi r4,r4,THREAD /* want THREAD of last_task_used_altivec */
232 @@ -992,11 +992,11 @@
234 MTMSRD(r5) /* enable use of AltiVec now */
238 beqlr- /* if no previous owner, done */
239 addi r3,r3,THREAD /* want THREAD of task */
246 @@ -1030,11 +1030,11 @@
247 MTMSRD(r5) /* enable use of fpu now */
252 beqlr- /* if no previous owner, done */
253 addi r3,r3,THREAD /* want THREAD of task */
259 stfd fr0,THREAD_FPSCR-4(r3)
260 @@ -1512,7 +1512,7 @@
263 1: addic. r10, r10, -0x1000
269 @@ -1539,7 +1539,7 @@
270 #ifndef CONFIG_PPC64BRIDGE
272 rlwinm r9,r9,16,16,31 /* r9 = 1 for 601, 4 for 604 */
276 ori r11,r11,4 /* set up BAT registers for 601 */
277 li r8,0x7f /* valid, block length = 8MB */
278 @@ -1591,7 +1591,7 @@
281 rlwinm r9,r9,16,16,31 /* r9 = 1 for 601, 4 for 604 */
287 diff -Nru a/arch/ppc/kernel/head_e500.S b/arch/ppc/kernel/head_e500.S
288 --- a/arch/ppc/kernel/head_e500.S 2004-10-10 21:13:08.000000000 +0200
289 +++ b/arch/ppc/kernel/head_e500.S 2004-10-10 21:13:08.000000000 +0200
290 @@ -1057,7 +1057,7 @@
292 lis r3,last_task_used_spe@ha
293 lwz r4,last_task_used_spe@l(r3)
297 addi r4,r4,THREAD /* want THREAD of last_task_used_spe */
299 @@ -1167,11 +1167,11 @@
301 mtmsr r5 /* enable use of SPE now */
305 beqlr- /* if no previous owner, done */
306 addi r3,r3,THREAD /* want THREAD of task */
310 SAVE_32EVR(0, r4, r3)
311 evxor evr6, evr6, evr6 /* clear out evr6 */
312 evmwumiaa evr6, evr6, evr6 /* evr6 <- ACC = 0 * 0 + ACC */
313 diff -Nru a/arch/ppc/kernel/idle_6xx.S b/arch/ppc/kernel/idle_6xx.S
314 --- a/arch/ppc/kernel/idle_6xx.S 2003-09-22 17:12:45 -07:00
315 +++ b/arch/ppc/kernel/idle_6xx.S 2004-10-07 09:47:04 -07:00
317 /* Now check if user or arch enabled NAP mode */
318 lis r4,powersave_nap@ha
319 lwz r4,powersave_nap@l(r4)
325 END_FTR_SECTION_IFSET(CPU_FTR_CAN_NAP)
332 /* Go to low speed mode on some 750FX */
333 lis r4,powersave_lowspeed@ha
334 lwz r4,powersave_lowspeed@l(r4)
340 diff -Nru a/arch/ppc/kernel/idle_power4.S b/arch/ppc/kernel/idle_power4.S
341 --- a/arch/ppc/kernel/idle_power4.S 2004-02-04 19:44:27 -08:00
342 +++ b/arch/ppc/kernel/idle_power4.S 2004-10-07 09:47:13 -07:00
344 /* Now check if user or arch enabled NAP mode */
345 lis r4,powersave_nap@ha
346 lwz r4,powersave_nap@l(r4)
352 diff -Nru a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S
353 --- a/arch/ppc/kernel/misc.S 2004-08-17 10:42:55 -07:00
354 +++ b/arch/ppc/kernel/misc.S 2004-10-07 09:45:17 -07:00
358 /* If switching to PLL1, disable HID0:BTIC */
365 stw r4,nap_save_hid1@l(r6)
367 /* If switching to PLL0, enable HID0:BTIC */
374 ori r9,r9,mmu_hash_lock@l
382 @@ -551,12 +551,12 @@
383 ori r9,r9,mmu_hash_lock@l
400 #else /* CONFIG_SMP */
404 #endif /* CONFIG_SMP */
405 #endif /* ! CONFIG_40x */
409 rlwinm r3,r3,16,16,31
412 beqlr /* for 601, do nothing */
413 /* 603/604 processor - use invalidate-all bit in HID0 */
416 _GLOBAL(flush_icache_range)
418 rlwinm r5,r5,16,16,31
421 beqlr /* for 601, do nothing */
422 li r5,L1_CACHE_LINE_SIZE-1
425 _GLOBAL(__flush_dcache_icache)
427 rlwinm r5,r5,16,16,31
430 beqlr /* for 601, do nothing */
431 rlwinm r3,r3,0,0,19 /* Get page base address */
432 li r4,4096/L1_CACHE_LINE_SIZE /* Number of lines in a page */
434 _GLOBAL(__flush_dcache_icache_phys)
436 rlwinm r5,r5,16,16,31
439 beqlr /* for 601, do nothing */
441 rlwinm r0,r10,0,28,26 /* clear DR */
442 @@ -1141,7 +1141,7 @@
443 li r4,0 /* new sp (unused) */
446 - cmpi 0,r3,0 /* parent or child? */
447 + cmpwi 0,r3,0 /* parent or child? */
448 bne 1f /* return if parent */
449 li r0,0 /* make top-level stack frame */
451 @@ -1439,7 +1439,7 @@
452 .long sys_ni_syscall /* 255 - rtas (used on ppc64) */
453 .long sys_ni_syscall /* 256 reserved for sys_debug_setcontext */
454 .long sys_ni_syscall /* 257 reserved for vserver */
455 - .long sys_ni_syscall /* 258 reserved for new sys_remap_file_pages */
456 + .long sys_ni_syscall /* 258 reserved for new sys_remap_file_page
457 .long sys_ni_syscall /* 259 reserved for new sys_mbind */
458 .long sys_ni_syscall /* 260 reserved for new sys_get_mempolicy */
459 .long sys_ni_syscall /* 261 reserved for new sys_set_mempolicy */
460 diff -Nru a/arch/ppc/kernel/signal.c b/arch/ppc/kernel/signal.c
461 --- a/arch/ppc/kernel/signal.c 2004-08-25 10:13:41 -07:00
462 +++ b/arch/ppc/kernel/signal.c 2004-10-05 23:05:22 -07:00
465 restore_user_regs(struct pt_regs *regs, struct mcontext __user *sr, int sig)
467 - unsigned long save_r2;
468 + unsigned long save_r2 = 0;
469 #if defined(CONFIG_ALTIVEC) || defined(CONFIG_SPE)
472 diff -Nru a/arch/ppc/lib/checksum.S b/arch/ppc/lib/checksum.S
473 --- a/arch/ppc/lib/checksum.S 2002-09-15 21:51:59 -07:00
474 +++ b/arch/ppc/lib/checksum.S 2004-10-07 09:13:16 -07:00
476 adde r0,r0,r5 /* be unnecessary to unroll this loop */
490 slwi r5,r5,8 /* Upper byte of word */
527 diff -Nru a/arch/ppc/mm/44x_mmu.c b/arch/ppc/mm/44x_mmu.c
528 --- a/arch/ppc/mm/44x_mmu.c 2004-08-07 11:05:38 -07:00
529 +++ b/arch/ppc/mm/44x_mmu.c 2004-10-05 23:05:22 -07:00
532 ppc44x_pin_tlb(int slot, unsigned int virt, unsigned int phys)
534 - unsigned long attrib;
535 + unsigned long attrib = 0;
537 __asm__ __volatile__("\
539 diff -Nru a/arch/ppc/platforms/pmac_pci.c b/arch/ppc/platforms/pmac_pci.c
540 --- a/arch/ppc/platforms/pmac_pci.c 2004-09-28 21:05:15 -07:00
541 +++ b/arch/ppc/platforms/pmac_pci.c 2004-08-16 21:18:09 -07:00
546 + struct device_node *np = pci_busdev_to_OF_node(bus, devfn);
548 + return PCIBIOS_DEVICE_NOT_FOUND;
551 * When a device in K2 is powered down, we die on config
552 * cycle accesses. Fix that here.
557 + struct device_node *np = pci_busdev_to_OF_node(bus, devfn);
559 + return PCIBIOS_DEVICE_NOT_FOUND;
561 * When a device in K2 is powered down, we die on config
562 * cycle accesses. Fix that here.
563 diff -Nru a/arch/ppc/syslib/ppc4xx_pic.c b/arch/ppc/syslib/ppc4xx_pic.c
564 --- a/arch/ppc/syslib/ppc4xx_pic.c 2004-07-01 22:23:47 -07:00
565 +++ b/arch/ppc/syslib/ppc4xx_pic.c 2004-10-05 23:05:22 -07:00
567 ppc4xx_uic_end(unsigned int irq)
570 - unsigned int tr_bits;
571 + unsigned int tr_bits = 0;
575 diff -Nru a/arch/ppc/syslib/todc_time.c b/arch/ppc/syslib/todc_time.c
576 --- a/arch/ppc/syslib/todc_time.c 2004-03-02 10:54:26 -08:00
577 +++ b/arch/ppc/syslib/todc_time.c 2004-10-05 23:05:22 -07:00
580 todc_get_rtc_time(void)
582 - uint year, mon, day, hour, min, sec;
583 + uint year = 0, mon = 0, day = 0, hour = 0, min = 0, sec = 0;
585 - u_char save_control, uip;
586 + u_char save_control, uip = 0;
588 spin_lock(&rtc_lock);
589 save_control = todc_read_val(todc_info->control_a);
591 todc_set_rtc_time(unsigned long nowtime)
594 - u_char save_control, save_freq_select;
595 + u_char save_control, save_freq_select = 0;
597 spin_lock(&rtc_lock);
601 static unsigned char __init todc_read_timereg(int addr)
603 - unsigned char save_control, val;
604 + unsigned char save_control = 0, val;
606 switch (todc_info->rtc_type) {
607 case TODC_TYPE_DS1557:
608 diff -Nru a/arch/ppc64/kernel/ItLpQueue.c b/arch/ppc64/kernel/ItLpQueue.c
609 --- a/arch/ppc64/kernel/ItLpQueue.c 2004-07-01 22:23:46 -07:00
610 +++ b/arch/ppc64/kernel/ItLpQueue.c 2004-10-07 11:48:51 -07:00
613 __asm__ __volatile__("\n\
620 diff -Nru a/arch/ppc64/kernel/entry.S b/arch/ppc64/kernel/entry.S
621 --- a/arch/ppc64/kernel/entry.S 2004-09-21 00:22:33 -07:00
622 +++ b/arch/ppc64/kernel/entry.S 2004-10-07 14:52:16 -07:00
624 andi. r11,r10,_TIF_SYSCALL_T_OR_A
626 syscall_dotrace_cont:
627 - cmpli 0,r0,NR_syscalls
628 + cmpldi 0,r0,NR_syscalls
631 system_call: /* label this so stack traces look sane */
635 lbz r11,TI_SC_NOERR(r12)
638 bne- syscall_error_cont
640 oris r5,r5,0x1000 /* Set SO bit in CR */
641 diff -Nru a/arch/ppc64/kernel/idle_power4.S b/arch/ppc64/kernel/idle_power4.S
642 --- a/arch/ppc64/kernel/idle_power4.S 2004-02-11 19:47:50 -08:00
643 +++ b/arch/ppc64/kernel/idle_power4.S 2004-10-07 14:52:16 -07:00
645 /* Now check if user or arch enabled NAP mode */
646 LOADBASE(r3,powersave_nap)
647 lwz r4,powersave_nap@l(r3)
653 diff -Nru a/arch/ppc64/kernel/misc.S b/arch/ppc64/kernel/misc.S
654 --- a/arch/ppc64/kernel/misc.S 2004-09-26 22:36:58 -07:00
655 +++ b/arch/ppc64/kernel/misc.S 2004-10-07 14:52:16 -07:00
657 li r4,0 /* new sp (unused) */
660 - cmpi 0,r3,0 /* parent or child? */
661 + cmpdi 0,r3,0 /* parent or child? */
662 bne 1f /* return if parent */
664 stdu r0,-STACK_FRAME_OVERHEAD(r1)
665 diff -Nru a/arch/ppc64/lib/checksum.S b/arch/ppc64/lib/checksum.S
666 --- a/arch/ppc64/lib/checksum.S 2002-09-17 16:32:53 -07:00
667 +++ b/arch/ppc64/lib/checksum.S 2004-10-07 15:38:13 -07:00
671 andi. r4,r4,7 /* compute bytes left to sum after doublewords */
672 -3: cmpi 0,r4,4 /* is at least a full word left? */
673 +3: cmpwi 0,r4,4 /* is at least a full word left? */
675 lwz r6,8(r3) /* sum this word */
679 -4: cmpi 0,r4,2 /* is at least a halfword left? */
680 +4: cmpwi 0,r4,2 /* is at least a halfword left? */
682 lhz r6,8(r3) /* sum this halfword */
686 -5: cmpi 0,r4,1 /* is at least a byte left? */
687 +5: cmpwi 0,r4,1 /* is at least a byte left? */
689 lbz r6,8(r3) /* sum this byte */
690 slwi r6,r6,8 /* this byte is assumed to be the upper byte of a halfword */
727 diff -Nru a/arch/ppc64/mm/hash_low.S b/arch/ppc64/mm/hash_low.S
728 --- a/arch/ppc64/mm/hash_low.S 2004-08-23 23:49:57 -07:00
729 +++ b/arch/ppc64/mm/hash_low.S 2004-10-07 14:52:16 -07:00
732 _GLOBAL(htab_call_hpte_insert1)
733 bl . /* Will be patched by htab_finish_init() */
736 bge htab_pte_insert_ok /* Insertion successful */
737 - cmpi 0,r3,-2 /* Critical failure */
738 + cmpdi 0,r3,-2 /* Critical failure */
739 beq- htab_pte_insert_failure
741 /* Now try secondary slot */
744 _GLOBAL(htab_call_hpte_insert2)
745 bl . /* Will be patched by htab_finish_init() */
748 bge+ htab_pte_insert_ok /* Insertion successful */
749 - cmpi 0,r3,-2 /* Critical failure */
750 + cmpdi 0,r3,-2 /* Critical failure */
751 beq- htab_pte_insert_failure
753 /* Both are full, we need to evict something */
754 diff -Nru a/include/asm-ppc/ppc_asm.h b/include/asm-ppc/ppc_asm.h
755 --- a/include/asm-ppc/ppc_asm.h 2004-10-11 10:15:51.000000000 +0200
756 +++ b/include/asm-ppc/ppc_asm.h 2004-10-11 10:15:51.000000000 +0200
760 lis r4,KERNELBASE@h; \
766 diff -Nru a/arch/ppc/mm/hashtable.S b/arch/ppc/mm/hashtable.S
767 --- a/arch/ppc/mm/hashtable.S 2004-10-11 10:21:10.000000000 +0200
768 +++ b/arch/ppc/mm/hashtable.S 2004-10-11 10:21:10.000000000 +0200
771 andi. r6,r6,_PAGE_HASHPTE
772 beq+ 10f /* no PTE: go look for an empty slot */
776 addis r4,r7,htab_hash_searches@ha
777 lwz r6,htab_hash_searches@l(r4)
780 STPTE r0,0(r12) /* invalidate entry */
782 - tlbie r4 /* in hw tlb too */
783 + tlbie r4,0 /* in hw tlb too */
786 8: ble cr1,9f /* if all ptes checked */
787 diff -Nru a/arch/ppc/platforms/pmac_sleep.S b/arch/ppc/platforms/pmac_sleep.S
788 --- a/arch/ppc/platforms/pmac_sleep.S 2004-10-11 10:21:11.000000000 +0200
789 +++ b/arch/ppc/platforms/pmac_sleep.S 2004-10-11 10:21:11.000000000 +0200
793 1: addic. r4,r4,-0x1000
799 diff -Nru a/arch/ppc/power/cpu_reg.S b/arch/ppc/power/cpu_reg.S
800 --- a/arch/ppc/power/cpu_reg.S 2004-10-11 10:21:11.000000000 +0200
801 +++ b/arch/ppc/power/cpu_reg.S 2004-10-11 10:21:11.000000000 +0200
803 /* Flush all TLBs */;\
805 1: addic. r4,r4,-0x1000;\