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]
Date:	Thu, 10 Jul 2008 10:55:17 +1000
From:	Michael Ellerman <michaele@....ibm.com>
To:	Grant Grundler <grundler@...isc-linux.org>
Cc:	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Matthew Wilcox <matthew@....cx>, linux-pci@...r.kernel.org,
	Kenji Kaneshige <kaneshige.kenji@...fujitsu.com>,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	David Miller <davem@...emloft.net>,
	Dan Williams <dan.j.williams@...el.com>,
	Martine.Silbermann@...com, linux-kernel@...r.kernel.org,
	Michael Ellerman <michaele@....ibm.com>
Subject: Re: Multiple MSI

On Mon, 2008-07-07 at 10:17 -0600, Grant Grundler wrote:
> On Thu, Jul 03, 2008 at 01:24:29PM +1000, Benjamin Herrenschmidt wrote:
> ...
> > > Next, MSI requires that you assign a block of interrupts that is a power
> > > of two in size (between 2^0 and 2^5), and aligned to at least that power
> > > of two.
> ...
> > > One thing I do want to be clear in the API is that the driver can ask
> > > for any number of irqs, the pci layer will round up to the next power of
> > > two if necessary.
> > 
> > Well, that's where I'm not happy. The API shouldn't expose the
> > "power-of-two" thing. The numbers shown to drivers aren't in the same
> > space as the source numbers as seen by the HW on many architectures and
> > thus don't need to have the same constraints.
> 
> The drivers have to deal with the limitations of the HW spec.
> In this case it means they have to know they are getting power of 2
> number of interrupts. I think exposing this in the API is a requirement
> and not optional.

I don't think it's quite that strong. If a driver asked for 6 interrupts
the MSI code could setup 8 and have 2 just hooked to nothing. I'm not
sure that's a good idea, but it's possible.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

email: michaele@...ibm.com
stime: ellerman@....ibm.com
notes: Michael Ellerman/Australia/IBM
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ