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 tag 'for-linus' of https://github.com/openrisc/linux

Pull OpenRISC updates from Stafford Horne:
"Just a few cleanups and updates that were sent in:

- Replace asm/fixmap.h with asm-generic version

- Fix to move memblock setup up before it's used during init"

* tag 'for-linus' of https://github.com/openrisc/linux:
openrisc: Use asm-generic's version of fix_to_virt() & virt_to_fix()
openrisc: Call setup_memory() earlier in the init sequence

+4 -33
+1 -30
arch/openrisc/include/asm/fixmap.h
··· 50 50 /* FIXADDR_BOTTOM might be a better name here... */ 51 51 #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE) 52 52 53 - #define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT)) 54 - #define __virt_to_fix(x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT) 55 - 56 - /* 57 - * 'index to address' translation. If anyone tries to use the idx 58 - * directly without tranlation, we catch the bug with a NULL-deference 59 - * kernel oops. Illegal ranges of incoming indices are caught too. 60 - */ 61 - static __always_inline unsigned long fix_to_virt(const unsigned int idx) 62 - { 63 - /* 64 - * this branch gets completely eliminated after inlining, 65 - * except when someone tries to use fixaddr indices in an 66 - * illegal way. (such as mixing up address types or using 67 - * out-of-range indices). 68 - * 69 - * If it doesn't get removed, the linker will complain 70 - * loudly with a reasonably clear error message.. 71 - */ 72 - if (idx >= __end_of_fixed_addresses) 73 - BUG(); 74 - 75 - return __fix_to_virt(idx); 76 - } 77 - 78 - static inline unsigned long virt_to_fix(const unsigned long vaddr) 79 - { 80 - BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START); 81 - return __virt_to_fix(vaddr); 82 - } 53 + #include <asm-generic/fixmap.h> 83 54 84 55 #endif
+3 -3
arch/openrisc/kernel/setup.c
··· 255 255 256 256 void __init setup_arch(char **cmdline_p) 257 257 { 258 + /* setup memblock allocator */ 259 + setup_memory(); 260 + 258 261 unflatten_and_copy_device_tree(); 259 262 260 263 setup_cpuinfo(); ··· 280 277 initrd_below_start_ok = 1; 281 278 } 282 279 #endif 283 - 284 - /* setup memblock allocator */ 285 - setup_memory(); 286 280 287 281 /* paging_init() sets up the MMU and marks all pages as reserved */ 288 282 paging_init();