mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@amd.com>
To: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: tanmay.shah@amd.com, andersson@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org
Subject: Re: [PATCH] remoteproc: xlnx: refactor start & stop ops
Date: Wed, 24 Jun 2026 16:21:15 +0200	[thread overview]
Message-ID: <3260c1a6-6de7-4053-b480-a8244d33ae5c@amd.com> (raw)
In-Reply-To: <CANLsYkyChucfAY1wKvxAt9-tCX=2B5L9=4bbBA6XvnpBnLZD5Q@mail.gmail.com>



On 6/24/26 16:02, Mathieu Poirier wrote:
> On Wed, 24 Jun 2026 at 00:12, Michal Simek <michal.simek@amd.com> wrote:
>>
>>
>>
>> On 6/23/26 00:29, Shah, Tanmay wrote:
>>> Hello,
>>>
>>>
>>> On 6/22/2026 7:25 AM, Michal Simek wrote:
>>>>
>>>>
>>>> On 6/19/26 18:38, Tanmay Shah wrote:
>>>>> Current _start and _stop ops are implemented using various APIs from the
>>>>> platform management firmware driver. Instead provide respective RPU
>>>>> start and stop API in the firmware driver and move the logic to interact
>>>>> with the PM firmware in the firmware driver. The remoteproc driver
>>>>> doesn't
>>>>> need to know actual logic, but only the final result i.e. RPU start/stop
>>>>> was success or not. This refactor keeps the remoteproc driver simple and
>>>>> moves firmware interaction logic to the firmware driver.
>>>>>
>>>>> Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
>>>>> ---
>>>>>     drivers/firmware/xilinx/zynqmp.c        | 93 +++++++++++++++++++++++++
>>>>>     drivers/remoteproc/xlnx_r5_remoteproc.c | 68 ++----------------
>>>>>     include/linux/firmware/xlnx-zynqmp.h    | 12 ++++
>>>>>     3 files changed, 110 insertions(+), 63 deletions(-)
>>>>>
>>>>> diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/
>>>>> xilinx/zynqmp.c
>>>>> index af838b2dc327..f9a3a95b0638 100644
>>>>> --- a/drivers/firmware/xilinx/zynqmp.c
>>>>> +++ b/drivers/firmware/xilinx/zynqmp.c
>>>>> @@ -1513,6 +1513,99 @@ int zynqmp_pm_request_wake(const u32 node,
>>>>>     }
>>>>>     EXPORT_SYMBOL_GPL(zynqmp_pm_request_wake);
>>>>>     +/**
>>>>> + * zynqmp_pm_start_rpu - Boot Real-time Processing Unit (Cortex-R) on
>>>>> SoC
>>>>> + *
>>>>> + * @node: power-domains id of the core
>>>>> + * @bootaddr: Boot address of elf
>>>>> + *
>>>>> + * Return: status, either success or error+reason
>>>>> + */
>>>>> +int zynqmp_pm_start_rpu(const u32 node, const u64 bootaddr)
>>>>> +{
>>>>> +    enum rpu_boot_mem bootmem;
>>>>> +    int ret;
>>>>> +
>>>>> +    /*
>>>>> +     * The exception vector pointers (EVP) refer to the base-address of
>>>>> +     * exception vectors (for reset, IRQ, FIQ, etc). The reset-vector
>>>>> +     * starts at the base-address and subsequent vectors are on 4-byte
>>>>> +     * boundaries.
>>>>> +     *
>>>>> +     * Exception vectors can start either from 0x0000_0000 (LOVEC) or
>>>>> +     * from 0xFFFF_0000 (HIVEC) which is mapped in the OCM (On-Chip
>>>>> Memory)
>>>>
>>>> here
>>>>
>>>>> +     *
>>>>> +     * Usually firmware will put Exception vectors at LOVEC.
>>>>> +     *
>>>>> +     * It is not recommend that you change the exception vector.
>>>>> +     * Changing the EVP to HIVEC will result in increased interrupt
>>>>> latency
>>>>> +     * and jitter. Also, if the OCM is secured and the Cortex-R5F
>>>>> processor
>>>>> +     * is non-secured, then the Cortex-R5F processor cannot access the
>>>>> +     * HIVEC exception vectors in the OCM.
>>>>> +     */
>>>>> +    bootmem = (bootaddr >= 0xFFFC0000) ?
>>>>
>>>> and here you have different values without any explanation why.
>>>>
>>>
>>> The value in the comment is correct, but the check is done for all of
>>> OCM address range. This is just refactoring of the interfaces and not
>>> the actual logic. There is a separate patch which actually refactors the
>>> logic, I will send it later. I would like to keep this as it is because
>>> this was originally there, and the intent of the commit is not to modify it.
>>
>> ok.
>>
>> Acked-by: Michal Simek <michal.simek@amd.com>
>>
> 
> Michal - do you prefer that I pick this patch on the remoteproc side?

yes please.

Thanks,
Michal

  reply	other threads:[~2026-06-24 14:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-19 16:38 Tanmay Shah
2026-06-22 12:25 ` Michal Simek
2026-06-22 22:29   ` Shah, Tanmay
2026-06-24  6:12     ` Michal Simek
2026-06-24 14:02       ` Mathieu Poirier
2026-06-24 14:21         ` Michal Simek [this message]
2026-06-23 17:21 ` Mathieu Poirier
2026-06-29 15:44 ` Mathieu Poirier

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=3260c1a6-6de7-4053-b480-a8244d33ae5c@amd.com \
    --to=michal.simek@amd.com \
    --cc=andersson@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=tanmay.shah@amd.com \
    /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

all inboxes | Powered by JetHome®