Merge branches 'acpi-dptf', 'acpi-processor', 'acpi-tables' and 'acpi-platform'
* acpi-dptf: ACPI: DPTF: Add new PCH FIVR methods * acpi-processor: ACPI: processor: Replace deprecated CPU-hotplug functions * acpi-tables: ACPI: tables: FPDT: Do not print FW_BUG message if record types are reserved ACPI: SPCR: Add support for the new 16550-compatible Serial Port Subtype * acpi-platform: ACPI: platform-profile: call sysfs_notify() from platform_profile_store()
This commit is contained in:
Коммит
2fec5b82f9
|
@ -111,3 +111,43 @@ Contact: linux-acpi@vger.kernel.org
|
||||||
Description:
|
Description:
|
||||||
(RW) The PCH FIVR (Fully Integrated Voltage Regulator) switching frequency in MHz,
|
(RW) The PCH FIVR (Fully Integrated Voltage Regulator) switching frequency in MHz,
|
||||||
when FIVR clock is 38.4MHz.
|
when FIVR clock is 38.4MHz.
|
||||||
|
|
||||||
|
What: /sys/bus/platform/devices/INTC1045:00/pch_fivr_switch_frequency/fivr_switching_freq_mhz
|
||||||
|
Date: September, 2021
|
||||||
|
KernelVersion: v5.15
|
||||||
|
Contact: linux-acpi@vger.kernel.org
|
||||||
|
Description:
|
||||||
|
(RO) Get the FIVR switching control frequency in MHz.
|
||||||
|
|
||||||
|
What: /sys/bus/platform/devices/INTC1045:00/pch_fivr_switch_frequency/fivr_switching_fault_status
|
||||||
|
Date: September, 2021
|
||||||
|
KernelVersion: v5.15
|
||||||
|
Contact: linux-acpi@vger.kernel.org
|
||||||
|
Description:
|
||||||
|
(RO) Read the FIVR switching frequency control fault status.
|
||||||
|
|
||||||
|
What: /sys/bus/platform/devices/INTC1045:00/pch_fivr_switch_frequency/ssc_clock_info
|
||||||
|
Date: September, 2021
|
||||||
|
KernelVersion: v5.15
|
||||||
|
Contact: linux-acpi@vger.kernel.org
|
||||||
|
Description:
|
||||||
|
(RO) Presents SSC (spread spectrum clock) information for EMI
|
||||||
|
(Electro magnetic interference) control. This is a bit mask.
|
||||||
|
Bits Description
|
||||||
|
[7:0] Sets clock spectrum spread percentage:
|
||||||
|
0x00=0.2% , 0x3F=10%
|
||||||
|
1 LSB = 0.1% increase in spread (for
|
||||||
|
settings 0x01 thru 0x1C)
|
||||||
|
1 LSB = 0.2% increase in spread (for
|
||||||
|
settings 0x1E thru 0x3F)
|
||||||
|
[8] When set to 1, enables spread
|
||||||
|
spectrum clock
|
||||||
|
[9] 0: Triangle mode. FFC frequency
|
||||||
|
walks around the Fcenter in a linear
|
||||||
|
fashion
|
||||||
|
1: Random walk mode. FFC frequency
|
||||||
|
changes randomly within the SSC
|
||||||
|
(Spread spectrum clock) range
|
||||||
|
[10] 0: No white noise. 1: Add white noise
|
||||||
|
to spread waveform
|
||||||
|
[11] When 1, future writes are ignored.
|
||||||
|
|
|
@ -26,3 +26,10 @@ Contact: Hans de Goede <hdegoede@redhat.com>
|
||||||
Description: Reading this file gives the current selected profile for this
|
Description: Reading this file gives the current selected profile for this
|
||||||
device. Writing this file with one of the strings from
|
device. Writing this file with one of the strings from
|
||||||
platform_profile_choices changes the profile to the new value.
|
platform_profile_choices changes the profile to the new value.
|
||||||
|
|
||||||
|
This file can be monitored for changes by polling for POLLPRI,
|
||||||
|
POLLPRI will be signalled on any changes, independent of those
|
||||||
|
changes coming from a userspace write; or coming from another
|
||||||
|
source such as e.g. a hotkey triggered profile change handled
|
||||||
|
either directly by the embedded-controller or fully handled
|
||||||
|
inside the kernel.
|
||||||
|
|
|
@ -220,8 +220,8 @@ static int fpdt_process_subtable(u64 address, u32 subtable_type)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
pr_err(FW_BUG "Invalid record %d found.\n", record_header->type);
|
/* Other types are reserved in ACPI 6.4 spec. */
|
||||||
return -EINVAL;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -254,8 +254,7 @@ static int __init acpi_init_fpdt(void)
|
||||||
subtable->type);
|
subtable->type);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
pr_info(FW_BUG "Invalid subtable type %d found.\n",
|
/* Other types are reserved in ACPI 6.4 spec. */
|
||||||
subtable->type);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
offset += sizeof(*subtable);
|
offset += sizeof(*subtable);
|
||||||
|
|
|
@ -249,12 +249,12 @@ static void set_power_saving_task_num(unsigned int num)
|
||||||
|
|
||||||
static void acpi_pad_idle_cpus(unsigned int num_cpus)
|
static void acpi_pad_idle_cpus(unsigned int num_cpus)
|
||||||
{
|
{
|
||||||
get_online_cpus();
|
cpus_read_lock();
|
||||||
|
|
||||||
num_cpus = min_t(unsigned int, num_cpus, num_online_cpus());
|
num_cpus = min_t(unsigned int, num_cpus, num_online_cpus());
|
||||||
set_power_saving_task_num(num_cpus);
|
set_power_saving_task_num(num_cpus);
|
||||||
|
|
||||||
put_online_cpus();
|
cpus_read_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t acpi_pad_idle_cpus_num(void)
|
static uint32_t acpi_pad_idle_cpus_num(void)
|
||||||
|
|
|
@ -182,7 +182,7 @@ static int acpi_processor_hotadd_init(struct acpi_processor *pr)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
cpu_maps_update_begin();
|
cpu_maps_update_begin();
|
||||||
cpu_hotplug_begin();
|
cpus_write_lock();
|
||||||
|
|
||||||
ret = acpi_map_cpu(pr->handle, pr->phys_id, pr->acpi_id, &pr->id);
|
ret = acpi_map_cpu(pr->handle, pr->phys_id, pr->acpi_id, &pr->id);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
@ -203,7 +203,7 @@ static int acpi_processor_hotadd_init(struct acpi_processor *pr)
|
||||||
pr->flags.need_hotplug_init = 1;
|
pr->flags.need_hotplug_init = 1;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
cpu_hotplug_done();
|
cpus_write_unlock();
|
||||||
cpu_maps_update_done();
|
cpu_maps_update_done();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -454,13 +454,13 @@ static void acpi_processor_remove(struct acpi_device *device)
|
||||||
per_cpu(processors, pr->id) = NULL;
|
per_cpu(processors, pr->id) = NULL;
|
||||||
|
|
||||||
cpu_maps_update_begin();
|
cpu_maps_update_begin();
|
||||||
cpu_hotplug_begin();
|
cpus_write_lock();
|
||||||
|
|
||||||
/* Remove the CPU. */
|
/* Remove the CPU. */
|
||||||
arch_unregister_cpu(pr->id);
|
arch_unregister_cpu(pr->id);
|
||||||
acpi_unmap_cpu(pr->id);
|
acpi_unmap_cpu(pr->id);
|
||||||
|
|
||||||
cpu_hotplug_done();
|
cpus_write_unlock();
|
||||||
cpu_maps_update_done();
|
cpu_maps_update_done();
|
||||||
|
|
||||||
try_offline_node(cpu_to_node(pr->id));
|
try_offline_node(cpu_to_node(pr->id));
|
||||||
|
|
|
@ -90,15 +90,24 @@ static ssize_t name##_store(struct device *dev,\
|
||||||
|
|
||||||
PCH_FIVR_SHOW(freq_mhz_low_clock, GFC0)
|
PCH_FIVR_SHOW(freq_mhz_low_clock, GFC0)
|
||||||
PCH_FIVR_SHOW(freq_mhz_high_clock, GFC1)
|
PCH_FIVR_SHOW(freq_mhz_high_clock, GFC1)
|
||||||
|
PCH_FIVR_SHOW(ssc_clock_info, GEMI)
|
||||||
|
PCH_FIVR_SHOW(fivr_switching_freq_mhz, GFCS)
|
||||||
|
PCH_FIVR_SHOW(fivr_switching_fault_status, GFFS)
|
||||||
PCH_FIVR_STORE(freq_mhz_low_clock, RFC0)
|
PCH_FIVR_STORE(freq_mhz_low_clock, RFC0)
|
||||||
PCH_FIVR_STORE(freq_mhz_high_clock, RFC1)
|
PCH_FIVR_STORE(freq_mhz_high_clock, RFC1)
|
||||||
|
|
||||||
static DEVICE_ATTR_RW(freq_mhz_low_clock);
|
static DEVICE_ATTR_RW(freq_mhz_low_clock);
|
||||||
static DEVICE_ATTR_RW(freq_mhz_high_clock);
|
static DEVICE_ATTR_RW(freq_mhz_high_clock);
|
||||||
|
static DEVICE_ATTR_RO(ssc_clock_info);
|
||||||
|
static DEVICE_ATTR_RO(fivr_switching_freq_mhz);
|
||||||
|
static DEVICE_ATTR_RO(fivr_switching_fault_status);
|
||||||
|
|
||||||
static struct attribute *fivr_attrs[] = {
|
static struct attribute *fivr_attrs[] = {
|
||||||
&dev_attr_freq_mhz_low_clock.attr,
|
&dev_attr_freq_mhz_low_clock.attr,
|
||||||
&dev_attr_freq_mhz_high_clock.attr,
|
&dev_attr_freq_mhz_high_clock.attr,
|
||||||
|
&dev_attr_ssc_clock_info.attr,
|
||||||
|
&dev_attr_fivr_switching_freq_mhz.attr,
|
||||||
|
&dev_attr_fivr_switching_fault_status.attr,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -106,6 +106,9 @@ static ssize_t platform_profile_store(struct device *dev,
|
||||||
}
|
}
|
||||||
|
|
||||||
err = cur_profile->profile_set(cur_profile, i);
|
err = cur_profile->profile_set(cur_profile, i);
|
||||||
|
if (!err)
|
||||||
|
sysfs_notify(acpi_kobj, NULL, "platform_profile");
|
||||||
|
|
||||||
mutex_unlock(&profile_lock);
|
mutex_unlock(&profile_lock);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
|
@ -1301,7 +1301,7 @@ int acpi_processor_power_state_has_changed(struct acpi_processor *pr)
|
||||||
if (pr->id == 0 && cpuidle_get_driver() == &acpi_idle_driver) {
|
if (pr->id == 0 && cpuidle_get_driver() == &acpi_idle_driver) {
|
||||||
|
|
||||||
/* Protect against cpu-hotplug */
|
/* Protect against cpu-hotplug */
|
||||||
get_online_cpus();
|
cpus_read_lock();
|
||||||
cpuidle_pause_and_lock();
|
cpuidle_pause_and_lock();
|
||||||
|
|
||||||
/* Disable all cpuidle devices */
|
/* Disable all cpuidle devices */
|
||||||
|
@ -1330,7 +1330,7 @@ int acpi_processor_power_state_has_changed(struct acpi_processor *pr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cpuidle_resume_and_unlock();
|
cpuidle_resume_and_unlock();
|
||||||
put_online_cpus();
|
cpus_read_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -136,6 +136,7 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
|
||||||
break;
|
break;
|
||||||
case ACPI_DBG2_16550_COMPATIBLE:
|
case ACPI_DBG2_16550_COMPATIBLE:
|
||||||
case ACPI_DBG2_16550_SUBSET:
|
case ACPI_DBG2_16550_SUBSET:
|
||||||
|
case ACPI_DBG2_16550_WITH_GAS:
|
||||||
uart = "uart";
|
uart = "uart";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче