[PATCH 1/2] powerpc/dma/raidengine: add raidengine device

2012-11-21 Thread b29237
From: Xuelin Shi 

The RaidEngine is a new Freescale hardware that used for parity
computation offloading in RAID5/6.

This patch adds the device node in device tree and related binding
documentation.

Signed-off-by: Harninder Rai 
Signed-off-by: Naveen Burmi 
Signed-off-by: Xuelin Shi 
---
 .../devicetree/bindings/powerpc/fsl/raideng.txt|   81 +++
 arch/powerpc/boot/dts/fsl/p5020si-post.dtsi|1 +
 arch/powerpc/boot/dts/fsl/p5020si-pre.dtsi |6 ++
 arch/powerpc/boot/dts/fsl/qoriq-raid1.0-0.dtsi |   85 
 4 files changed, 173 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/powerpc/fsl/raideng.txt
 create mode 100644 arch/powerpc/boot/dts/fsl/qoriq-raid1.0-0.dtsi

diff --git a/Documentation/devicetree/bindings/powerpc/fsl/raideng.txt 
b/Documentation/devicetree/bindings/powerpc/fsl/raideng.txt
new file mode 100644
index 000..4ad29b9
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/raideng.txt
@@ -0,0 +1,81 @@
+* Freescale 85xx RAID Engine nodes
+
+RAID Engine nodes are defined to describe on-chip RAID accelerators.  Each RAID
+Engine should have a separate node.
+
+Supported chips:
+P5020, P5040
+
+Required properties:
+
+- compatible:  Should contain "fsl,raideng-v1.0" as the value
+   This identifies RAID Engine block. 1 in 1.0 represents
+   major number whereas 0 represents minor number. The
+   version matches the hardware IP version.
+- reg: offset and length of the register set for the device
+- ranges:  standard ranges property specifying the translation
+   between child address space and parent address space
+
+Example:
+   /* P5020 */
+   raideng: raideng@32 {
+   compatible = "fsl,raideng-v1.0";
+   #address-cells = <1>;
+   #size-cells = <1>;
+   reg = <0x32 0x1>;
+   ranges  = <0 0x32 0x1>;
+   };
+
+
+There must be a sub-node for each job queue present in RAID Engine
+This node must be a sub-node of the main RAID Engine node
+
+- compatible:  Should contain "fsl,raideng-v1.0-job-queue" as the value
+   This identifies the job queue interface
+- reg: offset and length of the register set for job queue
+- ranges:  standard ranges property specifying the translation
+   between child address space and parent address space
+
+Example:
+   /* P5020 */
+   raideng_jq0@1000 {
+   compatible = "fsl,raideng-v1.0-job-queue";
+   reg= <0x1000 0x1000>;
+   ranges = <0x0 0x1000 0x1000>;
+   };
+
+
+There must be a sub-node for each job ring present in RAID Engine
+This node must be a sub-node of job queue node
+
+- compatible:  Must contain "fsl,raideng-v1.0-job-ring" as the value
+   This identifies job ring. Should contain either
+   "fsl,raideng-v1.0-hp-ring" or "fsl,raideng-v1.0-lp-ring"
+   depending upon whether ring has high or low priority
+- reg: offset and length of the register set for job ring
+- interrupts:  interrupt mapping for job ring IRQ
+
+Optional property:
+
+- fsl,liodn:   Specifies the LIODN to be used for Job Ring. This
+   property is normally set by firmware. Value
+   is of 12-bits which is the LIODN number for this JR.
+   This property is used by the IOMMU (PAMU) to distinquish
+   transactions from this JR and than be able to do address
+   translation & protection accordingly.
+
+Example:
+   /* P5020 */
+   raideng_jq0@1000 {
+   compatible = "fsl,raideng-v1.0-job-queue";
+   reg= <0x1000 0x1000>;
+   ranges = <0x0 0x1000 0x1000>;
+
+   raideng_jr0: jr@0 {
+   compatible = "fsl,raideng-v1.0-job-ring", 
"fsl,raideng-v1.0-hp-ring";
+   reg= <0x0 0x400>;
+   interrupts = <139 2 0 0>;
+   interrupt-parent = <&mpic>;
+   fsl,liodn = <0x41>;
+   };
+   };
diff --git a/arch/powerpc/boot/dts/fsl/p5020si-post.dtsi 
b/arch/powerpc/boot/dts/fsl/p5020si-post.dtsi
index 64b6abe..5d7205b 100644
--- a/arch/powerpc/boot/dts/fsl/p5020si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p5020si-post.dtsi
@@ -354,4 +354,5 @@
 /include/ "qoriq-sata2-0.dtsi"
 /include/ "qoriq-sata2-1.dtsi"
 /include/ "qoriq-sec4.2-0.dtsi"
+/include/ "qoriq-raid1.0-0.dtsi"
 };
diff --git a/arch/powerpc/boot/dts/fsl/p5020si-pre.dtsi 
b/arch/powerpc/boot/dts/fsl/p5020si-pre.dtsi
index 0a198b0..8df47fc 100644
--- a/arch/powerpc/boot/dts/fsl/p5020si-pre.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p5020si-pre.dtsi
@@ -73,6 +73,12 @@
rtic_c = &rtic_c;
rtic_d = &rtic_d;
sec_mon = &sec_mon;
+
+   raideng = &raideng;
+   rai

[PATCH 2/2] powerpc/dma/raidengine: enable Freescale RaidEngine device

2012-11-21 Thread b29237
From: Xuelin Shi 

The RaidEngine is a new FSL hardware that used as hardware acceration
for RAID5/6.

This patch enables the RaidEngine functionality and provides hardware
offloading capability for memcpy, xor and raid6 pq computation. It works
under dmaengine control with async_layer interface.

Signed-off-by: Harninder Rai 
Signed-off-by: Naveen Burmi 
Signed-off-by: Xuelin Shi 
---
 drivers/dma/Kconfig|   14 +
 drivers/dma/Makefile   |1 +
 drivers/dma/fsl_raid.c |  990 
 drivers/dma/fsl_raid.h |  317 
 4 files changed, 1322 insertions(+)
 create mode 100644 drivers/dma/fsl_raid.c
 create mode 100644 drivers/dma/fsl_raid.h

diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index d4c1218..aa37279 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -320,6 +320,20 @@ config MMP_PDMA
help
  Support the MMP PDMA engine for PXA and MMP platfrom.
 
+config FSL_RAID
+tristate "Freescale RAID Engine Device Driver"
+depends on FSL_SOC && !FSL_DMA
+select DMA_ENGINE
+select ASYNC_TX_ENABLE_CHANNEL_SWITCH
+select ASYNC_MEMCPY
+select ASYNC_XOR
+select ASYNC_PQ
+---help---
+  Enable support for Freescale RAID Engine. RAID Engine is
+  available on some QorIQ SoCs (like P5020). It has
+  the capability to offload RAID5/RAID6 operations from CPU.
+  RAID5 is XOR and memcpy. RAID6 is P/Q and memcpy
+
 config DMA_ENGINE
bool
 
diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile
index 7428fea..29b65eb 100644
--- a/drivers/dma/Makefile
+++ b/drivers/dma/Makefile
@@ -9,6 +9,7 @@ obj-$(CONFIG_DMATEST) += dmatest.o
 obj-$(CONFIG_INTEL_IOATDMA) += ioat/
 obj-$(CONFIG_INTEL_IOP_ADMA) += iop-adma.o
 obj-$(CONFIG_FSL_DMA) += fsldma.o
+obj-$(CONFIG_FSL_RAID) += fsl_raid.o
 obj-$(CONFIG_MPC512X_DMA) += mpc512x_dma.o
 obj-$(CONFIG_MV_XOR) += mv_xor.o
 obj-$(CONFIG_DW_DMAC) += dw_dmac.o
diff --git a/drivers/dma/fsl_raid.c b/drivers/dma/fsl_raid.c
new file mode 100644
index 000..ec19817
--- /dev/null
+++ b/drivers/dma/fsl_raid.c
@@ -0,0 +1,990 @@
+/*
+ * drivers/dma/fsl_raid.c
+ *
+ * Freescale RAID Engine device driver
+ *
+ * Author:
+ * Harninder Rai 
+ * Naveen Burmi 
+ *
+ * Copyright (c) 2010-2012 Freescale Semiconductor, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * * Neither the name of Freescale Semiconductor nor the
+ *   names of its contributors may be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * ALTERNATIVELY, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") as published by the Free Software
+ * Foundation, either version 2 of that License or (at your option) any
+ * later version.
+ *
+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 
THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Theory of operation:
+ *
+ * General capabilities:
+ * RAID Engine (RE) block is capable of offloading XOR, memcpy and P/Q
+ * calculations required in RAID5 and RAID6 operations. RE driver
+ * registers with Linux's ASYNC layer as dma driver. RE hardware
+ * maintains strict ordering of the requests through chained
+ * command queueing.
+ *
+ * Data flow:
+ * Software RAID layer of Linux (MD layer) maintains RAID partitions,
+ * strips, stripes etc. It sends requests to the underlying AYSNC layer
+ * which further passes it to RE driver. ASYNC layer decides which request
+ * goes to which job ring of RE hardware. For every request processed by
+ * RAID Engine, driver gets an interrupt unless coalescing is set. The
+ * per job ring interrupt handler checks the status register for errors,
+ * 

Re: [PATCH 207/493] i2c: remove use of __devinit

2012-11-21 Thread Barry Song
2012/11/20 Bill Pemberton :
> CONFIG_HOTPLUG is going away as an option so __devinit is no longer
> needed.
>
> Signed-off-by: Bill Pemberton 
> Cc: Jean Delvare 
> Cc: Wolfram Sang 
> Cc: "Ben Dooks " 
> Cc: Rudolf Marek 
> Cc: Jochen Friedrich 
> Cc: Peter Korsgaard 
> Cc: Tony Lindgren 
> Cc: Olof Johansson 
> Cc: Vitaly Wool 
> Cc: Guan Xuetao 
> Cc: Barry Song 
> Cc: "Mark M. Hoffman" 
> Cc: linux-...@vger.kernel.org
> Cc: linuxppc-dev@lists.ozlabs.org
> Cc: linux-o...@vger.kernel.org
> Cc: linux-arm-ker...@lists.infradead.org
> ---

Acked-by: Barry Song 

>  drivers/i2c/busses/i2c-ali1535.c|  4 ++--
>  drivers/i2c/busses/i2c-ali1563.c|  4 ++--
>  drivers/i2c/busses/i2c-ali15x3.c|  4 ++--
>  drivers/i2c/busses/i2c-amd756.c |  2 +-
>  drivers/i2c/busses/i2c-amd8111.c|  2 +-
>  drivers/i2c/busses/i2c-at91.c   |  6 +++---
>  drivers/i2c/busses/i2c-au1550.c |  2 +-
>  drivers/i2c/busses/i2c-cpm.c|  4 ++--
>  drivers/i2c/busses/i2c-designware-pcidrv.c  |  2 +-
>  drivers/i2c/busses/i2c-designware-platdrv.c |  2 +-
>  drivers/i2c/busses/i2c-eg20t.c  |  2 +-
>  drivers/i2c/busses/i2c-elektor.c|  4 ++--
>  drivers/i2c/busses/i2c-gpio.c   |  4 ++--
>  drivers/i2c/busses/i2c-highlander.c |  2 +-
>  drivers/i2c/busses/i2c-hydra.c  |  2 +-
>  drivers/i2c/busses/i2c-i801.c   | 14 +++---
>  drivers/i2c/busses/i2c-ibm_iic.c|  4 ++--
>  drivers/i2c/busses/i2c-intel-mid.c  |  2 +-
>  drivers/i2c/busses/i2c-isch.c   |  2 +-
>  drivers/i2c/busses/i2c-mpc.c| 20 ++--
>  drivers/i2c/busses/i2c-mv64xxx.c| 12 ++--
>  drivers/i2c/busses/i2c-mxs.c|  2 +-
>  drivers/i2c/busses/i2c-nforce2.c|  4 ++--
>  drivers/i2c/busses/i2c-nuc900.c |  2 +-
>  drivers/i2c/busses/i2c-ocores.c |  2 +-
>  drivers/i2c/busses/i2c-octeon.c |  6 +++---
>  drivers/i2c/busses/i2c-omap.c   |  2 +-
>  drivers/i2c/busses/i2c-parport-light.c  |  2 +-
>  drivers/i2c/busses/i2c-pasemi.c |  2 +-
>  drivers/i2c/busses/i2c-pca-isa.c|  4 ++--
>  drivers/i2c/busses/i2c-pca-platform.c   |  2 +-
>  drivers/i2c/busses/i2c-piix4.c  | 10 +-
>  drivers/i2c/busses/i2c-pmcmsp.c |  2 +-
>  drivers/i2c/busses/i2c-pnx.c|  2 +-
>  drivers/i2c/busses/i2c-powermac.c   | 12 ++--
>  drivers/i2c/busses/i2c-puv3.c   |  2 +-
>  drivers/i2c/busses/i2c-pxa-pci.c|  2 +-
>  drivers/i2c/busses/i2c-rcar.c   |  2 +-
>  drivers/i2c/busses/i2c-s6000.c  |  4 ++--
>  drivers/i2c/busses/i2c-sh7760.c |  4 ++--
>  drivers/i2c/busses/i2c-sirf.c   |  2 +-
>  drivers/i2c/busses/i2c-sis5595.c|  4 ++--
>  drivers/i2c/busses/i2c-sis630.c |  4 ++--
>  drivers/i2c/busses/i2c-sis96x.c |  2 +-
>  drivers/i2c/busses/i2c-tegra.c  |  2 +-
>  drivers/i2c/busses/i2c-via.c|  2 +-
>  drivers/i2c/busses/i2c-viapro.c |  2 +-
>  drivers/i2c/busses/i2c-xiic.c   |  2 +-
>  drivers/i2c/busses/i2c-xlr.c|  2 +-
>  drivers/i2c/busses/scx200_acb.c | 10 +-
>  drivers/i2c/muxes/i2c-mux-gpio.c|  4 ++--
>  drivers/i2c/muxes/i2c-mux-pinctrl.c |  2 +-
>  52 files changed, 103 insertions(+), 103 deletions(-)
>
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 192/493] scsi: remove use of __devinit

2012-11-21 Thread Russell King - ARM Linux
On Mon, Nov 19, 2012 at 01:22:21PM -0500, Bill Pemberton wrote:
>  drivers/scsi/arm/acornscsi.c  |  2 +-
>  drivers/scsi/arm/arxescsi.c   |  2 +-
>  drivers/scsi/arm/cumana_1.c   |  2 +-
>  drivers/scsi/arm/cumana_2.c   |  2 +-
>  drivers/scsi/arm/eesox.c  |  2 +-
>  drivers/scsi/arm/oak.c|  2 +-
>  drivers/scsi/arm/powertec.c   |  2 +-

For these,

Acked-by: Russell King 
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 238/493] mtd: remove use of __devinit

2012-11-21 Thread Russell King - ARM Linux
On Mon, Nov 19, 2012 at 01:23:07PM -0500, Bill Pemberton wrote:
>  drivers/mtd/maps/pismo.c   | 14 +++---
>  drivers/mtd/maps/sa1100-flash.c|  5 ++---

For these two,

Acked-by: Russell King 
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 198/493] ethernet: remove use of __devinit

2012-11-21 Thread Russell King - ARM Linux
On Mon, Nov 19, 2012 at 01:22:27PM -0500, Bill Pemberton wrote:
>  drivers/net/ethernet/8390/etherh.c |  4 +-
>  drivers/net/ethernet/amd/am79c961a.c   |  2 +-
>  drivers/net/ethernet/i825xx/ether1.c   |  8 +-
>  drivers/net/ethernet/seeq/ether3.c | 10 +--

For these four,

Acked-by: Russell King 
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 298/493] video: remove use of __devinitdata

2012-11-21 Thread Russell King - ARM Linux
On Mon, Nov 19, 2012 at 01:24:07PM -0500, Bill Pemberton wrote:
>  drivers/video/acornfb.c|  8 +++---
>  drivers/video/cyber2000fb.c|  2 +-
>  drivers/video/sa1100fb.c   |  2 +-

For these three,

Acked-by: Russell King 
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 192/493] scsi: remove use of __devinit

2012-11-21 Thread Guennadi Liakhovetski
On Mon, 19 Nov 2012, Bill Pemberton wrote:

>  drivers/scsi/tmscsim.c| 16 +++---

Acked-by: Guennadi Liakhovetski 

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 3/9] powerpc/PCI: Remove CONFIG_HOTPLUG ifdefs

2012-11-21 Thread Bill Pemberton
Remove conditional code based on CONFIG_HOTPLUG being false.  It's
always on now in preparation of it going away as an option.

Signed-off-by: Bill Pemberton 
Cc: Benjamin Herrenschmidt 
Cc: Paul Mackerras 
Cc: Grant Likely 
Cc: Rob Herring 
Cc: Bjorn Helgaas 
Cc: linuxppc-dev@lists.ozlabs.org
Cc: devicetree-disc...@lists.ozlabs.org
---
 arch/powerpc/kernel/pci-common.c | 4 
 arch/powerpc/kernel/pci_64.c | 4 
 2 files changed, 8 deletions(-)

diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 7f94f76..abc0d08 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -1428,8 +1428,6 @@ void __init pcibios_resource_survey(void)
ppc_md.pcibios_fixup();
 }
 
-#ifdef CONFIG_HOTPLUG
-
 /* This is used by the PCI hotplug driver to allocate resource
  * of newly plugged busses. We can try to consolidate with the
  * rest of the code later, for now, keep it as-is as our main
@@ -1488,8 +1486,6 @@ void pcibios_finish_adding_to_bus(struct pci_bus *bus)
 }
 EXPORT_SYMBOL_GPL(pcibios_finish_adding_to_bus);
 
-#endif /* CONFIG_HOTPLUG */
-
 int pcibios_enable_device(struct pci_dev *dev, int mask)
 {
if (ppc_md.pcibios_enable_device_hook)
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 4ff190f..2cbe676 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -74,8 +74,6 @@ static int __init pcibios_init(void)
 
 subsys_initcall(pcibios_init);
 
-#ifdef CONFIG_HOTPLUG
-
 int pcibios_unmap_io_space(struct pci_bus *bus)
 {
struct pci_controller *hose;
@@ -124,8 +122,6 @@ int pcibios_unmap_io_space(struct pci_bus *bus)
 }
 EXPORT_SYMBOL_GPL(pcibios_unmap_io_space);
 
-#endif /* CONFIG_HOTPLUG */
-
 static int __devinit pcibios_map_phb_io_space(struct pci_controller *hose)
 {
struct vm_struct *area;
-- 
1.8.0

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v3 00/12] memory-hotplug: hot-remove physical memory

2012-11-21 Thread Yasuaki Ishimatsu
Hi Andrew,

The patch-set aims to linux-3.8. So we would like you to merge
the patch-set into your tree.

The patch-set applied many comments. Currently there is no
comment to the patch-set.

Additionally, we have spent a lot of time on the verification
of the patch-set. And we found many bugs, and fixed them.

So we believe that Linux on x86_64 can support memory hot remove
by the patch-set. 

Thanks,
Yasuaki Ishimatsu

2012/11/01 18:44, Wen Congyang wrote:
> The patch-set was divided from following thread's patch-set.
>  https://lkml.org/lkml/2012/9/5/201
> 
> The last version of this patchset:
>  https://lkml.org/lkml/2012/10/23/213
> 
> If you want to know the reason, please read following thread.
> 
> https://lkml.org/lkml/2012/10/2/83
> 
> The patch-set has only the function of kernel core side for physical
> memory hot remove. So if you use the patch, please apply following
> patches.
> 
> - bug fix for memory hot remove
>https://lkml.org/lkml/2012/10/31/269
>
> - acpi framework
>https://lkml.org/lkml/2012/10/26/175
> 
> The patches can free/remove the following things:
> 
>- /sys/firmware/memmap/X/{end, start, type} : [PATCH 2/10]
>- mem_section and related sysfs files   : [PATCH 3-4/10]
>- memmap of sparse-vmemmap  : [PATCH 5-7/10]
>- page table of removed memory  : [RFC PATCH 8/10]
>- node and related sysfs files  : [RFC PATCH 9-10/10]
> 
> * [PATCH 2/10] checks whether the memory can be removed or not.
> 
> If you find lack of function for physical memory hot-remove, please let me
> know.
> 
> How to test this patchset?
> 1. apply this patchset and build the kernel. MEMORY_HOTPLUG, MEMORY_HOTREMOVE,
> ACPI_HOTPLUG_MEMORY must be selected.
> 2. load the module acpi_memhotplug
> 3. hotplug the memory device(it depends on your hardware)
> You will see the memory device under the directory /sys/bus/acpi/devices/.
> Its name is PNP0C80:XX.
> 4. online/offline pages provided by this memory device
> You can write online/offline to /sys/devices/system/memory/memoryX/state 
> to
> online/offline pages provided by this memory device
> 5. hotremove the memory device
> You can hotremove the memory device by the hardware, or writing 1 to
> /sys/bus/acpi/devices/PNP0C80:XX/eject.
> 
> Note: if the memory provided by the memory device is used by the kernel, it
> can't be offlined. It is not a bug.
> 
> Known problems:
> 1. hotremoving memory device may cause kernel panicked
> This bug will be fixed by Liu Jiang's patch:
> https://lkml.org/lkml/2012/7/3/1
> 
> 
> Changelogs from v2 to v3:
>   Patch9: call sync_global_pgds() if pgd is changed
>   Patch10: fix a problem int the patch
> 
> Changelogs from v1 to v2:
>   Patch1: new patch, offline memory twice. 1st iterate: offline every non 
> primary
>   memory block. 2nd iterate: offline primary (i.e. first added) memory
>   block.
> 
>   Patch3: new patch, no logical change, just remove reduntant codes.
> 
>   Patch9: merge the patch from wujianguo into this patch. flush tlb on all cpu
>   after the pagetable is changed.
> 
>   Patch12: new patch, free node_data when a node is offlined
> 
> Wen Congyang (6):
>memory-hotplug: try to offline the memory twice to avoid dependence
>memory-hotplug: remove redundant codes
>memory-hotplug: introduce new function arch_remove_memory() for
>  removing page table depends on architecture
>memory-hotplug: remove page table of x86_64 architecture
>memory-hotplug: remove sysfs file of node
>memory-hotplug: free node_data when a node is offlined
> 
> Yasuaki Ishimatsu (6):
>memory-hotplug: check whether all memory blocks are offlined or not
>  when removing memory
>memory-hotplug: remove /sys/firmware/memmap/X sysfs
>memory-hotplug: unregister memory section on SPARSEMEM_VMEMMAP
>memory-hotplug: implement register_page_bootmem_info_section of
>  sparse-vmemmap
>memory-hotplug: remove memmap of sparse-vmemmap
>memory-hotplug: memory_hotplug: clear zone when removing the memory
> 
>   arch/ia64/mm/discontig.c |  14 ++
>   arch/ia64/mm/init.c  |  18 ++
>   arch/powerpc/mm/init_64.c|  14 ++
>   arch/powerpc/mm/mem.c|  12 +
>   arch/s390/mm/init.c  |  12 +
>   arch/s390/mm/vmem.c  |  14 ++
>   arch/sh/mm/init.c|  17 ++
>   arch/sparc/mm/init_64.c  |  14 ++
>   arch/tile/mm/init.c  |   8 +
>   arch/x86/include/asm/pgtable_types.h |   1 +
>   arch/x86/mm/init_32.c|  12 +
>   arch/x86/mm/init_64.c| 417 
> +++
>   arch/x86/mm/pageattr.c   |  47 ++--
>   drivers/acpi/acpi_memhotplug.c   |   8 +-
>   drivers/base/memory.c|   6 +
>   drivers/firmware/memmap.c|  98 +++-
>   include/linux/firmware-m