From patchwork Sun Jun 18 16:24:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 109636 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2555710vqr; Sun, 18 Jun 2023 09:55:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6fUlDxMmkDR4/hBml8O3AcRWvFRwlpooCVOpHWgHmHaIUN7p7qkfyi7oBXpGy5LNofEyYm X-Received: by 2002:a17:902:e807:b0:1b3:d33f:917 with SMTP id u7-20020a170902e80700b001b3d33f0917mr6334142plg.49.1687107319192; Sun, 18 Jun 2023 09:55:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687107319; cv=none; d=google.com; s=arc-20160816; b=S0tmb6ItoJ7+L91v0QiU6nPrhBc++SlAAn1PtHCXuG5p1+WPic1uOrGUk9YqcvOpDY IF95FFE/gS3qhe/1yOVv3/oC0rBnkYlmMkxqmyRNGg/2Ewkf+c7ubuKBUrfKD5YQXOoX wmt3prq1Mt/4i3R+yqMoIeAU/laf3N+3qjmBKO/QcHMXN3kLQ4zJOPiZyef4U9vNw5v7 OuaHXmqB1ma+QsD2S3lj3Phd1wY8JYCkXHMt1uW5ry24vsrEn70F0M+Q66oNuA0ABHm0 bGbsouoPFCrZsfz5J3wZNDaOWU+15lAY1Qw5xexuZQPtH7dVOHICLB56cTXDsmZjnZnp JYAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=vduJtJTiTmHUwJwzG9QCoqetEOnDC2NYSydhpCqW9gc=; b=rNDjY6g8GcJ4VGtxS/FseJXGDNI5BJ2giOS9j9gJmYBJb7f+lWbpyQ9N1XtNqymW84 zuD0N8liF1kE7aroVYrrxE/LrKsJgV4J7LOHuy9pyzEqA49yaTkkSQd/Q9v7qMUSuG03 NCm2s+F8RR5cUeAzHYpBx2qTRN6jTAWPnQxX3bGMwCTsgmaD32fDVtPGo3FPLoYsJd+/ 2hDWW2BiBPWh2Pc6XW+2YGx2NQteWeKMBVjRNO+WteiqHqYvh2riu1FI33GTLM8rg3MM IyPMk3CdIV9vnKKL4bGV0GEsfYG3nP5fXZm9oK+nlmJU8u2d/jEJXPCGqj+4J2pEL4NH 91yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=NPPoVt20; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d3-20020a170902cec300b001b25e9a76d7si18140231plg.316.2023.06.18.09.55.06; Sun, 18 Jun 2023 09:55:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=NPPoVt20; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229481AbjFRQZU (ORCPT + 99 others); Sun, 18 Jun 2023 12:25:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbjFRQZS (ORCPT ); Sun, 18 Jun 2023 12:25:18 -0400 Received: from smtp.smtpout.orange.fr (smtp-20.smtpout.orange.fr [80.12.242.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CCED1B4 for ; Sun, 18 Jun 2023 09:25:14 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id AvD8qePgkuHEfAvD8qbYZF; Sun, 18 Jun 2023 18:25:06 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1687105506; bh=vduJtJTiTmHUwJwzG9QCoqetEOnDC2NYSydhpCqW9gc=; h=From:To:Cc:Subject:Date; b=NPPoVt207fx+2FC33z2MVoeTxXkm9k09DcOPbGD0D3RkNi0f+UxKLDl6X3pYb3hDW SZxE7eyw7r2GUPDUo+9AoERBYNQ7WuMoFJ0jCx9mDdhZmdT3N/GNIkfSZwstPePhoz g8m3bN07KQGcQlye+6qAHKAUFVd7ako43Ic98m3GPo+vDi/O0YdsmzrYSFU2+Uhxpk NECioTiGEm9WvXLNxdKE65oNpUSXJ4osn0O6kLxcrSdhE6xT3gQGUFytANaQQLVaM8 lbzN0hy//t4GqnI54KtGjhHld/wBy21owR9yEMv8FY4DLlQyMnOKye61FwsMz2A+l0 dV4rj+Gf0qUpg== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 18 Jun 2023 18:25:06 +0200 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Bjorn Helgaas Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-pci@vger.kernel.org Subject: [PATCH 1/2] PCI: Reorder some fields in 'struct pci_dev' Date: Sun, 18 Jun 2023 18:24:54 +0200 Message-Id: <407b17c3e56764ef2c558898d4ff4c6c04b2d757.1687105455.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769060244066131990?= X-GMAIL-MSGID: =?utf-8?q?1769060244066131990?= Group some bitfield variables to reduce hole. On x86_64, this shrinks the size of 'struct pci_dev' by 16 bytes when compiled with 'allmodconfig'. This goes from 3576 to 3560. The move related to CONFIG_PCIEASPM depends on the config. But it gives the opportunity to merge to bitfields. Signed-off-by: Christophe JAILLET --- include/linux/pci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/pci.h b/include/linux/pci.h index c69a2cc1f412..106754757279 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -366,8 +366,8 @@ struct pci_dev { pci_power_t current_state; /* Current operating state. In ACPI, this is D0-D3, D0 being fully functional, and D3 being off. */ - unsigned int imm_ready:1; /* Supports Immediate Readiness */ u8 pm_cap; /* PM capability offset */ + unsigned int imm_ready:1; /* Supports Immediate Readiness */ unsigned int pme_support:5; /* Bitmask of states from which PME# can be generated */ unsigned int pme_poll:1; /* Poll device's PME status bit */ @@ -392,9 +392,9 @@ struct pci_dev { #ifdef CONFIG_PCIEASPM struct pcie_link_state *link_state; /* ASPM link state */ + u16 l1ss; /* L1SS Capability pointer */ unsigned int ltr_path:1; /* Latency Tolerance Reporting supported from root to here */ - u16 l1ss; /* L1SS Capability pointer */ #endif unsigned int pasid_no_tlp:1; /* PASID works without TLP Prefix */ unsigned int eetlp_prefix_path:1; /* End-to-End TLP Prefix */