ide/pci: convert to qdev.
[qemu] / target-ppc / exec.h
index bfa8d8e..ef1e44b 100644 (file)
@@ -14,8 +14,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 #if !defined (__PPC_H__)
 #define __PPC_H__
@@ -27,7 +26,7 @@
 #include "cpu.h"
 #include "exec-all.h"
 
-/* Precise emulation is need to correctly emulation exception flags */
+/* Precise emulation is needed to correctly emulate exception flags */
 #define USE_PRECISE_EMULATION 1
 
 register struct CPUPPCState *env asm(AREG0);
@@ -36,19 +35,25 @@ register struct CPUPPCState *env asm(AREG0);
 #include "softmmu_exec.h"
 #endif /* !defined(CONFIG_USER_ONLY) */
 
-static always_inline void env_to_regs (void)
+static inline void env_to_regs(void)
 {
 }
 
-static always_inline void regs_to_env (void)
+static inline void regs_to_env(void)
 {
 }
 
-static always_inline int cpu_halted (CPUState *env)
+static inline int cpu_has_work(CPUState *env)
+{
+    return (msr_ee && (env->interrupt_request & CPU_INTERRUPT_HARD));
+}
+
+
+static inline int cpu_halted(CPUState *env)
 {
     if (!env->halted)
         return 0;
-    if (msr_ee && (env->interrupt_request & CPU_INTERRUPT_HARD)) {
+    if (cpu_has_work(env)) {
         env->halted = 0;
         return 0;
     }