diff options
Diffstat (limited to 'usr/src/uts/sun4u')
-rw-r--r-- | usr/src/uts/sun4u/Makefile.files | 4 | ||||
-rw-r--r-- | usr/src/uts/sun4u/io/cpudrv_mach.c (renamed from usr/src/uts/sun4u/io/cpudrv_plat.c) | 37 | ||||
-rw-r--r-- | usr/src/uts/sun4u/sys/cpudrv_mach.h (renamed from usr/src/uts/sun4u/sys/cpudrv_plat.h) | 38 |
3 files changed, 47 insertions, 32 deletions
diff --git a/usr/src/uts/sun4u/Makefile.files b/usr/src/uts/sun4u/Makefile.files index 14f6737fd2..1d7d978a4f 100644 --- a/usr/src/uts/sun4u/Makefile.files +++ b/usr/src/uts/sun4u/Makefile.files @@ -23,8 +23,6 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # This Makefile defines all file modules for the directory uts/sun4u # and it's children. These are the source files which are sun4u # "implementation architecture" dependent. @@ -97,7 +95,7 @@ PSYCHO_PCI_OBJS += $(PCI_COMMON_OBJS) pcipsy.o SCHIZO_PCI_OBJS += $(PCI_COMMON_OBJS) pcisch_asm.o pcisch.o pcix.o SIMBA_PCI_OBJS += simba.o DB21554_OBJS += db21554.o -US_OBJS += cpudrv.o cpudrv_plat.o +US_OBJS += cpudrv.o cpudrv_mach.o POWER_OBJS += power.o EPIC_OBJS += epic.o GRBEEP_OBJS += grbeep.o diff --git a/usr/src/uts/sun4u/io/cpudrv_plat.c b/usr/src/uts/sun4u/io/cpudrv_mach.c index 724cc48479..a9ca3debb4 100644 --- a/usr/src/uts/sun4u/io/cpudrv_plat.c +++ b/usr/src/uts/sun4u/io/cpudrv_mach.c @@ -19,21 +19,20 @@ * CDDL HEADER END */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* - * CPU power management driver platform support. + * CPU power management driver support for sun4u. */ #include <sys/ddi.h> #include <sys/sunddi.h> -#include <sys/cpudrv_plat.h> -#include <sys/cpudrv.h> +#include <sys/cpudrv_mach.h> #include <sys/machsystm.h> +boolean_t cpudrv_enabled = B_TRUE; + /* * Change CPU speed. */ @@ -55,39 +54,49 @@ cpudrv_pm_get_cpu_id(dev_info_t *dip, processorid_t *cpu_id) } /* - * A noop for this platform. + * A noop for this machine type. */ boolean_t -cpudrv_pm_all_instances_ready(void) +cpudrv_pm_power_ready(void) { return (B_TRUE); } /* - * A noop for this platform. + * A noop for this machine type. */ /* ARGSUSED */ boolean_t -cpudrv_pm_is_throttle_thread(cpudrv_pm_t *cpupm) +cpudrv_pm_is_governor_thread(cpudrv_pm_t *cpupm) { return (B_FALSE); } /* - * A noop for this platform. + * A noop for this machine type. */ /*ARGSUSED*/ boolean_t -cpudrv_pm_init_module(cpudrv_devstate_t *cpudsp) +cpudrv_mach_pm_init(cpudrv_devstate_t *cpudsp) { return (B_TRUE); } /* - * A noop for this platform. + * A noop for this machine type. */ /*ARGSUSED*/ void -cpudrv_pm_free_module(cpudrv_devstate_t *cpudsp) +cpudrv_mach_pm_free(cpudrv_devstate_t *cpudsp) { } + +/* + * On SPARC all instances support power management unless attach fails. + * In the case of attach failure, cpupm_enabled will be false. + */ +boolean_t +cpudrv_pm_enabled() +{ + return (B_TRUE); +} diff --git a/usr/src/uts/sun4u/sys/cpudrv_plat.h b/usr/src/uts/sun4u/sys/cpudrv_mach.h index e2f3946145..cc1536579d 100644 --- a/usr/src/uts/sun4u/sys/cpudrv_plat.h +++ b/usr/src/uts/sun4u/sys/cpudrv_mach.h @@ -19,16 +19,15 @@ * CDDL HEADER END */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#ifndef _SYS_CPUDRV_PLAT_H -#define _SYS_CPUDRV_PLAT_H - -#pragma ident "%Z%%M% %I% %E% SMI" +#ifndef _SYS_CPUDRV_MACH_H +#define _SYS_CPUDRV_MACH_H #include <sys/cpu_module.h> +#include <sys/cpudrv.h> #ifdef __cplusplus extern "C" { @@ -42,27 +41,34 @@ extern "C" { #define CPUDRV_PM_XCALL_IS_READY(cpuid) (CPU_XCALL_READY(cpuid)) /* - * CPU power management is always enabled for this platform. + * If a failure occurs during attach(), then CPU power management + * is disabled. */ -#define CPUDRV_PM_DISABLE() +extern boolean_t cpudrv_enabled; + +#define CPUDRV_PM_DISABLE() (cpudrv_enabled = B_FALSE) + +#define CPUDRV_PM_DISABLED() (!cpudrv_enabled) + +#define CPUDRV_PM_POWER_ENABLED(cpudsp) cpudrv_pm_enabled() /* - * Currently, there is no throttling on this platform. + * Currently, there is no governor on sun4u, */ -#define CPUDRV_PM_RESET_THROTTLE_THREAD(cpupm) +#define CPUDRV_PM_RESET_GOVERNOR_THREAD(cpupm) /* - * Currently, there is no need for a throttling handler on this platform. + * Currently, there is no need for a handler on sun4u. */ -#define CPUDRV_PM_INSTALL_TOPSPEED_CHANGE_HANDLER(cpudsp, dip) +#define CPUDRV_PM_INSTALL_MAX_CHANGE_HANDLER(cpudsp, dip) /* - * There is no notion of changing topspeed on this platform. + * There is no notion of changing topspeed on sun4u. */ #define CPUDRV_PM_REDEFINE_TOPSPEED(dip) /* - * There are no PPM callbacks for this platform. + * There are no PPM callbacks for sun4u. */ #define CPUDRV_PM_SET_PPM_CALLBACKS() @@ -103,7 +109,7 @@ extern "C" { ((hwm * speeds[i - 1]) / speeds[i]) /* - * pm-components property defintions for this platform. + * pm-components property defintions for sun4u. * * Fully constructed pm-components property should be an array of * strings that look something like: @@ -132,8 +138,10 @@ extern "C" { comp_spd, CPUDRV_PM_COMP_OTHER); \ } +extern boolean_t cpudrv_pm_enabled(void); + #ifdef __cplusplus } #endif -#endif /* _SYS_CPUDRV_PLAT_H */ +#endif /* _SYS_CPUDRV_MACH_H */ |