Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146710954
D24908.id.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.id.diff
View Options
Index: head/sys/powerpc/aim/mmu_radix.c
===================================================================
--- head/sys/powerpc/aim/mmu_radix.c
+++ head/sys/powerpc/aim/mmu_radix.c
@@ -2327,6 +2327,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
Index: head/sys/powerpc/aim/trap_subr64.S
===================================================================
--- head/sys/powerpc/aim/trap_subr64.S
+++ head/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: head/sys/powerpc/include/pcpu.h
===================================================================
--- head/sys/powerpc/include/pcpu.h
+++ head/sys/powerpc/include/pcpu.h
@@ -50,6 +50,7 @@
int pc_bsp; \
volatile int pc_awake; \
uint32_t pc_ipimask; \
+ uint32_t pc_flags; /* cpu feature flags */ \
register_t pc_tempsave[CPUSAVE_LEN]; \
register_t pc_disisave[CPUSAVE_LEN]; \
register_t pc_dbsave[CPUSAVE_LEN]; \
@@ -76,6 +77,9 @@
#else
#define PCPU_MD_AIM_FIELDS PCPU_MD_AIM32_FIELDS
#endif
+
+/* CPU feature flags, can be used for cached flow control. */
+#define PC_FLAG_NOSRS 0x80000000
#define BOOKE_CRITSAVE_LEN (CPUSAVE_LEN + 2)
#define BOOKE_TLB_MAXNEST 4
Index: head/sys/powerpc/powerpc/db_interface.c
===================================================================
--- head/sys/powerpc/powerpc/db_interface.c
+++ head/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: head/sys/powerpc/powerpc/genassym.c
===================================================================
--- head/sys/powerpc/powerpc/genassym.c
+++ head/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__
Index: head/sys/powerpc/powerpc/mp_machdep.c
===================================================================
--- head/sys/powerpc/powerpc/mp_machdep.c
+++ head/sys/powerpc/powerpc/mp_machdep.c
@@ -246,6 +246,7 @@
printf("Waking up CPU %d (dev=%x)\n",
pc->pc_cpuid, (int)pc->pc_hwref);
+ pc->pc_flags = PCPU_GET(flags); /* Copy cached CPU flags */
ret = platform_smp_start_cpu(pc);
if (ret == 0) {
timeout = 2000; /* wait 2sec for the AP */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 5, 10:33 PM (9 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29301044
Default Alt Text
D24908.id.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