[RFC PATCH 0/8] memory-hotplug : hot-remove physical memory(clear page table)

2012-07-20 Thread Wen Congyang
This patch series aims to support physical memory hot-remove(clear page table). This patch series base on ishimatsu's patch series. You can get it here: http://www.spinics.net/lists/linux-acpi/msg36804.html The patches can remove following things: - page table of removed memory If you find lac

[PATCH 0/8] remove memory info from list before freeing it

2012-07-20 Thread Wen Congyang
We free info, but we forget to remove it from the list. It will cause unexpected problem when we access the list next time. Signed-off-by: Wen Congyang --- drivers/acpi/acpi_memhotplug.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/acpi/acpi_memhotplug.c b/dri

[RFC PATCH 1/8] memory-hotplug: store the node id in acpi_memory_device

2012-07-20 Thread Wen Congyang
The memory device has only one node id. Store the node id when enabling 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 Kim CC: Andrew Morto

[RFC PATCH 2/8] memory-hotplug: offline memory only when it is onlined

2012-07-20 Thread Wen Congyang
offline_memory() will fail if the memory is not onlined. So check whether the memory is onlined before calling offline_memory(). 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: KOSAKI M

[RFC PATCH 3/8] memory-hotplug: call remove_memory() to cleanup when removing memory device

2012-07-20 Thread Wen Congyang
We should remove the following things when removing the memory device: 1. memmap and related sysfs files 2. iomem_resource 3. mem_section and related sysfs files 4. node and related sysfs files The function remove_memory() can do this. So call it after the memory device is offlined. CC: David Rie

[RFC PATCH 4/8] memory-hotplug: export the function acpi_bus_remove()

2012-07-20 Thread 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 CC: Paul Mackerras

[RFC PATCH 5/8] memory-hotplug: call acpi_bus_remove() to remove memory device

2012-07-20 Thread 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 Morton CC: KOSAKI Motoh

[RFC PATCH 6/8] memory-hotplug: introduce new function arch_remove_memory()

2012-07-20 Thread Wen Congyang
We don't call __add_pages() directly in the function add_memory() because some other architecture related thins needs to be done before or after calling __add_pages(). So we should not call __remove_pages() directly in the function remove_memory. Introduce new function arch_remove_memory() to rever

[RFC PATCH 7/8] x86: make __split_large_page() generally avialable

2012-07-20 Thread Wen Congyang
We need to clear page table after calling __remove_pages(). We may need to clear part of pmd or pud's entry when clearing the page table. So we need to split it to small page. Make __split_large_page() generally avialable, and we call call this function to split large page. CC: David Rientjes CC:

[RFC PATCH 8/8] memory-hotplug: implement arch_remove_memory()

2012-07-20 Thread Wen Congyang
Set the entry for the removed memory to 0. If the entry related meory is not whole removed, split it to smaller page, and clear it. 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: KOSAK

mpc8xxx PCIe hotplug needs fixing, some clues ..

2012-07-20 Thread Joakim Tjernlund
Hi Guys I see that you have been hacking Freescale PCI before so I send this to you(and the list) We are using PCIe(as RC) on P2010(basically a mpc85xx) and have PCI device that started from user space (needs advance clock conf) so when linux boots there is no device at all. Trying to "hotplug"

Re: [RFC PATCH 0/8] memory-hotplug : hot-remove physical memory(clear page table)

2012-07-20 Thread Yasuaki Ishimatsu
[Hi Wen, Good news!! I was waiting for this patch to come. Applying the patches, can we hot-remove physical memory completely? Thanks, Yasuaki Ishimatsu 2012/07/20 16:06, Wen Congyang wrote: This patch series aims to support physical memory hot-remove(clear page table). This patch series base

Re: [RFC PATCH 1/8] memory-hotplug: store the node id in acpi_memory_device

2012-07-20 Thread Yasuaki Ishimatsu
Hi Wen, 2012/07/20 16:09, Wen Congyang wrote: The memory device has only one node id. Store the node id when enabling 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: Chr

Re: [RFC PATCH 2/8] memory-hotplug: offline memory only when it is onlined

2012-07-20 Thread Yasuaki Ishimatsu
Hi Wen, 2012/07/20 16:10, Wen Congyang wrote: offline_memory() will fail if the memory is not onlined. So check whether the memory is onlined before calling offline_memory(). CC: David Rientjes CC: Jiang Liu CC: Len Brown CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Christoph Lameter

Re: [RFC PATCH 3/8] memory-hotplug: call remove_memory() to cleanup when removing memory device

2012-07-20 Thread Yasuaki Ishimatsu
Hi Wen, 2012/07/20 16:10, Wen Congyang wrote: We should remove the following things when removing the memory device: 1. memmap and related sysfs files 2. iomem_resource 3. mem_section and related sysfs files 4. node and related sysfs files The function remove_memory() can do this. So call it af

RE: PCIE Hotplug on P2010(mpc85xx) ?

2012-07-20 Thread Zang Roy-R61911
I do not think P2010 has a functional pciehp module in the pcie controller. Roy > -Original Message- > From: Linuxppc-dev [mailto:linuxppc-dev-bounces+tie- > fei.zang=freescale@lists.ozlabs.org] On Behalf Of Joakim Tjernlund > Sent: Tuesday, July 10, 2012 3:44 AM > To: linuxppc-...@ozl

Re: [RFC PATCH 6/8] memory-hotplug: introduce new function arch_remove_memory()

2012-07-20 Thread Yasuaki Ishimatsu
2012/07/20 16:12, Wen Congyang wrote: We don't call __add_pages() directly in the function add_memory() because some other architecture related thins needs to be done before or after calling __add_pages(). So we should not call __remove_pages() directly in the function remove_memory. Introduce ne

RE: [RFC] [PATCH] powerpc: Add MSR_DE to MSR_KERNEL

2012-07-20 Thread Zang Roy-R61911
> -Original Message- > From: linuxppc-dev-bounces+tie-fei.zang=freescale@lists.ozlabs.org > [mailto:linuxppc-dev-bounces+tie-fei.zang=freescale@lists.ozlabs.org] > On Behalf Of Joakim Tjernlund > Sent: Friday, June 01, 2012 6:36 AM > To: Wood Scott-B07421 > Cc: linuxppc-...@ozlabs

Re: [RFC PATCH 6/8] memory-hotplug: introduce new function arch_remove_memory()

2012-07-20 Thread Wen Congyang
At 07/20/2012 04:21 PM, Yasuaki Ishimatsu Wrote: > 2012/07/20 16:12, Wen Congyang wrote: >> We don't call __add_pages() directly in the function add_memory() >> because some other architecture related thins needs to be done >> before or after calling __add_pages(). So we should not call >> __remove

RE: PCIE Hotplug on P2010(mpc85xx) ?

2012-07-20 Thread Joakim Tjernlund
Zang Roy-R61911 wrote on 2012/07/20 10:15:46: > > I do not think P2010 has a functional pciehp module in the pcie controller. > Roy Maybe there is, see my latest mail to the list (today) titled: mpc8xxx PCIe hotplug needs fixing, some clues > > > -Original Message- > > From: Linuxppc-dev

RE: [RFC] [PATCH] powerpc: Add MSR_DE to MSR_KERNEL

2012-07-20 Thread Joakim Tjernlund
Zang Roy-R61911 wrote on 2012/07/20 10:27:52: > > > > > -Original Message- > > From: linuxppc-dev-bounces+tie-fei.zang=freescale@lists.ozlabs.org > > [mailto:linuxppc-dev-bounces+tie-fei.zang=freescale@lists.ozlabs.org] > > On Behalf Of Joakim Tjernlund > > Sent: Friday, June 01, 2

RE: PCIE Hotplug on P2010(mpc85xx) ?

2012-07-20 Thread Zang Roy-R61911
> -Original Message- > From: Joakim Tjernlund [mailto:joakim.tjernl...@transmode.se] > Sent: Friday, July 20, 2012 16:36 PM > To: Zang Roy-R61911 > Cc: linuxppc-...@ozlabs.org > Subject: RE: PCIE Hotplug on P2010(mpc85xx) ? > > Zang Roy-R61911 wrote on 2012/07/20 10:15:46: > > > > I do

RE: PCIE Hotplug on P2010(mpc85xx) ?

2012-07-20 Thread Joakim Tjernlund
Zang Roy-R61911 wrote on 2012/07/20 11:31:31: > > > > -Original Message- > > From: Joakim Tjernlund [mailto:joakim.tjernl...@transmode.se] > > Sent: Friday, July 20, 2012 16:36 PM > > To: Zang Roy-R61911 > > Cc: linuxppc-...@ozlabs.org > > Subject: RE: PCIE Hotplug on P2010(mpc85xx) ? > >

[PATCH][upstream] TDM Framework

2012-07-20 Thread sandeep
From: Sandeep Singh TDM Framework is an attempt to provide a platform independent layer which can offer a standard interface for TDM access to different client modules. Beneath, the framework layer can house different types of TDM drivers to handle various TDM devices, the hardware intricacies o

[PATCH][upstream]Added TDM device support and Freescale Starlite driver

2012-07-20 Thread sandeep
From: Sandeep Singh Freescale TDM controller consists of a TDM module supporting 128 channels running at up to 50 Mbps with 8-bit and 16-bit word size. The TDM bus connects gluelessly to most T1/E1 frames as well as to common buses such as the H.110, SCAS, and MVIP. TDM also supports an I2S mode.

[PATCH v8 0/7] power management patch set

2012-07-20 Thread Zhao Chenhui
Changes for v8: * Separated the cpu hotplug patch into three patches, as follows [PATCH v8 1/7] powerpc/smp: use a struct epapr_spin_table to replace macros [PATCH v8 2/7] powerpc/smp: add generic_set_cpu_up() to set cpu_state as CPU_UP_PREPARE [PATCH v8 4/7] powerpc/85xx: add HOTPLUG_CPU su

[PATCH v8 1/7] powerpc/smp: use a struct epapr_spin_table to replace macros

2012-07-20 Thread Zhao Chenhui
Signed-off-by: Zhao Chenhui --- arch/powerpc/platforms/85xx/smp.c | 46 ++-- 1 files changed, 23 insertions(+), 23 deletions(-) diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c index ff42490..4827709 100644 --- a/arch/powerpc/p

[PATCH v8 3/7] powerpc/85xx: implement hardware timebase sync

2012-07-20 Thread Zhao Chenhui
Do hardware timebase sync. Firstly, stop all timebases, and transfer the timebase value of the boot core to the other core. Finally, start all timebases. Only apply to dual-core chips, such as MPC8572, P2020, etc. Signed-off-by: Zhao Chenhui Signed-off-by: Li Yang --- arch/powerpc/include/asm/

[PATCH v8 2/7] powerpc/smp: add generic_set_cpu_up() to set cpu_state as CPU_UP_PREPARE

2012-07-20 Thread Zhao Chenhui
In the case of cpu hotplug, the cpu_state should be set to CPU_UP_PREPARE when kicking cpu. Otherwise, the cpu_state is always CPU_DEAD after calling generic_set_cpu_dead(), which makes the delay in generic_cpu_die() not happen. Signed-off-by: Zhao Chenhui --- arch/powerpc/include/asm/smp.h |

[PATCH v8 4/7] powerpc/85xx: add HOTPLUG_CPU support

2012-07-20 Thread Zhao Chenhui
Add support to disable and re-enable individual cores at runtime on MPC85xx/QorIQ SMP machines. Currently support e500v1/e500v2 core. MPC85xx machines use ePAPR spin-table in boot page for CPU kick-off. This patch uses the boot page from bootloader to boot core at runtime. It supports 32-bit and 3

[PATCH v8 5/7] powerpc/85xx: add sleep and deep sleep support

2012-07-20 Thread Zhao Chenhui
In sleep PM mode, the clocks of e500 core and unused IP blocks is turned off. IP blocks which are allowed to wake up the processor are still running. Some Freescale chips like MPC8536 and P1022 has deep sleep PM mode in addtion to the sleep PM mode. While in deep sleep PM mode, additionally, the

[PATCH v8 6/7] fsl_pmc: Add API to enable device as wakeup event source

2012-07-20 Thread Zhao Chenhui
Add APIs for setting wakeup source and lossless Ethernet in low power modes. These APIs can be used by wake-on-packet feature. Signed-off-by: Dave Liu Signed-off-by: Li Yang Signed-off-by: Jin Qing Signed-off-by: Zhao Chenhui --- arch/powerpc/sysdev/fsl_pmc.c | 77 ++

[PATCH v8 7/7] powerpc/85xx: add support to JOG feature using cpufreq interface

2012-07-20 Thread Zhao Chenhui
Some 85xx silicons like MPC8536 and P1022 have a JOG feature, which provides a dynamic mechanism to lower or raise the CPU core clock at runtime. This patch adds the support to change CPU frequency using the standard cpufreq interface. The ratio CORE to CCB can be 1:1(except MPC8536), 3:2, 2:1, 5:

[PATCH] mpc85xx_defconfig: add IDE support for MPC85xxCDS

2012-07-20 Thread Zhao Chenhui
Add IDE support for MPC85xxCDS. Signed-off-by: Zhao Chenhui --- arch/powerpc/configs/mpc85xx_defconfig |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/configs/mpc85xx_defconfig b/arch/powerpc/configs/mpc85xx_defconfig index 03ee911..45eda33 100644 --- a/ar

[PATCH] powerpc/smp: Do not disable IPI interrupts during suspend

2012-07-20 Thread Zhao Chenhui
During suspend, all interrupts including IPI will be disabled. In this case, the suspend process will hang in SMP. To prevent this, pass the flag IRQF_NO_SUSPEND when requesting IPI irq. Signed-off-by: Zhao Chenhui Signed-off-by: Li Yang --- arch/powerpc/kernel/smp.c |2 +- 1 files changed,

[PATCH] powerpc/mm: add ZONE_NORMAL zone for 64 bit kernel

2012-07-20 Thread Shaohui Xie
PowerPC platform only supports ZONE_DMA zone for 64bit kernel, so all the memory will be put into this zone. If the memory size is greater than the device's DMA capability and device uses dma_alloc_coherent to allocate memory, it will get an address which is over the device's DMA addressing, the de

[PATCH] pm: add power node to dts

2012-07-20 Thread Zhao Chenhui
The Power Management device tree stub indicated that the platform supports Power Management feature. Signed-off-by: Zhao Chenhui --- arch/powerpc/boot/dts/fsl/mpc8536si-post.dtsi | 14 ++- arch/powerpc/boot/dts/fsl/mpc8544si-post.dtsi |2 + arch/powerpc/boot/dts/fsl/mpc8548si-post.dtsi

Re: [PATCH][upstream] TDM Framework

2012-07-20 Thread Michael Ellerman
On Fri, 2012-07-20 at 18:05 +0530, sand...@freescale.com wrote: > From: Sandeep Singh > > TDM Framework is an attempt to provide a platform independent layer which can > offer a standard interface for TDM access to different client modules. > Beneath, the framework layer can house different type

Re: [PATCH][upstream] TDM Framework

2012-07-20 Thread Josh Boyer
On Fri, Jul 20, 2012 at 8:54 AM, Michael Ellerman wrote: > On Fri, 2012-07-20 at 18:05 +0530, sand...@freescale.com wrote: >> From: Sandeep Singh >> >> TDM Framework is an attempt to provide a platform independent layer which can >> offer a standard interface for TDM access to different client m

Re: [PATCH 3/4] powerpc/crypto: add 842 hardware compression driver

2012-07-20 Thread Seth Jennings
On 07/20/2012 12:33 AM, Michael Ellerman wrote: > On Thu, 2012-07-19 at 09:42 -0500, Seth Jennings wrote: >> This patch adds the driver for interacting with the 842 >> compression accelerator on IBM Power7+ systems. > > ... > >> +struct nx842_slentry { >> +unsigned long ptr; /* Absolute addre

Re: [PATCH] mpc85xx_defconfig: add IDE support for MPC85xxCDS

2012-07-20 Thread Alan Cox
On Fri, 20 Jul 2012 20:45:25 +0800 Zhao Chenhui wrote: > Add IDE support for MPC85xxCDS. > > Signed-off-by: Zhao Chenhui > --- > arch/powerpc/configs/mpc85xx_defconfig |2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/arch/powerpc/configs/mpc85xx_defconfig > b/ar

Re: [PATCH][upstream] TDM Framework

2012-07-20 Thread Stephen Rothwell
Hi, On Fri, 20 Jul 2012 18:05:13 +0530 wrote: > > From: Sandeep Singh > > TDM Framework is an attempt to provide a platform independent layer which can > offer a standard interface for TDM access to different client modules. I also wondered what TDM is. > +++ b/drivers/tdm/Kconfig > @@ -0,0

Errors related to i2c-powermac on the G4

2012-07-20 Thread Andrey Gusev
Hi! I build kernel from git and can see errors in dmesg on boot. 3.4.5 doesn't have such issue. git show | head -n2 commit 85efc72a0218335324d358ac479a04c16316fd4d Merge: 3e4b945 6a3ca4f dmesg: [0.00] Using PowerMac machine description [0.00] Total memory = 1536MB; using 4096kB

Re: mpc8xxx PCIe hotplug needs fixing, some clues ..

2012-07-20 Thread Kumar Gala
On Jul 20, 2012, at 2:17 AM, Joakim Tjernlund wrote: > > Hi Guys > > I see that you have been hacking Freescale PCI before so I send this to > you(and the list) > > We are using PCIe(as RC) on P2010(basically a mpc85xx) and have PCI device > that > started from user space (needs advance cloc