Re: [PATCH] Add idle power save for ppc 4xx

2008-04-01 Thread Josh Boyer
On Tue, 1 Apr 2008 15:00:38 +1100 Paul Mackerras [EMAIL PROTECTED] wrote: Josh Boyer writes: Actually, you probably don't want this as a property in the device tree. It doesn't describe hardware. A Kconfig option might be warranted though. In general it is valid to have properties

Re: [kvm-ppc-devel] [PATCH] Add idle power save for ppc 4xx

2008-04-01 Thread Josh Boyer
On Tue, 2008-04-01 at 08:01 -0400, Jimi Xenidis wrote: On Mar 31, 2008, at 11:15 PM, Josh Boyer wrote: On Tue, 2008-04-01 at 12:04 +1100, Michael Ellerman wrote: I'm assuming you pass a dtb to the virtual guest when you start it up. Could you define a property in the CPU node there

Re: [kvm-ppc-devel] [PATCH] Add idle power save for ppc 4xx

2008-04-01 Thread Arnd Bergmann
On Monday 31 March 2008, Jerone Young wrote: +{ +   unsigned long msr_save; + +   /* set wait state MSR */ +   local_irq_enable(); +   msr_save = mfmsr(); +   mtmsr(msr_save|MSR_WE); Why don't you |MSR_WE|MSR_EE at the same time? You technically can do this. But the

[PATCH] Add idle power save for ppc 4xx

2008-03-31 Thread Jerone Young
# HG changeset patch # User Jerone Young [EMAIL PROTECTED] # Date 1206969060 18000 # Node ID 10aea37177130bbe5de7bee6ec06d9010bc5da1f # Parent 1506aa38ddabb0bf73fff3ac3f3db5f9ef6458cc Add idle power save for ppc 4xx This patch sets the wait state MSR when power_save is called in cpu_idle loop

Re: [kvm-ppc-devel] [PATCH] Add idle power save for ppc 4xx

2008-03-31 Thread Hollis Blanchard
On Mon, 2008-03-31 at 08:12 -0500, Jerone Young wrote: # HG changeset patch # User Jerone Young [EMAIL PROTECTED] # Date 1206969060 18000 # Node ID 10aea37177130bbe5de7bee6ec06d9010bc5da1f # Parent 1506aa38ddabb0bf73fff3ac3f3db5f9ef6458cc Add idle power save for ppc 4xx This patch sets

Re: [kvm-ppc-devel] [PATCH] Add idle power save for ppc 4xx

2008-03-31 Thread Jerone Young
1506aa38ddabb0bf73fff3ac3f3db5f9ef6458cc Add idle power save for ppc 4xx This patch sets the wait state MSR when power_save is called in cpu_idle loop for ppc4xx. This is mainly to help out virtualization solutions such as KVM. This way the virtualization soultions are able to tell if the guest kernel is idle

Re: [PATCH] Add idle power save for ppc 4xx

2008-03-31 Thread Josh Boyer
On Mon, 2008-03-31 at 08:12 -0500, Jerone Young wrote: # HG changeset patch # User Jerone Young [EMAIL PROTECTED] # Date 1206969060 18000 # Node ID 10aea37177130bbe5de7bee6ec06d9010bc5da1f # Parent 1506aa38ddabb0bf73fff3ac3f3db5f9ef6458cc Add idle power save for ppc 4xx This patch sets

Re: [kvm-ppc-devel] [PATCH] Add idle power save for ppc 4xx

2008-03-31 Thread Josh Boyer
On Mon, 31 Mar 2008 11:52:02 -0500 Jerone Young [EMAIL PROTECTED] wrote: void ppc4xx_idle(void) +{ + unsigned long msr_save; + + /* set wait state MSR */ + local_irq_enable(); + msr_save = mfmsr(); + mtmsr(msr_save|MSR_WE); Why don't you |MSR_WE|MSR_EE at the same

Re: [PATCH] Add idle power save for ppc 4xx

2008-03-31 Thread Jerone Young
10aea37177130bbe5de7bee6ec06d9010bc5da1f # Parent 1506aa38ddabb0bf73fff3ac3f3db5f9ef6458cc Add idle power save for ppc 4xx This patch sets the wait state MSR when power_save is called in cpu_idle loop for ppc4xx. This is mainly to help out virtualization solutions such as KVM. This way

Re: [PATCH] Add idle power save for ppc 4xx

2008-03-31 Thread Jerone Young
1506aa38ddabb0bf73fff3ac3f3db5f9ef6458cc Add idle power save for ppc 4xx This patch sets the wait state MSR when power_save is called in cpu_idle loop for ppc4xx. This is mainly to help out virtualization solutions such as KVM. This way the virtualization soultions are able to tell if the guest kernel is idle. I

Re: [PATCH] Add idle power save for ppc 4xx

2008-03-31 Thread Josh Boyer
On Mon, 2008-03-31 at 13:23 -0500, Jerone Young wrote: diff --git a/arch/powerpc/kernel/idle_4xx.c b/arch/powerpc/kernel/idle_4xx.c new file mode 100644 --- /dev/null +++ b/arch/powerpc/kernel/idle_4xx.c Can this be added to sysdev/ppc4xx_soc.c instead? Probably. Though the

Re: [PATCH] Add idle power save for ppc 4xx

2008-03-31 Thread Hollis Blanchard
10aea37177130bbe5de7bee6ec06d9010bc5da1f # Parent 1506aa38ddabb0bf73fff3ac3f3db5f9ef6458cc Add idle power save for ppc 4xx This patch sets the wait state MSR when power_save is called in cpu_idle loop for ppc4xx. This is mainly to help out virtualization solutions such as KVM. This way

Re: [PATCH] Add idle power save for ppc 4xx

2008-03-31 Thread Josh Boyer
[EMAIL PROTECTED] # Date 1206969060 18000 # Node ID 10aea37177130bbe5de7bee6ec06d9010bc5da1f # Parent 1506aa38ddabb0bf73fff3ac3f3db5f9ef6458cc Add idle power save for ppc 4xx This patch sets the wait state MSR when power_save is called in cpu_idle loop for ppc4xx. This is mainly

Re: [PATCH] Add idle power save for ppc 4xx

2008-03-31 Thread Hollis Blanchard
Young wrote: # HG changeset patch # User Jerone Young [EMAIL PROTECTED] # Date 1206969060 18000 # Node ID 10aea37177130bbe5de7bee6ec06d9010bc5da1f # Parent 1506aa38ddabb0bf73fff3ac3f3db5f9ef6458cc Add idle power save for ppc 4xx This patch sets the wait state MSR when

Re: [PATCH] Add idle power save for ppc 4xx

2008-03-31 Thread Michael Ellerman
[EMAIL PROTECTED] # Date 1206969060 18000 # Node ID 10aea37177130bbe5de7bee6ec06d9010bc5da1f # Parent 1506aa38ddabb0bf73fff3ac3f3db5f9ef6458cc Add idle power save for ppc 4xx This patch sets the wait state MSR when power_save is called in cpu_idle loop for ppc4xx

Re: [PATCH] Add idle power save for ppc 4xx

2008-03-31 Thread Josh Boyer
On Tue, 2008-04-01 at 12:04 +1100, Michael Ellerman wrote: I'm assuming you pass a dtb to the virtual guest when you start it up. Could you define a property in the CPU node there that can be parsed to use the power_save function instead of always making it the default?

Re: [PATCH] Add idle power save for ppc 4xx

2008-03-31 Thread Michael Ellerman
On Mon, 2008-03-31 at 22:15 -0500, Josh Boyer wrote: On Tue, 2008-04-01 at 12:04 +1100, Michael Ellerman wrote: I'm assuming you pass a dtb to the virtual guest when you start it up. Could you define a property in the CPU node there that can be parsed to use the power_save