Messages in this thread | | | Date | Wed, 12 Apr 2006 14:16:42 -0700 | From | Andrew Morton <> | Subject | Re: [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/
| |