* [PATCH] [POWERPC] Fix CONFIG_SMP=n build breaks
@ 2007-10-26 16:55 Olof Johansson
2007-10-26 18:19 ` [PATCH] [POWERPC] Fix CONFIG_SMP=n build break Arnd Bergmann
0 siblings, 1 reply; 6+ messages in thread
From: Olof Johansson @ 2007-10-26 16:55 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev, linux-kernel, arnd
Fix two build errors on powerpc allyesconfig + CONFIG_SMP=n:
arch/powerpc/platforms/built-in.o: In function `cpu_affinity_set':
arch/powerpc/platforms/cell/spu_priv1_mmio.c:78: undefined reference to `.iic_get_target_id'
arch/powerpc/platforms/built-in.o: In function `iic_init_IRQ':
arch/powerpc/platforms/cell/interrupt.c:397: undefined reference to `.iic_setup_cpu'
Signed-off-by: Olof Johansson <olof@lixom.net>
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c
index 151fd8b..222678f 100644
--- a/arch/powerpc/platforms/cell/interrupt.c
+++ b/arch/powerpc/platforms/cell/interrupt.c
@@ -158,6 +158,11 @@ static unsigned int iic_get_irq(void)
return virq;
}
+void iic_setup_cpu(void)
+{
+ out_be64(&__get_cpu_var(iic).regs->prio, 0xff);
+}
+
#ifdef CONFIG_SMP
/* Use the highest interrupt priorities for IPI */
@@ -166,11 +171,6 @@ static inline int iic_ipi_to_irq(int ipi)
return IIC_IRQ_TYPE_IPI + 0xf - ipi;
}
-void iic_setup_cpu(void)
-{
- out_be64(&__get_cpu_var(iic).regs->prio, 0xff);
-}
-
void iic_cause_IPI(int cpu, int mesg)
{
out_be64(&per_cpu(iic, cpu).regs->generate, (0xf - mesg) << 4);
diff --git a/arch/powerpc/platforms/cell/spu_priv1_mmio.c b/arch/powerpc/platforms/cell/spu_priv1_mmio.c
index 67fa724..e5e08ac 100644
--- a/arch/powerpc/platforms/cell/spu_priv1_mmio.c
+++ b/arch/powerpc/platforms/cell/spu_priv1_mmio.c
@@ -75,9 +75,11 @@ static u64 int_stat_get(struct spu *spu, int class)
static void cpu_affinity_set(struct spu *spu, int cpu)
{
+#ifdef CONFIG_SMP
u64 target = iic_get_target_id(cpu);
u64 route = target << 48 | target << 32 | target << 16;
out_be64(&spu->priv1->int_route_RW, route);
+#endif
}
static u64 mfc_dar_get(struct spu *spu)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] [POWERPC] Fix CONFIG_SMP=n build break
2007-10-26 16:55 [PATCH] [POWERPC] Fix CONFIG_SMP=n build breaks Olof Johansson
@ 2007-10-26 18:19 ` Arnd Bergmann
2007-10-27 17:28 ` [PATCH v2] " Olof Johansson
0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2007-10-26 18:19 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Olof Johansson, paulus, linux-kernel
On Friday 26 October 2007, Olof Johansson wrote:
> Fix two build errors on powerpc allyesconfig + CONFIG_SMP=3Dn:
>
> arch/powerpc/platforms/built-in.o: In function `cpu_affinity_set':
> arch/powerpc/platforms/cell/spu_priv1_mmio.c:78: undefined reference to
> `.iic_get_target_id' arch/powerpc/platforms/built-in.o: In function
> `iic_init_IRQ':
> arch/powerpc/platforms/cell/interrupt.c:397: undefined reference to
> `.iic_setup_cpu'
Thanks for reporting this.
> --- a/arch/powerpc/platforms/cell/spu_priv1_mmio.c
> +++ b/arch/powerpc/platforms/cell/spu_priv1_mmio.c
> @@ -75,9 +75,11 @@ static u64 int_stat_get(struct spu *spu, int class)
> =A0
> =A0static void cpu_affinity_set(struct spu *spu, int cpu)
> =A0{
> +#ifdef CONFIG_SMP
> =A0=A0=A0=A0=A0=A0=A0=A0u64 target =3D iic_get_target_id(cpu);
> =A0=A0=A0=A0=A0=A0=A0=A0u64 route =3D target << 48 | target << 32 | targe=
t << 16;
> =A0=A0=A0=A0=A0=A0=A0=A0out_be64(&spu->priv1->int_route_RW, route);
> +#endif
> =A0}
I think here it would be better to move iic_get_target_id out of
CONFIG_SMP as well. We might want to kexec from an SMP kernel into
a UP kernel, and in that case, cpu_affinity_set() should better
reset the routing to CPU 0.
Arnd <><
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] [POWERPC] Fix CONFIG_SMP=n build break
2007-10-26 18:19 ` [PATCH] [POWERPC] Fix CONFIG_SMP=n build break Arnd Bergmann
@ 2007-10-27 17:28 ` Olof Johansson
2007-10-27 18:08 ` Arnd Bergmann
2007-10-28 1:38 ` Stephen Rothwell
0 siblings, 2 replies; 6+ messages in thread
From: Olof Johansson @ 2007-10-27 17:28 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linuxppc-dev, paulus, linux-kernel
Fix two build errors on powerpc allyesconfig + CONFIG_SMP=n:
arch/powerpc/platforms/built-in.o: In function `cpu_affinity_set':
arch/powerpc/platforms/cell/spu_priv1_mmio.c:78: undefined reference to `.iic_get_target_id'
arch/powerpc/platforms/built-in.o: In function `iic_init_IRQ':
arch/powerpc/platforms/cell/interrupt.c:397: undefined reference to `.iic_setup_cpu'
Signed-off-by: Olof Johansson <olof@lixom.net>
---
On Fri, Oct 26, 2007 at 08:19:10PM +0200, Arnd Bergmann wrote:
> I think here it would be better to move iic_get_target_id out of
> CONFIG_SMP as well. We might want to kexec from an SMP kernel into
> a UP kernel, and in that case, cpu_affinity_set() should better
> reset the routing to CPU 0.
Makes sense. New patch.
-Olof
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c
index 151fd8b..04f74f9 100644
--- a/arch/powerpc/platforms/cell/interrupt.c
+++ b/arch/powerpc/platforms/cell/interrupt.c
@@ -158,6 +158,18 @@ static unsigned int iic_get_irq(void)
return virq;
}
+void iic_setup_cpu(void)
+{
+ out_be64(&__get_cpu_var(iic).regs->prio, 0xff);
+}
+
+u8 iic_get_target_id(int cpu)
+{
+ return per_cpu(iic, cpu).target_id;
+}
+
+EXPORT_SYMBOL_GPL(iic_get_target_id);
+
#ifdef CONFIG_SMP
/* Use the highest interrupt priorities for IPI */
@@ -166,29 +178,17 @@ static inline int iic_ipi_to_irq(int ipi)
return IIC_IRQ_TYPE_IPI + 0xf - ipi;
}
-void iic_setup_cpu(void)
-{
- out_be64(&__get_cpu_var(iic).regs->prio, 0xff);
-}
-
void iic_cause_IPI(int cpu, int mesg)
{
out_be64(&per_cpu(iic, cpu).regs->generate, (0xf - mesg) << 4);
}
-u8 iic_get_target_id(int cpu)
-{
- return per_cpu(iic, cpu).target_id;
-}
-EXPORT_SYMBOL_GPL(iic_get_target_id);
-
struct irq_host *iic_get_irq_host(int node)
{
return iic_host;
}
EXPORT_SYMBOL_GPL(iic_get_irq_host);
-
static irqreturn_t iic_ipi_action(int irq, void *dev_id)
{
int ipi = (int)(long)dev_id;
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] [POWERPC] Fix CONFIG_SMP=n build break
2007-10-27 17:28 ` [PATCH v2] " Olof Johansson
@ 2007-10-27 18:08 ` Arnd Bergmann
2007-10-28 1:38 ` Stephen Rothwell
1 sibling, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2007-10-27 18:08 UTC (permalink / raw)
To: Olof Johansson; +Cc: linuxppc-dev, paulus, linux-kernel
On Saturday 27 October 2007, Olof Johansson wrote:
> Fix two build errors on powerpc allyesconfig + CONFIG_SMP=n:
>
> arch/powerpc/platforms/built-in.o: In function `cpu_affinity_set':
> arch/powerpc/platforms/cell/spu_priv1_mmio.c:78: undefined reference to `.iic_get_target_id'
> arch/powerpc/platforms/built-in.o: In function `iic_init_IRQ':
> arch/powerpc/platforms/cell/interrupt.c:397: undefined reference to `.iic_setup_cpu'
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] [POWERPC] Fix CONFIG_SMP=n build break
2007-10-27 17:28 ` [PATCH v2] " Olof Johansson
2007-10-27 18:08 ` Arnd Bergmann
@ 2007-10-28 1:38 ` Stephen Rothwell
2007-10-28 2:02 ` Olof Johansson
1 sibling, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2007-10-28 1:38 UTC (permalink / raw)
To: Olof Johansson; +Cc: linuxppc-dev, paulus, linux-kernel, Arnd Bergmann
[-- Attachment #1: Type: text/plain, Size: 436 bytes --]
Hi Olof,
Just a trivial thing ...
On Sat, 27 Oct 2007 12:28:51 -0500 Olof Johansson <olof@lixom.net> wrote:
>
> +u8 iic_get_target_id(int cpu)
> +{
> + return per_cpu(iic, cpu).target_id;
> +}
> +
> +EXPORT_SYMBOL_GPL(iic_get_target_id);
We don't normally put a blank line between a function and its EXPORT...
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] [POWERPC] Fix CONFIG_SMP=n build break
2007-10-28 1:38 ` Stephen Rothwell
@ 2007-10-28 2:02 ` Olof Johansson
0 siblings, 0 replies; 6+ messages in thread
From: Olof Johansson @ 2007-10-28 2:02 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev, paulus, linux-kernel, Arnd Bergmann
On Sun, Oct 28, 2007 at 12:38:50PM +1100, Stephen Rothwell wrote:
> Hi Olof,
>
> Just a trivial thing ...
>
> On Sat, 27 Oct 2007 12:28:51 -0500 Olof Johansson <olof@lixom.net> wrote:
> >
> > +u8 iic_get_target_id(int cpu)
> > +{
> > + return per_cpu(iic, cpu).target_id;
> > +}
> > +
> > +EXPORT_SYMBOL_GPL(iic_get_target_id);
>
> We don't normally put a blank line between a function and its EXPORT...
Yeah, sloppy of me, I thought I just copied and pasted. Paulus: feel
free to fix up before applying.
Thanks for your feedback,
-Olof
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-10-28 1:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-26 16:55 [PATCH] [POWERPC] Fix CONFIG_SMP=n build breaks Olof Johansson
2007-10-26 18:19 ` [PATCH] [POWERPC] Fix CONFIG_SMP=n build break Arnd Bergmann
2007-10-27 17:28 ` [PATCH v2] " Olof Johansson
2007-10-27 18:08 ` Arnd Bergmann
2007-10-28 1:38 ` Stephen Rothwell
2007-10-28 2:02 ` Olof Johansson
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).