Re: [RFC v9 PATCH 16/21] memory-hotplug: free memmap of sparse-vmemmap

2012-10-04 Thread Yasuaki Ishimatsu
Hi Chen, Sorry for late reply. 2012/10/02 13:21, Ni zhan Chen wrote: On 09/05/2012 05:25 PM, we...@cn.fujitsu.com wrote: From: Yasuaki Ishimatsu isimatu.yasu...@jp.fujitsu.com All pages of virtual mapping in removed memory cannot be freed, since some pages used as PGD/PUD includes not only

Re: [PATCH] powerpc/iommu: Fix multiple issues with IOMMU pools code

2012-10-04 Thread Alexander Graf
Hi Anton, On 04.10.2012, at 06:57, Anton Blanchard wrote: Hi Alex, Looks to be a preempt issue with the iommu pools code. I did find a couple more bugs along the way too. Anton -- There are a number of issues in the recent IOMMU pools code: - On a preempt kernel we might switch

Re: [PATCH] PPC: Enable the Watchdog vector for 405

2012-10-04 Thread Benjamin Herrenschmidt
On Sun, 2012-09-30 at 17:27 -0600, Jason Gunthorpe wrote: diff --git a/arch/powerpc/kernel/head_40x.S b/arch/powerpc/kernel/head_40x.S index 4989661..7edd7b1 100644 --- a/arch/powerpc/kernel/head_40x.S +++ b/arch/powerpc/kernel/head_40x.S @@ -431,29 +431,19 @@ label: /* 0x1000 -

Re: [PATCH] PPC: Correct the tophys/tovirt macros

2012-10-04 Thread Benjamin Herrenschmidt
On Sun, 2012-09-30 at 17:28 -0600, Jason Gunthorpe wrote: asm/page.h discusses the calculation for v2p and p2v, it should be: va = pa + KERNELBASE - PHYSICAL_START which is the same as: va = pa + LOAD_OFFSET tophys/tovirt were using PAGE_OFFSET, which as page.h says, is almost always the

[PATCH 1/3 v2] iommu/fsl: Store iommu domain information pointer in archdata.

2012-10-04 Thread b16395
From: Varun Sethi varun.se...@freescale.com Add a new field in the device (powerpc) archdata structure for storing iommu domain information pointer. This pointer is stored when the device is attached to a particular domain. Signed-off-by: Varun Sethi varun.se...@freescale.com ---

[PATCH 0/3 v2] iommu/fsl: Freescale PAMU driver and IOMMU API implementation.

2012-10-04 Thread b16395
From: Varun Sethi varun.se...@freescale.com This patchset provides the Freescale PAMU (Peripheral Access Management Unit) driver and the corresponding IOMMU API implementation. PAMU is the IOMMU present on Freescale QorIQ platforms. PAMU can authorize memory access, remap the memory address,

[PATCH 2/3 v2] iommu/fsl: Add iommu domain attributes required by fsl PAMU driver.

2012-10-04 Thread b16395
From: Varun Sethi varun.se...@freescale.com Added the following domain attributes required by FSL PAMU driver: 1. Subwindows field added to the iommu domain geometry attribute. 2. Added new iommu stash attribute, which allows setting of the LIODN specific stash id parameter through IOMMU API.

R: Re: PCI device not working

2012-10-04 Thread Davide Viti
Hi, it turns out that if define CONFIG_PCI_NOSCAN in u-boot (as per [1]), the devide behind the second controller is detected by the Linux kernel. Would you suggest any particular patch I should apply to fix this (I'm using kernel 2.6.34) thanx alot in advance Davide [1]

Re: PCI device not working

2012-10-04 Thread Kumar Gala
On Oct 4, 2012, at 7:24 AM, Davide Viti wrote: Hi, it turns out that if define CONFIG_PCI_NOSCAN in u-boot (as per [1]), the devide behind the second controller is detected by the Linux kernel. Would you suggest any particular patch I should apply to fix this (I'm using kernel

Re: [PATCH 2/3 v2] iommu/fsl: Add iommu domain attributes required by fsl PAMU driver.

2012-10-04 Thread Kumar Gala
On Oct 4, 2012, at 6:56 AM, b16...@freescale.com b16...@freescale.com wrote: From: Varun Sethi varun.se...@freescale.com Added the following domain attributes required by FSL PAMU driver: 1. Subwindows field added to the iommu domain geometry attribute. 2. Added new iommu stash attribute,

Re: [PATCH 3/3 v2] iommu/fsl: Freescale PAMU driver and IOMMU API implementation.

2012-10-04 Thread Kumar Gala
On Oct 4, 2012, at 6:56 AM, b16...@freescale.com b16...@freescale.com wrote: From: Varun Sethi varun.se...@freescale.com Following is a brief description of the PAMU hardware: PAMU determines what action to take and whether to authorize the action on the basis of the memory address, a

Re: [git pull] Please pull powerpc.git merge branch

2012-10-04 Thread Linus Torvalds
On Thu, Oct 4, 2012 at 1:38 AM, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: First, however, a note about the pull request details ... the diffstat looks completely on crack, any idea what's up ? It sees piles of files modified in various other archs generic code but I see no patch

Re: [git pull] Please pull powerpc.git merge branch

2012-10-04 Thread Linus Torvalds
On Thu, Oct 4, 2012 at 1:38 AM, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: The following changes since commit 271fd03a3013b106ccc178d54219c1be0c9759b7: powerpc/powernv: I/O and memory alignment for P2P bridges (2012-09-11 16:59:47 -0600) are available in the git repository

RE: [PATCH 2/3 v2] iommu/fsl: Add iommu domain attributes required by fsl PAMU driver.

2012-10-04 Thread Sethi Varun-B16395
-Original Message- From: Kumar Gala [mailto:ga...@kernel.crashing.org] Sent: Thursday, October 04, 2012 6:47 PM To: Sethi Varun-B16395 Cc: joerg.roe...@amd.com; io...@lists.linux-foundation.org; linuxppc- d...@lists.ozlabs.org; linux-ker...@vger.kernel.org; Sethi Varun-B16395

RE: [RFC][PATCH 1/3] iommu/fsl: Store iommu domain information pointer in archdata.

2012-10-04 Thread Sethi Varun-B16395
-Original Message- From: Kumar Gala [mailto:ga...@kernel.crashing.org] Sent: Wednesday, September 19, 2012 7:20 PM To: Sethi Varun-B16395 Cc: io...@lists.linux-foundation.org; joerg.roe...@amd.com; linux- ker...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; Sethi Varun-B16395

Re: [PATCH] PPC: Correct the tophys/tovirt macros

2012-10-04 Thread Jason Gunthorpe
On Thu, Oct 04, 2012 at 09:19:04PM +1000, Benjamin Herrenschmidt wrote: On Sun, 2012-09-30 at 17:28 -0600, Jason Gunthorpe wrote: asm/page.h discusses the calculation for v2p and p2v, it should be: va = pa + KERNELBASE - PHYSICAL_START which is the same as: va = pa + LOAD_OFFSET

RE: [PATCH 1/5] rapidio: fix blocking wait for discovery ready

2012-10-04 Thread Bounine, Alexandre
On Wed, October 03, 2012 6:20 PM Andrew Morton a...@linux-foundation.org wrote: On Wed, 3 Oct 2012 15:18:39 -0400 Alexandre Bounine alexandre.boun...@idt.com wrote: Fix blocking wait loop in the RapidIO discovery routine to avoid warning dumps about stalled CPU on x86 platforms. ...

RE: [PATCH v2] PPC: Do not make the entire heap executable

2012-10-04 Thread Jason Gunthorpe
On PPC the ELF PLT sections look like this: [17] .sbss NOBITS 0002aff8 01aff8 14 00 WA 0 0 4 [18] .plt NOBITS 0002b00c 01aff8 84 00 WAX 0 0 4 [19] .bss NOBITS 0002b090 01aff8 a4 00 WA 0 0 4 Which

RE: [PATCH 3/5] rapidio: run discovery as an asynchronous process

2012-10-04 Thread Bounine, Alexandre
On Wed, October 03, 2012 6:30 PM Andrew Morton a...@linux-foundation.org wrote: On Wed, 3 Oct 2012 15:18:41 -0400 Alexandre Bounine alexandre.boun...@idt.com wrote: ... +static void __devinit disc_work_handler(struct work_struct *_work) +{ + struct rio_disc_work *work =

[GIT PULL] Disintegrate UAPI for powerpc

2012-10-04 Thread David Howells
Can you merge the following branch into the powerpc tree please. This is to complete part of the UAPI disintegration for which the preparatory patches were pulled recently. Note that there are some fixup patches which are at the base of the branch aimed at you, plus all arches get the

Re: [git pull] Please pull powerpc.git merge branch

2012-10-04 Thread Benjamin Herrenschmidt
On Thu, 2012-10-04 at 09:00 -0700, Linus Torvalds wrote: So this happens if you have reverse merges (ie you've pulled my tree, or some other tree I've pulled), and there is no longer a single clear common point that you started from. In that case, there is no simple diff for the what has

Re: [git pull] Please pull powerpc.git merge branch

2012-10-04 Thread Benjamin Herrenschmidt
On Thu, 2012-10-04 at 09:02 -0700, Linus Torvalds wrote: Hmm. There's nothing there. Did you mean for me to pull some branch/tag you didn't mention? Heh, yeah, the mirrors hadn't updated yet so git request-pull didn't put the branch name in. It's common but I usually fix it up by hand. Since

RE: [PATCH 5/5] rapidio: add destination ID allocation mechanism

2012-10-04 Thread Bounine, Alexandre
On Wed, October 03, 2012 6:36 PM Andrew Morton a...@linux-foundation.org wrote: On Wed, 3 Oct 2012 15:18:43 -0400 Alexandre Bounine alexandre.boun...@idt.com wrote: ... +static u16 rio_destid_alloc(struct rio_net *net) +{ + int destid; + struct rio_id_table *idtab =

[PATCH 0/10] memory-hotplug: hot-remove physical memory

2012-10-04 Thread Yasuaki Ishimatsu
The patch-set was divided from following thread's patch-set. https://lkml.org/lkml/2012/9/5/201 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

[PATCH 1/10] memory-hotplug : check whether memory is offline or not when removing memory

2012-10-04 Thread Yasuaki Ishimatsu
When calling remove_memory(), the memory should be offline. If the function is used to online memory, kernel panic may occur. So the patch checks whether memory is offline or not. CC: David Rientjes rient...@google.com CC: Jiang Liu liu...@gmail.com CC: Len Brown len.br...@intel.com CC:

[PATCH 2/10] memory-hotplug : remove /sys/firmware/memmap/X sysfs

2012-10-04 Thread 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 free memory which

[PATCH 3/10] memory-hotplug : introduce new function arch_remove_memory() for removing page table depends on architecture

2012-10-04 Thread Yasuaki Ishimatsu
From: Wen Congyang we...@cn.fujitsu.com For removing memory, we need to remove page table. But it depends on architecture. So the patch introduce arch_remove_memory() for removing page table. Now it only calls __remove_pages(). Note: __remove_pages() for some archtecuture is not implemented

[PATCH 4/10] memory-hotplug : unregister memory section on SPARSEMEM_VMEMMAP

2012-10-04 Thread Yasuaki Ishimatsu
Currently __remove_section for SPARSEMEM_VMEMMAP does nothing. But even if we use SPARSEMEM_VMEMMAP, we can unregister the memory_section. So the patch add unregister_memory_section() into __remove_section(). CC: David Rientjes rient...@google.com CC: Jiang Liu liu...@gmail.com CC: Len Brown

[PATCH 5/10] memory-hotplug : memory-hotplug: check page type in get_page_bootmem

2012-10-04 Thread Yasuaki Ishimatsu
The function get_page_bootmem() may be called more than one time to the same page. There is no need to set page's type, private if the function is not the first time called to the page. Note: the patch is just optimization and does not fix any problem. CC: David Rientjes rient...@google.com CC:

[PATCH 6/10] memory-hotplug : implement register_page_bootmem_info_section of sparse-vmemmap

2012-10-04 Thread 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_memmap() is not

[PATCH 7/10] memory-hotplug : remove memmap of sparse-vmemmap

2012-10-04 Thread 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 memory, the page structs

[PATCH 8/10] memory-hotplug : remove page table of x86_64 architecture

2012-10-04 Thread Yasuaki Ishimatsu
From: Wen Congyang we...@cn.fujitsu.com For hot removing memory, we sholud remove page table about the memory. So the patch searches a page table about the removed memory, and clear page table. CC: David Rientjes rient...@google.com CC: Jiang Liu liu...@gmail.com CC: Len Brown

[PATCH 9/10] memory-hotplug : memory_hotplug: clear zone when removing the memory

2012-10-04 Thread 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 them when the memory is removed. The patch adds a new function __remove_zone() to do this. CC: David Rientjes rient...@google.com CC: Jiang Liu liu...@gmail.com CC:

[PATCH 10/10] memory-hotplug : remove sysfs file of node

2012-10-04 Thread Yasuaki Ishimatsu
From: Wen Congyang we...@cn.fujitsu.com This patch introduces a new function try_offline_node() to remove sysfs file of node when all memory sections of this node are removed. If some memory sections of this node are not removed, this function does nothing. CC: David Rientjes rient...@google.com