RE: [PATCH V8] powerpc/fsl-pci: Unify pci/pcie initialization code

2012-08-20 Thread Li Yang-R58472
> -Original Message- > From: Jia Hongtao-B38951 > Sent: Tuesday, August 21, 2012 11:26 AM > To: Wood Scott-B07421 > Cc: linuxppc-dev@lists.ozlabs.org; ga...@kernel.crashing.org; Li Yang- > R58472; Bradley Hughes > Subject: RE: [PATCH V8] powerpc/fsl-pci: Unify pci/pcie initialization > co

Re: [PATCH 4/8] time: Condense timekeeper.xtime into xtime_sec

2012-08-20 Thread John Stultz
On 08/20/2012 01:04 PM, Andreas Schwab wrote: John Stultz writes: Huh. Yea, that looks fine. And without the __timekeeping_inject_sleeptime() call, the system resumed ok? Yes, it does. So I'm mostly still stumped on this. But I did find one possible related bugfix that maybe you can try?

RE: [PATCH V8] powerpc/fsl-pci: Unify pci/pcie initialization code

2012-08-20 Thread Jia Hongtao-B38951
> -Original Message- > From: Wood Scott-B07421 > Sent: Tuesday, August 21, 2012 8:57 AM > To: Jia Hongtao-B38951 > Cc: linuxppc-dev@lists.ozlabs.org; Bradley Hughes > Subject: Re: [PATCH V8] powerpc/fsl-pci: Unify pci/pcie initialization > code > > On 08/20/2012 05:04 PM, Scott Wood wrot

RE: [PATCH V8] powerpc/fsl-pci: Unify pci/pcie initialization code

2012-08-20 Thread Jia Hongtao-B38951
> -Original Message- > From: Wood Scott-B07421 > Sent: Tuesday, August 21, 2012 6:04 AM > To: Jia Hongtao-B38951 > Cc: linuxppc-dev@lists.ozlabs.org; ga...@kernel.crashing.org; Li Yang- > R58472; Bradley Hughes > Subject: Re: [PATCH V8] powerpc/fsl-pci: Unify pci/pcie initialization > cod

Re: [PATCH 2/2] powerpc/usb: fix bug of CPU hang when missing USB PHY clock

2012-08-20 Thread Tabi Timur-B04825
On Fri, Aug 10, 2012 at 5:48 AM, Shengzhou Liu wrote: > + for (timeout = 1000; timeout > 0; timeout--) { > + /* check PHY_CLK_VALID to get phy clk valid */ > + if (in_be32(non_ehci + FSL_SOC_USB_CTRL) > +

Re: [PATCH 2/2] powerpc/usb: fix bug of CPU hang when missing USB PHY clock

2012-08-20 Thread Kumar Gala
On Aug 12, 2012, at 10:01 PM, Liu Shengzhou-B36685 wrote: > > >> -Original Message- >> From: Kumar Gala [mailto:ga...@kernel.crashing.org] >> Sent: Friday, August 10, 2012 9:50 PM >> To: Liu Shengzhou-B36685 >> Cc: linuxppc-dev@lists.ozlabs.org list; linux-...@vger.kernel.org; >> gre...

Re: [PATCH V8] powerpc/fsl-pci: Unify pci/pcie initialization code

2012-08-20 Thread Scott Wood
On 08/20/2012 05:04 PM, Scott Wood wrote: > On 08/20/2012 05:06 AM, Jia Hongtao wrote: >> @@ -842,38 +839,60 @@ void __devinit fsl_pci_init(void) >> node = fsl_pci_primary; >> >> if (of_match_node(pci_ids, node)) >> -break; >>

Re: [PATCH V8] powerpc/fsl-pci: Unify pci/pcie initialization code

2012-08-20 Thread Scott Wood
On 08/20/2012 05:06 AM, Jia Hongtao wrote: > We unified the Freescale pci/pcie initialization by changing the fsl_pci > to a platform driver. In previous PCI code architecture the initialization > routine is called at board_setup_arch stage. Now the initialization is done > in probe function which

Re: [PATCH 4/8] time: Condense timekeeper.xtime into xtime_sec

2012-08-20 Thread Andreas Schwab
John Stultz writes: > Huh. Yea, that looks fine. And without the > __timekeeping_inject_sleeptime() call, the system resumed ok? Yes, it does. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something co

Re: [PATCH 4/8] time: Condense timekeeper.xtime into xtime_sec

2012-08-20 Thread John Stultz
On 08/20/2012 12:45 PM, Andreas Schwab wrote: John Stultz writes: I'm not very familiar w/ the iBook hardware, but does it use a clocksource, or does it use arch_gettimeoffset()? clocksource: timebase mult[3640e38e] shift[24] registered I suspect that the casting has avoided clipping some s

Re: [PATCH 4/8] time: Condense timekeeper.xtime into xtime_sec

2012-08-20 Thread Andreas Schwab
John Stultz writes: > I'm not very familiar w/ the iBook hardware, but does it use a > clocksource, or does it use arch_gettimeoffset()? clocksource: timebase mult[3640e38e] shift[24] registered > I suspect that the casting has avoided clipping some strange values from > the persistent clock.

Re: [PATCH 4/8] time: Condense timekeeper.xtime into xtime_sec

2012-08-20 Thread John Stultz
On 08/19/2012 02:02 PM, Andreas Schwab wrote: John Stultz writes: The timekeeper struct has a xtime_nsec, which keeps the sub-nanosecond remainder. This ends up being somewhat duplicative of the timekeeper.xtime.tv_nsec value, and we have to do extra work to keep them apart, copying the full

Re: [RFC V7 PATCH 18/19] memory-hotplug: add node_device_release

2012-08-20 Thread Jianguo Wu
On 2012/8/20 17:35, we...@cn.fujitsu.com wrote: > From: Yasuaki Ishimatsu > > When calling unregister_node(), the function shows following message at > device_release(). > > Device 'node2' does not have a release() function, it is broken and must be > fixed. > > So the patch implements node_dev

[PATCH v4 5/8] x86: Add clear_page_nocache

2012-08-20 Thread Kirill A. Shutemov
From: Andi Kleen Add a cache avoiding version of clear_page. Straight forward integer variant of the existing 64bit clear_page, for both 32bit and 64bit. Also add the necessary glue for highmem including a layer that non cache coherent architectures that use the virtual address for flushing can

[PATCH v4 8/8] mm: implement vm.clear_huge_page_nocache sysctl

2012-08-20 Thread Kirill A. Shutemov
From: "Kirill A. Shutemov" In some cases cache avoiding clearing huge page may slow down workload. Let's provide an sysctl handle to disable it. We use static_key here to avoid extra work on fast path. Signed-off-by: Kirill A. Shutemov --- Documentation/sysctl/vm.txt | 13 incl

[PATCH v4 7/8] x86: switch the 64bit uncached page clear to SSE/AVX v2

2012-08-20 Thread Kirill A. Shutemov
From: Andi Kleen With multiple threads vector stores are more efficient, so use them. This will cause the page clear to run non preemptable and add some overhead. However on 32bit it was already non preempable (due to kmap_atomic) and there is an preemption opportunity every 4K unit. On a NPB (N

[PATCH v4 6/8] mm: make clear_huge_page cache clear only around the fault address

2012-08-20 Thread Kirill A. Shutemov
From: Andi Kleen Clearing a 2MB huge page will typically blow away several levels of CPU caches. To avoid this only cache clear the 4K area around the fault address and use a cache avoiding clears for the rest of the 2MB area. Signed-off-by: Andi Kleen Signed-off-by: Kirill A. Shutemov --- mm

[PATCH v4 2/8] THP: Pass fault address to __do_huge_pmd_anonymous_page()

2012-08-20 Thread Kirill A. Shutemov
From: Andi Kleen Signed-off-by: Andi Kleen Signed-off-by: Kirill A. Shutemov --- mm/huge_memory.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 70737ec..6f0825b611 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@

[PATCH v4 4/8] mm: pass fault address to clear_huge_page()

2012-08-20 Thread Kirill A. Shutemov
From: "Kirill A. Shutemov" Signed-off-by: Kirill A. Shutemov --- include/linux/mm.h |2 +- mm/huge_memory.c |2 +- mm/hugetlb.c |3 ++- mm/memory.c|7 --- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h i

[PATCH v4 3/8] hugetlb: pass fault address to hugetlb_no_page()

2012-08-20 Thread Kirill A. Shutemov
From: "Kirill A. Shutemov" Signed-off-by: Kirill A. Shutemov --- mm/hugetlb.c | 38 +++--- 1 files changed, 19 insertions(+), 19 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index bc72712..3c86d3d 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2672,

[PATCH v4 1/8] THP: Use real address for NUMA policy

2012-08-20 Thread Kirill A. Shutemov
From: Andi Kleen Use the fault address, not the rounded down hpage address for NUMA policy purposes. In some circumstances this can give more exact NUMA policy. Signed-off-by: Andi Kleen Signed-off-by: Kirill A. Shutemov --- mm/huge_memory.c |8 1 files changed, 4 insertions(+),

[PATCH v4 0/8] Avoid cache trashing on clearing huge/gigantic page

2012-08-20 Thread Kirill A. Shutemov
From: "Kirill A. Shutemov" Clearing a 2MB huge page will typically blow away several levels of CPU caches. To avoid this only cache clear the 4K area around the fault address and use a cache avoiding clears for the rest of the 2MB area. This patchset implements cache avoiding version of clear_p

[PATCH 7/8] ppc/pnv: using PCI core to do resource assignment

2012-08-20 Thread Gavin Shan
Currently, the PCI probe flags "PCI_PROBE_ONLY | PCI_REASSIGN_ALL_RSRC" used on powernv platform. That means the platform has to do the PCI resource assignment by itself. The patch changes the PCI probe flag to "PCI_REASSIGN_ALL_RSRC" so that the PCI core will do the resource assignment. Also, the

[PATCH 5/8] ppc/pnv: skip check on PE if necessary

2012-08-20 Thread Gavin Shan
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 de

[PATCH 3/8] ppc/pnv: I/O and MMIO resource assignment for PEs

2012-08-20 Thread Gavin Shan
There're 2 types of PCI bus sensitive PEs: (A) The PE includes single PCI bus. (B) The PE includes the PCI bus and all the subordinate PCI buses, and the patch tries to assign I/O and MMIO resources based on created PEs. Fortunately, we figured out unified scheme to do resource assignment for all t

[PATCH 1/8] ppc/pnv: create bus sensitive PEs

2012-08-20 Thread Gavin Shan
Basically, there're 2 types of PCI bus sensitive PEs: (A) The PE includes single PCI bus. (B) The PE includes the PCI bus and all the subordinate PCI buses. At present, we'd like to put PCI bus originated by PCI-e link to form PE that contains single PCI bus, and the PCIe-to-PCI bridge will form th

[PATCH 8/8] ppc/pnv: remove unused functions

2012-08-20 Thread Gavin Shan
We don't need them anymore. The patch removes those functions. Signed-off-by: Gavin Shan Reviewed-by: Ram Pai Reviewed-by: Richard Yang --- arch/powerpc/platforms/powernv/pci-ioda.c | 441 - 1 files changed, 0 insertions(+), 441 deletions(-) diff --git a/arch/powe

[PATCH 4/8] ppc/pnv: initialize DMA for PEs

2012-08-20 Thread Gavin Shan
The patch introduces additional wrapper function to call the original implementation so that the DMA can be configured for all existing PEs. Signed-off-by: Gavin Shan Reviewed-by: Ram Pai Reviewed-by: Richard Yang --- arch/powerpc/platforms/powernv/pci-ioda.c | 10 ++ 1 files changed

[PATCH 2/8] ppc/pnv: PE list based on creation order

2012-08-20 Thread Gavin Shan
The resource (I/O and MMIO) will be assigned on basis of PE from top to bottom so that we can implement the trick here: the resource that has been assigned to parent PE could be taken by child PE if necessary. The current implementation already has PE list per PHB basis, but the list doesn't meet

[PATCH V4 0/8] Rework on PowerNV P7IOC initialization

2012-08-20 Thread Gavin Shan
The rework is done based on Ben's initial ideas on how PE and resource assignment is done on top of PCI core instead of doing resource assignment by powernv platform. With the series of patches, the following aspects will be covered: - Only create PE based on PCI bus. Basically, there will

[PATCH 6/8] ppc/pnv: fix overrunning segment tracing array

2012-08-20 Thread Gavin Shan
There're 2 arrays introduced to trace which PE has occupied the corresponding resource (I/O or MMIO) segment. However, we didn't allocate enough memory for them and that possiblly leads to PE descriptor corruption. The patch fixes that by allocating enough memory for those 2 arrays. Signed-off-by

myri10ge in p4080ds ppc

2012-08-20 Thread leonid
Hi This is my first mail in this group , so I hope this is the right place for it. I am testing myri10ge pci-e (10G ethernet card) on p4080(freescale powerpc) evaluation board. using kernel 2.6.34.6 when I am trying to insert myri10ge kernel module, I getting : "myri10ge: Version 1.5.2-1.459

[PATCH V8] powerpc/fsl-pci: Unify pci/pcie initialization code

2012-08-20 Thread Jia Hongtao
We unified the Freescale pci/pcie initialization by changing the fsl_pci to a platform driver. In previous PCI code architecture the initialization routine is called at board_setup_arch stage. Now the initialization is done in probe function which is architectural better. Also It's convenient for a

[PATCH V8] powerpc/fsl-pci: Unify pci/pcie initialization code

2012-08-20 Thread Jia Hongtao
We unified the Freescale pci/pcie initialization by changing the fsl_pci to a platform driver. In previous PCI code architecture the initialization routine is called at board_setup_arch stage. Now the initialization is done in probe function which is architectural better. Also It's convenient for a

[RFC V7 PATCH 19/19] memory-hotplug: remove sysfs file of node

2012-08-20 Thread wency
From: Yasuaki Ishimatsu The patch adds node_set_offline() and unregister_one_node() to remove_memory() for removing sysfs file of node. CC: David Rientjes CC: Jiang Liu CC: Len Brown CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC:

[RFC V7 PATCH 17/19] memory_hotplug: clear zone when the memory is removed

2012-08-20 Thread wency
From: Yasuaki Ishimatsu When a memory is added, we update zone's and pgdat's start_pfn and spanned_pages in the function __add_zone(). So we should revert these when the memory is removed. Add a new function __remove_zone() to do this. CC: David Rientjes CC: Jiang Liu CC: Len Brown CC: Benjam

[RFC V7 PATCH 16/19] memory-hotplug: free memmap of sparse-vmemmap

2012-08-20 Thread wency
From: Yasuaki Ishimatsu All pages of virtual mapping in removed memory cannot be freed, since some pages used as PGD/PUD includes not only removed memory but also other memory. So the patch checks whether page can be freed or not. How to check whether page can be freed or not? 1. When removing

[RFC V7 PATCH 18/19] memory-hotplug: add node_device_release

2012-08-20 Thread wency
From: Yasuaki Ishimatsu When calling unregister_node(), the function shows following message at device_release(). Device 'node2' does not have a release() function, it is broken and must be fixed. So the patch implements node_device_release() CC: David Rientjes CC: Jiang Liu CC: Len Brown C

[RFC V7 PATCH 13/19] memory-hotplug: check page type in get_page_bootmem

2012-08-20 Thread wency
From: Yasuaki Ishimatsu There is a possibility that get_page_bootmem() is called to the same page many times. So when get_page_bootmem is called to the same page, the function only increments page->_count. CC: David Rientjes CC: Jiang Liu CC: Len Brown CC: Benjamin Herrenschmidt CC: Paul Mac

[RFC V7 PATCH 08/19] memory-hotplug: remove /sys/firmware/memmap/X sysfs

2012-08-20 Thread wency
From: Yasuaki Ishimatsu When (hot)adding memory into system, /sys/firmware/memmap/X/{end, start, type} sysfs files are created. But there is no code to remove these files. The patch implements the function to remove them. Note : The code does not free firmware_map_entry since there is no way to

[RFC V7 PATCH 14/19] memory-hotplug: move register_page_bootmem_info_node and put_page_bootmem for sparse-vmemmap

2012-08-20 Thread wency
From: Yasuaki Ishimatsu For implementing register_page_bootmem_info_node of sparse-vmemmap, register_page_bootmem_info_node and put_page_bootmem are moved to memory_hotplug.c CC: David Rientjes CC: Jiang Liu CC: Len Brown CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Christoph Lameter

[RFC V7 PATCH 12/19] memory-hotplug: introduce new function arch_remove_memory()

2012-08-20 Thread wency
From: Wen Congyang We don't call __add_pages() directly in the function add_memory() because some other architecture related things need to be done before or after calling __add_pages(). So we should introduce a new function arch_remove_memory() to revert the things done in arch_add_memory(). No

[RFC V7 PATCH 15/19] memory-hotplug: implement register_page_bootmem_info_section of sparse-vmemmap

2012-08-20 Thread wency
From: Yasuaki Ishimatsu For removing memmap region of sparse-vmemmap which is allocated bootmem, memmap region of sparse-vmemmap needs to be registered by get_page_bootmem(). So the patch searches pages of virtual mapping and registers the pages by get_page_bootmem(). Note: register_page_bootmem

[RFC V7 PATCH 11/19] memory-hotplug: remove_memory calls __remove_pages

2012-08-20 Thread wency
From: Yasuaki Ishimatsu The patch adds __remove_pages() to remove_memory(). Then the range of phys_start_pfn argument and nr_pages argument in __remove_pagse() may have different zone. So zone argument is removed from __remove_pages() and __remove_pages() caluculates zone in each section. When C

[RFC V7 PATCH 07/19] memory-hotplug: call acpi_bus_remove() to remove memory device

2012-08-20 Thread wency
From: Wen Congyang The memory device has been ejected and powoffed, so we can call acpi_bus_remove() to remove the memory device from acpi bus. CC: David Rientjes CC: Jiang Liu CC: Len Brown CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Mor

[RFC V7 PATCH 10/19] memory-hotplug: add memory_block_release

2012-08-20 Thread wency
From: Yasuaki Ishimatsu When calling remove_memory_block(), the function shows following message at device_release(). Device 'memory528' does not have a release() function, it is broken and must be fixed. remove_memory_block() calls kfree(mem). I think it shouled be called from device_release()

[RFC V7 PATCH 09/19] memory-hotplug: does not release memory region in PAGES_PER_SECTION chunks

2012-08-20 Thread wency
From: Yasuaki Ishimatsu Since applying a patch(de7f0cba96786c), release_mem_region() has been changed as called in PAGES_PER_SECTION chunks because register_memory_resource() is called in PAGES_PER_SECTION chunks by add_memory(). But it seems firmware dependency. If CRS are written in the PAGES_P

[RFC V7 PATCH 04/19] memory-hotplug: offline and remove memory when removing the memory device

2012-08-20 Thread wency
From: Wen Congyang We should offline and remove memory when removing the memory device. The memory device can be removed by 2 ways: 1. send eject request by SCI 2. echo 1 >/sys/bus/pci/devices/PNP0C80:XX/eject In the 1st case, acpi_memory_disable_device() will be called. In the 2nd case, acpi_me

[RFC V7 PATCH 03/19] memory-hotplug: store the node id in acpi_memory_device

2012-08-20 Thread wency
From: Wen Congyang The memory device has only one node id. Store the node id when enable the memory device, and we can reuse it when removing the memory device. CC: David Rientjes CC: Jiang Liu CC: Len Brown CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Christoph Lameter Cc: Minchan Ki

[RFC V7 PATCH 01/19] memory-hotplug: rename remove_memory() to offline_memory()/offline_pages()

2012-08-20 Thread wency
From: Yasuaki Ishimatsu remove_memory() only try to offline pages. It is called in two cases: 1. hot remove a memory device 2. echo offline >/sys/devices/system/memory/memoryXX/state In the 1st case, we should also change memory block's state, and notify the userspace that the memory block's sta

[RFC V7 PATCH 02/19] memory-hotplug: implement offline_memory()

2012-08-20 Thread wency
From: Wen Congyang The function offline_memory() will be called when hot removing a memory device. The memory device may contain more than one memory block. If the memory block has been offlined, __offline_pages() will fail. So we should try to offline one memory block at a time. If the memory b

[RFC V7 PATCH 00/19] memory-hotplug: hot-remove physical memory

2012-08-20 Thread wency
From: Wen Congyang This patch series aims to support physical memory hot-remove. The patches can free/remove the following things: - acpi_memory_info : [RFC PATCH 4/19] - /sys/firmware/memmap/X/{end, start, type} : [RFC PATCH 8/19] - iomem_resource

[RFC V7 PATCH 06/19] memory-hotplug: export the function acpi_bus_remove()

2012-08-20 Thread wency
From: Wen Congyang The function acpi_bus_remove() can remove a acpi device from acpi device. When a acpi device is removed, we need to call this function to remove the acpi device from acpi bus. So export this function. CC: David Rientjes CC: Jiang Liu CC: Len Brown CC: Benjamin Herrenschmidt

[RFC V7 PATCH 05/19] memory-hotplug: check whether memory is present or not

2012-08-20 Thread wency
From: Yasuaki Ishimatsu If system supports memory hot-remove, online_pages() may online removed pages. So online_pages() need to check whether onlining pages are present or not. CC: David Rientjes CC: Jiang Liu CC: Len Brown CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Christoph Lamete

Re: [PATCH] powerpc/crypto: Remove virt_to_abs() usage in nx-842.c

2012-08-20 Thread Herbert Xu
On Fri, Aug 03, 2012 at 09:40:54AM -0500, Seth Jennings wrote: > On 08/02/2012 09:23 PM, Michael Ellerman wrote: > > virt_to_abs() is just a wrapper around __pa(), use __pa() directly. > > > > We should be including to get __pa(). abs_addr.h will be > > removed shortly so drop that. > > > > We w

[PATCH] powerpc: Rename 64-bit PVR constants to PVR_foo

2012-08-20 Thread Michael Ellerman
We have an old FIXME in reg.h which points out that we should standardise on PVR_foo for our PVR #defines. Currently we use PVR_ on 32-bit and PV_ on 64-bit. So do that rename and remove the FIXME. Seeing as we're touching all but one usage of __is_processor(), rename it to something less ugly an