lkml.org 
[lkml]   [2006]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] swsusp add architecture special saveable pages support
Shaohua Li <shaohua.li@intel.com> wrote:
>
> +static int save_arch_mem(void)
> +{
> + void *kaddr;
> + struct arch_saveable_page *tmp = arch_pages;
> +
> + pr_debug("swsusp: Saving arch specific memory");
> + while (tmp) {
> + tmp->data = (void *)get_zeroed_page(GFP_ATOMIC);

There's no need to zero the page here.

> + if (!tmp->data)
> + return -ENOMEM;
> + /* arch pages might haven't a 'struct page' */
> + kaddr = kmap_atomic_pfn(tmp->pfn, KM_PTE0);
> + memcpy(tmp->data, kaddr, PAGE_SIZE);
> + kunmap_atomic(kaddr, KM_PTE0);

Why was KM_PTE0 chosen here?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-12 23:17    [from the cache]
©2003-2011 Jasper Spaans