Re: [PATCH 1/2] suspend: Move NVS save/restore code to generic suspend functionality

Maxim Levitsky
2010-05-30T14:37:24Z

On Fri, 2010-05-28 at 16:32 -0400, Matthew Garrett wrote:
> Saving platform non-volatile state may be required for suspend to RAM as
> well as hibernation. Move it to more generic code.

Since the other patch 'ACPI / EC / PM: Fix race between EC transactions
and system suspend' is now merged, this should be rebased on top of it
(I did the opposite....)

....
> diff --git a/kernel/power/nvs.c b/kernel/power/nvs.c
> new file mode 100644
> index 0000000..1836db6
> --- /dev/null
> +++ b/kernel/power/nvs.c
> @@ -0,0 +1,136 @@
> +/*
> + * linux/kernel/power/hibernate_nvs.c - Routines for handling NVS memory
This should be updated (I did in the version I posted)
> + *
> + * Copyright (C) 2008,2009 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc.
> + *
> + * This file is released under the GPLv2.
> + */
> +
> +#include <linux/io.h>
> +#include <linux/kernel.h>
> +#include <linux/list.h>
> +#include <linux/mm.h>
> +#include <linux/slab.h>
> +#include <linux/suspend.h>
> +
............

Best regards,
Maxim Levitsky