mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
ACPI: Drop physical_node_id_bitmap from struct acpi_device
The physical_node_id_bitmap in struct acpi_device is only used for
looking up the first currently unused dependent phyiscal node ID
by acpi_bind_one(). It is not really necessary, however, because
acpi_bind_one() walks the entire physical_node_list of the given
device object for sanity checking anyway and if that list is always
sorted by node_id, it is straightforward to find the first gap
between the currently used node IDs and use that number as the ID
of the new list node.
This also removes the artificial limit of the maximum number of
dependent physical devices per ACPI device object, which now depends
only on the capacity of unsigend int. As a result, it fixes a
regression introduced by commit e2ff394 (ACPI / memhotplug: Bind
removable memory blocks to ACPI device nodes) that caused
acpi_memory_enable_device() to fail when the number of 128 MB blocks
within one removable memory module was greater than 32.
Reported-and-tested-by: Yasuaki Ishimatsu <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Acked-by: Toshi Kani <[email protected]>
Reviewed-by: Yasuaki Ishimatsu <[email protected]>
This commit is contained in:
parent
623cf33cb0
commit
007ccfcf89
2 changed files with 21 additions and 21 deletions
|
|
@ -274,15 +274,12 @@ struct acpi_device_wakeup {
|
|||
};
|
||||
|
||||
struct acpi_device_physical_node {
|
||||
u8 node_id;
|
||||
unsigned int node_id;
|
||||
struct list_head node;
|
||||
struct device *dev;
|
||||
bool put_online:1;
|
||||
};
|
||||
|
||||
/* set maximum of physical nodes to 32 for expansibility */
|
||||
#define ACPI_MAX_PHYSICAL_NODE 32
|
||||
|
||||
/* Device */
|
||||
struct acpi_device {
|
||||
int device_type;
|
||||
|
|
@ -302,10 +299,9 @@ struct acpi_device {
|
|||
struct acpi_driver *driver;
|
||||
void *driver_data;
|
||||
struct device dev;
|
||||
u8 physical_node_count;
|
||||
unsigned int physical_node_count;
|
||||
struct list_head physical_node_list;
|
||||
struct mutex physical_node_lock;
|
||||
DECLARE_BITMAP(physical_node_id_bitmap, ACPI_MAX_PHYSICAL_NODE);
|
||||
struct list_head power_dependent;
|
||||
void (*remove)(struct acpi_device *);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue