Skip to content

Commit 09ef295

Browse files
committed
Merge tag 'loongarch-fixes-6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
Pull LoongArch fixes from Huacai Chen: "Fix some build errors and some trivial runtime bugs" * tag 'loongarch-fixes-6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: LoongArch: Lately init pmu after smp is online LoongArch: Fix callchain parse error with kernel tracepoint events LoongArch: Fix access error when read fault on a write-only VMA LoongArch: Fix a build error due to __tlb_remove_tlb_entry() LoongArch: Fix Kconfig item and left code related to CRASH_CORE
2 parents 084c473 + f3334eb commit 09ef295

File tree

6 files changed

+14
-8
lines changed

6 files changed

+14
-8
lines changed

arch/loongarch/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ config ARCH_SELECTS_CRASH_DUMP
595595
select RELOCATABLE
596596

597597
config ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION
598-
def_bool CRASH_CORE
598+
def_bool CRASH_RESERVE
599599

600600
config RELOCATABLE
601601
bool "Relocatable kernel"

arch/loongarch/include/asm/crash_core.h renamed to arch/loongarch/include/asm/crash_reserve.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* SPDX-License-Identifier: GPL-2.0-only */
2-
#ifndef _LOONGARCH_CRASH_CORE_H
3-
#define _LOONGARCH_CRASH_CORE_H
2+
#ifndef _LOONGARCH_CRASH_RESERVE_H
3+
#define _LOONGARCH_CRASH_RESERVE_H
44

55
#define CRASH_ALIGN SZ_2M
66

arch/loongarch/include/asm/perf_event.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
#ifndef __LOONGARCH_PERF_EVENT_H__
88
#define __LOONGARCH_PERF_EVENT_H__
99

10+
#include <asm/ptrace.h>
11+
1012
#define perf_arch_bpf_user_pt_regs(regs) (struct user_pt_regs *)regs
1113

14+
#define perf_arch_fetch_caller_regs(regs, __ip) { \
15+
(regs)->csr_era = (__ip); \
16+
(regs)->regs[3] = current_stack_pointer; \
17+
(regs)->regs[22] = (unsigned long) __builtin_frame_address(0); \
18+
}
19+
1220
#endif /* __LOONGARCH_PERF_EVENT_H__ */

arch/loongarch/include/asm/tlb.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,6 @@ static __always_inline void invtlb_all(u32 op, u32 info, u64 addr)
132132
);
133133
}
134134

135-
#define __tlb_remove_tlb_entry(tlb, ptep, address) do { } while (0)
136-
137135
static void tlb_flush(struct mmu_gather *tlb);
138136

139137
#define tlb_flush tlb_flush

arch/loongarch/kernel/perf_event.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,4 +884,4 @@ static int __init init_hw_perf_events(void)
884884

885885
return 0;
886886
}
887-
early_initcall(init_hw_perf_events);
887+
pure_initcall(init_hw_perf_events);

arch/loongarch/mm/fault.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,10 @@ static void __kprobes __do_page_fault(struct pt_regs *regs,
202202
if (!(vma->vm_flags & VM_WRITE))
203203
goto bad_area;
204204
} else {
205-
if (!(vma->vm_flags & VM_READ) && address != exception_era(regs))
206-
goto bad_area;
207205
if (!(vma->vm_flags & VM_EXEC) && address == exception_era(regs))
208206
goto bad_area;
207+
if (!(vma->vm_flags & (VM_READ | VM_WRITE)) && address != exception_era(regs))
208+
goto bad_area;
209209
}
210210

211211
/*

0 commit comments

Comments
 (0)