From: Greg KH <gregkh@suse.de>
To: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: linux-kernel@vger.kernel.org, devel@linuxdriverproject.org,
virtualization@lists.osdl.org,
Hank Janssen <hjanssen@microsoft.com>
Subject: Re: [PATCH 1/3]: Staging: hv: Use native page allocation/free functions
Date: Fri, 11 Feb 2011 10:29:49 -0800 [thread overview]
Message-ID: <20110211182949.GA10751@suse.de> (raw)
In-Reply-To: <1297447140-21777-1-git-send-email-kys@microsoft.com>
On Fri, Feb 11, 2011 at 09:59:00AM -0800, K. Y. Srinivasan wrote:
> --- a/drivers/staging/hv/hv.c
> +++ b/drivers/staging/hv/hv.c
> @@ -230,7 +230,12 @@ int hv_init(void)
> * Allocate the hypercall page memory
> * virtaddr = osd_page_alloc(1);
> */
> - virtaddr = osd_virtual_alloc_exec(PAGE_SIZE);
> +#ifdef __x86_64__
> + virtaddr = __vmalloc(PAGE_SIZE, GFP_KERNEL, PAGE_KERNEL_EXEC);
> +#else
> + virtaddr = __vmalloc(PAGE_SIZE, GFP_KERNEL,
> + __pgprot(__PAGE_KERNEL & (~_PAGE_NX)));
> +#endif
I'm not saying this patch is wrong at all, but I still don't understand
why this is different depending on the architecture of the machine. Why
is this necessary, it should be ok to do the same type of allocation no
matter what the processor is, right?
thanks,
greg k-h
next prev parent reply other threads:[~2011-02-11 18:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-11 17:59 [PATCH 1/3]: Staging: hv: Use native page allocation/free functions K. Y. Srinivasan
2011-02-11 18:29 ` Greg KH [this message]
2011-02-11 20:55 ` KY Srinivasan
2011-02-11 21:23 ` Greg KH
2011-02-11 21:30 ` Hank Janssen
2011-02-11 21:37 ` KY Srinivasan
2011-02-11 21:27 ` Hank Janssen
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=20110211182949.GA10751@suse.de \
--to=gregkh@suse.de \
--cc=devel@linuxdriverproject.org \
--cc=hjanssen@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.osdl.org \
/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