All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Jonas Gorski <jogo@openwrt.org>
Cc: linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>,
	John Crispin <blogic@openwrt.org>,
	Maxime Bizon <mbizon@freebox.fr>,
	Florian Fainelli <florian@openwrt.org>,
	Kevin Cernekee <cernekee@gmail.com>
Subject: Re: [PATCH V2 1/2] MIPS: BCM63XX: Add SMP support to prom.c
Date: Tue, 18 Jun 2013 15:48:11 +0400	[thread overview]
Message-ID: <51C048FB.5050803@cogentembedded.com> (raw)
In-Reply-To: <1371548072-6247-2-git-send-email-jogo@openwrt.org>

Hello.

On 18-06-2013 13:34, Jonas Gorski wrote:

> From: Kevin Cernekee <cernekee@gmail.com>

> This involves two changes to the BSP code:

> 1) register_smp_ops() for BMIPS SMP

> 2) The CPU1 boot vector on some of the BCM63xx platforms conflicts with
> the special interrupt vector (IV).  Move it to 0x8000_0380 at boot time,
> to resolve the conflict.

> Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
> [jogo@openwrt.org: moved SMP ops registration into ifdef guard,
>   changed ifdef guards to if (IS_ENABLED())]
> Signed-off-by: Jonas Gorski <jogo@openwrt.org>
> ---
> V1 -> V2:
>   * changed ifdef guards to if (IS_ENABLED())

>   arch/mips/bcm63xx/prom.c |   41 +++++++++++++++++++++++++++++++++++++++++
>   1 file changed, 41 insertions(+)

> diff --git a/arch/mips/bcm63xx/prom.c b/arch/mips/bcm63xx/prom.c
> index fd69808..33ddc78 100644
> --- a/arch/mips/bcm63xx/prom.c
> +++ b/arch/mips/bcm63xx/prom.c
[...]
> @@ -52,6 +56,43 @@ void __init prom_init(void)
>
>   	/* do low level board init */
>   	board_prom_init();
> +
> +	if (IS_ENABLED(CONFIG_CPU_BMIPS4350) && IS_ENABLED(CONFIG_SMP)) {
> +		/* set up SMP */
> +		register_smp_ops(&bmips_smp_ops);
> +
> +		/*
> +		 * BCM6328 might not have its second CPU enabled, while BCM6358
> +		 * needs special handling for its shared TLB, so disable SMP
> +		 * for now.
> +		 */
> +		if (BCMCPU_IS_6328()) {
> +			bmips_smp_enabled = 0;
> +		} else if (BCMCPU_IS_6358()) {
> +			bmips_smp_enabled = 0;
> +		}

     Doesn't scripts/checkpatch.pl complain here? You should not use {} 
on the single statement branches.

WBR, Sergei

  reply	other threads:[~2013-06-18 11:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-18  9:34 [PATCH V2 0/2] MIPS: BCM63XX: add SMP support Jonas Gorski
2013-06-18  9:34 ` [PATCH V2 1/2] MIPS: BCM63XX: Add SMP support to prom.c Jonas Gorski
2013-06-18 11:48   ` Sergei Shtylyov [this message]
2013-06-18 12:03     ` Jonas Gorski
2013-06-18  9:34 ` [PATCH V2 2/2] MIPS: BCM63XX: Enable second core SMP on BCM6328 if available Jonas Gorski
2013-06-27 14:05   ` Ralf Baechle
2013-06-27 14:12     ` Ralf Baechle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51C048FB.5050803@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=blogic@openwrt.org \
    --cc=cernekee@gmail.com \
    --cc=florian@openwrt.org \
    --cc=jogo@openwrt.org \
    --cc=linux-mips@linux-mips.org \
    --cc=mbizon@freebox.fr \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.