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:
Rafael J. Wysocki 2021-08-30 20:03:05 +02:00
Коммит 2fec5b82f9
9 изменённых файлов: 71 добавлений и 12 удалений

Просмотреть файл

@ -111,3 +111,43 @@ Contact: linux-acpi@vger.kernel.org
Description:
(RW) The PCH FIVR (Fully Integrated Voltage Regulator) switching frequency in MHz,
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
device. Writing this file with one of the strings from
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;
default:
pr_err(FW_BUG "Invalid record %d found.\n", record_header->type);
return -EINVAL;
/* Other types are reserved in ACPI 6.4 spec. */
break;
}
}
return 0;
@ -254,8 +254,7 @@ static int __init acpi_init_fpdt(void)
subtable->type);
break;
default:
pr_info(FW_BUG "Invalid subtable type %d found.\n",
subtable->type);
/* Other types are reserved in ACPI 6.4 spec. */
break;
}
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)
{
get_online_cpus();
cpus_read_lock();
num_cpus = min_t(unsigned int, num_cpus, num_online_cpus());
set_power_saving_task_num(num_cpus);
put_online_cpus();
cpus_read_unlock();
}
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;
cpu_maps_update_begin();
cpu_hotplug_begin();
cpus_write_lock();
ret = acpi_map_cpu(pr->handle, pr->phys_id, pr->acpi_id, &pr->id);
if (ret)
@ -203,7 +203,7 @@ static int acpi_processor_hotadd_init(struct acpi_processor *pr)
pr->flags.need_hotplug_init = 1;
out:
cpu_hotplug_done();
cpus_write_unlock();
cpu_maps_update_done();
return ret;
}
@ -454,13 +454,13 @@ static void acpi_processor_remove(struct acpi_device *device)
per_cpu(processors, pr->id) = NULL;
cpu_maps_update_begin();
cpu_hotplug_begin();
cpus_write_lock();
/* Remove the CPU. */
arch_unregister_cpu(pr->id);
acpi_unmap_cpu(pr->id);
cpu_hotplug_done();
cpus_write_unlock();
cpu_maps_update_done();
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_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_high_clock, RFC1)
static DEVICE_ATTR_RW(freq_mhz_low_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[] = {
&dev_attr_freq_mhz_low_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
};

Просмотреть файл

@ -106,6 +106,9 @@ static ssize_t platform_profile_store(struct device *dev,
}
err = cur_profile->profile_set(cur_profile, i);
if (!err)
sysfs_notify(acpi_kobj, NULL, "platform_profile");
mutex_unlock(&profile_lock);
if (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) {
/* Protect against cpu-hotplug */
get_online_cpus();
cpus_read_lock();
cpuidle_pause_and_lock();
/* Disable all cpuidle devices */
@ -1330,7 +1330,7 @@ int acpi_processor_power_state_has_changed(struct acpi_processor *pr)
}
}
cpuidle_resume_and_unlock();
put_online_cpus();
cpus_read_unlock();
}
return 0;

Просмотреть файл

@ -136,6 +136,7 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
break;
case ACPI_DBG2_16550_COMPATIBLE:
case ACPI_DBG2_16550_SUBSET:
case ACPI_DBG2_16550_WITH_GAS:
uart = "uart";
break;
default: