Re: [PATCH] powerpc/mm: Use tlbiel only if we ever ran on the current cpu

2016-10-24 Thread Aneesh Kumar K.V
Balbir Singh writes: > On 24/10/16 14:20, Aneesh Kumar K.V wrote: >> Before this patch, we used tlbiel, if we ever ran only on this core. >> That was mostly derived from the nohash usage of the same. But the >> ISA 3.0 clarifies tlbiel such that >> >> "All TLB entries

[PATCH kernel v4 1/4] powerpc/iommu: Pass mm_struct to init/cleanup helpers

2016-10-24 Thread Alexey Kardashevskiy
We are going to get rid of @current references in mmu_context_boos3s64.c and cache mm_struct in the VFIO container. Since mm_context_t does not have reference counting, we will be using mm_struct which does have the reference counter. This changes mm_iommu_init/mm_iommu_cleanup to receive

[PATCH kernel v4 0/4] powerpc/spapr/vfio: Put pages on VFIO container shutdown

2016-10-24 Thread Alexey Kardashevskiy
These patches are to fix a bug when pages stay pinned hours after QEMU which requested pinning exited. Please comment. Thanks. Alexey Kardashevskiy (4): powerpc/iommu: Pass mm_struct to init/cleanup helpers powerpc/iommu: Stop using @current in mm_iommu_xxx vfio/spapr: Reference mm in

[PATCH kernel v4 2/4] powerpc/iommu: Stop using @current in mm_iommu_xxx

2016-10-24 Thread Alexey Kardashevskiy
This changes mm_iommu_xxx helpers to take mm_struct as a parameter instead of getting it from @current which in some situations may not have a valid reference to mm. This changes helpers to receive @mm and moves all references to @current to the caller, including checks for !current and

[PATCH kernel v4 4/4] powerpc/mm/iommu, vfio/spapr: Put pages on VFIO container shutdown

2016-10-24 Thread Alexey Kardashevskiy
At the moment the userspace tool is expected to request pinning of the entire guest RAM when VFIO IOMMU SPAPR v2 driver is present. When the userspace process finishes, all the pinned pages need to be put; this is done as a part of the userspace memory context (MM) destruction which happens on the

[PATCH kernel v4 3/4] vfio/spapr: Reference mm in tce_container

2016-10-24 Thread Alexey Kardashevskiy
In some situations the userspace memory context may live longer than the userspace process itself so if we need to do proper memory context cleanup, we better have tce_container take a reference to mm_struct and use it later when the process is gone (@current or @current->mm is NULL). This

Re: [PATCH kernel v4 3/4] vfio/spapr: Reference mm in tce_container

2016-10-24 Thread Nicholas Piggin
On Mon, 24 Oct 2016 17:53:09 +1100 Alexey Kardashevskiy wrote: > In some situations the userspace memory context may live longer than > the userspace process itself so if we need to do proper memory context > cleanup, we better have tce_container take a reference to mm_struct and

Re: [PATCH 2/5] stop_machine: yield CPU during stop machine

2016-10-24 Thread Christian Borntraeger
On 10/22/2016 02:06 AM, Nicholas Piggin wrote: > On Fri, 21 Oct 2016 14:05:36 +0200 > Peter Zijlstra wrote: > >> On Fri, Oct 21, 2016 at 01:58:55PM +0200, Christian Borntraeger wrote: >>> stop_machine can take a very long time if the hypervisor does >>> overcommitment for

Re: [PATCH V2 1/5] powerpc/mpc85xx: Update TMU device tree node for T1040/T1042

2016-10-24 Thread Shawn Guo
On Sun, Oct 09, 2016 at 02:47:02PM +0800, Jia Hongtao wrote: > From: Hongtao Jia > > SoC compatible string and endianness property are added according to the > new bindings. The commit log doesn't seem to match the actual changes. Same for patch 2/5. Shawn > >

Re: [PATCH 2/5] stop_machine: yield CPU during stop machine

2016-10-24 Thread Peter Zijlstra
On Mon, Oct 24, 2016 at 09:52:31AM +0200, Christian Borntraeger wrote: > Peter, I will fixup the patch set (I forgot to remove the lowlatency > in 2 places) and push it on my tree for linux-next. Lets see what happens. > Would the tip tree be the right place if things work out ok? I think so,

Re: [PATCH V2 3/5] arm:dt:ls1021a: Add TMU device tree support for LS1021A

2016-10-24 Thread Shawn Guo
On Sun, Oct 09, 2016 at 02:47:04PM +0800, Jia Hongtao wrote: > From: Hongtao Jia > > Also add nodes and properties for thermal management support. > > Signed-off-by: Jia Hongtao For patch #3 ~ #5, I updated the subject prefix a bit and applied. Shawn

Re: [PATCH v5 6/9] x86, kvm: support vcpu preempted check

2016-10-24 Thread xinhui
This is new version for [PATCH v6 6/9] x86, kvm: support vcpu preempted check change: an explicit pad[3] after __u8 preempted. From b876ea1a2a724c004b543b2c103a1f8faa5f106e Mon Sep 17 00:00:00 2001 From: Pan Xinhui Date: Thu, 20 Oct 2016 08:14:41 -0400

Re: [PATCH v5 9/9] Documentation: virtual: kvm: Support vcpu preempted check

2016-10-24 Thread xinhui
This is new version for [PATCH v6 9/9] Documentation: virtual: kvm: Support vcpu preempted check change: an explicit pad[3] after __u8 preempted. a typo fix in the commit log. From defac64d7c6a50d5f18ef64a7c776af3e21e8b68 Mon Sep 17 00:00:00 2001 From: Pan Xinhui

Re: [PATCH v4 5/5] x86, kvm: support vcpu preempted check

2016-10-24 Thread Pan Xinhui
在 2016/10/24 23:18, Paolo Bonzini 写道: On 24/10/2016 17:14, Radim Krčmář wrote: 2016-10-24 16:39+0200, Paolo Bonzini: On 19/10/2016 19:24, Radim Krčmář wrote: + if (vcpu->arch.st.msr_val & KVM_MSR_ENABLED) + if (kvm_read_guest_cached(vcpu->kvm, >arch.st.stime, +

Re: [PATCH 3/3] corenet: Switch to of_platform_default_populate

2016-10-24 Thread Scott Wood
On 10/23/2016 06:48 PM, Andy Fleming wrote: > Many of the embedded powerpc boards use an array of device names > to register the devices from the device tree. Instead, we can use > of_platform_default_populate(), which will iterate through all the root nodes > and register them. > >

[PATCH] powerpc/pseries: fix spelling mistake: "Attemping" -> "Attempting"

2016-10-24 Thread Colin King
From: Colin Ian King trivial fix to spelling mistake in pr_debug message Signed-off-by: Colin Ian King --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] powerpc/pseries: fix spelling mistake: "Attemping" -> "Attempting"

2016-10-24 Thread Kees Cook
On Mon, Oct 24, 2016 at 3:02 PM, Colin King wrote: > From: Colin Ian King > > trivial fix to spelling mistake in pr_debug message > > Signed-off-by: Colin Ian King > --- > arch/powerpc/platforms/pseries/hotplug-cpu.c

Re: [PATCH] powerpc/pseries: fix spelling mistake: "Attemping" -> "Attempting"

2016-10-24 Thread Joe Perches
On Mon, 2016-10-24 at 15:13 -0700, Kees Cook wrote: > On Mon, Oct 24, 2016 at 3:02 PM, Colin King wrote: > > From: Colin Ian King > > > > trivial fix to spelling mistake in pr_debug message > > > > Signed-off-by: Colin Ian King

Re: [PATCH v2 2/2] PCI: Don't disable PF's memory decoding when enabling SRIOV

2016-10-24 Thread Gavin Shan
On Mon, Oct 24, 2016 at 09:03:16AM -0500, Bjorn Helgaas wrote: >On Mon, Oct 24, 2016 at 10:28:02AM +1100, Gavin Shan wrote: >> On Fri, Oct 21, 2016 at 11:50:34AM -0500, Bjorn Helgaas wrote: >> >Hi Gavin, >> > >> >On Fri, Sep 30, 2016 at 09:47:50AM +1000, Gavin Shan wrote: >> >>

Re: [PATCH] powerpc/pseries: fix spelling mistake: "Attemping" -> "Attempting"

2016-10-24 Thread Colin Ian King
On 24/10/16 23:20, Joe Perches wrote: > On Mon, 2016-10-24 at 15:13 -0700, Kees Cook wrote: >> On Mon, Oct 24, 2016 at 3:02 PM, Colin King wrote: >>> From: Colin Ian King >>> >>> trivial fix to spelling mistake in pr_debug message >>> >>>

Re: [PATCH v6] powerpc: Do not make the entire heap executable

2016-10-24 Thread Kees Cook
On Thu, Oct 20, 2016 at 3:45 PM, Jason Gunthorpe wrote: > On Tue, Oct 04, 2016 at 09:54:12AM -0700, Kees Cook wrote: >> On Mon, Oct 3, 2016 at 5:18 PM, Michael Ellerman wrote: >> > Kees Cook writes: >> > >> >> On Mon,

Re: [PATCH kernel v4 4/4] powerpc/mm/iommu, vfio/spapr: Put pages on VFIO container shutdown

2016-10-24 Thread David Gibson
On Mon, Oct 24, 2016 at 05:53:10PM +1100, Alexey Kardashevskiy wrote: > At the moment the userspace tool is expected to request pinning of > the entire guest RAM when VFIO IOMMU SPAPR v2 driver is present. > When the userspace process finishes, all the pinned pages need to > be put; this is done

RE: [PATCH V2 1/5] powerpc/mpc85xx: Update TMU device tree node for T1040/T1042

2016-10-24 Thread Troy Jia
> -Original Message- > From: Shawn Guo [mailto:shawn...@kernel.org] > Sent: Monday, October 24, 2016 4:37 PM > To: Troy Jia > Cc: rui.zh...@intel.com; edubez...@gmail.com; robh...@kernel.org; Scott Wood > ; devicet...@vger.kernel.org; linuxppc- >

[RFC PATCH] powerpc/powernv: recheck lock bit in core_idle_lock_held after lwarx

2016-10-24 Thread Li Zhong
The core_idle_lock_held loops when the lock bit is held by others. However, it is possible that after the lock bit is cleared, some one else sees it first and sets the lock bit. And lwarx loads a value with lock bit set, and the lock bit may be cleared in the following stwcx. It is possible the

Re: [RFC PATCH] powerpc/powernv: recheck lock bit in core_idle_lock_held after lwarx

2016-10-24 Thread Paul Mackerras
On Tue, Oct 25, 2016 at 11:24:34AM +0800, Li Zhong wrote: > The core_idle_lock_held loops when the lock bit is held by others. > However, it is possible that after the lock bit is cleared, some one > else sees it first and sets the lock bit. And lwarx loads a value with > lock bit set, and the

Re: [RFC PATCH] powerpc/powernv: recheck lock bit in core_idle_lock_held after lwarx

2016-10-24 Thread Li Zhong
> On 25 Oct 2016, at 12:15, Paul Mackerras wrote: > > On Tue, Oct 25, 2016 at 11:24:34AM +0800, Li Zhong wrote: >> The core_idle_lock_held loops when the lock bit is held by others. >> However, it is possible that after the lock bit is cleared, some one >> else sees it first

[PATCH V3 2/2] powerpc/mpc85xx: Update TMU device tree node for T1023/T1024

2016-10-24 Thread Jia Hongtao
From: Hongtao Jia Update #thermal-sensor-cells from 0 to 1 according to the new binding. The sensor specifier added is the monitoring site ID, and represents the "n" in TRITSRn and TRATSRn. Signed-off-by: Jia Hongtao --- Changes for V3: * Update the

Re: [PATCH v2 2/2] PCI: Don't disable PF's memory decoding when enabling SRIOV

2016-10-24 Thread Bjorn Helgaas
On Tue, Oct 25, 2016 at 12:47:28PM +1100, Gavin Shan wrote: > On Mon, Oct 24, 2016 at 09:03:16AM -0500, Bjorn Helgaas wrote: > >On Mon, Oct 24, 2016 at 10:28:02AM +1100, Gavin Shan wrote: > >> On Fri, Oct 21, 2016 at 11:50:34AM -0500, Bjorn Helgaas wrote: > >> >Hi Gavin, > >> > > >> >On Fri, Sep

[PATCH] powerpc: Use pr_warn instead of pr_warning

2016-10-24 Thread Joe Perches
At some point, pr_warning will be removed so all logging messages use a consistent _warn style. Update arch/powerpc/ Miscellanea: o Coalesce formats o Realign arguments o Use %s, __func__ instead of embedded function names o Remove unnecessary line continuations Signed-off-by: Joe Perches

[PATCH V3 1/2] powerpc/mpc85xx: Update TMU device tree node for T1040/T1042

2016-10-24 Thread Jia Hongtao
From: Hongtao Jia Update #thermal-sensor-cells from 0 to 1 according to the new binding. The sensor specifier added is the monitoring site ID, and represents the "n" in TRITSRn and TRATSRn. Signed-off-by: Jia Hongtao --- Changes for V3: * Update the

Re: [PATCH kernel v4 4/4] powerpc/mm/iommu, vfio/spapr: Put pages on VFIO container shutdown

2016-10-24 Thread Alexey Kardashevskiy
On 25/10/16 15:44, David Gibson wrote: > On Mon, Oct 24, 2016 at 05:53:10PM +1100, Alexey Kardashevskiy wrote: >> At the moment the userspace tool is expected to request pinning of >> the entire guest RAM when VFIO IOMMU SPAPR v2 driver is present. >> When the userspace process finishes, all the

[PATCH net-next] ibmveth: calculate correct gso_size and set gso_type

2016-10-24 Thread Jon Maxwell
We recently encountered a bug where a few customers using ibmveth on the same LPAR hit an issue where a TCP session hung when large receive was enabled. Closer analysis revealed that the session was stuck because the one side was advertising a zero window repeatedly. We narrowed this down to

Re: [PATCH v4 2/5] drivers/of: do not add memory for unavailable nodes

2016-10-24 Thread Michael Ellerman
Alistair Popple writes: > Hi Reza, > > On Thu, 6 Oct 2016 01:36:32 PM Reza Arbab wrote: >> Respect the standard dt "status" property when scanning memory nodes in >> early_init_dt_scan_memory(), so that if the node is unavailable, no >> memory will be added. > > What happens

Re: Canyonlands oops at Shutdown

2016-10-24 Thread Julian Margetson
On 21-Oct-16 6:53 AM, Julian Margetson wrote: On 08-May-16 10:12 AM, Julian Margetson wrote: CONFIG_PPC44x_SIMPLE=y CONFIG_POWER_RESET=y CONFIG_POWER_RESET_GPIO is not set # CONFIG_POWER_RESET_GPIO_RESTART is not set # CONFIG_POWER_RESET_LTC2952 is not set # CONFIG_POWER_RESET_RESTART is not

Re: [PATCH] kernel: irq: fix build failure

2016-10-24 Thread Lee Jones
On Mon, 24 Oct 2016, Stephen Rothwell wrote: > On Mon, 24 Oct 2016 11:22:15 +0100 Lee Jones wrote: > > On Fri, 21 Oct 2016, Thomas Gleixner wrote: > > > > > On Fri, 21 Oct 2016, Stephen Rothwell wrote: > > > > On Thu, 20 Oct 2016 14:55:45 +0200 (CEST) Thomas Gleixner > >

Re: [PATCH] kernel: irq: fix build failure

2016-10-24 Thread Stephen Rothwell
Hi Lee, On Mon, 24 Oct 2016 11:22:15 +0100 Lee Jones wrote: > > On Fri, 21 Oct 2016, Thomas Gleixner wrote: > > > On Fri, 21 Oct 2016, Stephen Rothwell wrote: > > > On Thu, 20 Oct 2016 14:55:45 +0200 (CEST) Thomas Gleixner > > > wrote: > > > > I

Re: [PATCH] kernel: irq: fix build failure

2016-10-24 Thread Lee Jones
On Fri, 21 Oct 2016, Thomas Gleixner wrote: > On Fri, 21 Oct 2016, Stephen Rothwell wrote: > > On Thu, 20 Oct 2016 14:55:45 +0200 (CEST) Thomas Gleixner > > wrote: > > > I know. This is under discussion with the driver folks as we are not going > > > to blindly export stuff

Re: [PATCH v4 5/5] x86, kvm: support vcpu preempted check

2016-10-24 Thread Paolo Bonzini
On 19/10/2016 19:24, Radim Krčmář wrote: >> > + if (vcpu->arch.st.msr_val & KVM_MSR_ENABLED) >> > + if (kvm_read_guest_cached(vcpu->kvm, >arch.st.stime, >> > + >arch.st.steal, >> > + sizeof(struct kvm_steal_time)) == 0)

Re: [PATCH v5 9/9] Documentation: virtual: kvm: Support vcpu preempted check

2016-10-24 Thread Paolo Bonzini
On 21/10/2016 20:39, rkrc...@redhat.com wrote: > 2016-10-21 11:27+, David Laight: >> From: Pan Xinhui >>> Sent: 20 October 2016 22:28 >>> Commit ("x86, kvm: support vcpu preempted check") add one field "__u8 >>> preempted" into struct kvm_steal_time. This field tells if one vcpu is >>>

Re: [PATCH v2 2/2] PCI: Don't disable PF's memory decoding when enabling SRIOV

2016-10-24 Thread Bjorn Helgaas
On Mon, Oct 24, 2016 at 10:28:02AM +1100, Gavin Shan wrote: > On Fri, Oct 21, 2016 at 11:50:34AM -0500, Bjorn Helgaas wrote: > >Hi Gavin, > > > >On Fri, Sep 30, 2016 at 09:47:50AM +1000, Gavin Shan wrote: > >> pci_update_resource() might be called to update (shift) IOV BARs > >> in PPC PowerNV

Re: [PATCH v5 9/9] Documentation: virtual: kvm: Support vcpu preempted check

2016-10-24 Thread rkrc...@redhat.com
2016-10-24 16:42+0200, Paolo Bonzini: > On 21/10/2016 20:39, rkrc...@redhat.com wrote: >> 2016-10-21 11:27+, David Laight: >>> From: Pan Xinhui Sent: 20 October 2016 22:28 Commit ("x86, kvm: support vcpu preempted check") add one field "__u8 preempted" into struct

Re: [PATCH v4 5/5] x86, kvm: support vcpu preempted check

2016-10-24 Thread Radim Krčmář
2016-10-24 16:39+0200, Paolo Bonzini: > On 19/10/2016 19:24, Radim Krčmář wrote: >>> > + if (vcpu->arch.st.msr_val & KVM_MSR_ENABLED) >>> > + if (kvm_read_guest_cached(vcpu->kvm, >arch.st.stime, >>> > + >arch.st.steal, >>> > +

Re: [PATCH v4 5/5] x86, kvm: support vcpu preempted check

2016-10-24 Thread Paolo Bonzini
On 24/10/2016 17:14, Radim Krčmář wrote: > 2016-10-24 16:39+0200, Paolo Bonzini: >> On 19/10/2016 19:24, Radim Krčmář wrote: > + if (vcpu->arch.st.msr_val & KVM_MSR_ENABLED) > + if (kvm_read_guest_cached(vcpu->kvm, >arch.st.stime, > +

Applied "ASoC: constify snd_soc_ops structures" to the asoc tree

2016-10-24 Thread Mark Brown
The patch ASoC: constify snd_soc_ops structures has been applied to the asoc tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus

Re: [PATCH v4 2/5] drivers/of: do not add memory for unavailable nodes

2016-10-24 Thread Reza Arbab
On Mon, Oct 24, 2016 at 09:24:04PM +1100, Michael Ellerman wrote: The code already looks for "linux,usable-memory" in preference to "reg". Can you use that instead? Yes, we could set the size of "linux,usable-memory" to zero instead of setting status to "disabled". I'll send a v5 of this

[PATCH v2] powerpc/fadump: Fix the race in crash_fadump().

2016-10-24 Thread Mahesh J Salgaonkar
From: Mahesh Salgaonkar There are chances that multiple CPUs can call crash_fadump() simultaneously and would start duplicating same info to vmcoreinfo ELF note section. This causes makedumpfile to fail during kdump capture. One example is, triggering dumprestart from

Applied "ASoC: davinci-mcbsp: DT fix s/interrupts-names/interrupt-names/" to the asoc tree

2016-10-24 Thread Mark Brown
The patch ASoC: davinci-mcbsp: DT fix s/interrupts-names/interrupt-names/ has been applied to the asoc tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24

Re: Canyonlands oops with m41t80

2016-10-24 Thread Julian Margetson
On 21-Oct-16 6:56 AM, Julian Margetson wrote: Been having an oops since kernel 4.6 with m41t80 on Sam460ex canyonlands board . Regards Julian Margetson Can't complete a bisect. too many different issues up to to 4.6.0

[PATCH v5 2/3] mm: make processing of movable_node arch-specific

2016-10-24 Thread Reza Arbab
Currently, CONFIG_MOVABLE_NODE depends on X86_64. In preparation to enable it for other arches, we need to factor a detail which is unique to x86 out of the generic mm code. Specifically, as documented in kernel-parameters.txt, the use of "movable_node" should remain restricted to x86:

[PATCH v5 0/3] powerpc/mm: movable hotplug memory nodes

2016-10-24 Thread Reza Arbab
These changes enable the dynamic creation of movable nodes on power. On x86, the ACPI SRAT memory affinity structure can mark memory hotpluggable, allowing the kernel to possibly create movable nodes at boot. While power has no analog of this SRAT information, we can still create a movable

[PATCH v5 3/3] mm: enable CONFIG_MOVABLE_NODE on non-x86 arches

2016-10-24 Thread Reza Arbab
To support movable memory nodes (CONFIG_MOVABLE_NODE), at least one of the following must be true: 1. We're on x86. This arch has the capability to identify movable nodes at boot by parsing the ACPI SRAT, if the movable_node option is used. 2. Our config supports memory hotplug, which means

[PATCH v5 1/3] powerpc/mm: allow memory hotplug into a memoryless node

2016-10-24 Thread Reza Arbab
Remove the check which prevents us from hotplugging into an empty node. The original commit b226e4621245 ("[PATCH] powerpc: don't add memory to empty node/zone"), states that this was intended to be a temporary measure. It is a workaround for an oops which no longer occurs. Signed-off-by: Reza

Re: [PATCH V6 7/8] powerpc: Check arch.vec earlier during boot for memory features

2016-10-24 Thread Nathan Fontenot
On 09/21/2016 09:17 AM, Michael Bringmann wrote: > architecture.vec5 features: The boot-time memory management needs to > know the form of the "ibm,dynamic-memory-v2" property early during > scanning of the flattened device tree. This patch moves execution of > the function

Re: [PATCH V6 5/8] pseries/drc-info: Search new DRC properties for CPU indexes

2016-10-24 Thread Nathan Fontenot
On 09/21/2016 09:17 AM, Michael Bringmann wrote: > pseries/drc-info: Provide parallel routines to convert between > drc_index and CPU numbers at runtime, using the older device-tree > properties ("ibm,drc-indexes", "ibm,drc-names", "ibm,drc-types" > and "ibm,drc-power-domains"), or the new

Cyrus_5040.dts Misisng

2016-10-24 Thread luigi burdo
Hi Andy, me and some others are testing the cyrus_5040 and we sow inside the Lnx kernel there isnt the cyrus_5040.dts. i just attched my dmsg and my lshw reports where you can see: on dmesg there are issue on ata2 device, if i burn a cdrom i have a failure in burining , copy from to another

[net-next PATCH RFC 17/26] arch/powerpc: Add option to skip DMA sync as a part of mapping

2016-10-24 Thread Alexander Duyck
This change allows us to pass DMA_ATTR_SKIP_CPU_SYNC which allows us to avoid invoking cache line invalidation if the driver will just handle it via a sync_for_cpu or sync_for_device call. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael