Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4142883pxb; Mon, 27 Sep 2021 10:15:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiEe6Q0GI3qgCkxQMr/q4gyRYwoP3YWzhr81qp5+z4fOB9tVaTRtOKddgeK2oZs53CE29Z X-Received: by 2002:aa7:9e9a:0:b0:43e:d9b:cd93 with SMTP id p26-20020aa79e9a000000b0043e0d9bcd93mr791311pfq.50.1632762908090; Mon, 27 Sep 2021 10:15:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632762908; cv=none; d=google.com; s=arc-20160816; b=J7/YkQAZHMjzMZ6LpN78YVlbTmeqTHhf4k2rFDrFCZh3uez4atXN0azTsXCCBwn3Ty W4W+4i2AD68omxpyvKPzwqO3U6ncCu1biHmxhr1l7SBvkFk2vnUKaivcGRtF1c930vTa qfGZTPC+HswYz6O+/e/p27qrEvMMfMyBhIl3xiVAjVixqXLyQcAG0Z7Dq8P+tjZbqyBg fn5Ok/PY4iz7D4fdJu4AnL9Ju9D+HWa3MCnq/nTbkttfpSbTYtPvUJo/+et477JPMu8u P0DSZVRILNOw+dHkaU7wU1VGKJG63JxymBsBpny8NHo8+yq5285x9gQ0LY+9yOX3IFhU WKMw== 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=NXS7ccJsHYps5Rtup5W4oAn4Y2A4/Lh+eyO7wk/a/co=; b=kviLCtXmb3ZdUzcB4/r/B2e9jgVCOqPoYAq6/U+ZbeUN0pAsK870LC80ZlIenZwv9+ DnxbyqP0QPi4YCiRiTMRBfgdGincWAlHIida365PBCLRpVs7RwQJ+boyG9hDbkYL5PKG iDA/5zCjozZ3p3ovcqlRzWqijXOvw5NV0H5rT2gy7JBLorpwX0Y/zHXteUZ3AMZjEGF4 4lzFTA5KQr0q/1KVU3Y3SldJM4LLtodNkrt5v2iEyTYUbtcQcwoyK5fZfAS9e4SvrlIE 6TxZ82mfu8IqMr/LlaHXmdYWijYeSV7X+OqWkUrrSV1sCMgQYZRqyb23W/fe+P3FxzYb Ssfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=G4O3OLNk; 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 cp18si10368116plb.448.2021.09.27.10.14.55; Mon, 27 Sep 2021 10:15:08 -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=G4O3OLNk; 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 S236928AbhI0RPk (ORCPT + 99 others); Mon, 27 Sep 2021 13:15:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:56176 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236914AbhI0RNX (ORCPT ); Mon, 27 Sep 2021 13:13:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9E20961207; Mon, 27 Sep 2021 17:09:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632762556; bh=2GYkAt9O173YpfmLkfPRMwMe6/y4lGTtCkxDYWyHzvg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G4O3OLNkpyJYG2uISz5ioGb2oDzGe2J2IDhxjk/jEleeHqLmGW6SMg0Fd3IZtADyu y6hzrionh5jr9U61yEhHjj2ujHC9MpqnyPg06y3lZz2pFeCiCTJKx0uWN4uf/lfa4s PeKdJsj7fHakUnX7bM3EDL3bU2MnIxgNf10GyYLw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Dave Jiang , Borislav Petkov , Ben Widawsky , Dan Williams , Sasha Levin Subject: [PATCH 5.10 069/103] x86/asm: Add a missing __iomem annotation in enqcmds() Date: Mon, 27 Sep 2021 19:02:41 +0200 Message-Id: <20210927170228.160144092@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210927170225.702078779@linuxfoundation.org> References: <20210927170225.702078779@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 5c99720b28381bb400d4f546734c34ddaf608761 ] Add a missing __iomem annotation to address a sparse warning. The caller is expected to pass an __iomem annotated pointer to this function. The current usages send a 64-bytes command descriptor to an MMIO location (portal) on a device for consumption. Also, from the comment in movdir64b(), which also applies to enqcmds(), @__dst must be supplied as an lvalue because this tells the compiler what the object is (its size) the instruction accesses. I.e., not the pointers but what they point to, thus the deref'ing '*'." The actual sparse warning is: drivers/dma/idxd/submit.c: note: in included file (through arch/x86/include/asm/processor.h, \ arch/x86/include/asm/timex.h, include/linux/timex.h, include/linux/time32.h, \ include/linux/time.h, include/linux/stat.h, ...): ./arch/x86/include/asm/special_insns.h:289:41: warning: incorrect type in initializer (different address spaces) ./arch/x86/include/asm/special_insns.h:289:41: expected struct *__dst ./arch/x86/include/asm/special_insns.h:289:41: got void [noderef] __iomem *dst [ bp: Massage commit message. ] Fixes: 7f5933f81bd8 ("x86/asm: Add an enqcmds() wrapper for the ENQCMDS instruction") Reported-by: kernel test robot Signed-off-by: Dave Jiang Signed-off-by: Borislav Petkov Reviewed-by: Ben Widawsky Reviewed-by: Dan Williams Link: https://lkml.kernel.org/r/161003789741.4062451.14362269365703761223.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Sasha Levin --- arch/x86/include/asm/special_insns.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/special_insns.h b/arch/x86/include/asm/special_insns.h index cc177b4431ae..0cf19684dd20 100644 --- a/arch/x86/include/asm/special_insns.h +++ b/arch/x86/include/asm/special_insns.h @@ -286,7 +286,7 @@ static inline void movdir64b(void *dst, const void *src) static inline int enqcmds(void __iomem *dst, const void *src) { const struct { char _[64]; } *__src = src; - struct { char _[64]; } *__dst = dst; + struct { char _[64]; } __iomem *__dst = dst; int zf; /* -- 2.33.0