Module Name: src Committed By: thorpej Date: Tue Jan 16 05:29:44 UTC 2024
Modified Files: src/sys/arch/m68k/include: psl.h Log Message: Provide PSLTOIPL() and IPLTOPSL() macros. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/m68k/include/psl.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/m68k/include/psl.h diff -u src/sys/arch/m68k/include/psl.h:1.18 src/sys/arch/m68k/include/psl.h:1.19 --- src/sys/arch/m68k/include/psl.h:1.18 Sun Jan 14 22:06:03 2024 +++ src/sys/arch/m68k/include/psl.h Tue Jan 16 05:29:44 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: psl.h,v 1.18 2024/01/14 22:06:03 thorpej Exp $ */ +/* $NetBSD: psl.h,v 1.19 2024/01/16 05:29:44 thorpej Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -65,6 +65,9 @@ #define PSL_USERSET (0) #define PSL_USERCLR (PSL_S | PSL_IPL7 | PSL_MBZ) +#define PSLTOIPL(x) (((x) >> 8) & 0x7) +#define IPLTOPSL(x) ((((x) & 0x7) << 8) | PSL_S) + #define USERMODE(ps) (((ps) & PSL_S) == 0) #if defined(_KERNEL) && !defined(_LOCORE)