Skip to content

Commit 849846c

Browse files
tititiou36bjorn-helgaas
authored andcommitted
PCI: Reorder pci_dev fields to reduce holes
Group some bitfield variables to reduce holes. On x86_64, this shrinks the size of 'struct pci_dev' by 16 bytes (from 3576 to 3560) when compiled with 'allmodconfig'. Link: https://lore.kernel.org/r/407b17c3e56764ef2c558898d4ff4c6c04b2d757.1687105455.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent 06c2afb commit 849846c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/linux/pci.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@ struct pci_dev {
366366
pci_power_t current_state; /* Current operating state. In ACPI,
367367
this is D0-D3, D0 being fully
368368
functional, and D3 being off. */
369-
unsigned int imm_ready:1; /* Supports Immediate Readiness */
370369
u8 pm_cap; /* PM capability offset */
370+
unsigned int imm_ready:1; /* Supports Immediate Readiness */
371371
unsigned int pme_support:5; /* Bitmask of states from which PME#
372372
can be generated */
373373
unsigned int pme_poll:1; /* Poll device's PME status bit */
@@ -392,9 +392,9 @@ struct pci_dev {
392392

393393
#ifdef CONFIG_PCIEASPM
394394
struct pcie_link_state *link_state; /* ASPM link state */
395+
u16 l1ss; /* L1SS Capability pointer */
395396
unsigned int ltr_path:1; /* Latency Tolerance Reporting
396397
supported from root to here */
397-
u16 l1ss; /* L1SS Capability pointer */
398398
#endif
399399
unsigned int pasid_no_tlp:1; /* PASID works without TLP Prefix */
400400
unsigned int eetlp_prefix_path:1; /* End-to-End TLP Prefix */

0 commit comments

Comments
 (0)