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

Re: [PATCH v7 7/8] xen/arm: Rename init_secondary_pagetables() to prepare_secondary_mm()


  • To: Julien Grall <julien@xxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Sat, 14 Oct 2023 00:11:56 +0000
  • Accept-language: zh-CN, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DILzAxlvQ1tWonfVC8Tjwv+XhzTYjjJqWANPCygnLDk=; b=T69NjHh7x91hSk4cDcU3GDYuxI1xATC0CDzNx2ANmIOD/DVI6Gisg/8VC3eQ66lC5Uz3L6lqL2cjQIyAva9j0k4OGT2sMiewjxIckhNVNkL/pTPAYFmkYIH/MLMymHQYA+OEyYRVxHNDa3bc/y3AuLYOF93hnz9CmxOz47kpP6R5l9UHoGkAn0KAlmLIUsUoM8mgedMyEoLQ5thYH1IO0wBdDzD/OdWTy9QFR0vH8S9N+6cZXphICG391SzssvPv/QdZUJBrapP8vVrhMcpDQRNyHt3vIvLfqmuZmk7/adJ8oxWPuGpJaCq9Xozygl9SaPVMT2OyGNM+w6v8eItRaA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kyJlTNKH2th9JZo7A0hihtIg4pmAxMdCNyxXFc5a1MjhOzM9H5Wu0Lx/aMYnLu+TnK56gxQ9HX06TWG0bKYaTjUW16MCkrE+jFeFQ/S1E5N0X8oa/SE58y9I3uLSiZn8DTciQEq31OpU7o6iKuJkqVcbKemxxYwJ2nqGRN3deeKm5qJzYQnFr7ryrmOa14RiEJsXDB6GpwFwikuLBgNzKTFM/NGLNlOVLaRq14DUrw9A0ykGBgAwNO2e9RnFf5ZYumlKY9ZqPpfiuEnj0DMUazeBg6Tkj5G9OOUWut15NzO3o1ftce0G9H1lpFP+2Ljbd41Ea5FU8j8o+SbVNa+ymQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Sat, 14 Oct 2023 00:12:14 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHZ+kyDmsm+JuKZJU+E4crrwIz5KbBIBiqAgAAAIYCAAGshgA==
  • Thread-topic: [PATCH v7 7/8] xen/arm: Rename init_secondary_pagetables() to prepare_secondary_mm()

Hi Julien,

> On Oct 14, 2023, at 01:48, Julien Grall <julien@xxxxxxx> wrote:
> 
> On 13/10/2023 18:47, Julien Grall wrote:
>> Hi Henry,
>> On 09/10/2023 02:03, Henry Wang wrote:
>>> From: Penny Zheng <penny.zheng@xxxxxxx>
>>> 
>>> init_secondary_pagetables() is a function in the common code path
>>> of both MMU and future MPU support. Since "page table" is a MMU
>>> specific concept, rename init_secondary_pagetables() to a generic
>>> name prepare_secondary_mm() as the preparation for MPU support.
>>> 
>>> Take the opportunity to fix the incorrect coding style of the in-code
>>> comments.
>>> 
>>> Signed-off-by: Penny Zheng <penny.zheng@xxxxxxx>
>>> Signed-off-by: Henry Wang <Henry.Wang@xxxxxxx>
>>> ---
>>> v7:
>>> - No change.
>>> v6:
>>> - Only rename init_secondary_pagetables() to prepare_secondary_mm().
>>> ---
>>>   xen/arch/arm/arm32/head.S     | 2 +-
>>>   xen/arch/arm/include/asm/mm.h | 8 +++++---
>>>   xen/arch/arm/mmu/smpboot.c    | 4 ++--
>>>   xen/arch/arm/smpboot.c        | 2 +-
>>>   4 files changed, 9 insertions(+), 7 deletions(-)
>>> 
>>> diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S
>>> index 39218cf15f..c7b2efb8f0 100644
>>> --- a/xen/arch/arm/arm32/head.S
>>> +++ b/xen/arch/arm/arm32/head.S
>>> @@ -257,7 +257,7 @@ GLOBAL(init_secondary)
>>>   secondary_switched:
>>>           /*
>>>            * Non-boot CPUs need to move on to the proper pagetables, which 
>>> were
>>> -         * setup in init_secondary_pagetables.
>>> +         * setup in prepare_secondary_mm.
>>>            *
>>>            * XXX: This is not compliant with the Arm Arm.
>>>            */
>>> diff --git a/xen/arch/arm/include/asm/mm.h b/xen/arch/arm/include/asm/mm.h
>>> index d23ebc7df6..db6d889826 100644
>>> --- a/xen/arch/arm/include/asm/mm.h
>>> +++ b/xen/arch/arm/include/asm/mm.h
>>> @@ -204,9 +204,11 @@ extern void setup_pagetables(unsigned long 
>>> boot_phys_offset);
>>>   extern void *early_fdt_map(paddr_t fdt_paddr);
>>>   /* Remove early mappings */
>>>   extern void remove_early_mappings(void);
>>> -/* Allocate and initialise pagetables for a secondary CPU. Sets init_ttbr 
>>> to the
>>> - * new page table */
>>> -extern int init_secondary_pagetables(int cpu);
>>> +/*
>>> + * Allocate and initialise pagetables for a secondary CPU.
>>> + * Sets init_ttbr to the new page table.
>>> + */
>> AFAIU, with the renaming, you are trying to make the call MMU/MPU agnostic. 
>> But the comment is still very tailored to the MPU. I would consider to move 
>> the comment to mmu/smpboot.c and replace this one with a generic comment. 
>> Something like:
>> /* Prepare the memory subystem to bring-up the given secondary CPU. */

Good suggestion! I will follow this in v8.

> 
> I forgot to mention. With that:
> 
> Reviewed-by: Julien Grall <jgrall@xxxxxxxxxx>

Thanks!

Kind regards,
Henry

> 
> Cheers,
> 
> -- 
> Julien Grall




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.