From patchwork Tue Aug 10 17:30:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 494357 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:396:0:0:0:0 with SMTP id y22csp4178165jap; Tue, 10 Aug 2021 10:40:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJWNTvh+kJ5N1ftKqN8kQI3EWtaQCuhOifkAPhwqNOfbabvokokn4L7wqGvsiov+q1Ag9T X-Received: by 2002:a50:d749:: with SMTP id i9mr6453142edj.248.1628617211306; Tue, 10 Aug 2021 10:40:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628617211; cv=none; d=google.com; s=arc-20160816; b=EkM2Dqsz5YED5UD+TTRMZ8LjTWwlEPbyw8rJX7shWfcU5ltcYYRul3AMNrTjQqUg/b Iy/kh6ngs43xKXQg/jqp4epzcA+be8BpbyL2eE5iEoprnX+b1R+H08kqj8K8xXqR9sop RvwMdIDs6MYD5OBqM+QNief3OwotppA0lI1VQMocOuP+yYHEWuIBhqr+YuJihQ1Sn6J/ r3A+TWqAk5K1TzwJRbr6wYYh92JwPqQaTiSf6dfP/cL4K0jZ7dS/DXyyUyjhB4b2+GeV 7TPkwTMaEARrsWoBAGwO7/oSAMNlXm8o8NVugBpXXcpPwcQrzMLdKtMTVHkunt5bxHdS Y8og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FDVLgLVz4KMV+sbdDSL/qKoRYpg0b/6EW+SPRin/ZOM=; b=WPoLp/icrgMcLyNKQv4/2LXaEJR3bvQASRrlWQRJkthNzcmWryMo9LReXUSxh+n1Je n0cFxoyck5JNeULLnJjBxZLp+MOxyUKktfem2dMvp7PujHjYhUHMuXbjpxbqQhpKEdAi R4hoSPseZkIZ/SfNv8+LceLknKtm61bRPaeljDYBiUzasf+1ZmjwkBKSX9Ry9nrxk2XZ mV3SIJUOAxDzxlWZoHuWXghENEMza+gickQhAfXvm40Wbe2oaziCEStbQrrXbLv8usSL Kekfr9y3t+Vn4RjICgBXHKcihNpuRjtImCAIfhDERWUDuMXXkk/sBg1C0Hs5MGpYH24g 96zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=n5R+L0qy; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (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 jo21si22108514ejb.82.2021.08.10.10.40.11; Tue, 10 Aug 2021 10:40:11 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=@linuxfoundation.org header.s=korg header.b=n5R+L0qy; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233968AbhHJRkR (ORCPT + 12 others); Tue, 10 Aug 2021 13:40:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:38896 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234729AbhHJRhx (ORCPT ); Tue, 10 Aug 2021 13:37:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4DB6C61186; Tue, 10 Aug 2021 17:36:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628616977; bh=TSSu0j/Y42OwHoJ9tyDjSyyjc/nHSELfyyCW/jHTfD0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n5R+L0qyuV9qmk3bVesa323DiyN3qCOYSLfbri6uh5ZYTb0XqTKzD9kZxInodzkaD 5c2BFr417KzpRQqvDwNjigihC/0ZUwvAIciTNC2KV6ZccqS2CY80K39SmE8WHupNQZ 1bTTfoRbMsiKsOmkjTD8FNZbjCAqfu5e/FymSsZs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Arnd Bergmann Subject: [PATCH 5.4 76/85] soc: ixp4xx/qmgr: fix invalid __iomem access Date: Tue, 10 Aug 2021 19:30:49 +0200 Message-Id: <20210810172950.803063610@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172948.192298392@linuxfoundation.org> References: <20210810172948.192298392@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann commit a8eee86317f11e97990d755d4615c1c0db203d08 upstream. Sparse reports a compile time warning when dereferencing an __iomem pointer: drivers/soc/ixp4xx/ixp4xx-qmgr.c:149:37: warning: dereference of noderef expression drivers/soc/ixp4xx/ixp4xx-qmgr.c:153:40: warning: dereference of noderef expression drivers/soc/ixp4xx/ixp4xx-qmgr.c:154:40: warning: dereference of noderef expression drivers/soc/ixp4xx/ixp4xx-qmgr.c:174:38: warning: dereference of noderef expression drivers/soc/ixp4xx/ixp4xx-qmgr.c:174:44: warning: dereference of noderef expression Use __raw_readl() here for consistency with the rest of the file. This should really get converted to some proper accessor, as the __raw functions are not meant to be used in drivers, but the driver has used these since the start, so for the moment, let's only fix the warning. Reported-by: kernel test robot Fixes: d4c9e9fc9751 ("IXP42x: Add QMgr support for IXP425 rev. A0 processors.") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- drivers/soc/ixp4xx/ixp4xx-qmgr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) --- a/drivers/soc/ixp4xx/ixp4xx-qmgr.c +++ b/drivers/soc/ixp4xx/ixp4xx-qmgr.c @@ -145,12 +145,12 @@ static irqreturn_t qmgr_irq1_a0(int irq, /* ACK - it may clear any bits so don't rely on it */ __raw_writel(0xFFFFFFFF, &qmgr_regs->irqstat[0]); - en_bitmap = qmgr_regs->irqen[0]; + en_bitmap = __raw_readl(&qmgr_regs->irqen[0]); while (en_bitmap) { i = __fls(en_bitmap); /* number of the last "low" queue */ en_bitmap &= ~BIT(i); - src = qmgr_regs->irqsrc[i >> 3]; - stat = qmgr_regs->stat1[i >> 3]; + src = __raw_readl(&qmgr_regs->irqsrc[i >> 3]); + stat = __raw_readl(&qmgr_regs->stat1[i >> 3]); if (src & 4) /* the IRQ condition is inverted */ stat = ~stat; if (stat & BIT(src & 3)) { @@ -170,7 +170,8 @@ static irqreturn_t qmgr_irq2_a0(int irq, /* ACK - it may clear any bits so don't rely on it */ __raw_writel(0xFFFFFFFF, &qmgr_regs->irqstat[1]); - req_bitmap = qmgr_regs->irqen[1] & qmgr_regs->statne_h; + req_bitmap = __raw_readl(&qmgr_regs->irqen[1]) & + __raw_readl(&qmgr_regs->statne_h); while (req_bitmap) { i = __fls(req_bitmap); /* number of the last "high" queue */ req_bitmap &= ~BIT(i);