public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Zhaoyang Huang <zhaoyang.huang@linaro.org>
Cc: zhaoyang.huang@spreadtrum.com, catalin.marinas@arm.com,
	will.deacon@arm.com, linux-kernel@vger.kernel.org,
	hanjun.guo@linaro.org, suzuki.poulose@arm.com
Subject: Re: [RFC PATCH] Add IPI entry for CPU UP
Date: Mon, 11 Jan 2016 09:59:25 +0000	[thread overview]
Message-ID: <20160111095925.GA17852@red-moon> (raw)
In-Reply-To: <1452496240-21060-1-git-send-email-zhaoyang.huang@spreadtrum.com>

On Mon, Jan 11, 2016 at 03:10:40PM +0800, Zhaoyang Huang wrote:
> In some ARM SOCs, IPI interrupt is used for hotplug in one cpu, that is,
> sending a IPI to the core in WFI and powerdown status. So Add a IPI
> entry for handle this kind of cpu up interrupt

On arm64 SOCs, with a mainline kernel, you can only hotplug CPUs out
and back in by using the PSCI firmware interface, which does not
require an IPI to boot a CPU, therefore this patch is useless.

Lorenzo

> Signed-off-by: Zhaoyang Huang <zhaoyang.huang@spreadtrum.com>
> ---
>  arch/arm64/kernel/smp.c |   10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> index b1adc51..20e63c9 100644
> --- a/arch/arm64/kernel/smp.c
> +++ b/arch/arm64/kernel/smp.c
> @@ -70,6 +70,7 @@ enum ipi_msg_type {
>  	IPI_CPU_STOP,
>  	IPI_TIMER,
>  	IPI_IRQ_WORK,
> +	IPI_CPU_UP,
>  };
>  
>  /*
> @@ -627,6 +628,7 @@ static const char *ipi_types[NR_IPI] __tracepoint_string = {
>  	S(IPI_CPU_STOP, "CPU stop interrupts"),
>  	S(IPI_TIMER, "Timer broadcast interrupts"),
>  	S(IPI_IRQ_WORK, "IRQ work interrupts"),
> +	S(IPI_CPU_UP, "Hotplug cpu up by ipi"),
>  };
>  
>  static void smp_cross_call(const struct cpumask *target, unsigned int ipinr)
> @@ -746,6 +748,8 @@ void handle_IPI(int ipinr, struct pt_regs *regs)
>  		irq_exit();
>  		break;
>  #endif
> +       case IPI_CPU_UP:
> +               break;
>  
>  	default:
>  		pr_crit("CPU%u: Unknown IPI message 0x%x\n", cpu, ipinr);
> @@ -798,3 +802,9 @@ int setup_profiling_timer(unsigned int multiplier)
>  {
>  	return -EINVAL;
>  }
> +
> +void smp_send_cpuup(int cpu)
> +{
> +       smp_cross_call(cpumask_of(cpu), IPI_CPU_UP);
> +}
> +
> -- 
> 1.7.9.5
> 

  reply	other threads:[~2016-01-11  9:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-11  7:10 [RFC PATCH] Add IPI entry for CPU UP Zhaoyang Huang
2016-01-11  9:59 ` Lorenzo Pieralisi [this message]
2016-01-11 10:06   ` Catalin Marinas
2016-01-11 10:55     ` Zhaoyang Huang (黄朝阳)
2016-01-11 11:03       ` Mark Rutland
2016-01-11 11:21         ` Zhaoyang Huang
2016-01-11 11:37           ` Mark Rutland

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=20160111095925.GA17852@red-moon \
    --to=lorenzo.pieralisi@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=hanjun.guo@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suzuki.poulose@arm.com \
    --cc=will.deacon@arm.com \
    --cc=zhaoyang.huang@linaro.org \
    --cc=zhaoyang.huang@spreadtrum.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox