mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
identcpu: Let the hw.model be readable in capability mode
On some platforms this static information can be derived directly from the CPU, and there doesn't seem much use in restricting it. Reviewed by: emaste, imp, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43281
This commit is contained in:
parent
d74a742704
commit
0aba5dd2af
|
@ -55,7 +55,7 @@ SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD | CTLFLAG_CAPRD,
|
||||||
machine, 0, "Machine class");
|
machine, 0, "Machine class");
|
||||||
|
|
||||||
static char cpu_model[64];
|
static char cpu_model[64];
|
||||||
SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD,
|
SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_CAPRD,
|
||||||
cpu_model, sizeof(cpu_model), "Machine model");
|
cpu_model, sizeof(cpu_model), "Machine model");
|
||||||
|
|
||||||
static char hw_buf[81];
|
static char hw_buf[81];
|
||||||
|
|
|
@ -108,7 +108,7 @@ SYSCTL_PROC(_hw, HW_MACHINE, machine, CTLTYPE_STRING | CTLFLAG_RD |
|
||||||
"Machine class");
|
"Machine class");
|
||||||
|
|
||||||
static char cpu_model[64];
|
static char cpu_model[64];
|
||||||
SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD,
|
SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_CAPRD,
|
||||||
cpu_model, sizeof(cpu_model), "Machine model");
|
cpu_model, sizeof(cpu_model), "Machine model");
|
||||||
|
|
||||||
#define MAX_CACHES 8 /* Maximum number of caches supported
|
#define MAX_CACHES 8 /* Maximum number of caches supported
|
||||||
|
|
|
@ -239,7 +239,7 @@ static void cpu_6xx_print_cacheinfo(u_int, uint16_t);
|
||||||
static int cpu_feature_bit(SYSCTL_HANDLER_ARGS);
|
static int cpu_feature_bit(SYSCTL_HANDLER_ARGS);
|
||||||
|
|
||||||
static char model[64];
|
static char model[64];
|
||||||
SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, model, 0, "");
|
SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_CAPRD, model, 0, "");
|
||||||
|
|
||||||
static const struct cputab *cput;
|
static const struct cputab *cput;
|
||||||
|
|
||||||
|
|
|
@ -158,7 +158,7 @@ SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD | CTLFLAG_CAPRD,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char cpu_model[128];
|
char cpu_model[128];
|
||||||
SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_MPSAFE,
|
SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD | CTLFLAG_CAPRD | CTLFLAG_MPSAFE,
|
||||||
cpu_model, 0, "Machine model");
|
cpu_model, 0, "Machine model");
|
||||||
|
|
||||||
static int hw_clockrate;
|
static int hw_clockrate;
|
||||||
|
|
Loading…
Reference in a new issue