From 5e38460a283b5e53bdcbf4b00933915a75bf00f7 Mon Sep 17 00:00:00 2001 From: Martin Pieuchot Date: Sat, 13 Jan 2018 15:18:12 +0000 Subject: Define and use IPL_MPFLOOR in our common mutex implementation. ok kettenis@, visa@ --- sys/arch/arm64/include/intr.h | 3 ++- sys/arch/arm64/include/mutex.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/arch/arm64') diff --git a/sys/arch/arm64/include/intr.h b/sys/arch/arm64/include/intr.h index 2858a29b626..2bab7cda56d 100644 --- a/sys/arch/arm64/include/intr.h +++ b/sys/arch/arm64/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.6 2017/03/09 14:23:59 kettenis Exp $ */ +/* $OpenBSD: intr.h,v 1.7 2018/01/13 15:18:11 mpi Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -59,6 +59,7 @@ #define IPL_IPI 12 /* interprocessor interrupt */ #define NIPL 13 /* number of levels */ +#define IPL_MPFLOOR IPL_TTY /* Interrupt priority 'flags'. */ #define IPL_MPSAFE 0 /* no "mpsafe" interrupts */ diff --git a/sys/arch/arm64/include/mutex.h b/sys/arch/arm64/include/mutex.h index c42ef1cf233..5247385e106 100644 --- a/sys/arch/arm64/include/mutex.h +++ b/sys/arch/arm64/include/mutex.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mutex.h,v 1.3 2018/01/12 09:19:33 mpi Exp $ */ +/* $OpenBSD: mutex.h,v 1.4 2018/01/13 15:18:11 mpi Exp $ */ /* * Copyright (c) 2004 Artur Grabowski @@ -48,7 +48,7 @@ struct mutex { */ #ifdef MULTIPROCESSOR #define __MUTEX_IPL(ipl) \ - (((ipl) > IPL_NONE && (ipl) < IPL_TTY) ? IPL_TTY : (ipl)) + (((ipl) > IPL_NONE && (ipl) < IPL_MPFLOOR) ? IPL_MPFLOOR : (ipl)) #else #define __MUTEX_IPL(ipl) (ipl) #endif -- cgit v1.2.3