Skip to content

Commit 1adf711

Browse files
shivankgarg98Ingo Molnar
authored andcommitted
x86/mm: Fix kernel-doc descriptions of various pgtable methods
So 'make W=1' complains about a couple of kernel-doc descriptions in our MM primitives in pgtable.c: arch/x86/mm/pgtable.c:623: warning: Function parameter or struct member 'reserve' not described in 'reserve_top_address' arch/x86/mm/pgtable.c:672: warning: Function parameter or struct member 'p4d' not described in 'p4d_set_huge' arch/x86/mm/pgtable.c:672: warning: Function parameter or struct member 'addr' not described in 'p4d_set_huge' ... so on Fix them all up, add missing parameter documentation, and fix various spelling inconsistencies while at it. [ mingo: Harmonize kernel-doc annotations some more. ] Signed-off-by: Shivank Garg <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Andrew Cooper <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Brian Gerst <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Juergen Gross <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Rik van Riel <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 25219c2 commit 1adf711

File tree

1 file changed

+31
-19
lines changed

1 file changed

+31
-19
lines changed

arch/x86/mm/pgtable.c

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -543,11 +543,11 @@ pud_t pudp_invalidate(struct vm_area_struct *vma, unsigned long address,
543543
#endif
544544

545545
/**
546-
* reserve_top_address - reserves a hole in the top of kernel address space
547-
* @reserve - size of hole to reserve
546+
* reserve_top_address - Reserve a hole in the top of the kernel address space
547+
* @reserve: Size of hole to reserve
548548
*
549549
* Can be used to relocate the fixmap area and poke a hole in the top
550-
* of kernel address space to make room for a hypervisor.
550+
* of the kernel address space to make room for a hypervisor.
551551
*/
552552
void __init reserve_top_address(unsigned long reserve)
553553
{
@@ -594,7 +594,10 @@ void native_set_fixmap(unsigned /* enum fixed_addresses */ idx,
594594
#ifdef CONFIG_HAVE_ARCH_HUGE_VMAP
595595
#ifdef CONFIG_X86_5LEVEL
596596
/**
597-
* p4d_set_huge - setup kernel P4D mapping
597+
* p4d_set_huge - Set up kernel P4D mapping
598+
* @p4d: Pointer to the P4D entry
599+
* @addr: Virtual address associated with the P4D entry
600+
* @prot: Protection bits to use
598601
*
599602
* No 512GB pages yet -- always return 0
600603
*/
@@ -604,17 +607,21 @@ int p4d_set_huge(p4d_t *p4d, phys_addr_t addr, pgprot_t prot)
604607
}
605608

606609
/**
607-
* p4d_clear_huge - clear kernel P4D mapping when it is set
610+
* p4d_clear_huge - Clear kernel P4D mapping when it is set
611+
* @p4d: Pointer to the P4D entry to clear
608612
*
609-
* No 512GB pages yet -- always return 0
613+
* No 512GB pages yet -- do nothing
610614
*/
611615
void p4d_clear_huge(p4d_t *p4d)
612616
{
613617
}
614618
#endif
615619

616620
/**
617-
* pud_set_huge - setup kernel PUD mapping
621+
* pud_set_huge - Set up kernel PUD mapping
622+
* @pud: Pointer to the PUD entry
623+
* @addr: Virtual address associated with the PUD entry
624+
* @prot: Protection bits to use
618625
*
619626
* MTRRs can override PAT memory types with 4KiB granularity. Therefore, this
620627
* function sets up a huge page only if the complete range has the same MTRR
@@ -645,7 +652,10 @@ int pud_set_huge(pud_t *pud, phys_addr_t addr, pgprot_t prot)
645652
}
646653

647654
/**
648-
* pmd_set_huge - setup kernel PMD mapping
655+
* pmd_set_huge - Set up kernel PMD mapping
656+
* @pmd: Pointer to the PMD entry
657+
* @addr: Virtual address associated with the PMD entry
658+
* @prot: Protection bits to use
649659
*
650660
* See text over pud_set_huge() above.
651661
*
@@ -674,7 +684,8 @@ int pmd_set_huge(pmd_t *pmd, phys_addr_t addr, pgprot_t prot)
674684
}
675685

676686
/**
677-
* pud_clear_huge - clear kernel PUD mapping when it is set
687+
* pud_clear_huge - Clear kernel PUD mapping when it is set
688+
* @pud: Pointer to the PUD entry to clear.
678689
*
679690
* Returns 1 on success and 0 on failure (no PUD map is found).
680691
*/
@@ -689,7 +700,8 @@ int pud_clear_huge(pud_t *pud)
689700
}
690701

691702
/**
692-
* pmd_clear_huge - clear kernel PMD mapping when it is set
703+
* pmd_clear_huge - Clear kernel PMD mapping when it is set
704+
* @pmd: Pointer to the PMD entry to clear.
693705
*
694706
* Returns 1 on success and 0 on failure (no PMD map is found).
695707
*/
@@ -705,11 +717,11 @@ int pmd_clear_huge(pmd_t *pmd)
705717

706718
#ifdef CONFIG_X86_64
707719
/**
708-
* pud_free_pmd_page - Clear pud entry and free pmd page.
709-
* @pud: Pointer to a PUD.
710-
* @addr: Virtual address associated with pud.
720+
* pud_free_pmd_page - Clear PUD entry and free PMD page
721+
* @pud: Pointer to a PUD
722+
* @addr: Virtual address associated with PUD
711723
*
712-
* Context: The pud range has been unmapped and TLB purged.
724+
* Context: The PUD range has been unmapped and TLB purged.
713725
* Return: 1 if clearing the entry succeeded. 0 otherwise.
714726
*
715727
* NOTE: Callers must allow a single page allocation.
@@ -752,11 +764,11 @@ int pud_free_pmd_page(pud_t *pud, unsigned long addr)
752764
}
753765

754766
/**
755-
* pmd_free_pte_page - Clear pmd entry and free pte page.
756-
* @pmd: Pointer to a PMD.
757-
* @addr: Virtual address associated with pmd.
767+
* pmd_free_pte_page - Clear PMD entry and free PTE page.
768+
* @pmd: Pointer to the PMD
769+
* @addr: Virtual address associated with PMD
758770
*
759-
* Context: The pmd range has been unmapped and TLB purged.
771+
* Context: The PMD range has been unmapped and TLB purged.
760772
* Return: 1 if clearing the entry succeeded. 0 otherwise.
761773
*/
762774
int pmd_free_pte_page(pmd_t *pmd, unsigned long addr)
@@ -778,7 +790,7 @@ int pmd_free_pte_page(pmd_t *pmd, unsigned long addr)
778790

779791
/*
780792
* Disable free page handling on x86-PAE. This assures that ioremap()
781-
* does not update sync'd pmd entries. See vmalloc_sync_one().
793+
* does not update sync'd PMD entries. See vmalloc_sync_one().
782794
*/
783795
int pmd_free_pte_page(pmd_t *pmd, unsigned long addr)
784796
{

0 commit comments

Comments
 (0)