Subject: Re: Making a common API for cpu frequency drivers
To: None <tech-kern@netbsd.org>
From: Juan RP <juan@xtrarom.org>
List: tech-kern
Date: 09/03/2006 20:50:37
On Sun, 3 Sep 2006 20:40:53 +0200
Juan RP <juan@xtrarom.org> wrote:
>
> I have the following code:
>
> http://www.xtrarom.org/~juan/sysmon_cpufreq/cpufreq.diff <- kernel
> part http://www.xtrarom.org/~juan/sysmon_cpufreq/dict_kern.c <-
> userland
>
> But when I run it, prop_dictionary_recv_ioctl returns:
>
> [juan@nocturno][~/proplib_tests/dict_kern]> ./dict_kern
> dict_kern: rval=5: Undefined error: 0
> [juan@nocturno][~/proplib_tests/dict_kern]>
>
> I can see the following kernel printfs:
>
> sysmonioctl_cpufreq: before the for loop
> sysmonioctl_cpufreq: before the 2nd for loop
> sysmonioctl_cpufreq: prop_dictionary_set called
> sysmonioctl_cpufreq: before the 2nd for loop
> sysmonioctl_cpufreq: prop_dictionary_set called
> sysmonioctl_cpufreq: before copyout_ioctl
> sysmonioctl_cpufreq: error=0
> sysmonioctl_cpufreq: after copyout_ioctl
> sysmonioctl_cpufreq: prop_object_release called
>
> prop_dictionary_copyout_ioctl returns 0.
And yes, /dev/cpufreq exists:
[juan@nocturno][~/proplib_tests/dict_kern]> ls -l /dev/cpufreq
crw-r--r-- 1 root wheel 67, 3 Sep 3 15:58 /dev/cpufreq
[juan@nocturno][~/proplib_tests/dict_kern]>