Merge branches 'acpi-dptf' and 'acpi-messages'
* acpi-dptf: ACPI: DPTF: Add battery participant for Intel SoCs * acpi-messages: ACPI: Remove the macro PREFIX "ACPI: " ACPI: sleep: Unify the message printing ACPI: sbs: Unify the message printing ACPI: scan: Unify the log message printing ACPI: sbshc: Unify the message printing ACPI: sysfs: Cleanup message printing ACPI: reboot: Unify the message printing ACPI: processor_throttling: Cleanup the printing messages ACPI: processor_perflib: Cleanup print messages ACPI: processor_thermal: Remove unused PREFIX for printing ACPI: pci_root: Unify the message printing ACPI: osl: Remove the duplicated PREFIX for message printing ACPI: nvs: Unify the message printing ACPI: glue: Clean up the printing messages ACPI: event: Use pr_*() macros to replace printk() ACPI: bus: Use pr_*() macros to replace printk() ACPI: blacklist: Unify the message printing ACPI: cmos_rtc: Using pr_fmt() and remove PREFIX
This commit is contained in:
Коммит
8b457d6060
|
@ -6,6 +6,8 @@
|
|||
* Authors: Lan Tianyu <tianyu.lan@intel.com>
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "ACPI: " fmt
|
||||
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/err.h>
|
||||
|
@ -59,7 +61,7 @@ static int acpi_install_cmos_rtc_space_handler(struct acpi_device *adev,
|
|||
&acpi_cmos_rtc_space_handler,
|
||||
NULL, NULL);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
pr_err(PREFIX "Error installing CMOS-RTC region handler\n");
|
||||
pr_err("Error installing CMOS-RTC region handler\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
@ -70,7 +72,7 @@ static void acpi_remove_cmos_rtc_space_handler(struct acpi_device *adev)
|
|||
{
|
||||
if (ACPI_FAILURE(acpi_remove_address_space_handler(adev->handle,
|
||||
ACPI_ADR_SPACE_CMOS, &acpi_cmos_rtc_space_handler)))
|
||||
pr_err(PREFIX "Error removing CMOS-RTC region handler\n");
|
||||
pr_err("Error removing CMOS-RTC region handler\n");
|
||||
}
|
||||
|
||||
static struct acpi_scan_handler cmos_rtc_handler = {
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
* Copyright (C) 2002 Andy Grover <andrew.grover@intel.com>
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "ACPI: " fmt
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/acpi.h>
|
||||
|
@ -49,12 +51,12 @@ int __init acpi_blacklisted(void)
|
|||
|
||||
i = acpi_match_platform_list(acpi_blacklist);
|
||||
if (i >= 0) {
|
||||
pr_err(PREFIX "Vendor \"%6.6s\" System \"%8.8s\" Revision 0x%x has a known ACPI BIOS problem.\n",
|
||||
pr_err("Vendor \"%6.6s\" System \"%8.8s\" Revision 0x%x has a known ACPI BIOS problem.\n",
|
||||
acpi_blacklist[i].oem_id,
|
||||
acpi_blacklist[i].oem_table_id,
|
||||
acpi_blacklist[i].oem_revision);
|
||||
|
||||
pr_err(PREFIX "Reason: %s. This is a %s error\n",
|
||||
pr_err("Reason: %s. This is a %s error\n",
|
||||
acpi_blacklist[i].reason,
|
||||
(acpi_blacklist[i].data ?
|
||||
"non-recoverable" : "recoverable"));
|
||||
|
@ -73,8 +75,7 @@ int __init acpi_blacklisted(void)
|
|||
#ifdef CONFIG_ACPI_REV_OVERRIDE_POSSIBLE
|
||||
static int __init dmi_enable_rev_override(const struct dmi_system_id *d)
|
||||
{
|
||||
printk(KERN_NOTICE PREFIX "DMI detected: %s (force ACPI _REV to 5)\n",
|
||||
d->ident);
|
||||
pr_notice("DMI detected: %s (force ACPI _REV to 5)\n", d->ident);
|
||||
acpi_rev_override_setup(NULL);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -359,7 +359,7 @@ EXPORT_SYMBOL_GPL(osc_sb_native_usb4_control);
|
|||
|
||||
static void acpi_bus_decode_usb_osc(const char *msg, u32 bits)
|
||||
{
|
||||
printk(KERN_INFO PREFIX "%s USB3%c DisplayPort%c PCIe%c XDomain%c\n", msg,
|
||||
pr_info("%s USB3%c DisplayPort%c PCIe%c XDomain%c\n", msg,
|
||||
(bits & OSC_USB_USB3_TUNNELING) ? '+' : '-',
|
||||
(bits & OSC_USB_DP_TUNNELING) ? '+' : '-',
|
||||
(bits & OSC_USB_PCIE_TUNNELING) ? '+' : '-',
|
||||
|
@ -398,7 +398,7 @@ static void acpi_bus_osc_negotiate_usb_control(void)
|
|||
return;
|
||||
|
||||
if (context.ret.length != sizeof(capbuf)) {
|
||||
printk(KERN_INFO PREFIX "USB4 _OSC: returned invalid length buffer\n");
|
||||
pr_info("USB4 _OSC: returned invalid length buffer\n");
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ static const struct acpi_device_id int340x_thermal_device_ids[] = {
|
|||
{"INT3409"},
|
||||
{"INT340A"},
|
||||
{"INT340B"},
|
||||
{"INT3532"},
|
||||
{"INTC1040"},
|
||||
{"INTC1041"},
|
||||
{"INTC1043"},
|
||||
|
@ -33,6 +34,7 @@ static const struct acpi_device_id int340x_thermal_device_ids[] = {
|
|||
{"INTC1047"},
|
||||
{"INTC1048"},
|
||||
{"INTC1049"},
|
||||
{"INTC1050"},
|
||||
{"INTC1060"},
|
||||
{"INTC1061"},
|
||||
{""},
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "ACPI: " fmt
|
||||
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/proc_fs.h>
|
||||
|
@ -173,8 +175,8 @@ static int __init acpi_event_init(void)
|
|||
/* create genetlink for acpi event */
|
||||
error = acpi_event_genetlink_init();
|
||||
if (error)
|
||||
printk(KERN_WARNING PREFIX
|
||||
"Failed to create genetlink family for ACPI event\n");
|
||||
pr_warn("Failed to create genetlink family for ACPI event\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
* Copyright (c) 2005 Intel Corp.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "ACPI: " fmt
|
||||
|
||||
#include <linux/acpi_iort.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/init.h>
|
||||
|
@ -19,17 +21,6 @@
|
|||
|
||||
#include "internal.h"
|
||||
|
||||
#define ACPI_GLUE_DEBUG 0
|
||||
#if ACPI_GLUE_DEBUG
|
||||
#define DBG(fmt, ...) \
|
||||
printk(KERN_DEBUG PREFIX fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define DBG(fmt, ...) \
|
||||
do { \
|
||||
if (0) \
|
||||
printk(KERN_DEBUG PREFIX fmt, ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
#endif
|
||||
static LIST_HEAD(bus_type_list);
|
||||
static DECLARE_RWSEM(bus_type_sem);
|
||||
|
||||
|
@ -44,7 +35,7 @@ int register_acpi_bus_type(struct acpi_bus_type *type)
|
|||
down_write(&bus_type_sem);
|
||||
list_add_tail(&type->list, &bus_type_list);
|
||||
up_write(&bus_type_sem);
|
||||
printk(KERN_INFO PREFIX "bus type %s registered\n", type->name);
|
||||
pr_info("bus type %s registered\n", type->name);
|
||||
return 0;
|
||||
}
|
||||
return -ENODEV;
|
||||
|
@ -59,8 +50,7 @@ int unregister_acpi_bus_type(struct acpi_bus_type *type)
|
|||
down_write(&bus_type_sem);
|
||||
list_del_init(&type->list);
|
||||
up_write(&bus_type_sem);
|
||||
printk(KERN_INFO PREFIX "bus type %s unregistered\n",
|
||||
type->name);
|
||||
pr_info("bus type %s unregistered\n", type->name);
|
||||
return 0;
|
||||
}
|
||||
return -ENODEV;
|
||||
|
@ -307,7 +297,7 @@ static int acpi_device_notify(struct device *dev)
|
|||
|
||||
adev = type->find_companion(dev);
|
||||
if (!adev) {
|
||||
DBG("Unable to get handle for %s\n", dev_name(dev));
|
||||
pr_debug("Unable to get handle for %s\n", dev_name(dev));
|
||||
ret = -ENODEV;
|
||||
goto out;
|
||||
}
|
||||
|
@ -328,16 +318,15 @@ static int acpi_device_notify(struct device *dev)
|
|||
adev->handler->bind(dev);
|
||||
|
||||
out:
|
||||
#if ACPI_GLUE_DEBUG
|
||||
if (!ret) {
|
||||
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
|
||||
|
||||
acpi_get_name(ACPI_HANDLE(dev), ACPI_FULL_PATHNAME, &buffer);
|
||||
DBG("Device %s -> %s\n", dev_name(dev), (char *)buffer.pointer);
|
||||
pr_debug("Device %s -> %s\n", dev_name(dev), (char *)buffer.pointer);
|
||||
kfree(buffer.pointer);
|
||||
} else
|
||||
DBG("Device %s -> No ACPI support\n", dev_name(dev));
|
||||
#endif
|
||||
} else {
|
||||
pr_debug("Device %s -> No ACPI support\n", dev_name(dev));
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
|
||||
#include <linux/idr.h>
|
||||
|
||||
#define PREFIX "ACPI: "
|
||||
|
||||
int early_acpi_osi_init(void);
|
||||
int acpi_osi_init(void);
|
||||
acpi_status acpi_os_initialize1(void);
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
* Copyright (C) 2008-2011 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "ACPI: PM: " fmt
|
||||
|
||||
#include <linux/io.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/list.h>
|
||||
|
@ -94,7 +96,7 @@ static int suspend_nvs_register(unsigned long start, unsigned long size)
|
|||
{
|
||||
struct nvs_page *entry, *next;
|
||||
|
||||
pr_info("PM: Registering ACPI NVS region [mem %#010lx-%#010lx] (%ld bytes)\n",
|
||||
pr_info("Registering ACPI NVS region [mem %#010lx-%#010lx] (%ld bytes)\n",
|
||||
start, start + size - 1, size);
|
||||
|
||||
while (size > 0) {
|
||||
|
@ -170,7 +172,7 @@ int suspend_nvs_save(void)
|
|||
{
|
||||
struct nvs_page *entry;
|
||||
|
||||
printk(KERN_INFO "PM: Saving platform NVS memory\n");
|
||||
pr_info("Saving platform NVS memory\n");
|
||||
|
||||
list_for_each_entry(entry, &nvs_list, node)
|
||||
if (entry->data) {
|
||||
|
@ -202,7 +204,7 @@ void suspend_nvs_restore(void)
|
|||
{
|
||||
struct nvs_page *entry;
|
||||
|
||||
printk(KERN_INFO "PM: Restoring platform NVS memory\n");
|
||||
pr_info("Restoring platform NVS memory\n");
|
||||
|
||||
list_for_each_entry(entry, &nvs_list, node)
|
||||
if (entry->data)
|
||||
|
|
|
@ -212,7 +212,7 @@ acpi_physical_address __init acpi_os_get_root_pointer(void)
|
|||
return efi.acpi20;
|
||||
if (efi.acpi != EFI_INVALID_TABLE_ADDR)
|
||||
return efi.acpi;
|
||||
pr_err(PREFIX "System description tables not found\n");
|
||||
pr_err("System description tables not found\n");
|
||||
} else if (IS_ENABLED(CONFIG_ACPI_LEGACY_TABLES_LOOKUP)) {
|
||||
acpi_find_root_pointer(&pa);
|
||||
}
|
||||
|
@ -430,7 +430,7 @@ void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size)
|
|||
map = acpi_map_lookup_virt(virt, size);
|
||||
if (!map) {
|
||||
mutex_unlock(&acpi_ioremap_lock);
|
||||
WARN(true, PREFIX "%s: bad address %p\n", __func__, virt);
|
||||
WARN(true, "ACPI: %s: bad address %p\n", __func__, virt);
|
||||
return;
|
||||
}
|
||||
acpi_os_drop_map_ref(map);
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "ACPI: " fmt
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
|
@ -574,7 +576,7 @@ static int acpi_pci_root_add(struct acpi_device *device,
|
|||
goto end;
|
||||
}
|
||||
|
||||
pr_info(PREFIX "%s [%s] (domain %04x %pR)\n",
|
||||
pr_info("%s [%s] (domain %04x %pR)\n",
|
||||
acpi_device_name(device), acpi_device_bid(device),
|
||||
root->segment, &root->secondary);
|
||||
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* - Added processor hotplug support
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "ACPI: " fmt
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
|
@ -20,8 +22,6 @@
|
|||
#include <asm/cpufeature.h>
|
||||
#endif
|
||||
|
||||
#define PREFIX "ACPI: "
|
||||
|
||||
#define ACPI_PROCESSOR_FILE_PERFORMANCE "performance"
|
||||
|
||||
static DEFINE_MUTEX(performance_mutex);
|
||||
|
@ -194,7 +194,6 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
|
|||
union acpi_object *pct = NULL;
|
||||
union acpi_object obj = { 0 };
|
||||
|
||||
|
||||
status = acpi_evaluate_object(pr->handle, "_PCT", NULL, &buffer);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
acpi_evaluation_failure_warn(pr->handle, "_PCT", status);
|
||||
|
@ -204,7 +203,7 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
|
|||
pct = (union acpi_object *)buffer.pointer;
|
||||
if (!pct || (pct->type != ACPI_TYPE_PACKAGE)
|
||||
|| (pct->package.count != 2)) {
|
||||
printk(KERN_ERR PREFIX "Invalid _PCT data\n");
|
||||
pr_err("Invalid _PCT data\n");
|
||||
result = -EFAULT;
|
||||
goto end;
|
||||
}
|
||||
|
@ -218,7 +217,7 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
|
|||
if ((obj.type != ACPI_TYPE_BUFFER)
|
||||
|| (obj.buffer.length < sizeof(struct acpi_pct_register))
|
||||
|| (obj.buffer.pointer == NULL)) {
|
||||
printk(KERN_ERR PREFIX "Invalid _PCT data (control_register)\n");
|
||||
pr_err("Invalid _PCT data (control_register)\n");
|
||||
result = -EFAULT;
|
||||
goto end;
|
||||
}
|
||||
|
@ -234,7 +233,7 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
|
|||
if ((obj.type != ACPI_TYPE_BUFFER)
|
||||
|| (obj.buffer.length < sizeof(struct acpi_pct_register))
|
||||
|| (obj.buffer.pointer == NULL)) {
|
||||
printk(KERN_ERR PREFIX "Invalid _PCT data (status_register)\n");
|
||||
pr_err("Invalid _PCT data (status_register)\n");
|
||||
result = -EFAULT;
|
||||
goto end;
|
||||
}
|
||||
|
@ -242,7 +241,7 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
|
|||
memcpy(&pr->performance->status_register, obj.buffer.pointer,
|
||||
sizeof(struct acpi_pct_register));
|
||||
|
||||
end:
|
||||
end:
|
||||
kfree(buffer.pointer);
|
||||
|
||||
return result;
|
||||
|
@ -294,7 +293,6 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
|
|||
int i;
|
||||
int last_invalid = -1;
|
||||
|
||||
|
||||
status = acpi_evaluate_object(pr->handle, "_PSS", NULL, &buffer);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
acpi_evaluation_failure_warn(pr->handle, "_PSS", status);
|
||||
|
@ -303,7 +301,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
|
|||
|
||||
pss = buffer.pointer;
|
||||
if (!pss || (pss->type != ACPI_TYPE_PACKAGE)) {
|
||||
printk(KERN_ERR PREFIX "Invalid _PSS data\n");
|
||||
pr_err("Invalid _PSS data\n");
|
||||
result = -EFAULT;
|
||||
goto end;
|
||||
}
|
||||
|
@ -357,7 +355,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
|
|||
if (!px->core_frequency ||
|
||||
((u32)(px->core_frequency * 1000) !=
|
||||
(px->core_frequency * 1000))) {
|
||||
printk(KERN_ERR FW_BUG PREFIX
|
||||
pr_err(FW_BUG
|
||||
"Invalid BIOS _PSS frequency found for processor %d: 0x%llx MHz\n",
|
||||
pr->id, px->core_frequency);
|
||||
if (last_invalid == -1)
|
||||
|
@ -375,8 +373,8 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
|
|||
}
|
||||
|
||||
if (last_invalid == 0) {
|
||||
printk(KERN_ERR FW_BUG PREFIX
|
||||
"No valid BIOS _PSS frequency found for processor %d\n", pr->id);
|
||||
pr_err(FW_BUG
|
||||
"No valid BIOS _PSS frequency found for processor %d\n", pr->id);
|
||||
result = -EFAULT;
|
||||
kfree(pr->performance->states);
|
||||
pr->performance->states = NULL;
|
||||
|
@ -385,7 +383,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
|
|||
if (last_invalid > 0)
|
||||
pr->performance->state_count = last_invalid;
|
||||
|
||||
end:
|
||||
end:
|
||||
kfree(buffer.pointer);
|
||||
|
||||
return result;
|
||||
|
@ -426,7 +424,7 @@ int acpi_processor_get_performance_info(struct acpi_processor *pr)
|
|||
#ifdef CONFIG_X86
|
||||
if (acpi_has_method(pr->handle, "_PPC")) {
|
||||
if(boot_cpu_has(X86_FEATURE_EST))
|
||||
printk(KERN_WARNING FW_BUG "BIOS needs update for CPU "
|
||||
pr_warn(FW_BUG "BIOS needs update for CPU "
|
||||
"frequency support\n");
|
||||
}
|
||||
#endif
|
||||
|
@ -520,13 +518,13 @@ int acpi_processor_get_psd(acpi_handle handle, struct acpi_psd_package *pdomain)
|
|||
|
||||
psd = buffer.pointer;
|
||||
if (!psd || (psd->type != ACPI_TYPE_PACKAGE)) {
|
||||
printk(KERN_ERR PREFIX "Invalid _PSD data\n");
|
||||
pr_err("Invalid _PSD data\n");
|
||||
result = -EFAULT;
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (psd->package.count != 1) {
|
||||
printk(KERN_ERR PREFIX "Invalid _PSD data\n");
|
||||
pr_err("Invalid _PSD data\n");
|
||||
result = -EFAULT;
|
||||
goto end;
|
||||
}
|
||||
|
@ -537,19 +535,19 @@ int acpi_processor_get_psd(acpi_handle handle, struct acpi_psd_package *pdomain)
|
|||
status = acpi_extract_package(&(psd->package.elements[0]),
|
||||
&format, &state);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
printk(KERN_ERR PREFIX "Invalid _PSD data\n");
|
||||
pr_err("Invalid _PSD data\n");
|
||||
result = -EFAULT;
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (pdomain->num_entries != ACPI_PSD_REV0_ENTRIES) {
|
||||
printk(KERN_ERR PREFIX "Unknown _PSD:num_entries\n");
|
||||
pr_err("Unknown _PSD:num_entries\n");
|
||||
result = -EFAULT;
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (pdomain->revision != ACPI_PSD_REV0_REVISION) {
|
||||
printk(KERN_ERR PREFIX "Unknown _PSD:revision\n");
|
||||
pr_err("Unknown _PSD:revision\n");
|
||||
result = -EFAULT;
|
||||
goto end;
|
||||
}
|
||||
|
@ -557,7 +555,7 @@ int acpi_processor_get_psd(acpi_handle handle, struct acpi_psd_package *pdomain)
|
|||
if (pdomain->coord_type != DOMAIN_COORD_TYPE_SW_ALL &&
|
||||
pdomain->coord_type != DOMAIN_COORD_TYPE_SW_ANY &&
|
||||
pdomain->coord_type != DOMAIN_COORD_TYPE_HW_ALL) {
|
||||
printk(KERN_ERR PREFIX "Invalid _PSD:coord_type\n");
|
||||
pr_err("Invalid _PSD:coord_type\n");
|
||||
result = -EFAULT;
|
||||
goto end;
|
||||
}
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
#include <acpi/processor.h>
|
||||
#include <linux/uaccess.h>
|
||||
|
||||
#define PREFIX "ACPI: "
|
||||
|
||||
#ifdef CONFIG_CPU_FREQ
|
||||
|
||||
/* If a passive cooling situation is detected, primarily CPUfreq is used, as it
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
* - Added processor hotplug support
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "ACPI: " fmt
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/slab.h>
|
||||
|
@ -20,8 +22,6 @@
|
|||
#include <asm/io.h>
|
||||
#include <linux/uaccess.h>
|
||||
|
||||
#define PREFIX "ACPI: "
|
||||
|
||||
/* ignore_tpc:
|
||||
* 0 -> acpi processor driver doesn't ignore _TPC values
|
||||
* 1 -> acpi processor driver ignores _TPC values
|
||||
|
@ -234,8 +234,7 @@ static int acpi_processor_throttling_notifier(unsigned long event, void *data)
|
|||
if (pr->throttling_platform_limit > target_state)
|
||||
target_state = pr->throttling_platform_limit;
|
||||
if (target_state >= p_throttling->state_count) {
|
||||
printk(KERN_WARNING
|
||||
"Exceed the limit of T-state \n");
|
||||
pr_warn("Exceed the limit of T-state \n");
|
||||
target_state = p_throttling->state_count - 1;
|
||||
}
|
||||
p_tstate->target_state = target_state;
|
||||
|
@ -254,8 +253,7 @@ static int acpi_processor_throttling_notifier(unsigned long event, void *data)
|
|||
cpu, target_state);
|
||||
break;
|
||||
default:
|
||||
printk(KERN_WARNING
|
||||
"Unsupported Throttling notifier event\n");
|
||||
pr_warn("Unsupported Throttling notifier event\n");
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -420,7 +418,7 @@ static int acpi_processor_get_throttling_control(struct acpi_processor *pr)
|
|||
ptc = (union acpi_object *)buffer.pointer;
|
||||
if (!ptc || (ptc->type != ACPI_TYPE_PACKAGE)
|
||||
|| (ptc->package.count != 2)) {
|
||||
printk(KERN_ERR PREFIX "Invalid _PTC data\n");
|
||||
pr_err("Invalid _PTC data\n");
|
||||
result = -EFAULT;
|
||||
goto end;
|
||||
}
|
||||
|
@ -434,8 +432,7 @@ static int acpi_processor_get_throttling_control(struct acpi_processor *pr)
|
|||
if ((obj.type != ACPI_TYPE_BUFFER)
|
||||
|| (obj.buffer.length < sizeof(struct acpi_ptc_register))
|
||||
|| (obj.buffer.pointer == NULL)) {
|
||||
printk(KERN_ERR PREFIX
|
||||
"Invalid _PTC data (control_register)\n");
|
||||
pr_err("Invalid _PTC data (control_register)\n");
|
||||
result = -EFAULT;
|
||||
goto end;
|
||||
}
|
||||
|
@ -451,7 +448,7 @@ static int acpi_processor_get_throttling_control(struct acpi_processor *pr)
|
|||
if ((obj.type != ACPI_TYPE_BUFFER)
|
||||
|| (obj.buffer.length < sizeof(struct acpi_ptc_register))
|
||||
|| (obj.buffer.pointer == NULL)) {
|
||||
printk(KERN_ERR PREFIX "Invalid _PTC data (status_register)\n");
|
||||
pr_err("Invalid _PTC data (status_register)\n");
|
||||
result = -EFAULT;
|
||||
goto end;
|
||||
}
|
||||
|
@ -463,14 +460,14 @@ static int acpi_processor_get_throttling_control(struct acpi_processor *pr)
|
|||
|
||||
if ((throttling->control_register.bit_width +
|
||||
throttling->control_register.bit_offset) > 32) {
|
||||
printk(KERN_ERR PREFIX "Invalid _PTC control register\n");
|
||||
pr_err("Invalid _PTC control register\n");
|
||||
result = -EFAULT;
|
||||
goto end;
|
||||
}
|
||||
|
||||
if ((throttling->status_register.bit_width +
|
||||
throttling->status_register.bit_offset) > 32) {
|
||||
printk(KERN_ERR PREFIX "Invalid _PTC status register\n");
|
||||
pr_err("Invalid _PTC status register\n");
|
||||
result = -EFAULT;
|
||||
goto end;
|
||||
}
|
||||
|
@ -504,7 +501,7 @@ static int acpi_processor_get_throttling_states(struct acpi_processor *pr)
|
|||
|
||||
tss = buffer.pointer;
|
||||
if (!tss || (tss->type != ACPI_TYPE_PACKAGE)) {
|
||||
printk(KERN_ERR PREFIX "Invalid _TSS data\n");
|
||||
pr_err("Invalid _TSS data\n");
|
||||
result = -EFAULT;
|
||||
goto end;
|
||||
}
|
||||
|
@ -544,8 +541,7 @@ static int acpi_processor_get_throttling_states(struct acpi_processor *pr)
|
|||
}
|
||||
|
||||
if (!tx->freqpercentage) {
|
||||
printk(KERN_ERR PREFIX
|
||||
"Invalid _TSS data: freq is zero\n");
|
||||
pr_err("Invalid _TSS data: freq is zero\n");
|
||||
result = -EFAULT;
|
||||
kfree(pr->throttling.states_tss);
|
||||
goto end;
|
||||
|
@ -585,13 +581,13 @@ static int acpi_processor_get_tsd(struct acpi_processor *pr)
|
|||
|
||||
tsd = buffer.pointer;
|
||||
if (!tsd || (tsd->type != ACPI_TYPE_PACKAGE)) {
|
||||
printk(KERN_ERR PREFIX "Invalid _TSD data\n");
|
||||
pr_err("Invalid _TSD data\n");
|
||||
result = -EFAULT;
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (tsd->package.count != 1) {
|
||||
printk(KERN_ERR PREFIX "Invalid _TSD data\n");
|
||||
pr_err("Invalid _TSD data\n");
|
||||
result = -EFAULT;
|
||||
goto end;
|
||||
}
|
||||
|
@ -604,19 +600,19 @@ static int acpi_processor_get_tsd(struct acpi_processor *pr)
|
|||
status = acpi_extract_package(&(tsd->package.elements[0]),
|
||||
&format, &state);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
printk(KERN_ERR PREFIX "Invalid _TSD data\n");
|
||||
pr_err("Invalid _TSD data\n");
|
||||
result = -EFAULT;
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (pdomain->num_entries != ACPI_TSD_REV0_ENTRIES) {
|
||||
printk(KERN_ERR PREFIX "Unknown _TSD:num_entries\n");
|
||||
pr_err("Unknown _TSD:num_entries\n");
|
||||
result = -EFAULT;
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (pdomain->revision != ACPI_TSD_REV0_REVISION) {
|
||||
printk(KERN_ERR PREFIX "Unknown _TSD:revision\n");
|
||||
pr_err("Unknown _TSD:revision\n");
|
||||
result = -EFAULT;
|
||||
goto end;
|
||||
}
|
||||
|
@ -709,8 +705,7 @@ static int acpi_throttling_rdmsr(u64 *value)
|
|||
|
||||
if ((this_cpu_read(cpu_info.x86_vendor) != X86_VENDOR_INTEL) ||
|
||||
!this_cpu_has(X86_FEATURE_ACPI)) {
|
||||
printk(KERN_ERR PREFIX
|
||||
"HARDWARE addr space,NOT supported yet\n");
|
||||
pr_err("HARDWARE addr space,NOT supported yet\n");
|
||||
} else {
|
||||
msr_low = 0;
|
||||
msr_high = 0;
|
||||
|
@ -730,8 +725,7 @@ static int acpi_throttling_wrmsr(u64 value)
|
|||
|
||||
if ((this_cpu_read(cpu_info.x86_vendor) != X86_VENDOR_INTEL) ||
|
||||
!this_cpu_has(X86_FEATURE_ACPI)) {
|
||||
printk(KERN_ERR PREFIX
|
||||
"HARDWARE addr space,NOT supported yet\n");
|
||||
pr_err("HARDWARE addr space,NOT supported yet\n");
|
||||
} else {
|
||||
msr = value;
|
||||
wrmsr_safe(MSR_IA32_THERM_CONTROL,
|
||||
|
@ -743,15 +737,13 @@ static int acpi_throttling_wrmsr(u64 value)
|
|||
#else
|
||||
static int acpi_throttling_rdmsr(u64 *value)
|
||||
{
|
||||
printk(KERN_ERR PREFIX
|
||||
"HARDWARE addr space,NOT supported yet\n");
|
||||
pr_err("HARDWARE addr space,NOT supported yet\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int acpi_throttling_wrmsr(u64 value)
|
||||
{
|
||||
printk(KERN_ERR PREFIX
|
||||
"HARDWARE addr space,NOT supported yet\n");
|
||||
pr_err("HARDWARE addr space,NOT supported yet\n");
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
@ -782,7 +774,7 @@ static int acpi_read_throttling_status(struct acpi_processor *pr,
|
|||
ret = acpi_throttling_rdmsr(value);
|
||||
break;
|
||||
default:
|
||||
printk(KERN_ERR PREFIX "Unknown addr space %d\n",
|
||||
pr_err("Unknown addr space %d\n",
|
||||
(u32) (throttling->status_register.space_id));
|
||||
}
|
||||
return ret;
|
||||
|
@ -815,7 +807,7 @@ static int acpi_write_throttling_state(struct acpi_processor *pr,
|
|||
ret = acpi_throttling_wrmsr(value);
|
||||
break;
|
||||
default:
|
||||
printk(KERN_ERR PREFIX "Unknown addr space %d\n",
|
||||
pr_err("Unknown addr space %d\n",
|
||||
(u32) (throttling->control_register.space_id));
|
||||
}
|
||||
return ret;
|
||||
|
@ -924,7 +916,7 @@ static int acpi_processor_get_fadt_info(struct acpi_processor *pr)
|
|||
}
|
||||
/* TBD: Support duty_cycle values that span bit 4. */
|
||||
else if ((pr->throttling.duty_offset + pr->throttling.duty_width) > 4) {
|
||||
printk(KERN_WARNING PREFIX "duty_cycle spans bit 4\n");
|
||||
pr_warn("duty_cycle spans bit 4\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
#define pr_fmt(fmt) "ACPI: " fmt
|
||||
|
||||
#include <linux/pci.h>
|
||||
#include <linux/acpi.h>
|
||||
#include <acpi/reboot.h>
|
||||
|
@ -63,7 +65,7 @@ void acpi_reboot(void)
|
|||
|
||||
case ACPI_ADR_SPACE_SYSTEM_MEMORY:
|
||||
case ACPI_ADR_SPACE_SYSTEM_IO:
|
||||
printk(KERN_DEBUG "ACPI MEMORY or I/O RESET_REG.\n");
|
||||
pr_debug("ACPI MEMORY or I/O RESET_REG.\n");
|
||||
acpi_reset();
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
* Copyright (c) 2005 Rich Townsend <rhdt@bartol.udel.edu>
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "ACPI: " fmt
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/module.h>
|
||||
|
@ -23,8 +25,6 @@
|
|||
|
||||
#include "sbshc.h"
|
||||
|
||||
#define PREFIX "ACPI: "
|
||||
|
||||
#define ACPI_SBS_CLASS "sbs"
|
||||
#define ACPI_AC_CLASS "ac_adapter"
|
||||
#define ACPI_SBS_DEVICE_NAME "Smart Battery System"
|
||||
|
@ -544,7 +544,7 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id)
|
|||
goto end;
|
||||
battery->have_sysfs_alarm = 1;
|
||||
end:
|
||||
printk(KERN_INFO PREFIX "%s [%s]: Battery Slot [%s] (battery %s)\n",
|
||||
pr_info("%s [%s]: Battery Slot [%s] (battery %s)\n",
|
||||
ACPI_SBS_DEVICE_NAME, acpi_device_bid(sbs->device),
|
||||
battery->name, battery->present ? "present" : "absent");
|
||||
return result;
|
||||
|
@ -577,10 +577,10 @@ static int acpi_charger_add(struct acpi_sbs *sbs)
|
|||
result = PTR_ERR(sbs->charger);
|
||||
sbs->charger = NULL;
|
||||
}
|
||||
printk(KERN_INFO PREFIX "%s [%s]: AC Adapter [%s] (%s)\n",
|
||||
pr_info("%s [%s]: AC Adapter [%s] (%s)\n",
|
||||
ACPI_SBS_DEVICE_NAME, acpi_device_bid(sbs->device),
|
||||
ACPI_AC_DIR_NAME, sbs->charger_present ? "on-line" : "off-line");
|
||||
end:
|
||||
end:
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -658,7 +658,7 @@ static int acpi_sbs_add(struct acpi_device *device)
|
|||
acpi_battery_add(sbs, 0);
|
||||
|
||||
acpi_smbus_register_callback(sbs->hc, acpi_sbs_callback, sbs);
|
||||
end:
|
||||
end:
|
||||
if (result)
|
||||
acpi_sbs_remove(device);
|
||||
return result;
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
* Copyright (c) 2007 Alexey Starikovskiy
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "ACPI: " fmt
|
||||
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/slab.h>
|
||||
|
@ -13,8 +15,6 @@
|
|||
#include <linux/interrupt.h>
|
||||
#include "sbshc.h"
|
||||
|
||||
#define PREFIX "ACPI: "
|
||||
|
||||
#define ACPI_SMB_HC_CLASS "smbus_host_ctl"
|
||||
#define ACPI_SMB_HC_DEVICE_NAME "ACPI SMBus HC"
|
||||
|
||||
|
@ -109,7 +109,7 @@ static int acpi_smbus_transaction(struct acpi_smb_hc *hc, u8 protocol,
|
|||
u8 temp, sz = 0;
|
||||
|
||||
if (!hc) {
|
||||
printk(KERN_ERR PREFIX "host controller is not configured\n");
|
||||
pr_err("host controller is not configured\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -254,7 +254,7 @@ static int acpi_smbus_hc_add(struct acpi_device *device)
|
|||
|
||||
status = acpi_evaluate_integer(device->handle, "_EC", NULL, &val);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
printk(KERN_ERR PREFIX "error obtaining _EC.\n");
|
||||
pr_err("error obtaining _EC.\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
* scan.c - support for transforming the ACPI namespace into individual objects
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "ACPI: " fmt
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/slab.h>
|
||||
|
@ -723,7 +725,7 @@ static int __acpi_device_add(struct acpi_device *device,
|
|||
|
||||
result = acpi_device_setup_files(device);
|
||||
if (result)
|
||||
printk(KERN_ERR PREFIX "Error creating sysfs interface for device %s\n",
|
||||
pr_err("Error creating sysfs interface for device %s\n",
|
||||
dev_name(&device->dev));
|
||||
|
||||
return 0;
|
||||
|
@ -1325,8 +1327,7 @@ static void acpi_set_pnp_ids(acpi_handle handle, struct acpi_device_pnp *pnp,
|
|||
|
||||
acpi_get_object_info(handle, &info);
|
||||
if (!info) {
|
||||
pr_err(PREFIX "%s: Error reading device info\n",
|
||||
__func__);
|
||||
pr_err("%s: Error reading device info\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2403,7 +2404,7 @@ static void __init acpi_get_spcr_uart_addr(void)
|
|||
status = acpi_get_table(ACPI_SIG_SPCR, 0,
|
||||
(struct acpi_table_header **)&spcr_ptr);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
pr_warn(PREFIX "STAO table present, but SPCR is missing\n");
|
||||
pr_warn("STAO table present, but SPCR is missing\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2444,7 +2445,7 @@ int __init acpi_scan_init(void)
|
|||
(struct acpi_table_header **)&stao_ptr);
|
||||
if (ACPI_SUCCESS(status)) {
|
||||
if (stao_ptr->header.length > sizeof(struct acpi_table_stao))
|
||||
pr_info(PREFIX "STAO Name List not yet supported.\n");
|
||||
pr_info("STAO Name List not yet supported.\n");
|
||||
|
||||
if (stao_ptr->ignore_uart)
|
||||
acpi_get_spcr_uart_addr();
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
* Copyright (c) 2003 Open Source Development Lab
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "ACPI: PM: " fmt
|
||||
|
||||
#include <linux/delay.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/dmi.h>
|
||||
|
@ -41,7 +43,7 @@ static void acpi_sleep_tts_switch(u32 acpi_state)
|
|||
* OS can't evaluate the _TTS object correctly. Some warning
|
||||
* message will be printed. But it won't break anything.
|
||||
*/
|
||||
printk(KERN_NOTICE "Failure in evaluating _TTS object\n");
|
||||
pr_notice("Failure in evaluating _TTS object\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -73,8 +75,7 @@ static int acpi_sleep_prepare(u32 acpi_state)
|
|||
}
|
||||
ACPI_FLUSH_CPU_CACHE();
|
||||
#endif
|
||||
printk(KERN_INFO PREFIX "Preparing to enter system sleep state S%d\n",
|
||||
acpi_state);
|
||||
pr_info("Preparing to enter system sleep state S%d\n", acpi_state);
|
||||
acpi_enable_wakeup_devices(acpi_state);
|
||||
acpi_enter_sleep_state_prep(acpi_state);
|
||||
return 0;
|
||||
|
@ -459,8 +460,7 @@ static void acpi_pm_finish(void)
|
|||
if (acpi_state == ACPI_STATE_S0)
|
||||
return;
|
||||
|
||||
printk(KERN_INFO PREFIX "Waking up from system sleep state S%d\n",
|
||||
acpi_state);
|
||||
pr_info("Waking up from system sleep state S%d\n", acpi_state);
|
||||
acpi_disable_wakeup_devices(acpi_state);
|
||||
acpi_leave_sleep_state(acpi_state);
|
||||
|
||||
|
@ -581,7 +581,7 @@ static int acpi_suspend_enter(suspend_state_t pm_state)
|
|||
error = acpi_suspend_lowlevel();
|
||||
if (error)
|
||||
return error;
|
||||
pr_info(PREFIX "Low-level resume complete\n");
|
||||
pr_info("Low-level resume complete\n");
|
||||
pm_set_resume_via_firmware();
|
||||
break;
|
||||
}
|
||||
|
@ -921,7 +921,7 @@ static void acpi_hibernation_leave(void)
|
|||
acpi_leave_sleep_state_prep(ACPI_STATE_S4);
|
||||
/* Check the hardware signature */
|
||||
if (facs && s4_hardware_signature != facs->hardware_signature)
|
||||
pr_crit("ACPI: Hardware changed while hibernated, success doubtful!\n");
|
||||
pr_crit("Hardware changed while hibernated, success doubtful!\n");
|
||||
/* Restore the NVS memory area */
|
||||
suspend_nvs_restore();
|
||||
/* Allow EC transactions to happen. */
|
||||
|
@ -1027,7 +1027,7 @@ static void acpi_power_off_prepare(void)
|
|||
static void acpi_power_off(void)
|
||||
{
|
||||
/* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */
|
||||
printk(KERN_DEBUG "%s called\n", __func__);
|
||||
pr_debug("%s called\n", __func__);
|
||||
local_irq_disable();
|
||||
acpi_enter_sleep_state(ACPI_STATE_S5);
|
||||
}
|
||||
|
@ -1059,7 +1059,7 @@ int __init acpi_sleep_init(void)
|
|||
if (sleep_states[i])
|
||||
pos += sprintf(pos, " S%d", i);
|
||||
}
|
||||
pr_info(PREFIX "(supports%s)\n", supported);
|
||||
pr_info("(supports%s)\n", supported);
|
||||
|
||||
/*
|
||||
* Register the tts_notifier to reboot notifier list so that the _TTS
|
||||
|
|
|
@ -356,8 +356,7 @@ static int acpi_table_attr_init(struct kobject *tables_obj,
|
|||
}
|
||||
table_attr->instance++;
|
||||
if (table_attr->instance > ACPI_MAX_TABLE_INSTANCES) {
|
||||
pr_warn("%4.4s: too many table instances\n",
|
||||
table_attr->name);
|
||||
pr_warn("%4.4s: too many table instances\n", table_attr->name);
|
||||
return -ERANGE;
|
||||
}
|
||||
|
||||
|
@ -727,8 +726,7 @@ static ssize_t counter_set(struct kobject *kobj,
|
|||
goto end;
|
||||
|
||||
if (!(status & ACPI_EVENT_FLAG_HAS_HANDLER)) {
|
||||
printk(KERN_WARNING PREFIX
|
||||
"Can not change Invalid GPE/Fixed Event status\n");
|
||||
pr_warn("Can not change Invalid GPE/Fixed Event status\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -966,7 +964,7 @@ void acpi_sysfs_add_hotplug_profile(struct acpi_hotplug_profile *hotplug,
|
|||
return;
|
||||
|
||||
err_out:
|
||||
pr_err(PREFIX "Unable to add hotplug profile '%s'\n", name);
|
||||
pr_err("Unable to add hotplug profile '%s'\n", name);
|
||||
}
|
||||
|
||||
static ssize_t force_remove_show(struct kobject *kobj,
|
||||
|
|
Загрузка…
Ссылка в новой задаче