Re: [PATCH] powerpc/pseries: Move CMO code from plapr_wrappers.h to platforms/pseries

2016-11-14 Thread kbuild test robot
Hi Michael, [auto build test ERROR on powerpc/next] [also build test ERROR on v4.9-rc5 next-20161114] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Michael-Ellerman/powerpc-pseries-Move-CMO

Re: [PATCH V3 1/2] mm: move vma_is_anonymous check within pmd_move_must_withdraw

2016-11-14 Thread mpe
"Aneesh Kumar K.V" writes: > Architectures like ppc64 want to use page table deposit/withraw > even with huge pmd dax entries. Allow arch to override the > vma_is_anonymous check by moving that to pmd_move_must_withdraw > function > > Acked-by: Kirill A. Shutemov > Signed-off-by: Aneesh Kumar K.

[RESEND PATCH] cxl: Fix coredump generation when cxl_get_fd() is used

2016-11-14 Thread Frederic Barrat
If a process dumps core while owning a cxl file descriptor obtained from an AFU driver (e.g. cxlflash) through the cxl_get_fd() API, the following error occurs: [ 868.027591] Unable to handle kernel paging request for data at address ... [ 868.027778] Faulting instruction address: 0xc035

Re: [PATCH 1/3] crash: move crashkernel parsing and vmcore related code under CONFIG_CRASH_CORE

2016-11-14 Thread Hari Bathini
On Monday 14 November 2016 11:06 AM, Baoquan He wrote: On 11/10/16 at 05:27pm, Hari Bathini wrote: Traditionally, kdump is used to save vmcore in case of a crash. Some architectures like powerpc can save vmcore using architecture specific support instead of kexec/kdump mechanism. Such architec

RE: [PATCH net-next v7 03/10] dpaa_eth: add option to use one buffer pool set

2016-11-14 Thread Madalin-Cristian Bucur
> From: David Miller [mailto:da...@davemloft.net] > Sent: Sunday, November 13, 2016 7:46 PM > > From: Madalin Bucur > Date: Fri, 11 Nov 2016 10:20:00 +0200 > > > @@ -8,3 +8,12 @@ menuconfig FSL_DPAA_ETH > > supporting the Freescale QorIQ chips. > > Depends on Freescale Buffer Manager

Re: [PATCH v2 7/7] soc: renesas: Identify SoC and register with the SoC bus

2016-11-14 Thread Geert Uytterhoeven
Hi Arnd, On Thu, Nov 10, 2016 at 12:37 PM, Arnd Bergmann wrote: > On Thursday, November 10, 2016 11:19:20 AM CET Geert Uytterhoeven wrote: >> On Wed, Nov 9, 2016 at 5:55 PM, Arnd Bergmann wrote: >> > On Monday, October 31, 2016 12:30:55 PM CET Geert Uytterhoeven wrote: >> >> v2: >> >> - Drop S

Re: [powerpc v4 1/3] Setup AMOR in HV mode

2016-11-14 Thread kbuild test robot
Hi Balbir, [auto build test WARNING on powerpc/master] url: https://github.com/0day-ci/linux/commits/Balbir-Singh/Enable-IAMR-storage-keys-for-radix/20161114-133434 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git master config: powerpc-allyesconfig (attached as

Re: [PATCH v2 7/7] soc: renesas: Identify SoC and register with the SoC bus

2016-11-14 Thread Arnd Bergmann
On Monday, November 14, 2016 11:51:15 AM CET Geert Uytterhoeven wrote: > On Thu, Nov 10, 2016 at 12:37 PM, Arnd Bergmann wrote: > > On Thursday, November 10, 2016 11:19:20 AM CET Geert Uytterhoeven wrote: > >> On Wed, Nov 9, 2016 at 5:55 PM, Arnd Bergmann wrote: > >> > On Monday, October 31, 2016

Re: [PATCH] Fix loading of module radeonfb on PowerMac

2016-11-14 Thread Tomi Valkeinen
On 08/10/16 15:09, Mathieu Malaterre wrote: > When the linux kernel is build with (typical kernel ship with Debian > installer): > > CONFIG_FB_OF=y > CONFIG_VT_HW_CONSOLE_BINDING=y > CONFIG_FB_RADEON=m > > The offb driver takes precedence over module radeonfb. It is then > impossible to load the

Re: [PATCH v6 4/4] of/fdt: mark hotpluggable memory

2016-11-14 Thread Michael Ellerman
Reza Arbab writes: > When movable nodes are enabled, any node containing only hotpluggable > memory is made movable at boot time. > > On x86, hotpluggable memory is discovered by parsing the ACPI SRAT, > making corresponding calls to memblock_mark_hotplug(). > > If we introduce a dt property to d

[PATCH -next] powernv: cpufreq: Fix uninitialized lpstate_idx in gpstates_timer_handler

2016-11-14 Thread Akshay Adiga
lpstate_idx remains uninitialized in the case when elapsed_time is greater than MAX_RAMP_DOWN_TIME. At the end of rampdown global pstate should be equal to local pstate. Fixes: 20b15b766354 ("cpufreq: powernv: Use PMCR to verify global and localpstate") Reported-by: Stephen Rothwell Signed-off-by

[Patch v7 0/7] microblaze/PowerPC: Move irq-xilinx to irqchip

2016-11-14 Thread Zubair Lutfullah Kakakhel
Hi, This patch series moves the Xilinx interrupt controller driver out of arch/microblaze to drivers/irqchip and then cleans it up a bit. And then removes another implementation of the driver in arch/powerpc. This effort results in one common driver usable by mips,microblaze and powerpc. Compile

[Patch v7 1/7] microblaze: irqchip: Move intc driver to irqchip

2016-11-14 Thread Zubair Lutfullah Kakakhel
The Xilinx AXI Interrupt Controller IP block is used by the MIPS based xilfpga platform and a few PowerPC based platforms. Move the interrupt controller code out of arch/microblaze so that it can be used by everyone Signed-off-by: Zubair Lutfullah Kakakhel --- V6 -> V7 Rebase to v4.9-rc5 V5 ->

[Patch v7 2/7] irqchip: xilinx: clean up print messages

2016-11-14 Thread Zubair Lutfullah Kakakhel
Remove __func__ and prefix irq-xilinx in various debug prints Signed-off-by: Zubair Lutfullah Kakakhel --- V6 -> V7 New patch This diff was squashed into another patch. Split it up for cleanliness --- drivers/irqchip/irq-xilinx-intc.c | 18 +- 1 file changed, 9 insertions(+), 9

[Patch v7 4/7] irqchip: xilinx: Rename get_irq to xintc_get_irq

2016-11-14 Thread Zubair Lutfullah Kakakhel
Now that the driver is generic and used by multiple archs, get_irq is too generic. Rename get_irq to xintc_get_irq to avoid any conflicts Signed-off-by: Zubair Lutfullah Kakakhel --- V6 -> V7 Rebase to v4.9-rc5 V5 -> V6 Removed __func__ in printk Rebase to v4.9-rc3 V4 -> V5 Rebased to v4.9-rc

[Patch v7 3/7] irqchip: xilinx: restructure and use jump label api

2016-11-14 Thread Zubair Lutfullah Kakakhel
Add a global structure to house various variables. And cleanup read/write handling by using jump label api. Signed-off-by: Zubair Lutfullah Kakakhel --- V6 -> V7 Restructure and use jump label api Better commit log V5 -> V6 Removed __func__ from printk Rebase to v4.9-rc3 V4 -> V5 Rebased to v4

[Patch v7 5/7] irqchip: xilinx: Add support for parent intc

2016-11-14 Thread Zubair Lutfullah Kakakhel
The MIPS based xilfpga platform has the following IRQ structure Peripherals --> xilinx_intcontroller -> mips_cpu_int controller Add support for the driver to chain the irq handler Signed-off-by: Zubair Lutfullah Kakakhel --- V6 -> V7 Rebase to v4.9-rc5 V5 -> V6 Use chained_irq_enter and chain

[Patch v7 6/7] irqchip: xilinx: Try to fall back if xlnx, kind-of-intr not provided

2016-11-14 Thread Zubair Lutfullah Kakakhel
The powerpc dts file does not have the xlnx,kind-of-intr property. Instead of erroring out, give a warning instead. And attempt to continue to probe the interrupt controller while assuming kind-of-intr is 0x0 as a fall back. Signed-off-by: Zubair Lutfullah Kakakhel --- V6 -> V7 Rebase to v4.9-rc

[Patch v7 7/7] powerpc/virtex: Use generic xilinx irqchip driver

2016-11-14 Thread Zubair Lutfullah Kakakhel
The Xilinx interrupt controller driver is now available in drivers/irqchip. Switch to using that driver. Signed-off-by: Zubair Lutfullah Kakakhel Acked-by: Michael Ellerman (powerpc) --- V6 - V7 Rebase to v4.9-rc5 V5 -> V6 Added Acked-by Micheal Ellerman V5 New patch Tested on virtex440-ml50

[powerpc v5 0/3] Enable IAMR storage keys for radix

2016-11-14 Thread Balbir Singh
The first patch sets up AMOR in hypervisor mode. AMOR needs to be setup before IAMR (details of AMOR/IAMR in each patch). The second patch enables detection of exceptions generated due to instruction fetch violations caused and OOPSs' the task. The third patch enables IAMR for both hypervisor and g

[powerpc v5 1/3] Setup AMOR in HV mode

2016-11-14 Thread Balbir Singh
AMOR should be setup in HV mode, we set it up once and let the generic kernel handle IAMR. This patch is used to enable storage keys in a following patch as defined in ISA 3 Reported-by: Aneesh Kumar K.V Signed-off-by: Balbir Singh --- arch/powerpc/mm/pgtable-radix.c | 21 +

[powerpc v5 2/3] Detect instruction fetch denied and report

2016-11-14 Thread Balbir Singh
ISA 3 allows for prevention of instruction fetch and execution of user mode pages. If such an error occurs, SRR1 bit 35 reports the error. We catch and report the error in do_page_fault() Signed-off-by: Balbir Singh --- arch/powerpc/mm/fault.c | 4 1 file changed, 4 insertions(+) diff --gi

[powerpc v5 3/3] Enable storage keys for radix - user mode execution

2016-11-14 Thread Balbir Singh
ISA 3 defines new encoded access authority that allows instruction access prevention in privileged mode and allows normal access to problem state. This patch just enables IAMR (Instruction Authority Mask Register), enabling AMR would require more work. I've tested this with a buggy driver and a si

Re: [1/2] Revert "selftests/powerpc: Load Monitor Register Tests"

2016-11-14 Thread Michael Ellerman
On Mon, 2016-31-10 at 02:19:38 UTC, Michael Neuling wrote: > Load monitored won't be supported in POWER9, so PPC_FEATURE2_ARCH_3_00 > (in HWCAP2) will no longer imply Load monitor support. > > These Load monitored tests are enabled by PPC_FEATURE2_ARCH_3_00 so > they are now bogus and need to be r

Re: [1/2] selftests/powerpc: Abort load_unaligned_zeropad on unhandled SEGV

2016-11-14 Thread Michael Ellerman
On Thu, 2016-03-11 at 04:41:00 UTC, Michael Ellerman wrote: > If the load unaligned zeropad test takes a SEGV which can't be handled, > we increment segv_error, print the offending NIP and then return without > taking any further action. In almost all cases this means we'll just > take the SEGV aga

Re: [1/4] ibmebus: fix device reference leaks in sysfs interface

2016-11-14 Thread Michael Ellerman
On Tue, 2016-01-11 at 15:26:00 UTC, Johan Hovold wrote: > Make sure to drop any reference taken by bus_find_device() in the sysfs > callbacks that are used to create and destroy devices based on > device-tree entries. > > Fixes: 6bccf755ff53 ("[POWERPC] ibmebus: dynamic addition/removal...) > Sign

Re: [2/2] Revert "powerpc: Load Monitor Register Support"

2016-11-14 Thread Michael Ellerman
On Mon, 2016-31-10 at 02:19:39 UTC, Michael Neuling wrote: > Load monitored is no longer supported on POWER9 so let's remove the > code. > > This reverts commit bd3ea317fddfd0f2044f94bed294b90c4bc8e69e. > > Signed-off-by: Michael Neuling Applied to powerpc next, thanks. https://git.kernel.org/

Re: [2/2] selftests/powerpc: Fail load_unaligned_zeropad on miscompare

2016-11-14 Thread Michael Ellerman
On Thu, 2016-03-11 at 04:41:01 UTC, Michael Ellerman wrote: > If the result returned by load_unaligned_zeropad() doesn't match what we > expect we should fail the test! > > Signed-off-by: Michael Ellerman Applied to powerpc next. https://git.kernel.org/powerpc/c/997e200182347d2cc7e37bc43eaafe

Re: [2/3] powerpc: relative exception tables

2016-11-14 Thread Michael Ellerman
On Thu, 2016-13-10 at 05:42:54 UTC, Nicholas Piggin wrote: > This halves the exception table size on 64-bit builds, and it > allows build-time sorting of exception tables to work on > relocated kernels. > > Signed-off-by: Nicholas Piggin Applied to powerpc next, thanks. https://git.kernel.org/p

Re: [2/4] ibmebus: fix further device reference leaks

2016-11-14 Thread Michael Ellerman
On Tue, 2016-01-11 at 15:26:01 UTC, Johan Hovold wrote: > Make sure to drop any reference taken by bus_find_device() when creating > devices during init and driver registration. > > Fixes: 55347cc9962f ("[POWERPC] ibmebus: Add device creation...) > Signed-off-by: Johan Hovold Applied to powerpc

Re: [3/3] powerpc: build-time sort exception table

2016-11-14 Thread Michael Ellerman
On Thu, 2016-13-10 at 05:42:55 UTC, Nicholas Piggin wrote: > Signed-off-by: Nicholas Piggin Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/5b9ff027859868efd63cdbbff5d301 cheers

Re: [3/4] powerpc/vio: clarify vio_find_node reference counting

2016-11-14 Thread Michael Ellerman
On Tue, 2016-01-11 at 15:26:02 UTC, Johan Hovold wrote: > Add comment clarifying that vio_find_node() takes a reference to the > embedded struct device which needs to be dropped after use. > > Signed-off-by: Johan Hovold Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/e8cfb7e7

Re: [4/4] powerpc/pci: fix device reference leaks

2016-11-14 Thread Michael Ellerman
On Tue, 2016-01-11 at 15:26:03 UTC, Johan Hovold wrote: > Make sure to drop any device reference taken by vio_find_node() when > adding and removing virtual I/O slots. > > Fixes: 5eeb8c63a38f ("[PATCH] PCI Hotplug: rpaphp: Move VIO...") > Signed-off-by: Johan Hovold Applied to powerpc next, than

Re: powerpc/module: Add support for R_PPC64_REL32 relocations

2016-11-14 Thread Michael Ellerman
On Thu, 2016-03-11 at 04:39:17 UTC, Michael Ellerman wrote: > We haven't seen these before, but the soon to be merged relative > exception tables support causes them to be generated. > > Signed-off-by: Michael Ellerman Applied to powerpc next. https://git.kernel.org/powerpc/c/9f751b82b491d06c64

Re: powerpc/asm: Allow including ppc_asm.h in asm files

2016-11-14 Thread Michael Ellerman
On Fri, 2016-04-11 at 02:39:43 UTC, Michael Ellerman wrote: > There's no reason to #error if we include ppc_asm.h in asm files, the > ifdef already prevents any problems. > > Signed-off-by: Michael Ellerman Applied to powerpc next. https://git.kernel.org/powerpc/c/e3f2c6c39371c0e67c7fd6ebcb8b74

Re: powerpc/book3s64: Always build for power4 or later

2016-11-14 Thread Michael Ellerman
On Fri, 2016-21-10 at 00:01:51 UTC, Michael Ellerman wrote: > When we're not compiling for a specific CPU, ie. none of the > CONFIG_POWERx_CPU options are set, and CONFIG_GENERIC_CPU *is* set, we > currently don't pass any -mcpu option to the compiler. This means the > compiler builds for a "generi

Re: [v2] powerpc/hash64: Be more careful when generating tlbiel

2016-11-14 Thread Michael Ellerman
On Wed, 2016-19-10 at 05:53:25 UTC, Michael Ellerman wrote: > From: Balbir Singh > > In ISA v2.05, the tlbiel instruction takes two arguments, RB and L: > > tlbiel RB,L > > +-+-++-+-+-++ > |31 |/| L |/|RB | 274 | /

Re: powerpc/configs: Drop REISERFS from pseries & powernv

2016-11-14 Thread Michael Ellerman
On Thu, 2016-03-11 at 07:18:07 UTC, Michael Ellerman wrote: > No one uses reiserfs much these days, or is likely to in future. So drop > it from pseries and powernv defconfigs to save time and space. It's > still enabled in ppc64_defconfig so we get some build coverage. > > Signed-off-by: Michael

Re: i2c_powermac: shut up lockdep warning

2016-11-14 Thread Michael Ellerman
On Wed, 2016-21-09 at 11:34:58 UTC, Denis Kirjanov wrote: > That's unclear why lockdep shows the following warning but adding a > lockdep class to struct pmac_i2c_bus solves it > > [ 20.507795] == > [ 20.507796] [ INFO: possible circular lock

Re: [v2] powerpc/64: option to force run-at-load to test relocation

2016-11-14 Thread Michael Ellerman
On Fri, 2016-14-10 at 07:31:33 UTC, Nicholas Piggin wrote: > This adds a config option that can help exercise the case when > the kernel is not running at PAGE_OFFSET. > > Signed-off-by: Nicholas Piggin > Reviewed-by: Balbir Singh Applied to powerpc next, thanks. https://git.kernel.org/powerpc

Re: [v2] powernv: Simplify searching for compatible device nodes

2016-11-14 Thread Michael Ellerman
On Thu, 2016-11-08 at 00:32:40 UTC, Jack Miller wrote: > This condenses the opal node searching into a single function that finds > all compatible nodes, instead of just searching the ibm,opal children, > for ipmi, flash, and prd similar to how opal-i2c nodes are found. > > Signed-off-by: Jack Mil

Re: [v2] powerpc: EX_TABLE macro for exception tables

2016-11-14 Thread Michael Ellerman
On Thu, 2016-03-11 at 05:43:12 UTC, Michael Ellerman wrote: > From: Nicholas Piggin > > This macro is taken from s390, and allows more flexibility in > changing exception table format. > > mpe: Put it in ppc_asm.h and only define one version using stringinfy_in_c(). > Add some empty definitions

Re: powerpc: make _ASM_NOKPROBE_SYMBOL a noop when KPROBES not defined

2016-11-14 Thread Michael Ellerman
On Thu, 2016-13-10 at 02:07:14 UTC, Nicholas Piggin wrote: > Signed-off-by: Nicholas Piggin Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/c0a5149105ab5f76f7c5a8fc2eb3d7 cheers

Re: powerpc: Remove suspect CONFIG_PPC_BOOK3E #ifdefs in nohash/64/pgtable.h

2016-11-14 Thread Michael Ellerman
On Thu, 2016-25-08 at 06:31:10 UTC, Rui Teng wrote: > There are three #ifdef CONFIG_PPC_BOOK3E sections in nohash/64/pgtable.h. > And there should be no configurations possible which use nohash/64/pgtable.h > but don't also enable CONFIG_PPC_BOOK3E. > > Suggested-by: Michael Ellerman > Signed-off

Re: powerpc/64s: reduce exception alignment

2016-11-14 Thread Michael Ellerman
On Thu, 2016-13-10 at 03:43:52 UTC, Nicholas Piggin wrote: > Exception handlers are aligned to 128 bytes (L1 cache) on 64s, which is > overkill. It can reduce the icache footprint of any individual exception > path. However taken as a whole, the expansion in icache footprint seems > likely to be co

Re: Removed dependency on IDE_GD_ATA if ADB_PMU_LED_DISK is selected.

2016-11-14 Thread Michael Ellerman
On Sun, 2016-18-09 at 11:08:45 UTC, Elimar Riesebieter wrote: > We can use the front led of powerbooks/ibooks as a disk activitiy imagination > without the deprecated IDE_GD_ATA. > > Signed-off-by: Elimar Riesebieter Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/0e865a80c135

Re: [RESEND] tools-powerpc: Return false instead of -1

2016-11-14 Thread Michael Ellerman
On Wed, 2016-09-11 at 08:55:04 UTC, Andrew Shadura wrote: > From: Peter Senna Tschudin > > Returning a negative value for a boolean function seem to have the > undesired effect of returning true. require_paranoia_below() is a > boolean function, but the variable used to store the return value is

Re: tools/testing/selftests/powerpc: Add Anton's null_syscall benchmark to the selftests

2016-11-14 Thread Michael Ellerman
On Tue, 2016-27-09 at 14:10:16 UTC, Rui Teng wrote: > From: Anton Blanchard > > Pull in a version of Anton's null_syscall benchmark: > http://ozlabs.org/~anton/junkcode/null_syscall.c > Into tools/testing/selftests/powerpc/benchmarks. > > Suggested-by: Michael Ellerman > Signed-off-by: Anton Bl

Re: powerpc/pseries: Use H_CLEAR_HPT to clear MMU hash table during kexec

2016-11-14 Thread Michael Ellerman
On Sat, 2016-01-10 at 10:41:56 UTC, Anton Blanchard wrote: > From: Anton Blanchard > > An hcall was recently added that does exactly what we need > during kexec - it clears the entire MMU hash table, ignoring any > VRMA mappings. > > Try it and fall back to the old method if we get a failure. >

[PATCH] T4240RBD: add device tree entry for W83793

2016-11-14 Thread Florian Larysch
The T4240RDB contains a W83793 hardware monitoring chip. Add a device tree entry to make the driver attach to it, as the i2c-mpc bus driver dropped support for class-based instantiation of devices a long time ago. Signed-off-by: Florian Larysch --- arch/powerpc/boot/dts/fsl/t4240rdb.dts | 4

Re: [PATCH] powerpc: fpr save/restore function cleanups

2016-11-14 Thread Michael Ellerman
Nicholas Piggin writes: > On Tue, 1 Nov 2016 15:41:12 +1100 > Nicholas Piggin wrote: > >> On Tue, 1 Nov 2016 15:22:19 +1100 >> Nicholas Piggin wrote: >> >> > The powerpc64 linker generates fpr save/restore functions on-demand, >> > placing them in the .sfpr section. So remove the explicitly c

Re: [powerpc v4 3/3] Enable storage keys for radix - user mode execution

2016-11-14 Thread kbuild test robot
Hi Balbir, [auto build test WARNING on powerpc/master] url: https://github.com/0day-ci/linux/commits/Balbir-Singh/Enable-IAMR-storage-keys-for-radix/20161114-133434 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git master config: powerpc-allyesconfig (attached as

[PATCH v2 1/4] powerpc/mm: update ptep_set_access_flag to not do full mm tlb flush

2016-11-14 Thread Aneesh Kumar K.V
When we are updating pte, we just need to flush the tlb mapping for that pte. Right now we do a full mm flush because we don't track page size. Update the interface to track the page size and use that to do the right tlb flush. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/

[PATCH v2 2/4] powerpc/mm: Rename hugetlb-radix.h to hugetlb.h

2016-11-14 Thread Aneesh Kumar K.V
We will start moving some book3s specific hugetlb functions there. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/{hugetlb-radix.h => hugetlb.h} | 8 ++-- arch/powerpc/include/asm/hugetlb.h| 2 +- 2 files changed, 7 insertions(+), 3 del

[PATCH v2 3/4] powerpc/mm/hugetlb: Switch hugetlb update to use huge_pte_update

2016-11-14 Thread Aneesh Kumar K.V
We want to switch pte_update to use va based tlb flush. In order to do that we need to track the page size. With hugetlb we currently don't have page size available in these functions. Hence switch hugetlb to use seperate functions for update. In later patch we will update hugetlb functions to take

[PATCH v2 4/4] powerpc/mm: update pte_update to not do full mm tlb flush

2016-11-14 Thread Aneesh Kumar K.V
When we are updating pte, we just need to flush the tlb mapping for that pte. Right now we do a full mm flush because we don't track page size. Update the interface to track the page size and use that to do the right tlb flush. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/

[PATCH v2 2/2] powerpc/mm/hugetlb: Switch hugetlb update to use pte_update

2016-11-14 Thread Aneesh Kumar K.V
Now that we have updated hugetlb functions to take vm_area_struct and we can derive huge page size from vma, switch the pte update to use generic functions. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/hugetlb.h | 34 +++- arch/powerpc/include/as

[PATCH v2 1/2] hugetlb: Change the function prototype to take vma_area_struct as arg

2016-11-14 Thread Aneesh Kumar K.V
This help us to find the hugetlb page size which we need ot use on some archs like ppc64 for tlbflush. This also make the interface consistent with other hugetlb functions Signed-off-by: Aneesh Kumar K.V --- NOTE: This series is dependent on another series posted here. https://lists.ozlabs.org/pi

[PATCH] powerpc/mm: Batch tlb flush when invalidating pte entries

2016-11-14 Thread Aneesh Kumar K.V
This will improve the task exit case, by batching tlb invalidates. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/radix.h | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/include/asm/book3s/64/radix.h b/arch/powerpc/include

Re: [PATCH] powerpc/mm: Batch tlb flush when invalidating pte entries

2016-11-14 Thread Aneesh Kumar K.V
"Aneesh Kumar K.V" writes: > This will improve the task exit case, by batching tlb invalidates. > > Signed-off-by: Aneesh Kumar K.V > --- > arch/powerpc/include/asm/book3s/64/radix.h | 14 ++ > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/arch/powerpc/include/as

Re: [RESEND PATCH] cxl: Fix coredump generation when cxl_get_fd() is used

2016-11-14 Thread Matthew R. Ochs
> On Nov 14, 2016, at 2:58 AM, Frederic Barrat > wrote: > > If a process dumps core while owning a cxl file descriptor obtained > from an AFU driver (e.g. cxlflash) through the cxl_get_fd() API, the > following error occurs: > > [ 868.027591] Unable to handle kernel paging request for data at

Re: [PATCH net-next v7 03/10] dpaa_eth: add option to use one buffer pool set

2016-11-14 Thread David Miller
From: Madalin-Cristian Bucur Date: Mon, 14 Nov 2016 10:25:13 + > I've introduced this Kconfig option as a backwards compatible option, to > be able to run comparative tests between the independent buffer pool setup > and the previous common buffer pool setup. There are not so many reasons > t

[PATCH v3 00/11]powerpc: "paca->soft_enabled" based local atomic operation implementation

2016-11-14 Thread Madhavan Srinivasan
Local atomic operations are fast and highly reentrant per CPU counters. Used for percpu variable updates. Local atomic operations only guarantee variable modification atomicity wrt the CPU which owns the data and these needs to be executed in a preemption safe way. Here is the design of the patchs

[PATCH v3 02/11] powerpc: move set_soft_enabled() and rename

2016-11-14 Thread Madhavan Srinivasan
Move set_soft_enabled() from powerpc/kernel/irq.c to asm/hw_irq.c, to force updates to paca-soft_enabled done via these access function. Add "memory" clobber to hint compiler since paca->soft_enabled memory is the target here Renaming it as soft_enabled_set() will make namespaces works better as p

[PATCH v3 03/11] powerpc: Use soft_enabled_set api to update paca->soft_enabled

2016-11-14 Thread Madhavan Srinivasan
Force use of soft_enabled_set() wrapper to update paca-soft_enabled wherever possisble. Also add a new wrapper function, soft_enabled_set_return(), added to force the paca->soft_enabled updates. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/hw_irq.h | 14 ++ arch/p

[PATCH v3 05/11] powerpc: reverse the soft_enable logic

2016-11-14 Thread Madhavan Srinivasan
"paca->soft_enabled" is used as a flag to mask some of interrupts. Currently supported flags values and their details: soft_enabledMSR[EE] 0 0 Disabled (PMI and HMI not masked) 1 1 Enabled "paca->soft_enabled" is initialized to 1 to make the interripts

[PATCH v3 07/11] powerpc: Add support to take additional parameter in MASKABLE_* macro

2016-11-14 Thread Madhavan Srinivasan
To support addition of "bitmask" to MASKABLE_* macros, factor out the EXCPETION_PROLOG_1 macro. Currently soft_enabled is used as the flag to determine the interrupt state. Patch extends the soft_enabled to be used as a mask instead of a flag. Make it explicit the interrupt masking supported by a

[PATCH v3 08/11] powerpc: Add support to mask perf interrupts and replay them

2016-11-14 Thread Madhavan Srinivasan
New bit mask field "IRQ_DISABLE_MASK_PMU" is introduced to support the masking of PMI. Couple of new irq #defs "PACA_IRQ_PMI" and "SOFTEN_VALUE_0xf0*" added to use in the exception code to check for PMI interrupts. In the masked_interrupt handler, for PMIs we reset the MSR[EE] and return. In the

[PATCH v3 10/11] powerpc: Add new set of soft_enabled_ functions

2016-11-14 Thread Madhavan Srinivasan
To support disabling and enabling of irq with PMI, set of new powerpc_local_irq_pmu_save() and powerpc_local_irq_restore() functions are added. And powerpc_local_irq_save() implemented, by adding a new soft_enabled manipulation function soft_enabled_or_return(). Local_irq_pmu_* macros are provided

[PATCH v3 09/11] powerpc:Add new kconfig IRQ_DEBUG_SUPPORT

2016-11-14 Thread Madhavan Srinivasan
New Kconfig is added "CONFIG_IRQ_DEBUG_SUPPORT" to add warn_on to alert the invalid transitions. Also moved the code under the CONFIG_TRACE_IRQFLAGS in arch_local_irq_restore() to new Kconfig. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/Kconfig | 4 arch/powerpc/kernel/irq.c |

[PATCH v3 11/11] powerpc: rewrite local_t using soft_irq

2016-11-14 Thread Madhavan Srinivasan
Local atomic operations are fast and highly reentrant per CPU counters. Used for percpu variable updates. Local atomic operations only guarantee variable modification atomicity wrt the CPU which owns the data and these needs to be executed in a preemption safe way. Here is the design of this patch

[PATCH v3 04/11] powerpc: Add soft_enabled manipulation functions

2016-11-14 Thread Madhavan Srinivasan
Add new soft_enabled_* manipulation function and implement arch_local_* using the soft_enabled_* wrappers. Reviewed-by: Nicholas Piggin Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/hw_irq.h | 32 ++-- 1 file changed, 14 insertions(+), 18 deletions(

[PATCH v3 06/11] powerpc: Avoid using EXCEPTION_PROLOG_1 macro in MASKABLE_*

2016-11-14 Thread Madhavan Srinivasan
Currently we use both EXCEPTION_PROLOG_1 and __EXCEPTION_PROLOG_1 in the MASKABLE_* macros. As a cleanup, this patch makes MASKABLE_* to use only __EXCEPTION_PROLOG_1. There is not logic change. Reviewed-by: Nicholas Piggin Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/excepti

[PATCH v3 01/11] powerpc: Add #defs for paca->soft_enabled flags

2016-11-14 Thread Madhavan Srinivasan
Two #defs IRQ_DISABLE_LEVEL_NONE and IRQ_DISABLE_LEVEL_LINUX are added to be used when updating paca->soft_enabled. Replace the hardcoded values used when updating paca->soft_enabled with IRQ_DISABLE_MASK_* #def. No logic change. Reviewed-by: Nicholas Piggin Signed-off-by: Madhavan Srinivasan --

[PATCH v2 0/4] Support PowerISA v3.0 PMU Raw event format

2016-11-14 Thread Madhavan Srinivasan
Patchset to factor out the PowerISA v2.07 PMU raw event format encoding and add support to the PowerISA v3.0 PMU raw event format encoding. Changelog v1: 1) Initialized "mmcra" variable to avoid compile time errors 2) Made changes to commit message Madhavan Srinivasan (4): powerpc/perf: factor

[PATCH v2 2/4] powerpc/perf: update attribute_group data structure

2016-11-14 Thread Madhavan Srinivasan
Rename the power_pmu and attribute_group variables that support PowerISA v2.07. Add a cpu feature flag check to pick the PowerISA v2.07 format structures to support. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/perf/power9-pmu.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletio

[PATCH v2 4/4] powerpc/perf: macros for PowerISA v3.0 format encoding

2016-11-14 Thread Madhavan Srinivasan
Patch to add macros and contants to support the PowerISA v3.0 raw event encoding format. Couple of functions added since some of the bits fields like PMCxCOMB and THRESH_CMP has different width and location within MMCR* in PowerISA v3.0. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/perf/i

[PATCH v2 1/4] powerpc/perf: factor out the event format field

2016-11-14 Thread Madhavan Srinivasan
Factor out the format field structure for PowerISA v2.07. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/perf/isa207-common.c | 34 ++ arch/powerpc/perf/power8-pmu.c| 39 --- arch/powerpc/perf/power9-pmu.c| 39 -

[PATCH v2 3/4] powerpc/perf: PowerISA v3.0 raw event format encoding

2016-11-14 Thread Madhavan Srinivasan
Patch to update the PowerISA v3.0 raw event encoding format information and add support for the same in Power9-pmu.c. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/perf/power9-pmu.c | 134 + 1 file changed, 134 insertions(+) diff --git a/arch/powerp

Re: [PATCH] ps3_gelic: fix spelling mistake in debug message

2016-11-14 Thread David Miller
From: Colin King Date: Sat, 12 Nov 2016 17:20:30 + > From: Colin Ian King > > Trivial fix to spelling mistake "unmached" to "unmatched" in > debug message. > > Signed-off-by: Colin Ian King Applied.

Re: [PATCH v6 4/4] of/fdt: mark hotpluggable memory

2016-11-14 Thread Reza Arbab
On Mon, Nov 14, 2016 at 10:59:43PM +1100, Michael Ellerman wrote: So I'm not opposed to this, but it is a little vague. What does the "hotpluggable" property really mean? Is it just a hint to the operating system? (which may or may not be Linux). Or is it a direction, "this memory must be able

[PATCH v2] Fix loading of module radeonfb on PowerMac

2016-11-14 Thread Mathieu Malaterre
When the linux kernel is build with (typical kernel ship with Debian installer): CONFIG_FB_OF=y CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_FB_RADEON=m The offb driver takes precedence over module radeonfb. It is then impossible to load the module, error reported is: [ 96.551486] radeonfb :00:10

Re: [PATCH -next] powernv: cpufreq: Fix uninitialized lpstate_idx in gpstates_timer_handler

2016-11-14 Thread Rafael J. Wysocki
On Monday, November 14, 2016 05:29:27 PM Akshay Adiga wrote: > lpstate_idx remains uninitialized in the case when elapsed_time > is greater than MAX_RAMP_DOWN_TIME. At the end of rampdown > global pstate should be equal to local pstate. > > Fixes: 20b15b766354 ("cpufreq: powernv: Use PMCR to verif

[PATCH v7 5/5] dt: add documentation of "hotpluggable" memory property

2016-11-14 Thread Reza Arbab
Summarize the "hotpluggable" property of dt memory nodes. Signed-off-by: Reza Arbab --- Documentation/devicetree/booting-without-of.txt | 7 +++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt in

[PATCH v7 0/5] enable movable nodes on non-x86 configs

2016-11-14 Thread Reza Arbab
This patchset allows more configs to make use of movable nodes. When CONFIG_MOVABLE_NODE is selected, there are two ways to introduce such nodes into the system: 1. Discover movable nodes at boot. Currently this is only possible on x86, but we will enable configs supporting fdt to do the same.

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

2016-11-14 Thread Reza Arbab
To support movable memory nodes (CONFIG_MOVABLE_NODE), at least one of the following must be true: 1. This config has the capability to identify movable nodes at boot. Right now, only x86 can do this. 2. Our config supports memory hotplug, which means that a movable node can be created by h

[PATCH v7 2/5] mm: remove x86-only restriction of movable_node

2016-11-14 Thread Reza Arbab
In commit c5320926e370 ("mem-hotplug: introduce movable_node boot option"), the memblock allocation direction is changed to bottom-up and then back to top-down like this: 1. memblock_set_bottom_up(true), called by cmdline_parse_movable_node(). 2. memblock_set_bottom_up(false), called by x86's numa

[PATCH v7 1/5] powerpc/mm: allow memory hotplug into a memoryless node

2016-11-14 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 Ar

[PATCH v7 4/5] of/fdt: mark hotpluggable memory

2016-11-14 Thread Reza Arbab
When movable nodes are enabled, any node containing only hotpluggable memory is made movable at boot time. On x86, hotpluggable memory is discovered by parsing the ACPI SRAT, making corresponding calls to memblock_mark_hotplug(). If we introduce a dt property to describe memory as hotpluggable, c

Re: [PATCH 2/2] usb: dwc2: fixes host_dma logic

2016-11-14 Thread John Youn
On 11/11/2016 12:59 PM, Christian Lamparter wrote: > This patch moves the the host_dma initialization > before dwc2_set_param_dma_desc_enable and > dwc2_set_param_dma_desc_fs_enable. The reason being > that both function need it. > > Fixes: 1205489cee75bf39 ("usb: dwc2: Get host DMA device propert

Re: [PATCH 1/2] usb: dwc2: add amcc,dwc-otg support

2016-11-14 Thread John Youn
On 11/11/2016 3:12 PM, Christian Lamparter wrote: > On Friday, November 11, 2016 2:20:42 PM CET John Youn wrote: >> On 11/11/2016 2:05 PM, Christian Lamparter wrote: >>> On Friday, November 11, 2016 1:22:16 PM CET John Youn wrote: On 11/11/2016 12:59 PM, Christian Lamparter wrote: > This p

Re: [PATCH v7 2/5] mm: remove x86-only restriction of movable_node

2016-11-14 Thread Balbir Singh
On 15/11/16 09:02, Reza Arbab wrote: > In commit c5320926e370 ("mem-hotplug: introduce movable_node boot > option"), the memblock allocation direction is changed to bottom-up and > then back to top-down like this: > > 1. memblock_set_bottom_up(true), called by cmdline_parse_movable_node(). > 2.

Re: [PATCH v7 4/5] of/fdt: mark hotpluggable memory

2016-11-14 Thread Balbir Singh
On 15/11/16 09:02, Reza Arbab wrote: > When movable nodes are enabled, any node containing only hotpluggable > memory is made movable at boot time. > > On x86, hotpluggable memory is discovered by parsing the ACPI SRAT, > making corresponding calls to memblock_mark_hotplug(). > > If we introduc

[v1 0/3] Support memory cgroup hotplug

2016-11-14 Thread Balbir Singh
In the absence of hotplug we use extra memory proportional to (possible_nodes - online_nodes) * number_of_cgroups. PPC64 has a patch to disable large consumption with large number of cgroups. This patch adds hotplug support to memory cgroups and reverts the commit that limited possible nodes to onl

[PATCH v1 1/3] Add basic infrastructure for memcg hotplug support

2016-11-14 Thread Balbir Singh
The lack of hotplug support makes us allocate all memory upfront for per node data structures. With large number of cgroups this can be an overhead. PPC64 actually limits n_possible nodes to n_online to avoid some of this overhead. This patch adds the basic notifiers to listen to hotplug events an

[PATCH v1 2/3] Move from all possible nodes to online nodes

2016-11-14 Thread Balbir Singh
Move routines that do operations on all nodes to just the online nodes. Most of the changes are very obvious (like the ones related to soft limit tree per node) Signed-off-by: Balbir Singh --- mm/memcontrol.c | 28 +++- 1 file changed, 23 insertions(+), 5 deletions(-) di

[PATCH v1 3/3] powerpc: fix node_possible_map limitations

2016-11-14 Thread Balbir Singh
We've fixed the memory hotplug issue with memcg, hence this work around should not be required. Fixes: commit 3af229f2071f ("powerpc/numa: Reset node_possible_map to only node_online_map") Signed-off-by: Balbir Singh --- arch/powerpc/mm/numa.c | 7 --- 1 file changed, 7 deletions(-) diff -

Re: [PATCH 4/7] powerpc/64: tool to check head sections location sanity

2016-11-14 Thread Michael Ellerman
Nicholas Piggin writes: > diff --git a/arch/powerpc/Makefile.postlink b/arch/powerpc/Makefile.postlink > index 1725e64..b8fe12b 100644 > --- a/arch/powerpc/Makefile.postlink > +++ b/arch/powerpc/Makefile.postlink > @@ -24,6 +27,9 @@ endif > > vmlinux: FORCE > @true > +ifeq ($(CONFIG_PPC6

Re: [PATCH v6 3/3] powerpc/pseries: Implement indexed-count hotplug memory remove

2016-11-14 Thread Michael Roth
Quoting Nathan Fontenot (2016-10-18 12:21:06) > From: Sahil Mehta > > Indexed-count remove for memory hotplug guarantees that a contiguous block > of lmbs beginning at a specified will be unassigned (NOT > that lmbs will be removed). Because of Qemu's per-DIMM memory > management, the removal

Re: [powerpc v4 1/3] Setup AMOR in HV mode

2016-11-14 Thread Michael Ellerman
Balbir Singh writes: > diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c > index ed7bddc..7343573 100644 > --- a/arch/powerpc/mm/pgtable-radix.c > +++ b/arch/powerpc/mm/pgtable-radix.c > @@ -320,6 +320,25 @@ static void update_hid_for_radix(void) > cpu_r

  1   2   >