From nobody Tue Dec 16 14:34:58 2025 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 251CC34FAFD; Tue, 6 May 2025 00:56:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746493010; cv=none; b=YQzJM7PcGnNTQKOHLS3cndDVyQGoqGHRBKj0oSpWuExCCA1fwKDq3ck54YvONUGEjvZxY6a3t8dj/nXdJpZMUqHh7W70AhutkMVAV41DraLKUCsSDe4WcIsOWD2KTDBK2R4KrcwQmnR2dw68yQpwgtd++Qja8vDdTSrEMX+hfyk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746493010; c=relaxed/simple; bh=JruDkI3GXfZf4tHR86VsgRMY60DqpXC3BKMs+rXCqF8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=f4qQM50VV4kQoTAuvedr25cYtR7yVd8PqUJxxqOLLC7Ms/2ctfR/BLwoCQnNnwHkV2beIzPbk1vjgUnFoQ/Drc7MHTQFFmqmx2gdVto3C7xc8AoXtZ3CUnye0mVfjz2+RsK+EI+ku1mCpQ0eBe9WItwso0sTG4053csUOHc5jwA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxonhyperv.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linuxonhyperv.com header.i=@linuxonhyperv.com header.b=LAHLp1/z; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxonhyperv.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxonhyperv.com header.i=@linuxonhyperv.com header.b="LAHLp1/z" Received: by linux.microsoft.com (Postfix, from userid 1202) id EE4FB2115DC7; Mon, 5 May 2025 17:56:48 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com EE4FB2115DC7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com; s=default; t=1746493008; bh=trr1tx7SJkPMB80H3ADWZz7ZMck5EyVgqKue45Oc6PI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LAHLp1/zxAngy3CbIhfsUJrm3vw2IhYMUe8iWEySu3BHdBoXx+Uxn0BwCDD8tEzL2 LQIWHuOBUX7TsVp3xY42AsuI09/j3AAvb7vy7yEW6ZLKDn064BJdma2uk0elZTfTSV /FXoqyunXy57V3R9KuZSBxqtGjEHSPncsVh83NJI= From: longli@linuxonhyperv.com To: "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Greg Kroah-Hartman , linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Long Li Subject: [Patch v3 5/5] Drivers: hv: Remove hv_alloc/free_* helpers Date: Mon, 5 May 2025 17:56:37 -0700 Message-Id: <1746492997-4599-6-git-send-email-longli@linuxonhyperv.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1746492997-4599-1-git-send-email-longli@linuxonhyperv.com> References: <1746492997-4599-1-git-send-email-longli@linuxonhyperv.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Long Li There are no users for those functions, remove them. Signed-off-by: Long Li --- drivers/hv/hv_common.c | 39 ---------------------------------- include/asm-generic/mshyperv.h | 4 ---- 2 files changed, 43 deletions(-) diff --git a/drivers/hv/hv_common.c b/drivers/hv/hv_common.c index a5a6250b1a12..421376cea17e 100644 --- a/drivers/hv/hv_common.c +++ b/drivers/hv/hv_common.c @@ -105,45 +105,6 @@ void __init hv_common_free(void) hv_synic_eventring_tail =3D NULL; } =20 -/* - * Functions for allocating and freeing memory with size and - * alignment HV_HYP_PAGE_SIZE. These functions are needed because - * the guest page size may not be the same as the Hyper-V page - * size. We depend upon kmalloc() aligning power-of-two size - * allocations to the allocation size boundary, so that the - * allocated memory appears to Hyper-V as a page of the size - * it expects. - */ - -void *hv_alloc_hyperv_page(void) -{ - BUILD_BUG_ON(PAGE_SIZE < HV_HYP_PAGE_SIZE); - - if (PAGE_SIZE =3D=3D HV_HYP_PAGE_SIZE) - return (void *)__get_free_page(GFP_KERNEL); - else - return kmalloc(HV_HYP_PAGE_SIZE, GFP_KERNEL); -} -EXPORT_SYMBOL_GPL(hv_alloc_hyperv_page); - -void *hv_alloc_hyperv_zeroed_page(void) -{ - if (PAGE_SIZE =3D=3D HV_HYP_PAGE_SIZE) - return (void *)__get_free_page(GFP_KERNEL | __GFP_ZERO); - else - return kzalloc(HV_HYP_PAGE_SIZE, GFP_KERNEL); -} -EXPORT_SYMBOL_GPL(hv_alloc_hyperv_zeroed_page); - -void hv_free_hyperv_page(void *addr) -{ - if (PAGE_SIZE =3D=3D HV_HYP_PAGE_SIZE) - free_page((unsigned long)addr); - else - kfree(addr); -} -EXPORT_SYMBOL_GPL(hv_free_hyperv_page); - static void *hv_panic_page; =20 /* diff --git a/include/asm-generic/mshyperv.h b/include/asm-generic/mshyperv.h index ccccb1cbf7df..4033508fbb11 100644 --- a/include/asm-generic/mshyperv.h +++ b/include/asm-generic/mshyperv.h @@ -236,10 +236,6 @@ int hv_common_cpu_init(unsigned int cpu); int hv_common_cpu_die(unsigned int cpu); void hv_identify_partition_type(void); =20 -void *hv_alloc_hyperv_page(void); -void *hv_alloc_hyperv_zeroed_page(void); -void hv_free_hyperv_page(void *addr); - /** * hv_cpu_number_to_vp_number() - Map CPU to VP. * @cpu_number: CPU number in Linux terms --=20 2.34.1