]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/commitdiff
s/Index/Cpu in the SYSTEM code where 'Index' relates to a processor
authorPaul Durrant <pdurrant@amazon.com>
Fri, 27 Nov 2020 10:06:36 +0000 (10:06 +0000)
committerPaul Durrant <pdurrant@amazon.com>
Thu, 3 Dec 2020 08:14:22 +0000 (08:14 +0000)
This is a purely cosmetic patch. No functional change.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
include/xen.h
src/xen/system.c

index 31e95da6fc22d98746053d7049eb4f855232a074..89f68867ad5f9606c0f554e13d0bd0ec63cb6418 100644 (file)
@@ -457,7 +457,7 @@ SystemProcessorCount(
 XEN_API
 NTSTATUS
 SystemVirtualCpuIndex(
-    IN  ULONG           Index,
+    IN  ULONG           Cpu,
     OUT unsigned int    *vcpu_id
     );
 
index 5a8ba16a66607006662fd2b4a79067e30965e7ed..8219c86f832157fa74443a79d7ef6e67eeb3de53 100644 (file)
@@ -578,7 +578,7 @@ SystemProcessorInformation(
 {
     PSYSTEM_CONTEXT     Context = &SystemContext;
     PKEVENT             Event = Argument1;
-    ULONG               Index;
+    ULONG               Cpu;
     PROCESSOR_NUMBER    ProcNumber;
     PSYSTEM_PROCESSOR   Processor;
     ULONG               EAX;
@@ -590,12 +590,12 @@ SystemProcessorInformation(
     UNREFERENCED_PARAMETER(_Context);
     UNREFERENCED_PARAMETER(Argument2);
 
-    Index = KeGetCurrentProcessorNumberEx(&ProcNumber);
-    ASSERT3U(Index, <, Context->ProcessorCount);
+    Cpu = KeGetCurrentProcessorNumberEx(&ProcNumber);
+    ASSERT3U(Cpu, <, Context->ProcessorCount);
 
-    Processor = &Context->Processor[Index];
+    Processor = &Context->Processor[Cpu];
 
-    if (Index == 0) {
+    if (Cpu == 0) {
         CHAR    Signature[13];
 
         RtlZeroMemory(Signature, sizeof (Signature));
@@ -642,14 +642,14 @@ SystemProcessorChangeCallback(
 {
     PSYSTEM_CONTEXT                             Context = &SystemContext;
     PROCESSOR_NUMBER                            ProcNumber;
-    ULONG                                       Index;
+    ULONG                                       Cpu;
     NTSTATUS                                    status;
 
     UNREFERENCED_PARAMETER(Argument);
 
-    Index = Change->NtNumber;
+    Cpu = Change->NtNumber;
 
-    status = KeGetProcessorNumberFromIndex(Index, &ProcNumber);
+    status = KeGetProcessorNumberFromIndex(Cpu, &ProcNumber);
     ASSERT(NT_SUCCESS(status));
 
     Trace("====> (%u:%u:%s)\n",
@@ -662,10 +662,10 @@ SystemProcessorChangeCallback(
         PSYSTEM_PROCESSOR   Processor;
         ULONG               ProcessorCount;
 
-        if (Index < Context->ProcessorCount)
+        if (Cpu < Context->ProcessorCount)
             break;
 
-        ProcessorCount = Index + 1;
+        ProcessorCount = Cpu + 1;
         Processor = __SystemAllocate(sizeof (SYSTEM_PROCESSOR) *
                                      ProcessorCount);
 
@@ -692,9 +692,9 @@ SystemProcessorChangeCallback(
         PSYSTEM_PROCESSOR   Processor;
         KEVENT              Event;
 
-        ASSERT3U(Index, <, Context->ProcessorCount);
+        ASSERT3U(Cpu, <, Context->ProcessorCount);
 
-        Processor = &Context->Processor[Index];
+        Processor = &Context->Processor[Cpu];
 
         KeInitializeEvent(&Event, NotificationEvent, FALSE);
 
@@ -1069,16 +1069,16 @@ SystemProcessorCount(
 XEN_API
 NTSTATUS
 SystemVirtualCpuIndex(
-    IN  ULONG           Index,
+    IN  ULONG           Cpu,
     OUT unsigned int    *vcpu_id
     )
 {
     PSYSTEM_CONTEXT     Context = &SystemContext;
-    PSYSTEM_PROCESSOR   Processor = &Context->Processor[Index];
+    PSYSTEM_PROCESSOR   Processor = &Context->Processor[Cpu];
     NTSTATUS            status;
 
     status = STATUS_UNSUCCESSFUL;
-    if (Index >= __SystemProcessorCount())
+    if (Cpu >= __SystemProcessorCount())
         goto fail1;
 
     *vcpu_id = Processor->ProcessorID;