Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2635853pxa; Mon, 17 Aug 2020 15:04:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyjKdB9hOUY5rwrdBRO/FEfcd9TQ/edLBpS8+REsqQRm5V20PIxcdaGLDqGbPNWhRjT/SX X-Received: by 2002:a50:9dc2:: with SMTP id l2mr9146160edk.290.1597701889911; Mon, 17 Aug 2020 15:04:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597701889; cv=none; d=google.com; s=arc-20160816; b=SC+GjdWIPuDyN7mtOvd64RDOfKNBVeOKVAOXH/acrhWCFWiW6bugM91g4V+kPzCwfw 7gz4UKfWkJSA/Lm6m2+6QwF7nYHyOaLOqrC/gU8SPQRfJMOrx+PsesJWhEC2RcV6J+hC 5MIrUFzvP2yPH+Econy3qWV3MqdWGQ4rcI9nVQcPfWF8HybPZTsydSOJAmbJxNqr8abj /eElKNgqPgjgV/zBlEapZFVBxRFpPxJ0VoW+QeuCTqEZeP8s0F9y8KS7B3h+zr2pfyzI IPhZFUhbMj5y0LMaK5YEig6aHcLvGTqCAKvGadohP3b7aP059xquQDgRiHPq2lSzJsV1 GBFw== 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=UFAk0RIVVwnzX0yU1ryEfKQH9LxAIaEoWYLIDY67ELU=; b=Yzs80/L4vtvwVMqZDvzSQXVYm9DxaAhFSgwfnH1gW0l4ZUX06VbeRtDkaTFqoodeu2 Ft2pRX8U6X+Fprstx3HGdRLZLjSPHupFdAyGHKmnBDfBzl3Fr4KlHyOXMqw1G3318Lp0 FgqYoFWqkCm+1gHrxEd91DzEqXx3sD9eM/Kt67wf5IZ3DNKgjjbvsVYPbZwqVyPw42Yl G94J3qWOR0LVhs4RA9ZAxsEstDXfNIe9kh/Oq/M/qU5vEfeqAY1qpQomVZomTM9/DX4k baEAXh8M6y22KsVppU4Ij9QV2kdBHdN9U4i1e2Vc0FwZcjss/BSywS8JH4MVhXGWU539 rDcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Xh3Hn5U/"; 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 a23si12734319eju.364.2020.08.17.15.04.26; Mon, 17 Aug 2020 15:04:49 -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="Xh3Hn5U/"; 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 S1730882AbgHQPuz (ORCPT + 99 others); Mon, 17 Aug 2020 11:50:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:48058 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730649AbgHQPjb (ORCPT ); Mon, 17 Aug 2020 11:39:31 -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 E9C5A22DD6; Mon, 17 Aug 2020 15:39:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597678771; bh=uNGWZjCsg64ckoUhe0XxFhNdO/u7Unjei4kpB/FWVdQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xh3Hn5U/P9qRYVAX8IJXNIT5dpw7IW2ZdMPWqgQf2tlzQqrTujMXoIKTu4fbC+aqw hK8ziRrXLrvKcWVGM4YaKAXbmgqmUEgKjNnU0Oid3gkBI1lDECQTMb/Ac5WbwKXQCO lGRQ7GhVr/9zVqb1AcsVos+tXQjMvgts7SJkoQY4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sven Schnelle , Helge Deller Subject: [PATCH 5.8 447/464] parisc: mask out enable and reserved bits from sba imask Date: Mon, 17 Aug 2020 17:16:40 +0200 Message-Id: <20200817143855.193232198@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143833.737102804@linuxfoundation.org> References: <20200817143833.737102804@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 @@ -1270,7 +1270,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)) {