[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH v5 3/7] cpus: Add a macro to walk CPUs in reverse
From: |
Bharata B Rao |
Subject: |
[Qemu-ppc] [PATCH v5 3/7] cpus: Add a macro to walk CPUs in reverse |
Date: |
Tue, 16 Jun 2015 11:00:14 +0530 |
Add CPU_FOREACH_REVERSE that walks CPUs in reverse.
Needed for PowerPC CPU device tree reorganization.
Signed-off-by: Bharata B Rao <address@hidden>
Reviewed-by: Andreas Färber <address@hidden>
---
include/qom/cpu.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index 39f0f19..42f42f5 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -323,6 +323,8 @@ extern struct CPUTailQ cpus;
#define CPU_FOREACH(cpu) QTAILQ_FOREACH(cpu, &cpus, node)
#define CPU_FOREACH_SAFE(cpu, next_cpu) \
QTAILQ_FOREACH_SAFE(cpu, &cpus, node, next_cpu)
+#define CPU_FOREACH_REVERSE(cpu) \
+ QTAILQ_FOREACH_REVERSE(cpu, &cpus, CPUTailQ, node)
#define first_cpu QTAILQ_FIRST(&cpus)
DECLARE_TLS(CPUState *, current_cpu);
--
2.1.0
- [Qemu-ppc] [PATCH v5 0/7] sPAPR CPU hotplug pre-requisites, Bharata B Rao, 2015/06/16
- [Qemu-ppc] [PATCH v5 1/7] spapr: Consider max_cpus during xics initialization, Bharata B Rao, 2015/06/16
- [Qemu-ppc] [PATCH v5 2/7] spapr: Support ibm, lrdr-capacity device tree property, Bharata B Rao, 2015/06/16
- [Qemu-ppc] [PATCH v5 3/7] cpus: Add a macro to walk CPUs in reverse,
Bharata B Rao <=
- [Qemu-ppc] [PATCH v5 5/7] spapr: Consolidate cpu init code into a routine, Bharata B Rao, 2015/06/16
- [Qemu-ppc] [PATCH v5 4/7] spapr: Reorganize CPU dt generation code, Bharata B Rao, 2015/06/16
- [Qemu-ppc] [PATCH v5 6/7] ppc: Update cpu_model in MachineState, Bharata B Rao, 2015/06/16
- [Qemu-ppc] [PATCH v5 7/7] xics_kvm: Don't enable KVM_CAP_IRQ_XICS if already enabled, Bharata B Rao, 2015/06/16
- Re: [Qemu-ppc] [PATCH v5 0/7] sPAPR CPU hotplug pre-requisites, David Gibson, 2015/06/18