Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2654090pxa; Mon, 17 Aug 2020 15:37:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzuD9lBkVAdZ56DODL6Z/wfif9z2zOe283JPkNMKa33GIVJnadjlKHN4c7ZjWCJlwzA/hS X-Received: by 2002:a17:906:84e1:: with SMTP id zp1mr16192344ejb.499.1597703829265; Mon, 17 Aug 2020 15:37:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597703829; cv=none; d=google.com; s=arc-20160816; b=K+M3Qh4sa203BzfbN8lmHE2dchPwVDL7y2BTgSI5uJqW1yyj76IBMEhcYEhwLkU8B2 eF2dL6q52FeVzpYF+PHQRRTuTSF575nMWOwHRrOvS6tPvbUnHZYqfh8h5UDmjZzi8/Wn ulymhL9M0DrIQfdZOg17KmIT4Qo0CRiCzagGcTpyTFVzgrkQO/3wvGgXfryDXCVkj3qM j7ovIKesfi1qXPAjSSORY+44o8VJifC36qkYvr4p/GbgBYJW83cJqmtdp905//gGLRVB jWWFkIVUZDr68NF7j+FE9OZi9XY4U/cx+rpo8WHZ0WcHccnWJc0+1KSBKMsRHX3KTlou D7SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sH0j6PnEvJ9DLV/BUPzMarBJn4+68DeGelZO9H6qqUc=; b=cS9svBXRVLpX+ltI4ivMaxhHiWswD9nzBGJwDtDEYfUWNOBdxzjD6rFnCKTYsJsA2K btAbMIIyA1t9TAKiJrLwHmTzEq23rVELcjOrs4vDEN644Vp8LHdtdyDD2rpRLU/0aljC 0kxugh0O/Q2nbMzFHNGudg0U+6TLZrTaVKgYC2GGTPcJBe4UHLsw+qDLrmsoVHnb/E1v KSGGMdwx0YLE8iTDw/RUr9mSfQ9mAvE3FUp/sk4ei2ny2pw/q87AbmjQdzCzmyaRuAzl j3iOK8dTWvCmAcb8JXbCbpFWe+eRX58CgSSDisSXSRLFRYs+UzW2DXT93tGN6kvDjDck 84Zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dZrKhEs5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cz6si12900812edb.188.2020.08.17.15.36.46; Mon, 17 Aug 2020 15:37:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dZrKhEs5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730054AbgHQRfe (ORCPT + 99 others); Mon, 17 Aug 2020 13:35:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:33222 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730062AbgHQQRp (ORCPT ); Mon, 17 Aug 2020 12:17:45 -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 E88582065C; Mon, 17 Aug 2020 16:17:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597681058; bh=nxbijIe3mjlBYbtASARKH08UZo8+8GTitovu0fEMvmo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dZrKhEs50G4i60vSw/3+IaMqo3WBFGz7Bwyv4ixUq5qkE4pkHnqJ7hyleV4xCz2La lEUosh4CaRY9eq3acCqf6QxKBbZilbIeYdgr0wZ0vPtr3fLfzhzwVVjA1awVBQJJ8g prJe3XCtu7MdDgqdw0NOANcw+UK1s/hfv2GGVHaQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sven Schnelle , Helge Deller Subject: [PATCH 4.19 163/168] parisc: mask out enable and reserved bits from sba imask Date: Mon, 17 Aug 2020 17:18:14 +0200 Message-Id: <20200817143741.804331328@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143733.692105228@linuxfoundation.org> References: <20200817143733.692105228@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sven Schnelle commit 5b24993c21cbf2de11aff077a48c5cb0505a0450 upstream. When using kexec the SBA IOMMU IBASE might still have the RE bit set. This triggers a WARN_ON when trying to write back the IBASE register later, and it also makes some mask calculations fail. Cc: Signed-off-by: Sven Schnelle Signed-off-by: Helge Deller Signed-off-by: Greg Kroah-Hartman --- drivers/parisc/sba_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/parisc/sba_iommu.c +++ b/drivers/parisc/sba_iommu.c @@ -1291,7 +1291,7 @@ sba_ioc_init_pluto(struct parisc_device ** (one that doesn't overlap memory or LMMIO space) in the ** IBASE and IMASK registers. */ - ioc->ibase = READ_REG(ioc->ioc_hpa + IOC_IBASE); + ioc->ibase = READ_REG(ioc->ioc_hpa + IOC_IBASE) & ~0x1fffffULL; iova_space_size = ~(READ_REG(ioc->ioc_hpa + IOC_IMASK) & 0xFFFFFFFFUL) + 1; if ((ioc->ibase < 0xfed00000UL) && ((ioc->ibase + iova_space_size) > 0xfee00000UL)) {