Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arch/riscv/errata/mips/errata.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void mips_errata_patch_func(struct alt_entry *begin, struct alt_entry *end,
}

tmp = (1U << alt->patch_id);
if (cpu_req_errata && tmp) {
if (cpu_req_errata & tmp) {
mutex_lock(&text_mutex);
patch_text_nosync(ALT_OLD_PTR(alt), ALT_ALT_PTR(alt),
alt->alt_len);
Expand Down
4 changes: 2 additions & 2 deletions arch/riscv/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,8 @@ static int compat_riscv_gpr_set(struct task_struct *target,
struct compat_user_regs_struct cregs;

ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &cregs, 0, -1);

cregs_to_regs(&cregs, task_pt_regs(target));
if (!ret)
cregs_to_regs(&cregs, task_pt_regs(target));

return ret;
}
Expand Down
4 changes: 4 additions & 0 deletions arch/riscv/mm/hugetlbpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ int huge_ptep_set_access_flags(struct vm_area_struct *vma,
order = napot_cont_order(pte);
pte_num = napot_pte_num(order);
ptep = huge_pte_offset(mm, addr, napot_cont_size(order));
if (!ptep)
return 0;
orig_pte = get_clear_contig_flush(mm, addr, ptep, pte_num);

if (pte_dirty(orig_pte))
Expand Down Expand Up @@ -335,6 +337,8 @@ void huge_ptep_set_wrprotect(struct mm_struct *mm,
order = napot_cont_order(pte);
pte_num = napot_pte_num(order);
ptep = huge_pte_offset(mm, addr, napot_cont_size(order));
if (!ptep)
return;
orig_pte = get_clear_contig_flush(mm, addr, ptep, pte_num);

orig_pte = pte_wrprotect(orig_pte);
Expand Down
2 changes: 1 addition & 1 deletion arch/riscv/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1660,7 +1660,7 @@ static void __meminit remove_pte_mapping(pte_t *pte_base, unsigned long addr, un

ptep = pte_base + pte_index(addr);
pte = ptep_get(ptep);
if (!pte_present(*ptep))
if (!pte_present(pte))
continue;

pte_clear(&init_mm, addr, ptep);
Expand Down
4 changes: 4 additions & 0 deletions arch/riscv/mm/pageattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,10 @@ static int __set_memory(unsigned long addr, int numpages, pgprot_t set_mask,
int i, page_start;

area = find_vm_area((void *)start);
if (!area) {
ret = -EINVAL;
goto unlock;
}
page_start = (start - (unsigned long)area->addr) >> PAGE_SHIFT;

for (i = page_start; i < page_start + numpages; ++i) {
Expand Down
Loading