[PATCH v2] cpufreq: powernv: Fix the frequency read by /proc/cpuinfo

2017-10-12 Thread Shriya
The call to /proc/cpuinfo in turn calls cpufreq_quick_get() which returns the last frequency requested by the kernel, but may not reflect the actual frequency the processor is running at. This patch makes a call to cpufreq_get() instead which returns the current frequency reported by the hardware.

[PATCH v3 3/3] powerpc:selftest update memcmp_64 selftest for VMX implementation

2017-10-12 Thread wei . guo . simon
From: Simon Guo This patch adjust selftest memcmp_64 so that memcmp selftest can be compiled successfully. It also adds testcases for: - memcmp over 4K bytes size. - s1/s2 with different/random offset on 16 bytes boundary. - enter/exit_vmx_ops pairness. Signed-off-by:

[PATCH v3 2/3] powerpc/64: enhance memcmp() with VMX instruction for long bytes comparision

2017-10-12 Thread wei . guo . simon
From: Simon Guo This patch add VMX primitives to do memcmp() in case the compare size exceeds 4K bytes. KSM feature can benefit from this. Test result with following test program(replace the "^>" with ""): -- ># cat

[PATCH v3 1/3] powerpc/64: Align bytes before fall back to .Lshort in powerpc64 memcmp().

2017-10-12 Thread wei . guo . simon
From: Simon Guo Currently memcmp() 64bytes version in powerpc will fall back to .Lshort (compare per byte mode) if either src or dst address is not 8 bytes aligned. It can be opmitized in 2 situations: 1) if both addresses are with the same offset with 8 bytes boundary:

[PATCH v3 0/3] powerpc/64: memcmp() optimization

2017-10-12 Thread wei . guo . simon
From: Simon Guo There is some room to optimize memcmp() in powerpc 64 bits version for following 2 cases: (1) Even src/dst addresses are not aligned with 8 bytes at the beginning, memcmp() can align them and go with .Llong comparision mode without fallback to .Lshort

[PATCH v2 2/2] vgaarb: Factor out EFI and fallback default device selection

2017-10-12 Thread Bjorn Helgaas
The default VGA device is normally set in vga_arbiter_add_pci_device() when we call it for the first enabled device that can be accessed with the legacy VGA resources ([mem 0xa-0xb], etc.) That default device can be overridden by an EFI device that owns the boot framebuffer. As a

[PATCH v2 1/2] vgaarb: Select a default VGA device even if there's no legacy VGA

2017-10-12 Thread Bjorn Helgaas
Daniel Axtens reported that on the HiSilicon D05 board, the VGA device is behind a bridge that doesn't support PCI_BRIDGE_CTL_VGA, so the VGA arbiter never selects it as the default, which means Xorg auto-detection doesn't work. VGA is a legacy PCI feature: a VGA device can respond to addresses,

[PATCH v2 0/2] vgaarb: Select fallback default VGA device

2017-10-12 Thread Bjorn Helgaas
These patches are supposed to fix a problem Daniel Axtens found on the HiSilicon D05 board. The VGA device there is behind a bridge that doesn't support PCI_BRIDGE_CTL_VGA, so the arbiter never selects the device as the default. The first patch extends the arbiter so that if it can't find an

Re: [PATCH 1/2] vgaarb: Select a default VGA device even if there's no legacy VGA

2017-10-12 Thread Bjorn Helgaas
On Thu, Oct 12, 2017 at 12:24:10PM +0100, Julien Thierry wrote: > Hi Bjorn, > > On 06/10/17 23:24, Bjorn Helgaas wrote: > >From: Bjorn Helgaas > > > >Daniel Axtens reported that on the HiSilicon D05 board, the VGA device is > >behind a bridge that doesn't support

Re: [PATCH v3 2/2] pseries/eeh: Add Pseries pcibios_bus_add_device

2017-10-12 Thread Bjorn Helgaas
[+cc Alex, Bodong, Eli, Saeed] On Thu, Oct 12, 2017 at 02:59:23PM -0500, Bryant G. Ly wrote: > On 10/12/17 1:29 PM, Bjorn Helgaas wrote: > >On Thu, Oct 12, 2017 at 03:09:53PM +1100, Michael Ellerman wrote: > >>Bjorn Helgaas writes: > >> > >>>On Fri, Sep 22, 2017 at 09:19:28AM

Re: [PATCH v5] powerpc/vdso64: Add support for CLOCK_{REALTIME/MONOTONIC}_COARSE

2017-10-12 Thread Segher Boessenkool
Hi! On Thu, Oct 12, 2017 at 10:03:17AM +0530, Santosh Sivaraj wrote: > * Segher Boessenkool wrote (on 2017-10-11 > 17:02:16 +): > > On Wed, Oct 11, 2017 at 02:05:02PM +0530, Santosh Sivaraj wrote: > > > +70: ld r8,CFG_TB_UPDATE_COUNT(r3) > > > + andi.

Re: [PATCH] KVM: PPC: fix oops when checking KVM_CAP_PPC_HTM

2017-10-12 Thread Greg Kurz
Ping ? On Thu, 14 Sep 2017 23:56:25 +0200 Greg Kurz wrote: > The following program causes a kernel oops: > > #include > #include > #include > #include > #include > > main() > { > int fd = open("/dev/kvm", O_RDWR); > ioctl(fd, KVM_CHECK_EXTENSION, KVM_CAP_PPC_HTM);

Re: [PATCH V2 10/10] powerpc/mm: kasan: Add kasan support for ppc64

2017-10-12 Thread Balbir Singh
On Fri, Oct 13, 2017 at 12:48 AM, KHUSHAL GUMGAONKAR wrote: > Hi Aneesh, > > I have gone through your KASan patch for ppc64 and ported the same changes > on my PPC platform but I am facing deadlock and terminal becomes > unresponsive. Was this supposed to come to

Re: KASan for powerpc

2017-10-12 Thread Balbir Singh
On Tue, Oct 10, 2017 at 11:51 PM, KHUSHAL GUMGAONKAR wrote: > Hi Aneesh, > > I am facing unknown error in printk during boot and after that kernel Hangs > on powerpc with KASan changes. > This is probably the worst way to reach out. The reason being You describe

Re: [PATCH] KVM: PPC: fix oops when checking KVM_CAP_PPC_HTM

2017-10-12 Thread David Gibson
On Thu, Oct 12, 2017 at 02:51:57PM +0200, Greg Kurz wrote: > On Thu, 12 Oct 2017 22:27:54 +1100 > Michael Ellerman wrote: > > > Greg Kurz writes: > > > The following program causes a kernel oops: > > > > > > #include > > > #include > > > #include > > >

[RFC PATCH for 4.15 08/14] Restartable sequences: Wire up powerpc system call

2017-10-12 Thread Mathieu Desnoyers
From: Boqun Feng Wire up the rseq system call on powerpc. This provides an ABI improving the speed of a user-space getcpu operation on powerpc by skipping the getcpu system call on the fast path, as well as improving the speed of user-space operations on per-cpu data

[RFC PATCH for 4.15 07/14] Restartable sequences: powerpc architecture support

2017-10-12 Thread Mathieu Desnoyers
From: Boqun Feng Call the rseq_handle_notify_resume() function on return to userspace if TIF_NOTIFY_RESUME thread flag is set. Increment the event counter and perform fixup on the pre-signal when a signal is delivered on top of a restartable sequence critical section.

[RFC PATCH for 4.15 11/14] cpu_opv: Wire up powerpc system call

2017-10-12 Thread Mathieu Desnoyers
Signed-off-by: Mathieu Desnoyers CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Michael Ellerman CC: Boqun Feng CC: Peter Zijlstra CC: "Paul E.

Re: [PATCH V2 10/10] powerpc/mm: kasan: Add kasan support for ppc64

2017-10-12 Thread KHUSHAL GUMGAONKAR
Hi Aneesh, I have gone through your KASan patch for ppc64 and ported the same changes on my PPC platform but I am facing deadlock and terminal becomes unresponsive.I saw some false printk recursion which you have mentioned in mail chain. I followed all the points mentioned in your discussion

KASan for powerpc

2017-10-12 Thread KHUSHAL GUMGAONKAR
 Hi Aneesh, I am facing unknown error in printk  during boot and after that kernel Hangs on powerpc with KASan changes. below is stack BUG: KASan: unknown crash in printk+0x60/0xb0 at addr 40bd4004Read of size 4 by task swapper/0CPU: 0 PID: 0 Comm: swapper Not tainted 4.1.35-rt41-g8ca68bd-dirty

[PATCH] powerpc/powernv: Enable reset_devices parameter to issue a PHB reset

2017-10-12 Thread Guilherme G. Piccoli
During a kdump kernel boot in PowerPC, we request a reset of the PHBs to the FW. It makes sense, since if we are booting a kdump kernel it means we had some trouble before and we cannot rely in the adapters' health; they could be in a bad state, hence the reset is needed. But not only in a kdump

Re: [PATCH v3 2/2] pseries/eeh: Add Pseries pcibios_bus_add_device

2017-10-12 Thread Bryant G. Ly
On 10/12/17 1:29 PM, Bjorn Helgaas wrote: On Thu, Oct 12, 2017 at 03:09:53PM +1100, Michael Ellerman wrote: Bjorn Helgaas writes: On Fri, Sep 22, 2017 at 09:19:28AM -0500, Bryant G. Ly wrote: This patch adds the machine dependent call for pcibios_bus_add_device, since

Re: [PATCH v3 2/2] pseries/eeh: Add Pseries pcibios_bus_add_device

2017-10-12 Thread Bjorn Helgaas
On Thu, Oct 12, 2017 at 03:09:53PM +1100, Michael Ellerman wrote: > Bjorn Helgaas writes: > > > On Fri, Sep 22, 2017 at 09:19:28AM -0500, Bryant G. Ly wrote: > >> This patch adds the machine dependent call for > >> pcibios_bus_add_device, since the previous patch > >>

Re: [PATCH] drivers: of: increase MAX_RESERVED_REGIONS to 32

2017-10-12 Thread Rob Herring
On Tue, Sep 26, 2017 at 3:40 AM, Stewart Smith wrote: > There are two types of memory reservations firmware can ask the kernel > to make in the device tree: static and dynamic. > See Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt > > If you have

Re: [PATCH 00/18] crypto: talitos - fixes and performance improvement

2017-10-12 Thread Herbert Xu
On Fri, Oct 06, 2017 at 03:04:31PM +0200, Christophe Leroy wrote: > This serie fixes and improves the talitos crypto driver. > > First 6 patchs are fixes of failures reported by the new tests in the > kernel crypto test manager. > > The 8 following patches are cleanups and simplifications. > >

Re: [PATCH] KVM: PPC: fix oops when checking KVM_CAP_PPC_HTM

2017-10-12 Thread Greg Kurz
On Thu, 12 Oct 2017 22:27:54 +1100 Michael Ellerman wrote: > Greg Kurz writes: > > The following program causes a kernel oops: > > > > #include > > #include > > #include > > #include > > #include > > > > main() > > { > > int fd = open("/dev/kvm",

Re: [PATCH 1/2] vgaarb: Select a default VGA device even if there's no legacy VGA

2017-10-12 Thread Lothar Waßmann
Hi, On Thu, 12 Oct 2017 12:24:10 +0100 Julien Thierry wrote: > Hi Bjorn, > > On 06/10/17 23:24, Bjorn Helgaas wrote: > > From: Bjorn Helgaas > > > > Daniel Axtens reported that on the HiSilicon D05 board, the VGA device is > > behind a bridge that doesn't support

Re: [PATCH] powerpc/powernv: Add kernel cmdline parameter to disable imc

2017-10-12 Thread Michael Ellerman
Anju T Sudhakar writes: > Hi mpe, stewart, > > > On Wednesday 11 October 2017 01:55 AM, Stewart Smith wrote: >> Michael Ellerman writes: >>> Anju T Sudhakar writes: >>> Add a kernel command line parameter option to

Re: [PATCH 3/3] powerpc/watchdog: Print the NIP in soft_nmi_interrupt()

2017-10-12 Thread Michael Ellerman
Nicholas Piggin writes: > On Thu, 12 Oct 2017 15:44:34 +1100 > Michael Ellerman wrote: > >> When a CPU detects its locked up via soft_nmi_interrupt() we have >> pt_regs, so print the regs->nip, which points to where we took the >> soft-NMI. >> >>

[PATCH 5/4] KVM: PPC: Tie KVM_CAP_PPC_HTM to the user-visible TM feature

2017-10-12 Thread Michael Ellerman
Currently we use CPU_FTR_TM to decide if the CPU/kernel can support TM (Transactional Memory), and if it's true we advertise that to Qemu (or similar) via KVM_CAP_PPC_HTM. PPC_FEATURE2_HTM is the user-visible feature bit, which indicates that the CPU and kernel can support TM. Currently

Re: [PATCH] KVM: PPC: fix oops when checking KVM_CAP_PPC_HTM

2017-10-12 Thread Michael Ellerman
Greg Kurz writes: > The following program causes a kernel oops: > > #include > #include > #include > #include > #include > > main() > { > int fd = open("/dev/kvm", O_RDWR); > ioctl(fd, KVM_CHECK_EXTENSION, KVM_CAP_PPC_HTM); > } > > This happens because when using the

Re: [PATCH 0/2] vgaarb: Select fallback default VGA device

2017-10-12 Thread Sherlock Wang
On Fri, Oct 06, 2017 at 05:24:20PM -0500, Bjorn Helgaas wrote: > These patches are supposed to fix a problem Daniel Axtens found on the > HiSilicon D05 board. The VGA device there is behind a bridge that doesn't > support PCI_BRIDGE_CTL_VGA, so the arbiter never selects the device as the >

RE: [PATCH 0/5] arm64: add ls1012a and ls1046a pcie support

2017-10-12 Thread M.h. Lian
Hi Bjorn, I greatly appreciate for your review and picking up them. Acked-by: Minghuan Lian > -Original Message- > From: Bjorn Helgaas [mailto:helg...@kernel.org] > Sent: Thursday, October 12, 2017 2:57 AM > To: Z.q. Hou > Cc:

Re: [linux-next] [6f5b24e] WARNING: CPU: 0 PID: 10288 at net/ipv4/tcp_input.c:889 tcp_update_reordering+0x1c4/0x1e0

2017-10-12 Thread Soheil Hassas Yeganeh
On Wed, Oct 11, 2017 at 6:02 AM, Abdul Haleem wrote: > Hi, > > CPU OFF & ON in a loop on next kernel results in WARNING in dmesg. > > Machine Type: Power 8 PowerVM LPAR > Kernel : 4.14.0-rc4-next-20171009 > Gcc : 6.3.1 > config : attached > Test: CPU toggle > >

Re: [PATCH] powerpc/tm: Don't check for WARN in TM Bad Thing handling

2017-10-12 Thread Michael Neuling
On Thu, 2017-10-12 at 15:45 +1100, Michael Ellerman wrote: > Currently when we take a TM Bad Thing program check exception, we > search the bug table to see if the program check was generated by a > WARN/WARN_ON etc. > > That makes no sense, the WARN macros use trap instructions, which > should

Re: [PATCH v3] powerpc/xmon: Support dumping software pagetables

2017-10-12 Thread kbuild test robot
-dumping-software-pagetables/20171012-124024 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next config: powerpc-ppc6xx_defconfig (attached as .config) compiler: powerpc-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://raw.githubusercontent.com/intel

[PATCH 4/4] powerpc/tm: P9 disable transactionally suspended sigcontexts

2017-10-12 Thread Michael Ellerman
From: Michael Neuling Unfortunately userspace can construct a sigcontext which enables suspend. Thus userspace can force Linux into a path where trechkpt is executed. This patch blocks this from happening on POWER9 by sanity checking sigcontexts passed in. ptrace doesn't

[PATCH 3/4] powerpc/powernv: Enable TM without suspend if possible

2017-10-12 Thread Michael Ellerman
Some Power9 revisions can run in a mode where TM operates without suspended state. If we find ourself on a CPU that might be in this mode, we query OPAL to check, and if so we reenable TM in CPU features, and enable a new user feature to signal to userspace that we are in this mode.

[PATCH 2/4] powerpc: Add PPC_FEATURE2_HTM_NO_SUSPEND

2017-10-12 Thread Michael Ellerman
Some CPUs can operate in a mode where TM (Transactional Memory) is enabled but the suspended state of TM is disabled. In this mode tsuspend does not enter suspended state, instead the transaction is aborted. Similarly any other event that would lead to suspended state instead aborts the

[PATCH 1/4] powerpc/tm: Add commandline option to disable hardware transactional memory

2017-10-12 Thread Michael Ellerman
From: Cyril Bur Currently the kernel relies on firmware to inform it whether or not the CPU supports HTM and as long as the kernel was built with CONFIG_PPC_TRANSACTIONAL_MEM=y then it will allow userspace to make use of the facility. There may be situations where it would

Re: [PATCH v3] powerpc/xmon: Support dumping software pagetables

2017-10-12 Thread kbuild test robot
-dumping-software-pagetables/20171012-124024 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next config: powerpc-ppc64e_defconfig (attached as .config) compiler: powerpc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://raw.githubusercontent.com

Re: [PATCH 0/5] arm64: add ls1012a and ls1046a pcie support

2017-10-12 Thread Thomas Gleixner
On Wed, 11 Oct 2017, Bjorn Helgaas wrote: > On Tue, Sep 19, 2017 at 05:26:53PM +0800, Zhiqiang Hou wrote: > > From: Hou Zhiqiang > > > > This patch set adds ls1012a MSI and PCIe support, including driver > > and device tree nodes. The ls1046a's MSI support patch and PCIe >

Re: [PATCH 3/3] powerpc/watchdog: Print the NIP in soft_nmi_interrupt()

2017-10-12 Thread Nicholas Piggin
On Thu, 12 Oct 2017 15:44:34 +1100 Michael Ellerman wrote: > When a CPU detects its locked up via soft_nmi_interrupt() we have > pt_regs, so print the regs->nip, which points to where we took the > soft-NMI. > > Signed-off-by: Michael Ellerman > --- >

Re: [PATCH] powerpc/powernv: Add kernel cmdline parameter to disable imc

2017-10-12 Thread Madhavan Srinivasan
On Thursday 12 October 2017 01:21 PM, Stewart Smith wrote: Anju T Sudhakar writes: On Wednesday 11 October 2017 01:55 AM, Stewart Smith wrote: Michael Ellerman writes: Anju T Sudhakar writes: Add a kernel command

Re: [PATCH] powerpc/powernv: Add kernel cmdline parameter to disable imc

2017-10-12 Thread Stewart Smith
Anju T Sudhakar writes: > On Wednesday 11 October 2017 01:55 AM, Stewart Smith wrote: >> Michael Ellerman writes: >>> Anju T Sudhakar writes: >>> Add a kernel command line parameter option to disable In-Memory