Re: [PATCH v5 0/9] ftrace with regs + live patching for ppc64 LE (ABI v2)

2016-01-21 Thread Petr Mladek
On Wed 2016-01-20 10:48:30, Petr Mladek wrote: > I did the testing on PPC64LE with a kernel based on 4.4.0-rc8 > using the attached config. I used the following stuff: Ah, I forgot to attach it. Also it is rahter big. Please, find it at http://pastebin.com/tzJ3mdUd Best Regards, Petr

Re: [PATCH v2] kallsyms: add support for relative offsets in kallsyms address table

2016-01-21 Thread Ard Biesheuvel
On 21 January 2016 at 11:48, Ard Biesheuvel wrote: > Similar to how relative extables are implemented, it is possible to emit > the kallsyms table in such a way that it contains offsets relative to some > anchor point in the kernel image rather than absolute addresses.

Re: [PATCH v5 0/9] ftrace with regs + live patching for ppc64 LE (ABI v2)

2016-01-21 Thread Michael Ellerman
On Thu, 2016-01-21 at 10:33 +0100, Jiri Kosina wrote: > On Wed, 20 Jan 2016, Michael Ellerman wrote: > > > For me the series doesn't even boot, even with livepatching disabled. > > Could you please post config and dmesg from that non-booting kernel? Sorry been busy. There is no dmesg :) It

[PATCH v2] kallsyms: add support for relative offsets in kallsyms address table

2016-01-21 Thread Ard Biesheuvel
Similar to how relative extables are implemented, it is possible to emit the kallsyms table in such a way that it contains offsets relative to some anchor point in the kernel image rather than absolute addresses. The benefit is that such table entries are no longer subject to dynamic relocation

[PATCH v5 3/5] cpufreq: powernv/tracing: Add powernv_throttle tracepoint

2016-01-21 Thread Shilpasri G Bhat
This patch adds the powernv_throttle tracepoint to trace the CPU frequency throttling event, which is used by the powernv-cpufreq driver in POWER8. Signed-off-by: Shilpasri G Bhat Reviewed-by: Gautham R. Shenoy CC: Ingo Molnar

Re: [PATCH v10 3/4] tools/perf: Map the ID values with register names

2016-01-21 Thread Anju T
Hi mpe, On Wednesday 20 January 2016 04:16 PM, Michael Ellerman wrote: On Mon, 2016-01-11 at 15:58 +0530, Anju T wrote: diff --git a/tools/perf/arch/powerpc/include/perf_regs.h b/tools/perf/arch/powerpc/include/perf_regs.h new file mode 100644 index 000..93080f5 --- /dev/null +++

[PATCH kernel 2/4] KVM: PPC: Add @page_shift to kvmppc_spapr_tce_table

2016-01-21 Thread Alexey Kardashevskiy
At the moment the kvmppc_spapr_tce_table struct can only describe 4GB windows and handle fixed size (4K) pages. Dynamic DMA windows support more so these limits need to be extended. This replaces window_size (in bytes, 4GB max) with page_shift (32bit) and size (64bit, in pages). This should

[PATCH v5 0/5] cpufreq: powernv: Redesign the presentation of throttle notification and solve bug-fixes in the driver

2016-01-21 Thread Shilpasri G Bhat
In POWER8, OCC(On-Chip-Controller) can throttle the frequency of the CPU when the chip crosses its thermal and power limits. Currently, powernv-cpufreq driver detects and reports this event as a console message. Some machines may not sustain the max turbo frequency in all conditions and can be

Re: [PATCH] powerpc: Enable VMX copy on PPC970 (G5)

2016-01-21 Thread Michael Ellerman
On Thu, 2016-01-21 at 10:51 +0100, Marc Dietrich wrote: > Am Donnerstag, 21. Januar 2016, 11:25:27 schrieb Michael Ellerman: > > There's no reason I'm aware of that the VMX copy loop shouldn't work on > > PPC970. And in fact it seems to boot and generally be happy. > > does the same also hold

[PATCH kernel 3/4] KVM: PPC: Add @offset to kvmppc_spapr_tce_table

2016-01-21 Thread Alexey Kardashevskiy
This enables userspace view of TCE tables to start from non-zero offset on a bus. This will be used for huge DMA windows. Signed-off-by: Alexey Kardashevskiy --- arch/powerpc/include/asm/kvm_host.h | 1 + arch/powerpc/kvm/book3s_64_vio_hv.c | 6 -- 2 files changed, 5

[PATCH kernel 4/4] KVM: PPC: Add support for 64bit TCE windows

2016-01-21 Thread Alexey Kardashevskiy
The existing KVM_CREATE_SPAPR_TCE only supports 32bit windows which is not enough for directly mapped windows as the guest can get more than 4GB. This adds KVM_CREATE_SPAPR_TCE_64 ioctl and advertises it via KVM_CAP_SPAPR_TCE_64 capability. Since 64bit windows are to support Dynamic DMA windows

Re: [PATCH 0/4] support for text-relative kallsyms table

2016-01-21 Thread Ard Biesheuvel
On 21 January 2016 at 07:45, Ard Biesheuvel wrote: > On 21 January 2016 at 06:10, Rusty Russell wrote: >> Ard Biesheuvel writes: >>> This implements text-relative kallsyms address tables. This was developed >>> as part

[PATCH v5 4/5] cpufreq: powernv: Replace pr_info with trace print for throttle event

2016-01-21 Thread Shilpasri G Bhat
Currently we use printk message to notify the throttle event. But this can flood the console if the cpu is throttled frequently. So replace the printk with the tracepoint to notify the throttle event. And also events like throttle below nominal frequency and OCC_RESET are reduced to

[PATCH v5 5/5] cpufreq: powernv: Add sysfs attributes to show throttle stats

2016-01-21 Thread Shilpasri G Bhat
Create sysfs attributes to export throttle information in /sys/devices/system/cpu/cpufreq/chipN. The newly added sysfs files are as follows: 1)/sys/devices/system/cpu/cpufreq/chip0/throttle_frequencies This gives the throttle stats for each of the available frequencies. The throttle stat of a

Re: [PATCH kernel v2 6/6] KVM: PPC: Add support for multiple-TCE hcalls

2016-01-21 Thread Alexey Kardashevskiy
Right, this also depends on 69b907297f4e list: Add lockless list traversal primitives On 01/21/2016 06:56 PM, kbuild test robot wrote: Hi Alexey, [auto build test ERROR on kvm/linux-next] [also build test ERROR on v4.4 next-20160121] [if your patch is applied to the wrong git tree, please

Re: [PATCH V10 1/4] perf/powerpc: assign an id to each powerpc register

2016-01-21 Thread Anju T
On Wednesday 20 January 2016 04:08 PM, Michael Ellerman wrote: Hi Anju, On Mon, 2016-01-11 at 15:58 +0530, Anju T wrote: The enum definition assigns an 'id' to each register in "struct pt_regs" of arch/powerpc. The order of these values in the enum definition are based on the corresponding

Re: [PATCH v5 0/9] ftrace with regs + live patching for ppc64 LE (ABI v2)

2016-01-21 Thread Jiri Kosina
On Wed, 20 Jan 2016, Michael Ellerman wrote: > For me the series doesn't even boot, even with livepatching disabled. Could you please post config and dmesg from that non-booting kernel? Thanks, -- Jiri Kosina SUSE Labs ___ Linuxppc-dev mailing list

[PATCH kernel 0/4] KVM: PPC: Add in-kernel acceleration for 64bit DMA

2016-01-21 Thread Alexey Kardashevskiy
This extends the existing H_PUT_TCE/etc in-kernel acceleration to 64bit DMA windows mapped at addresses other than zero. This accelerates huge DMA windows which pseries guests create using Dynamic DMA window (DDW) API. This does not affect VFIO yet. This depends on: 69b907297f4e list: Add

[PATCH v5 2/5] cpufreq: powernv: Remove cpu_to_chip_id() from hot-path

2016-01-21 Thread Shilpasri G Bhat
cpu_to_chip_id() does a DT walk through to find out the chip id by taking a contended device tree lock. This adds an unnecessary overhead in a hot path. So instead of calling cpu_to_chip_id() everytime cache the chip ids for all cores in the array 'core_to_chip_map' and use it in the hotpath.

[PATCH v5 1/5] cpufreq: powernv: Hot-plug safe the kworker thread

2016-01-21 Thread Shilpasri G Bhat
In the kworker_thread powernv_cpufreq_work_fn(), we can end up sending an IPI to a cpu going offline. This is a rare corner case which is fixed using {get/put}_online_cpus(). Along with this fix, this patch adds changes to do oneshot cpumask_{clear/and} operation. Suggested-by: Shreyas B Prabhu

Re: [PATCH] powerpc: Enable VMX copy on PPC970 (G5)

2016-01-21 Thread Marc Dietrich
Am Donnerstag, 21. Januar 2016, 11:25:27 schrieb Michael Ellerman: > There's no reason I'm aware of that the VMX copy loop shouldn't work on > PPC970. And in fact it seems to boot and generally be happy. does the same also hold for Cell? Maybe there are even more optimizations which can be

Re: [PATCH V10 2/4] perf/powerpc: add support for sampling intr machine state

2016-01-21 Thread Anju T
Hi mpe, On Wednesday 20 January 2016 04:10 PM, Michael Ellerman wrote: On Mon, 2016-01-11 at 15:58 +0530, Anju T wrote: diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 9a7057e..c4ce60d 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -119,6 +119,7 @@ config PPC

[PATCH kernel 1/4] KVM: PPC: Reserve KVM_CAP_SPAPR_TCE_64 capability number

2016-01-21 Thread Alexey Kardashevskiy
This adds a capability number for 64-bit TCE tables support. Signed-off-by: Alexey Kardashevskiy --- include/uapi/linux/kvm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 9da9051..8ce5f64 100644 ---

Re: [PATCH v5 1/5] cpufreq: powernv: Hot-plug safe the kworker thread

2016-01-21 Thread kbuild test robot
Hi Shilpasri, [auto build test ERROR on pm/linux-next] [also build test ERROR on v4.4 next-20160121] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url: https://github.com/0day-ci/linux/commits/Shilpasri-G-Bhat/cpufreq-powernv-Redesign

Re: [PATCH v5 0/9] ftrace with regs + live patching for ppc64 LE (ABI v2)

2016-01-21 Thread Torsten Duwe
On Thu, Jan 21, 2016 at 11:54:51PM +1100, Michael Ellerman wrote: > There is no dmesg :) > > It gets stuck in early_setup() before the console is even found. Confirmed. | Device tree struct 0x014b -> 0x014c | Quiescing Open Firmware ... | Booting Linux via __start() ...

Re: [PATCH v5 0/9] ftrace with regs + live patching for ppc64 LE (ABI v2)

2016-01-21 Thread Torsten Duwe
On Thu, Jan 21, 2016 at 04:06:33PM +0100, Torsten Duwe wrote: > mcount call sites looks normal on first sight... Not quite. LR is not saved on the stack before the call. Argh! Petr, this looks like 12 bytes offset for gcc-6. I think I can work around the rest. Torsten

[PATCH v3] kallsyms: add support for relative offsets in kallsyms address table

2016-01-21 Thread Ard Biesheuvel
Similar to how relative extables are implemented, it is possible to emit the kallsyms table in such a way that it contains offsets relative to some anchor point in the kernel image rather than absolute addresses. The benefit is that such table entries are no longer subject to dynamic relocation

Re: [PATCH] powerpc/mm: Allow user space to map rtas_rmo_buf

2016-01-21 Thread Dan Williams
On Thu, Jan 21, 2016 at 8:15 AM, Vasant Hegde wrote: > With commit 90a545e9 (restrict /dev/mem to idle io memory ranges) mapping > rtas_rmo_buf from user space is failing. Hence we are not able to make > RTAS syscall. > > This patch calls page_is_rtas_user_buf

[PATCH] powerpc/mm: Allow user space to map rtas_rmo_buf

2016-01-21 Thread Vasant Hegde
With commit 90a545e9 (restrict /dev/mem to idle io memory ranges) mapping rtas_rmo_buf from user space is failing. Hence we are not able to make RTAS syscall. This patch calls page_is_rtas_user_buf before calling iomem_is_exclusive in devmem_is_allowed(). This will allow user space to map

Re: [PATCH] cxl: Add cxl_read_adapter_vpd() to the kernel API

2016-01-21 Thread Frederic Barrat
Le 20/01/2016 03:20, Michael Neuling a écrit : The only thing I'm a bit concerned about is are we going to end up duplicating a lot of the linux PCI API, but I guess we are only going to do this for things the papr HCALL interface mimics. There are actually very few operations we can do on

Re: [PATCH v3] kallsyms: add support for relative offsets in kallsyms address table

2016-01-21 Thread Kees Cook
On Thu, Jan 21, 2016 at 2:50 PM, Andrew Morton wrote: > On Thu, 21 Jan 2016 18:19:43 +0100 Ard Biesheuvel > wrote: > >> Similar to how relative extables are implemented, it is possible to emit >> the kallsyms table in such a way that it

Re: [PATCH v3] kallsyms: add support for relative offsets in kallsyms address table

2016-01-21 Thread Andrew Morton
On Thu, 21 Jan 2016 14:55:00 -0800 Kees Cook wrote: > IIUC, this means that the relocation work done after decompression now > doesn't have to do relocation updates for all these values, which > means a smaller relocation table as well. Makes sense, thanks. I altered the

Re: [PATCH v5 0/9] ftrace with regs + live patching for ppc64 LE (ABI v2)

2016-01-21 Thread Torsten Duwe
On Thu, Jan 21, 2016 at 10:29:13PM +0100, Jiri Kosina wrote: > On Thu, 21 Jan 2016, Torsten Duwe wrote: > > > > mcount call sites looks normal on first sight... > > > > Not quite. > > LR is not saved on the stack before the call. > > Argh! > > > > Petr, this looks like 12 bytes offset for

Re: [PATCH 1/3][v2] net: phy: introduce 1000BASE-KX and 10GBASE-KR

2016-01-21 Thread Andrew Lunn
On Tue, Jan 19, 2016 at 05:00:35AM +, Shaohui Xie wrote: > > -Original Message- > > From: Andrew Lunn [mailto:and...@lunn.ch] > > Sent: Monday, January 18, 2016 11:15 PM > > To: Shaohui Xie > > Cc: Sebastian Hesselbarth; Florian Fainelli; shh@gmail.com; > >

Re: [PATCH v5 0/9] ftrace with regs + live patching for ppc64 LE (ABI v2)

2016-01-21 Thread Jiri Kosina
On Thu, 21 Jan 2016, Torsten Duwe wrote: > > mcount call sites looks normal on first sight... > > Not quite. > LR is not saved on the stack before the call. > Argh! > > Petr, this looks like 12 bytes offset for gcc-6. > I think I can work around the rest. Are we sure that gcc is doing the

Re: [PATCH v3] kallsyms: add support for relative offsets in kallsyms address table

2016-01-21 Thread Andrew Morton
On Thu, 21 Jan 2016 18:19:43 +0100 Ard Biesheuvel wrote: > Similar to how relative extables are implemented, it is possible to emit > the kallsyms table in such a way that it contains offsets relative to some > anchor point in the kernel image rather than absolute

Re: [PATCH] cxl: Add cxl_read_adapter_vpd() to the kernel API

2016-01-21 Thread Michael Neuling
On Thu, 2016-01-21 at 19:48 +0100, Frederic Barrat wrote: > > Le 20/01/2016 03:20, Michael Neuling a écrit : > > The only thing I'm a bit concerned about is are we going to end up > > duplicating a lot of the linux PCI API, but I guess we are only going > > to do this for things the papr HCALL

Re: [PATCH v3] kallsyms: add support for relative offsets in kallsyms address table

2016-01-21 Thread Michael Ellerman
On Thu, 2016-01-21 at 14:55 -0800, Kees Cook wrote: > On Thu, Jan 21, 2016 at 2:50 PM, Andrew Morton > wrote: > > On Thu, 21 Jan 2016 18:19:43 +0100 Ard Biesheuvel > > wrote: > > > > > Similar to how relative extables are implemented, it is

Re: [PATCH kernel v2 1/6] KVM: PPC: Rework H_PUT_TCE/H_GET_TCE handlers

2016-01-21 Thread Alexey Kardashevskiy
On 01/22/2016 11:42 AM, David Gibson wrote: On Thu, Jan 21, 2016 at 06:39:32PM +1100, Alexey Kardashevskiy wrote: This reworks the existing H_PUT_TCE/H_GET_TCE handlers to have following patches applied nicer. This moves the ioba boundaries check to a helper and adds a check for least bits

Re: [PATCH kernel v2 1/6] KVM: PPC: Rework H_PUT_TCE/H_GET_TCE handlers

2016-01-21 Thread David Gibson
On Thu, Jan 21, 2016 at 06:39:32PM +1100, Alexey Kardashevskiy wrote: > This reworks the existing H_PUT_TCE/H_GET_TCE handlers to have following > patches applied nicer. > > This moves the ioba boundaries check to a helper and adds a check for > least bits which have to be zeros. > > The patch

Re: [PATCH kernel] vfio: Only check for bus IOMMU when NOIOMMU is selected

2016-01-21 Thread Alexey Kardashevskiy
On 01/22/2016 05:34 PM, Alexey Kardashevskiy wrote: Recent change 03a76b60 "vfio: Include No-IOMMU mode" disabled VFIO on systems which do not implement iommu_ops for the PCI bus even though there is an VFIO IOMMU driver for it such as SPAPR TCE driver for PPC64/powernv platform. This moves

[PATCH v6 5/5] cpufreq: powernv: Add sysfs attributes to show throttle stats

2016-01-21 Thread Shilpasri G Bhat
Create sysfs attributes to export throttle information in /sys/devices/system/cpu/cpufreq/chipN. The newly added sysfs files are as follows: 1)/sys/devices/system/cpu/cpufreq/chip0/throttle_frequencies This gives the throttle stats for each of the available frequencies. The throttle stat of a

[PATCH v6 2/5] cpufreq: powernv: Remove cpu_to_chip_id() from hot-path

2016-01-21 Thread Shilpasri G Bhat
cpu_to_chip_id() does a DT walk through to find out the chip id by taking a contended device tree lock. This adds an unnecessary overhead in a hot path. So instead of calling cpu_to_chip_id() everytime cache the chip ids for all cores in the array 'core_to_chip_map' and use it in the hotpath.

[PATCH v6 4/5] cpufreq: powernv: Replace pr_info with trace print for throttle event

2016-01-21 Thread Shilpasri G Bhat
Currently we use printk message to notify the throttle event. But this can flood the console if the cpu is throttled frequently. So replace the printk with the tracepoint to notify the throttle event. And also events like throttle below nominal frequency and OCC_RESET are reduced to

[PATCH v6 3/5] cpufreq: powernv/tracing: Add powernv_throttle tracepoint

2016-01-21 Thread Shilpasri G Bhat
This patch adds the powernv_throttle tracepoint to trace the CPU frequency throttling event, which is used by the powernv-cpufreq driver in POWER8. Signed-off-by: Shilpasri G Bhat Reviewed-by: Gautham R. Shenoy CC: Ingo Molnar

Re: [PATCH] powerpc/mm: Allow user space to map rtas_rmo_buf

2016-01-21 Thread Vasant Hegde
On 01/22/2016 10:59 AM, Michael Ellerman wrote: > On Thu, 2016-01-21 at 21:45 +0530, Vasant Hegde wrote: > >> With commit 90a545e9 (restrict /dev/mem to idle io memory ranges) mapping >> rtas_rmo_buf from user space is failing. Hence we are not able to make >> RTAS syscall. >> >> This patch calls

[PATCH v6 1/5] cpufreq: powernv: Hot-plug safe the kworker thread

2016-01-21 Thread Shilpasri G Bhat
In the kworker_thread powernv_cpufreq_work_fn(), we can end up sending an IPI to a cpu going offline. This is a rare corner case which is fixed using {get/put}_online_cpus(). Along with this fix, this patch adds changes to do oneshot cpumask_{clear/and} operation. Suggested-by: Shreyas B Prabhu

Re: [PATCH v5 5/5] cpufreq: powernv: Add sysfs attributes to show throttle stats

2016-01-21 Thread Gautham R Shenoy
On Thu, Jan 21, 2016 at 03:08:59PM +0530, Shilpasri G Bhat wrote: > Signed-off-by: Shilpasri G Bhat Reviewed-by: Gautham R. Shenoy -- Thanks and Regards gautham. ___ Linuxppc-dev mailing list

[PATCH kernel] vfio: Only check for bus IOMMU when NOIOMMU is selected

2016-01-21 Thread Alexey Kardashevskiy
Recent change 03a76b60 "vfio: Include No-IOMMU mode" disabled VFIO on systems which do not implement iommu_ops for the PCI bus even though there is an VFIO IOMMU driver for it such as SPAPR TCE driver for PPC64/powernv platform. This moves iommu_present() call under #ifdef CONFIG_VFIO_NOIOMMU as

Re: [PATCH] powerpc/mm: Allow user space to map rtas_rmo_buf

2016-01-21 Thread Michael Ellerman
On Thu, 2016-01-21 at 21:45 +0530, Vasant Hegde wrote: > With commit 90a545e9 (restrict /dev/mem to idle io memory ranges) mapping > rtas_rmo_buf from user space is failing. Hence we are not able to make > RTAS syscall. > > This patch calls page_is_rtas_user_buf before calling iomem_is_exclusive

Re: [PATCH v3] kallsyms: add support for relative offsets in kallsyms address table

2016-01-21 Thread Ard Biesheuvel
On 22 January 2016 at 04:44, Michael Ellerman wrote: > On Thu, 2016-01-21 at 14:55 -0800, Kees Cook wrote: >> On Thu, Jan 21, 2016 at 2:50 PM, Andrew Morton >> wrote: >> > On Thu, 21 Jan 2016 18:19:43 +0100 Ard Biesheuvel >> >

[PATCH v6 0/5] cpufreq: powernv: Redesign the presentation of throttle notification and solve bug-fixes in the driver

2016-01-21 Thread Shilpasri G Bhat
In POWER8, OCC(On-Chip-Controller) can throttle the frequency of the CPU when the chip crosses its thermal and power limits. Currently, powernv-cpufreq driver detects and reports this event as a console message. Some machines may not sustain the max turbo frequency in all conditions and can be