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 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus

Pull MIPS fixes from Ralf Baechle:
"Three issues fixed accross the field:

- Some functions that were recently outlined as part of a preemption
fix were causing problems with function tracing.
- The recently merged in-kernel MPI library uses very outdated
headers that contain MIPS-specific code which won't build on with
gcc 4.4 or newer.
- The MIPS non-NUMA memory initialization was making only a very
half-baked attempt at merging adjacent memory ranges. This kept
the code simple enough but is now causing issues with kexec."

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
MPI: Fix compilation on MIPS with GCC 4.4 and newer
MIPS: Fix crash that occurs when function tracing is enabled
MIPS: Merge overlapping bootmem ranges

+41 -12
+20 -6
arch/mips/kernel/setup.c
··· 79 79 void __init add_memory_region(phys_t start, phys_t size, long type) 80 80 { 81 81 int x = boot_mem_map.nr_map; 82 - struct boot_mem_map_entry *prev = boot_mem_map.map + x - 1; 82 + int i; 83 83 84 84 /* Sanity check */ 85 85 if (start + size < start) { ··· 88 88 } 89 89 90 90 /* 91 - * Try to merge with previous entry if any. This is far less than 92 - * perfect but is sufficient for most real world cases. 91 + * Try to merge with existing entry, if any. 93 92 */ 94 - if (x && prev->addr + prev->size == start && prev->type == type) { 95 - prev->size += size; 93 + for (i = 0; i < boot_mem_map.nr_map; i++) { 94 + struct boot_mem_map_entry *entry = boot_mem_map.map + i; 95 + unsigned long top; 96 + 97 + if (entry->type != type) 98 + continue; 99 + 100 + if (start + size < entry->addr) 101 + continue; /* no overlap */ 102 + 103 + if (entry->addr + entry->size < start) 104 + continue; /* no overlap */ 105 + 106 + top = max(entry->addr + entry->size, start + size); 107 + entry->addr = min(entry->addr, start); 108 + entry->size = top - entry->addr; 109 + 96 110 return; 97 111 } 98 112 99 - if (x == BOOT_MEM_MAP_MAX) { 113 + if (boot_mem_map.nr_map == BOOT_MEM_MAP_MAX) { 100 114 pr_err("Ooops! Too many entries in the memory map!\n"); 101 115 return; 102 116 }
+4 -4
arch/mips/lib/mips-atomic.c
··· 56 56 " .set pop \n" 57 57 " .endm \n"); 58 58 59 - void arch_local_irq_disable(void) 59 + notrace void arch_local_irq_disable(void) 60 60 { 61 61 preempt_disable(); 62 62 __asm__ __volatile__( ··· 93 93 " .set pop \n" 94 94 " .endm \n"); 95 95 96 - unsigned long arch_local_irq_save(void) 96 + notrace unsigned long arch_local_irq_save(void) 97 97 { 98 98 unsigned long flags; 99 99 preempt_disable(); ··· 135 135 " .set pop \n" 136 136 " .endm \n"); 137 137 138 - void arch_local_irq_restore(unsigned long flags) 138 + notrace void arch_local_irq_restore(unsigned long flags) 139 139 { 140 140 unsigned long __tmp1; 141 141 ··· 159 159 EXPORT_SYMBOL(arch_local_irq_restore); 160 160 161 161 162 - void __arch_local_irq_restore(unsigned long flags) 162 + notrace void __arch_local_irq_restore(unsigned long flags) 163 163 { 164 164 unsigned long __tmp1; 165 165
+17 -2
lib/mpi/longlong.h
··· 641 641 ************** MIPS ***************** 642 642 ***************************************/ 643 643 #if defined(__mips__) && W_TYPE_SIZE == 32 644 - #if __GNUC__ > 2 || __GNUC_MINOR__ >= 7 644 + #if __GNUC__ >= 4 && __GNUC_MINOR__ >= 4 645 + #define umul_ppmm(w1, w0, u, v) \ 646 + do { \ 647 + UDItype __ll = (UDItype)(u) * (v); \ 648 + w1 = __ll >> 32; \ 649 + w0 = __ll; \ 650 + } while (0) 651 + #elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7 645 652 #define umul_ppmm(w1, w0, u, v) \ 646 653 __asm__ ("multu %2,%3" \ 647 654 : "=l" ((USItype)(w0)), \ ··· 673 666 ************** MIPS/64 ************** 674 667 ***************************************/ 675 668 #if (defined(__mips) && __mips >= 3) && W_TYPE_SIZE == 64 676 - #if __GNUC__ > 2 || __GNUC_MINOR__ >= 7 669 + #if __GNUC__ >= 4 && __GNUC_MINOR__ >= 4 670 + #define umul_ppmm(w1, w0, u, v) \ 671 + do { \ 672 + typedef unsigned int __ll_UTItype __attribute__((mode(TI))); \ 673 + __ll_UTItype __ll = (__ll_UTItype)(u) * (v); \ 674 + w1 = __ll >> 64; \ 675 + w0 = __ll; \ 676 + } while (0) 677 + #elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7 677 678 #define umul_ppmm(w1, w0, u, v) \ 678 679 __asm__ ("dmultu %2,%3" \ 679 680 : "=l" ((UDItype)(w0)), \