Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/acpica/acpi_perf.c
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
#include <sys/rman.h> | #include <sys/rman.h> | ||||
#include <contrib/dev/acpica/include/acpi.h> | #include <contrib/dev/acpica/include/acpi.h> | ||||
#include <dev/acpica/acpivar.h> | #include <dev/acpica/acpivar.h> | ||||
#include "cpufreq_if.h" | #include "cpufreq_if.h" | ||||
extern uint32_t intel_speed_shift; | |||||
kib: Use bool perhaps ? | |||||
Not Done Inline ActionsThe extern definition and the check for this variable needs to be #if defined(__amd64__), otherwise there's a linking error on aarch64 val_packett.cool: The `extern` definition and the check for this variable needs to be `#if defined(__amd64__)`… | |||||
Not Done Inline ActionsThe whole declaration should be removed. See discussion on the definition @ https://reviews.freebsd.org/D18028#inline-117423 . (Just curious, why are you trying to build the intel_hwpstate in-review driver on aarch64?) cem: The whole declaration should be removed. See discussion on the definition @ https://reviews. | |||||
Not Done Inline Actions(I just have a single git fork of src where I apply every patch I need to master. Not building this *driver*, but acpi_perf was being built, and it was affected by this patch.) val_packett.cool: (I just have a single git fork of src where I apply every patch I need to master. Not building… | |||||
Not Done Inline ActionsI still object to this big kludge ( https://reviews.freebsd.org/D18028#inline-117423 ) cem: I still object to this big kludge ( https://reviews.freebsd.org/D18028#inline-117423 ) | |||||
/* | /* | ||||
* Support for ACPI processor performance states (Px) according to | * Support for ACPI processor performance states (Px) according to | ||||
* section 8.3.3 of the ACPI 2.0c specification. | * section 8.3.3 of the ACPI 2.0c specification. | ||||
*/ | */ | ||||
struct acpi_px { | struct acpi_px { | ||||
uint32_t core_freq; | uint32_t core_freq; | ||||
uint32_t power; | uint32_t power; | ||||
▲ Show 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | |||||
static MALLOC_DEFINE(M_ACPIPERF, "acpi_perf", "ACPI Performance states"); | static MALLOC_DEFINE(M_ACPIPERF, "acpi_perf", "ACPI Performance states"); | ||||
static void | static void | ||||
acpi_perf_identify(driver_t *driver, device_t parent) | acpi_perf_identify(driver_t *driver, device_t parent) | ||||
{ | { | ||||
ACPI_HANDLE handle; | ACPI_HANDLE handle; | ||||
device_t dev; | device_t dev; | ||||
if (intel_speed_shift == true) | |||||
kibUnsubmitted Done Inline ActionsComparing with true is too baroque. If you use bool for the type, then if (intel_speed_shift) is good enough. kib: Comparing with true is too baroque. If you use bool for the type, then `if… | |||||
return; | |||||
/* Make sure we're not being doubly invoked. */ | /* Make sure we're not being doubly invoked. */ | ||||
if (device_find_child(parent, "acpi_perf", -1) != NULL) | if (device_find_child(parent, "acpi_perf", -1) != NULL) | ||||
return; | return; | ||||
/* Get the handle for the Processor object and check for perf states. */ | /* Get the handle for the Processor object and check for perf states. */ | ||||
handle = acpi_get_handle(parent); | handle = acpi_get_handle(parent); | ||||
if (handle == NULL) | if (handle == NULL) | ||||
▲ Show 20 Lines • Show All 442 Lines • Show Last 20 Lines |
Use bool perhaps ?