* [RFC 1/3] VSMP support for msp71xx family of platforms.
@ 2010-12-01 16:18 ` Anoop P A
0 siblings, 0 replies; 5+ messages in thread
From: Anoop P A @ 2010-12-01 16:18 UTC (permalink / raw)
To: Ralf Baechle, linux-mips, mcdonald.shane
>From e5148874243f0b2b610cd6b077084bd782961d94 Mon Sep 17 00:00:00 2001
Message-Id:
<e5148874243f0b2b610cd6b077084bd782961d94.1291219118.git.anoop.pa@gmail.com>
In-Reply-To: <cover.1291219118.git.anoop.pa@gmail.com>
References: <cover.1291219118.git.anoop.pa@gmail.com>
From: Anoop P A <anoop.pa@gmail.com>
Date: Wed, 1 Dec 2010 20:58:28 +0530
Subject: [RFC 1/3] VSMP support for msp71xx family of platforms.
Cc: anoop.pa@gmail.com
msp_smp.c initiliase IPI call and resched irq.
Signed-off-by: Anoop P A <anoop.pa@gmail.com>
---
arch/mips/pmc-sierra/msp71xx/Makefile | 3 +-
arch/mips/pmc-sierra/msp71xx/msp_smp.c | 75
++++++++++++++++++++++++++++++++
2 files changed, 77 insertions(+), 1 deletions(-)
create mode 100644 arch/mips/pmc-sierra/msp71xx/msp_smp.c
diff --git a/arch/mips/pmc-sierra/msp71xx/Makefile
b/arch/mips/pmc-sierra/msp71xx/Makefile
index e107f79..09627ae 100644
--- a/arch/mips/pmc-sierra/msp71xx/Makefile
+++ b/arch/mips/pmc-sierra/msp71xx/Makefile
@@ -6,7 +6,8 @@ obj-y += msp_prom.o msp_setup.o msp_irq.o \
obj-$(CONFIG_HAVE_GPIO_LIB) += gpio.o gpio_extended.o
obj-$(CONFIG_PMC_MSP7120_GW) += msp_hwbutton.o
obj-$(CONFIG_IRQ_MSP_SLP) += msp_irq_slp.o
-obj-$(CONFIG_IRQ_MSP_CIC) += msp_irq_cic.o
+obj-$(CONFIG_IRQ_MSP_CIC) += msp_irq_cic.o msp_irq_per.o
obj-$(CONFIG_PCI) += msp_pci.o
obj-$(CONFIG_MSPETH) += msp_eth.o
obj-$(CONFIG_USB_MSP71XX) += msp_usb.o
+obj-$(CONFIG_MIPS_MT_SMP) += msp_smp.o
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_smp.c
b/arch/mips/pmc-sierra/msp71xx/msp_smp.c
new file mode 100644
index 0000000..31a6c72
--- /dev/null
+++ b/arch/mips/pmc-sierra/msp71xx/msp_smp.c
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2000, 2001, 2004 MIPS Technologies, Inc.
+ * Copyright (C) 2001 Ralf Baechle
+ * Copyright (C) 2010 PMC-Sierra, Inc.
+ *
+ * VSMP support for MSP platforms . Derived from malta vsmp support.
+ *
+ * This program is free software; you can distribute it and/or modify
it
+ * under the terms of the GNU General Public License (Version 2) as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but
WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
along
+ * with this program; if not, write to the Free Software Foundation,
Inc.,
+ * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ *
+ */
+#include <linux/smp.h>
+#include <linux/interrupt.h>
+
+#ifdef CONFIG_MIPS_MT_SMP
+#define MIPS_CPU_IPI_RESCHED_IRQ 0 /* SW int 0 for resched */
+#define MIPS_CPU_IPI_CALL_IRQ 1 /* SW int 1 for call */
+
+
+static void ipi_resched_dispatch(void)
+{
+ do_IRQ(MIPS_CPU_IPI_RESCHED_IRQ);
+}
+
+static void ipi_call_dispatch(void)
+{
+ do_IRQ(MIPS_CPU_IPI_CALL_IRQ);
+}
+
+static irqreturn_t ipi_resched_interrupt(int irq, void *dev_id)
+{
+ return IRQ_HANDLED;
+}
+
+static irqreturn_t ipi_call_interrupt(int irq, void *dev_id)
+{
+ smp_call_function_interrupt();
+
+ return IRQ_HANDLED;
+}
+
+static struct irqaction irq_resched = {
+ .handler = ipi_resched_interrupt,
+ .flags = IRQF_DISABLED|IRQF_PERCPU,
+ .name = "IPI_resched"
+};
+
+static struct irqaction irq_call = {
+ .handler = ipi_call_interrupt,
+ .flags = IRQF_DISABLED|IRQF_PERCPU,
+ .name = "IPI_call"
+};
+void __init arch_init_ipiirq(int irq, struct irqaction *action)
+{
+ setup_irq(irq, action);
+ set_irq_handler(irq, handle_percpu_irq);
+}
+void __init msp_vsmp_int_init(void)
+{
+ set_vi_handler (MIPS_CPU_IPI_RESCHED_IRQ, ipi_resched_dispatch);
+ set_vi_handler (MIPS_CPU_IPI_CALL_IRQ, ipi_call_dispatch);
+ arch_init_ipiirq(MIPS_CPU_IPI_RESCHED_IRQ, &irq_resched);
+ arch_init_ipiirq(MIPS_CPU_IPI_CALL_IRQ, &irq_call);
+}
+#endif /* CONFIG_MIPS_MT_SMP */
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [RFC 1/3] VSMP support for msp71xx family of platforms.
@ 2010-12-01 16:18 ` Anoop P A
0 siblings, 0 replies; 5+ messages in thread
From: Anoop P A @ 2010-12-01 16:18 UTC (permalink / raw)
To: Ralf Baechle, linux-mips, mcdonald.shane
From e5148874243f0b2b610cd6b077084bd782961d94 Mon Sep 17 00:00:00 2001
Message-Id:
<e5148874243f0b2b610cd6b077084bd782961d94.1291219118.git.anoop.pa@gmail.com>
In-Reply-To: <cover.1291219118.git.anoop.pa@gmail.com>
References: <cover.1291219118.git.anoop.pa@gmail.com>
From: Anoop P A <anoop.pa@gmail.com>
Date: Wed, 1 Dec 2010 20:58:28 +0530
Subject: [RFC 1/3] VSMP support for msp71xx family of platforms.
Cc: anoop.pa@gmail.com
msp_smp.c initiliase IPI call and resched irq.
Signed-off-by: Anoop P A <anoop.pa@gmail.com>
---
arch/mips/pmc-sierra/msp71xx/Makefile | 3 +-
arch/mips/pmc-sierra/msp71xx/msp_smp.c | 75
++++++++++++++++++++++++++++++++
2 files changed, 77 insertions(+), 1 deletions(-)
create mode 100644 arch/mips/pmc-sierra/msp71xx/msp_smp.c
diff --git a/arch/mips/pmc-sierra/msp71xx/Makefile
b/arch/mips/pmc-sierra/msp71xx/Makefile
index e107f79..09627ae 100644
--- a/arch/mips/pmc-sierra/msp71xx/Makefile
+++ b/arch/mips/pmc-sierra/msp71xx/Makefile
@@ -6,7 +6,8 @@ obj-y += msp_prom.o msp_setup.o msp_irq.o \
obj-$(CONFIG_HAVE_GPIO_LIB) += gpio.o gpio_extended.o
obj-$(CONFIG_PMC_MSP7120_GW) += msp_hwbutton.o
obj-$(CONFIG_IRQ_MSP_SLP) += msp_irq_slp.o
-obj-$(CONFIG_IRQ_MSP_CIC) += msp_irq_cic.o
+obj-$(CONFIG_IRQ_MSP_CIC) += msp_irq_cic.o msp_irq_per.o
obj-$(CONFIG_PCI) += msp_pci.o
obj-$(CONFIG_MSPETH) += msp_eth.o
obj-$(CONFIG_USB_MSP71XX) += msp_usb.o
+obj-$(CONFIG_MIPS_MT_SMP) += msp_smp.o
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_smp.c
b/arch/mips/pmc-sierra/msp71xx/msp_smp.c
new file mode 100644
index 0000000..31a6c72
--- /dev/null
+++ b/arch/mips/pmc-sierra/msp71xx/msp_smp.c
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2000, 2001, 2004 MIPS Technologies, Inc.
+ * Copyright (C) 2001 Ralf Baechle
+ * Copyright (C) 2010 PMC-Sierra, Inc.
+ *
+ * VSMP support for MSP platforms . Derived from malta vsmp support.
+ *
+ * This program is free software; you can distribute it and/or modify
it
+ * under the terms of the GNU General Public License (Version 2) as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but
WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
along
+ * with this program; if not, write to the Free Software Foundation,
Inc.,
+ * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ *
+ */
+#include <linux/smp.h>
+#include <linux/interrupt.h>
+
+#ifdef CONFIG_MIPS_MT_SMP
+#define MIPS_CPU_IPI_RESCHED_IRQ 0 /* SW int 0 for resched */
+#define MIPS_CPU_IPI_CALL_IRQ 1 /* SW int 1 for call */
+
+
+static void ipi_resched_dispatch(void)
+{
+ do_IRQ(MIPS_CPU_IPI_RESCHED_IRQ);
+}
+
+static void ipi_call_dispatch(void)
+{
+ do_IRQ(MIPS_CPU_IPI_CALL_IRQ);
+}
+
+static irqreturn_t ipi_resched_interrupt(int irq, void *dev_id)
+{
+ return IRQ_HANDLED;
+}
+
+static irqreturn_t ipi_call_interrupt(int irq, void *dev_id)
+{
+ smp_call_function_interrupt();
+
+ return IRQ_HANDLED;
+}
+
+static struct irqaction irq_resched = {
+ .handler = ipi_resched_interrupt,
+ .flags = IRQF_DISABLED|IRQF_PERCPU,
+ .name = "IPI_resched"
+};
+
+static struct irqaction irq_call = {
+ .handler = ipi_call_interrupt,
+ .flags = IRQF_DISABLED|IRQF_PERCPU,
+ .name = "IPI_call"
+};
+void __init arch_init_ipiirq(int irq, struct irqaction *action)
+{
+ setup_irq(irq, action);
+ set_irq_handler(irq, handle_percpu_irq);
+}
+void __init msp_vsmp_int_init(void)
+{
+ set_vi_handler (MIPS_CPU_IPI_RESCHED_IRQ, ipi_resched_dispatch);
+ set_vi_handler (MIPS_CPU_IPI_CALL_IRQ, ipi_call_dispatch);
+ arch_init_ipiirq(MIPS_CPU_IPI_RESCHED_IRQ, &irq_resched);
+ arch_init_ipiirq(MIPS_CPU_IPI_CALL_IRQ, &irq_call);
+}
+#endif /* CONFIG_MIPS_MT_SMP */
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [RFC 1/3] VSMP support for msp71xx family of platforms.
2010-12-01 16:18 ` Anoop P A
(?)
@ 2010-12-02 11:47 ` Sergei Shtylyov
2010-12-02 17:27 ` anoop pa
-1 siblings, 1 reply; 5+ messages in thread
From: Sergei Shtylyov @ 2010-12-02 11:47 UTC (permalink / raw)
To: Anoop P A; +Cc: Ralf Baechle, linux-mips, mcdonald.shane
On 01.12.2010 19:18, Anoop P A wrote:
>> From e5148874243f0b2b610cd6b077084bd782961d94 Mon Sep 17 00:00:00 2001
> Message-Id:
> <e5148874243f0b2b610cd6b077084bd782961d94.1291219118.git.anoop.pa@gmail.com>
> In-Reply-To:<cover.1291219118.git.anoop.pa@gmail.com>
> References:<cover.1291219118.git.anoop.pa@gmail.com>
> From: Anoop P A<anoop.pa@gmail.com>
> Date: Wed, 1 Dec 2010 20:58:28 +0530
> Subject: [RFC 1/3] VSMP support for msp71xx family of platforms.
Don't include this into the patch, or Ralf will have to hand edit it out.
> Cc: anoop.pa@gmail.com
This should be in the signoff section.
> msp_smp.c initiliase IPI call and resched irq.
Only "initializes".
> Signed-off-by: Anoop P A<anoop.pa@gmail.com>
[...]
> diff --git a/arch/mips/pmc-sierra/msp71xx/Makefile
> b/arch/mips/pmc-sierra/msp71xx/Makefile
> index e107f79..09627ae 100644
> --- a/arch/mips/pmc-sierra/msp71xx/Makefile
> +++ b/arch/mips/pmc-sierra/msp71xx/Makefile
> @@ -6,7 +6,8 @@ obj-y += msp_prom.o msp_setup.o msp_irq.o \
> obj-$(CONFIG_HAVE_GPIO_LIB) += gpio.o gpio_extended.o
> obj-$(CONFIG_PMC_MSP7120_GW) += msp_hwbutton.o
> obj-$(CONFIG_IRQ_MSP_SLP) += msp_irq_slp.o
> -obj-$(CONFIG_IRQ_MSP_CIC) += msp_irq_cic.o
> +obj-$(CONFIG_IRQ_MSP_CIC) += msp_irq_cic.o msp_irq_per.o
What does this change have to do with the rest of the patch?
> diff --git a/arch/mips/pmc-sierra/msp71xx/msp_smp.c
> b/arch/mips/pmc-sierra/msp71xx/msp_smp.c
> new file mode 100644
> index 0000000..31a6c72
> --- /dev/null
> +++ b/arch/mips/pmc-sierra/msp71xx/msp_smp.c
> @@ -0,0 +1,75 @@
> +/*
> + * Copyright (C) 2000, 2001, 2004 MIPS Technologies, Inc.
> + * Copyright (C) 2001 Ralf Baechle
> + * Copyright (C) 2010 PMC-Sierra, Inc.
> + *
> + * VSMP support for MSP platforms . Derived from malta vsmp support.
> + *
> + * This program is free software; you can distribute it and/or modify
> it
> + * under the terms of the GNU General Public License (Version 2) as
> + * published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope it will be useful, but
> WITHOUT
> + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
> or
> + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
> License
> + * for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> along
> + * with this program; if not, write to the Free Software Foundation,
> Inc.,
Your patch is line-wrapped.
> + * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
> + *
> + */
> +#include<linux/smp.h>
> +#include<linux/interrupt.h>
> +
> +#ifdef CONFIG_MIPS_MT_SMP
> +#define MIPS_CPU_IPI_RESCHED_IRQ 0 /* SW int 0 for resched */
> +#define MIPS_CPU_IPI_CALL_IRQ 1 /* SW int 1 for call */
Align the comments please, and align the macro values with a tab.
> +static struct irqaction irq_resched = {
> + .handler = ipi_resched_interrupt,
> + .flags = IRQF_DISABLED|IRQF_PERCPU,
Need spaces around |.
> + .name = "IPI_resched"
> +};
> +
> +static struct irqaction irq_call = {
> + .handler = ipi_call_interrupt,
> + .flags = IRQF_DISABLED|IRQF_PERCPU,
Need spaces around |.
> + .name = "IPI_call"
> +};
Need an empty line here.
> +void __init arch_init_ipiirq(int irq, struct irqaction *action)
> +{
> + setup_irq(irq, action);
> + set_irq_handler(irq, handle_percpu_irq);
> +}
Need an empty line here.
> +void __init msp_vsmp_int_init(void)
> +{
> + set_vi_handler (MIPS_CPU_IPI_RESCHED_IRQ, ipi_resched_dispatch);
> + set_vi_handler (MIPS_CPU_IPI_CALL_IRQ, ipi_call_dispatch);
Spaces between the function name and ( are not allowed -- run your patch
thru scripts/checkpatch.pl.
WBR, Sergei
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC 1/3] VSMP support for msp71xx family of platforms.
2010-12-02 11:47 ` Sergei Shtylyov
@ 2010-12-02 17:27 ` anoop pa
2010-12-05 14:00 ` Sergei Shtylyov
0 siblings, 1 reply; 5+ messages in thread
From: anoop pa @ 2010-12-02 17:27 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: Ralf Baechle, linux-mips, mcdonald.shane
On Thu, Dec 2, 2010 at 5:17 PM, Sergei Shtylyov <sshtylyov@mvista.com> wrote:
> On 01.12.2010 19:18, Anoop P A wrote:
>
> Don't include this into the patch, or Ralf will have to hand edit it out.
>
Sure. Will take care in next patch series onwards.
>> Cc: anoop.pa@gmail.com
>
> This should be in the signoff section.
>
OK
>> msp_smp.c initiliase IPI call and resched irq.
>
> Only "initializes".
>
Sorry my bad.
>> -obj-$(CONFIG_IRQ_MSP_CIC) += msp_irq_cic.o
>> +obj-$(CONFIG_IRQ_MSP_CIC) += msp_irq_cic.o msp_irq_per.o
>
> What does this change have to do with the rest of the patch?
>
This change is required for next patch in this. series.Is this
potentially wrong .
Do I want to move this to next patch?
> Your patch is line-wrapped.
>
Will take care while creating next set of patches.
>> +#define MIPS_CPU_IPI_CALL_IRQ 1 /* SW int 1 for call */
>
> Align the comments please, and align the macro values with a tab.
>
Ok
>> +static struct irqaction irq_resched = {
>> + .handler = ipi_resched_interrupt,
>> + .flags = IRQF_DISABLED|IRQF_PERCPU,
>
> Need spaces around |.
>
O.k
> Need an empty line here.
>
Ok
>> + set_vi_handler (MIPS_CPU_IPI_CALL_IRQ, ipi_call_dispatch);
>
> Spaces between the function name and ( are not allowed -- run your patch
> thru scripts/checkpatch.pl.
Not sure what went wrong. I had checked it before sending .
linux.git$ ./scripts/checkpatch.pl
0001-VSMP-support-for-msp71xx-family-of-platforms.patch
total: 0 errors, 0 warnings, 84 lines checked
0001-VSMP-support-for-msp71xx-family-of-platforms.patch has no obvious
style problems and is ready for submission.
>
> WBR, Sergei
>
Sergei Thank you very much reviewing the code.
Regards,
Anoop
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC 1/3] VSMP support for msp71xx family of platforms.
2010-12-02 17:27 ` anoop pa
@ 2010-12-05 14:00 ` Sergei Shtylyov
0 siblings, 0 replies; 5+ messages in thread
From: Sergei Shtylyov @ 2010-12-05 14:00 UTC (permalink / raw)
To: anoop pa; +Cc: Ralf Baechle, linux-mips, mcdonald.shane
Hello.
On 02-12-2010 20:27, anoop pa wrote:
>>> -obj-$(CONFIG_IRQ_MSP_CIC) += msp_irq_cic.o
>>> +obj-$(CONFIG_IRQ_MSP_CIC) += msp_irq_cic.o msp_irq_per.o
>> What does this change have to do with the rest of the patch?
> This change is required for next patch in this. series.Is this
> potentially wrong .
It's not wrong -- it's just that one patch needs to address one issue. Or
at least you should describe all your changed in the changelog.
> Do I want to move this to next patch?
I don't know what you want. :-)
>>> + set_vi_handler (MIPS_CPU_IPI_CALL_IRQ, ipi_call_dispatch);
>> Spaces between the function name and ( are not allowed -- run your patch
>> thru scripts/checkpatch.pl.
> Not sure what went wrong. I had checked it before sending .
> linux.git$ ./scripts/checkpatch.pl
> 0001-VSMP-support-for-msp71xx-family-of-platforms.patch
> total: 0 errors, 0 warnings, 84 lines checked
> 0001-VSMP-support-for-msp71xx-family-of-platforms.patch has no obvious
> style problems and is ready for submission.
I'm not sure -- perhaps checkpatch.pl has stopped complaing about those
spaces... but it ceratainly did in the past.
> Regards,
> Anoop
WBR, Sergei
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-12-05 14:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-01 16:18 [RFC 1/3] VSMP support for msp71xx family of platforms Anoop P A
2010-12-01 16:18 ` Anoop P A
2010-12-02 11:47 ` Sergei Shtylyov
2010-12-02 17:27 ` anoop pa
2010-12-05 14:00 ` Sergei Shtylyov
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.