Subversion Repositories HelenOS

Rev

Rev 4663 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4663 Rev 4679
Line 41... Line 41...
41
/** Maximum number of logical processors in a processor core */
41
/** Maximum number of logical processors in a processor core */
42
#define MAX_CORE_STRANDS    8
42
#define MAX_CORE_STRANDS    8
43
 
43
 
44
#ifndef __ASM__
44
#ifndef __ASM__
45
 
45
 
-
 
46
struct cpu;
-
 
47
 
46
typedef struct {
48
typedef struct {
-
 
49
    uint64_t exec_unit_id;
-
 
50
    uint8_t strand_count;
-
 
51
    uint64_t cpuids[MAX_CORE_STRANDS];
-
 
52
    struct cpu *cpus[MAX_CORE_STRANDS];
-
 
53
    atomic_t nrdy;
-
 
54
    SPINLOCK_DECLARE(proposed_nrdy_lock);
-
 
55
} exec_unit_t;
-
 
56
 
-
 
57
typedef struct cpu_arch {
47
    uint64_t id;            /**< virtual processor ID */
58
    uint64_t id;            /**< virtual processor ID */
48
    uint32_t clock_frequency;   /**< Processor frequency in Hz. */
59
    uint32_t clock_frequency;   /**< Processor frequency in Hz. */
49
    uint64_t next_tick_cmpr;    /**< Next clock interrupt should be
60
    uint64_t next_tick_cmpr;    /**< Next clock interrupt should be
50
                         generated when the TICK register
61
                         generated when the TICK register
51
                         matches this value. */
62
                         matches this value. */
-
 
63
    exec_unit_t *exec_unit;     /**< Physical core. */
-
 
64
    unsigned long proposed_nrdy;    /**< Proposed No. of ready threads
-
 
65
                         so that cores are equally balanced. */
52
} cpu_arch_t;
66
} cpu_arch_t;
53
 
67
 
54
typedef struct {
-
 
55
    uint64_t exec_unit_id;
-
 
56
    uint8_t strand_count;
-
 
57
    uint64_t cpuids[MAX_CORE_STRANDS];
-
 
58
} exec_unit_t;
-
 
59
 
-
 
60
#endif  
68
#endif  
61
 
69
 
62
#ifdef __ASM__
70
#ifdef __ASM__
63
 
71
 
64
#endif
72
#endif