Thread (1 message) 1 message, 1 author, 2013-07-30

RE: [RFC 2/2] powerpc/cputable: add wait feature for CPU kernel features

From: Wang Dongsheng-B40534 <hidden>
Date: 2013-07-30 03:30:40

-----Original Message-----
From: Wood Scott-B07421
Sent: Tuesday, July 30, 2013 1:27 AM
To: Wang Dongsheng-B40534
Cc: benh@kernel.crashing.org; <redacted>; Zhao Chenhui-
B35336; Li Yang-R58472; Wang Dongsheng-B40534
Subject: Re: [RFC 2/2] powerpc/cputable: add wait feature for CPU kernel
features
=20
On 07/10/2013 03:27:56 AM, Dongsheng Wang wrote:
quoted
From: Wang Dongsheng <redacted>

Signed-off-by: Wang Dongsheng <redacted>
diff --git a/arch/powerpc/include/asm/cputable.h
b/arch/powerpc/include/asm/cputable.h
index 6f3887d..0a8d0cb 100644
--- a/arch/powerpc/include/asm/cputable.h
+++ b/arch/powerpc/include/asm/cputable.h
@@ -138,6 +138,7 @@ extern const char *powerpc_base_platform;
 #define CPU_FTR_NOEXECUTE		ASM_CONST(0x10000000)
 #define CPU_FTR_INDEXED_DCR		ASM_CONST(0x20000000)
 #define CPU_FTR_EMB_HV			ASM_CONST(0x40000000)
+#define CPU_FTR_CAN_WAIT		ASM_CONST(0x80000000)
=20
Note that this is the last 32-bit CPU feature flag; it's time to start
thinking about other mechanisms.  We should probably reserve feature
flags for things that need to use code patching due to being on a
performance critical path, and move other things into struct cpu_spec.
CPU_FTR_CAN_WAIT seems like a good candidate to be moved.
=20
First of all, why should I do, I need to distinguish between the core, whic=
h
is to support the wait instruction. The CPU_FTR_CAN_WAIT looks easy.

How to fix this problem:
1/ I can drop this cpu feature, and move it into struct cpu_spec.
Add a pm_feature in struct cpu_spec? like,

struct cpu_spec {
	...
	unsigned long pm_features;
	...
}

2/ Drop this cpu feature, using CPU_FTRS_E6500/CPU_FTRS_E5500.. to distingu=
ish wait or doze/nap.
Like,

CPU_FTRS_E500/CPU_FTRS_E500_2 support doze/nap.

CPU_FTRS_E500MC/CPU_FTRS_E5500/CPU_FTRS_E6500 support wait.

If using this method, inside the cpuidle driver needs to do a lot of judgme=
nt. So I'm not sure this
is a very good solution.

Thanks.
- dongsheng
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help