Skip to content

Commit

Permalink
Merge tag 'loongarch-fixes-6.9-2' of git://git.kernel.org/pub/scm/lin…
Browse files Browse the repository at this point in the history
…ux/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
  • Loading branch information
torvalds committed Apr 26, 2024
2 parents 084c473 + f3334eb commit 09ef295
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion arch/loongarch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ config ARCH_SELECTS_CRASH_DUMP
select RELOCATABLE

config ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION
def_bool CRASH_CORE
def_bool CRASH_RESERVE

config RELOCATABLE
bool "Relocatable kernel"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef _LOONGARCH_CRASH_CORE_H
#define _LOONGARCH_CRASH_CORE_H
#ifndef _LOONGARCH_CRASH_RESERVE_H
#define _LOONGARCH_CRASH_RESERVE_H

#define CRASH_ALIGN SZ_2M

Expand Down
8 changes: 8 additions & 0 deletions arch/loongarch/include/asm/perf_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
#ifndef __LOONGARCH_PERF_EVENT_H__
#define __LOONGARCH_PERF_EVENT_H__

#include <asm/ptrace.h>

#define perf_arch_bpf_user_pt_regs(regs) (struct user_pt_regs *)regs

#define perf_arch_fetch_caller_regs(regs, __ip) { \
(regs)->csr_era = (__ip); \
(regs)->regs[3] = current_stack_pointer; \
(regs)->regs[22] = (unsigned long) __builtin_frame_address(0); \
}

#endif /* __LOONGARCH_PERF_EVENT_H__ */
2 changes: 0 additions & 2 deletions arch/loongarch/include/asm/tlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ static __always_inline void invtlb_all(u32 op, u32 info, u64 addr)
);
}

#define __tlb_remove_tlb_entry(tlb, ptep, address) do { } while (0)

static void tlb_flush(struct mmu_gather *tlb);

#define tlb_flush tlb_flush
Expand Down
2 changes: 1 addition & 1 deletion arch/loongarch/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -884,4 +884,4 @@ static int __init init_hw_perf_events(void)

return 0;
}
early_initcall(init_hw_perf_events);
pure_initcall(init_hw_perf_events);
4 changes: 2 additions & 2 deletions arch/loongarch/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,10 @@ static void __kprobes __do_page_fault(struct pt_regs *regs,
if (!(vma->vm_flags & VM_WRITE))
goto bad_area;
} else {
if (!(vma->vm_flags & VM_READ) && address != exception_era(regs))
goto bad_area;
if (!(vma->vm_flags & VM_EXEC) && address == exception_era(regs))
goto bad_area;
if (!(vma->vm_flags & (VM_READ | VM_WRITE)) && address != exception_era(regs))
goto bad_area;
}

/*
Expand Down

0 comments on commit 09ef295

Please sign in to comment.