From patchwork Tue Oct 17 05:35:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 826769 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yGP764h4zz9ryk for ; Tue, 17 Oct 2017 16:36:02 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="lTvRMxpw"; 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 3yGP763H4FzDrGy for ; Tue, 17 Oct 2017 16:36:02 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="lTvRMxpw"; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:400e:c05::244; helo=mail-pg0-x244.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="lTvRMxpw"; dkim-atps=neutral Received: from mail-pg0-x244.google.com (mail-pg0-x244.google.com [IPv6:2607:f8b0:400e:c05::244]) (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 3yGP705syjzDrD6 for ; Tue, 17 Oct 2017 16:35:56 +1100 (AEDT) Received: by mail-pg0-x244.google.com with SMTP id s2so561964pge.10 for ; Mon, 16 Oct 2017 22:35:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=xwSDnw65RBRFzH+grbENDfgnNthdWPXTAdZfuVJ0hpk=; b=lTvRMxpwWOBKjURmeaDBk1qeQaSfs5zRqx22O/rS1xu0m3zvciMDvjWCcbZSFdH0ji fxy4XH75uZ34766lMNgQqpmCZhi5q6OkkuQKG4fR6sDgBaSbxmfmIRtu3LTR5DAgT9tC frUhFq3M1K6Rd0znKchs+PgcACFIsxF1f6+7tN/keTMvcr3eKo271MeA/5v1iKPaq9ve dT6Xq/V2ocZmiAUrpkx47BtWSPOcBZeLCU/6IM4vM6kzzuFnbRgcmRVTqUm959nf9ZVZ vVfIj2qozxTJPC3m0AGCUwAztGcrxK6EeRwfTYtg2Cwvw3Pcr50iLXPx9dgpJLPEeBUc hvIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=xwSDnw65RBRFzH+grbENDfgnNthdWPXTAdZfuVJ0hpk=; b=XKeTR32NRhJTzwQ2odp/SpCLzMJZxRkAR+gbCwWuo5lUPGnL+//vbDnWcmiYTP7o67 5c9wxBP4DU1jaXiZu8rrcykYcnu5B9jvXlwtxVmnqigkt5h/8+93qHHN3dd23faa5Za7 nd9MbrX9THy/kqYrCUMrYp6e21nYgvZPOUByF0ltEEPD1ILyJ++yvSfjORLN9vxLLQRF z6ygFj+Hgi6YwKyDHx6k5xrWSTrFLlcijJrPBbLkm5but3ZG+dEdIh2tv01vV4Ul0XYT xoO7Ajs/bIYAoEHLSKy49NqrY6u+gPTA/bTCg2e6/v5sGLbSX/bK3djLpxsG+fzJOLHr KG1A== X-Gm-Message-State: AMCzsaUoz9pSN8mLyojKgesY5MBANxjH6E/qv/5qf/3YkgL4xDgzPWsn I7E+F+blU8pVdYP8k7N/LNdEZg== X-Google-Smtp-Source: AOwi7QDMOqljs80psqTD2x91di6N0p251nZnZqnQOCc1oFRX56DX/oMe2ZdMHWFzHZdjDDxWW+ep2Q== X-Received: by 10.84.231.193 with SMTP id g1mr10869521pln.407.1508218553753; Mon, 16 Oct 2017 22:35:53 -0700 (PDT) Received: from roar.au.ibm.com (59-102-69-156.tpgi.com.au. [59.102.69.156]) by smtp.gmail.com with ESMTPSA id w85sm17249512pfa.132.2017.10.16.22.35.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Oct 2017 22:35:52 -0700 (PDT) From: Nicholas Piggin To: skiboot@lists.ozlabs.org Date: Tue, 17 Oct 2017 15:35:42 +1000 Message-Id: <20171017053542.7924-1-npiggin@gmail.com> X-Mailer: git-send-email 2.13.3 Subject: [Skiboot] [PATCH] mambo: disable OPAL_SIGNAL_SYSTEM_RESET X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" mambo does not deliver system reset interrupts correctly (details in the added comment), so disable it for now. Signed-off-by: Nicholas Piggin --- This feature was useful for developing the NMI IPI system in Linux, but now it's somewhat working, and we've got OPAL_SIGNAL_SYSTEM_RESET implemented on real hardware (and equivalent hypercall for QEMU guests), it is less important now. It's annoing because it causes breaking to xmon to usually often crash the kernel in an SMP sim. --- platforms/mambo/mambo.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/platforms/mambo/mambo.c b/platforms/mambo/mambo.c index cb6e103c..8afd01c2 100644 --- a/platforms/mambo/mambo.c +++ b/platforms/mambo/mambo.c @@ -259,7 +259,22 @@ static int64_t mambo_signal_system_reset(int32_t cpu_nr) static void mambo_sreset_init(void) { - opal_register(OPAL_SIGNAL_SYSTEM_RESET, mambo_signal_system_reset, 1); + /* + * Mambo currently does not deliver system reset interrupts + * correctly if the CPU was in idle state. The expected + * behavior (and what the hardware does) is to set SRR1 to a + * power save wakeup, with wakeup reason system reset. This + * allows CPU state to be restored and then the system reset + * interrupt to be taken. + * + * Mambo does a non-power-saving wakeup, which immediately + * crashes if MSR[RI] is clear as part of the idle entry sequence. + * + * Disable this for now until mambo can be fixed, or a workaround + * put in the tcl injection. + */ + if (0) + opal_register(OPAL_SIGNAL_SYSTEM_RESET, mambo_signal_system_reset, 1); } static void mambo_platform_init(void)