I am developing a cpufreq driver (as a loadable kernel module) for the microblaze architecture. I have some FPGA logic that is able to scale the on-system clock and it works quite well. I have followed the information in Documentation/cpu-freq/cpu-drivers.txt
and looked at the model in the blackfin cpufreq driver.
I have also made the necessary changes to arch/microblaze/Kconfig
in order to have the cpufreq options built into the kernel (not modules).
When I first loaded the driver, cpufreq_register_driver()
was returning -ENODEV, which implied that it couldn't find a CPU. I set the driver flag to CPUFREQ_STICKY and was able to insert the module.
However, at this point I realized that /sys/devices/system/cpu/cpu0
isn't present (although /sys/devices/system/cpu/cpufreq
is there). So, why is that? What part of the kernel code is responsible for creating that directory?