Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2655322pxa; Mon, 17 Aug 2020 15:39:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0bJEyewQIbpI0Gg7mDjqHtYZzN4AXUzYGAIzuGgJP1R2PgM2vMGKJFz0ALenaXTTtQv6n X-Received: by 2002:a05:6402:3130:: with SMTP id dd16mr16880742edb.55.1597703964172; Mon, 17 Aug 2020 15:39:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597703964; cv=none; d=google.com; s=arc-20160816; b=eykKwW/GCv7zI+eng9Ynz9ndw5dk4vvT8jSPbnnl3xxVIWZgHaM0t/iUqZHVYgZA4n W5CYEgvRuCDkp5iKw9shZ/5mcfN3WQUJIkJK9eLtFio8ZCT3h6fUXe8OGheU+BI9lUKC qN0bYxir9C98PdrusQAb6f7Bl/XhqGxeg9Tfv8qicyju8G7WDBMReMvCIEjfaJ8kKVgC DzQ8aqEm8IdCBF6cgIs8mLkPVkkQ9s1Jr0dewcmF4QssQmyqEKF8Pxk1VhjLHLYGC7dr 32xSXSmnA8LyRa1eChEbTtiM2DSQAjZfOw2jwZStNdVPySV1iBQpTr3wOaux9mSbAKE4 TT2A== 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=0g8Cw9bJCt19Dcj0AZUWk3F5dclQHAwGoa1De1WxEj9KSHF0qQaCVBixGwh3Mhy65T fDlx5/xWJuS5W+1UcSRBAv94uDjgUoek26yCOuvCEJJ98SOZYgK0/ghJXa+c0Jdzn8Mp e769vOExIwxbolrz+kdYDPpDen72DSuYh+/MPHZcO9qObuPBfYYqRf26XKAA0Mz7mN5s 0Jnmtl/HmTJxkycGeZec4Djz63DbyO5DRDmltAWDbKnbY9sFSJEukIr4Cumiv2HToUgd imBWAxo3f02AR4Em5kUWW9GAZ1uvJsnr6pZZVOWfs+tcjq7eojqDh9J5yJg6bQDsdYoO 1/vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jbUSFgS8; 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 z13si11664726eja.704.2020.08.17.15.39.01; Mon, 17 Aug 2020 15:39:24 -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=jbUSFgS8; 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 S2390214AbgHQR6o (ORCPT + 99 others); Mon, 17 Aug 2020 13:58:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:35748 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388540AbgHQQKO (ORCPT ); Mon, 17 Aug 2020 12:10:14 -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 6335B20772; Mon, 17 Aug 2020 16:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597680599; bh=uNGWZjCsg64ckoUhe0XxFhNdO/u7Unjei4kpB/FWVdQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jbUSFgS8pm4ROKF+FimIsHZB6mopblhf7iyfVNVWLpc/hK1FBtR3p9cg03wzAW9EA fDUMe2WpNdLKKKnQk4FZjMDH26txL/t3PxgKbgpKXBIEFMKbl0TMl/GM//Cpcht/BF EhgakJzUPguPB8USt2xra3Jz0VZj6tBgw+LfLU4c= 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.4 251/270] parisc: mask out enable and reserved bits from sba imask Date: Mon, 17 Aug 2020 17:17:32 +0200 Message-Id: <20200817143808.328815013@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143755.807583758@linuxfoundation.org> References: <20200817143755.807583758@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)) {