[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 04/19] x86/cpufreq: continue looping other than -EBUSY or successful return
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Penny Zheng <Penny.Zheng@xxxxxxx>
- Date: Fri, 11 Jul 2025 11:50:51 +0800
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=csUm6MQZ2YF7odyOgUXFh5L1IPB/rJvNmUyhadixoYA=; b=xN29tV/LtsbNhuZExhW9Qy9QRaE2ndxKilpObVx4WfKWQOgind0t2rSFwBfjb4Ge071xR69pXSJpXb9F87GzycHGwKdIUJmT8k/qzbun1wWOjlE/62d6HPhHCks49agWcFPF6r29P4KNyGcJ7Slom0yLnstpDUCt6TE8xvoaAY3GenwGxgIly5ObX7vlCuociMfAwoI/GnY8AdZXfyhpzCYjQ7DyGxE2Ph2Rbq9YqGGyVmRfqU/TlNOrtXU2cEIM/eSkZZ4LJcoASilMod2WnuVaZ5Gwng8SrEvesMptGobqmmV8fvZ5+OZQ5MKmy9Mq4gc+3gZvvx6wZvmYrwKn6w==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tgjM4j3DWhIz5EXdI3G7b2oUpqfzcmLRcQOM92HYO/UhDID/4jVgir03KegPnCdBQHnqr0WsLEMqDnYuLinlXXbXsHap463CAc+1rLfQEkGuew7QUNF6lXKWDfneAqpBltWzzUS8lWe1LDMIICTBYFwTc2retMJ0aonxugrHrt0z/7BvZMQouKN9eXySYrMrS2oXrqxieEw096vbrHAk208msLxEBdyLRjIXl4iWGJnQFvAg9WgBLC8j/IU+/gQWC44Vj4zXBRPvYcy27zGTY3STueBGyTWKq6afaxsWbWUYZI1S87TdxDlm/k5t3Rfgba2JLmqfe9/mw+uBriZzCQ==
- Cc: <ray.huang@xxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Fri, 11 Jul 2025 03:51:46 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Right now, only when we failed cpufreq driver registration with -ENODEV, we get
the chance to try the fallback option.
There are two code path erroring out other than -ENODEV in cpufreq driver
registration: one is when the driver itself is broken, like missing mandatory
hooks, cpufreq_register_driver() will fail with -EINVAL, in which we shall
be able to try the fallback option, and the other is -EBUSY due to repeated
registration, in which we shall just exit the loop.
So in conclusion, when error code is -EBUSY or successful return, both
indicating a proper driver is already registered, we shall bail the loop,
other than that, we shall continue to try the fallback option.
Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx>
---
v5 -> v6:
- new commit
---
xen/arch/x86/acpi/cpufreq/cpufreq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/x86/acpi/cpufreq/cpufreq.c
b/xen/arch/x86/acpi/cpufreq/cpufreq.c
index 61e98b67bd..45f301f354 100644
--- a/xen/arch/x86/acpi/cpufreq/cpufreq.c
+++ b/xen/arch/x86/acpi/cpufreq/cpufreq.c
@@ -150,7 +150,7 @@ static int __init cf_check cpufreq_driver_init(void)
break;
}
- if ( ret != -ENODEV )
+ if ( !ret || ret == -EBUSY )
break;
}
break;
--
2.34.1
|