Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a68d3532 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branch 'acpi-assorted'

* acpi-assorted:
  ACPI: Add DMI entry for Sony VGN-FW41E_H
  ACPI: fix obsolete comment in custom_method.c
  ACPI / thermal: Use mode to enable/disable kernel thermal processing
  ACPI thermal: remove unnecessary newline from exception message
  ACPI sysfs: remove unnecessary newline from exception
  ACPI video: remove unnecessary newline from error messages
  ACPI: SRAT: report non-volatile memory in debug
  ACPI: Rework acpi_get_child() to be more efficient
parents e8f71df7 66f2fda9
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
/*
/*
 * debugfs.c - ACPI debugfs interface to userspace.
 * custom_method.c - debugfs interface for customizing ACPI control method
 */
 */


#include <linux/init.h>
#include <linux/init.h>
+13 −22
Original line number Original line Diff line number Diff line
@@ -98,40 +98,31 @@ static int acpi_find_bridge_device(struct device *dev, acpi_handle * handle)
	return ret;
	return ret;
}
}


/* Get device's handler per its address under its parent */
static acpi_status do_acpi_find_child(acpi_handle handle, u32 lvl_not_used,
struct acpi_find_child {
				      void *addr_p, void **ret_p)
	acpi_handle handle;
	u64 address;
};

static acpi_status
do_acpi_find_child(acpi_handle handle, u32 lvl, void *context, void **rv)
{
{
	unsigned long long addr;
	acpi_status status;
	acpi_status status;
	struct acpi_device_info *info;

	struct acpi_find_child *find = context;
	status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, &addr);

	if (ACPI_SUCCESS(status) && addr == *((u64 *)addr_p)) {
	status = acpi_get_object_info(handle, &info);
		*ret_p = handle;
	if (ACPI_SUCCESS(status)) {
		return AE_CTRL_TERMINATE;
		if ((info->address == find->address)
			&& (info->valid & ACPI_VALID_ADR))
			find->handle = handle;
		kfree(info);
	}
	}
	return AE_OK;
	return AE_OK;
}
}


acpi_handle acpi_get_child(acpi_handle parent, u64 address)
acpi_handle acpi_get_child(acpi_handle parent, u64 address)
{
{
	struct acpi_find_child find = { NULL, address };
	void *ret = NULL;


	if (!parent)
	if (!parent)
		return NULL;
		return NULL;
	acpi_walk_namespace(ACPI_TYPE_DEVICE, parent,
			    1, do_acpi_find_child, NULL, &find, NULL);
	return find.handle;
}


	acpi_walk_namespace(ACPI_TYPE_DEVICE, parent, 1, NULL,
			    do_acpi_find_child, &address, &ret);
	return (acpi_handle)ret;
}
EXPORT_SYMBOL(acpi_get_child);
EXPORT_SYMBOL(acpi_get_child);


static int acpi_bind_one(struct device *dev, acpi_handle handle)
static int acpi_bind_one(struct device *dev, acpi_handle handle)
+4 −2
Original line number Original line Diff line number Diff line
@@ -116,14 +116,16 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header)
			struct acpi_srat_mem_affinity *p =
			struct acpi_srat_mem_affinity *p =
			    (struct acpi_srat_mem_affinity *)header;
			    (struct acpi_srat_mem_affinity *)header;
			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
					  "SRAT Memory (0x%lx length 0x%lx) in proximity domain %d %s%s\n",
					  "SRAT Memory (0x%lx length 0x%lx) in proximity domain %d %s%s%s\n",
					  (unsigned long)p->base_address,
					  (unsigned long)p->base_address,
					  (unsigned long)p->length,
					  (unsigned long)p->length,
					  p->proximity_domain,
					  p->proximity_domain,
					  (p->flags & ACPI_SRAT_MEM_ENABLED)?
					  (p->flags & ACPI_SRAT_MEM_ENABLED)?
					  "enabled" : "disabled",
					  "enabled" : "disabled",
					  (p->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE)?
					  (p->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE)?
					  " hot-pluggable" : ""));
					  " hot-pluggable" : "",
					  (p->flags & ACPI_SRAT_MEM_NON_VOLATILE)?
					  " non-volatile" : ""));
		}
		}
#endif				/* ACPI_DEBUG_OUTPUT */
#endif				/* ACPI_DEBUG_OUTPUT */
		break;
		break;
+8 −0
Original line number Original line Diff line number Diff line
@@ -177,6 +177,14 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
	},
	},
	{
	{
	.callback = init_nvs_nosave,
	.callback = init_nvs_nosave,
	.ident = "Sony Vaio VGN-FW41E_H",
	.matches = {
		DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
		DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FW41E_H"),
		},
	},
	{
	.callback = init_nvs_nosave,
	.ident = "Sony Vaio VGN-FW21E",
	.ident = "Sony Vaio VGN-FW21E",
	.matches = {
	.matches = {
		DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
		DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
+1 −1
Original line number Original line Diff line number Diff line
@@ -498,7 +498,7 @@ static int get_status(u32 index, acpi_event_status *status,
		result = acpi_get_gpe_device(index, handle);
		result = acpi_get_gpe_device(index, handle);
		if (result) {
		if (result) {
			ACPI_EXCEPTION((AE_INFO, AE_NOT_FOUND,
			ACPI_EXCEPTION((AE_INFO, AE_NOT_FOUND,
					"Invalid GPE 0x%x\n", index));
					"Invalid GPE 0x%x", index));
			goto end;
			goto end;
		}
		}
		result = acpi_get_gpe_status(*handle, index, status);
		result = acpi_get_gpe_status(*handle, index, status);
Loading