From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Cc: hdegoede@redhat.com, markgross@kernel.org,
Sanket.Goswami@amd.com, mario.limonciello@amd.com,
platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH v3 1/4] platform/x86/amd: pmc: Pass true/false to bool argument
Date: Tue, 23 May 2023 11:10:53 +0300 (EEST) [thread overview]
Message-ID: <203c7f14-912-e5e0-f459-3c1f877fbe61@linux.intel.com> (raw)
In-Reply-To: <20230516091308.3905113-2-Shyam-sundar.S-k@amd.com>
[-- Attachment #1: Type: text/plain, Size: 4559 bytes --]
On Tue, 16 May 2023, Shyam Sundar S K wrote:
> Pass true/false to the bool argument of the amd_pmc_send_cmd() function,
> instead of 1/0 to match the function signature.
>
> Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com>
> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com>
> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
--
i.
> ---
> drivers/platform/x86/amd/pmc.c | 26 +++++++++++++-------------
> 1 file changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/platform/x86/amd/pmc.c b/drivers/platform/x86/amd/pmc.c
> index 427905714f79..f28c295b47dd 100644
> --- a/drivers/platform/x86/amd/pmc.c
> +++ b/drivers/platform/x86/amd/pmc.c
> @@ -261,7 +261,7 @@ static int amd_pmc_stb_debugfs_open_v2(struct inode *inode, struct file *filp)
> dev->msg_port = 1;
>
> /* Get the num_samples to calculate the last push location */
> - ret = amd_pmc_send_cmd(dev, S2D_NUM_SAMPLES, &num_samples, STB_SPILL_TO_DRAM, 1);
> + ret = amd_pmc_send_cmd(dev, S2D_NUM_SAMPLES, &num_samples, STB_SPILL_TO_DRAM, true);
> /* Clear msg_port for other SMU operation */
> dev->msg_port = 0;
> if (ret) {
> @@ -317,15 +317,15 @@ static int amd_pmc_setup_smu_logging(struct amd_pmc_dev *dev)
>
> /* Get Active devices list from SMU */
> if (!dev->active_ips)
> - amd_pmc_send_cmd(dev, 0, &dev->active_ips, SMU_MSG_GET_SUP_CONSTRAINTS, 1);
> + amd_pmc_send_cmd(dev, 0, &dev->active_ips, SMU_MSG_GET_SUP_CONSTRAINTS, true);
>
> /* Get dram address */
> if (!dev->smu_virt_addr) {
> u32 phys_addr_low, phys_addr_hi;
> u64 smu_phys_addr;
>
> - amd_pmc_send_cmd(dev, 0, &phys_addr_low, SMU_MSG_LOG_GETDRAM_ADDR_LO, 1);
> - amd_pmc_send_cmd(dev, 0, &phys_addr_hi, SMU_MSG_LOG_GETDRAM_ADDR_HI, 1);
> + amd_pmc_send_cmd(dev, 0, &phys_addr_low, SMU_MSG_LOG_GETDRAM_ADDR_LO, true);
> + amd_pmc_send_cmd(dev, 0, &phys_addr_hi, SMU_MSG_LOG_GETDRAM_ADDR_HI, true);
> smu_phys_addr = ((u64)phys_addr_hi << 32 | phys_addr_low);
>
> dev->smu_virt_addr = devm_ioremap(dev->dev, smu_phys_addr,
> @@ -335,8 +335,8 @@ static int amd_pmc_setup_smu_logging(struct amd_pmc_dev *dev)
> }
>
> /* Start the logging */
> - amd_pmc_send_cmd(dev, 0, NULL, SMU_MSG_LOG_RESET, 0);
> - amd_pmc_send_cmd(dev, 0, NULL, SMU_MSG_LOG_START, 0);
> + amd_pmc_send_cmd(dev, 0, NULL, SMU_MSG_LOG_RESET, false);
> + amd_pmc_send_cmd(dev, 0, NULL, SMU_MSG_LOG_START, false);
>
> return 0;
> }
> @@ -377,7 +377,7 @@ static int amd_pmc_get_smu_version(struct amd_pmc_dev *dev)
> if (dev->cpu_id == AMD_CPU_ID_PCO)
> return -ENODEV;
>
> - rc = amd_pmc_send_cmd(dev, 0, &val, SMU_MSG_GETSMUVERSION, 1);
> + rc = amd_pmc_send_cmd(dev, 0, &val, SMU_MSG_GETSMUVERSION, true);
> if (rc)
> return rc;
>
> @@ -794,7 +794,7 @@ static void amd_pmc_s2idle_prepare(void)
> }
>
> msg = amd_pmc_get_os_hint(pdev);
> - rc = amd_pmc_send_cmd(pdev, arg, NULL, msg, 0);
> + rc = amd_pmc_send_cmd(pdev, arg, NULL, msg, false);
> if (rc) {
> dev_err(pdev->dev, "suspend failed: %d\n", rc);
> return;
> @@ -829,7 +829,7 @@ static int amd_pmc_dump_data(struct amd_pmc_dev *pdev)
> if (pdev->cpu_id == AMD_CPU_ID_PCO)
> return -ENODEV;
>
> - return amd_pmc_send_cmd(pdev, 0, NULL, SMU_MSG_LOG_DUMP_DATA, 0);
> + return amd_pmc_send_cmd(pdev, 0, NULL, SMU_MSG_LOG_DUMP_DATA, false);
> }
>
> static void amd_pmc_s2idle_restore(void)
> @@ -839,7 +839,7 @@ static void amd_pmc_s2idle_restore(void)
> u8 msg;
>
> msg = amd_pmc_get_os_hint(pdev);
> - rc = amd_pmc_send_cmd(pdev, 0, NULL, msg, 0);
> + rc = amd_pmc_send_cmd(pdev, 0, NULL, msg, false);
> if (rc)
> dev_err(pdev->dev, "resume failed: %d\n", rc);
>
> @@ -899,13 +899,13 @@ static int amd_pmc_s2d_init(struct amd_pmc_dev *dev)
> /* Spill to DRAM feature uses separate SMU message port */
> dev->msg_port = 1;
>
> - amd_pmc_send_cmd(dev, S2D_TELEMETRY_SIZE, &size, STB_SPILL_TO_DRAM, 1);
> + amd_pmc_send_cmd(dev, S2D_TELEMETRY_SIZE, &size, STB_SPILL_TO_DRAM, true);
> if (size != S2D_TELEMETRY_BYTES_MAX)
> return -EIO;
>
> /* Get STB DRAM address */
> - amd_pmc_send_cmd(dev, S2D_PHYS_ADDR_LOW, &phys_addr_low, STB_SPILL_TO_DRAM, 1);
> - amd_pmc_send_cmd(dev, S2D_PHYS_ADDR_HIGH, &phys_addr_hi, STB_SPILL_TO_DRAM, 1);
> + amd_pmc_send_cmd(dev, S2D_PHYS_ADDR_LOW, &phys_addr_low, STB_SPILL_TO_DRAM, true);
> + amd_pmc_send_cmd(dev, S2D_PHYS_ADDR_HIGH, &phys_addr_hi, STB_SPILL_TO_DRAM, true);
>
> stb_phys_addr = ((u64)phys_addr_hi << 32 | phys_addr_low);
next prev parent reply other threads:[~2023-05-23 8:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-16 9:13 [PATCH v3 0/4] Updates to AMD PMC driver Shyam Sundar S K
2023-05-16 9:13 ` [PATCH v3 1/4] platform/x86/amd: pmc: Pass true/false to bool argument Shyam Sundar S K
2023-05-23 8:10 ` Ilpo Järvinen [this message]
2023-05-16 9:13 ` [PATCH v3 2/4] platform/x86/amd: pmc: Get STB DRAM size from PMFW Shyam Sundar S K
2023-05-23 8:15 ` Ilpo Järvinen
2023-05-16 9:13 ` [PATCH v3 3/4] platform/x86/amd: pmc: Add helper function to check the cpu id Shyam Sundar S K
2023-05-23 8:26 ` Ilpo Järvinen
2023-05-25 9:46 ` Shyam Sundar S K
2023-05-25 9:50 ` Hans de Goede
2023-05-25 9:59 ` Ilpo Järvinen
2023-05-25 10:21 ` Shyam Sundar S K
2023-05-25 10:44 ` Ilpo Järvinen
2023-05-25 11:25 ` Shyam Sundar S K
2023-05-25 11:58 ` Ilpo Järvinen
2023-05-25 12:19 ` Shyam Sundar S K
2023-05-16 9:13 ` [PATCH v3 4/4] platform/x86/amd: pmc: Update metrics table info for Pink Sardine Shyam Sundar S K
2023-05-23 8:31 ` Ilpo Järvinen
2023-05-23 10:36 ` [PATCH v3 0/4] Updates to AMD PMC driver Hans de Goede
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=203c7f14-912-e5e0-f459-3c1f877fbe61@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=Sanket.Goswami@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=hdegoede@redhat.com \
--cc=mario.limonciello@amd.com \
--cc=markgross@kernel.org \
--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