These are low level changes needed to support targets based on Qualcomm's
ScorpionMP architecture.
Jeff Ohlstein (1):
arm: Kconfig option for ARCH_MSM_SCORPIONMP
Steve Muckle (2):
arm: mm: do not set missing flags on ScorpionMP
arm: macros for wfe, sev instructions
arch/arm/Kconfig | 5 +++--
arch/arm/include/asm/processor.h | 5 +++++
arch/arm/mach-msm/Kconfig | 2 ++
arch/arm/mm/proc-v7.S | 2 +-
4 files changed, 11 insertions(+), 3 deletions(-)
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
ScorpionMP is a configuration of Scorpion processors. It supports SMP
and local timers.
Signed-off-by: Jeff Ohlstein <[email protected]>
---
arch/arm/Kconfig | 5 +++--
arch/arm/mach-msm/Kconfig | 2 ++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 98922f7..08518ae 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1100,7 +1100,7 @@ config SMP
bool "Symmetric Multi-Processing (EXPERIMENTAL)"
depends on EXPERIMENTAL && (REALVIEW_EB_ARM11MP || REALVIEW_EB_A9MP ||\
MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 ||\
- ARCH_U8500 || ARCH_VEXPRESS_CA9X4)
+ ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || ARCH_MSM_SCORPIONMP)
depends on GENERIC_CLOCKEVENTS
select USE_GENERIC_SMP_HELPERS
select HAVE_ARM_SCU if (ARCH_REALVIEW || ARCH_OMAP4 || ARCH_U8500 || ARCH_VEXPRESS_CA9X4)
@@ -1172,7 +1172,8 @@ config HOTPLUG_CPU
config LOCAL_TIMERS
bool "Use local timer interrupts"
depends on SMP && (REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || \
- REALVIEW_EB_A9MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || ARCH_U8500)
+ REALVIEW_EB_A9MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || ARCH_U8500 || \
+ ARCH_MSM_SCORPIONMP)
default y
select HAVE_ARM_TWD if (ARCH_REALVIEW || ARCH_OMAP4 || ARCH_U8500)
help
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
index 47264a7..cc59b0c 100644
--- a/arch/arm/mach-msm/Kconfig
+++ b/arch/arm/mach-msm/Kconfig
@@ -35,6 +35,8 @@ config ARCH_MSM_ARM11
bool
config ARCH_MSM_SCORPION
bool
+config ARCH_MSM_SCORPIONMP
+ bool
config MSM_VIC
bool
--
1.7.1.1
From: Steve Muckle <[email protected]>
The wait for event and send event instructions may be called from C code
such as boot or power management routines.
Signed-off-by: Steve Muckle <[email protected]>
Signed-off-by: Jeff Ohlstein <[email protected]>
---
arch/arm/include/asm/processor.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h
index 7bed3da..4262664 100644
--- a/arch/arm/include/asm/processor.h
+++ b/arch/arm/include/asm/processor.h
@@ -97,6 +97,11 @@ unsigned long get_wchan(struct task_struct *p);
#define cpu_relax() barrier()
#endif
+#if defined(CONFIG_CPU_32v6K) || __LINUX_ARM_ARCH__ >= 7
+#define sev() __asm__("sev")
+#define wfe() __asm__("wfe")
+#endif
+
/*
* Create a new kernel thread
*/
--
1.7.1.1
From: Steve Muckle <[email protected]>
ScorpionMP does not have the SMP/nAMP mode and TLB ops
broadcasting bits in the ACTLR.
Signed-off-by: Steve Muckle <[email protected]>
Signed-off-by: Jeff Ohlstein <[email protected]>
---
arch/arm/mm/proc-v7.S | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index 7aaf88a..6bddf5d 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -190,7 +190,7 @@ cpu_v7_name:
* - cache type register is implemented
*/
__v7_setup:
-#ifdef CONFIG_SMP
+#if defined(CONFIG_SMP) && !defined(CONFIG_ARCH_MSM_SCORPIONMP)
mrc p15, 0, r0, c1, c0, 1
tst r0, #(1 << 6) @ SMP/nAMP mode enabled?
orreq r0, r0, #(1 << 6) | (1 << 0) @ Enable SMP/nAMP mode and
--
1.7.1.1
On Fri, Jul 23, 2010 at 11:58:02AM -0700, Jeff Ohlstein wrote:
> From: Steve Muckle <[email protected]>
>
> ScorpionMP does not have the SMP/nAMP mode and TLB ops
> broadcasting bits in the ACTLR.
Please provide a separate instance of __v7_proc_info for your processor
and direct it to jump into the __v7_setup code after this setup instead.
On Sat, 2010-07-24 at 09:23 +0100, Russell King - ARM Linux wrote:
> On Fri, Jul 23, 2010 at 11:58:02AM -0700, Jeff Ohlstein wrote:
> > From: Steve Muckle <[email protected]>
> >
> > ScorpionMP does not have the SMP/nAMP mode and TLB ops
> > broadcasting bits in the ACTLR.
>
> Please provide a separate instance of __v7_proc_info for your processor
> and direct it to jump into the __v7_setup code after this setup instead.
You mean add another label into __v7_setup along with a proc-msm.S to
jump over this code?
Daniel
--
Sent by an consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
On Wed, Jul 28, 2010 at 02:58:00PM -0700, Daniel Walker wrote:
> On Sat, 2010-07-24 at 09:23 +0100, Russell King - ARM Linux wrote:
> > On Fri, Jul 23, 2010 at 11:58:02AM -0700, Jeff Ohlstein wrote:
> > > From: Steve Muckle <[email protected]>
> > >
> > > ScorpionMP does not have the SMP/nAMP mode and TLB ops
> > > broadcasting bits in the ACTLR.
> >
> > Please provide a separate instance of __v7_proc_info for your processor
> > and direct it to jump into the __v7_setup code after this setup instead.
>
>
> You mean add another label into __v7_setup along with a proc-msm.S to
> jump over this code?
Yes to the first, no to the second.
__v7_setup:
#ifdef CONFIG_SMP
mrc p15, 0, r0, c1, c0, 1
tst r0, #(1 << 6) @ SMP/nAMP mode enabled?
orreq r0, r0, #(1 << 6) | (1 << 0) @ Enable SMP/nAMP mode and
mcreq p15, 0, r0, c1, c0, 1 @ TLB ops broadcasting
#endif
__v7_msm_setup:
...
.section ".proc.info.init", #alloc, #execinstr
.type __v7_msm_proc_info, #object
__v7_msm_proc_info:
.long ...
.long ...
...
b __v7_msm_setup
...
/*
* Match any ARMv7 processor core.
*/
.type __v7_proc_info, #object
__v7_proc_info:
...
On Wed, 2010-07-28 at 23:36 +0100, Russell King - ARM Linux wrote:
> On Wed, Jul 28, 2010 at 02:58:00PM -0700, Daniel Walker wrote:
> > On Sat, 2010-07-24 at 09:23 +0100, Russell King - ARM Linux wrote:
> > > On Fri, Jul 23, 2010 at 11:58:02AM -0700, Jeff Ohlstein wrote:
> > > > From: Steve Muckle <[email protected]>
> > > >
> > > > ScorpionMP does not have the SMP/nAMP mode and TLB ops
> > > > broadcasting bits in the ACTLR.
> > >
> > > Please provide a separate instance of __v7_proc_info for your processor
> > > and direct it to jump into the __v7_setup code after this setup instead.
> >
> >
> > You mean add another label into __v7_setup along with a proc-msm.S to
> > jump over this code?
>
> Yes to the first, no to the second.
>
Like so? I haven't tested this.
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index 6bddf5d..167bedb 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -196,6 +196,7 @@ __v7_setup:
orreq r0, r0, #(1 << 6) | (1 << 0) @ Enable SMP/nAMP mode and
mcreq p15, 0, r0, c1, c0, 1 @ TLB ops broadcasting
#endif
+__v7_msm_setup:
adr r12, __v7_setup_stack @ the local stack
stmia r12, {r0-r5, r7, r9, r11, lr}
bl v7_flush_dcache_all
@@ -326,6 +327,29 @@ cpu_elf_name:
.section ".proc.info.init", #alloc, #execinstr
+ .type __v7_msm_proc_info, #object
+__v7_msm_proc_info:
+ .long 0x000f0000 @ Required ID value
+ .long 0x000f0000 @ Mask for ID
+ .long PMD_TYPE_SECT | \
+ PMD_SECT_AP_WRITE | \
+ PMD_SECT_AP_READ | \
+ PMD_FLAGS
+ .long PMD_TYPE_SECT | \
+ PMD_SECT_XN | \
+ PMD_SECT_AP_WRITE | \
+ PMD_SECT_AP_READ
+ b __v7_msm_setup
+ .long cpu_arch_name
+ .long cpu_elf_name
+ .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
+ .long cpu_v7_name
+ .long v7_processor_functions
+ .long v7wbi_tlb_fns
+ .long v6_user_fns
+ .long v7_cache_fns
+ .size __v7_msm_proc_info, . - __v7_msm_proc_info
+
/*
* Match any ARMv7 processor core.
*/
--
Sent by an consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
On Wed, Jul 28, 2010 at 03:51:35PM -0700, Daniel Walker wrote:
> @@ -326,6 +327,29 @@ cpu_elf_name:
>
> .section ".proc.info.init", #alloc, #execinstr
>
> + .type __v7_msm_proc_info, #object
> +__v7_msm_proc_info:
> + .long 0x000f0000 @ Required ID value
> + .long 0x000f0000 @ Mask for ID
Almost - is there no more specific ID value for your CPU?
On Thu, 2010-07-29 at 08:18 +0100, Russell King - ARM Linux wrote:
> On Wed, Jul 28, 2010 at 03:51:35PM -0700, Daniel Walker wrote:
> > @@ -326,6 +327,29 @@ cpu_elf_name:
> >
> > .section ".proc.info.init", #alloc, #execinstr
> >
> > + .type __v7_msm_proc_info, #object
> > +__v7_msm_proc_info:
> > + .long 0x000f0000 @ Required ID value
> > + .long 0x000f0000 @ Mask for ID
>
> Almost - is there no more specific ID value for your CPU?
Here's one with a more specific cpu id. Would you be willing to take
this for 2.6.36 or are you pretty much done taking pull requests?
Daniel
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index 6bddf5d..a5b613d 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -196,6 +196,7 @@ __v7_setup:
orreq r0, r0, #(1 << 6) | (1 << 0) @ Enable SMP/nAMP mode and
mcreq p15, 0, r0, c1, c0, 1 @ TLB ops broadcasting
#endif
+__v7_msm_setup:
adr r12, __v7_setup_stack @ the local stack
stmia r12, {r0-r5, r7, r9, r11, lr}
bl v7_flush_dcache_all
@@ -326,6 +327,29 @@ cpu_elf_name:
.section ".proc.info.init", #alloc, #execinstr
+ .type __v7_msm_proc_info, #object
+__v7_msm_proc_info:
+ .long 0x510f0000 @ Required ID value
+ .long 0xff0f0000 @ Mask for ID
+ .long PMD_TYPE_SECT | \
+ PMD_SECT_AP_WRITE | \
+ PMD_SECT_AP_READ | \
+ PMD_FLAGS
+ .long PMD_TYPE_SECT | \
+ PMD_SECT_XN | \
+ PMD_SECT_AP_WRITE | \
+ PMD_SECT_AP_READ
+ b __v7_msm_setup
+ .long cpu_arch_name
+ .long cpu_elf_name
+ .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
+ .long cpu_v7_name
+ .long v7_processor_functions
+ .long v7wbi_tlb_fns
+ .long v6_user_fns
+ .long v7_cache_fns
+ .size __v7_msm_proc_info, . - __v7_msm_proc_info
+
/*
* Match any ARMv7 processor core.
*/
--
Sent by an consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
On Thu, Jul 29, 2010 at 03:42:46PM -0700, Daniel Walker wrote:
> On Thu, 2010-07-29 at 08:18 +0100, Russell King - ARM Linux wrote:
> > On Wed, Jul 28, 2010 at 03:51:35PM -0700, Daniel Walker wrote:
> > > @@ -326,6 +327,29 @@ cpu_elf_name:
> > >
> > > .section ".proc.info.init", #alloc, #execinstr
> > >
> > > + .type __v7_msm_proc_info, #object
> > > +__v7_msm_proc_info:
> > > + .long 0x000f0000 @ Required ID value
> > > + .long 0x000f0000 @ Mask for ID
> >
> > Almost - is there no more specific ID value for your CPU?
>
> Here's one with a more specific cpu id. Would you be willing to take
> this for 2.6.36 or are you pretty much done taking pull requests?
Yes, but if its just for this patch, is there much point to a pull
request?
On Fri, 2010-07-30 at 08:19 +0100, Russell King - ARM Linux wrote:
> On Thu, Jul 29, 2010 at 03:42:46PM -0700, Daniel Walker wrote:
> > On Thu, 2010-07-29 at 08:18 +0100, Russell King - ARM Linux wrote:
> > > On Wed, Jul 28, 2010 at 03:51:35PM -0700, Daniel Walker wrote:
> > > > @@ -326,6 +327,29 @@ cpu_elf_name:
> > > >
> > > > .section ".proc.info.init", #alloc, #execinstr
> > > >
> > > > + .type __v7_msm_proc_info, #object
> > > > +__v7_msm_proc_info:
> > > > + .long 0x000f0000 @ Required ID value
> > > > + .long 0x000f0000 @ Mask for ID
> > >
> > > Almost - is there no more specific ID value for your CPU?
> >
> > Here's one with a more specific cpu id. Would you be willing to take
> > this for 2.6.36 or are you pretty much done taking pull requests?
>
> Yes, but if its just for this patch, is there much point to a pull
> request?
I've got some other stuff too .. Jeff Ohlstein sent several patches (one
of which started this discussion), which are needed for an SMP board
we've been working on.
Daniel
On Fri, Jul 30, 2010 at 10:09:37AM -0700, Daniel Walker wrote:
> On Fri, 2010-07-30 at 08:19 +0100, Russell King - ARM Linux wrote:
> > Yes, but if its just for this patch, is there much point to a pull
> > request?
>
> I've got some other stuff too .. Jeff Ohlstein sent several patches (one
> of which started this discussion), which are needed for an SMP board
> we've been working on.
Has it been seen on the mailing list?
On Fri, 2010-07-30 at 21:20 +0100, Russell King - ARM Linux wrote:
> On Fri, Jul 30, 2010 at 10:09:37AM -0700, Daniel Walker wrote:
> > On Fri, 2010-07-30 at 08:19 +0100, Russell King - ARM Linux wrote:
> > > Yes, but if its just for this patch, is there much point to a pull
> > > request?
> >
> > I've got some other stuff too .. Jeff Ohlstein sent several patches (one
> > of which started this discussion), which are needed for an SMP board
> > we've been working on.
>
> Has it been seen on the mailing list?
Yes, this series
http://www.acetylcholine.com/node/92578
except the 3/3 patch .. There was also a GIC fix patch,
http://www.gossamer-threads.com/lists/linux/kernel/1254644
Daniel