Re: [PATCH 1/3] Drivers: hv: Make portions of Hyper-V init code be arch neutral

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jul 11, 2021 at 08:25:14PM -0700, Michael Kelley wrote:
[...]
> +int hv_common_cpu_init(unsigned int cpu)
> +{
> +	void **inputarg, **outputarg;
> +	u64 msr_vp_index;
> +	gfp_t flags;
> +	int pgcount = hv_root_partition ? 2 : 1;
> +
> +	/* hv_cpu_init() can be called with IRQs disabled from hv_resume() */
> +	flags = irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL;
> +
> +	inputarg = (void **)this_cpu_ptr(hyperv_pcpu_input_arg);
> +	*inputarg = kmalloc(pgcount * HV_HYP_PAGE_SIZE, flags);

This is changed from alloc_pages to kmalloc. Does it ensure the
alignment is still correct? 

Wei.



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux