[linux-yocto] [PATCH 21/26] arm64: Changes to Patches to support AXXIA kernel
Daniel Dragomir
daniel.dragomir at windriver.com
Wed Nov 16 08:56:57 PST 2016
From: Charlie Paul <cpaul.windriver at gmail.com>
These changes are to support the kexec and kdump on Axxia.
Signed-off-by: Charlie Paul <cpaul.windriver at gmail.com>
---
arch/arm64/include/asm/kvm_host.h | 5 -----
arch/arm64/include/asm/mmu.h | 1 +
arch/arm64/include/asm/proc-fns.h | 2 ++
arch/arm64/kernel/process.c | 2 ++
arch/arm64/mm/mmu.c | 3 ++-
arch/arm64/mm/proc.S | 33 ---------------------------------
6 files changed, 7 insertions(+), 39 deletions(-)
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
index 225e795..cfb58af 100644
--- a/arch/arm64/include/asm/kvm_host.h
+++ b/arch/arm64/include/asm/kvm_host.h
@@ -254,11 +254,6 @@ static inline void __cpu_reset_hyp_mode(phys_addr_t boot_pgd_ptr,
kvm_call_reset(boot_pgd_ptr, phys_idmap_start);
}
-struct vgic_sr_vectors {
- void *save_vgic;
- void *restore_vgic;
-};
-
static inline void kvm_arch_hardware_unsetup(void) {}
static inline void kvm_arch_sync_events(struct kvm *kvm) {}
static inline void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) {}
diff --git a/arch/arm64/include/asm/mmu.h b/arch/arm64/include/asm/mmu.h
index 99064c0..0d1dcaa 100644
--- a/arch/arm64/include/asm/mmu.h
+++ b/arch/arm64/include/asm/mmu.h
@@ -29,6 +29,7 @@ typedef struct {
extern void paging_init(void);
extern void __iomem *early_io_map(phys_addr_t phys, unsigned long virt);
+extern void setup_mm_for_reboot(void);
extern void init_mem_pgprot(void);
extern void create_pgd_mapping(struct mm_struct *mm, phys_addr_t phys,
unsigned long virt, phys_addr_t size,
diff --git a/arch/arm64/include/asm/proc-fns.h b/arch/arm64/include/asm/proc-fns.h
index 220633b..02d8203 100644
--- a/arch/arm64/include/asm/proc-fns.h
+++ b/arch/arm64/include/asm/proc-fns.h
@@ -31,9 +31,11 @@ struct cpu_suspend_ctx;
extern void cpu_cache_off(void);
extern void cpu_do_idle(void);
extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm);
+#if 0
extern void cpu_reset(unsigned long addr) __attribute__((noreturn));
void cpu_soft_restart(phys_addr_t cpu_reset,
unsigned long addr) __attribute__((noreturn));
+#endif
extern void cpu_do_suspend(struct cpu_suspend_ctx *ptr);
extern u64 cpu_do_resume(phys_addr_t ptr, u64 idmap_ttbr);
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
index c6b1f3b..fa23213 100644
--- a/arch/arm64/kernel/process.c
+++ b/arch/arm64/kernel/process.c
@@ -58,6 +58,7 @@ unsigned long __stack_chk_guard __read_mostly;
EXPORT_SYMBOL(__stack_chk_guard);
#endif
+#if 0
void soft_restart(unsigned long addr)
{
setup_mm_for_reboot();
@@ -65,6 +66,7 @@ void soft_restart(unsigned long addr)
/* Should never get here */
BUG();
}
+#endif
/*
* Function pointers to optional machine specific functions
diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
index adf2f08..a55b7e3 100644
--- a/arch/arm64/mm/mmu.c
+++ b/arch/arm64/mm/mmu.c
@@ -473,6 +473,7 @@ void setup_mm_for_reboot(void)
cpu_switch_mm(idmap_pg_dir, &init_mm);
}
+#if 0
/*
* Enable the identity mapping to allow the MMU disabling.
*/
@@ -483,7 +484,7 @@ void setup_mm_for_reboot(void)
cpu_set_idmap_tcr_t0sz();
cpu_switch_mm(idmap_pg_dir, &init_mm);
}
-
+#endif
/*
* Check whether a kernel address is valid (derived from arch/x86/).
*/
diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S
index 93c3f4d..8c17e64 100644
--- a/arch/arm64/mm/proc.S
+++ b/arch/arm64/mm/proc.S
@@ -56,39 +56,6 @@ ENTRY(cpu_cache_off)
ENDPROC(cpu_cache_off)
/*
- * cpu_reset(loc)
- *
- * Perform a soft reset of the system. Put the CPU into the same state
- * as it would be if it had been reset, and branch to what would be the
- * reset vector. It must be executed with the flat identity mapping.
- *
- * - loc - location to jump to for soft reset
- */
- .align 5
-ENTRY(cpu_reset)
- mrs x1, sctlr_el1
- bic x1, x1, #1
- msr sctlr_el1, x1 // disable the MMU
- isb
- ret x0
-ENDPROC(cpu_reset)
-
-ENTRY(cpu_soft_restart)
- /* Save address of cpu_reset() and reset address */
- mov x19, x0
- mov x20, x1
-
- /* Turn D-cache off */
- bl cpu_cache_off
-
- /* Push out all dirty data, and ensure cache is empty */
- bl flush_cache_all
-
- mov x0, x20
- ret x19
-ENDPROC(cpu_soft_restart)
-
-/*
* cpu_do_idle()
*
* Idle the processor (wait for interrupt).
--
2.7.4
More information about the linux-yocto
mailing list