From: Matthew Garrett <mjg59@srcf.ucam.org>
To: lenb@kernel.org
Cc: linux-acpi@vger.kernel.org
Subject: [PATCH 1/2] Add a list of processor objects to the ACPI core
Date: Wed, 14 May 2008 02:03:00 +0100 [thread overview]
Message-ID: <20080514010300.GC21608@srcf.ucam.org> (raw)
In-Reply-To: <20080514010000.GB21608@srcf.ucam.org>
Add a convenience structure to the ACPI core that allows drivers to
obtain the list of CPU devices. This is left in the core since the
scanning is performed at boot time and the drivers may be built as
modules.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
---
Am I missing a straightforward function to call from a driver that gives
me the handles of all the objects of a specific type? There must be a
better way of doing it than this :)
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 6d85289..3b8d036 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -30,6 +30,9 @@ struct acpi_device_bus_id{
struct list_head node;
};
+struct acpi_handle_list acpi_processor_list;
+EXPORT_SYMBOL(processor_list);
+
/*
* Creates hid/cid(s) string needed for modalias and uevent
* e.g. on a device with hid:IBM0001 and cid:ACPI0001 you get:
@@ -1044,6 +1047,11 @@ static void acpi_device_set_id(struct acpi_device *device,
break;
case ACPI_BUS_TYPE_PROCESSOR:
hid = ACPI_PROCESSOR_HID;
+ if (acpi_processor_list.count < ACPI_MAX_HANDLES) {
+ acpi_processor_list.handles[acpi_processor_list.count]
+ =handle;
+ acpi_processor_list.count++;
+ }
break;
case ACPI_BUS_TYPE_SYSTEM:
hid = ACPI_SYSTEM_HID;
--
Matthew Garrett | mjg59@srcf.ucam.org
next prev parent reply other threads:[~2008-05-14 1:03 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-14 1:00 [PATCH] Fix polling policy in the absence of _TZP Matthew Garrett
2008-05-14 1:03 ` Matthew Garrett [this message]
2008-05-14 1:08 ` [PATCH 2/2] Add a passive cooling trip point if the firmware doesn't define one Matthew Garrett
2008-05-14 3:30 ` Len Brown
2008-05-14 9:33 ` Matthew Garrett
2008-05-14 15:37 ` Len Brown
2008-05-14 23:01 ` Matthew Garrett
2008-05-15 0:55 ` Zhang Rui
2008-05-15 1:04 ` Matthew Garrett
[not found] ` <1210814699.2929.10.camel@rzhang-crestline.sh.intel.com>
[not found] ` <20080515015831.GA14829@srcf.ucam.org>
2008-05-15 2:15 ` Zhang Rui
2008-05-15 2:24 ` Matthew Garrett
2008-05-15 3:06 ` Zhang Rui
2008-05-15 11:40 ` Matthew Garrett
2008-05-15 11:47 ` Andi Kleen
2008-05-15 12:02 ` Matthew Garrett
2008-05-14 3:19 ` [PATCH] Fix polling policy in the absence of _TZP Len Brown
2008-05-14 10:14 ` Matthew Garrett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080514010300.GC21608@srcf.ucam.org \
--to=mjg59@srcf.ucam.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.