[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 06/14] i386/intel/pmap.c: move struct definitions to a header
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 06/14] i386/intel/pmap.c: move struct definitions to a header file |
Date: |
Sun, 8 Dec 2013 23:28:45 +0900 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Marin Ramesa, le Mon 02 Dec 2013 22:54:44 +0100, a écrit :
> * i386/intel/pmap.c (pv_entry, pmap_update_item, pmap_update_list): Move
> struct definitions to i386/intel/pmap.h.
Ditto.
> ---
> i386/intel/pmap.c | 45 ---------------------------------------------
> i386/intel/pmap.h | 46 +++++++++++++++++++++++++++++++++++++++++++++-
> 2 files changed, 45 insertions(+), 46 deletions(-)
>
> diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c
> index 038f3a8..7a5abfd 100644
> --- a/i386/intel/pmap.c
> +++ b/i386/intel/pmap.c
> @@ -94,20 +94,6 @@
> * Private data structures.
> */
>
> -/*
> - * For each vm_page_t, there is a list of all currently
> - * valid virtual mappings of that page. An entry is
> - * a pv_entry_t; the list is the pv_table.
> - */
> -
> -typedef struct pv_entry {
> - struct pv_entry *next; /* next pv_entry */
> - pmap_t pmap; /* pmap where mapping lies */
> - vm_offset_t va; /* virtual address for mapping */
> -} *pv_entry_t;
> -
> -#define PV_ENTRY_NULL ((pv_entry_t) 0)
> -
> pv_entry_t pv_head_table; /* array of entries, one per page */
>
> /*
> @@ -360,37 +346,6 @@ lock_data_t pmap_system_lock;
> #endif
> #endif /* MACH_PV_PAGETABLES */
>
> -
> -#if NCPUS > 1
> -/*
> - * Structures to keep track of pending TLB invalidations
> - */
> -
> -#define UPDATE_LIST_SIZE 4
> -
> -struct pmap_update_item {
> - pmap_t pmap; /* pmap to invalidate */
> - vm_offset_t start; /* start address to invalidate */
> - vm_offset_t end; /* end address to invalidate */
> -} ;
> -
> -typedef struct pmap_update_item *pmap_update_item_t;
> -
> -/*
> - * List of pmap updates. If the list overflows,
> - * the last entry is changed to invalidate all.
> - */
> -struct pmap_update_list {
> - decl_simple_lock_data(, lock)
> - int count;
> - struct pmap_update_item item[UPDATE_LIST_SIZE];
> -} ;
> -typedef struct pmap_update_list *pmap_update_list_t;
> -
> -struct pmap_update_list cpu_update_list[NCPUS];
> -
> -#endif /* NCPUS > 1 */
> -
> /*
> * Other useful macros.
> */
> diff --git a/i386/intel/pmap.h b/i386/intel/pmap.h
> index 087e0ef..8aab677 100644
> --- a/i386/intel/pmap.h
> +++ b/i386/intel/pmap.h
> @@ -174,9 +174,53 @@ struct pmap {
> cpu_set cpus_using; /* bitmap of cpus using pmap */
> };
>
> +#define PMAP_NULL ((pmap_t) 0)
> +
> typedef struct pmap *pmap_t;
>
> -#define PMAP_NULL ((pmap_t) 0)
> +/*
> + * For each vm_page_t, there is a list of all currently
> + * valid virtual mappings of that page. An entry is
> + * a pv_entry_t; the list is the pv_table.
> + */
> +
> +typedef struct pv_entry {
> + struct pv_entry *next; /* next pv_entry */
> + pmap_t pmap; /* pmap where mapping lies */
> + vm_offset_t va; /* virtual address for mapping */
> +} *pv_entry_t;
> +
> +#define PV_ENTRY_NULL ((pv_entry_t) 0)
> +
> +struct pmap_update_item {
> + pmap_t pmap; /* pmap to invalidate */
> + vm_offset_t start; /* start address to invalidate */
> + vm_offset_t end; /* end address to invalidate */
> +} ;
> +
> +typedef struct pmap_update_item *pmap_update_item_t;
> +
> +#if NCPUS > 1
> +/*
> + * Structures to keep track of pending TLB invalidations
> + */
> +
> +#define UPDATE_LIST_SIZE 4
> +
> +/*
> + * List of pmap updates. If the list overflows,
> + * the last entry is changed to invalidate all.
> + */
> +struct pmap_update_list {
> + decl_simple_lock_data(, lock)
> + int count;
> + struct pmap_update_item item[UPDATE_LIST_SIZE];
> +} ;
> +typedef struct pmap_update_list *pmap_update_list_t;
> +
> +struct pmap_update_list cpu_update_list[NCPUS];
> +
> +#endif /* NCPUS > 1 */
>
> #ifdef MACH_PV_PAGETABLES
> extern void pmap_set_page_readwrite(void *addr);
> --
> 1.8.1.4
>
>
--
Samuel
<T> csp.tar.gz: ascii text
-+- #ens-mim - vive les browsers qui prennent des initiatives à la con -+-
- Re: [PATCH 02/14] i386/i386at/kd.c: remove useless old code, (continued)
- [PATCH 04/14] ddb/db_macro.c: move struct definition to a header file, Marin Ramesa, 2013/12/02
- [PATCH 05/14] i386/i386/idt.c: move struct definition to a header file, Marin Ramesa, 2013/12/02
- [PATCH 06/14] i386/intel/pmap.c: move struct definitions to a header file, Marin Ramesa, 2013/12/02
- Re: [PATCH 06/14] i386/intel/pmap.c: move struct definitions to a header file,
Samuel Thibault <=
- [PATCH 07/14] ipc/ipc_hash.c: move struct definition to a header file, Marin Ramesa, 2013/12/02
- [PATCH 08/14] ipc/ipc_marequest.c: move struct definition to a header file, Marin Ramesa, 2013/12/02
- [PATCH 09/14] ipc/ipc_port.c: trivial stylistic fix for consistency, Marin Ramesa, 2013/12/02
- [PATCH 10/14] kern/act.c: move struct definition to a header file, Marin Ramesa, 2013/12/02
- [PATCH 12/14] vm/memory_object_proxy.c: move struct definition to a header file, Marin Ramesa, 2013/12/02
- [PATCH 11/14] kern/lock.c: move struct definition to a header file, Marin Ramesa, 2013/12/02