txn_alloc_irq() change
Hi parisc devotees,
I was working through Message Signalled Interrupt (aka TBIs) allocation and realized our current txn_alloc_irq() implementation needs to accepted at least one parameter. The parameter would indicate a (one of two) capability of the caller's device. Returning a negative irq indicates the host can't support the device because the host doesn't have a compatible resource.
Here's the comment I added:
/* Allocate processor IRQ
** The alloc_irq needs to accept a parameter to indicate how many ** bits the irq data is restricted to use. This is a HW limitation ** of the various consumers of Message Signalled Interrupts:
** Legacy PA I/O (GSC/NIO): 5 bits (architected EIM register)
** V-class (EPIC): 6 bits
** N/L/...-class: 8 bits
** PCI 2.2 MSI: 16 bits (I think)
** Existing PCI devices: 32-bits (NCR c720/ATM/GigE/HyperFabric)
**
** On the service provider side:
** o PA 1.1 (and PA2.0 narrow mode) 5-bits (width of EIR register)
** o PA 2.0 wide mode 6-bits
** o other architectures?
**
** So a Legacy PA I/O device on a PA 2.0 box can't use all ** the bits supported by the processor...and the N/L-class ** I/O subsystem supports more bits than PA2.0 has. The first ** case is the problem.
*/
vi->vi_txn_irq = txn_alloc_irq(8); /* number of bits */
if (vi->vi_txn_irq < 0)
panic("couldn't get TXN IRQ\n");
/* enable_irq() will use txn_* to program IRdT (PAT only) */ vi->vi_txn_addr = txn_alloc_addr(vi->vi_txn_irq); vi->vi_txn_data = txn_alloc_data(vi->vi_txn_irq);
ASSERT(vi->vi_txn_data < 256); /* matches 8 above */
...
In addition, I would like folks to tell me if we should add a second parameter to indicate how "wide" the "txn_addr" can be. I had assumed the width of a host processor pointer address but cards may not support enough bits (ie 32-bit card won't work on system which wants 40-bit or 44-bit physical addr). AFAIK PA-Risc systems have processors aliased to below 4GB physical address and thus it won't be an issue for our port. But other architectures do support MSI and it seems easy to avoid nasty surprizes later.
Thoughts?
thanks,
grant
ps. This module is mostly written (still a few compile problems) but
won't be published until after the IA64-linux gets published. Sorry about that...
Quoted 6 lines
I was working through Message Signalled Interrupt (aka TBIs) allocation and realized our current
txn_alloc_irq()implementation needs to accepted at least one parameter. The parameter would indicate a (one of two) capability of the caller's device. Returning a negative irq indicates the host can't support the device because the host doesn't have a compatible resource.
The original plan was to hide txn_alloc_irq (which I still think is a bad name as no-one is going to remember it) in bus-specific wrappers -- gsc_alloc_irq is one, though the Dino driver does not use it currently.
So this doesn't even affect "well-written" drivers. Changing txn_alloc_irq isn't exactly high-priority as all systems that use <= 31 interrupt-generating devices (which I guess are the systems we're currently working with) should work just fine right now.
Quoted 3 lines
/* enable_irq() will use txn_* to program IRdT (PAT only) */
vi->vi_txn_addr = txn_alloc_addr(vi->vi_txn_irq);
vi->vi_txn_data = txn_alloc_data(vi->vi_txn_irq);txn_alloc_{addr,data} are confusing names as those functions don't actually allocate anything.
Quoted 8 lines
In addition, I would like folks to tell me if we should add a second parameter to indicate how "wide" the "
txn_addr" can be. I had assumed the width of a host processor pointer address but cards may not support enough bits (ie 32-bit card won't work on system which wants 40-bit or 44-bit physical addr). AFAIK PA-Risc systems have processors aliased to below 4GB physical address and thus it won't be an issue for our port. But other architectures do support MSI and it seems easy to avoid nasty surprizes later.
This, again, depends on the bus. For PCI, either your card supports dual address cycles and you can use 64 bits, or it doesn't, in which case your system needs to alias everything below 4 GB anyway.
Philipp Rumpf
[ I didn't respond sooner because of parisc-linux mail problems...
thank phil! - grant ]
Quoted 10 lines · Philipp Rumpf
Quoted 6 lines
I was working through Message Signalled Interrupt (aka TBIs) allocation and realized our current
txn_alloc_irq()implementation needs to accepted at least one parameter. The parameter would indicate a (one of two) capability of the caller's device. Returning a negative irq indicates the host can't support the device because the host doesn't have a compatible resource.The original plan was to hide
txn_alloc_irq(which I still think is a bad name as no-one is going to remember it) in bus-specific wrappers --gsc_alloc_irqis one, though the Dino driver does not use it currently.
For munging the return values on specific busses, I agree. By that, I mean gsc_alloc_irq() is a useful interface for GSC devices which program their EIM register. This service is NOT bus specific.
I'm open for suggestions on the name.
I won't be able to modify Dino in the near future to use the same services LASI is using. I can work on this next month.
Quoted 1 line
So this doesn't even affect "well-written" drivers.
This is wrong. Symbios SCSI, ATM, and Gigabit Ethernet Drivers could all *directly* use this service. All of those devices are capable of mastering a "Message Signalled Interrupt" instead of yanking an IRQ line. It's a chicken and egg problem though: since no service exists for them on PC's, the drivers aren't written to use it. With IA64 and PA-risc joining the parade, the drivers can take advantage of those features. I'm pretty sure the "high-speed" networking folks at CERN will be interested in this once they understand its utility.
Quoted 3 lines
Changing
txn_alloc_irqisn't exactly high-priority as all systems that use <= 31 interrupt-generating devices (which I guess are the systems we're currently working with) should work just fine right now.
Your priorities don't match mine. I'm getting paid to work on stuff which only runs under PA2.0. I'm helping with PA1.1 I/O subsystem because the vast majority of everything else is common (and it's fun too).
GSC/NIO devices implement an EIM register and can only use EIR bits 0-31. GSC Fast/Wide/Diff SCSI (NCR c720 SCSI) driver does NOT have to use the EIM register. Similarly, some ATM/SCSI/GigE PCI devices behind Dino don't have to use IRQ lines. MSI support depends on the "processor", not the bus.
The current interface only works for a subset of all parisc platforms. I'm proposing an architectural change to support all current (and some future) parisc platforms because I think it's the "right" thing to do.
Quoted 6 lines
Quoted 3 lines
/* enable_irq() will use txn_* to program IRdT (PAT only) */ vi->vi_txn_addr = txn_alloc_addr(vi->vi_txn_irq); vi->vi_txn_data = txn_alloc_data(vi->vi_txn_irq);txn_alloc_{addr,data} are confusing names as those functions don't actually allocate anything.
They don't currently allocate anything but future implementations could. The IRQ is a *virtual* IRQ (prumpf knows that; I don't have to tell him). The address and data associated with that IRQ can be any CPU and any EIR bit for a given CPU.
Secondly, the names match with txn_alloc_irq() and that makes it easier to remember. I'm open to changing the names for all three functions.
Quoted 9 lines
Quoted 8 lines
In addition, I would like folks to tell me if we should add a second parameter to indicate how "wide" the "
txn_addr" can be. I had assumed the width of a host processor pointer address but cards may not support enough bits (ie 32-bit card won't work on system which wants 40-bit or 44-bit physical addr). AFAIK PA-Risc systems have processors aliased to below 4GB physical address and thus it won't be an issue for our port. But other architectures do support MSI and it seems easy to avoid nasty surprizes later.
Quoted 3 lines
This, again, depends on the bus. For PCI, either your card supports dual address cycles and you can use 64 bits, or it doesn't, in which case your system needs to alias everything below 4 GB anyway.
That's true. But the card *also* needs to support dual address cycle and the caller (ie device driver) will know this. For systems which alias stuff below 4GB, we should just use those aliases. I'm concerned about a case where the PCI bus adapter supports dual address cycle, the card does not, no alias exists, and the processor is above 4GB. Somewhat obscure and I hope we don't run into this. That's why I simply ask for folks to tell me if we should support it even if it might not get used.
Dino does not support dual address cycle.
"lba" (C3000/J5000) PCI bus adapter does.
thanks prumpf for the feedback,
grant
Grant Grundler
Unix Developement Lab
+1.408.447.7253
Quoted 7 lines
Quoted 3 lines
The original plan was to hide
txn_alloc_irq(which I still think is a bad name as no-one is going to remember it) in bus-specific wrappers --gsc_alloc_irqis one, though the Dino driver does not use it currently.For munging the return values on specific busses, I agree. By that, I mean
gsc_alloc_irq()is a useful interface for GSC devices which program their EIM register. This service is NOT bus specific.
Yes, it is. Whether you can even reach the CPU's EIR register from a certain bus is bus-specific. Which EIR you want to use if you have the choice is bus-specific. The address of the EIR, if you can reach it, is bus-specific (as you have a TLB between your system bus and the I/O bus(ses) on most PA2.0 systems, right ?). The length of the data word you can send is bus-specific (5 bits for GSC, 6 bits for 64-bit PA busses).
Quoted 1 line
I'm open for suggestions on the name.
If you want to export txn_alloc_irq to PCI drivers, ask the guys who will actually have to use it - i.e. the driver authors for devices you want to use transaction interrupts and the PCI maintainers for architectures that support transaction interrupts (IA64 and PA-RISC ?).
If you want to keep the function parisc-specific and not exported to drivers (just to the bus-specific wrappers), it could be called "cca1a78e0" without anyone getting too upset about it.
Quoted 4 lines
Quoted 1 line
So this doesn't even affect "well-written" drivers.
This is wrong. Symbios SCSI, ATM, and Gigabit Ethernet Drivers could all *directly* use this service. All of those devices are capable of mastering a "Message Signalled Interrupt" instead of yanking an IRQ line.
And why would the driver be concerned with it ? I am not sure how PCI TBIs work, but the way I would hope it works is the PCI bus initialization code assigns address/data pairs to those devices that support TBIs and puts the corresponding irq into the pci_dev structure. That way, we're down to one line of code that calls txn_alloc_irq.
For those PCI devices that don't use the standard configuration mechanism to do TBIs, if they should turn out to be worth it, you would have to do stuff in the actual device driver, but I don't think there are many devices to which this applies.
Quoted 2 lines
It's a chicken and egg problem though: since no service exists for them on PC's, the drivers aren't written to use it. With IA64 and PA-risc
If you need to let the driver know which mechanism is used at the hardware level to deliver interrupts, that's a flaw of the PCI spec (and would make TBIs a lot less usable than IRQ line PCI interrupts).
Quoted 6 lines
Quoted 3 lines
Changing
txn_alloc_irqisn't exactly high-priority as all systems that use <= 31 interrupt-generating devices (which I guess are the systems we're currently working with) should work just fine right now.Your priorities don't match mine. I'm getting paid to work on stuff which only runs under PA2.0.
The public Linux/PA-RISC tree is PA1.1 only right now, and I dare say we don't care about systems with more than 31 IRQ-generating devices.
I don't know about the IA64 tree and any non-public Linux/PA-RISC trees, but it was my impression those have their own mailing-lists and changes to them need not be discussed here.
Quoted 1 line
The current interface only works for a subset of all parisc platforms.
Yeah, the subset with <= 31 devices.
Quoted 4 lines
Quoted 2 lines
txn_alloc_{addr,data} are confusing names as those functions don't actually allocate anything.
They don't currently allocate anything but future implementations could.
How ?
All the allocation is handled in txn_alloc_irq - it returns a virtual irq that can be resolved to an address/data pair lateron. If we want to allocate data (eg the eim bit index right now), it's done in txn_alloc_irq. If we want to allocate addresses (eg the future txn_alloc_irq returning the right CPU's EIR), we do it in txn_alloc_irq.
Quoted 6 lines
The IRQ is a *virtual* IRQ (prumpf knows that; I don't have to tell him). The address and data associated with that IRQ can be any CPU and any EIR bit for a given CPU.
Secondly, the names match with
txn_alloc_irq()and that makes it easier to remember. I'm open to changing the names for all three functions.
Actually, what you should think about is merging the three functions - virtual irq, transaction address and transaction data don't make sense on their own, so you almost always end up doing
tmp1 = txn_alloc_irq(...); tmp2 = txn_alloc_addr(irq); tmp3 = txn_alloc_data(irq);
which seems unnecessarily verbose.
Philipp Rumpf
Quoted 11 lines · Philipp Rumpf
Quoted 3 lines
For munging the return values on specific busses, I agree. By that, I mean
gsc_alloc_irq()is a useful interface for GSC devices which program their EIM register. This service is NOT bus specific.Yes, it is. Whether you can even reach the CPU's EIR register from a certain bus is bus-specific. Which EIR you want to use if you have the choice is bus-specific. The address of the EIR, if you can reach it, is bus-specific (as you have a TLB between your system bus and the I/O bus(ses) on most PA2.0 systems, right ?). The length of the data word you can send is bus-specific (5 bits for GSC, 6 bits for 64-bit PA busses).
Philipp,
The *service* is not bus specific. The details (ie parameters) are. Please seperate interfaces from implementations.
You claimed early on you would do that.
Quoted 6 lines
Quoted 1 line
I'm open for suggestions on the name.
If you want to export
txn_alloc_irqto PCI drivers, ask the guys who will actually have to use it - i.e. the driver authors for devices you want to use transaction interrupts and the PCI maintainers for architectures that support transaction interrupts (IA64 and PA-RISC ?).
Ok. I need to lookup and contact NCR/Symbios SCSI, ATM, and GigE driver authors and pester them one this topic.
Won't happen until next year. I'll do it then.
If someone knows the right people to ask, please just "cc" me in the conversion for now...
I've already spoken at length with David Mossberger (IA64) about this and he basically doesn't care right now. He finds the topic interesting but HP isn't funding him to do any work which mostly benefits servers. Though txn_xxx services help PA-Risc workstations too, IA64 has some interesting interrupt HW support which kluges around the need for MSI on configurations with less than about 4 CPUs. But neither David nor I fully understand how IA64-linux supports this HW.
(I do know how HP-UX supports the same platform though.)
Quoted 3 lines
If you want to keep the function parisc-specific and not exported to drivers (just to the bus-specific wrappers), it could be called "
cca1a78e0" without anyone getting too upset about it.
Really?
As Alex would say: "I don't believe you".
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
So this doesn't even affect "well-written" drivers.
This is wrong. Symbios SCSI, ATM, and Gigabit Ethernet Drivers could all *directly* use this service. All of those devices are capable of mastering a "Message Signalled Interrupt" instead of yanking an IRQ line.
And why would the driver be concerned with it?
Latency and CPU utilization. The former directly affect response times and the latter throughput. Using this service on PA-Risc will remove one level of function calls from the interrupt code path on PCI subsystems.
Quoted 5 lines
I am not sure how PCI
TBIs work, but the way I would hope it works is the PCI bus initialization code assigns address/data pairs to those devices that support TBIs and puts the corresponding irq into thepci_devstructure. That way, we're down to one line of code that callstxn_alloc_irq.
I know how they work. You need to do more homework before "hoping" much. And pci_dev structure only has room for the virtual IRQ. That may change for PCI 2.2 but I want to support PCI 2.1 compliant devices as well.
More importantly, not all PCI devices discovered can or will want to directly master their own interrupt transaction. I.e. assigning CPU/EIR bits to every serial port card is a waste of resources.
Quoted 4 lines
For those PCI devices that don't use the standard configuration mechanism to do TBIs, if they should turn out to be worth it, you would have to do stuff in the actual device driver, but I don't think there are many devices to which this applies.
There is no "standard configuration mechanism" for TBI's. Not until PCI 2.2 becomes more prevalent. SCSI, ATM, and GiGE PCI devices I'm aware are only PCI 2.1 compliant today.
Quoted 7 lines
Quoted 3 lines
It's a chicken and egg problem though: since no service exists for them on PC's, the drivers aren't written to use it. With IA64 and PA-risc
If you need to let the driver know which mechanism is used at the hardware level to deliver interrupts, that's a flaw of the PCI spec (and would make TBIs a lot less usable than IRQ line PCI interrupts).
You have it backwards: the PCI device driver needs to query the platform if it supports TXN services and then program the HW accordingly. Drivers do this all the time to determine capabilities of devices. If the platform doesn't support MSI, txn_alloc_irq() (with appropriate parameters) will return an error to indicate it either can't or the resource (virtual IRQ) isn't available.
Drivers can assume line based interrupts are supported by default since those are architected in PCI 2.1.
PCI 2.2 only defines how the driver can communicate the devices ability to master "Message Signalled Interrupts". It doesn't (and shouldn't) say anything about how the OS interrupt support interacts with the device driver.
Quoted 10 lines
Quoted 7 lines
Quoted 4 lines
Changing
txn_alloc_irqisn't exactly high-priority as all systems that use <= 31 interrupt-generating devices (which I guess are the systems we're currently working with) should work just fine right now.Your priorities don't match mine. I'm getting paid to work on stuff which only runs under PA2.0.
The public Linux/PA-RISC tree is PA1.1 only right now, and I dare say we don't care about systems with more than 31 IRQ-generating devices.
Alex: Can you address this?
I can't speak for The Puffin Group. But inside HP, I, and the people who pay my salary are very interested in PA 2.0 boxes which can have more than 31 IRQs. Most people first ask does parisc-linux run on <something-with-PA20>-class. So despite the official charter, PA 2.0 is happening on/with the same tree because of interest. C-class is the first stepping stone in that direction.
Quoted 3 lines
I don't know about the IA64 tree and any non-public Linux/PA-RISC trees, but it was my impression those have their own mailing-lists and changes to them need not be discussed here.
I disgree. This is an inclusive forum. If people want to work on support an 827s or T600s, they are welcome to do it. It's my choice to decline to help (and I definitely will not help).
I don't know about the IA64 tree either. In fact, I'm legally not allowed to look at it *because* I'm working on parisc-linux. (kinda sucks in fact...but oh well...)
I'm not aware of any other non-public PA-Risc tree's. I'm working on the same CVS tree as everyone else.
Quoted 3 lines
Quoted 1 line
The current interface only works for a subset of all parisc platforms.
Yeah, the subset with <= 31 devices.
I'm trying to get past that limitation.
If you don't want to help, don't reply or just say you don't want to help. I'm not offended by that.
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
txn_alloc_{addr,data} are confusing names as those functions don't actual
ly
Quoted 3 lines
Quoted 1 line
allocate anything.
They don't currently allocate anything but future implementations could.
Quoted 7 lines
How ?
All the allocation is handled in
txn_alloc_irq- it returns a virtual irq that can be resolved to an address/data pair lateron. If we want to allocate data (eg the eim bit index right now), it's done intxn_alloc_irq. If we want to allocate addresses (eg the futuretxn_alloc_irqreturning the right CPU's EIR), we do it intxn_alloc_irq.
Here's an example: Change the interface to allow the driver to call txn_alloc_addr() to get a *different* CPU - same virtual IRQ. And ditto for txn_alloc_data(). Then txn_alloc_irq() would only be used to hand out "handles" (ie Virtual IRQs).
Why would a driver want to do that? Because some outside module is smarter, knows more about the resources available, and told the device driver to make the request and reprogram it's HW. My dream is to manage interrupt "load" similar to the way process and threads are managed. In fact, the two should know about each other and they don't.
Quoted 11 lines
Quoted 6 lines
The IRQ is a *virtual* IRQ (prumpf knows that; I don't have to tell him). The address and data associated with that IRQ can be any CPU and any EIR bit for a given CPU.
Secondly, the names match with
txn_alloc_irq()and that makes it easier to remember. I'm open to changing the names for all three functions.Actually, what you should think about is merging the three functions - virtual irq, transaction address and transaction data don't make sense on their own, so you almost always end up doing
Quoted 5 lines
tmp1 = txn_alloc_irq(...); tmp2 = txn_alloc_addr(irq); tmp3 = txn_alloc_data(irq);which seems unnecessarily verbose.
See above example.
IMHO, the three functions interface is more flexible and matches the potential uses better.
thanks again,
grant
ps. I'm going to be out of the office until end of the month....bummer the mail server was out for a bit...happy holidays and happy New Year!
Quoted 7 lines
Philipp Rumpf
---------------------------------------------------------------------------
To unsubscribe: send e-mail to [email protected] with `unsubscribe' as the subject.
Grant Grundler
Unix Developement Lab
+1.408.447.7253
Quoted 2 lines
Philipp,
The *service* is not bus specific. The details (ie parameters) are.
Yes, I was wrong about that. It really is not bus specific.
Quoted 2 lines
Please seperate interfaces from implementations.
You claimed early on you would do that.
And I don't see how having the interface be per-bus (to sort the details out) and the implementation (for now) be trivial would violate that.
Quoted 2 lines
Ok. I need to lookup and contact NCR/Symbios SCSI, ATM, and GigE driver authors and pester them one this topic.
Just as a matter of interest, which GigE chip are you talking about ? I looked at the Alteon docs and that chip (which is the only one I saw used in a parisc box so far) seems not to support TBIs (with the standard firmware). If you end up using non-standard firmware anyway, it is quite likely you can support standard PCI 2.2 TBIs (if they are defined). Furthermore the typical interrupt load is quite low with the current Linux driver.
For the SCSI chips I am pretty sure the interrupt load won't be worth big hacks.
Quoted 6 lines
Quoted 3 lines
If you want to keep the function parisc-specific and not exported to drivers (just to the bus-specific wrappers), it could be called "
cca1a78e0" without anyone getting too upset about it.Really?
As Alex would say: "I don't believe you".
The point I wanted to make is if the function is used in three places, all of them parisc-specific, the name can be bad and nobody cares. If it used in lots of drivers in drivers/*, the name should be easy to remember and the function should be abstracted.
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
This is wrong. Symbios SCSI, ATM, and Gigabit Ethernet Drivers could all *directly* use this service. All of those devices are capable of mastering a "Message Signalled Interrupt" instead of yanking an IRQ line.
And why would the driver be concerned with it?
I was under the impression you used "Message Signalled Interrupt" to refer to a standards-compliant mechanism. Sorry.
Quoted 9 lines
Quoted 5 lines
I am not sure how PCI
TBIs work, but the way I would hope it works is the PCI bus initialization code assigns address/data pairs to those devices that support TBIs and puts the corresponding irq into thepci_devstructure. That way, we're down to one line of code that callstxn_alloc_irq.I know how they work.
You need to do more homework before "hoping" much.
Erm, and how exactly would you go about it ? I don't have the PCI standard, I am paying for downloading hardware docs, the one I did look at (Acenic) doesn't support TBIs.
What I hoped was the PCI designers made TBIs a standard feature which would make it usable - they didn't, so far, so we're talking about device-specific hacks here.
Quoted 2 lines
And
pci_devstructure only has room for the virtual IRQ. That may change for PCI 2.2 but I want to support PCI 2.1 compliant devices as well.
How many are there, really, and is it really worth it for all of them ?
Quoted 3 lines
More importantly, not all PCI devices discovered can or will want to directly master their own interrupt transaction. I.e. assigning CPU/EIR bits to every serial port card is a waste of resources.
This can be worked around with modules and reconfiguration. Anyway let's first run out of IRQs and then look at how we can avoid it.
Quoted 8 lines
Quoted 4 lines
For those PCI devices that don't use the standard configuration mechanism to do TBIs, if they should turn out to be worth it, you would have to do stuff in the actual device driver, but I don't think there are many devices to which this applies.
There is no "standard configuration mechanism" for TBI's. Not until PCI 2.2 becomes more prevalent. SCSI, ATM, and GiGE PCI devices I'm aware are only PCI 2.1 compliant today.
So all we can do today is brute hacks.
Quoted 2 lines
You have it backwards: the PCI device driver needs to query the platform if it supports TXN services and then program the HW accordingly.
So it really doesn't fit into any decent bus scheme. I think an important point about well-designed busses is resource allocation isn't handled by the device driver but by the bus driver. I hope PCI will allow the way interrupts are delivered to be changed as transparently to the device driver as right now the IRQ number is.
Quoted 4 lines
PCI 2.2 only defines how the driver can communicate the devices ability to master "Message Signalled Interrupts". It doesn't (and shouldn't) say anything about how the OS interrupt support interacts with the device driver.
The "doesn't" part I don't know about, and we'll see whether the PCI designers were indeed stupid enough to require the device driver to handle resource allocation.
The "shouldn't" part I disagree with.
Quoted 1 line
Quoted 1 line
The public Linux/PA-RISC tree is PA1.1 only right now, and I dare say we
PA 2.0 in narrow mode as well. We don't have more than 32 usable EIMs for that case though.
Quoted 7 lines
Quoted 1 line
don't care about systems with more than 31 IRQ-generating devices.
Alex: Can you address this?
I can't speak for The Puffin Group. But inside HP, I, and the people who pay my salary are very interested in PA 2.0 boxes which can have more than 31 IRQs.
We're not talking about boxes that have hardware support for > 32 IRQs.
We're talking about boxes which actually _have to use_ more than 32 EIR bits. For example, the A class uses 3 EIR bits in the configuration I have here (Lasi, Dino, Interval Timer). The 712 might use 2 or 3 (I am not sure whether ARTIST generates IRQs). The 715 uses 2 or 3 (I don't know about the graphics).
According to HP's product brochure, the V2500 supports 24 PCI I/O cards, which would leave 6 (we need one for IPIs and one for the interval timer) EIR bits for internal devices.
Which boxes are _you_ talking about ?
Quoted 3 lines
Most people first ask does parisc-linux run on <something-with-PA20>-class. So despite the official charter, PA 2.0 is happening on/with the same tree because of interest.
Note, again, that restricting ourselves to 32 EIR bits does not mean we won't support boxes that supply 64 EIR bits in hardware.
Quoted 6 lines
Quoted 3 lines
I don't know about the IA64 tree and any non-public Linux/PA-RISC trees, but it was my impression those have their own mailing-lists and changes to them need not be discussed here.
I disgree. This is an inclusive forum. If people want to work on support an 827s or T600s, they are welcome to do it. It's my choice to decline to help (and I definitely will not help).
Sure. If people want to support an actually existing machine that needs to use more than 31 EIR bits, they are welcome.
Quoted 3 lines
Quoted 2 lines
Quoted 1 line
The current interface only works for a subset of all parisc platforms.
Yeah, the subset with <= 31 devices.
I'm trying to get past that limitation.
Is it a limitation ? Are there actually machines out there which need more than 31 EIR bits ? Do these machines look at all like it is high-priority to support them under linux/parisc ?
Quoted 8 lines
Quoted 7 lines
How ?
All the allocation is handled in
txn_alloc_irq- it returns a virtual irq that can be resolved to an address/data pair lateron. If we want to allocate data (eg the eim bit index right now), it's done intxn_alloc_irq. If we want to allocate addresses (eg the futuretxn_alloc_irqreturning the right CPU's EIR), we do it intxn_alloc_irq.
Quoted 4 lines
Here's an example: Change the interface to allow the driver to call
txn_alloc_addr()to get a *different* CPU - same virtual IRQ. And ditto fortxn_alloc_data(). Thentxn_alloc_irq()would only be used to hand out "handles" (ie Virtual IRQs).
That example just doesn't make sense to me. If the driver wants to switch to another IRQ, it has to call txn_alloc_irq() anyway - you can't assume the implementation lets you keep a virtual IRQ (which very well might not be virtual at all, but the actual HW IRQ) even though you reallocate the address/data.
I still can't think of any situation in which it would make sense to do call only one or two of the txn_alloc_* functions.
As for actually doing allocating in txn_alloc_{data,addr}, that would require drivers to get even more complex in their initialization as they now need to handle txn_alloc_addr failing and txn_alloc_irq succeeding.
Is there a single case where it would make sense for an implementation to do allocation in txn_alloc_{data,addr} ?
Also, consider the case where you want to get an IRQ on a certain CPU. Do you want to pass the CPU number to _all_ of the txn_alloc_* functions ?
If so, why ?
Quoted 3 lines
Why would a driver want to do that? Because some outside module is smarter, knows more about the resources available, and told the device driver to make the request and reprogram it's HW.
It can change its virtual irq as well, and actually has to be to be independent of implementation details.
Quoted 11 lines
Quoted 9 lines
Actually, what you should think about is merging the three functions - virtual irq, transaction address and transaction data don't make sense on their own, so you almost always end up doing
tmp1 = txn_alloc_irq(...); tmp2 = txn_alloc_addr(irq); tmp3 = txn_alloc_data(irq);which seems unnecessarily verbose.
See above example.
You would still need to call all functions.
Quoted 1 line
IMHO, the three functions interface is more flexible and matches
It isn't. If you change anything about your IRQ, you have to call all three functions again (as an implementation _might_ be like the current implementation which doesn't have arbitrary virtual IRQ <-> physical IRQ relations).
Philipp