diff mbox

pata_of_platform.c cannot build on sparc

Message ID 20111221.173810.971054965060472866.davem@davemloft.net
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

David Miller Dec. 21, 2011, 10:38 p.m. UTC
It depends upon CONFIG_OF_IRQ which not all CONFIG_OF platforms support,
in particular sparc does not support CONFIG_OF_PLATFORM because it
precomputes all IRQs at boot time when it scans the device tree so all
of the CONFIG_OF_IRQ infrastructure to probe and resolve IRQs at driver
probe time is wrong and completely unnecessary.

Add the proper dependencies so that pata_of_platform.c doesn't get
built on sparc.

CONFIG_OF_IRQ was severely misdesigned, it should just NOP out on
platforms where the architecture has the final IRQ values already like
sparc does.  But that's not how it was implemented at all, and now
we're starting to have all of these drivers get hard dependencies on
this mechanism and it's datastructures, and the resulting sparc build
failures from time to time.

Jeff, please push something like the following to Linus so that
sparc's allmodconfig builds again.  Thanks.

--------------------
pata_of_platform: Add missing CONFIG_OF_IRQ dependency.

Signed-off-by: David S. Miller <davem@davemloft.net>

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Rob Herring Dec. 21, 2011, 11:25 p.m. UTC | #1
On 12/21/2011 04:38 PM, David Miller wrote:
> 
> It depends upon CONFIG_OF_IRQ which not all CONFIG_OF platforms support,
> in particular sparc does not support CONFIG_OF_PLATFORM because it
> precomputes all IRQs at boot time when it scans the device tree so all
> of the CONFIG_OF_IRQ infrastructure to probe and resolve IRQs at driver
> probe time is wrong and completely unnecessary.
> 
> Add the proper dependencies so that pata_of_platform.c doesn't get
> built on sparc.
> 
> CONFIG_OF_IRQ was severely misdesigned, it should just NOP out on
> platforms where the architecture has the final IRQ values already like
> sparc does.  But that's not how it was implemented at all, and now
> we're starting to have all of these drivers get hard dependencies on
> this mechanism and it's datastructures, and the resulting sparc build
> failures from time to time.
> 
> Jeff, please push something like the following to Linus so that
> sparc's allmodconfig builds again.  Thanks.
> 

Really, drivers should no longer use of_irq_to_resource (or
of_address_to_resource for that matter). The resources are setup by the
core OF code. The patch I sent does this.

Rob

> --------------------
> pata_of_platform: Add missing CONFIG_OF_IRQ dependency.
> 
> Signed-off-by: David S. Miller <davem@davemloft.net>
> 
> diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
> index 6bdedd7..cf047c4 100644
> --- a/drivers/ata/Kconfig
> +++ b/drivers/ata/Kconfig
> @@ -820,7 +820,7 @@ config PATA_PLATFORM
>  
>  config PATA_OF_PLATFORM
>  	tristate "OpenFirmware platform device PATA support"
> -	depends on PATA_PLATFORM && OF
> +	depends on PATA_PLATFORM && OF && OF_IRQ
>  	help
>  	  This option enables support for generic directly connected ATA
>  	  devices commonly found on embedded systems with OpenFirmware
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Dec. 22, 2011, 12:14 a.m. UTC | #2
From: Rob Herring <robherring2@gmail.com>
Date: Wed, 21 Dec 2011 17:25:15 -0600

> On 12/21/2011 04:38 PM, David Miller wrote:
>> 
>> It depends upon CONFIG_OF_IRQ which not all CONFIG_OF platforms support,
>> in particular sparc does not support CONFIG_OF_PLATFORM because it
>> precomputes all IRQs at boot time when it scans the device tree so all
>> of the CONFIG_OF_IRQ infrastructure to probe and resolve IRQs at driver
>> probe time is wrong and completely unnecessary.
>> 
>> Add the proper dependencies so that pata_of_platform.c doesn't get
>> built on sparc.
>> 
>> CONFIG_OF_IRQ was severely misdesigned, it should just NOP out on
>> platforms where the architecture has the final IRQ values already like
>> sparc does.  But that's not how it was implemented at all, and now
>> we're starting to have all of these drivers get hard dependencies on
>> this mechanism and it's datastructures, and the resulting sparc build
>> failures from time to time.
>> 
>> Jeff, please push something like the following to Linus so that
>> sparc's allmodconfig builds again.  Thanks.
>> 
> 
> Really, drivers should no longer use of_irq_to_resource (or
> of_address_to_resource for that matter). The resources are setup by the
> core OF code. The patch I sent does this.

Thanks for taking care of this.
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jeff Garzik Dec. 22, 2011, 1:40 a.m. UTC | #3
On 12/21/2011 07:14 PM, David Miller wrote:
> From: Rob Herring<robherring2@gmail.com>
> Date: Wed, 21 Dec 2011 17:25:15 -0600
>
>> On 12/21/2011 04:38 PM, David Miller wrote:
>>>
>>> It depends upon CONFIG_OF_IRQ which not all CONFIG_OF platforms support,
>>> in particular sparc does not support CONFIG_OF_PLATFORM because it
>>> precomputes all IRQs at boot time when it scans the device tree so all
>>> of the CONFIG_OF_IRQ infrastructure to probe and resolve IRQs at driver
>>> probe time is wrong and completely unnecessary.
>>>
>>> Add the proper dependencies so that pata_of_platform.c doesn't get
>>> built on sparc.
>>>
>>> CONFIG_OF_IRQ was severely misdesigned, it should just NOP out on
>>> platforms where the architecture has the final IRQ values already like
>>> sparc does.  But that's not how it was implemented at all, and now
>>> we're starting to have all of these drivers get hard dependencies on
>>> this mechanism and it's datastructures, and the resulting sparc build
>>> failures from time to time.
>>>
>>> Jeff, please push something like the following to Linus so that
>>> sparc's allmodconfig builds again.  Thanks.
>>>
>>
>> Really, drivers should no longer use of_irq_to_resource (or
>> of_address_to_resource for that matter). The resources are setup by the
>> core OF code. The patch I sent does this.
>
> Thanks for taking care of this.

Being so late in 3.2-rc, it would be preferred to apply&push David's 
patch for 3.2, and then get Rob's into libata-dev#upstream (linux-next).

That OK?

	Jeff




--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rob Herring Dec. 22, 2011, 1:38 p.m. UTC | #4
On 12/21/2011 07:40 PM, Jeff Garzik wrote:
> On 12/21/2011 07:14 PM, David Miller wrote:
>> From: Rob Herring<robherring2@gmail.com>
>> Date: Wed, 21 Dec 2011 17:25:15 -0600
>>
>>> On 12/21/2011 04:38 PM, David Miller wrote:
>>>>
>>>> It depends upon CONFIG_OF_IRQ which not all CONFIG_OF platforms
>>>> support,
>>>> in particular sparc does not support CONFIG_OF_PLATFORM because it
>>>> precomputes all IRQs at boot time when it scans the device tree so all
>>>> of the CONFIG_OF_IRQ infrastructure to probe and resolve IRQs at driver
>>>> probe time is wrong and completely unnecessary.
>>>>
>>>> Add the proper dependencies so that pata_of_platform.c doesn't get
>>>> built on sparc.
>>>>
>>>> CONFIG_OF_IRQ was severely misdesigned, it should just NOP out on
>>>> platforms where the architecture has the final IRQ values already like
>>>> sparc does.  But that's not how it was implemented at all, and now
>>>> we're starting to have all of these drivers get hard dependencies on
>>>> this mechanism and it's datastructures, and the resulting sparc build
>>>> failures from time to time.
>>>>
>>>> Jeff, please push something like the following to Linus so that
>>>> sparc's allmodconfig builds again.  Thanks.
>>>>
>>>
>>> Really, drivers should no longer use of_irq_to_resource (or
>>> of_address_to_resource for that matter). The resources are setup by the
>>> core OF code. The patch I sent does this.
>>
>> Thanks for taking care of this.
> 
> Being so late in 3.2-rc, it would be preferred to apply&push David's
> patch for 3.2, and then get Rob's into libata-dev#upstream (linux-next).
> 
> That OK?
> 

Fine by me.

Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jeff Garzik Dec. 22, 2011, 7:38 p.m. UTC | #5
On 12/22/2011 03:00 PM, Sergei Shtylyov wrote:
> Hello.
>
> On 12/22/2011 04:38 PM, Rob Herring wrote:
>
>>>>>> It depends upon CONFIG_OF_IRQ which not all CONFIG_OF platforms
>>>>>> support,
>>>>>> in particular sparc does not support CONFIG_OF_PLATFORM because it
>>>>>> precomputes all IRQs at boot time when it scans the device tree so
>>>>>> all
>>>>>> of the CONFIG_OF_IRQ infrastructure to probe and resolve IRQs at
>>>>>> driver
>>>>>> probe time is wrong and completely unnecessary.
>
>>>>>> Add the proper dependencies so that pata_of_platform.c doesn't get
>>>>>> built on sparc.
>
>>>>>> CONFIG_OF_IRQ was severely misdesigned, it should just NOP out on
>>>>>> platforms where the architecture has the final IRQ values already
>>>>>> like
>>>>>> sparc does. But that's not how it was implemented at all, and now
>>>>>> we're starting to have all of these drivers get hard dependencies on
>>>>>> this mechanism and it's datastructures, and the resulting sparc build
>>>>>> failures from time to time.
>
>>>>>> Jeff, please push something like the following to Linus so that
>>>>>> sparc's allmodconfig builds again. Thanks.
>
>>>>> Really, drivers should no longer use of_irq_to_resource (or
>>>>> of_address_to_resource for that matter). The resources are setup by
>>>>> the
>>>>> core OF code. The patch I sent does this.
>
>>>> Thanks for taking care of this.
>
>>> Being so late in 3.2-rc, it would be preferred to apply&push David's
>>> patch for 3.2, and then get Rob's into libata-dev#upstream (linux-next).
>
>>> That OK?
>
>> Fine by me.
>
> But then it should be extended to undo David's patch, right? Or that
> patch just be reverted afterwards...

Correct.

	Jeff




--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sergei Shtylyov Dec. 22, 2011, 8 p.m. UTC | #6
Hello.

On 12/22/2011 04:38 PM, Rob Herring wrote:

>>>>> It depends upon CONFIG_OF_IRQ which not all CONFIG_OF platforms
>>>>> support,
>>>>> in particular sparc does not support CONFIG_OF_PLATFORM because it
>>>>> precomputes all IRQs at boot time when it scans the device tree so all
>>>>> of the CONFIG_OF_IRQ infrastructure to probe and resolve IRQs at driver
>>>>> probe time is wrong and completely unnecessary.

>>>>> Add the proper dependencies so that pata_of_platform.c doesn't get
>>>>> built on sparc.

>>>>> CONFIG_OF_IRQ was severely misdesigned, it should just NOP out on
>>>>> platforms where the architecture has the final IRQ values already like
>>>>> sparc does.  But that's not how it was implemented at all, and now
>>>>> we're starting to have all of these drivers get hard dependencies on
>>>>> this mechanism and it's datastructures, and the resulting sparc build
>>>>> failures from time to time.

>>>>> Jeff, please push something like the following to Linus so that
>>>>> sparc's allmodconfig builds again.  Thanks.

>>>> Really, drivers should no longer use of_irq_to_resource (or
>>>> of_address_to_resource for that matter). The resources are setup by the
>>>> core OF code. The patch I sent does this.

>>> Thanks for taking care of this.

>> Being so late in 3.2-rc, it would be preferred to apply&push David's
>> patch for 3.2, and then get Rob's into libata-dev#upstream (linux-next).

>> That OK?

> Fine by me.

    But then it should be extended to undo David's patch, right? Or that patch 
just be reverted afterwards...

WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 6bdedd7..cf047c4 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -820,7 +820,7 @@  config PATA_PLATFORM
 
 config PATA_OF_PLATFORM
 	tristate "OpenFirmware platform device PATA support"
-	depends on PATA_PLATFORM && OF
+	depends on PATA_PLATFORM && OF && OF_IRQ
 	help
 	  This option enables support for generic directly connected ATA
 	  devices commonly found on embedded systems with OpenFirmware