arm: Implement cpu_est_clockrate for armv[67]
This commit is contained in:
parent
b21c72b69d
commit
6185fb0f81
@ -272,8 +272,22 @@ cpu_flush_dcache(void *ptr, size_t len)
|
||||
int
|
||||
cpu_est_clockrate(int cpu_id, uint64_t *rate)
|
||||
{
|
||||
#if __ARM_ARCH >= 6
|
||||
struct pcpu *pc;
|
||||
|
||||
pc = pcpu_find(cpu_id);
|
||||
if (pc == NULL || rate == NULL)
|
||||
return (EINVAL);
|
||||
|
||||
if (pc->pc_clock == 0)
|
||||
return (EOPNOTSUPP);
|
||||
|
||||
*rate = pc->pc_clock;
|
||||
|
||||
return (0);
|
||||
#else
|
||||
return (ENXIO);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -65,7 +65,8 @@ struct vmspace;
|
||||
int pc_dbreg_cmd; \
|
||||
int pc_bp_harden_kind; \
|
||||
uint32_t pc_original_actlr; \
|
||||
char __pad[147]
|
||||
uint64_t pc_clock; \
|
||||
char __pad[139]
|
||||
#else
|
||||
#define PCPU_MD_FIELDS \
|
||||
char __pad[93]
|
||||
|
Loading…
Reference in New Issue
Block a user