[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CY8PR11MB7134D716377B0C5E40E5C8FF89552@CY8PR11MB7134.namprd11.prod.outlook.com>
Date: Thu, 31 Oct 2024 07:52:15 +0000
From: "Zhuo, Qiuxu" <qiuxu.zhuo@...el.com>
To: Yazen Ghannam <yazen.ghannam@....com>, "linux-edac@...r.kernel.org"
<linux-edac@...r.kernel.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "Luck,
Tony" <tony.luck@...el.com>, "x86@...nel.org" <x86@...nel.org>,
"avadhut.naik@....com" <avadhut.naik@....com>, "john.allen@....com"
<john.allen@....com>, "mario.limonciello@....com"
<mario.limonciello@....com>, "bhelgaas@...gle.com" <bhelgaas@...gle.com>,
"Shyam-sundar.S-k@....com" <Shyam-sundar.S-k@....com>, "richard.gong@....com"
<richard.gong@....com>, "jdelvare@...e.com" <jdelvare@...e.com>,
"linux@...ck-us.net" <linux@...ck-us.net>, "clemens@...isch.de"
<clemens@...isch.de>, "hdegoede@...hat.com" <hdegoede@...hat.com>,
"ilpo.jarvinen@...ux.intel.com" <ilpo.jarvinen@...ux.intel.com>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"linux-hwmon@...r.kernel.org" <linux-hwmon@...r.kernel.org>,
"platform-driver-x86@...r.kernel.org" <platform-driver-x86@...r.kernel.org>,
"naveenkrishna.chatradhi@....com" <naveenkrishna.chatradhi@....com>,
"carlos.bilbao.osdev@...il.com" <carlos.bilbao.osdev@...il.com>
Subject: RE: [PATCH 06/16] x86/amd_nb: Simplify root device search
> From: Yazen Ghannam <yazen.ghannam@....com>
> [...]
> +struct pci_dev *amd_node_get_root(u16 node) {
> + struct pci_dev *df_f0 __free(pci_dev_put) = NULL;
NULL pointer initialization is not necessary.
> + struct pci_dev *root;
> + u16 cntl_off;
> + u8 bus;
> +
> + if (!boot_cpu_has(X86_FEATURE_ZEN))
> + return NULL;
> +
> + /*
> + * D18F0xXXX [Config Address Control] (DF::CfgAddressCntl)
> + * Bits [7:0] (SecBusNum) holds the bus number of the root device for
> + * this Data Fabric instance. The segment, device, and function will be
> 0.
> + */
> + df_f0 = amd_node_get_func(node, 0);
> + if (!df_f0)
> + return NULL;
> [...]
Powered by blists - more mailing lists