Ignore:
File:
1 edited

Legend:

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

    r7a0359b rd99c1d2  
    4040#include <arch/asm.h>
    4141#include <arch/bootinfo.h>
    42 #include <trace.h>
    4342
    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
     43#define FAMILY_ITANIUM  0x7
     44#define FAMILY_ITANIUM2 0x1f
    5145
    5246typedef struct {
     
    6155 *
    6256 * @return Value of CPUID[n] register.
    63  *
    6457 */
    65 NO_TRACE static inline uint64_t cpuid_read(int n)
     58static inline uint64_t cpuid_read(int n)
    6659{
    6760        uint64_t v;
    6861       
    69         asm volatile (
    70                 "mov %[v] = cpuid[%[r]]\n"
    71                 : [v] "=r" (v)
    72                 : [r] "r" (n)
    73         );
     62        asm volatile ("mov %0 = cpuid[%1]\n" : "=r" (v) : "r" (n));
    7463       
    7564        return v;
    7665}
    7766
    78 NO_TRACE static inline int ia64_get_cpu_id(void)
     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
     73static inline int ia64_get_cpu_id(void)
    7974{
    80         uint64_t cr64 = cr64_read();
    81         return ((CR64_ID_MASK) &cr64) >> CR64_ID_SHIFT;
     75        uint64_t cr64=cr64_read();
     76        return ((CR64_ID_MASK)&cr64)>>CR64_ID_SHIFT;
    8277}
    8378
    84 NO_TRACE static inline int ia64_get_cpu_eid(void)
     79static inline int ia64_get_cpu_eid(void)
    8580{
    86         uint64_t cr64 = cr64_read();
    87         return ((CR64_EID_MASK) &cr64) >> CR64_EID_SHIFT;
     81        uint64_t cr64=cr64_read();
     82        return ((CR64_EID_MASK)&cr64)>>CR64_EID_SHIFT;
    8883}
    8984
    90 NO_TRACE static inline void ipi_send_ipi(int id, int eid, int intno)
     85
     86static inline void ipi_send_ipi(int id, int eid, int intno)
    9187{
    9288        (bootinfo->sapic)[2 * (id * 256 + eid)] = intno;
    9389        srlz_d();
     90
    9491}
    9592
Note: See TracChangeset for help on using the changeset viewer.