mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Shaohua Li <shaohua.li@intel.com>
Cc: linux-kernel@vger.kernel.org, rjw@sisk.pl, pavel@suse.cz
Subject: Re: [PATCH 1/3] swsusp add architecture special saveable pages support
Date: Wed, 12 Apr 2006 14:16:42 -0700	[thread overview]
Message-ID: <20060412141642.63debf90.akpm@osdl.org> (raw)
In-Reply-To: <1144809499.2865.39.camel@sli10-desk.sh.intel.com>

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?

  parent reply	other threads:[~2006-04-12 21:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-12  2:38 Shaohua Li
2006-04-12  4:55 ` Pavel Machek
2006-04-12  5:04   ` Shaohua Li
2006-04-12 21:16 ` Andrew Morton [this message]
2006-04-13  1:07   ` Shaohua Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060412141642.63debf90.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@suse.cz \
    --cc=rjw@sisk.pl \
    --cc=shaohua.li@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®