lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160111095925.GA17852@red-moon>
Date:	Mon, 11 Jan 2016 09:59:25 +0000
From:	Lorenzo Pieralisi <lorenzo.pieralisi@....com>
To:	Zhaoyang Huang <zhaoyang.huang@...aro.org>
Cc:	zhaoyang.huang@...eadtrum.com, catalin.marinas@....com,
	will.deacon@....com, linux-kernel@...r.kernel.org,
	hanjun.guo@...aro.org, suzuki.poulose@....com
Subject: Re: [RFC PATCH] Add IPI entry for CPU UP

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@...eadtrum.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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ