Skip to content

Commit 4ab6320

Browse files
committedFeb 14, 2025
Automatic merge of 'fixes' into merge (2025-02-14 17:56)
2 parents 21b6db2 + d262a19 commit 4ab6320

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed
 

‎arch/powerpc/include/asm/book3s/64/hash-4k.h

+10-2
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,17 @@
7777
/*
7878
* With 4K page size the real_pte machinery is all nops.
7979
*/
80-
#define __real_pte(e, p, o) ((real_pte_t){(e)})
80+
static inline real_pte_t __real_pte(pte_t pte, pte_t *ptep, int offset)
81+
{
82+
return (real_pte_t){pte};
83+
}
84+
8185
#define __rpte_to_pte(r) ((r).pte)
82-
#define __rpte_to_hidx(r,index) (pte_val(__rpte_to_pte(r)) >> H_PAGE_F_GIX_SHIFT)
86+
87+
static inline unsigned long __rpte_to_hidx(real_pte_t rpte, unsigned long index)
88+
{
89+
return pte_val(__rpte_to_pte(rpte)) >> H_PAGE_F_GIX_SHIFT;
90+
}
8391

8492
#define pte_iterate_hashed_subpages(rpte, psize, va, index, shift) \
8593
do { \

‎arch/powerpc/lib/code-patching.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ static int text_area_cpu_up(unsigned int cpu)
108108
unsigned long addr;
109109
int err;
110110

111-
area = get_vm_area(PAGE_SIZE, VM_ALLOC);
111+
area = get_vm_area(PAGE_SIZE, 0);
112112
if (!area) {
113113
WARN_ONCE(1, "Failed to create text area for cpu %d\n",
114114
cpu);
@@ -493,7 +493,9 @@ static int __do_patch_instructions_mm(u32 *addr, u32 *code, size_t len, bool rep
493493

494494
orig_mm = start_using_temp_mm(patching_mm);
495495

496+
kasan_disable_current();
496497
err = __patch_instructions(patch_addr, code, len, repeat_instr);
498+
kasan_enable_current();
497499

498500
/* context synchronisation performed by __patch_instructions */
499501
stop_using_temp_mm(patching_mm, orig_mm);

0 commit comments

Comments
 (0)