From patchwork Mon Jan 11 07:10:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhaoyang Huang X-Patchwork-Id: 59444 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1938982lbb; Sun, 10 Jan 2016 23:11:10 -0800 (PST) X-Received: by 10.98.32.76 with SMTP id g73mr24134882pfg.48.1452496270632; Sun, 10 Jan 2016 23:11:10 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 63si26437640pft.41.2016.01.10.23.11.10; Sun, 10 Jan 2016 23:11:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dkim=pass header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758606AbcAKHLI (ORCPT + 29 others); Mon, 11 Jan 2016 02:11:08 -0500 Received: from mail-pf0-f178.google.com ([209.85.192.178]:35241 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758499AbcAKHLF (ORCPT ); Mon, 11 Jan 2016 02:11:05 -0500 Received: by mail-pf0-f178.google.com with SMTP id 65so40518575pff.2 for ; Sun, 10 Jan 2016 23:11:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id; bh=zbbD82VKuSnkptlvGp7vAXG+sPYkaV5rRWOSGYksDG4=; b=Cf2hxk20TcoumQLsMHT4fIQspQQXCvnZ4K0O8yIjqdigDNAVYnP7aabjMWSPBg/WOs Q5s+3icqoa2FBLywm+MoOuAx6ktQ8B/B34QLmY26C/WSKS52fgW7COEWJnKP89L9Gcji 8VikrBBVea0wqeGpNFZ2nazGk9/2eZMZOMLa0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=zbbD82VKuSnkptlvGp7vAXG+sPYkaV5rRWOSGYksDG4=; b=DT/M0+XM2TUmLOjJXkszSsDKjUHiOv5ffqpM8hYyBEM3KEKCLy6NCSmqBXZZteoYxY BzU491vOM6MsFhTODgJad0MKj2MWGo0FJj+1l6eOUAJklaUNKMUeA0wwWO/8hki7r87Q ezI43Kf+qZoTcMilIcKpusM3N23gQHIAei5x+r8oZCaOy2zjSe4rlfGkGaNUjcUU+Hbq 8qvBZmB8qSHJqNuSIU9fJ4s2GID9PVpGihYJywmXZe4bXeUXRH0b3bDAU6/tnVYQOHtC XRmm7n9Je0SYZyOLAm/ng4MRIiYai4Mcjzhmg+L13WBnjAvIyTyHgcO2M/gVT89i6mPm TRDg== X-Gm-Message-State: ALoCoQmrFBeRvrEd0mWEMactwjqDay42muji6EReyLiWnTb3wcLT5BOO7gaYLHV1VCUS+Q3LKKIjGoVnk68GmDgucJxQmeOo4Q== X-Received: by 10.98.15.213 with SMTP id 82mr24439076pfp.52.1452496265253; Sun, 10 Jan 2016 23:11:05 -0800 (PST) Received: from zyhuangubtpc.spreadtrum.com ([175.111.195.49]) by smtp.gmail.com with ESMTPSA id n27sm20624242pfb.53.2016.01.10.23.11.01 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Jan 2016 23:11:04 -0800 (PST) From: Zhaoyang Huang X-Google-Original-From: Zhaoyang Huang To: zhaoyang.huang@spreadtrum.com, catalin.marinas@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, lorenzo.pieralisi@arm.com, hanjun.guo@linaro.org, suzuki.poulose@arm.com Subject: [RFC PATCH] Add IPI entry for CPU UP Date: Mon, 11 Jan 2016 15:10:40 +0800 Message-Id: <1452496240-21060-1-git-send-email-zhaoyang.huang@spreadtrum.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Zhaoyang Huang --- arch/arm64/kernel/smp.c | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 1.7.9.5 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); +} +