Make CPU children explicitly share parent unit numbers.Before this device unit number match was coincidental and broke if Idisabled some CPU device(s). Aside of cosmetics, for some drivers(may b
Make CPU children explicitly share parent unit numbers.Before this device unit number match was coincidental and broke if Idisabled some CPU device(s). Aside of cosmetics, for some drivers(may be considered broken) it caused talking to wrong CPUs.(cherry picked from commit d3a8f98acbf51e728411f10c5f179a30b9ca683c)
show more ...
cpufreq: clean up empty lines in .c and .h files
coufreq_dt: Rename DEBUG to DPRINTFDEBUG is a kernel configuration flag and if used cpufreq_dt.c will fail thebuild of kernel.PR: 246867Submitted by: Oskar Holmund ([email protected])M
coufreq_dt: Rename DEBUG to DPRINTFDEBUG is a kernel configuration flag and if used cpufreq_dt.c will fail thebuild of kernel.PR: 246867Submitted by: Oskar Holmund ([email protected])MFC after: 1 weekDifferential Revision: https://reviews.freebsd.org/D25080
cpufreq: Unbreak build.
cpufreq_dt: Fix r358555Before skipping the current cpu when trying to find the ones thathave the same opp, record that this one have this opp.Reported by: mmelMFC after: 2 weeksX-MFC-With: r35
cpufreq_dt: Fix r358555Before skipping the current cpu when trying to find the ones thathave the same opp, record that this one have this opp.Reported by: mmelMFC after: 2 weeksX-MFC-With: r358555
cpufreq_dt: Improve multiple opp supportWhen looking for cpu with the same OPP starts from the root /cpus nodeso each instance of cpufreq_dt will now each cpu with the same operatingpoint.Also t
cpufreq_dt: Improve multiple opp supportWhen looking for cpu with the same OPP starts from the root /cpus nodeso each instance of cpufreq_dt will now each cpu with the same operatingpoint.Also test that the node we are testing have the property "device_type" setto be equal to "cpu".While here add more debug printfs (off by defaults).MFC after: 2 weeks
cpufreq_dt: Do not fetch again hw.ncpuMD code already set the global variable mp_ncpus according tothe tunable hw.ncpu so use the global variable directly.Reported by: ian
cpufreq_dt: Do not attach the device if the cpu isn't presentIf we boot with hw.ncpu=X (available on arm and arm64 at least) weshouldn't attach the cpufreq driver as cf_set_method will try to get
cpufreq_dt: Do not attach the device if the cpu isn't presentIf we boot with hw.ncpu=X (available on arm and arm64 at least) weshouldn't attach the cpufreq driver as cf_set_method will try to getthe cpuid and it doesn't exists.This solves cpufreq panicing on RockChip RK3399 when booting withhw.ncpu=4MFC after: 1 week
Remove "all rights reserved" from copyright for the file I own.Some of the files have both me and Jared McNeill and he gave mepermission to remove it from his files too.
Improve cpufreq_dt. - older DT can use 'cpu0-supply' property for power supply binding. - don't expect that actual CPU frequency is contained in CPU operational point table, but read current CPU
Improve cpufreq_dt. - older DT can use 'cpu0-supply' property for power supply binding. - don't expect that actual CPU frequency is contained in CPU operational point table, but read current CPU voltage directly from reguator. Typically, u-boot can set starting CPU frequency to any value.MFC after: 2 weeks
cpufreq_dt: Add operating-points-v2 supportOppv2 add more flexibility on regulator value for the core voltage amongstother new thing.For now only shared opp table is supported as I don't have har
cpufreq_dt: Add operating-points-v2 supportOppv2 add more flexibility on regulator value for the core voltage amongstother new thing.For now only shared opp table is supported as I don't have hardware withnon-shared opp table.Tested-On: OrangePi One (with oppv1 and oppv2)Tested-On: Pine64-LTS
Align OF_getencprop_alloc API with OF_getencprop and OF_getprop_allocChange OF_getencprop_alloc semantics to be combination of malloc andOF_getencprop and return size of the property, not number o
Align OF_getencprop_alloc API with OF_getencprop and OF_getprop_allocChange OF_getencprop_alloc semantics to be combination of malloc andOF_getencprop and return size of the property, not number of elementsallocated.For the use cases where number of elements is preferred introduceOF_getencprop_alloc_multi helper function that copies semanticsof OF_getencprop_alloc prior to this change.This is to make OF_getencprop_alloc and OF_getencprop_alloc_multifunction signatures consistent with OF_getencprop_alloc andOF_getencprop_alloc_multi.Functionality-wise this patch is mostly rename of OF_getencprop_allocto OF_getencprop_alloc_multi except two calls in ofw_bus_setup_iinfowhere 1 was used as a block size.
sys/dev: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - error
sys/dev: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - errorprone - task.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat the tags are considered only advisory and do not, in any way,superceed or replace the license texts.
Add generic device-tree cpufreq driver.This driver supports two bindings: - cpufreq-dt: systems which share clock and voltage across all CPUs - arm_big_little_dt: systems which share clock and vo
Add generic device-tree cpufreq driver.This driver supports two bindings: - cpufreq-dt: systems which share clock and voltage across all CPUs - arm_big_little_dt: systems which share clock and voltage across all CPUs in a single clusterReviewed by: andrew, impRelnotes: yesDifferential Revision: https://reviews.freebsd.org/D7741
Add a quirk to disable this driver for certain older laptops with an ICH2southbridge and an Intel 82815_MC host bridge where the host bridge'srevision is less than 5.Tested by: miMFC after: 1 we
Add a quirk to disable this driver for certain older laptops with an ICH2southbridge and an Intel 82815_MC host bridge where the host bridge'srevision is less than 5.Tested by: miMFC after: 1 week
Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arraysReviewed by: cognetApproved by: cognet
Attach the cpufreq child devices with specific orders to enforce relativepriority of some of the drivers that manage the same state (e.g. ichss0vs est0). Specifically, powernow, est, and p4tcc are
Attach the cpufreq child devices with specific orders to enforce relativepriority of some of the drivers that manage the same state (e.g. ichss0vs est0). Specifically, powernow, est, and p4tcc are added at order 10,ichss at order 20, and smist at order 30. Previously, some laptops wereseeing both ichss0 and est0 attaching and stomping on each other.XXX: This isn't quite ideal, but works with the existing hacks, I thinkwhat we really want instead is a single "speedstep0" device for CPUsthat the ichss, est, and smist drivers probe (but with differingpriorities).MFC after: 1 week
Probe CPUs after the PCI hierarchy on i386, amd64, and ia64. This allowsthe cpufreq drivers to reliably use properties of PCI devices for quirks,etc.- For the legacy drivers, add CPU devices via
Probe CPUs after the PCI hierarchy on i386, amd64, and ia64. This allowsthe cpufreq drivers to reliably use properties of PCI devices for quirks,etc.- For the legacy drivers, add CPU devices via an identify routine in the CPU driver itself rather than in the legacy driver's attach routine.- Add CPU devices after Host-PCI bridges in the acpi bus driver.- Change the ichss(4) driver to use pci_find_bsf() to locate the ICH and check its device ID rather than having a bogus PCI attachment that only checked for the ID in probe and always failed. As a side effect, you can now kldload ichss after boot.- Fix the ichss(4) driver to use the correct device_t for the ICH (and not for ichss0) when doing PCI config space operations to enable SpeedStep.MFC after: 2 weeksReviewed by: njl, Andriy Gapon avg of icyb.net.ua
Since DELAY() was moved, most <machine/clock.h> #includes have beenunnecessary.
Only activate ICH speedstep if we're going to use it. No bugs were observeddue to this but it's cleaner this way.
Make a pass through all drivers checking specs for desired behavior onSMP systems. It appears all drivers except ichss should attach to eachCPU and that settings should be performed on each CPU.
Make a pass through all drivers checking specs for desired behavior onSMP systems. It appears all drivers except ichss should attach to eachCPU and that settings should be performed on each CPU. Add comments aboutthis. Also, add a guard for p4tcc's identify method being called more thanonce.
Support disabling individual cpufreq drivers with hints, e.g.,hint.ichss.0.disabled="1"
Don't attach ichss if est is present. On systems that seem to support both,the multi-setting EST is preferable.
Introduce a new method, cpufreq_drv_type(), that returns the type of thedriver. This used to be handled by cpufreq_drv_settings() but it'suseful to get the type/flags separately from getting the s
Introduce a new method, cpufreq_drv_type(), that returns the type of thedriver. This used to be handled by cpufreq_drv_settings() but it'suseful to get the type/flags separately from getting the settings.(For example, you don't have to pass an array of cf_setting just to findthe driver type.)Use this new method in our in-tree drivers to detect reliably if acpi_perfis present and owns the hardware. This simplifies logic in drivers as wellas fixing a bug introduced in my last commit where too many drivers attached.
Fix the check for acpi_perf(4) so that we verify if it is fully attachedor just offering info. In the former case, we don't probe/attach to allowthe ACPI driver precedence. A refinement of this w
Fix the check for acpi_perf(4) so that we verify if it is fully attachedor just offering info. In the former case, we don't probe/attach to allowthe ACPI driver precedence. A refinement of this would be to actuallyuse the info provided by acpi_perf(4) to get the real CPU clock ratesinstead of estimating them but since all systems that support bothacpi_perf(4) and ichss(4) export the control registers to acpi_perf(4),it can just handle the registers on its own.
12