From 29be823cfa9f189ade73f801644afe86c055a6b8 Mon Sep 17 00:00:00 2001 From: deraadt Date: Mon, 14 Jun 2021 03:48:41 +0000 Subject: [PATCH] add PCITAG_NODE and PCITAG_OFFSET ok drahn --- sys/arch/riscv64/include/pci_machdep.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/arch/riscv64/include/pci_machdep.h b/sys/arch/riscv64/include/pci_machdep.h index 40763fc767b..e2c7a7b0ec2 100644 --- a/sys/arch/riscv64/include/pci_machdep.h +++ b/sys/arch/riscv64/include/pci_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.h,v 1.1 2021/05/19 19:32:25 kettenis Exp $ */ +/* $OpenBSD: pci_machdep.h,v 1.2 2021/06/14 03:48:41 deraadt Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -29,6 +29,9 @@ typedef struct machine_pci_chipset *pci_chipset_tag_t; typedef u_long pcitag_t; +#define PCITAG_NODE(x) ((x) >> 32) +#define PCITAG_OFFSET(x) ((x) & 0xffffffff) + /* Supported interrupt types. */ #define PCI_NONE 0 #define PCI_INTX 1 -- 2.20.1