git: 8d672e8449c8 - stable/13 - ofw_cpu: Make ext_resources non-optional for arm* and riscv
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 16 May 2022 12:09:51 UTC
The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=8d672e8449c877b2772d5f7b0a3dc1b7123ad226 commit 8d672e8449c877b2772d5f7b0a3dc1b7123ad226 Author: Emmanuel Vadot <manu@FreeBSD.org> AuthorDate: 2022-01-11 10:08:18 +0000 Commit: Emmanuel Vadot <manu@FreeBSD.org> CommitDate: 2022-05-16 11:45:38 +0000 ofw_cpu: Make ext_resources non-optional for arm* and riscv EXT_RESOURCES have been introduced in 12-CURRENT and all supported releases have it enabled in their kernel config. For RISC-V it was always enabled. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D33835 (cherry picked from commit 02398e581d4511bd1c5e8ffad5155f9b9684b4b8) --- sys/dev/ofw/ofw_cpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/ofw/ofw_cpu.c b/sys/dev/ofw/ofw_cpu.c index 293d765e8cbd..a033c7ef8725 100644 --- a/sys/dev/ofw/ofw_cpu.c +++ b/sys/dev/ofw/ofw_cpu.c @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); #include <dev/ofw/ofw_bus_subr.h> #include <dev/ofw/ofw_cpu.h> -#ifdef EXT_RESOURCES +#if defined(__arm__) || defined(__arm64__) || defined(__riscv__) #include <dev/extres/clk/clk.h> #endif @@ -207,7 +207,7 @@ ofw_cpu_attach(device_t dev) phandle_t node; pcell_t cell; int rv; -#ifdef EXT_RESOURCES +#if defined(__arm__) || defined(__arm64__) || defined(__riscv__) clk_t cpuclk; uint64_t freq; #endif @@ -277,7 +277,7 @@ ofw_cpu_attach(device_t dev) sc->sc_cpu_pcpu = pcpu_find(device_get_unit(dev)); if (OF_getencprop(node, "clock-frequency", &cell, sizeof(cell)) < 0) { -#ifdef EXT_RESOURCES +#if defined(__arm__) || defined(__arm64__) || defined(__riscv__) rv = clk_get_by_ofw_index(dev, 0, 0, &cpuclk); if (rv == 0) { rv = clk_get_freq(cpuclk, &freq);