diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-08-29 12:20:25 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-08-29 12:20:25 -0700 |
commit | eaf9f4649cf03ba3442712497a30686380ba7c23 (patch) | |
tree | cef2ec5cefd54747eb81b7774c37978a31801044 /arch | |
parent | 48d25d382643a9d8867f8eb13af231268ab10db5 (diff) | |
parent | c8171a86b27401aa1f492dd1f080f3102264f1ab (diff) |
Merge tag 'csky-for-linus-6.6' of https://github.com/c-sky/csky-linux
Pull arch/csky updates from Guo Ren:
- Fixup compile warnings
- Fixup update_mmu_cache
* tag 'csky-for-linus-6.6' of https://github.com/c-sky/csky-linux:
csky: Fixup -Wmissing-prototypes warning
csky: Make pfn accessors static inlines
csky: Cast argument to virt_to_pfn() to (void *)
csky: pgtable: Invalidate stale I-cache lines in update_mmu_cache
csky: fix old style declaration in module.c
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arc/include/asm/page.h | 2 | ||||
-rw-r--r-- | arch/csky/abiv2/cacheflush.c | 4 | ||||
-rw-r--r-- | arch/csky/include/asm/page.h | 13 | ||||
-rw-r--r-- | arch/csky/include/asm/ptrace.h | 2 | ||||
-rw-r--r-- | arch/csky/include/asm/sections.h | 2 | ||||
-rw-r--r-- | arch/csky/include/asm/traps.h | 15 | ||||
-rw-r--r-- | arch/csky/kernel/module.c | 2 | ||||
-rw-r--r-- | arch/csky/kernel/vdso/vgettimeofday.c | 11 |
8 files changed, 43 insertions, 8 deletions
diff --git a/arch/arc/include/asm/page.h b/arch/arc/include/asm/page.h index e43fe27ec54d..02b53ad811fb 100644 --- a/arch/arc/include/asm/page.h +++ b/arch/arc/include/asm/page.h @@ -108,7 +108,7 @@ extern int pfn_valid(unsigned long pfn); #else /* CONFIG_HIGHMEM */ -#define ARCH_PFN_OFFSET virt_to_pfn(CONFIG_LINUX_RAM_BASE) +#define ARCH_PFN_OFFSET virt_to_pfn((void *)CONFIG_LINUX_RAM_BASE) #endif /* CONFIG_HIGHMEM */ diff --git a/arch/csky/abiv2/cacheflush.c b/arch/csky/abiv2/cacheflush.c index 9923cd24db58..500eb8f69397 100644 --- a/arch/csky/abiv2/cacheflush.c +++ b/arch/csky/abiv2/cacheflush.c @@ -27,11 +27,9 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, addr = (unsigned long) kmap_atomic(page); + icache_inv_range(address, address + PAGE_SIZE); dcache_wb_range(addr, addr + PAGE_SIZE); - if (vma->vm_flags & VM_EXEC) - icache_inv_range(addr, addr + PAGE_SIZE); - kunmap_atomic((void *) addr); } diff --git a/arch/csky/include/asm/page.h b/arch/csky/include/asm/page.h index b23e3006a9e0..4a0502e324a6 100644 --- a/arch/csky/include/asm/page.h +++ b/arch/csky/include/asm/page.h @@ -34,9 +34,6 @@ #include <linux/pfn.h> -#define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT) -#define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT) - #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && \ (void *)(kaddr) < high_memory) @@ -80,6 +77,16 @@ extern unsigned long va_pa_offset; #define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x), 0)) +static inline unsigned long virt_to_pfn(const void *kaddr) +{ + return __pa(kaddr) >> PAGE_SHIFT; +} + +static inline void * pfn_to_virt(unsigned long pfn) +{ + return (void *)((unsigned long)__va(pfn) << PAGE_SHIFT); +} + #define MAP_NR(x) PFN_DOWN((unsigned long)(x) - PAGE_OFFSET - \ PHYS_OFFSET_OFFSET) #define virt_to_page(x) (mem_map + MAP_NR(x)) diff --git a/arch/csky/include/asm/ptrace.h b/arch/csky/include/asm/ptrace.h index 4202aab6df42..0634b7895d81 100644 --- a/arch/csky/include/asm/ptrace.h +++ b/arch/csky/include/asm/ptrace.h @@ -96,5 +96,7 @@ static inline unsigned long regs_get_register(struct pt_regs *regs, return *(unsigned long *)((unsigned long)regs + offset); } +asmlinkage int syscall_trace_enter(struct pt_regs *regs); +asmlinkage void syscall_trace_exit(struct pt_regs *regs); #endif /* __ASSEMBLY__ */ #endif /* __ASM_CSKY_PTRACE_H */ diff --git a/arch/csky/include/asm/sections.h b/arch/csky/include/asm/sections.h index 4192cba8445d..83e82b7c0f6c 100644 --- a/arch/csky/include/asm/sections.h +++ b/arch/csky/include/asm/sections.h @@ -7,4 +7,6 @@ extern char _start[]; +asmlinkage void csky_start(unsigned int unused, void *dtb_start); + #endif /* __ASM_SECTIONS_H */ diff --git a/arch/csky/include/asm/traps.h b/arch/csky/include/asm/traps.h index 421a4195e2fe..1e7d303b91e9 100644 --- a/arch/csky/include/asm/traps.h +++ b/arch/csky/include/asm/traps.h @@ -40,4 +40,19 @@ do { \ void csky_alignment(struct pt_regs *regs); +asmlinkage void do_trap_unknown(struct pt_regs *regs); +asmlinkage void do_trap_zdiv(struct pt_regs *regs); +asmlinkage void do_trap_buserr(struct pt_regs *regs); +asmlinkage void do_trap_misaligned(struct pt_regs *regs); +asmlinkage void do_trap_bkpt(struct pt_regs *regs); +asmlinkage void do_trap_illinsn(struct pt_regs *regs); +asmlinkage void do_trap_fpe(struct pt_regs *regs); +asmlinkage void do_trap_priv(struct pt_regs *regs); +asmlinkage void trap_c(struct pt_regs *regs); + +asmlinkage void do_notify_resume(struct pt_regs *regs, + unsigned long thread_info_flags); + +void trap_init(void); + #endif /* __ASM_CSKY_TRAPS_H */ diff --git a/arch/csky/kernel/module.c b/arch/csky/kernel/module.c index f11b3e573344..0b56a8cd12a3 100644 --- a/arch/csky/kernel/module.c +++ b/arch/csky/kernel/module.c @@ -40,7 +40,7 @@ static void jsri_2_lrw_jsr(uint32_t *location) } } #else -static void inline jsri_2_lrw_jsr(uint32_t *location) +static inline void jsri_2_lrw_jsr(uint32_t *location) { return; } diff --git a/arch/csky/kernel/vdso/vgettimeofday.c b/arch/csky/kernel/vdso/vgettimeofday.c index da491832c098..c4831145eed5 100644 --- a/arch/csky/kernel/vdso/vgettimeofday.c +++ b/arch/csky/kernel/vdso/vgettimeofday.c @@ -3,6 +3,9 @@ #include <linux/time.h> #include <linux/types.h> +extern +int __vdso_clock_gettime(clockid_t clock, + struct old_timespec32 *ts); int __vdso_clock_gettime(clockid_t clock, struct old_timespec32 *ts) { @@ -10,17 +13,25 @@ int __vdso_clock_gettime(clockid_t clock, } int __vdso_clock_gettime64(clockid_t clock, + struct __kernel_timespec *ts); +int __vdso_clock_gettime64(clockid_t clock, struct __kernel_timespec *ts) { return __cvdso_clock_gettime(clock, ts); } +extern +int __vdso_gettimeofday(struct __kernel_old_timeval *tv, + struct timezone *tz); int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz) { return __cvdso_gettimeofday(tv, tz); } +extern +int __vdso_clock_getres(clockid_t clock_id, + struct old_timespec32 *res); int __vdso_clock_getres(clockid_t clock_id, struct old_timespec32 *res) { |