Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/aarch64/aarch64 Use __SHIFTOUT to extract MPIDR aff...
details: https://anonhg.NetBSD.org/src/rev/8019a23fc7de
branches: trunk
changeset: 365543:8019a23fc7de
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Mon Aug 20 18:13:56 2018 +0000
description:
Use __SHIFTOUT to extract MPIDR affinity levels
diffstat:
sys/arch/aarch64/aarch64/cpu.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (36 lines):
diff -r cf6592ce159e -r 8019a23fc7de sys/arch/aarch64/aarch64/cpu.c
--- a/sys/arch/aarch64/aarch64/cpu.c Mon Aug 20 15:04:51 2018 +0000
+++ b/sys/arch/aarch64/aarch64/cpu.c Mon Aug 20 18:13:56 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.4 2018/07/31 07:00:48 skrll Exp $ */
+/* $NetBSD: cpu.c,v 1.5 2018/08/20 18:13:56 jmcneill Exp $ */
/*
* Copyright (c) 2017 Ryo Shimizu <ryo%nerv.org@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: cpu.c,v 1.4 2018/07/31 07:00:48 skrll Exp $");
+__KERNEL_RCSID(1, "$NetBSD: cpu.c,v 1.5 2018/08/20 18:13:56 jmcneill Exp $");
#include "locators.h"
#include "opt_arm_debug.h"
@@ -130,12 +130,12 @@
}
if (mpidr & MPIDR_MT) {
- ci->ci_data.cpu_smt_id = mpidr & MPIDR_AFF0;
- ci->ci_data.cpu_core_id = mpidr & MPIDR_AFF1;
- ci->ci_data.cpu_package_id = mpidr & MPIDR_AFF2;
+ ci->ci_data.cpu_smt_id = __SHIFTOUT(mpidr, MPIDR_AFF0);
+ ci->ci_data.cpu_core_id = __SHIFTOUT(mpidr, MPIDR_AFF1);
+ ci->ci_data.cpu_package_id = __SHIFTOUT(mpidr, MPIDR_AFF2);
} else {
- ci->ci_data.cpu_core_id = mpidr & MPIDR_AFF0;
- ci->ci_data.cpu_package_id = mpidr & MPIDR_AFF1;
+ ci->ci_data.cpu_core_id = __SHIFTOUT(mpidr, MPIDR_AFF0);
+ ci->ci_data.cpu_package_id = __SHIFTOUT(mpidr, MPIDR_AFF1);
}
ci->ci_dev = dv;
Home |
Main Index |
Thread Index |
Old Index