From patchwork Tue Feb 20 05:45:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Armin Wolf X-Patchwork-Id: 203423 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp208990dyc; Mon, 19 Feb 2024 21:45:44 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV/unWfRoYmkdURsND1OB3sA2xX2O6K/7m05rNmMSOU/eEMQUO7EABgz+w8Cu9cf41Zq4psUmp8q/GcyBraVQph2shGPw== X-Google-Smtp-Source: AGHT+IFvoHDYX3/GESk7Drw9EARdwlcAs90RbxJpdZ40V3uCsjtm64X7LXlzulwMpk9nV+/Vpwo/ X-Received: by 2002:a17:90a:8304:b0:298:a422:937d with SMTP id h4-20020a17090a830400b00298a422937dmr17502049pjn.24.1708407944572; Mon, 19 Feb 2024 21:45:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708407944; cv=pass; d=google.com; s=arc-20160816; b=t9bXaCrhytrtHESqrjDj4LA3g0QojDV1peOIJMevCnu9TS0Cun7fm8/im55J6iNvfw V7EdfQxORoZ7nKxLo/PCln/2WRLH+NaPzHfrHX/ZJaz7Ym1W5tSFWd9NUZk+VmKNiXi4 kXKLVELYS/pHd4cdGMJybKGzvVtHqxy7EPjtxJN6x0H1PfFLLjOARM9tc+XSsWkKb/dL T8aSgPA8w+Tb/fGrIcARWkGp80ngPAbhMgX134kkcWMESqJsEqrtgYSM7eb1cnhl6xCD B4DLnPO21n/Hrx1pTtFqK2zu8flZ25IzA4AHYaDBH2SUdYih9B3wwig6VL/4vuhrjza/ Y7SQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:cc:to:from:dkim-signature; bh=C7IobNk7Jd7a0va7/PO6O+eGY+CDzhpYKADAc2SEFm0=; fh=xt+np4dF0xGbpP4oQizzbfrKzEKFlIEn9yOJU2r58TM=; b=aqWgD9tZjO98TGSUmgA8bsU+AkZmC0wXYd3WGG4qUXfJeOEd8193DkR37bUbSmIxNh jmcR0RJArup4/s7+Au0avaWK5kcOAU8Pxf1PmOgImR/a5YfjeG2Gfm9HjREKu9X8CljJ zRiUvyG8KoEkNqm/8ebIw58NAqGrTeztW33Ab2Ci1+xwTQEwCNIJGFjDA/GYW2QO9MDI ZWNbM5/cwE+jmnUnDLBQI8X3J6YXiSXbZSl4DAeQkGJ6lpr8eYzPAMuyI1B4XNZCjMPu HRnhaUCgcvdHtTw454v0mBrZ01fA5lPiInhSIKcrwaTTblghAfYEWBXiK0yt7nrtFQ1X zOfA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b="aLitBPO/"; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-72357-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72357-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id s2-20020a17090a698200b00298db280de8si5690537pjj.29.2024.02.19.21.45.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 21:45:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-72357-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b="aLitBPO/"; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-72357-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72357-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 6532F283771 for ; Tue, 20 Feb 2024 05:45:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D9A1757872; Tue, 20 Feb 2024 05:45:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b="aLitBPO/" Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (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 4A879482D1; Tue, 20 Feb 2024 05:45:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708407932; cv=none; b=EFEJrTWBja/jcHayO8TO22IiPipTJPdkeaas/8FU82XwjEJ8m+sNalgQpp0iC5Z+ReSw1WL8buNbhY4xtip/yE1SDvIo6S8XDTAqayChFnBDOr7kOP3U+HytaoVmqzL1mgptvxwMOA/YOGzlJAD+wc8VqycmBNEhg5Q4W7UgXXg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708407932; c=relaxed/simple; bh=wMCc8J1PCY8KB0C8TU2S2VGitU5uhYxb7pS5TWKpv/4=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=WrJPQK97MRcTy7si0GL3euoPhM6IagOueej1cEolk+d9R9CkESvwVqGh7GPNtZwH3YGfv8IDIYTNGLv6G6H0D2I+dSKZVzbjDCR8wfhCi5nv9xWU8mFgSrSW4o6bxGNOT3GMS1IhjlSFoMwz9rLMj62Och2BsKyQqIFATKh0h7c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de; spf=pass smtp.mailfrom=gmx.de; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b=aLitBPO/; arc=none smtp.client-ip=212.227.17.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1708407918; x=1709012718; i=w_armin@gmx.de; bh=wMCc8J1PCY8KB0C8TU2S2VGitU5uhYxb7pS5TWKpv/4=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=aLitBPO/PNEumsiFTO5LEBWzlUKDQCkasQdR5ZDmIVTh5+SAzGljSZSIhp8HaAAy /S0+l2BeiOpPSg271uN0IR8lTSgalXntcxvjTuZl9p+EQtcPzs7u8itXLB4+59drz EY7ccLY319/767ZqQZpyVGMSAqm8PWIzbBvauVjYWaFSIO8LcigRy6kpdCv1wmpZu 6A4xZVmYzOAlbCNVU5CT+sCHTg6nkFAKp/X27sM2QnLuEh9oa4u6HKxqT/ymyHVOt 23jvgAiAxi2PuLZPViBM8fwOvl1NPaop6Xr5hSiVEZpKb8I0RdYzyG6VEKS7VVgmd 9p/h/4Q3crejPt+iTw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from mx-amd-b650.users.agdsn.de ([141.30.226.129]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M9Wyy-1rWmdN3pp6-005cp5; Tue, 20 Feb 2024 06:45:18 +0100 From: Armin Wolf To: Shyam-sundar.S-k@amd.com, mika.westerberg@linux.intel.com Cc: hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] platform/x86/amd/pmf: Add missing __iomem attribute to policy_base Date: Tue, 20 Feb 2024 06:45:11 +0100 Message-Id: <20240220054513.2832-1-W_Armin@gmx.de> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:Ozzk3tnKBJ32+TPnyj6okQniSEs5v+d+xylq2BPWyiH69B9isX1 ihj78sqcgowFCHaFxcvQZhSsKIHqKnVaKKpMWgjbB60ayJnv6x2pKMjJW3UcgPKK0Jl1dpn XEyk36rVvykCSjFPGGMBfjvatk/HWpKDsRrNXKDpidRYZFSXDLjAZnoCOThZMNyOR/WgO8c WlM8rxOUGSf/S6urDAl0g== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:uyGY52FymLM=;UIsQXfUcdN2wYpy9mdDmqgdB6/z pl5xRbfE7qMdUWUo91GRlRQIgqf1HlnQL+o6Um2hpvDWFo5AS+vPAArIaeWM21pOnNUJtHTKq XmCVwcYGWGDgj5d3aVyOLSvrzdZr2ifU5wP8i2hQ81SPtZrCsExEqQeTfAYGqB4WoW6BJfVfo 7XR3szR12LONsZcV068Fb90TFZ/YtkSgIe+Hgf80SeVc5eUiiHTcBafq0c6vf9vuYIHaMn0b3 3Emrpzwam+yus7T8HQK7pEHv6naNscqM23y72WH4JiQEzUHA51h5FXBfECf1Wx6+IaNu2rzVE yy0jtsru76GvpUaULsRHWE5q45qOb33LL3UPVZ4DNWBWL63C7uCkH95yuDqlMyzyIo1dViqe4 YQf4brQV7X+IlUZAfOqPr2J6njg98m1/EOpHRjjLSp4+D1HVuTSavWvyl7vgUKYZfPKPeWvIF o7fakstS/KAZyNgDTDjtuuqV9XyxHQ9Fnh8+JFrSrZqMujgju0ugdWq9q8wyLAaZaEgx3gXkO VUIXEUZvtEGaQaaMKVYRUcD0UDWXUIiaBlEtDUylhlneg6HQMmey/syc8nhtbTxA8ADz8+iob roHMSJKgZBGN443CFuhnqHKxHW6Igub+E50iFhI4MjfQSkifITQy+yVPz9ATqyp2R8UfDsAUO 6lCINWE0bLDPhruqCNNy6ZedbReFjfkPPv0V8T6nsK+D5pTmZ/T+wPLHLJaJ4Q/98VB4vA3ae YsQiYvP5auEeZOQXlu0L/3E3JRHvSLuLMVc+s6R63wjf2vlI+z8QNnhHUgS0msFUmUnr0Mi+T uhegh0HkId82pLSb005B862OWh/ZBeFNVmAFFDzsUisJE= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791395569016607356 X-GMAIL-MSGID: 1791395569016607356 The value of policy_base is the return value of a devm_ioremap call, which returns a __iomem pointer instead of an regular pointer. Add the missing __iomem attribute. Compile-tested only. Signed-off-by: Armin Wolf --- drivers/platform/x86/amd/pmf/pmf.h | 2 +- drivers/platform/x86/amd/pmf/tee-if.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.39.2 diff --git a/drivers/platform/x86/amd/pmf/pmf.h b/drivers/platform/x86/amd/pmf/pmf.h index 16999c5b334f..bcf777a5659a 100644 --- a/drivers/platform/x86/amd/pmf/pmf.h +++ b/drivers/platform/x86/amd/pmf/pmf.h @@ -229,7 +229,7 @@ struct amd_pmf_dev { struct delayed_work pb_work; struct pmf_action_table *prev_data; u64 policy_addr; - void *policy_base; + void __iomem *policy_base; bool smart_pc_enabled; }; diff --git a/drivers/platform/x86/amd/pmf/tee-if.c b/drivers/platform/x86/amd/pmf/tee-if.c index f8c0177afb0d..16973bebf55f 100644 --- a/drivers/platform/x86/amd/pmf/tee-if.c +++ b/drivers/platform/x86/amd/pmf/tee-if.c @@ -346,7 +346,7 @@ static int amd_pmf_get_bios_buffer(struct amd_pmf_dev *dev) if (!dev->policy_base) return -ENOMEM; - memcpy(dev->policy_buf, dev->policy_base, dev->policy_sz); + memcpy_fromio(dev->policy_buf, dev->policy_base, dev->policy_sz); amd_pmf_hex_dump_pb(dev); if (pb_side_load)