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

Re: [Minios-devel] [PATCH 02/40] mini-os: replace the L1_PAGETABLE_SHIFT with PAGE_SHIFT



Huang Shijie, on ven. 03 nov. 2017 03:11:39 +0000, wrote:
> The L1_PAGETABLE_SHIFT is a confusing macro for arm.
> Replace it with PAGE_SHIFT.
> 
> Jira: ENTOS-247
> Change-Id: Iadc2eef9ce6f8a4f8a31ee43410e1204dcc8b8da
> Signed-off-by: Huang Shijie <shijie.huang@xxxxxxx>

Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>

> ---
>  include/arm/arch_mm.h | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/include/arm/arch_mm.h b/include/arm/arch_mm.h
> index 79d9e05..8ad0d2a 100644
> --- a/include/arm/arch_mm.h
> +++ b/include/arm/arch_mm.h
> @@ -12,17 +12,15 @@ extern uint32_t physical_address_offset;  /* Add this to 
> a virtual address to get
>  #define PAGE_SIZE        (1 << PAGE_SHIFT)
>  #define PAGE_MASK       (~(PAGE_SIZE-1))
>  
> -#define L1_PAGETABLE_SHIFT      12
> -
>  #define L1_PROT          0
>  
>  #define to_phys(x)                 (((paddr_t)(x)+physical_address_offset) & 
> 0xffffffff)
>  #define to_virt(x)                 ((void *)(((x)-physical_address_offset) & 
> 0xffffffff))
>  
> -#define PFN_UP(x)    (unsigned long)(((x) + PAGE_SIZE-1) >> 
> L1_PAGETABLE_SHIFT)
> -#define PFN_DOWN(x)    (unsigned long)((x) >> L1_PAGETABLE_SHIFT)
> -#define PFN_PHYS(x)    ((uint64_t)(x) << L1_PAGETABLE_SHIFT)
> -#define PHYS_PFN(x)    (unsigned long)((x) >> L1_PAGETABLE_SHIFT)
> +#define PFN_UP(x)                  (unsigned long)(((x) + PAGE_SIZE-1) >> 
> PAGE_SHIFT)
> +#define PFN_DOWN(x)                (unsigned long)((x) >> PAGE_SHIFT)
> +#define PFN_PHYS(x)                ((uint64_t)(x) << PAGE_SHIFT)
> +#define PHYS_PFN(x)                (unsigned long)((x) >> PAGE_SHIFT)
>  
>  #define virt_to_pfn(_virt)         (PFN_DOWN(to_phys(_virt)))
>  #define virt_to_mfn(_virt)         (PFN_DOWN(to_phys(_virt)))
> -- 
> 2.7.4
> 
> 
> _______________________________________________
> Minios-devel mailing list
> Minios-devel@xxxxxxxxxxxxxxxxxxxx
> https://lists.xenproject.org/cgi-bin/mailman/listinfo/minios-devel

-- 
Samuel
<N> je déteste import
<N> parce que lorsque tu fais du python et que tu oublies le #!/bin/env python 
et que tu mets le fichier exécutable
<N> import est exécuté
 -+- #ens-mim - pourquoi mon script python change le curseur de la souris ?! -+-

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/minios-devel

 


Rackspace

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