Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4BE5C43381 for ; Fri, 22 Mar 2019 11:56:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B54A220850 for ; Fri, 22 Mar 2019 11:56:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553255763; bh=bafSySKIeZ0MG55QPH9nykG6BwHoZCV7FJScvMOVTIg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=mBGhdbiidqFe+umN9LnJ7zZ+LweIY2ggrd7btyA6jmUInlfD3NINvsGKbuwtndiPD zry3F3G4a5yj8jbWZ9MADH5OgZg/iaTj3ML3LxX7Y44WD7lFPW7DWD7NLBDpJqgCq4 28xKZyiRs6vytyUUbexIZM7/GyP3Wcqd/9LRaXHY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731674AbfCVL4C (ORCPT ); Fri, 22 Mar 2019 07:56:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:60690 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732770AbfCVL4C (ORCPT ); Fri, 22 Mar 2019 07:56:02 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 49BAD21916; Fri, 22 Mar 2019 11:56:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553255761; bh=bafSySKIeZ0MG55QPH9nykG6BwHoZCV7FJScvMOVTIg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=epUhN2cCcsQIB+MKeJJh22R+tBxVyEDeSPEDbxe5AlvqH57h9UtBa/VSPgLLcjKPj yq1M+jvaEVWJpJz6Gb9vnBVgkkE236IeB288Sq5za75q4yMGD/DeHqiTVD9/CWq6rh vtkTFUw6VCh2yQWGkT1pbw9b0X0O0To6GVsVSHYE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guenter Roeck , Cornelia Huck , Martin Schwidefsky Subject: [PATCH 4.14 183/183] s390/setup: fix boot crash for machine without EDAT-1 Date: Fri, 22 Mar 2019 12:16:51 +0100 Message-Id: <20190322111255.136991986@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190322111241.819468003@linuxfoundation.org> References: <20190322111241.819468003@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Martin Schwidefsky commit 86a86804e4f18fc3880541b3d5a07f4df0fe29cb upstream. The fix to make WARN work in the early boot code created a problem on older machines without EDAT-1. The setup_lowcore_dat_on function uses the pointer from lowcore_ptr[0] to set the DAT bit in the new PSWs. That does not work if the kernel page table is set up with 4K pages as the prefix address maps to absolute zero. To make this work the PSWs need to be changed with via address 0 in form of the S390_lowcore definition. Reported-by: Guenter Roeck Tested-by: Cornelia Huck Fixes: 94f85ed3e2f8 ("s390/setup: fix early warning messages") Signed-off-by: Martin Schwidefsky Signed-off-by: Greg Kroah-Hartman --- arch/s390/kernel/setup.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c @@ -390,13 +390,12 @@ static void __init setup_lowcore_dat_off static void __init setup_lowcore_dat_on(void) { - struct lowcore *lc; - - lc = lowcore_ptr[0]; - lc->external_new_psw.mask |= PSW_MASK_DAT; - lc->svc_new_psw.mask |= PSW_MASK_DAT; - lc->program_new_psw.mask |= PSW_MASK_DAT; - lc->io_new_psw.mask |= PSW_MASK_DAT; + __ctl_clear_bit(0, 28); + S390_lowcore.external_new_psw.mask |= PSW_MASK_DAT; + S390_lowcore.svc_new_psw.mask |= PSW_MASK_DAT; + S390_lowcore.program_new_psw.mask |= PSW_MASK_DAT; + S390_lowcore.io_new_psw.mask |= PSW_MASK_DAT; + __ctl_set_bit(0, 28); } static struct resource code_resource = {