/* * Generate definitions needed by the preprocessor. * This code generates raw asm output which is post-processed * to extract and format the required data. */ #define __GENERATING_BOUNDS_H /* Include headers that define the enum constants of interest */ #include #include #include #include #include void foo(void) { /* The enum constants to put into include/generated/bounds.h */ DEFINE(NR_PAGEFLAGS, __NR_PAGEFLAGS); DEFINE(MAX_NR_ZONES, __MAX_NR_ZONES); #ifdef CONFIG_SMP DEFINE(NR_CPUS_BITS, ilog2(CONFIG_NR_CPUS)); #endif DEFINE(SPINLOCK_SIZE, sizeof(spinlock_t)); /* End of constants */ } s='main'>index : net-next.git
net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2016-05-31 21:25:52 -0600
committerAlex Williamson <alex.williamson@redhat.com>2016-05-31 21:25:52 -0600
commitce7585f3c4d76bca1dff4b66ae1ea32552954f9e (patch)
treebdaa94825fb400c596b5ddac362d55c0f25680fe
parent089f1c6b2daeab750fd92a28529928bc13c95d97 (diff)
vfio/pci: Allow VPD short read
The size of the VPD area is not necessarily 4-byte aligned, so a pci_vpd_read() might return less than 4 bytes. Zero our buffer and accept anything other than an error. Intel X710 NICs exercise this. Fixes: 4e1a635552d3 ("vfio/pci: Use kernel VPD access functions") Signed-off-by: Alex Williamson <alex.williamson@redhat.com>