[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] x86/Intel: re-indent family 6 switch() in intel_log_freq()


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 14 Feb 2022 10:18:47 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=NHclxgsO2wIjGnas3J2z0bvbE6Wc/i62+cLKn6ifHNc=; b=YiLdY3Fyp3us9kbTfuSb4y5w8coSkobAw3TPbt3FBKC+k8v0Zv6CSf9QD2msHXOH21I+e/FD31EyWKtYEHUt2JZZlF93IlB870bkvAhg10ZwUdwMvxjSLn/9mlrjAVG0XUs3g1JzL2NrjDor30Q1H/KB7+Z1LKwgkXvi2e8++7SBhYsgXym+d+hprP/vJdpYw8un5KoT/y2kWOcRmIRagt2D4KcgKHz9Ig9RWr0DGGPQtd50o8p29eQud/1yTXXrW1TBoKxuy6ID1EGjW6pRSrDsw+moXlocB956NppIHlk38/YpDeLabHUNMEqJ0/EM2N1uQKJpOXfAKNYII9nw4w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k1LZkgtKYVsPRUXovmXXrMqRrl8zc3WwhvukIHx/tzGsdhkcGnbzun8IMUkqus9D6mbpw1FefJjAqUpTnMWuczmi5SsiG9zolshSCiAN7Ur7fJLa4LPaGeQMch6bIwXvEhmNbd1uqvRYyYj7yWC+AnfiwK/4fZKBmhpUyE5XQLpCSxBIeUN4x48hTSKokfsq4NBNTkF8U3YYrsAjqRVUNdFVzrsptSSZg0H1YSU75oNsy4R81IcOe2dO3pbAYRSGilfmeTmd6LQRiBNgaijuNG/0vWpMuprnjnHBHbyBr5MFIhLCH0tC6cRYqGY5mlEWxx37SevnFMQcM5P80Iaobg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 14 Feb 2022 09:19:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

This was left at its previous indentation by e6e3cf191d37 ("x86/Intel:
also display CPU freq for family 0xf") to ease review. Remove the now
unnecessary level of indentation.

No functional change.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/arch/x86/cpu/intel.c
+++ b/xen/arch/x86/cpu/intel.c
@@ -468,35 +468,33 @@ static void intel_log_freq(const struct
         if ( !max_ratio )
             return;
 
+        switch ( c->x86_model )
         {
-            switch ( c->x86_model )
-            {
-            case 0x0e: /* Core */
-            case 0x0f: case 0x16: case 0x17: case 0x1d: /* Core2 */
-                /*
-                 * PLATFORM_INFO, while not documented for these, appears to
-                 * exist in at least some cases, but what it holds doesn't
-                 * match the scheme used by newer CPUs.  At a guess, the min
-                 * and max fields look to be reversed, while the scaling
-                 * factor is encoded in FSB_FREQ.
-                 */
-                if ( min_ratio > max_ratio )
-                    SWAP(min_ratio, max_ratio);
-                if ( rdmsr_safe(MSR_FSB_FREQ, msrval) ||
-                     (msrval &= 7) >= ARRAY_SIZE(core_factors) )
-                    return;
-                factor = core_factors[msrval];
-                break;
+        case 0x0e: /* Core */
+        case 0x0f: case 0x16: case 0x17: case 0x1d: /* Core2 */
+            /*
+             * PLATFORM_INFO, while not documented for these, appears to exist
+             * in at least some cases, but what it holds doesn't match the
+             * scheme used by newer CPUs.  At a guess, the min and max fields
+             * look to be reversed, while the scaling factor is encoded in
+             * FSB_FREQ.
+             */
+            if ( min_ratio > max_ratio )
+                SWAP(min_ratio, max_ratio);
+            if ( rdmsr_safe(MSR_FSB_FREQ, msrval) ||
+                 (msrval &= 7) >= ARRAY_SIZE(core_factors) )
+                return;
+            factor = core_factors[msrval];
+            break;
 
-            case 0x1a: case 0x1e: case 0x1f: case 0x2e: /* Nehalem */
-            case 0x25: case 0x2c: case 0x2f: /* Westmere */
-                factor = 13333;
-                break;
+        case 0x1a: case 0x1e: case 0x1f: case 0x2e: /* Nehalem */
+        case 0x25: case 0x2c: case 0x2f: /* Westmere */
+            factor = 13333;
+            break;
 
-            default:
-                factor = 10000;
-                break;
-            }
+        default:
+            factor = 10000;
+            break;
         }
         break;
 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.