Skip to content

Commit 9f4512c

Browse files
committed
Merge branches 'acpi-processor', 'acpi-tables', 'acpi-pnp' and 'acpi-maintainers'
Merge ACPI processor driver changes, ACPI table parser changes, ACPI device enumeration changes related to PNP and a MAINTAINERS update related to ACPI for 6.3-rc1: - Drop an unnecessary (void *) conversion from the ACPI processor driver (Zhou jie). - Modify the ACPI processor performance library code to use the "no limit" frequency QoS as appropriate and adjust the intel_pstate driver accordingly (Rafael Wysocki). - Add support for NBFT to the ACPI table parser (Stuart Hayes). - Introduce list of known non-PNP devices to avoid enumerating some of them as PNP devices (Rafael Wysocki). - Add x86 ACPI paths to the ACPI entry in MAINTAINERS to allow scripts to report the actual maintainers information (Rafael Wysocki). * acpi-processor: cpufreq: intel_pstate: Drop ACPI _PSS states table patching ACPI: processor: perflib: Avoid updating frequency QoS unnecessarily ACPI: processor: perflib: Use the "no limit" frequency QoS ACPI: processor: idle: Drop unnecessary (void *) conversion * acpi-tables: ACPI: tables: Add support for NBFT * acpi-pnp: ACPI: PNP: Introduce list of known non-PNP devices * acpi-maintainers: MAINTAINERS: Add x86 ACPI paths to the ACPI entry
5 parents 391712d + e8a0e30 + 6ad90f7 + 28a35ac + 36b20f8 commit 9f4512c

File tree

7 files changed

+52
-26
lines changed

7 files changed

+52
-26
lines changed

MAINTAINERS

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,8 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
361361
F: Documentation/ABI/testing/configfs-acpi
362362
F: Documentation/ABI/testing/sysfs-bus-acpi
363363
F: Documentation/firmware-guide/acpi/
364+
F: arch/x86/kernel/acpi/
365+
F: arch/x86/pci/acpi.c
364366
F: drivers/acpi/
365367
F: drivers/pci/*/*acpi*
366368
F: drivers/pci/*acpi*
@@ -20105,7 +20107,8 @@ L: [email protected]
2010520107
S: Supported
2010620108
B: https://bugzilla.kernel.org
2010720109
F: Documentation/power/
20108-
F: arch/x86/kernel/acpi/
20110+
F: arch/x86/kernel/acpi/sleep*
20111+
F: arch/x86/kernel/acpi/wakeup*
2010920112
F: drivers/base/power/
2011020113
F: include/linux/freezer.h
2011120114
F: include/linux/pm.h

drivers/acpi/acpi_pnp.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,22 @@ static bool acpi_pnp_match(const char *idstr, const struct acpi_device_id **matc
348348
return false;
349349
}
350350

351+
/*
352+
* If one of the device IDs below is present in the list of device IDs of a
353+
* given ACPI device object, the PNP scan handler will not attach to that
354+
* object, because there is a proper non-PNP driver in the kernel for the
355+
* device represented by it.
356+
*/
357+
static const struct acpi_device_id acpi_nonpnp_device_ids[] = {
358+
{"INTC1080"},
359+
{"INTC1081"},
360+
{""},
361+
};
362+
351363
static int acpi_pnp_attach(struct acpi_device *adev,
352364
const struct acpi_device_id *id)
353365
{
354-
return 1;
366+
return !!acpi_match_device_ids(adev, acpi_nonpnp_device_ids);
355367
}
356368

357369
static struct acpi_scan_handler acpi_pnp_handler = {

drivers/acpi/processor_idle.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ static void lapic_timer_check_state(int state, struct acpi_processor *pr,
147147

148148
static void __lapic_timer_propagate_broadcast(void *arg)
149149
{
150-
struct acpi_processor *pr = (struct acpi_processor *) arg;
150+
struct acpi_processor *pr = arg;
151151

152152
if (pr->power.timer_broadcast_on_state < INT_MAX)
153153
tick_broadcast_enable();

drivers/acpi/processor_perflib.c

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
5353
{
5454
acpi_status status = 0;
5555
unsigned long long ppc = 0;
56+
s32 qos_value;
57+
int index;
5658
int ret;
5759

5860
if (!pr)
@@ -72,17 +74,30 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
7274
}
7375
}
7476

77+
index = ppc;
78+
79+
if (pr->performance_platform_limit == index ||
80+
ppc >= pr->performance->state_count)
81+
return 0;
82+
7583
pr_debug("CPU %d: _PPC is %d - frequency %s limited\n", pr->id,
76-
(int)ppc, ppc ? "" : "not");
84+
index, index ? "is" : "is not");
7785

78-
pr->performance_platform_limit = (int)ppc;
86+
pr->performance_platform_limit = index;
7987

80-
if (ppc >= pr->performance->state_count ||
81-
unlikely(!freq_qos_request_active(&pr->perflib_req)))
88+
if (unlikely(!freq_qos_request_active(&pr->perflib_req)))
8289
return 0;
8390

84-
ret = freq_qos_update_request(&pr->perflib_req,
85-
pr->performance->states[ppc].core_frequency * 1000);
91+
/*
92+
* If _PPC returns 0, it means that all of the available states can be
93+
* used ("no limit").
94+
*/
95+
if (index == 0)
96+
qos_value = FREQ_QOS_MAX_DEFAULT_VALUE;
97+
else
98+
qos_value = pr->performance->states[index].core_frequency * 1000;
99+
100+
ret = freq_qos_update_request(&pr->perflib_req, qos_value);
86101
if (ret < 0) {
87102
pr_warn("Failed to update perflib freq constraint: CPU%d (%d)\n",
88103
pr->id, ret);
@@ -166,9 +181,16 @@ void acpi_processor_ppc_init(struct cpufreq_policy *policy)
166181
if (!pr)
167182
continue;
168183

184+
/*
185+
* Reset performance_platform_limit in case there is a stale
186+
* value in it, so as to make it match the "no limit" QoS value
187+
* below.
188+
*/
189+
pr->performance_platform_limit = 0;
190+
169191
ret = freq_qos_add_request(&policy->constraints,
170-
&pr->perflib_req,
171-
FREQ_QOS_MAX, INT_MAX);
192+
&pr->perflib_req, FREQ_QOS_MAX,
193+
FREQ_QOS_MAX_DEFAULT_VALUE);
172194
if (ret < 0)
173195
pr_err("Failed to add freq constraint for CPU%d (%d)\n",
174196
cpu, ret);

drivers/acpi/tables.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,8 @@ static const char table_sigs[][ACPI_NAMESEG_SIZE] __initconst = {
555555
ACPI_SIG_WDDT, ACPI_SIG_WDRT, ACPI_SIG_DSDT, ACPI_SIG_FADT,
556556
ACPI_SIG_PSDT, ACPI_SIG_RSDT, ACPI_SIG_XSDT, ACPI_SIG_SSDT,
557557
ACPI_SIG_IORT, ACPI_SIG_NFIT, ACPI_SIG_HMAT, ACPI_SIG_PPTT,
558-
ACPI_SIG_NHLT, ACPI_SIG_AEST, ACPI_SIG_CEDT, ACPI_SIG_AGDI };
558+
ACPI_SIG_NHLT, ACPI_SIG_AEST, ACPI_SIG_CEDT, ACPI_SIG_AGDI,
559+
ACPI_SIG_NBFT };
559560

560561
#define ACPI_HEADER_SIZE sizeof(struct acpi_table_header)
561562

drivers/cpufreq/intel_pstate.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -452,20 +452,6 @@ static void intel_pstate_init_acpi_perf_limits(struct cpufreq_policy *policy)
452452
(u32) cpu->acpi_perf_data.states[i].control);
453453
}
454454

455-
/*
456-
* The _PSS table doesn't contain whole turbo frequency range.
457-
* This just contains +1 MHZ above the max non turbo frequency,
458-
* with control value corresponding to max turbo ratio. But
459-
* when cpufreq set policy is called, it will call with this
460-
* max frequency, which will cause a reduced performance as
461-
* this driver uses real max turbo frequency as the max
462-
* frequency. So correct this frequency in _PSS table to
463-
* correct max turbo frequency based on the turbo state.
464-
* Also need to convert to MHz as _PSS freq is in MHz.
465-
*/
466-
if (!global.turbo_disabled)
467-
cpu->acpi_perf_data.states[0].core_frequency =
468-
policy->cpuinfo.max_freq / 1000;
469455
cpu->valid_pss_table = true;
470456
pr_debug("_PPC limits will be enforced\n");
471457

include/acpi/actbl1.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@
5050
#define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */
5151
#define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */
5252

53+
#define ACPI_SIG_NBFT "NBFT" /* NVMe Boot Firmware Table */
54+
5355
/* Reserved table signatures */
5456

5557
#define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */

0 commit comments

Comments
 (0)