[PATCH v4 00/21] EEH reorganization

2012-02-24 Thread Gavin Shan
This series of patches is going to reorganize EEH so that it could support multiple platforms in future. The requirements were raised from the aspects. * The original EEH implementation only support pSeries platform, which would be regarded as guest system. Platform powernv is

[PATCH 08/21] pSeries platform EEH wait PE state

2012-02-24 Thread Gavin Shan
On pSeries platform, the PE state might be temporarily unavailable. In that case, the firmware will return the corresponding wait time. That means the kernel has to wait for appropriate time in order to get the PE state. The patch does the implementation for that. Besides, the function has been

[PATCH 21/21] pSeries platform config space access in EEH

2012-02-24 Thread Gavin Shan
With the original EEH implementation, the access to config space of the corresponding PCI device is done by RTAS sensitive function. That depends on pci_dn heavily. That would limit EEH extension to other platforms like powernv because other platforms might have different ways to access PCI config

[PATCH 10/21] pSeries platform EEH error log retrieval

2012-02-24 Thread Gavin Shan
On RTAS compliant pSeries platform, one dedicated RTAS call has been introduced to retrieve EEH temporary or permanent error log. The patch implements the function of retriving EEH error log through RTAS call. Besides, it has been abstracted by struct eeh_ops::get_log so that EEH core components

[PATCH 17/21] Replace pci_dn with eeh_dev for EEH core

2012-02-24 Thread Gavin Shan
The original EEH implementation is heavily depending on struct pci_dn. We have to put EEH related information to pci_dn. Actually, we could split struct pci_dn so that the EEH sensitive information to form an individual struct, then EEH looks more independent. The patch replaces pci_dn with

[PATCH 09/21] pSeries platform EEH reset PE

2012-02-24 Thread Gavin Shan
On RTAS compliant pSeries platform, there is a dedicated RTAS call (ibm,set-slot-reset) to reset the specified PE. Furthermore, two types of resets are supported: hot and fundamental. the type of reset is to be used actually depends on the included PCI device's requirements. The patch implements

[PATCH 02/21] Cleanup on function names of EEH core

2012-02-24 Thread Gavin Shan
The EEH has been implemented on pSeries platform. The original code looks a little bit nasty. The patch does cleanup on the current EEH implementation so that it looks more clean. * Try adding prefix eeh for functions. * Some function names have been adjusted so that they looks

[PATCH 03/21] Platform dependent EEH operations

2012-02-24 Thread Gavin Shan
EEH has been implemented on RTAS-compliant pSeries platform. That's to say, the EEH operations will be implemented through RTAS calls eventually. The situation limited feasible extension on EEH. In order to support EEH on multiple platforms like pseries and powernv simutaneously. We have to split

[PATCH 20/21] Introduce struct eeh_stats for EEH

2012-02-24 Thread Gavin Shan
With the original EEH implementation, the EEH global statistics are maintained by individual global variables. That makes the code a little hard to maintain. The patch introduces extra struct eeh_stats for the EEH global statistics so that it can be maintained in collective fashion.

[PATCH 16/21] Replace pci_dn with eeh_dev for EEH address cache

2012-02-24 Thread Gavin Shan
With original EEH implementation, struct pci_dn is used while building PCI I/O address cache, which helps on searching the corresponding PCI device according to the given physical I/O address. Besides, pci_dn is associated with the corresponding PCI device while building its I/O cache. The patch

[PATCH 07/21] pSeries platform PE state retrieval

2012-02-24 Thread Gavin Shan
On pSeries platform, there're 2 dedicated RTAS calls introduced to retrieve the corresponding PE's state: ibm,read-slot-reset-state and ibm,read-slot-reset-state2. The patch implements the retrieval of PE's state according to the given PE address. Besides, the implementation has been abstracted

[PATCH 05/21] pSeries platform EEH operation

2012-02-24 Thread Gavin Shan
There're 4 EEH operations that are covered by the dedicated RTAS call ibm,set-eeh-option: enable or disable EEH, enable MMIO and enable DMA. At early stage of system boot, the EEH would be tried to enable on PCI device related device node. MMIO and DMA for particular PE should be enabled when

[PATCH 13/21] Cleanup on function names of EEH aux components

2012-02-24 Thread Gavin Shan
The patch does some cleanup on the function names of EEH aux components. Currently, only couple of function names from eeh_cache have been adjusted so that: * The function name has prefix eeh_addr_cache. * Move around pci_addr_cache_build() in the header file to reflect

[PATCH 15/21] Replace pci_dn with eeh_dev for EEH sysfs

2012-02-24 Thread Gavin Shan
With original EEH implementation, all EEH related statistics have been put into struct pci_dn. We've introduced struct eeh_dev to replace struct pci_dn in EEH core components, including EEH sysfs component. The patch shows EEH statistics from struct eeh_dev instead of struct pci_dn in EEH sysfs

[PATCH 12/21] Cleanup on comments of EEH aux components

2012-02-24 Thread Gavin Shan
There're several EEH aux components and the patch does some cleanup for them so that they look more clean. * Duplicated comments have been removed from the header file. * Comments have been reorganized so that it looks more clean. * The leading comments of functions are

[PATCH 18/21] Replace pci_dn with eeh_dev for EEH aux components

2012-02-24 Thread Gavin Shan
The original EEH implementation is heavily depending on struct pci_dn. We have to put EEH related information to pci_dn. Actually, we could split struct pci_dn so that the EEH sensitive information to form an individual struct, then EEH looks more independent. The patch replaces pci_dn with

[PATCH 14/21] Introduce EEH device

2012-02-24 Thread Gavin Shan
Original EEH implementation depends on struct pci_dn heavily. However, EEH shouldn't depend on that actually because EEH needn't share much information with other PCI components. That's to say, EEH should have worked independently. The patch introduces struct eeh_dev so that EEH core components

[PATCH 04/21] pSeries platform EEH initialization

2012-02-24 Thread Gavin Shan
The platform specific EEH operations have been abstracted by struct eeh_ops. The individual platroms, including pSeries, needs doing necessary initialization before the platform dependent EEH operations work properly. The patch is addressing that and do necessary platform initialization for

[PATCH 06/21] pSeries platform EEH PE address retrieval

2012-02-24 Thread Gavin Shan
There're 2 types of addresses used for EEH operations. The first one would be BDF (Bus/Device/Function) address which is retrieved from the reg property of the corresponding FDT node. Another one is PE address that should be enquired from firmware through RTAS call on pSeries platform. When

[PATCH 01/21] Cleanup on comments of EEH core

2012-02-24 Thread Gavin Shan
The EEH has been implemented on pSeries platform. The original code looks a little bit nasty. The patch does cleanup on the current EEH implementation so that it looks more clean. * Duplicated comments have been removed from the corresponding header files. * Comments

[PATCH 19/21] Replace pci_dn with eeh_dev for EEH on pSeries

2012-02-24 Thread Gavin Shan
The pci_dn has been replaced with eeh_dev. In order to comply with the rule, the EEH platform implementation on pSeries should also be adjusted for a little bit so that it will depend on eeh_dev instead of pci_dn. The patch replaces pci_dn with eeh_dev. The corresponding information will be

[PATCH 08/23] PCI, powerpc: Register busn_res for root buses

2012-02-24 Thread Yinghai Lu
Signed-off-by: Yinghai Lu ying...@kernel.org Cc: Benjamin Herrenschmidt b...@kernel.crashing.org Cc: Paul Mackerras pau...@samba.org Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/kernel/pci-common.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git

Re: [PATCH 14/21] Introduce EEH device

2012-02-24 Thread Stephen Rothwell
Hi Gavin, On Fri, 24 Feb 2012 17:38:11 +0800 Gavin Shan sha...@linux.vnet.ibm.com wrote: +#define EEH_DEV_TO_OF_NODE(edev) (edev-dn) +#define EEH_DEV_TO_PCI_DEV(edev) (edev-pdev) +#define OF_NODE_TO_EEH_DEV(dn) ((struct eeh_dev *)(dn-edev)) +#define

Re: [PATCH 14/21] Introduce EEH device

2012-02-24 Thread Stephen Rothwell
Hi Gavin, On Fri, 24 Feb 2012 17:38:11 +0800 Gavin Shan sha...@linux.vnet.ibm.com wrote: diff --git a/arch/powerpc/include/asm/device.h b/arch/powerpc/include/asm/device.h index d57c08a..4668344 100644 --- a/arch/powerpc/include/asm/device.h +++ b/arch/powerpc/include/asm/device.h @@

Re: [PATCH 20/21] Introduce struct eeh_stats for EEH

2012-02-24 Thread Stephen Rothwell
Hi Gavin, On Fri, 24 Feb 2012 17:38:17 +0800 Gavin Shan sha...@linux.vnet.ibm.com wrote: diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h index 1310971..226c9a5 100644 --- a/arch/powerpc/include/asm/eeh.h +++ b/arch/powerpc/include/asm/eeh.h @@ -98,6 +98,21 @@

RE: [PATCH 20/21] Introduce struct eeh_stats for EEH

2012-02-24 Thread David Laight
+/* + * The struct is used to maintain the EEH global statistic + * information. Besides, the EEH global statistics will be + * exported to user space through procfs + */ +struct eeh_stats { + unsigned long no_device;/* PCI device not found */ + unsigned long no_dn;

[PATCH 01/37] powerpc/booke: Set CPU_FTR_DEBUG_LVL_EXC on 32-bit

2012-02-24 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Currently 32-bit only cares about this for choice of exception vector, which is done in core-specific code. However, KVM will want to distinguish as well. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de ---

[PATCH 05/37] KVM: PPC: booke: Move vm core init/destroy out of booke.c

2012-02-24 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com e500mc will want to do lpid allocation/deallocation here. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/44x.c |9 + arch/powerpc/kvm/booke.c |9 -

[PATCH 04/37] KVM: PPC: booke: add booke-level vcpu load/put

2012-02-24 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com This gives us a place to put load/put actions that correspond to code that is booke-specific but not specific to a particular core. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/44x.c

[PATCH 00/37] KVM: PPC: e500mc support v2

2012-02-24 Thread Alexander Graf
This is Scott's e500mc RFC patch set rebased, berobbed of its pt_regs parts and fixed for bisectability. On top of them, I addressed all the comments that I had on the code and that came up in his code as FIXMEs. I verified that this patch set works just fine on e500mc and doesn't break e500v2,

[PATCH 03/37] KVM: PPC: factor out lpid allocator from book3s_64_mmu_hv

2012-02-24 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com We'll use it on e500mc as well. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_book3s.h |3 ++ arch/powerpc/include/asm/kvm_booke.h |3 ++

[PATCH 06/37] KVM: PPC: e500: rename e500_tlb.h to e500.h

2012-02-24 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com This is in preparation for merging in the contents of arch/powerpc/include/asm/kvm_e500.h. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500.c |2 +-

[PATCH 02/37] powerpc/e500: split CPU_FTRS_ALWAYS/CPU_FTRS_POSSIBLE

2012-02-24 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Split e500 (v1/v2) and e500mc/e5500 to allow optimization of feature checks that differ between the two. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/cputable.h | 12

[PATCH 11/37] KVM: PPC: e500: emulate tlbilx

2012-02-24 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com tlbilx is the new, preferred invalidation instruction. It is not found on e500 prior to e500mc, but there should be no harm in supporting it on all e500. Based on code from Ashish Kalra ashish.ka...@freescale.com. Signed-off-by: Scott Wood

[PATCH 10/37] KVM: PPC: e500: Track TLB1 entries with a bitmap

2012-02-24 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Rather than invalidate everything when a TLB1 entry needs to be taken down, keep track of which host TLB1 entries are used for a given guest TLB1 entry, and invalidate just those entries. Based on code from Ashish Kalra ashish.ka...@freescale.com and Liu

[PATCH 08/37] KVM: PPC: e500: clean up arch/powerpc/kvm/e500.h

2012-02-24 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Move vcpu to the beginning of vcpu_e500 to give it appropriate prominence, especially if more fields end up getting added to the end of vcpu_e500 (and vcpu ends up in the middle). Remove gratuitous extern and add parameter names to prototypes.

[PATCH 12/37] powerpc/booke: Provide exception macros with interrupt name

2012-02-24 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com DO_KVM will need to identify the particular exception type. There is an existing set of arbitrary numbers that Linux passes, but it's an undocumented mess that sort of corresponds to server/classic exception vectors but not really. Signed-off-by: Scott

[PATCH 09/37] KVM: PPC: e500: refactor core-specific TLB code

2012-02-24 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com The PID handling is e500v1/v2-specific, and is moved to e500.c. The MMU sregs code and kvmppc_core_vcpu_translate will be shared with e500mc, and is moved from e500.c to e500_tlb.c. Partially based on patches from Liu Yu yu@freescale.com.

[PATCH 07/37] KVM: PPC: e500: merge asm/kvm_e500.h into arch/powerpc/kvm/e500.h

2012-02-24 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Keeping two separate headers for e500-specific things was a pain, and wasn't even organized along any logical boundary. There was TLB stuff in asm/kvm_e500.h despite the existence of arch/powerpc/kvm/e500_tlb.h, and nothing in asm/kvm_e500.h needed to be

[PATCH 15/37] KVM: PPC: e500mc support

2012-02-24 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Add processor support for e500mc, using hardware virtualization support (GS-mode). Current issues include: - No support for external proxy (coreint) interrupt mode in the guest. Includes work by Ashish Kalra ashish.ka...@freescale.com, Varun Sethi

[PATCH 13/37] KVM: PPC: booke: category E.HV (GS-mode) support

2012-02-24 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Chips such as e500mc that implement category E.HV in Power ISA 2.06 provide hardware virtualization features, including a new MSR mode for guest state. The guest OS can perform many operations without trapping into the hypervisor, including transitions to

[PATCH 18/37] KVM: PPC: e500mc: Move r1/r2 restoration very early

2012-02-24 Thread Alexander Graf
If we hit any exception whatsoever in the restore path and r1/r2 aren't the host registers, we don't get a working oops. So it's always a good idea to restore them as early as possible. This time, it actually has practical reasons to do so too, since we need to have the host page fault handler

[PATCH 17/37] KVM: PPC: e500mc: implicitly set MSR_GS

2012-02-24 Thread Alexander Graf
When setting MSR for an e500mc guest, we implicitly always set MSR_GS to make sure the guest is in guest state. Since we have this implicit rule there, we don't need to explicitly pass MSR_GS to set_msr(). Remove all explicit setters of MSR_GS. Signed-off-by: Alexander Graf ag...@suse.de ---

[PATCH 16/37] KVM: PPC: e500mc: Add doorbell emulation support

2012-02-24 Thread Alexander Graf
When one vcpu wants to kick another, it can issue a special IPI instruction called msgsnd. This patch emulates this instruction, its clearing counterpart and the infrastructure required to actually trigger that interrupt inside a guest vcpu. With this patch, SMP guests on e500mc work.

[PATCH 14/37] KVM: PPC: booke: standard PPC floating point support

2012-02-24 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com e500mc has a normal PPC FPU, rather than SPE which is found on e500v1/v2. Based on code from Liu Yu yu@freescale.com. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/system.h

[PATCH 22/37] KVM: PPC: booke: remove leftover debugging

2012-02-24 Thread Alexander Graf
The e500mc patches left some debug code in that we don't need. Remove it. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke.c |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index

[PATCH 21/37] KVM: PPC: make e500v2 kvm and e500mc cpu mutually exclusive

2012-02-24 Thread Alexander Graf
We can't run e500v2 kvm on e500mc kernels, so indicate that by making the 2 options mutually exclusive in kconfig. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kvm/Kconfig

[PATCH 19/37] KVM: PPC: e500mc: add load inst fixup

2012-02-24 Thread Alexander Graf
There's always a chance we're unable to read a guest instruction. The guest could have its TLB mapped execute-, but not readable, something odd happens and our TLB gets flushed. So it's a good idea to be prepared for that case and have a fallback that allows us to fix things up in that case. Add

[PATCH 20/37] KVM: PPC: rename CONFIG_KVM_E500 - CONFIG_KVM_E500V2

2012-02-24 Thread Alexander Graf
The CONFIG_KVM_E500 option really indicates that we're running on a V2 machine, not on a machine of the generic E500 class. So indicate that properly and change the config name accordingly. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/Kconfig|8

[PATCH 26/37] KVM: PPC: bookehv: fix exit timing

2012-02-24 Thread Alexander Graf
When using exit timing stats, we clobber r9 in the NEED_EMU case, so better move that part down a few lines and fix it that way. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/bookehv_interrupts.S |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH 24/37] KVM: PPC: booke: rework rescheduling checks

2012-02-24 Thread Alexander Graf
Instead of checking whether we should reschedule only when we exited due to an interrupt, let's always check before entering the guest back again. This gets the target more in line with the other archs. Also while at it, generalize the whole thing so that eventually we could have a single

[PATCH 28/37] KVM: PPC: bookehv: remove SET_VCPU

2012-02-24 Thread Alexander Graf
The SET_VCPU macro is a leftover from times when the vcpu struct wasn't stored in the thread on vcpu_load/put. It's not needed anymore. Remove it. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/bookehv_interrupts.S |8 1 files changed, 0 insertions(+), 8

[PATCH 25/37] KVM: PPC: booke: BOOKE_IRQPRIO_MAX is n+1

2012-02-24 Thread Alexander Graf
The semantics of BOOKE_IRQPRIO_MAX changed to denote the highest available irqprio + 1, so let's reflect that in the code too. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[PATCH 30/37] KVM: PPC: bookehv: add comment about shadow_msr

2012-02-24 Thread Alexander Graf
For BookE HV the guest visible MSR is shared-msr and is identical to the MSR that is in use while the guest is running, because we can't trap reads from/to MSR. So shadow_msr is unused there. Indicate that with a comment. Signed-off-by: Alexander Graf ag...@suse.de ---

[PATCH 31/37] KVM: PPC: booke: Readd debug abort code for machine check

2012-02-24 Thread Alexander Graf
When during guest execution we get a machine check interrupt, we don't know how to handle it yet. So let's add the error printing code back again that we dropped accidently earlier and tell user space that something went really wrong. Signed-off-by: Alexander Graf ag...@suse.de ---

[PATCH 32/37] KVM: PPC: booke: add GS documentation for program interrupt

2012-02-24 Thread Alexander Graf
The comment for program interrupts triggered when using bookehv was misleading. Update it to mention why MSR_GS indicates that we have to inject an interrupt into the guest again, not emulate it. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke.c | 10 -- 1 files

[PATCH 29/37] KVM: PPC: bookehv: disable MAS register updates early

2012-02-24 Thread Alexander Graf
We need to make sure that no MAS updates happen automatically while we have the guest MAS registers loaded. So move the disabling code a bit higher up so that it covers the full time we have guest values in MAS registers. The race this patch fixes should never occur, but it makes the code a bit

[PATCH 34/37] KVM: PPC: e500: fix typo in tlb code

2012-02-24 Thread Alexander Graf
The tlbncfg registers should be populated with their respective TLB's values. Fix the obvious typo. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500_tlb.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kvm/e500_tlb.c

[PATCH 27/37] KVM: PPC: bookehv: remove negation for CONFIG_64BIT

2012-02-24 Thread Alexander Graf
Instead if doing #ifndef CONFIG_64BIT ... #else ... #endif we should rather do #ifdef CONFIG_64BIT ... #else ... #endif which is a lot easier to read. Change the bookehv implementation to stick with this rule. Signed-off-by: Alexander Graf ag...@suse.de ---

[PATCH 33/37] KVM: PPC: bookehv: remove unused code

2012-02-24 Thread Alexander Graf
There was some unused code in the exit code path that must have been a leftover from earlier iterations. While it did no hard, it's superfluous and thus should be removed. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/bookehv_interrupts.S |3 --- 1 files changed, 0

[PATCH 35/37] KVM: PPC: booke: Support perfmon interrupts

2012-02-24 Thread Alexander Graf
When during guest context we get a performance monitor interrupt, we currently bail out and oops. Let's route it to its correct handler instead. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git

[PATCH 37/37] KVM: PPC: booke: Reinject performance monitor interrupts

2012-02-24 Thread Alexander Graf
When we get a performance monitor interrupt, we need to make sure that the host receives it. So reinject it like we reinject the other host destined interrupts. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/hw_irq.h |1 + arch/powerpc/kvm/booke.c |3

[PATCH 36/37] KVM: PPC: booke: expose guest registers on irq reinject

2012-02-24 Thread Alexander Graf
When reinjecting an interrupt into the host interrupt handler after we're back in host kernel land, let's tell the kernel about all the guest state that the interrupt happened at. This helps getting reasonable numbers out of perf. Signed-off-by: Alexander Graf ag...@suse.de ---

Re: [PATCH 00/14] DMA-mapping framework redesign preparation

2012-02-24 Thread Arnd Bergmann
On Friday 23 December 2011, Marek Szyprowski wrote: The solution we found is to introduce a new public dma mapping functions with additional attributes argument: dma_alloc_attrs and dma_free_attrs(). This way all different kinds of architecture specific buffer mappings can be hidden behind the

[PATCH] sparsemem/bootmem: catch greater than section size allocations

2012-02-24 Thread Nishanth Aravamudan
While testing AMS (Active Memory Sharing) / CMO (Cooperative Memory Overcommit) on powerpc, we tripped the following: kernel BUG at mm/bootmem.c:483! cpu 0x0: Vector: 700 (Program Check) at [c0c03940] pc: c0a62bd8: .alloc_bootmem_core+0x90/0x39c lr: c0a64bcc:

Re: warnings from drivers/tty/ehv_bytechan.c

2012-02-24 Thread gre...@linuxfoundation.org
On Mon, Feb 20, 2012 at 01:24:22PM +, Tabi Timur-B04825 wrote: Stephen Rothwell wrote: console_initcall() is not defined for modules. Hmmm... the patch you posted is a good short-term fix, but I wonder if makes sense for the driver to support modules at all. I have this in the

Re: warnings from drivers/tty/ehv_bytechan.c

2012-02-24 Thread Timur Tabi
gre...@linuxfoundation.org wrote: Sure, something like that is fine, but if the code really can't be a module, why not just fix the Kconfig file to enforce this properly instead? That's the simplest approach, for use. The TTY portion of the driver can be used as a module. Is there any real

Re: warnings from drivers/tty/ehv_bytechan.c

2012-02-24 Thread gre...@linuxfoundation.org
On Fri, Feb 24, 2012 at 04:00:12PM -0600, Timur Tabi wrote: gre...@linuxfoundation.org wrote: Sure, something like that is fine, but if the code really can't be a module, why not just fix the Kconfig file to enforce this properly instead? That's the simplest approach, for use. The TTY

Re: warnings from drivers/tty/ehv_bytechan.c

2012-02-24 Thread Timur Tabi
gre...@linuxfoundation.org wrote: That's the simplest approach, for use. The TTY portion of the driver can be used as a module. Is there any real value in loading a TTY driver as a module? Depends on the hardware it supports :) In this case, the console support for byte channels

Re: warnings from drivers/tty/ehv_bytechan.c

2012-02-24 Thread gre...@linuxfoundation.org
On Fri, Feb 24, 2012 at 04:15:04PM -0600, Timur Tabi wrote: gre...@linuxfoundation.org wrote: That's the simplest approach, for use. The TTY portion of the driver can be used as a module. Is there any real value in loading a TTY driver as a module? Depends on the hardware it

Re: [PATCH 09/24] PCI, powerpc: Register busn_res for root buses

2012-02-24 Thread Jesse Barnes
On Thu, 23 Feb 2012 12:51:30 -0800 Bjorn Helgaas bhelg...@google.com wrote: On Thu, Feb 23, 2012 at 12:25 PM, Jesse Barnes jbar...@virtuousgeek.org wrote: On Fri, 10 Feb 2012 08:35:58 +1100 Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Thu, 2012-02-09 at 11:24 -0800, Bjorn

Re: warnings from drivers/tty/ehv_bytechan.c

2012-02-24 Thread Scott Wood
On 02/24/2012 04:15 PM, Timur Tabi wrote: gre...@linuxfoundation.org wrote: That's the simplest approach, for use. The TTY portion of the driver can be used as a module. Is there any real value in loading a TTY driver as a module? Depends on the hardware it supports :) In this case, the

Re: [PATCH 33/37] KVM: PPC: bookehv: remove unused code

2012-02-24 Thread Scott Wood
On 02/24/2012 08:26 AM, Alexander Graf wrote: There was some unused code in the exit code path that must have been a leftover from earlier iterations. While it did no hard, it's superfluous and thus should be removed. s/hard/harm/ -- at that assumes exit timing wasn't enabled. :-)

Re: [PATCH 35/37] KVM: PPC: booke: Support perfmon interrupts

2012-02-24 Thread Scott Wood
On 02/24/2012 08:26 AM, Alexander Graf wrote: When during guest context we get a performance monitor interrupt, we currently bail out and oops. Let's route it to its correct handler instead. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke.c |4 1 files

Re: [PATCH 36/37] KVM: PPC: booke: expose guest registers on irq reinject

2012-02-24 Thread Scott Wood
On 02/24/2012 08:26 AM, Alexander Graf wrote: +static void kvmppc_fill_pt_regs(struct kvm_vcpu *vcpu, struct pt_regs *regs) { - int r = RESUME_HOST; + int i; - /* update before a new last_exit_type is rewritten */ - kvmppc_update_timing_stats(vcpu); + for (i = 0; i

[PATCH] powerpc/prom: bump up maximum size of properties

2012-02-24 Thread Nishanth Aravamudan
On a 16TB system (using AMS/CMO), I get: WARNING: ignoring large property [/ibm,dynamic-reconfiguration-memory] ibm,dynamic-memory length 0x0017ffec and significantly less memory is thus shown to the partition. As far as I can tell, the constant used is arbitrary, but bump it up to 2MB,

Re: [PATCH 09/24] PCI, powerpc: Register busn_res for root buses

2012-02-24 Thread Yinghai Lu
On Fri, Feb 24, 2012 at 2:24 PM, Jesse Barnes jbar...@virtuousgeek.org wrote: On Thu, 23 Feb 2012 12:51:30 -0800 Bjorn Helgaas bhelg...@google.com wrote: 2) We already have a way to add resources to a root bus: the pci_add_resource() used to add I/O port and MMIO apertures.  I think it'd be a