linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Eugen Hristev <eugen.hristev@linaro.org>,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, tglx@linutronix.de, andersson@kernel.org,
	pmladek@suse.com, rdunlap@infradead.org, corbet@lwn.net,
	david@redhat.com, mhocko@suse.com
Cc: tudor.ambarus@linaro.org, mukesh.ojha@oss.qualcomm.com,
	linux-arm-kernel@lists.infradead.org,
	linux-hardening@vger.kernel.org, jonechou@google.com,
	rostedt@goodmis.org, linux-doc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-remoteproc@vger.kernel.org,
	linux-arch@vger.kernel.org, tony.luck@intel.com, kees@kernel.org
Subject: Re: [PATCH 25/26] dt-bindings: reserved-memory: Add Google Kinfo Pixel reserved memory
Date: Thu, 20 Nov 2025 08:21:04 +0100	[thread overview]
Message-ID: <c503061b-00cc-4d04-8380-3a0fe0a2c788@kernel.org> (raw)
In-Reply-To: <060e7412-8f1f-4d31-af39-79213c560e85@linaro.org>

On 19/11/2025 17:19, Eugen Hristev wrote:
> 
> 
> On 11/19/25 18:02, Krzysztof Kozlowski wrote:
>> On 19/11/2025 16:44, Eugen Hristev wrote:
>>> Add documentation for Google Kinfo Pixel reserved memory area.
>>
>> Above and commit msg describe something completely else than binding. In
>> the binding you described kinfo Linux driver, above you suggest this is
>> some sort of reserved memory.
>>
>>>
>>> Signed-off-by: Eugen Hristev <eugen.hristev@linaro.org>
>>> ---
>>>  .../reserved-memory/google,kinfo.yaml         | 49 +++++++++++++++++++
>>>  MAINTAINERS                                   |  5 ++
>>>  2 files changed, 54 insertions(+)
>>>  create mode 100644 Documentation/devicetree/bindings/reserved-memory/google,kinfo.yaml
>>>
>>> diff --git a/Documentation/devicetree/bindings/reserved-memory/google,kinfo.yaml b/Documentation/devicetree/bindings/reserved-memory/google,kinfo.yaml
>>> new file mode 100644
>>> index 000000000000..12d0b2815c02
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/reserved-memory/google,kinfo.yaml
>>> @@ -0,0 +1,49 @@
>>> +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
>>> +%YAML 1.2
>>> +---
>>> +$id: http://devicetree.org/schemas/reserved-memory/google,kinfo.yaml#
>>
>> Filename based on the compatible.
>>
>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>> +
>>> +title: Google Pixel Kinfo reserved memory
>>> +
>>> +maintainers:
>>> +  - Eugen Hristev <eugen.hristev@linaro.org>
>>> +
>>> +description:
>>> +  This binding describes the Google Pixel Kinfo reserved memory, a region
>>
>> Don't use "This binding", but please describe here hardware.
>>
>>> +  of reserved-memory used to store data for firmware/bootloader on the Pixel
>>> +  platform. The data stored is debugging information on the running kernel.
>>> +
>>> +properties:
>>> +  compatible:
>>> +    items:
>>> +      - const: google,kinfo
>>> +
>>> +  memory-region:
>>> +    maxItems: 1
>>> +    description: Reference to the reserved-memory for the data
>>
>> This does not match description. Unfortunately it looks like you added a
>> node just to instantiate Linux driver and this is not allowed.
>>
>> If this was some special reserved memory region, then it would be part
>> of reserved memory bindings - see reserved-memory directory.
> 
> I sent this patch for reserved-memory directory, where all the
> reserved-memory bindings reside. Or maybe I do not understand your
> comment ?>

There is no ref to reserved memory here. Please look first how reserved
memory bindings are written,

>> Compatible suggests that it is purely Linux driver, so another hint.
> 
> This reserved memory area is used by both Linux and firmware. Linux
> stores some information into this reserved memory to be used by the
> firmware/bootloader in some specific scenarios (e.g. crash or recovery
> situations)
> As the firmware reserves this memory for this specific purpose, it is
> natural to inform Linux that the memory should not be used by another
> purpose, but by the purpose it was reserved for.

But you did not write bindings for it. You wrote bindings for Linux
device driver, I already explained that last time.

> Which would be the best way to have Linux understand where is this
> memory area so it could be handled?


> 
> 
>>
>> Looks like this is a SoC specific thing, so maybe this should be folded
>> in some of the soc drivers.
>>
> Not really soc specific. Any soc who implements this at firmware level
> can use it. The firmware can reserve some memory for this specific
> purpose and then pass it to Linux, so Linux can fill it up.
> It just happens that the Pixel phone has this implemented right now, but
> it is not constrained to Pixel only.
> 
> Instantiating this driver with a call like platform_device_register_data
> would make the driver unaware of where exactly the firmware looks for
> the data. This is right now passed through the DT node. Do you have a
> better suggestion on how to pass it ?

I do not see how this question is relevant here. I don't care how you
pass it to the driver, because we discuss bindings. You created bindings
for Linux driver and that's a no. If you wanted that, I suggests that it
could be instantiated by some other driver, but sure - we don't have to
go that way, that was just an idea how to solve the problem bindings
like this cannot be accepted.

Best regards,
Krzysztof

  reply	other threads:[~2025-11-20  7:21 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-19 15:44 [PATCH 00/26] Introduce meminspect Eugen Hristev
2025-11-19 15:44 ` [PATCH 01/26] kernel: " Eugen Hristev
2025-11-22  0:04   ` kernel test robot
2025-11-24  3:02   ` Bagas Sanjaya
2025-11-19 15:44 ` [PATCH 02/26] init/version: Annotate static information into meminspect Eugen Hristev
2025-11-19 15:44 ` [PATCH 03/26] mm/percpu: " Eugen Hristev
2025-11-21 17:13   ` kernel test robot
2025-11-21 19:13   ` kernel test robot
2025-11-19 15:44 ` [PATCH 04/26] cpu: " Eugen Hristev
2025-11-19 15:44 ` [PATCH 05/26] genirq/irqdesc: " Eugen Hristev
2025-11-19 15:44 ` [PATCH 06/26] timers: " Eugen Hristev
2025-11-19 15:44 ` [PATCH 07/26] kernel/fork: " Eugen Hristev
2025-11-19 15:44 ` [PATCH 08/26] mm/page_alloc: " Eugen Hristev
2025-11-19 15:44 ` [PATCH 09/26] mm/show_mem: " Eugen Hristev
2025-11-19 15:44 ` [PATCH 10/26] mm/swapfile: " Eugen Hristev
2025-11-19 15:44 ` [PATCH 11/26] kernel/vmcore_info: Register dynamic " Eugen Hristev
2025-11-19 15:44 ` [PATCH 12/26] kernel/configs: " Eugen Hristev
2025-11-21 22:16   ` kernel test robot
2025-11-19 15:44 ` [PATCH 13/26] mm/init-mm: Annotate static " Eugen Hristev
2025-11-19 15:44 ` [PATCH 14/26] panic: " Eugen Hristev
2025-11-19 15:44 ` [PATCH 15/26] kallsyms: " Eugen Hristev
2025-11-19 15:44 ` [PATCH 16/26] mm/mm_init: " Eugen Hristev
2025-11-19 15:44 ` [PATCH 17/26] sched/core: Annotate runqueues " Eugen Hristev
2025-11-19 15:44 ` [PATCH 18/26] mm/memblock: Add MEMBLOCK_INSPECT flag Eugen Hristev
2025-11-19 15:44 ` [PATCH 19/26] mm/numa: Register information into meminspect Eugen Hristev
2025-11-19 15:44 ` [PATCH 20/26] mm/sparse: " Eugen Hristev
2025-11-19 15:44 ` [PATCH 21/26] printk: " Eugen Hristev
2025-11-19 15:44 ` [PATCH 22/26] remoteproc: qcom: Extract minidump definitions into a header Eugen Hristev
2025-11-19 15:44 ` [PATCH 23/26] soc: qcom: Add minidump driver Eugen Hristev
2025-11-22  4:55   ` kernel test robot
2025-11-22  7:54   ` kernel test robot
2025-11-19 15:44 ` [PATCH 24/26] soc: qcom: smem: Add minidump device Eugen Hristev
2025-11-19 15:44 ` [PATCH 25/26] dt-bindings: reserved-memory: Add Google Kinfo Pixel reserved memory Eugen Hristev
2025-11-19 16:02   ` Krzysztof Kozlowski
2025-11-19 16:19     ` Eugen Hristev
2025-11-20  7:21       ` Krzysztof Kozlowski [this message]
2025-11-19 16:33   ` Rob Herring (Arm)
2025-11-19 22:41   ` Rob Herring
2025-11-19 15:44 ` [PATCH 26/26] meminspect: Add Kinfo compatible driver Eugen Hristev
2025-11-19 16:30 ` [PATCH 00/26] Introduce meminspect Lorenzo Stoakes
2025-11-19 17:11   ` Eugen Hristev
2025-11-19 17:14     ` Lorenzo Stoakes
2025-11-19 17:19       ` Eugen Hristev
2025-11-19 18:15 ` Steven Rostedt
2025-11-19 18:24   ` Eugen Hristev
2025-11-19 18:38     ` Steven Rostedt
2025-12-13  6:48 ` Eugen Hristev
2025-12-13  6:57   ` Randy Dunlap
2025-12-13  7:22     ` Eugen Hristev

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=c503061b-00cc-4d04-8380-3a0fe0a2c788@kernel.org \
    --to=krzk@kernel.org \
    --cc=andersson@kernel.org \
    --cc=corbet@lwn.net \
    --cc=david@redhat.com \
    --cc=devicetree@vger.kernel.org \
    --cc=eugen.hristev@linaro.org \
    --cc=jonechou@google.com \
    --cc=kees@kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mhocko@suse.com \
    --cc=mukesh.ojha@oss.qualcomm.com \
    --cc=pmladek@suse.com \
    --cc=rdunlap@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=tudor.ambarus@linaro.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;
as well as URLs for NNTP newsgroup(s).