est.c (176649) | est.c (176714) |
---|---|
1/*- 2 * Copyright (c) 2004 Colin Percival 3 * Copyright (c) 2005 Nate Lawson 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted providing that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 23 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 * POSSIBILITY OF SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2004 Colin Percival 3 * Copyright (c) 2005 Nate Lawson 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted providing that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 23 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 * POSSIBILITY OF SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/sys/i386/cpufreq/est.c 176649 2008-02-28 19:10:42Z rpaulo $"); | 29__FBSDID("$FreeBSD: head/sys/i386/cpufreq/est.c 176714 2008-03-01 21:58:34Z gibbs $"); |
30 31#include <sys/param.h> 32#include <sys/bus.h> 33#include <sys/cpu.h> 34#include <sys/kernel.h> 35#include <sys/malloc.h> 36#include <sys/module.h> 37#include <sys/smp.h> --- 1048 unchanged lines hidden (view full) --- 1086 return (ENXIO); 1087 1088 /* Fetch settings from acpi_perf. */ 1089 sc = device_get_softc(dev); 1090 table = NULL; 1091 sets = malloc(MAX_SETTINGS * sizeof(*sets), M_TEMP, M_NOWAIT); 1092 if (sets == NULL) 1093 return (ENOMEM); | 30 31#include <sys/param.h> 32#include <sys/bus.h> 33#include <sys/cpu.h> 34#include <sys/kernel.h> 35#include <sys/malloc.h> 36#include <sys/module.h> 37#include <sys/smp.h> --- 1048 unchanged lines hidden (view full) --- 1086 return (ENXIO); 1087 1088 /* Fetch settings from acpi_perf. */ 1089 sc = device_get_softc(dev); 1090 table = NULL; 1091 sets = malloc(MAX_SETTINGS * sizeof(*sets), M_TEMP, M_NOWAIT); 1092 if (sets == NULL) 1093 return (ENOMEM); |
1094 count = MAX_SETTINGS; |
|
1094 error = CPUFREQ_DRV_SETTINGS(perf_dev, sets, &count); 1095 if (error) 1096 goto out; 1097 1098 /* Parse settings into our local table format. */ 1099 table = malloc((count + 1) * sizeof(freq_info), M_DEVBUF, M_NOWAIT); 1100 if (table == NULL) { 1101 error = ENOMEM; --- 195 unchanged lines hidden --- | 1095 error = CPUFREQ_DRV_SETTINGS(perf_dev, sets, &count); 1096 if (error) 1097 goto out; 1098 1099 /* Parse settings into our local table format. */ 1100 table = malloc((count + 1) * sizeof(freq_info), M_DEVBUF, M_NOWAIT); 1101 if (table == NULL) { 1102 error = ENOMEM; --- 195 unchanged lines hidden --- |