From: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
To: Armin Wolf <W_Armin@gmx.de>,
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: Re: [PATCH v2 1/3] platform/x86/amd/pmf: Add missing __iomem attribute to policy_base
Date: Sun, 25 Feb 2024 22:41:33 -0800 [thread overview]
Message-ID: <d152f185-d34f-4a06-be85-9bffd10175fc@linux.intel.com> (raw)
In-Reply-To: <20240223163901.13504-1-W_Armin@gmx.de>
On 2/23/24 8:38 AM, Armin Wolf wrote:
> 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 <W_Armin@gmx.de>
> ---
Looks good to me.
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
> drivers/platform/x86/amd/pmf/pmf.h | 2 +-
> drivers/platform/x86/amd/pmf/tee-if.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> 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)
> --
> 2.39.2
>
--
Sathyanarayanan Kuppuswamy
Linux Kernel Developer
prev parent reply other threads:[~2024-02-26 6:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-23 16:38 [PATCH v2 1/3] platform/x86/amd/pmf: Add missing __iomem attribute to policy_base Armin Wolf
2024-02-23 16:39 ` [PATCH v2 2/3] platform/x86/amd/pmf: Do not use readl() for policy buffer access Armin Wolf
2024-02-27 12:59 ` Ilpo Järvinen
2024-02-27 13:41 ` Armin Wolf
2024-02-23 16:39 ` [PATCH v2 3/3] platform/x86: intel_scu_ipcutil: Make scu static Armin Wolf
2024-02-26 6:39 ` Mika Westerberg
2024-02-27 13:06 ` Ilpo Järvinen
2024-02-26 6:41 ` Kuppuswamy Sathyanarayanan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d152f185-d34f-4a06-be85-9bffd10175fc@linux.intel.com \
--to=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=W_Armin@gmx.de \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox