From: Wei Yang Date: Wed, 25 Mar 2015 08:23:57 +0000 (+0800) Subject: powerpc/powernv: Shift VF resource with an offset X-Git-Tag: omap-for-v4.1/fixes-rc1~126^2~7^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=781a868f3136c6eb8e8c5c19d148416d7da86610;p=pandora-kernel.git powerpc/powernv: Shift VF resource with an offset On PowerNV platform, resource position in M64 BAR implies the PE# the resource belongs to. In some cases, adjustment of a resource is necessary to locate it to a correct position in M64 BAR . This patch adds pnv_pci_vf_resource_shift() to shift the 'real' PF IOV BAR address according to an offset. Note: After doing so, there would be a "hole" in the /proc/iomem when offset is a positive value. It looks like the device return some mmio back to the system, which actually no one could use it. [bhelgaas: rework loops, rework overlap check, index resource[] conventionally, remove pci_regs.h include, squashed with next patch] Signed-off-by: Wei Yang Signed-off-by: Benjamin Herrenschmidt --- Reading git-diff-tree failed