Skip to contentSkip to conversation

generic irq chip and pl061 irqdomain support

GIT PULL Rob Herring 3 participants 8 messages Feb 14, 2012 – Apr 11, 2012

lore
Share & tools
lore
#0 lore raw

Grant,

Please pull. This is based on your current branch which you have said you plan to rebase, so feel free to rebase these as you need to. This has been tested on highbank and i.MX5.

The following changes since commit 98ecf5260207e45ad587a5dc16c39f5ede467a45:

irq_domain/microblaze: Convert microblaze to use irq_domains
(2012-02-05 23:02:26 -0700)

are available in the git repository at:
git://sources.calxeda.com/kernel/linux.git irqdomain-for-grant

Rob Herring (3):
ARM: kconfig: always select IRQ_DOMAIN
irq: add irq_domain support to generic-chip
gpio: pl061: enable interrupts with DT style binding

 .../devicetree/bindings/gpio/pl061-gpio.txt        |   15 ++
 arch/arm/Kconfig                                   |    2 +-
 arch/arm/common/Kconfig                            |    2 -
 drivers/gpio/gpio-pl061.c                          |   48 ++++---
 include/linux/irq.h                                |   15 ++
 kernel/irq/generic-chip.c                          |  152
+++++++++++++++++---
 6 files changed, 186 insertions(+), 48 deletions(-)

Rob

#1 lore raw

Grant,

Quoted 6 lines · Rob Herring

Grant,

Please pull. This is based on your current branch which you have said you plan to rebase, so feel free to rebase these as you need to. This has been tested on highbank and i.MX5.

Ping.

I've rebased onto your current tree. Updated pull request:

The following changes since commit 280ad7fda5f95211857fda38960f2b6fdf6edd3e:

mfd: twl-core: Add IRQ_DOMAIN dependency (2012-02-26 16:48:06 -0700)

are available in the git repository at:
git://sources.calxeda.com/kernel/linux.git irqdomain-for-grant

Rob Herring (3):
ARM: kconfig: always select IRQ_DOMAIN
irq: add irq_domain support to generic-chip
gpio: pl061: enable interrupts with DT style binding

 .../devicetree/bindings/gpio/pl061-gpio.txt        |   15 ++
 arch/arm/Kconfig                                   |    2 +-
 arch/arm/common/Kconfig                            |    2 -
 drivers/gpio/gpio-pl061.c                          |   48 ++++---
 include/linux/irq.h                                |   15 ++
 kernel/irq/generic-chip.c                          |  152
+++++++++++++++++---
 6 files changed, 186 insertions(+), 48 deletions(-)

Rob

Quoted 24 lines

The following changes since commit 98ecf5260207e45ad587a5dc16c39f5ede467a45:

irq_domain/microblaze: Convert microblaze to use irq_domains
(2012-02-05 23:02:26 -0700)

are available in the git repository at:
git://sources.calxeda.com/kernel/linux.git irqdomain-for-grant

Rob Herring (3):
ARM: kconfig: always select IRQ_DOMAIN
irq: add irq_domain support to generic-chip
gpio: pl061: enable interrupts with DT style binding

 .../devicetree/bindings/gpio/pl061-gpio.txt        |   15 ++
 arch/arm/Kconfig                                   |    2 +-
 arch/arm/common/Kconfig                            |    2 -
 drivers/gpio/gpio-pl061.c                          |   48 ++++---
 include/linux/irq.h                                |   15 ++
 kernel/irq/generic-chip.c                          |  152
+++++++++++++++++---
 6 files changed, 186 insertions(+), 48 deletions(-)

Rob

#2 lore raw
Quoted 26 lines · Rob Herring

Grant,

Quoted 6 lines · Rob Herring

Grant,

Please pull. This is based on your current branch which you have said you plan to rebase, so feel free to rebase these as you need to. This has been tested on highbank and i.MX5.

Ping.

I've rebased onto your current tree. Updated pull request:

The following changes since commit 280ad7fda5f95211857fda38960f2b6fdf6edd3e:

mfd: twl-core: Add IRQ_DOMAIN dependency (2012-02-26 16:48:06 -0700)

are available in the git repository at:
git://sources.calxeda.com/kernel/linux.git irqdomain-for-grant

Rob Herring (3):
ARM: kconfig: always select IRQ_DOMAIN
irq: add irq_domain support to generic-chip
gpio: pl061: enable interrupts with DT style binding

Quoted 9 lines
 .../devicetree/bindings/gpio/pl061-gpio.txt        |   15 ++
 arch/arm/Kconfig                                   |    2 +-
 arch/arm/common/Kconfig                            |    2 -
 drivers/gpio/gpio-pl061.c                          |   48 ++++---
 include/linux/irq.h                                |   15 ++
 kernel/irq/generic-chip.c                          |  152
+++++++++++++++++---
 6 files changed, 186 insertions(+), 48 deletions(-)

Ping again...

Rob

#3 lore raw
Quoted 37 lines · Rob Herring
Quoted 26 lines · Rob Herring

Grant,

Quoted 6 lines · Rob Herring

Grant,

Please pull. This is based on your current branch which you have said you plan to rebase, so feel free to rebase these as you need to. This has been tested on highbank and i.MX5.

Ping.

I've rebased onto your current tree. Updated pull request:

The following changes since commit 280ad7fda5f95211857fda38960f2b6fdf6edd3e:

mfd: twl-core: Add IRQ_DOMAIN dependency (2012-02-26 16:48:06 -0700)

are available in the git repository at:
git://sources.calxeda.com/kernel/linux.git irqdomain-for-grant

Rob Herring (3):
ARM: kconfig: always select IRQ_DOMAIN
irq: add irq_domain support to generic-chip
gpio: pl061: enable interrupts with DT style binding

Quoted 9 lines
 .../devicetree/bindings/gpio/pl061-gpio.txt        |   15 ++
 arch/arm/Kconfig                                   |    2 +-
 arch/arm/common/Kconfig                            |    2 -
 drivers/gpio/gpio-pl061.c                          |   48 ++++---
 include/linux/irq.h                                |   15 ++
 kernel/irq/generic-chip.c                          |  152
+++++++++++++++++---
 6 files changed, 186 insertions(+), 48 deletions(-)
Quoted 1 line

Ping again...

Okay, I've pulled this in. I need to do some compile testing before I push it out.

g.

#4 lore raw

Grant,

Quoted 38 lines · Grant Likely
Quoted 37 lines · Rob Herring
Quoted 35 lines · Rob Herring

Grant,

Quoted 6 lines · Rob Herring

Grant,

Please pull. This is based on your current branch which you have said you plan to rebase, so feel free to rebase these as you need to. This has been tested on highbank and i.MX5.

Ping.

I've rebased onto your current tree. Updated pull request:

The following changes since commit 280ad7fda5f95211857fda38960f2b6fdf6edd3e:

mfd: twl-core: Add IRQ_DOMAIN dependency (2012-02-26 16:48:06 -0700)

are available in the git repository at:
git://sources.calxeda.com/kernel/linux.git irqdomain-for-grant

Rob Herring (3):
ARM: kconfig: always select IRQ_DOMAIN
irq: add irq_domain support to generic-chip
gpio: pl061: enable interrupts with DT style binding

 .../devicetree/bindings/gpio/pl061-gpio.txt        |   15 ++
 arch/arm/Kconfig                                   |    2 +-
 arch/arm/common/Kconfig                            |    2 -
 drivers/gpio/gpio-pl061.c                          |   48 ++++---
 include/linux/irq.h                                |   15 ++
 kernel/irq/generic-chip.c                          |  152
+++++++++++++++++---
 6 files changed, 186 insertions(+), 48 deletions(-)
Quoted 4 lines
Quoted 1 line

Ping again...

Okay, I've pulled this in. I need to do some compile testing before I push it out.

What happened to this? It's not in rc1.

Rob

#5 lore raw
Quoted 41 lines · Rob Herring

Grant,

Quoted 38 lines · Grant Likely
Quoted 37 lines · Rob Herring
Quoted 35 lines · Rob Herring

Grant,

Quoted 6 lines · Rob Herring

Grant,

Please pull. This is based on your current branch which you have said you plan to rebase, so feel free to rebase these as you need to. This has been tested on highbank and i.MX5.

Ping.

I've rebased onto your current tree. Updated pull request:

The following changes since commit 280ad7fda5f95211857fda38960f2b6fdf6edd3e:

mfd: twl-core: Add IRQ_DOMAIN dependency (2012-02-26 16:48:06 -0700)

are available in the git repository at:
git://sources.calxeda.com/kernel/linux.git irqdomain-for-grant

Rob Herring (3):
ARM: kconfig: always select IRQ_DOMAIN
irq: add irq_domain support to generic-chip
gpio: pl061: enable interrupts with DT style binding

 .../devicetree/bindings/gpio/pl061-gpio.txt        |   15 ++
 arch/arm/Kconfig                                   |    2 +-
 arch/arm/common/Kconfig                            |    2 -
 drivers/gpio/gpio-pl061.c                          |   48 ++++---
 include/linux/irq.h                                |   15 ++
 kernel/irq/generic-chip.c                          |  152
+++++++++++++++++---
 6 files changed, 186 insertions(+), 48 deletions(-)
Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Ping again...

Okay, I've pulled this in. I need to do some compile testing before I push it out.

What happened to this? It's not in rc1.

I kept looking at it and planning to send Linus a pull request, but I just couldn't make myself comfortable with the state of the patch. It seems to me that there is too much bleeding of irq_domain state into irq_generic_chip and it doesn't return any meaningful context to the caller that can be used to tear it back down.

I think for the domain+generic_chip use case the API needs refining so that it returns a container structure with both the irq_domain and the array of generic chips. Plus there needs to be a remove function (there also needs to be an irq_domain remove function; I also realized that was a missing piece when I looked at it).

I had really hoped to get fixup patches sorted out in time to still get Linus to merge it even though it hadn't been through Linux next, but given that I couldn't even find time to email you properly about it, it seems I was doomed. :-( There weren't any other users of it in linux-next though, so in the end I just didn't sent the pull req.

I've got a couple of fixup patches on top of your branch that I'll send to you so you can see some of the stuff that I've done. I'm also not comfortable with adding flags, irq_clr & irq_set into irq_generic_chip, but I can't quite put my finger on why. :-/ Also, the api for irq_setup_generic_chip_domain() is enormous. If a context structure is used, then it would probably be better to populate it with the configuration so that the API isn't nearly so large.

g.

Signature · 2 lines
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies,Ltd.
#6 lore raw
Quoted 61 lines · Grant Likely
Quoted 41 lines · Rob Herring

Grant,

Quoted 38 lines · Grant Likely
Quoted 37 lines · Rob Herring
Quoted 35 lines · Rob Herring

Grant,

Quoted 6 lines · Rob Herring

Grant,

Please pull. This is based on your current branch which you have said you plan to rebase, so feel free to rebase these as you need to. This has been tested on highbank and i.MX5.

Ping.

I've rebased onto your current tree. Updated pull request:

The following changes since commit 280ad7fda5f95211857fda38960f2b6fdf6edd3e:

mfd: twl-core: Add IRQ_DOMAIN dependency (2012-02-26 16:48:06 -0700)

are available in the git repository at:
git://sources.calxeda.com/kernel/linux.git irqdomain-for-grant

Rob Herring (3):
ARM: kconfig: always select IRQ_DOMAIN
irq: add irq_domain support to generic-chip
gpio: pl061: enable interrupts with DT style binding

 .../devicetree/bindings/gpio/pl061-gpio.txt        |   15 ++
 arch/arm/Kconfig                                   |    2 +-
 arch/arm/common/Kconfig                            |    2 -
 drivers/gpio/gpio-pl061.c                          |   48 ++++---
 include/linux/irq.h                                |   15 ++
 kernel/irq/generic-chip.c                          |  152
+++++++++++++++++---
 6 files changed, 186 insertions(+), 48 deletions(-)
Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Ping again...

Okay, I've pulled this in. I need to do some compile testing before I push it out.

What happened to this? It's not in rc1.

I kept looking at it and planning to send Linus a pull request, but I just couldn't make myself comfortable with the state of the patch. It seems to me that there is too much bleeding of irq_domain state into irq_generic_chip and it doesn't return any meaningful context to the caller that can be used to tear it back down.

I think for the domain+generic_chip use case the API needs refining so that it returns a container structure with both the irq_domain and the array of generic chips. Plus there needs to be a remove function (there also needs to be an irq_domain remove function; I also realized that was a missing piece when I looked at it).

Quoted 5 lines

I had really hoped to get fixup patches sorted out in time to still get Linus to merge it even though it hadn't been through Linux next, but given that I couldn't even find time to email you properly about it, it seems I was doomed. :-( There weren't any other users of it in linux-next though, so in the end I just didn't sent the pull req.

I have several patches for kirkwood/orion which depend on this. I'd be lying if I said they were ready for submission, but getting this merged would sure help move things along. ;-)

thx,

Jason.

#7 lore raw
In reply to Grant Likely
Quoted 61 lines · Grant Likely
Quoted 41 lines · Rob Herring

Grant,

Quoted 38 lines · Grant Likely
Quoted 37 lines · Rob Herring
Quoted 35 lines · Rob Herring

Grant,

Quoted 6 lines · Rob Herring

Grant,

Please pull. This is based on your current branch which you have said you plan to rebase, so feel free to rebase these as you need to. This has been tested on highbank and i.MX5.

Ping.

I've rebased onto your current tree. Updated pull request:

The following changes since commit 280ad7fda5f95211857fda38960f2b6fdf6edd3e:

mfd: twl-core: Add IRQ_DOMAIN dependency (2012-02-26 16:48:06 -0700)

are available in the git repository at:
git://sources.calxeda.com/kernel/linux.git irqdomain-for-grant

Rob Herring (3):
ARM: kconfig: always select IRQ_DOMAIN
irq: add irq_domain support to generic-chip
gpio: pl061: enable interrupts with DT style binding

 .../devicetree/bindings/gpio/pl061-gpio.txt        |   15 ++
 arch/arm/Kconfig                                   |    2 +-
 arch/arm/common/Kconfig                            |    2 -
 drivers/gpio/gpio-pl061.c                          |   48 ++++---
 include/linux/irq.h                                |   15 ++
 kernel/irq/generic-chip.c                          |  152
+++++++++++++++++---
 6 files changed, 186 insertions(+), 48 deletions(-)
Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Ping again...

Okay, I've pulled this in. I need to do some compile testing before I push it out.

What happened to this? It's not in rc1.

I kept looking at it and planning to send Linus a pull request, but I just couldn't make myself comfortable with the state of the patch. It seems to me that there is too much bleeding of irq_domain state into irq_generic_chip and it doesn't return any meaningful context to the caller that can be used to tear it back down.

I think for the domain+generic_chip use case the API needs refining so that it returns a container structure with both the irq_domain and the array of generic chips. Plus there needs to be a remove function (there also needs to be an irq_domain remove function; I also realized that was a missing piece when I looked at it).

Quoted 5 lines

I had really hoped to get fixup patches sorted out in time to still get Linus to merge it even though it hadn't been through Linux next, but given that I couldn't even find time to email you properly about it, it seems I was doomed. :-( There weren't any other users of it in linux-next though, so in the end I just didn't sent the pull req.

There weren't any users in next because this was not in next for very long. iMX had support ready to go. This (or at least some parts) is needed to convert any existing users of generic_chip over to domains and DT whether we add domain support directly or not.

Quoted 4 lines

I've got a couple of fixup patches on top of your branch that I'll send to you so you can see some of the stuff that I've done. I'm also not comfortable with adding flags, irq_clr & irq_set into irq_generic_chip, but I can't quite put my finger on why. :-/ Also,

I'm not adding those. The timing of the irq handler setup is different with a domain, so I have to store those for later. I think this also makes generic_chip incompatible with domains as it now exists.

Quoted 3 lines

the api for irq_setup_generic_chip_domain() is enormous. If a context structure is used, then it would probably be better to populate it with the configuration so that the API isn't nearly so large.

This is largely an artifact of the existing generic_chip api which has a large number of parameters, but they are spread across 2 functions.

There's a couple of simple things I could do:
- drop name and use node->name instead. If node is null then the irq_chip will have no name, but this appears to be optional.
- make the callback fill in irq_base, reg_base, flags, irq_clr, irq_set and private
- make the common case an inline wrapper. All but 1 user sets num_ct to 1 for example.

Rob