Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

resource: add window support

Add support for resource windows. This is for bridge resources, i.e.,
regions where a bridge forwards transactions from the primary to the
secondary side.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>

authored by

Bjorn Helgaas and committed by
Len Brown
9d7cca04 0f4050c7

+4 -1
+1
include/linux/ioport.h
··· 51 51 #define IORESOURCE_STARTALIGN 0x00080000 /* start field is alignment */ 52 52 53 53 #define IORESOURCE_MEM_64 0x00100000 54 + #define IORESOURCE_WINDOW 0x00200000 /* forwarded by bridge */ 54 55 55 56 #define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */ 56 57 #define IORESOURCE_DISABLED 0x10000000
+3 -1
lib/vsprintf.c
··· 635 635 * 64-bit res (sizeof==8): 20 chars in dec, 18 in hex ("0x" + 16) */ 636 636 #define RSRC_BUF_SIZE ((2 * sizeof(resource_size_t)) + 4) 637 637 #define FLAG_BUF_SIZE (2 * sizeof(res->flags)) 638 - #define DECODED_BUF_SIZE sizeof("[mem - 64bit pref disabled]") 638 + #define DECODED_BUF_SIZE sizeof("[mem - 64bit pref window disabled]") 639 639 #define RAW_BUF_SIZE sizeof("[mem - flags 0x]") 640 640 char sym[max(2*RSRC_BUF_SIZE + DECODED_BUF_SIZE, 641 641 2*RSRC_BUF_SIZE + FLAG_BUF_SIZE + RAW_BUF_SIZE)]; ··· 675 675 p = string(p, pend, " 64bit", str_spec); 676 676 if (res->flags & IORESOURCE_PREFETCH) 677 677 p = string(p, pend, " pref", str_spec); 678 + if (res->flags & IORESOURCE_WINDOW) 679 + p = string(p, pend, " window", str_spec); 678 680 if (res->flags & IORESOURCE_DISABLED) 679 681 p = string(p, pend, " disabled", str_spec); 680 682 } else {