summaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2018-05-02 22:35:33 -0600
committerAaron Durbin <adurbin@chromium.org>2018-05-04 14:17:07 +0000
commit4c16f8fe2b4ea5960a860f14086520c4c80122d3 (patch)
tree41c6df9b42029670316899affc99f31be4b569a6 /src/cpu
parentb6616ea636e8343a917f575441e5b5d00a0995df (diff)
downloadcoreboot-4c16f8fe2b4ea5960a860f14086520c4c80122d3.tar.xz
cpu/x86/mp: remove unused functions and limit API exposure
barrier_wait_timeout() was not used anywhere in the code. The remaining two functions, barrier_wait() and release_barrier(), are not used anywhere but the mp code. Change-Id: If09991f95306becc68b6008ae6448695fb4a2dca Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/26021 Reviewed-by: Justin TerAvest <teravest@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/x86/mp_init.c27
1 files changed, 2 insertions, 25 deletions
diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c
index 585a54b86d..f290a48c99 100644
--- a/src/cpu/x86/mp_init.c
+++ b/src/cpu/x86/mp_init.c
@@ -143,37 +143,14 @@ static inline void add_cpu_map_entry(const struct cpu_info *info)
cpus[info->index].default_apic_id = cpuid_ebx(1) >> 24;
}
-inline void barrier_wait(atomic_t *b)
+static inline void barrier_wait(atomic_t *b)
{
while (atomic_read(b) == 0)
asm ("pause");
mfence();
}
-/* Returns 1 if timeout occurs before barier is released.
- * returns 0 if barrier is released before timeout. */
-int barrier_wait_timeout(atomic_t *b, uint32_t timeout_ms)
-{
- int timeout = 0;
- struct mono_time current, end;
-
- timer_monotonic_get(&current);
- end = current;
- mono_time_add_msecs(&end, timeout_ms);
-
- while ((atomic_read(b) == 0) && (!mono_time_after(&current, &end))) {
- timer_monotonic_get(&current);
- asm ("pause");
- }
- mfence();
-
- if (mono_time_after(&current, &end))
- timeout = 1;
-
- return timeout;
-}
-
-inline void release_barrier(atomic_t *b)
+static inline void release_barrier(atomic_t *b)
{
mfence();
atomic_set(b, 1);