All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: netlogic: Exclude netlogic,xlp-pic code from XLR builds
@ 2016-11-07 11:30 ` Paul Burton
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Burton @ 2016-11-07 11:30 UTC (permalink / raw)
  To: linux-mips; +Cc: Paul Burton, Jayachandran C

Code in arch/mips/netlogic/common/irq.c which handles the XLP PIC fails
to build in XLR configurations due to cpu_is_xlp9xx not being defined,
leading to the following build failure:

    arch/mips/netlogic/common/irq.c: In function ‘xlp_of_pic_init’:
    arch/mips/netlogic/common/irq.c:298:2: error: implicit declaration
    of function ‘cpu_is_xlp9xx’ [-Werror=implicit-function-declaration]
      if (cpu_is_xlp9xx()) {
      ^

Although the code was conditional upon CONFIG_OF which is indirectly
selected by CONFIG_NLM_XLP_BOARD but not CONFIG_NLM_XLR_BOARD, the
failing XLR with CONFIG_OF configuration can be configured manually or
by randconfig.

Fix the build failure by making the affected XLP PIC code conditional
upon CONFIG_CPU_XLP which is used to guard the inclusion of
asm/netlogic/xlp-hal/xlp.h that provides the required cpu_is_xlp9xx
function.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Jayachandran C <jchandra@broadcom.com>
---

 arch/mips/netlogic/common/irq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/netlogic/common/irq.c b/arch/mips/netlogic/common/irq.c
index 3660dc6..b04eca1 100644
--- a/arch/mips/netlogic/common/irq.c
+++ b/arch/mips/netlogic/common/irq.c
@@ -275,7 +275,7 @@ asmlinkage void plat_irq_dispatch(void)
 	do_IRQ(nlm_irq_to_xirq(node, i));
 }
 
-#ifdef CONFIG_OF
+#if defined(CONFIG_CPU_XLP) && defined(CONFIG_OF)
 static const struct irq_domain_ops xlp_pic_irq_domain_ops = {
 	.xlate = irq_domain_xlate_onetwocell,
 };
@@ -348,7 +348,7 @@ void __init arch_init_irq(void)
 #if defined(CONFIG_CPU_XLR)
 	nlm_setup_fmn_irq();
 #endif
-#if defined(CONFIG_OF)
+#if defined(CONFIG_CPU_XLP) && defined(CONFIG_OF)
 	of_irq_init(xlp_pic_irq_ids);
 #endif
 }
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] MIPS: netlogic: Exclude netlogic,xlp-pic code from XLR builds
@ 2016-11-07 11:30 ` Paul Burton
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Burton @ 2016-11-07 11:30 UTC (permalink / raw)
  To: linux-mips; +Cc: Paul Burton, Jayachandran C

Code in arch/mips/netlogic/common/irq.c which handles the XLP PIC fails
to build in XLR configurations due to cpu_is_xlp9xx not being defined,
leading to the following build failure:

    arch/mips/netlogic/common/irq.c: In function ‘xlp_of_pic_init’:
    arch/mips/netlogic/common/irq.c:298:2: error: implicit declaration
    of function ‘cpu_is_xlp9xx’ [-Werror=implicit-function-declaration]
      if (cpu_is_xlp9xx()) {
      ^

Although the code was conditional upon CONFIG_OF which is indirectly
selected by CONFIG_NLM_XLP_BOARD but not CONFIG_NLM_XLR_BOARD, the
failing XLR with CONFIG_OF configuration can be configured manually or
by randconfig.

Fix the build failure by making the affected XLP PIC code conditional
upon CONFIG_CPU_XLP which is used to guard the inclusion of
asm/netlogic/xlp-hal/xlp.h that provides the required cpu_is_xlp9xx
function.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Jayachandran C <jchandra@broadcom.com>
---

 arch/mips/netlogic/common/irq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/netlogic/common/irq.c b/arch/mips/netlogic/common/irq.c
index 3660dc6..b04eca1 100644
--- a/arch/mips/netlogic/common/irq.c
+++ b/arch/mips/netlogic/common/irq.c
@@ -275,7 +275,7 @@ asmlinkage void plat_irq_dispatch(void)
 	do_IRQ(nlm_irq_to_xirq(node, i));
 }
 
-#ifdef CONFIG_OF
+#if defined(CONFIG_CPU_XLP) && defined(CONFIG_OF)
 static const struct irq_domain_ops xlp_pic_irq_domain_ops = {
 	.xlate = irq_domain_xlate_onetwocell,
 };
@@ -348,7 +348,7 @@ void __init arch_init_irq(void)
 #if defined(CONFIG_CPU_XLR)
 	nlm_setup_fmn_irq();
 #endif
-#if defined(CONFIG_OF)
+#if defined(CONFIG_CPU_XLP) && defined(CONFIG_OF)
 	of_irq_init(xlp_pic_irq_ids);
 #endif
 }
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] MIPS: netlogic: Exclude netlogic,xlp-pic code from XLR builds
  2016-11-07 11:30 ` Paul Burton
  (?)
@ 2016-11-08  9:23 ` Jayachandran C.
  -1 siblings, 0 replies; 3+ messages in thread
From: Jayachandran C. @ 2016-11-08  9:23 UTC (permalink / raw)
  To: Paul Burton; +Cc: linux-mips, Jayachandran C

Hi Paul,

On Mon, Nov 7, 2016 at 5:00 PM, Paul Burton <paul.burton@imgtec.com> wrote:
>
> Code in arch/mips/netlogic/common/irq.c which handles the XLP PIC fails
> to build in XLR configurations due to cpu_is_xlp9xx not being defined,
> leading to the following build failure:
>
>     arch/mips/netlogic/common/irq.c: In function ‘xlp_of_pic_init’:
>     arch/mips/netlogic/common/irq.c:298:2: error: implicit declaration
>     of function ‘cpu_is_xlp9xx’ [-Werror=implicit-function-declaration]
>       if (cpu_is_xlp9xx()) {
>       ^
>
> Although the code was conditional upon CONFIG_OF which is indirectly
> selected by CONFIG_NLM_XLP_BOARD but not CONFIG_NLM_XLR_BOARD, the
> failing XLR with CONFIG_OF configuration can be configured manually or
> by randconfig.
>
> Fix the build failure by making the affected XLP PIC code conditional
> upon CONFIG_CPU_XLP which is used to guard the inclusion of
> asm/netlogic/xlp-hal/xlp.h that provides the required cpu_is_xlp9xx
> function.
>
> Signed-off-by: Paul Burton <paul.burton@imgtec.com>
> Cc: Jayachandran C <jchandra@broadcom.com>
> ---
>
>  arch/mips/netlogic/common/irq.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/mips/netlogic/common/irq.c b/arch/mips/netlogic/common/irq.c
> index 3660dc6..b04eca1 100644
> --- a/arch/mips/netlogic/common/irq.c
> +++ b/arch/mips/netlogic/common/irq.c
> @@ -275,7 +275,7 @@ asmlinkage void plat_irq_dispatch(void)
>         do_IRQ(nlm_irq_to_xirq(node, i));
>  }
>
> -#ifdef CONFIG_OF
> +#if defined(CONFIG_CPU_XLP) && defined(CONFIG_OF)
>  static const struct irq_domain_ops xlp_pic_irq_domain_ops = {
>         .xlate = irq_domain_xlate_onetwocell,
>  };
> @@ -348,7 +348,7 @@ void __init arch_init_irq(void)
>  #if defined(CONFIG_CPU_XLR)
>         nlm_setup_fmn_irq();
>  #endif
> -#if defined(CONFIG_OF)
> +#if defined(CONFIG_CPU_XLP) && defined(CONFIG_OF)
>         of_irq_init(xlp_pic_irq_ids);
>  #endif
>  }

Thanks for fixing this up.  I think the use "defined(CONFIG_CPU_XLP)
&& defined(CONFIG_OF)" is redundant, since CONFIG_CPU_XLP implies
CONFIG_OF. Just "defined(CONFIG_CPU_XLP)" should be good enough.

JC.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-11-08  9:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-07 11:30 [PATCH] MIPS: netlogic: Exclude netlogic,xlp-pic code from XLR builds Paul Burton
2016-11-07 11:30 ` Paul Burton
2016-11-08  9:23 ` Jayachandran C.

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.