From owner-svn-src-stable-11@freebsd.org Fri Dec 23 03:14:06 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBA13C8C4EB; Fri, 23 Dec 2016 03:14:06 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A073F1EC0; Fri, 23 Dec 2016 03:14:06 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBN3E5kM094666; Fri, 23 Dec 2016 03:14:05 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBN3E5wV094664; Fri, 23 Dec 2016 03:14:05 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201612230314.uBN3E5wV094664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 23 Dec 2016 03:14:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310441 - in stable/11/sys/powerpc: mpc85xx powerpc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2016 03:14:07 -0000 Author: jhibbits Date: Fri Dec 23 03:14:05 2016 New Revision: 310441 URL: https://svnweb.freebsd.org/changeset/base/310441 Log: MFC r305320,r306702: r305320: Use the right ifdef macro. r306702: Fix e500mc/derivatives cpu idle Modified: stable/11/sys/powerpc/mpc85xx/platform_mpc85xx.c stable/11/sys/powerpc/powerpc/cpu.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/powerpc/mpc85xx/platform_mpc85xx.c ============================================================================== --- stable/11/sys/powerpc/mpc85xx/platform_mpc85xx.c Fri Dec 23 03:08:27 2016 (r310440) +++ stable/11/sys/powerpc/mpc85xx/platform_mpc85xx.c Fri Dec 23 03:14:05 2016 (r310441) @@ -541,9 +541,11 @@ mpc85xx_idle(platform_t plat, int cpu) uint32_t reg; if (mpc85xx_is_qoriq()) { - reg = ccsr_read4(OCP85XX_RCPM_CDOZCR); - ccsr_write4(OCP85XX_RCPM_CDOZCR, reg | (1 << cpu)); - ccsr_read4(OCP85XX_RCPM_CDOZCR); + /* + * Base binutils doesn't know what the 'wait' instruction is, so + * use the opcode encoding here. + */ + __asm __volatile("wrteei 1; .long 0x7c00007c"); } else { reg = mfmsr(); /* Freescale E500 core RM section 6.4.1. */ @@ -555,15 +557,6 @@ mpc85xx_idle(platform_t plat, int cpu) static int mpc85xx_idle_wakeup(platform_t plat, int cpu) { - uint32_t reg; - - if (mpc85xx_is_qoriq()) { - reg = ccsr_read4(OCP85XX_RCPM_CDOZCR); - ccsr_write4(OCP85XX_RCPM_CDOZCR, reg & ~(1 << cpu)); - ccsr_read4(OCP85XX_RCPM_CDOZCR); - - return (1); - } return (0); } Modified: stable/11/sys/powerpc/powerpc/cpu.c ============================================================================== --- stable/11/sys/powerpc/powerpc/cpu.c Fri Dec 23 03:08:27 2016 (r310440) +++ stable/11/sys/powerpc/powerpc/cpu.c Fri Dec 23 03:14:05 2016 (r310441) @@ -663,7 +663,7 @@ static void cpu_idle_booke(sbintime_t sbt) { -#ifdef E500 +#ifdef BOOKE_E500 platform_cpu_idle(PCPU_GET(cpuid)); #endif }