Re: [PATCH V9 03/18] PCI: Add weak pcibios_iov_resource_size() interface

2014-11-19 Thread Wei Yang
On Tue, Nov 18, 2014 at 09:26:01PM -0700, Bjorn Helgaas wrote: On Wed, Nov 19, 2014 at 11:21:00AM +0800, Wei Yang wrote: On Wed, Nov 19, 2014 at 01:15:32PM +1100, Benjamin Herrenschmidt wrote: On Tue, 2014-11-18 at 18:12 -0700, Bjorn Helgaas wrote: Can you help me understand this? We

Fan management PowerMac7,2

2014-11-19 Thread Martin Kukač
Hello, I was directed to this list on #ppc64/freenode IRC channel. I have PowerMac7,2 (AGP, 2xPowerPC 970(2.2) 2GHz) and I wanted to try kernel supporting kvm-pr module, which is not in 3.2.63 kernel provided with Debian Wheezy. I downloaded 3.14.24, compiled it using original config from

Re: [RFC PATCH 07/16] PCI: Separate pci_host_bridge creation out of pci_create_root_bus()

2014-11-19 Thread Liviu Dudau
On Wed, Nov 19, 2014 at 10:24:52AM +0800, Yijing Wang wrote: We need, some platforms pass NULL pointer as host bridge parent. Yijing, May I suggest a different approach here? Rather than having to pass an opaque pointer that gets converted by the host bridge driver back to the

Re: [RFC PATCH 07/16] PCI: Separate pci_host_bridge creation out of pci_create_root_bus()

2014-11-19 Thread Liviu Dudau
On Wed, Nov 19, 2014 at 01:42:52AM +, Yijing Wang wrote: On 2014/11/18 23:30, Liviu Dudau wrote: On Mon, Nov 17, 2014 at 10:21:41AM +, Yijing Wang wrote: There are some common PCI infos like domain, msi_controller, these infos are saved in arch PCI sysdata, and lots arch specific

Re: [RFC PATCH 08/16] PCI: Introduce pci_scan_host_bridge() and pci_host_info

2014-11-19 Thread Liviu Dudau
On Wed, Nov 19, 2014 at 02:09:12AM +, Yijing Wang wrote: struct pci_host_bridge *pci_create_host_bridge( - struct device *parent, u32 db, - struct pci_ops *ops, void *sysdata, - struct list_head *resources) + struct device *parent, u32 db,

Re: [PATCH V9 03/18] PCI: Add weak pcibios_iov_resource_size() interface

2014-11-19 Thread Bjorn Helgaas
On Wed, Nov 19, 2014 at 05:27:40PM +0800, Wei Yang wrote: On Tue, Nov 18, 2014 at 09:26:01PM -0700, Bjorn Helgaas wrote: On Wed, Nov 19, 2014 at 11:21:00AM +0800, Wei Yang wrote: On Wed, Nov 19, 2014 at 01:15:32PM +1100, Benjamin Herrenschmidt wrote: On Tue, 2014-11-18 at 18:12 -0700, Bjorn

Re: [PATCH V9 03/18] PCI: Add weak pcibios_iov_resource_size() interface

2014-11-19 Thread Benjamin Herrenschmidt
On Wed, 2014-11-19 at 10:23 -0700, Bjorn Helgaas wrote: Yes, I've read that many times. What's missing is the connection between a PE and the things in the PCI specs (buses, devices, functions, MMIO address space, DMA, MSI, etc.) Presumably the PE structure imposes constraints on how the

Re: [PATCH V9 08/18] powrepc/pci: Refactor pci_dn

2014-11-19 Thread Bjorn Helgaas
On Sun, Nov 02, 2014 at 11:41:24PM +0800, Wei Yang wrote: From: Gavin Shan gws...@linux.vnet.ibm.com pci_dn is the extension of PCI device node and it's created from device node. Unfortunately, VFs that are enabled dynamically by PF's driver and they don't have corresponding device nodes,

Re: [PATCH V9 01/18] PCI/IOV: Export interface for retrieve VF's BDF

2014-11-19 Thread Bjorn Helgaas
On Sun, Nov 02, 2014 at 11:41:17PM +0800, Wei Yang wrote: When implementing the SR-IOV on PowerNV platform, some resource reservation is needed for VFs which don't exist at the bootup stage. To do the match between resources and VFs, the code need to get the VF's BDF in advance. In this

[PATCH v2] powerpc: Remove more traces of bootmem

2014-11-19 Thread Michael Ellerman
Although we are now selecting NO_BOOTMEM, we still have some traces of bootmem lying around. That is because even with NO_BOOTMEM there is still a shim that converts bootmem calls into memblock calls, but ultimately we want to remove all traces of bootmem. Most of the patch is conversions from

Re: [PATCH V9 08/18] powrepc/pci: Refactor pci_dn

2014-11-19 Thread Gavin Shan
On Wed, Nov 19, 2014 at 04:30:24PM -0700, Bjorn Helgaas wrote: On Sun, Nov 02, 2014 at 11:41:24PM +0800, Wei Yang wrote: From: Gavin Shan gws...@linux.vnet.ibm.com pci_dn is the extension of PCI device node and it's created from device node. Unfortunately, VFs that are enabled dynamically by

Re: [RFC PATCH 07/16] PCI: Separate pci_host_bridge creation out of pci_create_root_bus()

2014-11-19 Thread Yijing Wang
Something like this: struct pci_controller { struct pci_host_bridge bridge; /* private host bridge data here */ . }; #define PCI_CONTROLLER(bus) ({ struct pci_host_bridge *hb = to_pci_host_bridge(bus-bridge); \ container_of(hb, struct pci_controller, bridge); })

Re: [PATCH v2] powerpc: Remove more traces of bootmem

2014-11-19 Thread Tony Breeds
On Thu, Nov 20, 2014 at 11:07:38AM +1100, Michael Ellerman wrote: Although we are now selecting NO_BOOTMEM, we still have some traces of bootmem lying around. That is because even with NO_BOOTMEM there is still a shim that converts bootmem calls into memblock calls, but ultimately we want to

Re: [PATCH v2 0/3] fix a kernel panic on fsl corenet board when CONFIG_CLK_PPC_CORENET is enabled

2014-11-19 Thread Mike Turquette
Quoting Scott Wood (2014-11-06 20:07:43) On Sun, 2014-10-19 at 14:11 +0800, Kevin Hao wrote: Hi, I have done a boot test on p2014rdb and t4240qds boards. I don't have an access to mpc512x board, so only build test for that. v2: - Revert the commit da788acb2838 first. -

Re: Fan management PowerMac7,2

2014-11-19 Thread Michel Dänzer
On 19.11.2014 21:04, Martin Kukač wrote: Hello, I was directed to this list on #ppc64/freenode IRC channel. I have PowerMac7,2 (AGP, 2xPowerPC 970(2.2) 2GHz) and I wanted to try kernel supporting kvm-pr module, which is not in 3.2.63 kernel provided with Debian Wheezy. I downloaded 3.14.24,

Re: [RFC PATCH 07/16] PCI: Separate pci_host_bridge creation out of pci_create_root_bus()

2014-11-19 Thread Yijing Wang
+static void pci_release_host_bridge_dev(struct device *dev) +{ + struct pci_host_bridge *bridge = to_pci_host_bridge(dev); + + if (bridge-release_fn) + bridge-release_fn(bridge); + pci_free_resource_list(bridge-windows); + kfree(bridge); +} +

Re: [RFC PATCH 08/16] PCI: Introduce pci_scan_host_bridge() and pci_host_info

2014-11-19 Thread Yijing Wang
No, in this patch, host drivers pass a pci host bridge resources init hook in pci_host_info *info, and we call this info-init_res() in pci_create_host_bridge(). +struct pci_host_info { +u8 res_type; +void *arg; +struct list_head *resources; /*just for build, will clean up

[PATCH] powerpc/powernv: Fix the hmi event version check.

2014-11-19 Thread Mahesh J Salgaonkar
From: Mahesh Salgaonkar mah...@linux.vnet.ibm.com The current HMI event structure is an ABI and carries a version field to accommodate future changes without affecting/rearranging current structure members that are valid for previous versions. The current version check if (hmi_evt-version !=

Re: [PATCH V9 03/18] PCI: Add weak pcibios_iov_resource_size() interface

2014-11-19 Thread Wei Yang
On Wed, Nov 19, 2014 at 10:23:50AM -0700, Bjorn Helgaas wrote: On Wed, Nov 19, 2014 at 05:27:40PM +0800, Wei Yang wrote: On Tue, Nov 18, 2014 at 09:26:01PM -0700, Bjorn Helgaas wrote: On Wed, Nov 19, 2014 at 11:21:00AM +0800, Wei Yang wrote: On Wed, Nov 19, 2014 at 01:15:32PM +1100, Benjamin

Re: [PATCH V9 03/18] PCI: Add weak pcibios_iov_resource_size() interface

2014-11-19 Thread Wei Yang
On Thu, Nov 20, 2014 at 07:51:40AM +1100, Benjamin Herrenschmidt wrote: On Wed, 2014-11-19 at 10:23 -0700, Bjorn Helgaas wrote: Yes, I've read that many times. What's missing is the connection between a PE and the things in the PCI specs (buses, devices, functions, MMIO address space, DMA,

Re: [PATCH V9 08/18] powrepc/pci: Refactor pci_dn

2014-11-19 Thread Wei Yang
On Wed, Nov 19, 2014 at 04:30:24PM -0700, Bjorn Helgaas wrote: On Sun, Nov 02, 2014 at 11:41:24PM +0800, Wei Yang wrote: From: Gavin Shan gws...@linux.vnet.ibm.com pci_dn is the extension of PCI device node and it's created from device node. Unfortunately, VFs that are enabled dynamically by

Re: [PATCH V9 08/18] powrepc/pci: Refactor pci_dn

2014-11-19 Thread Wei Yang
On Thu, Nov 20, 2014 at 12:02:13PM +1100, Gavin Shan wrote: On Wed, Nov 19, 2014 at 04:30:24PM -0700, Bjorn Helgaas wrote: On Sun, Nov 02, 2014 at 11:41:24PM +0800, Wei Yang wrote: From: Gavin Shan gws...@linux.vnet.ibm.com pci_dn is the extension of PCI device node and it's created from