Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157421748
D56880.id177414.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D56880.id177414.diff
View Options
diff --git a/sys/dev/acpica/acpi_spmc.c b/sys/dev/acpica/acpi_spmc.c
--- a/sys/dev/acpica/acpi_spmc.c
+++ b/sys/dev/acpica/acpi_spmc.c
@@ -205,6 +205,11 @@
#define VERBOSE() (verbose || bootverbose)
+/* Per DSM probed information. */
+struct dsm_info {
+ uint64_t supported_functions;
+};
+
struct acpi_spmc_constraint {
bool enabled;
char *name;
@@ -222,7 +227,7 @@
struct acpi_spmc_softc {
device_t dev;
ACPI_HANDLE handle;
- uint64_t supported_functions[nitems(dsms)];
+ struct dsm_info dsms_info[nitems(dsms)];
struct eventhandler_entry *eh_suspend;
struct eventhandler_entry *eh_resume;
@@ -246,9 +251,9 @@
supports_function(const struct acpi_spmc_softc *const sc,
const int dsm_index, const int function_index)
{
- MPASS(0 <= dsm_index && dsm_index < nitems(sc->supported_functions));
+ MPASS(0 <= dsm_index && dsm_index < nitems(dsms));
- return ((sc->supported_functions[dsm_index] &
+ return ((sc->dsms_info[dsm_index].supported_functions &
IDX_TO_BIT(function_index)) != 0);
}
@@ -446,7 +451,7 @@
* report as unknown.
*/
const uint64_t supported_functions = ~IDX_TO_BIT(DSM_ENUM_FUNCTIONS) &
- sc->supported_functions[dsm->index];
+ sc->dsms_info[dsm->index].supported_functions;
const uint64_t missing = dsm->expected_functions & ~supported_functions;
const uint64_t unknown = supported_functions &
~(dsm->expected_functions | dsm->extra_functions);
@@ -486,7 +491,7 @@
*/
if ((supported_functions & IDX_TO_BIT(DSM_ENUM_FUNCTIONS)) == 0)
return;
- sc->supported_functions[dsm->index] = supported_functions;
+ sc->dsms_info[dsm->index].supported_functions = supported_functions;
}
static void
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, May 22, 6:26 AM (2 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32776672
Default Alt Text
D56880.id177414.diff (1 KB)
Attached To
Mode
D56880: acpi_spmc(4): softc: Move supported functions into a DSM info structure
Attached
Detach File
Event Timeline
Log In to Comment