Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151669369
D24908.id71971.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D24908.id71971.diff
View Options
Index: sys/powerpc/aim/mmu_radix.c
===================================================================
--- sys/powerpc/aim/mmu_radix.c
+++ sys/powerpc/aim/mmu_radix.c
@@ -2403,6 +2403,7 @@
printf("%s done\n", __func__);
pmap_bootstrapped = 1;
dmaplimit = roundup2(powerpc_ptob(Maxmem), L2_PAGE_SIZE);
+ PCPU_SET(flags, PCPU_GET(flags) | PC_FLAG_NOSRS);
}
static void
@@ -2422,6 +2423,7 @@
mmu_radix_init_iamr();
mmu_radix_pid_set(kernel_pmap);
mmu_radix_tlbiel_flush(TLB_INVAL_SCOPE_GLOBAL);
+ PCPU_SET(flags, PCPU_GET(flags) | PC_FLAG_NOSRS);
}
static SYSCTL_NODE(_vm_pmap, OID_AUTO, l3e, CTLFLAG_RD, 0,
Index: sys/powerpc/aim/trap_subr64.S
===================================================================
--- sys/powerpc/aim/trap_subr64.S
+++ sys/powerpc/aim/trap_subr64.S
@@ -87,6 +87,9 @@
*/
restore_kernsrs:
GET_CPUINFO(%r28)
+ lwz %r29, PC_FLAGS(%r28)
+ mtcr %r29
+ btlr 0
addi %r28,%r28,PC_KERNSLB
ld %r29,16(%r28) /* One past USER_SLB_SLOT */
cmpdi %r29,0
@@ -270,9 +273,13 @@
std %r29,(savearea+CPUSAVE_R29)(%r3); \
std %r30,(savearea+CPUSAVE_R30)(%r3); \
std %r31,(savearea+CPUSAVE_R31)(%r3); \
+ lwz %r28,PC_FLAGS(%r3); \
+ mtcr %r28; \
+ bt 0, 0f; /* Check to skip restoring SRs. */ \
mflr %r27; /* preserve LR */ \
bl restore_usersrs; /* uses r28-r31 */ \
mtlr %r27; \
+0: \
ld %r31,(savearea+CPUSAVE_R31)(%r3); \
ld %r30,(savearea+CPUSAVE_R30)(%r3); \
ld %r29,(savearea+CPUSAVE_R29)(%r3); \
Index: sys/powerpc/include/pcpu.h
===================================================================
--- sys/powerpc/include/pcpu.h
+++ sys/powerpc/include/pcpu.h
@@ -54,7 +54,8 @@
register_t pc_disisave[CPUSAVE_LEN]; \
register_t pc_dbsave[CPUSAVE_LEN]; \
void *pc_restore; \
- vm_offset_t pc_qmap_addr;
+ vm_offset_t pc_qmap_addr; \
+ uint32_t pc_flags; /* cpu feature flags */
#define PCPU_MD_AIM32_FIELDS \
struct pvo_entry *qmap_pvo; \
@@ -77,6 +78,9 @@
#define PCPU_MD_AIM_FIELDS PCPU_MD_AIM32_FIELDS
#endif
+/* CPU feature flags, can be used for cached flow control. */
+#define PC_FLAG_NOSRS 0x00000001
+
#define BOOKE_CRITSAVE_LEN (CPUSAVE_LEN + 2)
#define BOOKE_TLB_MAXNEST 4
#define BOOKE_TLB_SAVELEN 16
Index: sys/powerpc/powerpc/db_interface.c
===================================================================
--- sys/powerpc/powerpc/db_interface.c
+++ sys/powerpc/powerpc/db_interface.c
@@ -91,4 +91,5 @@
db_printf("PPC: hwref = %#zx\n", pc->pc_hwref);
db_printf("PPC: ipimask = %#x\n", pc->pc_ipimask);
+ db_printf("PPC: flags = %#x\n", pc->pc_flags);
}
Index: sys/powerpc/powerpc/genassym.c
===================================================================
--- sys/powerpc/powerpc/genassym.c
+++ sys/powerpc/powerpc/genassym.c
@@ -64,6 +64,7 @@
ASSYM(PC_DISISAVE, offsetof(struct pcpu, pc_disisave));
ASSYM(PC_DBSAVE, offsetof(struct pcpu, pc_dbsave));
ASSYM(PC_RESTORE, offsetof(struct pcpu, pc_restore));
+ASSYM(PC_FLAGS, offsetof(struct pcpu, pc_flags));
#if defined(BOOKE)
ASSYM(PC_BOOKE_CRITSAVE, offsetof(struct pcpu, pc_booke.critsave));
@@ -106,6 +107,7 @@
ASSYM(MTX_LOCK, offsetof(struct mtx, mtx_lock));
+ASSYM(PC_FLAG_NOSRS, PC_FLAG_NOSRS);
#if defined(AIM)
ASSYM(USER_ADDR, USER_ADDR);
#ifdef __powerpc64__
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 10, 9:52 PM (13 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31248310
Default Alt Text
D24908.id71971.diff (3 KB)
Attached To
Mode
D24908: powerpc: Add a (CPU/runtime features) flags set to pcpu struct
Attached
Detach File
Event Timeline
Log In to Comment