* [PATCH 0/2] Make IPI and localtimer handlers callable from C code
@ 2011-10-02 8:56 Shawn Guo
2011-10-02 8:57 ` [PATCH 1/2] ARM: smp: Add an IPI handler " Shawn Guo
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Shawn Guo @ 2011-10-02 8:56 UTC (permalink / raw)
To: linux-arm-kernel
[Sorry for send you twice, Russell, Marc. I forgot cc LAKML last time.]
With imx sub-architecture is moving to MULTI_IRQ_HANDLER, imx6q has to
get a local gic_handler_irq() implementation calling IPI and localtimer
handlers from C code, before Marc's global gic_handler_irq() series gets
merged.
This patch series changes the original __exception_irq_entry to a
wrapper for actual IPI and localtimer handlers which are callable from
C code now.
Marc Zyngier (1):
ARM: smp: Add an IPI handler callable from C code
Shawn Guo (1):
ARM: smp: Add a localtimer handler callable from C code
arch/arm/include/asm/localtimer.h | 4 ++++
arch/arm/include/asm/smp.h | 5 +++++
arch/arm/kernel/smp.c | 10 ++++++++++
3 files changed, 19 insertions(+), 0 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] ARM: smp: Add an IPI handler callable from C code
2011-10-02 8:56 [PATCH 0/2] Make IPI and localtimer handlers callable from C code Shawn Guo
@ 2011-10-02 8:57 ` Shawn Guo
2011-10-02 8:57 ` [PATCH 2/2] ARM: smp: Add a localtimer " Shawn Guo
2011-10-06 14:10 ` [PATCH 0/2] Make IPI and localtimer handlers " Shawn Guo
2 siblings, 0 replies; 5+ messages in thread
From: Shawn Guo @ 2011-10-02 8:57 UTC (permalink / raw)
To: linux-arm-kernel
From: Marc Zyngier <marc.zyngier@arm.com>
In order to be able to handle IPI directly from C code instead of
assembly code, introduce handle_IPI(), which is modeled after handle_IRQ().
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
arch/arm/include/asm/smp.h | 5 +++++
arch/arm/kernel/smp.c | 5 +++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h
index 674ebcd..0a17b62 100644
--- a/arch/arm/include/asm/smp.h
+++ b/arch/arm/include/asm/smp.h
@@ -33,6 +33,11 @@ extern void show_ipi_list(struct seq_file *, int);
asmlinkage void do_IPI(int ipinr, struct pt_regs *regs);
/*
+ * Called from C code, this handles an IPI.
+ */
+void handle_IPI(int ipinr, struct pt_regs *regs);
+
+/*
* Setup the set of possible CPUs (via set_cpu_possible)
*/
extern void smp_init_cpus(void);
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 3f12ce9..2e49f18 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -587,6 +587,11 @@ static void ipi_cpu_stop(unsigned int cpu)
*/
asmlinkage void __exception_irq_entry do_IPI(int ipinr, struct pt_regs *regs)
{
+ handle_IPI(ipinr, regs);
+}
+
+void handle_IPI(int ipinr, struct pt_regs *regs)
+{
unsigned int cpu = smp_processor_id();
struct pt_regs *old_regs = set_irq_regs(regs);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] ARM: smp: Add a localtimer handler callable from C code
2011-10-02 8:56 [PATCH 0/2] Make IPI and localtimer handlers callable from C code Shawn Guo
2011-10-02 8:57 ` [PATCH 1/2] ARM: smp: Add an IPI handler " Shawn Guo
@ 2011-10-02 8:57 ` Shawn Guo
2011-10-06 14:10 ` [PATCH 0/2] Make IPI and localtimer handlers " Shawn Guo
2 siblings, 0 replies; 5+ messages in thread
From: Shawn Guo @ 2011-10-02 8:57 UTC (permalink / raw)
To: linux-arm-kernel
In order to be able to handle localtimer directly from C code instead of
assembly code, introduce handle_local_timer(), which is modeled after
handle_IRQ().
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
arch/arm/include/asm/localtimer.h | 4 ++++
arch/arm/kernel/smp.c | 5 +++++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/arch/arm/include/asm/localtimer.h b/arch/arm/include/asm/localtimer.h
index 080d74f..3306f28 100644
--- a/arch/arm/include/asm/localtimer.h
+++ b/arch/arm/include/asm/localtimer.h
@@ -22,6 +22,10 @@ void percpu_timer_setup(void);
*/
asmlinkage void do_local_timer(struct pt_regs *);
+/*
+ * Called from C code
+ */
+void handle_local_timer(struct pt_regs *);
#ifdef CONFIG_LOCAL_TIMERS
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 2e49f18..0949007 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -480,6 +480,11 @@ static void ipi_timer(void)
#ifdef CONFIG_LOCAL_TIMERS
asmlinkage void __exception_irq_entry do_local_timer(struct pt_regs *regs)
{
+ handle_local_timer(regs);
+}
+
+void handle_local_timer(struct pt_regs *regs)
+{
struct pt_regs *old_regs = set_irq_regs(regs);
int cpu = smp_processor_id();
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 0/2] Make IPI and localtimer handlers callable from C code
2011-10-02 8:56 [PATCH 0/2] Make IPI and localtimer handlers callable from C code Shawn Guo
2011-10-02 8:57 ` [PATCH 1/2] ARM: smp: Add an IPI handler " Shawn Guo
2011-10-02 8:57 ` [PATCH 2/2] ARM: smp: Add a localtimer " Shawn Guo
@ 2011-10-06 14:10 ` Shawn Guo
2011-10-06 14:15 ` Russell King - ARM Linux
2 siblings, 1 reply; 5+ messages in thread
From: Shawn Guo @ 2011-10-06 14:10 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Oct 02, 2011 at 04:56:59PM +0800, Shawn Guo wrote:
> [Sorry for send you twice, Russell, Marc. I forgot cc LAKML last time.]
>
> With imx sub-architecture is moving to MULTI_IRQ_HANDLER, imx6q has to
> get a local gic_handler_irq() implementation calling IPI and localtimer
> handlers from C code, before Marc's global gic_handler_irq() series gets
> merged.
>
> This patch series changes the original __exception_irq_entry to a
> wrapper for actual IPI and localtimer handlers which are callable from
> C code now.
>
> Marc Zyngier (1):
> ARM: smp: Add an IPI handler callable from C code
>
> Shawn Guo (1):
> ARM: smp: Add a localtimer handler callable from C code
>
> arch/arm/include/asm/localtimer.h | 4 ++++
> arch/arm/include/asm/smp.h | 5 +++++
> arch/arm/kernel/smp.c | 10 ++++++++++
> 3 files changed, 19 insertions(+), 0 deletions(-)
>
Hi Russell,
Do you have any comment on these two patches? Otherwise, I will put
them into patch track system.
--
Regards,
Shawn
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 0/2] Make IPI and localtimer handlers callable from C code
2011-10-06 14:10 ` [PATCH 0/2] Make IPI and localtimer handlers " Shawn Guo
@ 2011-10-06 14:15 ` Russell King - ARM Linux
0 siblings, 0 replies; 5+ messages in thread
From: Russell King - ARM Linux @ 2011-10-06 14:15 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Oct 06, 2011 at 10:10:24PM +0800, Shawn Guo wrote:
> Do you have any comment on these two patches? Otherwise, I will put
> them into patch track system.
No comment, they look fine, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-10-06 14:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-02 8:56 [PATCH 0/2] Make IPI and localtimer handlers callable from C code Shawn Guo
2011-10-02 8:57 ` [PATCH 1/2] ARM: smp: Add an IPI handler " Shawn Guo
2011-10-02 8:57 ` [PATCH 2/2] ARM: smp: Add a localtimer " Shawn Guo
2011-10-06 14:10 ` [PATCH 0/2] Make IPI and localtimer handlers " Shawn Guo
2011-10-06 14:15 ` Russell King - ARM Linux
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).