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  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]
Date:   Mon, 16 Jan 2017 18:33:10 +0100
From:   Jan Kiszka <jan.kiszka@...mens.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        linux-arm-kernel@...ts.infradead.org
Cc:     Daniel Mack <daniel@...que.org>,
        Haojian Zhuang <haojian.zhuang@...il.com>,
        Robert Jarzmik <robert.jarzmik@...e.fr>,
        linux-kernel@...r.kernel.org,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Jarkko Nikula <jarkko.nikula@...mer.com>,
        Sascha Weisenberger <sascha.weisenberger@...mens.com>
Subject: Re: [PATCH 2/2] spi: pca2xx-pci: Allow MSI

On 2017-01-16 10:29, Andy Shevchenko wrote:
> On Mon, 2017-01-16 at 10:06 +0100, Jan Kiszka wrote:
>> Now that the core is ready for edge-triggered interrupts, we can
>> safely
>> allow the PCI versions that provide this to enable the feature and,
>> thus, have less shared interrupts.
>>
> 
> My comments below.
> 
>> -	 if (IS_ERR(ssp->clk))
>> +	if (IS_ERR(ssp->clk))
>>  		return PTR_ERR(ssp->clk);
> 
> This doesn't belong to the patch.
>  
>> +	pci_set_master(dev);
>> +
>> +	ret = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_ALL_TYPES);
>> +	if (ret < 0) {
>> +		clk_unregister(ssp->clk);
>> +		return ret;
>> +	}
>> +	ssp->irq = pci_irq_vector(dev, 0);
>> +
> 
> This looks good, though I would put it closer to the initial place of
> ssp->irq assignment, i.e. before clock registering.
> 
>> +		pci_free_irq_vectors(dev);
>> +	pci_free_irq_vectors(dev);
> 
> You know my answer, right? So, please be sure that we are using
> pcim_alloc_irq_vectors().
> 
> Yes, I know there is (was?) no such API, needs to be created. Currently
> this might make a mess on ->remove().
> 

FWIW, I've an updated version of this patch already, addressing the
remarks. Just waiting for a reply on the other patch now.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

Powered by blists - more mailing lists