Commit fb8a28e2 authored by Don Mahurin's avatar Don Mahurin Committed by Philippe Gerum
Browse files

arm64/ipipe: Modifications of 3.18 arm64 support

__this_cpu_ptr equivilant is raw_cpu_ptr, not this_cpu_ptr.
Restore need_resched check in arch_cpu_idle.
Remove unused __ipipe_stall_root function.
parent 6c0b92cd
...@@ -315,12 +315,6 @@ asmlinkage int __ipipe_check_root_interruptible(void) ...@@ -315,12 +315,6 @@ asmlinkage int __ipipe_check_root_interruptible(void)
return __ipipe_root_p && !irqs_disabled(); return __ipipe_root_p && !irqs_disabled();
} }
asmlinkage void __ipipe_stall_root(void)
{
ipipe_stall_root();
}
__kprobes int __kprobes int
__ipipe_switch_to_notifier_call_chain(struct atomic_notifier_head *nh, __ipipe_switch_to_notifier_call_chain(struct atomic_notifier_head *nh,
unsigned long val, void *v) unsigned long val, void *v)
...@@ -467,7 +461,7 @@ asmlinkage void __exception __ipipe_grab_irq(int irq, struct pt_regs *regs) ...@@ -467,7 +461,7 @@ asmlinkage void __exception __ipipe_grab_irq(int irq, struct pt_regs *regs)
static void __ipipe_do_IRQ(unsigned irq, void *cookie) static void __ipipe_do_IRQ(unsigned irq, void *cookie)
{ {
struct pt_regs *regs = this_cpu_ptr(&ipipe_percpu.tick_regs); struct pt_regs *regs = raw_cpu_ptr(&ipipe_percpu.tick_regs);
__handle_domain_irq(NULL, irq, false, regs); __handle_domain_irq(NULL, irq, false, regs);
} }
...@@ -477,7 +471,7 @@ void __switch_mm_inner(struct mm_struct *prev, struct mm_struct *next, ...@@ -477,7 +471,7 @@ void __switch_mm_inner(struct mm_struct *prev, struct mm_struct *next,
{ {
#ifdef CONFIG_IPIPE_WANT_ACTIVE_MM #ifdef CONFIG_IPIPE_WANT_ACTIVE_MM
struct mm_struct ** const active_mm = struct mm_struct ** const active_mm =
this_cpu_ptr(&ipipe_percpu.active_mm); raw_cpu_ptr(&ipipe_percpu.active_mm);
#endif /* CONFIG_IPIPE_WANT_ACTIVE_MM */ #endif /* CONFIG_IPIPE_WANT_ACTIVE_MM */
#ifdef CONFIG_IPIPE_WANT_PREEMPTIBLE_SWITCH #ifdef CONFIG_IPIPE_WANT_PREEMPTIBLE_SWITCH
struct thread_info *const tip = current_thread_info(); struct thread_info *const tip = current_thread_info();
...@@ -534,7 +528,7 @@ void deferred_switch_mm(struct mm_struct *next) ...@@ -534,7 +528,7 @@ void deferred_switch_mm(struct mm_struct *next)
{ {
#ifdef CONFIG_IPIPE_WANT_ACTIVE_MM #ifdef CONFIG_IPIPE_WANT_ACTIVE_MM
struct mm_struct ** const active_mm = struct mm_struct ** const active_mm =
this_cpu_ptr(&ipipe_percpu.active_mm); raw_cpu_ptr(&ipipe_percpu.active_mm);
struct mm_struct *prev = *active_mm; struct mm_struct *prev = *active_mm;
#endif /* CONFIG_IPIPE_WANT_ACTIVE_MM */ #endif /* CONFIG_IPIPE_WANT_ACTIVE_MM */
#ifdef CONFIG_IPIPE_WANT_PREEMPTIBLE_SWITCH #ifdef CONFIG_IPIPE_WANT_PREEMPTIBLE_SWITCH
......
...@@ -110,7 +110,8 @@ void arch_cpu_idle(void) ...@@ -110,7 +110,8 @@ void arch_cpu_idle(void)
* This should do all the clock switching and wait for interrupt * This should do all the clock switching and wait for interrupt
* tricks * tricks
*/ */
__ipipe_halt_root(); if (!need_resched())
__ipipe_halt_root();
local_irq_enable(); local_irq_enable();
} }
......
...@@ -560,8 +560,7 @@ EXPORT_SYMBOL_GPL(__ipipe_first_ipi); ...@@ -560,8 +560,7 @@ EXPORT_SYMBOL_GPL(__ipipe_first_ipi);
static void __ipipe_do_IPI(unsigned virq, void *cookie) static void __ipipe_do_IPI(unsigned virq, void *cookie)
{ {
enum ipi_msg_type msg = virq - IPIPE_IPI_BASE; enum ipi_msg_type msg = virq - IPIPE_IPI_BASE;
struct pt_regs *p = this_cpu_ptr(&ipipe_percpu.tick_regs); handle_IPI(msg, raw_cpu_ptr(&ipipe_percpu.tick_regs));
handle_IPI(msg, p);
} }
void __ipipe_ipis_alloc(void) void __ipipe_ipis_alloc(void)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment