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

2012-10-04 Thread Yasuaki Ishimatsu
From: Wen Congyang 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 CC: Jiang Liu CC: Len Brown CC: Chris

[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 CC: Jiang Liu CC: Len Brown CC: Christoph Lameter Cc

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

2012-10-04 Thread Yasuaki Ishimatsu
From: Wen Congyang 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 CC: Jiang Liu CC: Len Brown CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Mot

[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 o

[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 implement

[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 CC: Jiang Liu CC: Len B

[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 CC: Jiang Liu CC: Len Brown CC: Christoph Lameter Cc: Minchan Kim

[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 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 (I don't know how t

[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 i

[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 CC: Jiang Liu CC: Len Brown CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSA

[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

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 wrote: > > On Wed, 3 Oct 2012 15:18:43 -0400 > Alexandre Bounine wrote: > > > ... > > > > +static u16 rio_destid_alloc(struct rio_net *net) > > +{ > > + int destid; > > + struct rio_id_table *idtab = &net->destid_table; > > + > > + spin_lock

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. Sinc

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

[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 asm-generic

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 wrote: > > On Wed, 3 Oct 2012 15:18:41 -0400 > Alexandre Bounine wrote: > > > ... > > > > +static void __devinit disc_work_handler(struct work_struct *_work) > > +{ > > + struct rio_disc_work *work = container_of(_work, > > +

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 resu

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 wrote: > > On Wed, 3 Oct 2012 15:18:39 -0400 > Alexandre Bounine wrote: > > > Fix blocking wait loop in the RapidIO discovery routine to avoid > > warning dumps about stalled CPU on x86 platforms. > > > > ... > > > > + to_end = jiffies +

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: [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-B1639

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: [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 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 at: > > git://git.

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 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 in that branch > tha

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, wrote: > From: Varun Sethi > > 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 Logical IO Device Number (LIODN), and PAACT table > (logicall

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, wrote: > From: Varun Sethi > > 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 param

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 >

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] http://permalink.gma

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

2012-10-04 Thread b16395
From: Varun Sethi 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. 3. Added an attribute for

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

2012-10-04 Thread b16395
From: Varun Sethi 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, and remap the I/O transact

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

2012-10-04 Thread b16395
From: Varun Sethi 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 --- arch/powerpc/include/asm/device.h |4 1 files changed,

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 > alwa

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 - Pr

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 mi