public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] More PCI fixes for 2.6.7
Date: Fri, 2 Jul 2004 14:39:12 -0700	[thread overview]
Message-ID: <1088804352158@kroah.com> (raw)
In-Reply-To: <1088804352811@kroah.com>

ChangeSet 1.1788, 2004/07/02 13:35:57-07:00, linas@austin.ibm.com

[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>


 drivers/pci/hotplug/rpaphp.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


diff -Nru a/drivers/pci/hotplug/rpaphp.h b/drivers/pci/hotplug/rpaphp.h
--- a/drivers/pci/hotplug/rpaphp.h	2004-07-02 14:24:19 -07:00
+++ b/drivers/pci/hotplug/rpaphp.h	2004-07-02 14:24:19 -07:00
@@ -85,6 +85,7 @@
  * 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 @@
 	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 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;


  reply	other threads:[~2004-07-02 21:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-02 21:38 [BK PATCH] More PCI fixes for 2.6.7 Greg KH
2004-07-02 21:39 ` [PATCH] " Greg KH
2004-07-02 21:39   ` Greg KH
2004-07-02 21:39     ` Greg KH
2004-07-02 21:39       ` Greg KH [this message]
2004-07-02 21:39         ` Greg KH

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=1088804352158@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox