Re: [PATCH v2 09/16] PM / hibernate: Reserve hibernation key and erase footprints

Chen, Yu C
2015-08-13T02:45:42Z

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 893 bytes --]

Hi Chun-yi,
On Tue, 2015-08-11 at 14:16 +0800, Lee, Chun-Yi wrote:

> +/* A page used to keep hibernation keys */
> +static struct hibernation_keys *hibernation_keys;
> +
> +void __init parse_hibernation_keys(u64 phys_addr, u32 data_len)
> +{
> + struct setup_data *hibernation_setup_data;
> +
> + /* Reserve keys memory, will copy and erase in init_hibernation_keys() */
> + keys_phys_addr = phys_addr + sizeof(struct setup_data);
> + memblock_reserve(keys_phys_addr, sizeof(struct hibernation_keys));
> +
> + /* clear hibernation_data */
> + hibernation_setup_data = early_memremap(phys_addr, data_len);
> + if (!hibernation_setup_data)
> + return;
> +
should we invoke memblock_free if early_memremap failed?

Best Regards,
Yu

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éÝ¶\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dÊ‡Ú™ë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥