Created
April 8, 2014 12:43
-
-
Save pfactum/10118357 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 65caaf18dbf2374adc7cb6c78043c704961704d5 Mon Sep 17 00:00:00 2001 | |
From: Oleksandr Natalenko <oleksandr@natalenko.name> | |
Date: Thu, 12 Dec 2013 16:58:39 +0200 | |
Subject: [PATCH 1/3] ck-3.12: fix BFS compiling with CONFIG_SMP=n | |
--- | |
kernel/sched/bfs.c | 5 ----- | |
kernel/sched/bfs_sched.h | 8 ++++++++ | |
2 files changed, 8 insertions(+), 5 deletions(-) | |
diff --git a/kernel/sched/bfs.c b/kernel/sched/bfs.c | |
index 7b09696..d3af60c 100644 | |
--- a/kernel/sched/bfs.c | |
+++ b/kernel/sched/bfs.c | |
@@ -316,11 +316,6 @@ static inline void update_clocks(struct rq *rq) | |
rq->last_niffy = grq.niffies; | |
} | |
#else /* CONFIG_SMP */ | |
-static struct rq *uprq; | |
-#define cpu_rq(cpu) (uprq) | |
-#define this_rq() (uprq) | |
-#define task_rq(p) (uprq) | |
-#define cpu_curr(cpu) ((uprq)->curr) | |
static inline int cpu_of(struct rq *rq) | |
{ | |
return 0; | |
diff --git a/kernel/sched/bfs_sched.h b/kernel/sched/bfs_sched.h | |
index 92847a3..b185376 100644 | |
--- a/kernel/sched/bfs_sched.h | |
+++ b/kernel/sched/bfs_sched.h | |
@@ -89,6 +89,14 @@ struct rq { | |
struct rq *cpu_rq(int cpu); | |
#endif | |
+#ifndef CONFIG_SMP | |
+static struct rq *uprq; | |
+#define cpu_rq(cpu) (uprq) | |
+#define this_rq() (uprq) | |
+#define task_rq(p) (uprq) | |
+#define cpu_curr(cpu) ((uprq)->curr) | |
+#endif /* CONFIG_SMP */ | |
+ | |
static inline u64 rq_clock(struct rq *rq) | |
{ | |
return rq->clock; | |
-- | |
1.9.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment