arm64: remove dead code
PATCH 1/1 arm64: remove dead code
Commit 68234df4ea79 ("arm64: kill flush_cache_all()") removed soft_reset() from the kernel. This was the only caller of setup_mm_for_reboot(), so remove that also.
--- arch/arm64/include/asm/mmu.h | 1 - arch/arm64/mm/mmu.c | 11 ----------- 2 files changed, 12 deletions(-)
arch/arm64/include/asm/mmu.h +0 -1
@@ -28,7 +28,6 @@ typedef struct {#define ASID (mm) ((mm)->context.id & 0xffff)extern void paging_init (void ); -extern void setup_mm_for_reboot (void );extern void __iomem *early_io_map (phys_addr_t phys,unsigned long virt);extern void init_mem_pgprot (void ); extern void create_pgd_mapping(struct mm_struct *mm, phys_addr_t phys,
arch/arm64/mm/mmu.c +0 -11
@@ -461,17 +461,6 @@ void __init paging_init(void) }/* -* Enable the identity mapping to allow the MMU disabling. -*/ -void setup_mm_for_reboot (void ) -{ -cpu_set_reserved_ttbr0 (); -flush_tlb_all (); -cpu_set_idmap_tcr_t0sz (); -cpu_switch_mm (idmap_pg_dir, &init_mm); -} - -/* * Check whether a kernel address is valid (derived from arch/x86/). */ int kern_addr_valid (unsigned long addr)
Signature · 1 line
2.4.3
(adding Geoff and Takahiro)
Quoted 4 lines · Mark Salter
Commit
68234df4ea79("arm64: killflush_cache_all()") removedsoft_reset()from the kernel. This was the only caller ofsetup_mm_for_reboot(), so remove that also.
I am wondering if setup_mm_for_reboot() is being used in the kexec patches. Perhaps we should check that before removing it.
Geoff?
Quoted 43 lines
Signed-off-by Mark Salter <[email protected]>--- arch/arm64/include/asm/mmu.h | 1 - arch/arm64/mm/mmu.c | 11 ----------- 2 files changed, 12 deletions(-)arch/arm64/include/asm/mmu.h +0
-1@@ -28,7 +28,6 @@ typedef struct {#define ASID (mm) ((mm)->context.id & 0xffff)extern void paging_init (void ); -extern void setup_mm_for_reboot (void );extern void __iomem *early_io_map (phys_addr_t phys,unsigned long virt);extern void init_mem_pgprot (void ); extern void create_pgd_mapping(struct mm_struct *mm, phys_addr_t phys,arch/arm64/mm/mmu.c +0
-12@@ -461,17 +461,6 @@ void __init paging_init(void) }/* -* Enable the identity mapping to allow the MMU disabling. -*/ -void setup_mm_for_reboot (void ) -{ -cpu_set_reserved_ttbr0 (); -flush_tlb_all (); -cpu_set_idmap_tcr_t0sz (); -cpu_switch_mm (idmap_pg_dir, &init_mm); -} - -/* * Check whether a kernel address is valid (derived from arch/x86/). */ int kern_addr_valid (unsigned long addr) --2.4.3
(use Geoff's correct email address)
Quoted 57 lines · Ard Biesheuvel
(adding Geoff and Takahiro)
Quoted 4 lines · Mark Salter
Commit
68234df4ea79("arm64: killflush_cache_all()") removedsoft_reset()from the kernel. This was the only caller ofsetup_mm_for_reboot(), so remove that also.I am wondering if
setup_mm_for_reboot()is being used in the kexec patches. Perhaps we should check that before removing it.Geoff?
Quoted 43 lines
Signed-off-by Mark Salter <[email protected]>--- arch/arm64/include/asm/mmu.h | 1 - arch/arm64/mm/mmu.c | 11 ----------- 2 files changed, 12 deletions(-)arch/arm64/include/asm/mmu.h +0
-1@@ -28,7 +28,6 @@ typedef struct {#define ASID (mm) ((mm)->context.id & 0xffff)extern void paging_init (void ); -extern void setup_mm_for_reboot (void );extern void __iomem *early_io_map (phys_addr_t phys,unsigned long virt);extern void init_mem_pgprot (void ); extern void create_pgd_mapping(struct mm_struct *mm, phys_addr_t phys,arch/arm64/mm/mmu.c +0
-12@@ -461,17 +461,6 @@ void __init paging_init(void) }/* -* Enable the identity mapping to allow the MMU disabling. -*/ -void setup_mm_for_reboot (void ) -{ -cpu_set_reserved_ttbr0 (); -flush_tlb_all (); -cpu_set_idmap_tcr_t0sz (); -cpu_switch_mm (idmap_pg_dir, &init_mm); -} - -/* * Check whether a kernel address is valid (derived from arch/x86/). */ int kern_addr_valid (unsigned long addr) --2.4.3
Quoted 13 lines · Ard Biesheuvel
(use Geoff's correct email address)
Quoted 10 lines · Ard Biesheuvel
(adding Geoff and Takahiro)
Quoted 4 lines · Mark Salter
Commit
68234df4ea79("arm64: killflush_cache_all()") removedsoft_reset()from the kernel. This was the only caller ofsetup_mm_for_reboot(), so remove that also.I am wondering if
setup_mm_for_reboot()is being used in the kexec patches. Perhaps we should check that before removing it.
Well, given that I can't see any kexec patches on the radar for 4.3, I'm happy to merge this clean-up and Geoff can reintroduce the function in his series if he needs it.
Will
Quoted 12 lines · Will Deacon
Quoted 11 lines · Ard Biesheuvel
(use Geoff's correct email address)
Quoted 8 lines · Ard Biesheuvel
(adding Geoff and Takahiro)
Quoted 4 lines · Mark Salter
Commit
68234df4ea79("arm64: killflush_cache_all()") removedsoft_reset()from the kernel. This was the only caller ofsetup_mm_for_reboot(), so remove that also.
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
I am wondering if
setup_mm_for_reboot()is being used in the kexec patches. Perhaps we should check that before removing it.Well, given that I can't see any kexec patches on the radar for 4.3, I'm happy to merge this clean-up and Geoff can reintroduce the function in his series if he needs it.
OK, fair enough
Hi,
Quoted 7 lines · Ard Biesheuvel
Quoted 7 lines · Mark Salter
Quoted 3 lines
Commit
68234df4ea79("arm64: killflush_cache_all()") removedsoft_reset()from the kernel. This was the only caller ofsetup_mm_for_reboot(), so remove that also.I am wondering if
setup_mm_for_reboot()is being used in the kexec patches. Perhaps we should check that before removing it.
The whole CPU reset support that kexec was using was removed.
I started on reimplementing a new cpu_reset() routine (in my master branch at [1]), but I can only work on it when I have some extra time, and these days that is not very often.
[1] https://git.kernel.org/cgit/linux/kernel/git/geoff/linux-kexec.git/
-Geoff