NIOS2: update for v6.18
- Replace __ASSEMBLY__ with __ASSEMBLER__ in headers - Set memblock.current_limit when setting pfn limits -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoHhMeiyk5VmwVMwNGZQEC4GjKPQFAmjT10cACgkQGZQEC4Gj KPTm7BAArBs7m4aDXZJx6WEj7v0cD5QcWpMq46atg9LZDVbeInnQucIbQ8RbipHj 14fF00r1fxbx0OH0MpyDlbeavHsB28H7Vd329yADIxBHuCfDUtUv5OxgNo1FuTGr a72kUjxWqOZmMaYr08ccnszVOXMcRCe2+R4UoF0g446Td/ODc2EReHUhdgDS4PYB iZ8XqBUwO40mcIFGgGt8JHXoaRipbeBbNY8OmvluLf6QdAMs2F5GR2D2tcnRAzIz BXLbLXxLYq9xdK/SsInFHzBkYb1uBETjvg7Bvm7U9CreRZJq38VuZUFv/8+Qqj/k aS699g3p/wkOUeRllLoLUOwej8aBDDY1bpXLD8TGQ6hhuXyru0+H3PA/f19k52no uBMBenPCzd8LTFN6DFdhyxvPDTkxvLlJSuHapFAiCLAYrDewV0wmVpEKuBAfgG4T iBuI+UTq7jwXQqyxQn2sh7za5TiP4+r0Wx/Bn7L7xWSh1MYVeuLUCTZ6LMGjxUV9 QiFKuiGf7tS248KX5KMCiWYppqWcpWvQCxnZ593VS8yj78OZbLEHwZ0m7QCC629U N+pW2xa4rBJW0PkvBfs8u9Nrl1qFztUgj5G/hhIwuAS/5QoLpBQzmPs48HH3YxTL zD2AZ1/Nx/xNdZb1w3yu07MXgcbnhMcO88F/wJ9aa9hEHmQycv8= =1VJi -----END PGP SIGNATURE----- Merge tag 'nios2_update_for_v6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux Pull NIOS2 updates from Dinh Nguyen: - Replace __ASSEMBLY__ with __ASSEMBLER__ in headers - Set memblock.current_limit when setting pfn limits * tag 'nios2_update_for_v6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: nios2: ensure that memblock.current_limit is set when setting pfn limits nios2: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers nios2: Replace __ASSEMBLY__ with __ASSEMBLER__ in uapi headers
This commit is contained in:
commit
46a1b6b2aa
|
@ -10,7 +10,7 @@
|
|||
#ifndef _ASM_NIOS2_ENTRY_H
|
||||
#define _ASM_NIOS2_ENTRY_H
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
#ifdef __ASSEMBLER__
|
||||
|
||||
#include <asm/processor.h>
|
||||
#include <asm/registers.h>
|
||||
|
@ -117,5 +117,5 @@
|
|||
addi sp, sp, SWITCH_STACK_SIZE
|
||||
.endm
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ASSEMBLER__ */
|
||||
#endif /* _ASM_NIOS2_ENTRY_H */
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define PAGE_OFFSET \
|
||||
(CONFIG_NIOS2_MEM_BASE + CONFIG_NIOS2_KERNEL_REGION_BASE)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
/*
|
||||
* This gives the physical RAM offset.
|
||||
|
@ -90,6 +90,6 @@ extern struct page *mem_map;
|
|||
|
||||
#include <asm-generic/getorder.h>
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
#endif /* !__ASSEMBLER__ */
|
||||
|
||||
#endif /* _ASM_NIOS2_PAGE_H */
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
/* Kuser helpers is mapped to this user space address */
|
||||
#define KUSER_BASE 0x1000
|
||||
#define KUSER_SIZE (PAGE_SIZE)
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
# define TASK_SIZE 0x7FFF0000UL
|
||||
# define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3))
|
||||
|
@ -72,6 +72,6 @@ extern unsigned long __get_wchan(struct task_struct *p);
|
|||
|
||||
#define cpu_relax() barrier()
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ASSEMBLER__ */
|
||||
|
||||
#endif /* _ASM_NIOS2_PROCESSOR_H */
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
/* This struct defines the way the registers are stored on the
|
||||
stack during a system call. */
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
struct pt_regs {
|
||||
unsigned long r8; /* r8-r15 Caller-saved GP registers */
|
||||
unsigned long r9;
|
||||
|
@ -78,5 +78,5 @@ extern void show_regs(struct pt_regs *);
|
|||
|
||||
int do_syscall_trace_enter(void);
|
||||
void do_syscall_trace_exit(void);
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ASSEMBLER__ */
|
||||
#endif /* _ASM_NIOS2_PTRACE_H */
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#ifndef _ASM_NIOS2_REGISTERS_H
|
||||
#define _ASM_NIOS2_REGISTERS_H
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
#include <asm/cpuinfo.h>
|
||||
#endif
|
||||
|
||||
|
@ -44,7 +44,7 @@
|
|||
|
||||
/* tlbmisc register bits */
|
||||
#define TLBMISC_PID_SHIFT 4
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
#define TLBMISC_PID_MASK ((1UL << cpuinfo.tlb_pid_num_bits) - 1)
|
||||
#endif
|
||||
#define TLBMISC_WAY_MASK 0xf
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include <asm-generic/setup.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
#ifdef __KERNEL__
|
||||
|
||||
extern char exception_handler_hook[];
|
||||
|
@ -18,6 +18,6 @@ extern char fast_handler_end[];
|
|||
extern void pagetable_init(void);
|
||||
|
||||
#endif/* __KERNEL__ */
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ASSEMBLER__ */
|
||||
|
||||
#endif /* _ASM_NIOS2_SETUP_H */
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#define THREAD_SIZE_ORDER 1
|
||||
#define THREAD_SIZE 8192 /* 2 * PAGE_SIZE */
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
/*
|
||||
* low level task data that entry.S needs immediate access to
|
||||
|
@ -61,7 +61,7 @@ static inline struct thread_info *current_thread_info(void)
|
|||
|
||||
return (struct thread_info *)(sp & ~(THREAD_SIZE - 1));
|
||||
}
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
#endif /* !__ASSEMBLER__ */
|
||||
|
||||
/*
|
||||
* thread information flags
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#define TRAP_ID_SYSCALL 0
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
void _exception(int signo, struct pt_regs *regs, int code, unsigned long addr);
|
||||
void do_page_fault(struct pt_regs *regs, unsigned long cause,
|
||||
unsigned long address);
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#ifndef _UAPI_ASM_NIOS2_PTRACE_H
|
||||
#define _UAPI_ASM_NIOS2_PTRACE_H
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
|
@ -80,5 +80,5 @@ struct user_pt_regs {
|
|||
__u32 regs[49];
|
||||
};
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ASSEMBLER__ */
|
||||
#endif /* _UAPI_ASM_NIOS2_PTRACE_H */
|
||||
|
|
|
@ -142,6 +142,20 @@ static void __init find_limits(unsigned long *min, unsigned long *max_low,
|
|||
*max_high = PFN_DOWN(memblock_end_of_DRAM());
|
||||
}
|
||||
|
||||
static void __init adjust_lowmem_bounds(void)
|
||||
{
|
||||
phys_addr_t block_start, block_end;
|
||||
u64 i;
|
||||
phys_addr_t memblock_limit = 0;
|
||||
|
||||
for_each_mem_range(i, &block_start, &block_end) {
|
||||
if (block_end > memblock_limit)
|
||||
memblock_limit = block_end;
|
||||
}
|
||||
|
||||
memblock_set_current_limit(memblock_limit);
|
||||
}
|
||||
|
||||
void __init setup_arch(char **cmdline_p)
|
||||
{
|
||||
console_verbose();
|
||||
|
@ -157,6 +171,7 @@ void __init setup_arch(char **cmdline_p)
|
|||
/* Keep a copy of command line */
|
||||
*cmdline_p = boot_command_line;
|
||||
|
||||
adjust_lowmem_bounds();
|
||||
find_limits(&min_low_pfn, &max_low_pfn, &max_pfn);
|
||||
|
||||
memblock_reserve(__pa_symbol(_stext), _end - _stext);
|
||||
|
|
Loading…
Reference in New Issue