From patchwork Mon Mar 30 02:15:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 455962 X-Patchwork-Delegate: michael@ellerman.id.au Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DD40140161 for ; Mon, 30 Mar 2015 13:18:43 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=neutral reason="verification failed; unprotected key/testing" header.d=jms.id.au header.i=@jms.id.au header.b=DPU4u09y; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 0F7561A08B0 for ; Mon, 30 Mar 2015 13:18:43 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=neutral reason="verification failed; unprotected key/testing" header.d=jms.id.au header.i=@jms.id.au header.b=DPU4u09y; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pd0-x22f.google.com (mail-pd0-x22f.google.com [IPv6:2607:f8b0:400e:c02::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 351C91A054F for ; Mon, 30 Mar 2015 13:15:52 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass reason="1024-bit key; unprotected key/testing" header.d=jms.id.au header.i=@jms.id.au header.b=DPU4u09y; dkim-adsp=pass; dkim-atps=neutral Received: by pddn5 with SMTP id n5so43928125pdd.2 for ; Sun, 29 Mar 2015 19:15:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jms.id.au; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YifSWKG2mc1sgJtIk2OORP6zMjoeQKu4MoSomehlQJg=; b=DPU4u09y5n3tXewFh7VQ3o2+wn2BUer5SJ1ulwsZg+6r3QQftJ16BBZRURRi0ehAfs sj0DfSWi2LNlM4DhsmGwCznCczi9wWe7vxWHqAxMDxcPeA6Lx5Bds9FAqkYZ6jXbEJoJ 6/2GmSxu49ntj439Lop/b/71OqZDOTq/9m+gY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YifSWKG2mc1sgJtIk2OORP6zMjoeQKu4MoSomehlQJg=; b=LsptUw0+AcCeizadQBksgsJTT606RsLJJTgGlRmChhC/KHLPzk5m3OwXzNjWTDfijO pNwzfaMUaXPzDhAiMIp7HpAtx5yWT89IDendn5KdsUKeucNzRO2YaMLCXn/f5PKUm3aO dkL40iE/P+SCcVjX4+n2Qwtx3DxPRWS1l931Gtm+/sHekjGbrNNWJg+zugnlo7wZ/LM6 qHGu2CYLb1bVI042HcHZG2HJtnCCmSnx6RoSMhG4YEj14+oG0VX8gskcqq7wGyxnEXIF bclpSyuD7ut30kCOkeWykXKNsIgJanswsKcMLH4nAeA+uSyo6FafG7c6SPjMe6u5IvER X+hg== X-Gm-Message-State: ALoCoQnJ5iHHs/UmtTUcn6sUZRkVp6NmZKvL/gHRBA3xe5IV/59DuHrL0BYi40xZfQNNSFObYri6 X-Received: by 10.68.223.226 with SMTP id qx2mr54828966pbc.71.1427681750488; Sun, 29 Mar 2015 19:15:50 -0700 (PDT) Received: from icarus.au.ibm.com (220-244-113-206.static.tpgi.com.au. [220.244.113.206]) by mx.google.com with ESMTPSA id ob7sm8707667pdb.13.2015.03.29.19.15.46 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 29 Mar 2015 19:15:49 -0700 (PDT) From: Joel Stanley To: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 2/2] powerpc/powernv: Reboot when requested by firmware Date: Mon, 30 Mar 2015 12:45:33 +1030 Message-Id: <1427681733-25488-2-git-send-email-joel@jms.id.au> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1427681733-25488-1-git-send-email-joel@jms.id.au> References: <1427681733-25488-1-git-send-email-joel@jms.id.au> Cc: rusty@rustcorp.com.au, fabf@skynet.be, jk@ozlabs.org, akpm@linux-foundation.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Use orderly_reboot so userspace will to shut itself down via the reboot path. This is required for graceful reboot initiated by the BMC, such as when a user uses ipmitool to issue a 'chassis power cycle' command. Signed-off-by: Joel Stanley Acked-by: Michael Ellerman --- arch/powerpc/platforms/powernv/opal-power.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/powernv/opal-power.c b/arch/powerpc/platforms/powernv/opal-power.c index 48bf5b0..ac46c2c 100644 --- a/arch/powerpc/platforms/powernv/opal-power.c +++ b/arch/powerpc/platforms/powernv/opal-power.c @@ -29,8 +29,9 @@ static int opal_power_control_event(struct notifier_block *nb, switch (type) { case SOFT_REBOOT: - /* Fall through. The service processor is responsible for - * bringing the machine back up */ + pr_info("OPAL: reboot requested\n"); + orderly_reboot(); + break; case SOFT_OFF: pr_info("OPAL: poweroff requested\n"); orderly_poweroff(true);