summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinas Vepstas <linas@austin.ibm.com>2004-07-01 23:35:57 -0700
committerGreg Kroah-Hartman <greg@kroah.com>2004-07-01 23:35:57 -0700
commite1480b6993f353b52eff786ec3b29e7020f79f87 (patch)
tree99e825c7536fa133f048cf46bbd97a827b995d62
parent1d52fdc0ac45e1a4db0ee04afb995f686bb0ac18 (diff)
[PATCH] PCI Hotplug: RPAPHP structure size/performance
Please review and apply the following patch if you find it agreeable. This patch does not make any functional changes, but does improve both performance and memory usage by rearranging structure elements. The need for these changes became appearent during a code review of the disassembly involving this structure. The memory footprint of this structure is made smaller by grouping the byte fields next to each other. The access of the list_head can be simplified by making it the first element of the structure, thus avoiding a needless add-immediate without negatively impacting any of the other accesses. Signed-off-by: Linas Vepstas <linas@linas.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-rw-r--r--drivers/pci/hotplug/rpaphp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/rpaphp.h b/drivers/pci/hotplug/rpaphp.h
index eb0d6ba596bf..e155c4c974dc 100644
--- a/drivers/pci/hotplug/rpaphp.h
+++ b/drivers/pci/hotplug/rpaphp.h
@@ -85,6 +85,7 @@ struct rpaphp_pci_func {
* struct slot - slot information for each *physical* slot
*/
struct slot {
+ struct list_head rpaphp_slot_list;
int state;
u32 index;
u32 type;
@@ -92,6 +93,7 @@ struct slot {
char *name;
char *location;
u8 removable;
+ u8 dev_type; /* VIO or PCI */
struct device_node *dn; /* slot's device_node in OFDT */
/* dn has phb info */
struct pci_dev *bridge; /* slot's pci_dev in pci_devices */
@@ -99,9 +101,7 @@ struct slot {
struct list_head pci_funcs; /* pci_devs in PCI slot */
struct vio_dev *vio_dev; /* vio_dev in VIO slot */
} dev;
- u8 dev_type; /* VIO or PCI */
struct hotplug_slot *hotplug_slot;
- struct list_head rpaphp_slot_list;
};
extern struct hotplug_slot_ops rpaphp_hotplug_slot_ops;