[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110211182949.GA10751@suse.de>
Date: Fri, 11 Feb 2011 10:29:49 -0800
From: Greg KH <gregkh@...e.de>
To: "K. Y. Srinivasan" <kys@...rosoft.com>
Cc: linux-kernel@...r.kernel.org, devel@...uxdriverproject.org,
virtualization@...ts.osdl.org,
Hank Janssen <hjanssen@...rosoft.com>
Subject: Re: [PATCH 1/3]: Staging: hv: Use native page allocation/free
functions
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists