Date: Mon, 22 Nov 2010 17:09:42 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r215692 - stable/8/sys/powerpc/powermac Message-ID: <201011221709.oAMH9gto099026@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: nwhitehorn Date: Mon Nov 22 17:09:42 2010 New Revision: 215692 URL: http://svn.freebsd.org/changeset/base/215692 Log: MFC r215100: Disabling CPU NAP modes during SMU commands is a hack needed only on U3 systems. Don't use it on non-U3 systems to allow cpu_idle() to work correctly. Modified: stable/8/sys/powerpc/powermac/smu.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/powerpc/powermac/smu.c ============================================================================== --- stable/8/sys/powerpc/powermac/smu.c Mon Nov 22 17:06:24 2010 (r215691) +++ stable/8/sys/powerpc/powermac/smu.c Mon Nov 22 17:09:42 2010 (r215692) @@ -89,6 +89,7 @@ struct smu_softc { struct resource *sc_memr; int sc_memrid; + int sc_u3; bus_dma_tag_t sc_dmatag; bus_space_tag_t sc_bt; @@ -243,6 +244,10 @@ smu_attach(device_t dev) sc->sc_cur_cmd = NULL; sc->sc_doorbellirqid = -1; + sc->sc_u3 = 0; + if (OF_finddevice("/u3") != -1) + sc->sc_u3 = 1; + /* * Map the mailbox area. This should be determined from firmware, * but I have not found a simple way to do that. @@ -361,7 +366,9 @@ smu_send_cmd(device_t dev, struct smu_cm mtx_assert(&sc->sc_mtx, MA_OWNED); - powerpc_pow_enabled = 0; /* SMU cannot work if we go to NAP */ + if (sc->sc_u3) + powerpc_pow_enabled = 0; /* SMU cannot work if we go to NAP */ + sc->sc_cur_cmd = cmd; /* Copy the command to the mailbox */ @@ -408,7 +415,8 @@ smu_doorbell_intr(void *xdev) sizeof(sc->sc_cmd->data)); wakeup(sc->sc_cur_cmd); sc->sc_cur_cmd = NULL; - powerpc_pow_enabled = 1; + if (sc->sc_u3) + powerpc_pow_enabled = 1; done: /* Queue next command if one is pending */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011221709.oAMH9gto099026>