These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / arch / arc / kernel / process.c
index e095c55..a3f750e 100644 (file)
@@ -44,7 +44,10 @@ SYSCALL_DEFINE0(arc_gettls)
 void arch_cpu_idle(void)
 {
        /* sleep, but enable all interrupts before committing */
-       __asm__("sleep 0x3");
+       __asm__ __volatile__(
+               "sleep %0       \n"
+               :
+               :"I"(ISA_SLEEP_ARG)); /* can't be "r" has to be embedded const */
 }
 
 asmlinkage void ret_from_fork(void);
@@ -61,7 +64,7 @@ asmlinkage void ret_from_fork(void);
  * ------------------
  * |     r25        |   <==== top of Stack (thread.ksp)
  * ~                ~
- * |    --to--      |   (CALLEE Regs of user mode)
+ * |    --to--      |   (CALLEE Regs of kernel mode)
  * |     r13        |
  * ------------------
  * |     fp         |
@@ -166,8 +169,7 @@ void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long usp)
         * [L] ZOL loop inhibited to begin with - cleared by a LP insn
         * Interrupts enabled
         */
-       regs->status32 = STATUS_U_MASK | STATUS_L_MASK |
-                        STATUS_E1_MASK | STATUS_E2_MASK;
+       regs->status32 = STATUS_U_MASK | STATUS_L_MASK | ISA_INIT_STATUS_BITS;
 
        /* bogus seed values for debugging */
        regs->lp_start = 0x10;
@@ -197,8 +199,11 @@ int elf_check_arch(const struct elf32_hdr *x)
 {
        unsigned int eflags;
 
-       if (x->e_machine != EM_ARCOMPACT)
+       if (x->e_machine != EM_ARC_INUSE) {
+               pr_err("ELF not built for %s ISA\n",
+                       is_isa_arcompact() ? "ARCompact":"ARCv2");
                return 0;
+       }
 
        eflags = x->e_flags;
        if ((eflags & EF_ARC_OSABI_MSK) < EF_ARC_OSABI_CURRENT) {