aboutsummaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorJason A. Harmening <jah@FreeBSD.org>2017-02-01 03:32:49 +0000
committerJason A. Harmening <jah@FreeBSD.org>2017-02-01 03:32:49 +0000
commit65ed483615b41085f27656c5c68d0ddd1caaf84c (patch)
tree18425fbbcf65a54495ab589b033c5852b640d375 /sys/kern
parent91722a2f0f07767a866255cb45fec29af132a2c2 (diff)
downloadsrc-65ed483615b41085f27656c5c68d0ddd1caaf84c.tar.gz
src-65ed483615b41085f27656c5c68d0ddd1caaf84c.zip
Implement get_pcpu() for the remaining architectures and use it to
replace pcpu_find(curcpu) in MI code.
Notes
Notes: svn path=/head/; revision=313037
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_rmlock.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/kern/kern_rmlock.c b/sys/kern/kern_rmlock.c
index b74253f8a7ab..70f11413ad2b 100644
--- a/sys/kern/kern_rmlock.c
+++ b/sys/kern/kern_rmlock.c
@@ -156,7 +156,7 @@ unlock_rm(struct lock_object *lock)
*/
critical_enter();
td = curthread;
- pc = pcpu_find(curcpu);
+ pc = get_pcpu();
for (queue = pc->pc_rm_queue.rmq_next;
queue != &pc->pc_rm_queue; queue = queue->rmq_next) {
tracker = (struct rm_priotracker *)queue;
@@ -258,7 +258,7 @@ rm_cleanIPI(void *arg)
struct rmlock *rm = arg;
struct rm_priotracker *tracker;
struct rm_queue *queue;
- pc = pcpu_find(curcpu);
+ pc = get_pcpu();
for (queue = pc->pc_rm_queue.rmq_next; queue != &pc->pc_rm_queue;
queue = queue->rmq_next) {
@@ -355,7 +355,7 @@ _rm_rlock_hard(struct rmlock *rm, struct rm_priotracker *tracker, int trylock)
struct pcpu *pc;
critical_enter();
- pc = pcpu_find(curcpu);
+ pc = get_pcpu();
/* Check if we just need to do a proper critical_exit. */
if (!CPU_ISSET(pc->pc_cpuid, &rm->rm_writecpus)) {
@@ -416,7 +416,7 @@ _rm_rlock_hard(struct rmlock *rm, struct rm_priotracker *tracker, int trylock)
}
critical_enter();
- pc = pcpu_find(curcpu);
+ pc = get_pcpu();
CPU_CLR(pc->pc_cpuid, &rm->rm_writecpus);
rm_tracker_add(pc, tracker);
sched_pin();
@@ -641,7 +641,7 @@ _rm_rlock_debug(struct rmlock *rm, struct rm_priotracker *tracker,
#ifdef INVARIANTS
if (!(rm->lock_object.lo_flags & LO_RECURSABLE) && !trylock) {
critical_enter();
- KASSERT(rm_trackers_present(pcpu_find(curcpu), rm,
+ KASSERT(rm_trackers_present(get_pcpu(), rm,
curthread) == 0,
("rm_rlock: recursed on non-recursive rmlock %s @ %s:%d\n",
rm->lock_object.lo_name, file, line));
@@ -771,7 +771,7 @@ _rm_assert(const struct rmlock *rm, int what, const char *file, int line)
}
critical_enter();
- count = rm_trackers_present(pcpu_find(curcpu), rm, curthread);
+ count = rm_trackers_present(get_pcpu(), rm, curthread);
critical_exit();
if (count == 0)
@@ -797,7 +797,7 @@ _rm_assert(const struct rmlock *rm, int what, const char *file, int line)
rm->lock_object.lo_name, file, line);
critical_enter();
- count = rm_trackers_present(pcpu_find(curcpu), rm, curthread);
+ count = rm_trackers_present(get_pcpu(), rm, curthread);
critical_exit();
if (count != 0)