mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 22:54:05 +08:00
nios2 update for v4.10-rc1
- add screen_info - Convert pfn_valid to static inline - Extend !__ASSEMBLY__ section in asm/page.h -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJYUBZhAAoJEFWoEK+e3syCmf4P/RDtx6MaWMfejcW9FNOb4qfT ePfwoVQN7URtRD7uxuGOLSL92mkIR8s+tJyHs0/pa9eCSmv8+hN1dpNTUAMLJ25k yb4FWOEM18JNcFs8Velv35ItTHlhVGIZ8gNPKPqaZ4ktCkz4ur824j40jKCtXC+t pKN8UFDFhVifGYOWZ0W7YsxYE8gLIqctXOTOBE91RxP8CrYIHQYW19ImRINgqw1m PAu+HexBeUANokL8GXelCAE8OyCPVccoKtUe79ezg38VQBfwb7UgXRWFL9zha73N Ipl3BfkElO5l3bkJ8/WZDdRdcvZtKemcShI9OjNHsiTEsI95/cWFHf9YSOdxi3fi Ck+wjOVjcoJPXsdiqsARC5zjFj3wuNNscQ8Ykok9faizY4OhIZ8vwnPfF/A60vZV k9rna8uzQVQPhsNN+0qbceZWuMMiblIMbmrg4Lp2rsTNF75mWZ25nYD7pDXPgO5/ 3YnOOeFUgZAH2p9e1cNzQAvDELk9/vncucEXpkHU+ylJl3EScN1X3mZiakxMe3m9 dnyxrFy3GPiVcUTgWGLEWfLAXLmT9QS9cX6bMzMPFSaG3YAxPCSHE/fKHfrOelZW r2fUdzuOEfW85pTbQdtjKG8ifnaE2JAg0UlgkjWtdS0Uohzknb6nJBUEfoBxXL32 1a9yL+xFxdA9fPrWS6LE =SwZh -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
70f56cbbdc
@ -76,8 +76,6 @@ extern unsigned long memory_size;
|
||||
|
||||
extern struct page *mem_map;
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
# define __pa(x) \
|
||||
((unsigned long)(x) - PAGE_OFFSET + PHYS_OFFSET)
|
||||
# define __va(x) \
|
||||
@ -87,8 +85,15 @@ extern struct page *mem_map;
|
||||
((void *)(((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET)
|
||||
|
||||
# define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
|
||||
# define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && \
|
||||
(pfn) < max_mapnr)
|
||||
|
||||
static inline bool pfn_valid(unsigned long pfn)
|
||||
{
|
||||
/* avoid <linux/mm.h> include hell */
|
||||
extern unsigned long max_mapnr;
|
||||
unsigned long pfn_offset = ARCH_PFN_OFFSET;
|
||||
|
||||
return pfn >= pfn_offset && pfn < max_mapnr;
|
||||
}
|
||||
|
||||
# define virt_to_page(vaddr) pfn_to_page(PFN_DOWN(virt_to_phys(vaddr)))
|
||||
# define virt_addr_valid(vaddr) pfn_valid(PFN_DOWN(virt_to_phys(vaddr)))
|
||||
@ -106,4 +111,6 @@ extern struct page *mem_map;
|
||||
|
||||
#include <asm-generic/getorder.h>
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
#endif /* _ASM_NIOS2_PAGE_H */
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <linux/bootmem.h>
|
||||
#include <linux/initrd.h>
|
||||
#include <linux/of_fdt.h>
|
||||
#include <linux/screen_info.h>
|
||||
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/sections.h>
|
||||
@ -36,6 +37,10 @@ static struct pt_regs fake_regs = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0};
|
||||
|
||||
#ifdef CONFIG_VT
|
||||
struct screen_info screen_info;
|
||||
#endif
|
||||
|
||||
/* Copy a short hook instruction sequence to the exception address */
|
||||
static inline void copy_exception_handler(unsigned int addr)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user