Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia64/include/cpu.h

    rd99c1d2 r7a0359b  
    4040#include <arch/asm.h>
    4141#include <arch/bootinfo.h>
     42#include <trace.h>
    4243
    43 #define FAMILY_ITANIUM  0x7
    44 #define FAMILY_ITANIUM2 0x1f
     44#define FAMILY_ITANIUM   0x7
     45#define FAMILY_ITANIUM2  0x1f
     46
     47#define CR64_ID_SHIFT   24
     48#define CR64_ID_MASK    0xff000000
     49#define CR64_EID_SHIFT  16
     50#define CR64_EID_MASK   0xff0000
    4551
    4652typedef struct {
     
    5561 *
    5662 * @return Value of CPUID[n] register.
     63 *
    5764 */
    58 static inline uint64_t cpuid_read(int n)
     65NO_TRACE static inline uint64_t cpuid_read(int n)
    5966{
    6067        uint64_t v;
    6168       
    62         asm volatile ("mov %0 = cpuid[%1]\n" : "=r" (v) : "r" (n));
     69        asm volatile (
     70                "mov %[v] = cpuid[%[r]]\n"
     71                : [v] "=r" (v)
     72                : [r] "r" (n)
     73        );
    6374       
    6475        return v;
    6576}
    6677
    67 
    68 #define CR64_ID_SHIFT 24
    69 #define CR64_ID_MASK 0xff000000
    70 #define CR64_EID_SHIFT 16
    71 #define CR64_EID_MASK 0xff0000
    72 
    73 static inline int ia64_get_cpu_id(void)
     78NO_TRACE static inline int ia64_get_cpu_id(void)
    7479{
    75         uint64_t cr64=cr64_read();
    76         return ((CR64_ID_MASK)&cr64)>>CR64_ID_SHIFT;
     80        uint64_t cr64 = cr64_read();
     81        return ((CR64_ID_MASK) &cr64) >> CR64_ID_SHIFT;
    7782}
    7883
    79 static inline int ia64_get_cpu_eid(void)
     84NO_TRACE static inline int ia64_get_cpu_eid(void)
    8085{
    81         uint64_t cr64=cr64_read();
    82         return ((CR64_EID_MASK)&cr64)>>CR64_EID_SHIFT;
     86        uint64_t cr64 = cr64_read();
     87        return ((CR64_EID_MASK) &cr64) >> CR64_EID_SHIFT;
    8388}
    8489
    85 
    86 static inline void ipi_send_ipi(int id, int eid, int intno)
     90NO_TRACE static inline void ipi_send_ipi(int id, int eid, int intno)
    8791{
    8892        (bootinfo->sapic)[2 * (id * 256 + eid)] = intno;
    8993        srlz_d();
    90 
    9194}
    9295
Note: See TracChangeset for help on using the changeset viewer.