Re: [PATCH 3/3] mm: move follow_phys to arch/x86/mm/pat/memtype.c

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

 



On 28.03.24 09:46, Christoph Hellwig wrote:
follow_phys is only used by two callers in arch/x86/mm/pat/memtype.c.
Move it there and hardcode the two arguments that get the same values
passed by both callers.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
  arch/x86/mm/pat/memtype.c | 23 +++++++++++++++++++++--
  include/linux/mm.h        |  2 --
  mm/memory.c               | 28 ----------------------------
  3 files changed, 21 insertions(+), 32 deletions(-)

diff --git a/arch/x86/mm/pat/memtype.c b/arch/x86/mm/pat/memtype.c
index 0d72183b5dd028..c64f07b0fc2099 100644
--- a/arch/x86/mm/pat/memtype.c
+++ b/arch/x86/mm/pat/memtype.c
@@ -947,6 +947,25 @@ static void free_pfn_range(u64 paddr, unsigned long size)
  		memtype_free(paddr, paddr + size);
  }
+static int follow_phys(struct vm_area_struct *vma, unsigned long *prot,
+		resource_size_t *phys)
+{

With an implicit lookup address, the function name is a bit unfortunate.

"lookup_vma_pat_info()" ... not sure.

Reviewed-by: David Hildenbrand <david@xxxxxxxxxx>

--
Cheers,

David / dhildenb





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux