Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2562683pxb; Mon, 19 Apr 2021 08:29:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyopxWSDdQdpleIn+zsbNd3b9Wf8akCAIsvA5pkn7Cs63hqGTvolc9RiwHIgti213iLfqxm X-Received: by 2002:a17:906:b0cd:: with SMTP id bk13mr17636142ejb.184.1618846163921; Mon, 19 Apr 2021 08:29:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618846163; cv=none; d=google.com; s=arc-20160816; b=SavMdHSb9ho8eKB62F2QJ/iKbGEP/ZYmI+ae3hzg3XyprdAAGraKSKN8PTVVtRZ+fx 1RO5IXXrLx3K5ZnFH0U6xuH5umtClGfncLBPI7jdYXom/2wWdmcdEmBp9vGlmWUugmR9 CIHDsw56fM7LzOtwRUtWAx8lIRGSqqujB3AFS7GBcS7qRtQOrg7J+0MkOoDS9Q94j0uN ACqDpWVlMJO++nl6C+IPlDR7Gf96RiIdBir77TfjCUQ/E8uPVKBh9ZhI8sZ61Q1PzhOJ cTTyM1u+dkja328PZq/jjWtuNTXMQJBNSCj8hFyTDd6TMt1GkIJ5o4lgnt9hHsToQFMF mkmg== 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=nsUQuvU7GqyX3WSZW2HC9JP9pLZnxDWuszJ+shI0oCQ=; b=uaDndDtb6ujk2Fp34YA/ZzSqF9CfezbDmH4iUUC0ObmEFWqK8edJGugtGVKPU2/d/N DDoYv8sMJeKlOsoJ56NwoeF1Wyxc0+QzJxCLkAZ5jFwc/cBBVS9Z1QCoUtcSkfW8wQ4K uu4fL/2oBoNTd6IMfuDAMc3fQoFaXFpzkCkik1rT0B54FZobg1FdM/sL2JrVosKDcNhh 1QfMbRbfbDjTZhJhTwrD82S8K0LR7NKrX+icI9vFatgFa0vpIYzRv9uYIw+s5Pt9ZdVs TWndL1tA2w7rrWS1RU02YyKXFQETgEjI8T5fI0znhBzAOP8naBhTPT1QMiCzqMhMGCQK ZDTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wUycOSak; 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=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 z19si12321176eji.473.2021.04.19.08.29.00; Mon, 19 Apr 2021 08:29:23 -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=@linuxfoundation.org header.s=korg header.b=wUycOSak; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241664AbhDSNYM (ORCPT + 99 others); Mon, 19 Apr 2021 09:24:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:54556 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240814AbhDSNSf (ORCPT ); Mon, 19 Apr 2021 09:18:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 586A5613E5; Mon, 19 Apr 2021 13:14:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618838094; bh=KWkQMW4GhoAY8m6Sancra6BNw9XVVljwJ6UTfKg/kws=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wUycOSakl2p+pMdFSnofzJ/wJIrbIApFmu8BmIXtCfpozCZLzbNN6ByFaLhZY+r8+ /IuZdAecgcifhpSjGxgQz9SNzofk/7LPCcQYLMzntBMu1jcS/al8x7vEb1h+jKmENB Y7fG0wELjIYLzBVylFaYJlfq4vw3esOZMVujyxEY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sanjay Kumar , Dave Jiang , Vinod Koul , Sasha Levin Subject: [PATCH 5.10 005/103] dmaengine: idxd: Fix clobbering of SWERR overflow bit on writeback Date: Mon, 19 Apr 2021 15:05:16 +0200 Message-Id: <20210419130527.964489080@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419130527.791982064@linuxfoundation.org> References: <20210419130527.791982064@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dave Jiang [ Upstream commit ea941ac294d75d0ace50797aebf0056f6f8f7a7f ] Current code blindly writes over the SWERR and the OVERFLOW bits. Write back the bits actually read instead so the driver avoids clobbering the OVERFLOW bit that comes after the register is read. Fixes: bfe1d56091c1 ("dmaengine: idxd: Init and probe for Intel data accelerators") Reported-by: Sanjay Kumar Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/161352082229.3511254.1002151220537623503.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/idxd/irq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/dma/idxd/irq.c b/drivers/dma/idxd/irq.c index 552e2e270705..6bb1c1773aae 100644 --- a/drivers/dma/idxd/irq.c +++ b/drivers/dma/idxd/irq.c @@ -66,7 +66,9 @@ static int process_misc_interrupts(struct idxd_device *idxd, u32 cause) for (i = 0; i < 4; i++) idxd->sw_err.bits[i] = ioread64(idxd->reg_base + IDXD_SWERR_OFFSET + i * sizeof(u64)); - iowrite64(IDXD_SWERR_ACK, idxd->reg_base + IDXD_SWERR_OFFSET); + + iowrite64(idxd->sw_err.bits[0] & IDXD_SWERR_ACK, + idxd->reg_base + IDXD_SWERR_OFFSET); if (idxd->sw_err.valid && idxd->sw_err.wq_idx_valid) { int id = idxd->sw_err.wq_idx; -- 2.30.2