From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 81249129A63; Tue, 23 Jan 2024 00:12:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968743; cv=none; b=cKpZ4+u+CAi1QsFAxxOVywMsObIIlz1OQPXXvpajdYCEIRCl2jg+CJUq66KawjUU11KaRrmc9ApMLv2tqDuKhqtbFIg/DdX4PhuN+u3AgnQH83XbLYsVU86/iYS9wC/Qkwt5QTaGBmhf1/MXZIfXYyxMYT/663Y8CSD5+Kmd7sE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705968743; c=relaxed/simple; bh=zuWusAywAn4mZkGWfHqmqzORPrDos4Rfx2wZ7+rrONw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Y9A9ZuKCwpbRLqhBN+Z/V9H/0y8ggpHOfa9KnCDdtTgz4EwJWzRRLONqXViiD0KKrVDvmUsN5inc4JuLPYlssWJKXkOU4gcjQ6HdkEFFCUxXf+qyQb26grWOvvNsnUVrirfdefjuIDzWZcwkb5NNjvO/uN6W8r9yKFz/VhSYBug= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=W0kxOGmt; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="W0kxOGmt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36741C433C7; Tue, 23 Jan 2024 00:12:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1705968743; bh=zuWusAywAn4mZkGWfHqmqzORPrDos4Rfx2wZ7+rrONw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W0kxOGmtxiwdv+lseqmpiU5lS3AfyPMOFtGa3ep1qd2ryw1pOidVskykvmAr0deQg O9xn6SZhupc/SbBmdDEzFilmCOHM6n6iv0PmAOpArlHlcWrPK1uZl2sYlEYkDV8FI5 FvQ7GApzSejadJRNCc/xliLGPVUZE/eQUxyztPXg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Vineeth Vijayan , Peter Oberparleiter , Alexander Gordeev , Sasha Levin Subject: [PATCH 5.4 026/194] s390/scm: fix virtual vs physical address confusion Date: Mon, 22 Jan 2024 15:55:56 -0800 Message-ID: <20240122235720.336526282@linuxfoundation.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240122235719.206965081@linuxfoundation.org> References: <20240122235719.206965081@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Vineeth Vijayan [ Upstream commit b1a6a1a77f0666a5a6dc0893ab6ec8fcae46f24c ] Fix virtual vs physical address confusion (which currently are the same). Signed-off-by: Vineeth Vijayan Reviewed-by: Peter Oberparleiter Acked-by: Alexander Gordeev Signed-off-by: Alexander Gordeev Signed-off-by: Sasha Levin --- drivers/s390/block/scm_blk.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/s390/block/scm_blk.c b/drivers/s390/block/scm_blk.c index e01889394c84..d3133023a557 100644 --- a/drivers/s390/block/scm_blk.c +++ b/drivers/s390/block/scm_blk.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include "scm_blk.h" @@ -131,7 +132,7 @@ static void scm_request_done(struct scm_request *scmrq) for (i = 0; i < nr_requests_per_io && scmrq->request[i]; i++) { msb = &scmrq->aob->msb[i]; - aidaw = msb->data_addr; + aidaw = (u64)phys_to_virt(msb->data_addr); if ((msb->flags & MSB_FLAG_IDA) && aidaw && IS_ALIGNED(aidaw, PAGE_SIZE)) @@ -196,12 +197,12 @@ static int scm_request_prepare(struct scm_request *scmrq) msb->scm_addr = scmdev->address + ((u64) blk_rq_pos(req) << 9); msb->oc = (rq_data_dir(req) == READ) ? MSB_OC_READ : MSB_OC_WRITE; msb->flags |= MSB_FLAG_IDA; - msb->data_addr = (u64) aidaw; + msb->data_addr = (u64)virt_to_phys(aidaw); rq_for_each_segment(bv, req, iter) { WARN_ON(bv.bv_offset); msb->blk_count += bv.bv_len >> 12; - aidaw->data_addr = (u64) page_address(bv.bv_page); + aidaw->data_addr = virt_to_phys(page_address(bv.bv_page)); aidaw++; } -- 2.43.0