Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/include/pcpu.h
Show All 28 Lines | |||||
#ifndef _MACHINE_PCPU_H_ | #ifndef _MACHINE_PCPU_H_ | ||||
#define _MACHINE_PCPU_H_ | #define _MACHINE_PCPU_H_ | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
#include <machine/cpuconf.h> | #include <machine/cpuconf.h> | ||||
#include <sys/_lock.h> | |||||
#include <sys/_mutex.h> | |||||
#define ALT_STACK_SIZE 128 | #define ALT_STACK_SIZE 128 | ||||
struct vmspace; | struct vmspace; | ||||
#endif /* _KERNEL */ | #endif /* _KERNEL */ | ||||
#if __ARM_ARCH >= 6 | #if __ARM_ARCH >= 6 | ||||
#define PCPU_MD_FIELDS \ | #define PCPU_MD_FIELDS \ | ||||
unsigned int pc_vfpsid; \ | unsigned int pc_vfpsid; \ | ||||
unsigned int pc_vfpmvfr0; \ | unsigned int pc_vfpmvfr0; \ | ||||
unsigned int pc_vfpmvfr1; \ | unsigned int pc_vfpmvfr1; \ | ||||
struct pmap *pc_curpmap; \ | struct pmap *pc_curpmap; \ | ||||
struct mtx pc_cmap_lock; \ | |||||
void *pc_cmap1_pte2p; \ | |||||
void *pc_cmap2_pte2p; \ | |||||
caddr_t pc_cmap1_addr; \ | |||||
caddr_t pc_cmap2_addr; \ | |||||
skra: I suggest to use the following names for new fields:
pc_cmaps_lock ... lock used for cmaps… | |||||
skraUnsubmitted Not Done Inline ActionsStyle (stray TAB). skra: Style (stray TAB). | |||||
vm_offset_t pc_qmap_addr; \ | vm_offset_t pc_qmap_addr; \ | ||||
void *pc_qmap_pte; \ | void *pc_qmap_pte; \ | ||||
unsigned int pc_dbreg[32]; \ | unsigned int pc_dbreg[32]; \ | ||||
int pc_dbreg_cmd; \ | int pc_dbreg_cmd; \ | ||||
char __pad[1] | char __pad[27] | ||||
#else | #else | ||||
#define PCPU_MD_FIELDS \ | #define PCPU_MD_FIELDS \ | ||||
vm_offset_t qmap_addr; \ | vm_offset_t qmap_addr; \ | ||||
void *pc_qmap_pte; \ | void *pc_qmap_pte; \ | ||||
char __pad[149] | char __pad[149] | ||||
#endif | #endif | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
▲ Show 20 Lines • Show All 80 Lines • Show Last 20 Lines |
I suggest to use the following names for new fields:
pc_cmaps_lock ... lock used for cmaps mappings
pc_cmap1_pte2p ... pte2 pointer for cmap1 mapping
pc_cmap2_pte2p ... pte2 pointer for cmap2 mapping
pc_cmap1_addr ... address (KVA) of cmap1 mapping
pc_cmap2_addr ... address (KVA) of cmap2 mapping
We strictly distinguish pt1_entry_t from pt2_entry_t and value from pointer. I.e.:
pt1_entry_t -> pte1
pt1_entry_t* -> pte1p
pt2_entry_t -> pte2
pt2_entry_t* -> pte2p
Using pte1 name for pt2_entry_t should be avoided.