Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze

* 'next' of git://git.monstr.eu/linux-2.6-microblaze:
microblaze: Fix msr instruction detection
microblaze: Fix pte_update function
microblaze: Fix asm compilation warning
microblaze: Fix IRQ flag handling for MSR=0

+24 -26
+1 -1
arch/microblaze/include/asm/irqflags.h
··· 12 12 #include <linux/types.h> 13 13 #include <asm/registers.h> 14 14 15 - #ifdef CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR 15 + #if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR 16 16 17 17 static inline unsigned long arch_local_irq_save(void) 18 18 {
+12 -13
arch/microblaze/include/asm/pgtable.h
··· 411 411 static inline unsigned long pte_update(pte_t *p, unsigned long clr, 412 412 unsigned long set) 413 413 { 414 - unsigned long old, tmp, msr; 414 + unsigned long flags, old, tmp; 415 415 416 - __asm__ __volatile__("\ 417 - msrclr %2, 0x2\n\ 418 - nop\n\ 419 - lw %0, %4, r0\n\ 420 - andn %1, %0, %5\n\ 421 - or %1, %1, %6\n\ 422 - sw %1, %4, r0\n\ 423 - mts rmsr, %2\n\ 424 - nop" 425 - : "=&r" (old), "=&r" (tmp), "=&r" (msr), "=m" (*p) 426 - : "r" ((unsigned long)(p + 1) - 4), "r" (clr), "r" (set), "m" (*p) 427 - : "cc"); 416 + raw_local_irq_save(flags); 417 + 418 + __asm__ __volatile__( "lw %0, %2, r0 \n" 419 + "andn %1, %0, %3 \n" 420 + "or %1, %1, %4 \n" 421 + "sw %1, %2, r0 \n" 422 + : "=&r" (old), "=&r" (tmp) 423 + : "r" ((unsigned long)(p + 1) - 4), "r" (clr), "r" (set) 424 + : "cc"); 425 + 426 + raw_local_irq_restore(flags); 428 427 429 428 return old; 430 429 }
+2 -2
arch/microblaze/kernel/cpu/pvr.c
··· 27 27 register unsigned tmp __asm__("r3"); \ 28 28 tmp = 0x0; /* Prevent warning about unused */ \ 29 29 __asm__ __volatile__ ( \ 30 - "mfs %0, rpvr" #pvrid ";" \ 30 + "mfs %0, rpvr" #pvrid ";" \ 31 31 : "=r" (tmp) : : "memory"); \ 32 32 val = tmp; \ 33 33 } ··· 54 54 if (!(flags & PVR_MSR_BIT)) 55 55 return 0; 56 56 57 - get_single_pvr(0x00, pvr0); 57 + get_single_pvr(0, pvr0); 58 58 pr_debug("%s: pvr0 is 0x%08x\n", __func__, pvr0); 59 59 60 60 if (pvr0 & PVR0_PVR_FULL_MASK)
+7 -8
arch/microblaze/kernel/head.S
··· 62 62 andi r1, r1, ~2 63 63 mts rmsr, r1 64 64 /* 65 - * Here is checking mechanism which check if Microblaze has msr instructions 66 - * We load msr and compare it with previous r1 value - if is the same, 67 - * msr instructions works if not - cpu don't have them. 65 + * According to Xilinx, msrclr instruction behaves like 'mfs rX,rpc' 66 + * if the msrclr instruction is not enabled. We use this to detect 67 + * if the opcode is available, by issuing msrclr and then testing the result. 68 + * r8 == 0 - msr instructions are implemented 69 + * r8 != 0 - msr instructions are not implemented 68 70 */ 69 - /* r8=0 - I have msr instr, 1 - I don't have them */ 70 - rsubi r0, r0, 1 /* set the carry bit */ 71 - msrclr r0, 0x4 /* try to clear it */ 72 - /* read the carry bit, r8 will be '0' if msrclr exists */ 73 - addik r8, r0, 0 71 + msrclr r8, 0 /* clear nothing - just read msr for test */ 72 + cmpu r8, r8, r1 /* r1 must contain msr reg content */ 74 73 75 74 /* r7 may point to an FDT, or there may be one linked in. 76 75 if it's in r7, we've got to save it away ASAP.
+2 -2
arch/microblaze/kernel/setup.c
··· 161 161 #if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR 162 162 if (msr) 163 163 eprintk("!!!Your kernel has setup MSR instruction but " 164 - "CPU don't have it %d\n", msr); 164 + "CPU don't have it %x\n", msr); 165 165 #else 166 166 if (!msr) 167 167 eprintk("!!!Your kernel not setup MSR instruction but " 168 - "CPU have it %d\n", msr); 168 + "CPU have it %x\n", msr); 169 169 #endif 170 170 171 171 for (src = __ivt_start; src < __ivt_end; src++, dst++)