aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorShilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>2016-02-11 13:01:45 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-02-23 17:22:42 +1100
commitf7ad0d75f45130e0cec6787a7629da47f5f40f21 (patch)
tree9928dbf89b0f0c60d3ec667f14dd47716e0555f4 /include
parent48ab7ce095047c06191f1b06fc4704311c4dabda (diff)
downloadskiboot-f7ad0d75f45130e0cec6787a7629da47f5f40f21.zip
skiboot-f7ad0d75f45130e0cec6787a7629da47f5f40f21.tar.gz
skiboot-f7ad0d75f45130e0cec6787a7629da47f5f40f21.tar.bz2
cpu: Add helper function to return number of cores available in the chip
get_available_nr_cores_in_chip() takes 'chip_id' as an argument and returns the number of available cores in the chip. Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/cpu.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/cpu.h b/include/cpu.h
index 982b48a..9eaf59c 100644
--- a/include/cpu.h
+++ b/include/cpu.h
@@ -166,6 +166,7 @@ extern struct cpu_thread *next_available_cpu(struct cpu_thread *cpu);
extern struct cpu_thread *first_available_core_in_chip(u32 chip_id);
extern struct cpu_thread *next_available_core_in_chip(struct cpu_thread *cpu, u32 chip_id);
+extern u8 get_available_nr_cores_in_chip(u32 chip_id);
#define for_each_available_core_in_chip(core, chip_id) \
for (core = first_available_core_in_chip(chip_id); core; \