kernel/cpu: add cpu_frequency()
implement on x86 with APERFMPERF. Change-Id: Ia484854c76dee76c5447983de15800a25d791d39 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3213 Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
@@ -19,6 +19,8 @@ extern "C" {
|
||||
|
||||
status_t arch_system_info_init(struct kernel_args *args);
|
||||
void arch_fill_topology_node(cpu_topology_node_info* node, int32 cpu);
|
||||
status_t arch_get_frequency(uint64 *frequency, int32 cpu);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -102,6 +102,7 @@ status_t cpu_init_percpu(struct kernel_args *ka, int curr_cpu);
|
||||
status_t cpu_init_post_vm(struct kernel_args *args);
|
||||
status_t cpu_init_post_modules(struct kernel_args *args);
|
||||
bigtime_t cpu_get_active_time(int32 cpu);
|
||||
uint64 cpu_frequency(int32 cpu);
|
||||
|
||||
cpu_ent *get_cpu_struct(void);
|
||||
extern inline cpu_ent *get_cpu_struct(void) { return &gCPU[smp_get_current_cpu()]; }
|
||||
|
||||
Reference in New Issue
Block a user