lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zrow42L9dYC6tSZr@smile.fi.intel.com>
Date: Mon, 12 Aug 2024 18:57:23 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Philipp Stanner <pstanner@...hat.com>
Cc: Damien Le Moal <dlemoal@...nel.org>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
	Jonathan Cameron <Jonathan.Cameron@...wei.com>,
	Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
	linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org,
	linux-pci@...r.kernel.org
Subject: Re: [PATCH v2 04/10] crypto: marvell - replace deprecated PCI
 functions

(Reduced Cc list a lot)

On Mon, Aug 05, 2024 at 10:01:31AM +0200, Philipp Stanner wrote:
> pcim_iomap_table() and pcim_iomap_regions_request_all() have been
> deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate
> pcim_iomap_table(), pcim_iomap_regions_request_all()").
> 
> Replace these functions with their successors, pcim_iomap() and
> pcim_request_all_regions()

Missing period at the end.

...

> -	/* Map PF's configuration registers */
> -	err = pcim_iomap_regions_request_all(pdev, 1 << PCI_PF_REG_BAR_NUM,
> -					     OTX2_CPT_DRV_NAME);
> +	err = pcim_request_all_regions(pdev, OTX2_CPT_DRV_NAME);
>  	if (err) {
> -		dev_err(dev, "Couldn't get PCI resources 0x%x\n", err);
> +		dev_err(dev, "Couldn't request PCI resources 0x%x\n", err);
>  		goto clear_drvdata;
>  	}

I haven't looked at the implementation differences of those two, but would it
be really an equivalent change now?

Note, the resource may be requested, OR mapped, OR both. In accordance with the
naming above I assume that this is not equivalent change with potential
breakages.


> -	cptpf->reg_base = pcim_iomap_table(pdev)[PCI_PF_REG_BAR_NUM];
> +	/* Map PF's configuration registers */
> +	cptpf->reg_base = pcim_iomap(pdev, PCI_PF_REG_BAR_NUM, 0);
> +	if (!cptpf->reg_base) {
> +		err = -ENOMEM;
> +		dev_err(dev, "Couldn't ioremap PCI resource 0x%x\n", err);
> +		goto clear_drvdata;
> +	}

(Yes, I see this).

...

> --- a/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c
> +++ b/drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c

Ditto. here.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ