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

Merge tag 'nios2-v4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2

Pull arch/nios2 updates from Ley Foon Tan:

- add screen_info

- Convert pfn_valid to static inline

- Extend !__ASSEMBLY__ section in asm/page.h

* tag 'nios2-v4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2:
nios2: add screen_info
nios2: Convert pfn_valid to static inline
nios2: Extend !__ASSEMBLY__ section in asm/page.h

+16 -4
+11 -4
arch/nios2/include/asm/page.h
··· 76 76 77 77 extern struct page *mem_map; 78 78 79 - #endif /* !__ASSEMBLY__ */ 80 - 81 79 # define __pa(x) \ 82 80 ((unsigned long)(x) - PAGE_OFFSET + PHYS_OFFSET) 83 81 # define __va(x) \ ··· 85 87 ((void *)(((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET) 86 88 87 89 # define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) 88 - # define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && \ 89 - (pfn) < max_mapnr) 90 + 91 + static inline bool pfn_valid(unsigned long pfn) 92 + { 93 + /* avoid <linux/mm.h> include hell */ 94 + extern unsigned long max_mapnr; 95 + unsigned long pfn_offset = ARCH_PFN_OFFSET; 96 + 97 + return pfn >= pfn_offset && pfn < max_mapnr; 98 + } 90 99 91 100 # define virt_to_page(vaddr) pfn_to_page(PFN_DOWN(virt_to_phys(vaddr))) 92 101 # define virt_addr_valid(vaddr) pfn_valid(PFN_DOWN(virt_to_phys(vaddr))) ··· 110 105 #include <asm-generic/memory_model.h> 111 106 112 107 #include <asm-generic/getorder.h> 108 + 109 + #endif /* !__ASSEMBLY__ */ 113 110 114 111 #endif /* _ASM_NIOS2_PAGE_H */
+5
arch/nios2/kernel/setup.c
··· 18 18 #include <linux/bootmem.h> 19 19 #include <linux/initrd.h> 20 20 #include <linux/of_fdt.h> 21 + #include <linux/screen_info.h> 21 22 22 23 #include <asm/mmu_context.h> 23 24 #include <asm/sections.h> ··· 36 35 static struct pt_regs fake_regs = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37 36 0, 0, 0, 0, 0, 0, 38 37 0}; 38 + 39 + #ifdef CONFIG_VT 40 + struct screen_info screen_info; 41 + #endif 39 42 40 43 /* Copy a short hook instruction sequence to the exception address */ 41 44 static inline void copy_exception_handler(unsigned int addr)