From patchwork Sun Jun 18 16:24:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 109635 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2555600vqr; Sun, 18 Jun 2023 09:55:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7hLgtXt4zuvspDa3fQ4/jvdDhi9vG5AYBj9ywtVwDNJYJ9PgeExQwdR2145MFs2IeoB8Hk X-Received: by 2002:a05:6a20:43a4:b0:10e:ff8f:8edc with SMTP id i36-20020a056a2043a400b0010eff8f8edcmr6444772pzl.55.1687107299930; Sun, 18 Jun 2023 09:54:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687107299; cv=none; d=google.com; s=arc-20160816; b=0Q/UKzrlKgUwd5oaDdCYix+A/wL1R8W9k6vZo8KoJqzqN0AmlXBYWJJi3j0/zIDxIo otTb+vsJ8eVCW5zp/RulLGOmUyyEoPjOxUlHnMl3DxaKTlZ9dGtjk3M1TcZbyJWH5YvM SuGING0BRiAz/aEa7BnzRg++/IC/Dshz8mHov5Hv7pSktLmQOWvpYCbxDLlOrXFVazlD c39mBTF5T6bpW83SjeBfErVu+WDkZVZ46Vv3vSgFY2mjJbuGAUeLEP+tNYYEwxh6agqJ PWU0VdZPYKFuOUdK0KVYPJe6n2WbgoNAje0dtbsPZA1tLb2KChSCo1gnZX22iPWdvRup zVIg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7JePpIbtyIw6zKN1IPxyCEDxfHQDsi/Aj9GfQW/K8Hs=; b=od6ND4tAA06CXHx/tp6/uUiitH+78JMxRwYVCDN/3z6Sjk32KbXu9uH+dgLQtiV7Ye adGoVd5+7DF79AEHbuAk+s588qdLC/v6ULfhUGDTQuJ2LX+iCFYQJ8+pJBPQNkczMA8X c81PhGQWIQLt42GlobyubpN4OJwe5G/kn52ub0/VXAgOnLPs3AuV69cuLdjal7E3wR3C NUSMYWW6G3hXd9YQWYIngBEi5YuE7bg/nkfkkAN3/Ay34RCNcEOqHdo5tJDzCAidrOAW FLo5E5W0YE4Cd8Q5uBcqa8hDMMtbCW10glRhbg3LP+KoLM3zCW+MoLCVMlrEAqGMu6RP TEZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=rqOcEbLe; 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 r12-20020a632b0c000000b0054fe20c31e6si8838218pgr.649.2023.06.18.09.54.45; Sun, 18 Jun 2023 09:54:59 -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=rqOcEbLe; 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 S229539AbjFRQZZ (ORCPT + 99 others); Sun, 18 Jun 2023 12:25:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbjFRQZT (ORCPT ); Sun, 18 Jun 2023 12:25:19 -0400 Received: from smtp.smtpout.orange.fr (smtp-20.smtpout.orange.fr [80.12.242.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D3C3E5F for ; Sun, 18 Jun 2023 09:25:18 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id AvD8qePgkuHEfAvDDqbYZc; Sun, 18 Jun 2023 18:25:11 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1687105511; bh=7JePpIbtyIw6zKN1IPxyCEDxfHQDsi/Aj9GfQW/K8Hs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=rqOcEbLeGaNm5DlAC1yLgV2X2Zkc6lGAsqydI1b2ap8LJYmxiW2kVWhBsx+8u5aIp CPikmmCcAmjwA3zNxfMGbmor4ZYzux0QI8truRwPu9S/tioU59HzNq9Fm2IOReYE2n gdaQESUSYTrgpx+jwCBreZbE+E6IiUa/QyWMsNBbAKgrczbHV7y/518k0A9PL4Pbpz jmZ2+iRp705D3hlP2hxY1nl5JyWcIDMy9q7o48kEGI9mlhYkA9uaTpiYczdmC/cZNs SypS8oOGEjk/q5J+xbI3yeSst6nyjDcYszpbw05CzkSAomqLZOeE8Gpu4HcoHW+NT8 9jw5tM5qR73Uw== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 18 Jun 2023 18:25:11 +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 2/2] PCI: Change the type of 'rom_attr_enabled' in 'struct pci_dev' Date: Sun, 18 Jun 2023 18:24:55 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: <407b17c3e56764ef2c558898d4ff4c6c04b2d757.1687105455.git.christophe.jaillet@wanadoo.fr> References: <407b17c3e56764ef2c558898d4ff4c6c04b2d757.1687105455.git.christophe.jaillet@wanadoo.fr> 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?1769060224353459777?= X-GMAIL-MSGID: =?utf-8?q?1769060224353459777?= Make 'rom_attr_enabled' a single bit in a bitfield and move it close to an existing bitfield so that they can be merged. This field is only used in 'drivers/pci/pci-sysfs.c' to store 0 or 1. On x86_64, this shrinks the size of 'struct pci_dev' by 8 bytes. This goes from 3560 to 3552. Signed-off-by: Christophe JAILLET --- include/linux/pci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/pci.h b/include/linux/pci.h index 106754757279..0ff7500772e6 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -464,12 +464,12 @@ struct pci_dev { unsigned int no_vf_scan:1; /* Don't scan for VFs after IOV enablement */ unsigned int no_command_memory:1; /* No PCI_COMMAND_MEMORY */ unsigned int rom_bar_overlap:1; /* ROM BAR disable broken */ + unsigned int rom_attr_enabled:1; /* Display of ROM attribute enabled? */ pci_dev_flags_t dev_flags; atomic_t enable_cnt; /* pci_enable_device has been called */ u32 saved_config_space[16]; /* Config space saved at suspend time */ struct hlist_head saved_cap_space; - int rom_attr_enabled; /* Display of ROM attribute enabled? */ struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ struct bin_attribute *res_attr_wc[DEVICE_COUNT_RESOURCE]; /* sysfs file for WC mapping of resources */