diff options
| author | Bjorn Helgaas <bhelgaas@google.com> | 2014-02-26 11:25:56 -0700 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-11 10:59:15 +0200 |
| commit | cb098566d9e67b52f6478a429fdae2d071271c95 (patch) | |
| tree | 01fadaaf1e9a019c0f453e1aebbf2d8dc57b2264 /include/linux/ioport.h | |
| parent | 85733caabf3cb0cb6a51363c608967e505233949 (diff) | |
vsprintf: Add support for IORESOURCE_UNSET in %pR
Sometimes we have a struct resource where we know the type (MEM/IO/etc.)
and the size, but we haven't assigned address space for it. The
IORESOURCE_UNSET flag is a way to indicate this situation. For these
"unset" resources, the start address is meaningless, so print only the
size, e.g.,
- pci 0000:0c:00.0: reg 184: [mem 0x00000000-0x00001fff 64bit]
+ pci 0000:0c:00.0: reg 184: [mem size 0x2000 64bit]
For %pr (printing with raw flags), we still print the address range,
because %pr is mostly used for debugging anyway.
Thanks to Fengguang Wu <fengguang.wu@intel.com> for suggesting
resource_size().
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'include/linux/ioport.h')
| -rw-r--r-- | include/linux/ioport.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 89b7c24a3..dec741499 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h @@ -51,7 +51,7 @@ struct resource { #define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */ #define IORESOURCE_DISABLED 0x10000000 -#define IORESOURCE_UNSET 0x20000000 +#define IORESOURCE_UNSET 0x20000000 /* No address assigned yet */ #define IORESOURCE_AUTO 0x40000000 #define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */ |
