[PATCH] vfio powerpc: implemented IOMMU driver for VFIO

2012-11-27 Thread Alexey Kardashevskiy
VFIO implements platform independent stuff such as a PCI driver, BAR access (via read/write on a file descriptor or direct mapping when possible) and IRQ signaling. The platform dependent part includes IOMMU initialization and handling. This patch implements an IOMMU driver for VFIO which does map

[PATCH] vfio powerpc: enabled on powernv platform

2012-11-27 Thread Alexey Kardashevskiy
This patch initializes IOMMU groups based on the IOMMU configuration discovered during the PCI scan on POWERNV (POWER non virtualized) platform. The IOMMU groups are to be used later by VFIO driver (PCI pass through). It also implements an API for mapping/unmapping pages for guest PCI drivers and

Re: linux-next: build failure after merge of the powerpc tree

2012-11-27 Thread Benjamin Herrenschmidt
On Wed, 2012-11-28 at 14:03 +1100, Stephen Rothwell wrote: > Hi all, > > After merging the powerpc tree, next-20121115's build (powerpc > allmodconfig) failed like this: > > ERROR: ".of_reconfig_notifier_register" [drivers/crypto/nx/nx-compress.ko] > undefined! > ERROR: ".of_reconfig_notifier_un

Re: 3.7-rc7: BUG: MAX_STACK_TRACE_ENTRIES too low!

2012-11-27 Thread Christian Kujau
On Tue, 27 Nov 2012 at 19:06, Christian Kujau wrote: > the same thing[0] happened again in 3.7-rc7, after ~20h uptime: I found the following on patchwork, but this seems to deal with powerpc64 only, while this PowerBook G4 of mine is powerpc32: http://patchwork.ozlabs.org/patch/193414/ It loo

3.7-rc7: BUG: MAX_STACK_TRACE_ENTRIES too low!

2012-11-27 Thread Christian Kujau
Hi, the same thing[0] happened again in 3.7-rc7, after ~20h uptime: [40007.339487] [sched_delayed] sched: RT throttling activated [69731.388717] BUG: MAX_STACK_TRACE_ENTRIES too low! [69731.390371] turning off the locking correctness validator. [69731.391942] Call Trace: [69731.393525] [c9a61c10]

linux-next: build failure after merge of the powerpc tree

2012-11-27 Thread Stephen Rothwell
Hi all, After merging the powerpc tree, next-20121115's build (powerpc allmodconfig) failed like this: ERROR: ".of_reconfig_notifier_register" [drivers/crypto/nx/nx-compress.ko] undefined! ERROR: ".of_reconfig_notifier_unregister" [drivers/crypto/nx/nx-compress.ko] undefined! Caused by commit

Re: [PATCH] powerpc/pci-hotplug: fix the rescanned pci device's dma_set_mask issue

2012-11-27 Thread Chen Yuanquan-B41889
On 11/25/2012 08:41 PM, Kumar Gala wrote: On Nov 22, 2012, at 10:29 PM, Yuanquan Chen wrote: On powerpc arch, dma_ops of rescanned pci device after system's booting up won't be initialized by system, so it will fail to execute the dma_set_mask in the device's driver. Initialize it to solve th

Re: [Patch v4 00/12] memory-hotplug: hot-remove physical memory

2012-11-27 Thread Yasuaki Ishimatsu
Hi Andrew, 2012/11/28 4:27, Andrew Morton wrote: On Tue, 27 Nov 2012 18:00:10 +0800 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/11/1/93 As we're n

Re: problem with mpc8536 and kernel 2.6.32 and interrupts

2012-11-27 Thread Scott Wood
On 11/22/2012 06:12:03 AM, Koen Swinters wrote: We have a module from broadcom loaded that makes use of interrupts via PCI and interrupt driver FSL-MSI . When we disable this interrupt the coredumps dissapear. I`ve tried the following patch: 78e2e68a2b79f394b7cd61e07987a8a89af907f7. But is d

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

2012-11-27 Thread vinayak holikatti
> drivers/scsi/ufs/ufshcd.c | 2 +- Acked-by: Vinayak Holikatti only for drivers/scsi/ufs/ufshcd.c > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c > index 4a370f8..a79ff87 100644 > --- a/drivers/scsi/ufs/ufshcd.c > +++ b/drivers/scsi/ufs/ufshcd.c > @@ -1811

[PATCH 05/16] i2c: i2c-cpm: remove __dev* attributes

2012-11-27 Thread Bill Pemberton
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton Cc: Jochen Friedrich Cc: linuxppc-dev@lists.ozlabs.org --- drivers/i2c/busses/i2c-cpm.

Re: [Patch v4 00/12] memory-hotplug: hot-remove physical memory

2012-11-27 Thread Rafael J. Wysocki
On Tuesday, November 27, 2012 11:27:41 AM Andrew Morton wrote: > On Tue, 27 Nov 2012 18:00:10 +0800 > 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.

Re: [Patch v4 00/12] memory-hotplug: hot-remove physical memory

2012-11-27 Thread Andrew Morton
On Tue, 27 Nov 2012 18:00:10 +0800 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/11/1/93 As we're now at -rc7 I'd prefer to take a look at all of

Re: [PATCH] cpuidle: Measure idle state durations with monotonic clock

2012-11-27 Thread Rafael J. Wysocki
On Wednesday, November 14, 2012 05:56:30 PM Julius Werner wrote: > Many cpuidle drivers measure their time spent in an idle state by > reading the wallclock time before and after idling and calculating the > difference. This leads to erroneous results when the wallclock time gets > updated by anoth

[Patch v4 12/12] memory-hotplug: free node_data when a node is offlined

2012-11-27 Thread Wen Congyang
We call hotadd_new_pgdat() to allocate memory to store node_data. So we should free it when removing a 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: KOSAKI Motohiro CC: Yasuaki

[Patch v4 11/12] memory-hotplug: remove sysfs file of node

2012-11-27 Thread 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: Christoph Lameter Cc: Min

[Patch v4 10/12] memory-hotplug: memory_hotplug: clear zone when removing the memory

2012-11-27 Thread Wen Congyang
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 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

[Patch v4 09/12] memory-hotplug: remove page table of x86_64 architecture

2012-11-27 Thread 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 Motohiro CC: Yasuaki Is

[Patch v4 03/12] memory-hotplug: remove redundant codes

2012-11-27 Thread Wen Congyang
offlining memory blocks and checking whether memory blocks are offlined are very similar. This patch introduces a new function to remove redundant codes. CC: David Rientjes CC: Jiang Liu CC: Len Brown CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Yasuaki Is

[Patch v4 04/12] memory-hotplug: remove /sys/firmware/memmap/X sysfs

2012-11-27 Thread Wen Congyang
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 which is allocated by boot

[Patch v4 00/12] memory-hotplug: hot-remove physical memory

2012-11-27 Thread Wen Congyang
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/11/1/93 If you want to know the reason, please read following thread. https://lkml.org/lkml/2012/10/2/83 The patch-set has only t

[Patch v4 05/12] memory-hotplug: introduce new function arch_remove_memory() for removing page table depends on architecture

2012-11-27 Thread 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 to implement it for s3

[Patch v4 06/12] memory-hotplug: unregister memory section on SPARSEMEM_VMEMMAP

2012-11-27 Thread Wen Congyang
From: 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: Christop

[Patch v4 08/12] memory-hotplug: remove memmap of sparse-vmemmap

2012-11-27 Thread Wen Congyang
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

[Patch v4 02/12] memory-hotplug: check whether all memory blocks are offlined or not when removing memory

2012-11-27 Thread Wen Congyang
From: Yasuaki Ishimatsu We remove the memory like this: 1. lock memory hotplug 2. offline a memory block 3. unlock memory hotplug 4. repeat 1-3 to offline all memory blocks 5. lock memory hotplug 6. remove memory(TODO) 7. unlock memory hotplug All memory blocks must be offlined before removing m

[Patch v4 07/12] memory-hotplug: implement register_page_bootmem_info_section of sparse-vmemmap

2012-11-27 Thread Wen Congyang
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

[Patch v4 01/12] memory-hotplug: try to offline the memory twice to avoid dependence

2012-11-27 Thread Wen Congyang
memory can't be offlined when CONFIG_MEMCG is selected. For example: there is a memory device on node 1. The address range is [1G, 1.5G). You will find 4 new directories memory8, memory9, memory10, and memory11 under the directory /sys/devices/system/memory/. If CONFIG_MEMCG is selected, we will a