lkml.org 
[lkml]   [2015]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] misc: sram: extend usage of reserved partitions
From
Date
Hi Greg,

On 21.09.2015 08:30, Greg Kroah-Hartman wrote:
> On Mon, Aug 10, 2015 at 12:40:02AM +0300, Vladimir Zapolskiy wrote:
>> This change adds functionality to operate on reserved SRAM partitions
>> described in device tree file. Two partition properties are added,
>> "pool" and "export", the first one allows to share a specific partition
>> for usage by a kernel consumer in the same manner as it is done for
>> the whole SRAM device, and "export" property provides access to some
>> SRAM area from userspace over sysfs interface. Practically it is
>> possible to specify both properties for an SRAM partition, however
>> simultaneous access from a kernel consumer and from userspace is not
>> serialized, but still the combination may be useful for debugging
>> purpose.
>
> This scares me, why do we need to partition sram off in this manner?

at the moment SRAM has no fine grained access interface (i.e. by
offset), it seems practicable to have such an interface, especially if
SRAM is accessed from outside of the kernel.

> What uses it in this way?

On practice I experience the following usecases:
* updates in a particular SRAM area specified by offset and size are
done by bootloader, then this information is utilized by the kernel,
* a particular SRAM area is rw accessed from userspace.

Support of both aforementioned options is provided by the proposed change.

> I need some other people to weigh in on this, and at the very least, I
> need some DT people to bless the changes there...

I'll send next revisions of the change to DT list.

Please note, that the partitioning of SRAM specified in DT is already
present in vanilla (commit 2da19688f4, "reserved areas" on SRAM), this
change adds an option to set a property of that reserved area, here
"reserved area" means SRAM area not accessible by genalloc clients of
"mmio-sram" device.

--
With best wishes,
Vladimir


\
 
 \ /
  Last update: 2015-09-21 15:01    [W:0.467 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site