All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Larsson <andreas@gaisler.com>
To: Nikita Yushchenko <nyushchenko@dev.rtsoft.ru>
Cc: lugovskoy@dev.rtsoft.ru, Grant Likely <grant.likely@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	sparclinux@vger.kernel.org, davem@davemloft.net
Subject: Re: [PATCH 00/21] add and use devm_irq_of_parse_and_map()
Date: Mon, 16 Jun 2014 11:29:24 +0200	[thread overview]
Message-ID: <539EB8F4.20104@gaisler.com> (raw)
In-Reply-To: <539EAC92.1040606@dev.rtsoft.ru>

On 2014-06-16 10:36, Nikita Yushchenko wrote:
>>>> SPARC does not use OF_IRQ and has a different implementation of
>>>> irq_of_parse_and_map than the one in drivers/of/irq.c. All code
>>>> converted from irq_of_parse_and_map to devm_irq_of_parse_and_map in this
>>>> patch set will be unlinkable for SPARC. This includes SPI in general and
>>>> many drivers that are used for SPARC (of which several are currently
>>>> only used on SPARC platforms).
>>>
>>> Can this be fixed by adding a copy of devm_irq_of_parse_and_map() to
>>> arch/sparc/kernel/of_device_common.c ?
>>
>> Not a copy of the version in irq.c no. On SPARC, IRQ_DOMAIN is not
>> selected in general.
>>
>> However, there is no technical problem that I can see with having a
>> SPARC version of devm_irq_of_parse_and_map that just calls
>> irq_of_parse_and_map as there are no mappings that needs to be disposed
>> of. (The empty dummy for irq_dispose_mapping is used if any
>> irq_dispose_mapping calls are made from drivers).
>
> Ok, I will post an updated patchset that adds sparc
> devm_irq_of_parse_and_map() that just calls irq_of_parse_and_map(), and
> devm_irq_dispose_mapping() that does nothing.

You have already added the needed empty devm_irq_dispose_mapping in 
include/linux/irqdomain.h.

Note that the IRQ_DOMAIN *can* be used under SPARC (GPIO_GRGPIO is one 
example that selects it), but it is not used at the top level so to 
speak. There should not be a SPARC specific empty version of 
devm_irq_dispose_mapping - CONF_IRQ_DOMAIN or not takes care of that.


> Also, you mentioned that some drivers that my original patchset touches
> are sparc-only?  Then, maybe better not convert these to devm_? Could
> you please give a list of such drivers?

The drivers that I know of off hand is not necessarily SPARC only. Some 
are currently only found in SPARC environments, but that could change in 
the future. I personally don't see a problem with using 
devm_of_parse_and_map solution as long as there is a SPARC-specific one 
as discussed above.

Best regards,
Andreas Larsson

WARNING: multiple messages have this Message-ID (diff)
From: Andreas Larsson <andreas@gaisler.com>
To: Nikita Yushchenko <nyushchenko@dev.rtsoft.ru>
Cc: lugovskoy@dev.rtsoft.ru, Grant Likely <grant.likely@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	sparclinux@vger.kernel.org, davem@davemloft.net
Subject: Re: [PATCH 00/21] add and use devm_irq_of_parse_and_map()
Date: Mon, 16 Jun 2014 09:29:24 +0000	[thread overview]
Message-ID: <539EB8F4.20104@gaisler.com> (raw)
In-Reply-To: <539EAC92.1040606@dev.rtsoft.ru>

On 2014-06-16 10:36, Nikita Yushchenko wrote:
>>>> SPARC does not use OF_IRQ and has a different implementation of
>>>> irq_of_parse_and_map than the one in drivers/of/irq.c. All code
>>>> converted from irq_of_parse_and_map to devm_irq_of_parse_and_map in this
>>>> patch set will be unlinkable for SPARC. This includes SPI in general and
>>>> many drivers that are used for SPARC (of which several are currently
>>>> only used on SPARC platforms).
>>>
>>> Can this be fixed by adding a copy of devm_irq_of_parse_and_map() to
>>> arch/sparc/kernel/of_device_common.c ?
>>
>> Not a copy of the version in irq.c no. On SPARC, IRQ_DOMAIN is not
>> selected in general.
>>
>> However, there is no technical problem that I can see with having a
>> SPARC version of devm_irq_of_parse_and_map that just calls
>> irq_of_parse_and_map as there are no mappings that needs to be disposed
>> of. (The empty dummy for irq_dispose_mapping is used if any
>> irq_dispose_mapping calls are made from drivers).
>
> Ok, I will post an updated patchset that adds sparc
> devm_irq_of_parse_and_map() that just calls irq_of_parse_and_map(), and
> devm_irq_dispose_mapping() that does nothing.

You have already added the needed empty devm_irq_dispose_mapping in 
include/linux/irqdomain.h.

Note that the IRQ_DOMAIN *can* be used under SPARC (GPIO_GRGPIO is one 
example that selects it), but it is not used at the top level so to 
speak. There should not be a SPARC specific empty version of 
devm_irq_dispose_mapping - CONF_IRQ_DOMAIN or not takes care of that.


> Also, you mentioned that some drivers that my original patchset touches
> are sparc-only?  Then, maybe better not convert these to devm_? Could
> you please give a list of such drivers?

The drivers that I know of off hand is not necessarily SPARC only. Some 
are currently only found in SPARC environments, but that could change in 
the future. I personally don't see a problem with using 
devm_of_parse_and_map solution as long as there is a SPARC-specific one 
as discussed above.

Best regards,
Andreas Larsson

  reply	other threads:[~2014-06-16 10:02 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-04 11:13 [PATCH 00/21] add and use devm_irq_of_parse_and_map() nyushchenko
2014-06-04 11:13 ` [PATCH 01/21] irq: add devres version of OF IRQ mapping routines nyushchenko
2014-06-04 13:39   ` Thomas Gleixner
2014-06-04 13:39     ` Thomas Gleixner
2014-06-04 11:13 ` [PATCH 02/21] ata: use devm_irq_of_parse_and_map() where appropriate nyushchenko
2014-06-04 11:13 ` [PATCH 03/21] exynos5440-cpufreq: use devm_irq_of_parse_and_map() nyushchenko
2014-06-04 11:13 ` [PATCH 04/21] omap-sham: " nyushchenko
2014-06-04 11:13 ` [PATCH 05/21] dma: use devm_irq_of_parse_and_map() where appropriate nyushchenko
2014-06-04 11:13 ` [PATCH 06/21] mpc85xx_edac: use devm_irq_of_parse_and_map() nyushchenko
2014-06-04 11:13 ` [PATCH 07/21] gpio: use devm_irq_of_parse_and_map() where appropriate nyushchenko
2014-06-04 11:13 ` [PATCH 08/21] i2c: " nyushchenko
2014-06-04 11:13 ` [PATCH 09/21] apbps2: use devm_irq_of_parse_and_map() nyushchenko
2014-06-04 11:13 ` [PATCH 10/21] media: use devm_irq_of_parse_and_map() where appropriate nyushchenko
2014-06-04 11:13 ` [PATCH 11/21] mfd: " nyushchenko
2014-06-04 11:13   ` nyushchenko-jFhMxQ4mL6a2X5qOxWx28w
2014-06-17 15:12   ` Lee Jones
2014-06-17 15:36     ` Nikita Yushchenko
2014-06-17 15:36       ` Nikita Yushchenko
2014-06-18  8:48       ` Lee Jones
2014-06-18 11:31         ` Nikita Yushchenko
2014-06-18 11:31           ` Nikita Yushchenko
2014-06-18 12:20           ` Lee Jones
2014-06-04 11:13 ` [PATCH 12/21] mpc5121_nfc: use devm_irq_of_parse_and_map() nyushchenko
2014-06-04 11:13 ` [PATCH 13/21] net/can: use devm_irq_of_parse_and_map() where appropriate nyushchenko
2014-06-04 11:13 ` [PATCH 14/21] net/ethernet: " nyushchenko
2014-06-04 11:13   ` nyushchenko-jFhMxQ4mL6a2X5qOxWx28w
2014-06-04 11:13 ` [PATCH 15/21] pinctrl: " nyushchenko
2014-06-04 11:13   ` nyushchenko-jFhMxQ4mL6a2X5qOxWx28w
2014-06-04 11:13 ` [PATCH 16/21] bq24190_charger: use devm_irq_of_parse_and_map() nyushchenko
2014-06-04 11:13 ` [PATCH 17/21] rtc-mpc5121: " nyushchenko
2014-06-04 11:13 ` [PATCH 18/21] spi: use devm_irq_of_parse_and_map() where appropriate nyushchenko
2014-06-04 11:13 ` [PATCH 19/21] exynos_tmu: use devm_irq_of_parse_and_map() nyushchenko
2014-06-04 11:13 ` [PATCH 20/21] usb: use devm_irq_of_parse_and_map() where appropriate nyushchenko
2014-06-04 11:13   ` nyushchenko-jFhMxQ4mL6a2X5qOxWx28w
2014-06-16  9:35   ` Andreas Larsson
2014-06-16  9:35     ` Andreas Larsson
2014-06-16  9:44     ` Nikita Yushchenko
2014-06-16  9:44       ` Nikita Yushchenko
2014-06-16  9:54       ` Andreas Larsson
2014-06-16  9:54         ` Andreas Larsson
2014-06-04 11:13 ` [PATCH 21/21] at91sam9_wdt: use devm_irq_of_parse_and_map() nyushchenko
2014-06-12 10:03 ` [PATCH 00/21] add and " Andreas Larsson
2014-06-12 10:03   ` Andreas Larsson
     [not found]   ` <5399AE1B.1080301@gaisler.com>
2014-06-12 19:02     ` Nikita Yushchenko
2014-06-12 19:02       ` Nikita Yushchenko
2014-06-16  8:23       ` Andreas Larsson
2014-06-16  8:23         ` Andreas Larsson
2014-06-16  8:36         ` Nikita Yushchenko
2014-06-16  8:36           ` Nikita Yushchenko
2014-06-16  8:36           ` Nikita Yushchenko
2014-06-16  9:29           ` Andreas Larsson [this message]
2014-06-16  9:29             ` Andreas Larsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=539EB8F4.20104@gaisler.com \
    --to=andreas@gaisler.com \
    --cc=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lugovskoy@dev.rtsoft.ru \
    --cc=nyushchenko@dev.rtsoft.ru \
    --cc=robh+dt@kernel.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.