Date: Wed, 29 Apr 2020 14:14:15 +0000 (UTC) From: Michal Meloun <mmel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360464 - head/sys/kern Message-ID: <202004291414.03TEEFnl038051@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mmel Date: Wed Apr 29 14:14:15 2020 New Revision: 360464 URL: https://svnweb.freebsd.org/changeset/base/360464 Log: Don't try to set frequendcy for enumerated but newer started CPUs. Openfirmare enumerates and installs the driver for all processors, regardless of whether they will be started later (because of power constrains for example). MFC after: 3 weeks Modified: head/sys/kern/kern_cpu.c Modified: head/sys/kern/kern_cpu.c ============================================================================== --- head/sys/kern/kern_cpu.c Wed Apr 29 14:06:42 2020 (r360463) +++ head/sys/kern/kern_cpu.c Wed Apr 29 14:14:15 2020 (r360464) @@ -325,6 +325,12 @@ cf_set_method(device_t dev, const struct cf_level *lev /* Bind to the target CPU before switching. */ pc = cpu_get_pcpu(set->dev); + + /* Skip settings if CPU is not started. */ + if (pc == NULL) { + error = 0; + goto out; + } thread_lock(curthread); pri = curthread->td_priority; sched_prio(curthread, PRI_MIN);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004291414.03TEEFnl038051>