Skip to content

Commit 939f1b9

Browse files
soleenwilldeacon
authored andcommitted
arm64: kexec: remove the pre-kexec PoC maintenance
Now that kexec does its relocations with the MMU enabled, we no longer need to clean the relocation data to the PoC. Suggested-by: James Morse <[email protected]> Signed-off-by: Pasha Tatashin <[email protected]> Acked-by: Catalin Marinas <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent efc2d0f commit 939f1b9

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

arch/arm64/kernel/machine_kexec.c

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -77,48 +77,6 @@ int machine_kexec_prepare(struct kimage *kimage)
7777
return 0;
7878
}
7979

80-
/**
81-
* kexec_list_flush - Helper to flush the kimage list and source pages to PoC.
82-
*/
83-
static void kexec_list_flush(struct kimage *kimage)
84-
{
85-
kimage_entry_t *entry;
86-
87-
dcache_clean_inval_poc((unsigned long)kimage,
88-
(unsigned long)kimage + sizeof(*kimage));
89-
90-
for (entry = &kimage->head; ; entry++) {
91-
unsigned int flag;
92-
unsigned long addr;
93-
94-
/* flush the list entries. */
95-
dcache_clean_inval_poc((unsigned long)entry,
96-
(unsigned long)entry +
97-
sizeof(kimage_entry_t));
98-
99-
flag = *entry & IND_FLAGS;
100-
if (flag == IND_DONE)
101-
break;
102-
103-
addr = (unsigned long)phys_to_virt(*entry & PAGE_MASK);
104-
105-
switch (flag) {
106-
case IND_INDIRECTION:
107-
/* Set entry point just before the new list page. */
108-
entry = (kimage_entry_t *)addr - 1;
109-
break;
110-
case IND_SOURCE:
111-
/* flush the source pages. */
112-
dcache_clean_inval_poc(addr, addr + PAGE_SIZE);
113-
break;
114-
case IND_DESTINATION:
115-
break;
116-
default:
117-
BUG();
118-
}
119-
}
120-
}
121-
12280
/**
12381
* kexec_segment_flush - Helper to flush the kimage segments to PoC.
12482
*/
@@ -207,7 +165,6 @@ int machine_kexec_post_load(struct kimage *kimage)
207165
(unsigned long)reloc_code + reloc_size);
208166
icache_inval_pou((uintptr_t)reloc_code,
209167
(uintptr_t)reloc_code + reloc_size);
210-
kexec_list_flush(kimage);
211168
kexec_image_info(kimage);
212169

213170
return 0;

0 commit comments

Comments
 (0)