diff mbox

ARM: dove: fix Dove cpu type from V7 to PJ4

Message ID 20130328210412.GG3368@n2100.arm.linux.org.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Russell King - ARM Linux March 28, 2013, 9:04 p.m. UTC
On Thu, Mar 28, 2013 at 09:19:01PM +0100, Sebastian Hesselbarth wrote:
> On 03/28/2013 07:14 PM, Russell King - ARM Linux wrote:
>> On Thu, Mar 28, 2013 at 01:06:54PM -0400, Jason Cooper wrote:
>>> On Sat, Mar 23, 2013 at 04:06:51PM +0100, Sebastian Hesselbarth wrote:
>>>> The CPU used in Marvell Dove SoCs is a PJ4 Sheeva core. Using
>>>> CONFIG_CPU_PJ4 instead of CONFIG_CPU_V7 will also allow to enable
>>>> iWMMXt extensions on Dove.
>>>>
>>>> Signed-off-by: Sebastian Hesselbarth<sebastian.hesselbarth@gmail.com>
>>>> ---
>>>> Cc: Russell King<linux@arm.linux.org.uk>
>>>> Cc: Jason Cooper<jason@lakedaemon.net>
>>>> Cc: Andrew Lunn<andrew@lunn.ch>
>>>> Cc: linux-arm-kernel@lists.infradead.org
>>>> Cc: linux-kernel@vger.kernel.org
>>>> ---
>>>>   arch/arm/Kconfig |    2 +-
>>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> Hmmm, I'm getting (with dove_defconfig):
>>>
>>> arch/arm/kernel/built-in.o: In function `iwmmxt_do':
>>> /.../arch/arm/kernel/pj4-cp0.c:36: undefined reference to `iwmmxt_task_release'
>>> /.../arch/arm/kernel/pj4-cp0.c:40: undefined reference to `iwmmxt_task_switch'
>>> make: *** [vmlinux] Error 1
>>
>> Looks to me like PJ4 IWMMXT support wasn't properly tested out when it
>> was submitted - it's possible to end up with pj4-cp0.c built without
>> the IWMMXT code that it depends on being built...
>
> Russel, Jason,
>
> do we force iWMMXt on CPU_PJ4 or should there be some #ifdef'ery if  
> IWMMXT is not selected?

From what I could see, there's not much point to pj4-cp0.c without
iwmmxt.S also being built.  So, what I'd suggest is this, which will
ensure IWMMXT is enabled when PJ4 is set, otherwise giving people the
choice as it used to be.

Comments

Jason Cooper March 29, 2013, 1:18 a.m. UTC | #1
On Thu, Mar 28, 2013 at 09:04:12PM +0000, Russell King - ARM Linux wrote:
...
> From what I could see, there's not much point to pj4-cp0.c without
> iwmmxt.S also being built.  So, what I'd suggest is this, which will
> ensure IWMMXT is enabled when PJ4 is set, otherwise giving people the
> choice as it used to be.
> 

Russell,

Are you going to take these two patches?  I don't want to assume and
have them potentially get lost.

thx,

Jason.

> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 67874b8..ef6733a 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1171,9 +1171,9 @@ config ARM_NR_BANKS
>  	default 8
>  
>  config IWMMXT
> -	bool "Enable iWMMXt support"
> +	bool "Enable iWMMXt support" if !CPU_PJ4
>  	depends on CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_PJ4
> -	default y if PXA27x || PXA3xx || ARCH_MMP
> +	default y if PXA27x || PXA3xx || ARCH_MMP || CPU_PJ4
>  	help
>  	  Enable support for iWMMXt context switching at run time if
>  	  running on a CPU that supports it.
>
diff mbox

Patch

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 67874b8..ef6733a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1171,9 +1171,9 @@  config ARM_NR_BANKS
 	default 8
 
 config IWMMXT
-	bool "Enable iWMMXt support"
+	bool "Enable iWMMXt support" if !CPU_PJ4
 	depends on CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_PJ4
-	default y if PXA27x || PXA3xx || ARCH_MMP
+	default y if PXA27x || PXA3xx || ARCH_MMP || CPU_PJ4
 	help
 	  Enable support for iWMMXt context switching at run time if
 	  running on a CPU that supports it.