Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/include/linux drm: Make resource_size ...
details: https://anonhg.NetBSD.org/src/rev/afa85ad46856
branches: trunk
changeset: 1028974:afa85ad46856
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 12:37:07 2021 +0000
description:
drm: Make resource_size return resource_size_t like Linux.
Because Linux uses resource_size_t for absolute bus addresses, it is
actually bus_addr_t rather than bus_size_t. So using bus_size_t here
causes trouble with the i915 range_overflows macro, which verifies
that types match.
diffstat:
sys/external/bsd/drm2/include/linux/ioport.h | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 3c226f6808ac -r afa85ad46856 sys/external/bsd/drm2/include/linux/ioport.h
--- a/sys/external/bsd/drm2/include/linux/ioport.h Sun Dec 19 12:36:59 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/ioport.h Sun Dec 19 12:37:07 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ioport.h,v 1.7 2021/12/19 11:55:38 riastradh Exp $ */
+/* $NetBSD: ioport.h,v 1.8 2021/12/19 12:37:07 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -35,6 +35,8 @@
#include <sys/types.h>
#include <sys/bus.h>
+#include <linux/types.h>
+
#define IORESOURCE_IO __BIT(0)
#define IORESOURCE_MEM __BIT(1)
#define IORESOURCE_IRQ __BIT(2)
@@ -52,7 +54,7 @@
#define DEFINE_RES_MEM(START, SIZE) \
{ .start = (START), .end = (START) + ((SIZE) - 1) }
-static inline bus_size_t
+static inline resource_size_t
resource_size(struct resource *resource)
{
return resource->end - resource->start + 1;
Home |
Main Index |
Thread Index |
Old Index