* arm_memblock_steal() API usage
@ 2012-04-03 4:04 Taniya Das
2012-04-03 7:30 ` Russell King - ARM Linux
0 siblings, 1 reply; 3+ messages in thread
From: Taniya Das @ 2012-04-03 4:04 UTC (permalink / raw)
To: linux-arm-kernel
Hi RMK,
I have a requirement where I need around ~100 bytes of memory to save
contents of
registers to a non-cached area before going into low power mode.
I did do some analysis on a 1GB RAM device of allocating 8 bytes using
the API and the below was the result
was showing allocating only 8 bytes.
API used : - arm_memblock_steal(SZ_8, SZ_64K);--> physical address
returned is 0x3b1f0000
/data/debug/memblock # cat memory
0: 0x00200000..0x3b1effff
1: 0x3b1f0008..0x3b1fffff [0x3b1f0000-0x3b1f0007] only 8 bytes removed.
/data/debug/memblock # cat reserved
0: 0x00204000..0x00c710fb
1: 0x01400000..0x01429b44
2: 0x0ffe0000..0x0ffeffff
3: 0x2d9f3000..0x2d9fffff
4: 0x3b1f0008..0x3b1fffff
But before I can go ahead and use this if you could confirm that it will
allocate only the size requested or it
will carve out minimum 1MB?
Also is this API advisable for devices with low system RAM?
--
Thanks& Regards,
Taniya Das.
Consultant for Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
^ permalink raw reply [flat|nested] 3+ messages in thread
* arm_memblock_steal() API usage
2012-04-03 4:04 arm_memblock_steal() API usage Taniya Das
@ 2012-04-03 7:30 ` Russell King - ARM Linux
2012-04-04 5:06 ` Taniya Das
0 siblings, 1 reply; 3+ messages in thread
From: Russell King - ARM Linux @ 2012-04-03 7:30 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Apr 03, 2012 at 09:34:03AM +0530, Taniya Das wrote:
> I have a requirement where I need around ~100 bytes of memory to save
> contents of
> registers to a non-cached area before going into low power mode.
>
> I did do some analysis on a 1GB RAM device of allocating 8 bytes using
> the API and the below was the result
> was showing allocating only 8 bytes.
>
> API used : - arm_memblock_steal(SZ_8, SZ_64K);--> physical address
> returned is 0x3b1f0000
It's silly to use this for the above purpose. Why not just use kmalloc
and cache flushing to ensure that the data is pushed out to RAM?
> Also is this API advisable for devices with low system RAM?
No.
^ permalink raw reply [flat|nested] 3+ messages in thread
* arm_memblock_steal() API usage
2012-04-03 7:30 ` Russell King - ARM Linux
@ 2012-04-04 5:06 ` Taniya Das
0 siblings, 0 replies; 3+ messages in thread
From: Taniya Das @ 2012-04-04 5:06 UTC (permalink / raw)
To: linux-arm-kernel
RMK,
On 03-Apr-12 1:00 PM, Russell King - ARM Linux wrote:
> On Tue, Apr 03, 2012 at 09:34:03AM +0530, Taniya Das wrote:
>> I have a requirement where I need around ~100 bytes of memory to save
>> contents of
>> registers to a non-cached area before going into low power mode.
>>
>> I did do some analysis on a 1GB RAM device of allocating 8 bytes using
>> the API and the below was the result
>> was showing allocating only 8 bytes.
>>
>> API used : - arm_memblock_steal(SZ_8, SZ_64K);--> physical address
>> returned is 0x3b1f0000
> It's silly to use this for the above purpose. Why not just use kmalloc
> and cache flushing to ensure that the data is pushed out to RAM?
We don't want to do a kmalloc and flush, we want to do something similar
to how OMAP4
does, keeping aside a chunk of RAM for saving the contents. But my only
concern what will
be the minimum amount of memory allocated by arm_memblock_steal?
>> Also is this API advisable for devices with low system RAM?
> No.
--
Thanks& Regards,
Taniya Das.
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-04-04 5:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-03 4:04 arm_memblock_steal() API usage Taniya Das
2012-04-03 7:30 ` Russell King - ARM Linux
2012-04-04 5:06 ` Taniya Das
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).