From: Gavin Shan Date: Mon, 20 Aug 2012 03:49:18 +0000 (+0000) Subject: powerpc/powernv: Skip check on PE if necessary X-Git-Tag: omap-for-v3.7-rc1/fixes-cpufreq-signed~10^2~24 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db1266c852611436daa01a89c272722ec39cf916;p=pandora-kernel.git powerpc/powernv: Skip check on PE if necessary While the device driver or PCI core tries to enable PCI device, the platform dependent callback "ppc_md.pcibios_enable_device_hook" will be called to check if there has one associated PE for the PCI device. If we don't have the associated PE for the PCI device, it's not allowed to enable the PCI device. Unfortunately, there might have some cases we have to enable the PCI device (e.g. P2P bridge), but the PEs have not been created yet. The patch handles the unfortunate cases. Each PHB (struct pnv_phb) has one field "initialized" to trace if the PEs have been created and configured or not. When the PEs are not available, we won't check the associated PE for the PCI device to be enabled. Signed-off-by: Gavin Shan Reviewed-by: Ram Pai Reviewed-by: Richard Yang Signed-off-by: Benjamin Herrenschmidt --- Reading git-diff-tree failed