diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2023-01-24 01:44:23 -0500 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-01-25 02:06:29 +0100 |
commit | b379d5afdf65cce11426ab0349a3778b3fd632f5 (patch) | |
tree | 806d1d45fad3b713bd3e967ccf39847db427aa55 /i386/intel | |
parent | 2281d4ba935f2b6c06d2ee0e5258c41c78bd8d39 (diff) | |
download | gnumach-b379d5afdf65cce11426ab0349a3778b3fd632f5.tar.gz gnumach-b379d5afdf65cce11426ab0349a3778b3fd632f5.tar.bz2 gnumach-b379d5afdf65cce11426ab0349a3778b3fd632f5.zip |
Fix several warnings for -Wmissing-prototypes (part 2)
* i386/i386/io_map.c: code is unused.
* i386/i386/io_perm.c: include mig prototypes.
* i386/i386/mp_desc.c: Deleted interrupt_stack_alloc since it is not
used.
* i386/i386/seg.h: Moved descriptor structs to i386/include/mach/i386/mach_i386_types.h
as that represents the interface types for RPCs.
Defined aliases for real_descriptor since those are used by the i386 RPCs. Inlined many
functions here too and removed seg.c.
* i386/i386/seg.c: Removed. All the functions are inline now.
* i386/i386/trap.c: Use static.
* i386/i386/trap.h: Define missing prototypes.
* i386/i386/tss.h: Use static inline for ltr.
* i386/i386/user_ldt.c: Include mig prototypes.
* i386/include/mach/i386/mach_i386.defs: Define real_descriptor_t types
since those are used in the RPC definition. Now both prototypes and
definitions will match.
* i386/include/mach/i386/mach_i386_types.h: Move struct descriptor
from seg.h since we need those for the RPC interfaces. Removed include
of io_perm.h since it generates circular includes otherwise.
* i386/intel/pmap.c: pmap_map is unused. Added static qualifier for
several functions.
* i386/intel/pmap.h: pmap_update_interrupt declared for non-SMP and SMP.
Message-Id: <Y89+R2VekOQK4IUo@jupiter.lan>
Diffstat (limited to 'i386/intel')
-rw-r--r-- | i386/intel/pmap.c | 33 | ||||
-rw-r--r-- | i386/intel/pmap.h | 3 |
2 files changed, 6 insertions, 30 deletions
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c index 199f824e..84a4cef5 100644 --- a/i386/intel/pmap.c +++ b/i386/intel/pmap.c @@ -502,34 +502,9 @@ void ptep_check(ptep_t ptep) #endif /* DEBUG_PTE_PAGE */ /* - * Map memory at initialization. The physical addresses being - * mapped are not managed and are never unmapped. - * - * For now, VM is already on, we only need to map the - * specified memory. - */ -vm_offset_t pmap_map( - vm_offset_t virt, - phys_addr_t start, - phys_addr_t end, - int prot) -{ - int ps; - - ps = PAGE_SIZE; - while (start < end) { - pmap_enter(kernel_pmap, virt, start, prot, FALSE); - virt += ps; - start += ps; - } - return(virt); -} - -/* * Back-door routine for mapping kernel VM at initialization. * Useful for mapping memory outside the range of direct mapped * physical memory (i.e., devices). - * Otherwise like pmap_map. */ vm_offset_t pmap_map_bd( vm_offset_t virt, @@ -1108,7 +1083,7 @@ valid_page(phys_addr_t addr) * Must be called with the pmap system and the pmap unlocked, * since these must be unlocked to use vm_page_grab. */ -vm_offset_t +static vm_offset_t pmap_page_table_page_alloc(void) { vm_page_t m; @@ -1198,7 +1173,7 @@ void pmap_map_mfn(void *_addr, unsigned long mfn) { * The page-table page must have all mappings removed, * and be removed from its page directory. */ -void +static void pmap_page_table_page_dealloc(vm_offset_t pa) { vm_page_t m; @@ -2600,7 +2575,7 @@ pmap_pageable( /* * Clear specified attribute bits. */ -void +static void phys_attribute_clear( phys_addr_t phys, int bits) @@ -2684,7 +2659,7 @@ phys_attribute_clear( /* * Check specified attribute bits. */ -boolean_t +static boolean_t phys_attribute_test( phys_addr_t phys, int bits) diff --git a/i386/intel/pmap.h b/i386/intel/pmap.h index bad640c1..d6bf85fb 100644 --- a/i386/intel/pmap.h +++ b/i386/intel/pmap.h @@ -268,11 +268,12 @@ boolean_t cpu_update_needed[NCPUS]; */ void process_pmap_updates(pmap_t); -void pmap_update_interrupt(void); extern pmap_t kernel_pmap; #endif /* NCPUS > 1 */ +void pmap_update_interrupt(void); + /* * Machine dependent routines that are used only for i386/i486. */ |