Re: [RFC PATCH] Replaces long number representation by BIT() macro

2019-07-07 Thread Michael Ellerman
Segher Boessenkool writes: > On Tue, Jul 02, 2019 at 11:16:35AM -0500, Segher Boessenkool wrote: >> On Wed, Jul 03, 2019 at 01:19:34AM +1000, Michael Ellerman wrote: >> > What we could do is switch to the `UL` macro from include/linux/const.h, >> > rather than using our own ASM_CONST. >> >> You

Re: [PATCH v3 1/3] cpuidle-powernv : forced wakeup for stop states

2019-07-07 Thread Nicholas Piggin
Abhishek Goel's on July 4, 2019 7:18 pm: > Currently, the cpuidle governors determine what idle state a idling CPU > should enter into based on heuristics that depend on the idle history on > that CPU. Given that no predictive heuristic is perfect, there are cases > where the governor predicts a

Re: [PATCH 3/4] powerpc/32: define helpers to get L1 cache sizes.

2019-07-07 Thread Michael Ellerman
On Tue, 2019-05-14 at 09:05:15 UTC, Christophe Leroy wrote: > This patch defines C helpers to retrieve the size of > cache blocks and uses them in the cacheflush functions. > > Signed-off-by: Christophe Leroy Applied to powerpc next, thanks.

Re: [PATCH 1/4] powerpc/64: flush_inval_dcache_range() becomes flush_dcache_range()

2019-07-07 Thread Michael Ellerman
On Tue, 2019-05-14 at 09:05:13 UTC, Christophe Leroy wrote: > On most arches having function flush_dcache_range(), including PPC32, > this function does a writeback and invalidation of the cache bloc. > > On PPC64, flush_dcache_range() only does a writeback while > flush_inval_dcache_range() does

Re: [PATCH] powerpc/4xx/uic: clear pending interrupt after irq type/pol change

2019-07-07 Thread Michael Ellerman
On Sat, 2019-06-15 at 15:23:13 UTC, Christian Lamparter wrote: > When testing out gpio-keys with a button, a spurious > interrupt (and therefore a key press or release event) > gets triggered as soon as the driver enables the irq > line for the first time. > > This patch clears any potential

Re: [PATCH] powerpc/cell: set no_llseek in spufs_cntl_fops

2019-07-07 Thread Michael Ellerman
On Sat, 2017-05-06 at 15:37:20 UTC, Geliang Tang wrote: > In spufs_cntl_fops, since we use nonseekable_open() to open, we > should use no_llseek() to seek, not generic_file_llseek(). > > Signed-off-by: Geliang Tang Applied to powerpc next, thanks.

Re: [PATCH v9 10/10] selftests: add openat2(2) selftests

2019-07-07 Thread Aleksa Sarai
On 2019-07-08, Michael Ellerman wrote: > Aleksa Sarai writes: > > diff --git a/tools/testing/selftests/openat2/Makefile > > b/tools/testing/selftests/openat2/Makefile > > new file mode 100644 > > index ..8235a49928f6 > > --- /dev/null > > +++

Re: [PATCH] powerpc/configs: Remove useless UEVENT_HELPER_PATH

2019-07-07 Thread Michael Ellerman
On Tue, 2019-06-04 at 08:00:33 UTC, Krzysztof Kozlowski wrote: > Remove the CONFIG_UEVENT_HELPER_PATH because: > 1. It is disabled since commit 1be01d4a5714 ("driver: base: Disable >CONFIG_UEVENT_HELPER by default") as its dependency (UEVENT_HELPER) was >made default to 'n', > 2. It is not

Re: [PATCH] powerpc/configs: Disable latencytop

2019-07-07 Thread Michael Ellerman
On Tue, 2019-06-04 at 05:42:57 UTC, Anton Blanchard wrote: > latencytop adds almost 4kB to each and every task struct and as such > it doesn't deserve to be in our defconfigs. > > Signed-off-by: Anton Blanchard Applied to powerpc next, thanks.

Re: [PATCH v3 1/3] powerpc/boot: don't force gzipped uImage

2019-07-07 Thread Michael Ellerman
On Fri, 2019-06-14 at 10:16:23 UTC, Christophe Leroy wrote: > This patch modifies the generation of uImage by handing over > the selected compression type instead of forcing gzip > > Signed-off-by: Christophe Leroy Series applied to powerpc next, thanks.

Re: [PATCH] powerpc: Enable CONFIG_IPV6 in ppc64_defconfig

2019-07-07 Thread Michael Ellerman
On Tue, 2019-07-02 at 15:47:45 UTC, sathn...@linux.vnet.ibm.com wrote: > From: Satheesh Rajendran > > Enable CONFIG_IPV6 in ppc64_defconfig to enable > certain network functionalities required for tests. > > Signed-off-by: Michael Ellerman > Signed-off-by: Satheesh Rajendran Applied to

Re: [PATCH v3 3/5] powerpc: Use the correct style for SPDX License Identifier

2019-07-07 Thread Michael Ellerman
On Tue, 2019-04-16 at 15:28:57 UTC, Nishad Kamdar wrote: > This patch corrects the SPDX License Identifier style > in the powerpc Hardware Architecture related files. > > Suggested-by: Joe Perches > Signed-off-by: Nishad Kamdar > Acked-by: Andrew Donnellan Applied to powerpc next, thanks.

Re: [PATCH v2] powerpc/mm: mark more tlb functions as __always_inline

2019-07-07 Thread Michael Ellerman
On Tue, 2019-05-21 at 13:13:24 UTC, Masahiro Yamada wrote: > With CONFIG_OPTIMIZE_INLINING enabled, Laura Abbott reported error > with gcc 9.1.1: > > arch/powerpc/mm/book3s64/radix_tlb.c: In function '_tlbiel_pid': > arch/powerpc/mm/book3s64/radix_tlb.c:104:2: warning: asm operand 3 probably

Re: [PATCH 4/4] powerpc/64: reuse PPC32 static inline flush_dcache_range()

2019-07-07 Thread Michael Ellerman
On Tue, 2019-05-14 at 09:05:16 UTC, Christophe Leroy wrote: > This patch drops the assembly PPC64 version of flush_dcache_range() > and re-uses the PPC32 static inline version. > > With GCC 8.1, the following code is generated: > > void flush_test(unsigned long start, unsigned long stop) > { >

Re: [PATCH v2] powerpc/mm/nvdimm: Add an informative message if we fail to allocate altmap block

2019-07-07 Thread Michael Ellerman
On Mon, 2019-07-01 at 14:33:38 UTC, "Aneesh Kumar K.V" wrote: > Allocation from altmap area can fail based on vmemmap page size used. Add > kernel > info message to indicate the failure. That allows the user to identify > whether they > are really using persistent memory reserved space for

Re: [PATCH kernel 1/2] powerpc/pseries/dma: Allow swiotlb

2019-07-07 Thread Michael Ellerman
On Tue, 2019-05-07 at 06:25:58 UTC, Alexey Kardashevskiy wrote: > The commit 8617a5c5bc00 ("powerpc/dma: handle iommu bypass in > dma_iommu_ops") merged direct DMA ops into the IOMMU DMA ops allowing > SWIOTLB as well but only for mapping; the unmapping and bouncing parts > were left unmodified. >

Re: [PATCH v3 1/3] powerpc: Move PPC_HA() PPC_HI() and PPC_LO() to ppc-opcode.h

2019-07-07 Thread Michael Ellerman
On Fri, 2019-05-03 at 06:40:15 UTC, Christophe Leroy wrote: > PPC_HA() PPC_HI() and PPC_LO() macros are nice macros. Move them > from module64.c to ppc-opcode.h in order to use them in other places. > > Signed-off-by: Christophe Leroy Series applied to powerpc next, thanks.

Re: [PATCH] powerpc/scm: Mark the region volatile if cache flush not required

2019-07-07 Thread Michael Ellerman
On Fri, 2019-06-07 at 06:44:07 UTC, "Aneesh Kumar K.V" wrote: > The device tree node is documented as below: > > “ibm,cache-flush-required”: > property name indicates Cache Flush Required for this Persistent Memory > Segment to persist memory > prop-encoded-array: None, this is a name only

Re: [PATCH v2] powerpc/nvdimm: Add support for multibyte read/write for metadata

2019-07-07 Thread Michael Ellerman
On Fri, 2019-06-07 at 06:45:11 UTC, "Aneesh Kumar K.V" wrote: > SCM_READ/WRITE_MEATADATA hcall supports multibyte read/write. This patch > updates the metadata read/write to use 1, 2, 4 or 8 byte read/write as > mentioned in PAPR document. > > READ/WRITE_METADATA hcall supports the 1, 2, 4, or 8

Re: [PATCH v2 1/3] powerpc/mm/drconf: Use NUMA_NO_NODE on failures instead of node 0

2019-07-07 Thread Michael Ellerman
On Mon, 2019-07-01 at 14:36:24 UTC, "Aneesh Kumar K.V" wrote: > If we fail to parse the associativity array we should default to > NUMA_NO_NODE instead of NODE 0. Rest of the code fallback to the > right default if we find the numa node value NUMA_NO_NODE. > > Signed-off-by: Aneesh Kumar K.V

Re: [PATCH v3 1/9] powerpc/pseries: Use macros for referring to the DTL enable mask

2019-07-07 Thread Michael Ellerman
On Wed, 2019-07-03 at 17:03:54 UTC, "Naveen N. Rao" wrote: > Introduce macros to encode the DTL enable mask fields and use those > instead of hardcoding numbers. > > Acked-by: Nathan Lynch > Signed-off-by: Naveen N. Rao Series applied to powerpc next, thanks.

[PATCH] kexec: add generic support for elf kernel images

2019-07-07 Thread Sven Schnelle
Signed-off-by: Sven Schnelle --- arch/Kconfig | 3 + arch/powerpc/Kconfig | 1 + arch/powerpc/kernel/kexec_elf_64.c | 547 + include/linux/kexec.h | 35 ++ kernel/Makefile| 1 +

Re: [PATCH] powerpc: Add barrier_nospec to raw_copy_in_user()

2019-07-07 Thread Michael Ellerman
On Wed, 2019-03-06 at 01:10:38 UTC, Suraj Jitindar Singh wrote: > Commit ddf35cf3764b ("powerpc: Use barrier_nospec in copy_from_user()") > Added barrier_nospec before loading from user-controller pointers. > The intention was to order the load from the potentially user-controlled > pointer vs a

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-07 Thread Michael Ellerman
On Fri, 2019-05-10 at 09:24:48 UTC, Christophe Leroy wrote: > Cache instructions (dcbz, dcbi, dcbf and dcbst) take two registers > that are summed to obtain the target address. Using 'Z' constraint > and '%y0' argument gives GCC the opportunity to use both registers > instead of only one with the

Re: [PATCH 1/3] powerpc/book3s: Use config independent helpers for page table walk

2019-07-07 Thread Michael Ellerman
On Tue, 2019-05-14 at 06:03:00 UTC, "Aneesh Kumar K.V" wrote: > Even when we have HugeTLB and THP disabled, kernel linear map can still be > mapped with hugepages. This is only an issue with radix translation because > hash > MMU doesn't map kernel linear range in linux page table and other

Re: [PATCH v3 01/10] powerpc/8xx: move CPM1 related files from sysdev/ to platforms/8xx

2019-07-07 Thread Michael Ellerman
On Fri, 2019-06-14 at 06:41:38 UTC, Christophe Leroy wrote: > Only 8xx selects CPM1 and related CONFIG options are already > in platforms/8xx/Kconfig > > Move the related C files to platforms/8xx/. > > Signed-off-by: Christophe Leroy Series applied to powerpc next, thanks.

Re: [PATCH] powerpc/scm: Use a specific endian format for storing uuid from the device tree

2019-07-07 Thread Michael Ellerman
On Fri, 2019-06-07 at 06:47:05 UTC, "Aneesh Kumar K.V" wrote: > We used uuid_parse to convert uuid string from device tree to two u64 > components. We want to make sure we look at the uuid read from device > tree in an endian-neutral fashion. For now, I am picking little-endian > to be format so

Re: [PATCH] powerpc/perf/24x7: use rb_entry

2019-07-07 Thread Michael Ellerman
On Tue, 2016-12-20 at 14:02:17 UTC, Geliang Tang wrote: > To make the code clearer, use rb_entry() instead of container_of() to > deal with rbtree. > > Signed-off-by: Geliang Tang Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/c197922f0a8072d286dff8001f8ad0d4b95ec1dd cheers

Re: [PATCH] arch: powerpc: Kconfig: pedantic formatting

2019-07-07 Thread Michael Ellerman
On Wed, 2019-07-03 at 16:04:13 UTC, "Enrico Weigelt, metux IT consult" wrote: > Formatting of Kconfig files doesn't look so pretty, so let the > Great White Handkerchief come around and clean it up. > > Also convert "---help---" as requested on lkml. > > Signed-off-by: Enrico Weigelt, metux IT

Re: [PATCH] mm/kprobes: Add generic kprobe_fault_handler() fallback definition

2019-07-07 Thread Anshuman Khandual
On 07/05/2019 04:00 PM, Masami Hiramatsu wrote: > Hi Anshuman, Hello Masami, > > On Fri, 5 Jul 2019 11:00:29 +0530 > Anshuman Khandual wrote: > >> Architectures like parisc enable CONFIG_KROBES without having a definition >> for kprobe_fault_handler() which results in a build failure. >

Re: [PATCH v2] tpm: tpm_ibm_vtpm: Fix unallocated banks

2019-07-07 Thread Stefan Berger
On 7/6/19 8:18 PM, Nayna Jain wrote: The nr_allocated_banks and allocated banks are initialized as part of tpm_chip_register. Currently, this is done as part of auto startup function. However, some drivers, like the ibm vtpm driver, do not run auto startup during initialization. This results in

Re: [PATCH v3 3/3] powerpc/module64: Use symbolic instructions names.

2019-07-07 Thread Michael Ellerman
Christophe Leroy writes: > To increase readability/maintainability, replace hard coded > instructions values by symbolic names. > > Signed-off-by: Christophe Leroy > --- > v3: fixed warning by adding () in an 'if' around X | Y (unlike said in v2 > history, this change was forgotten in v2) > v2:

Re: [PATCH v9 10/10] selftests: add openat2(2) selftests

2019-07-07 Thread Michael Ellerman
Hi Aleksa, A few minor comments below. Aleksa Sarai writes: > diff --git a/tools/testing/selftests/openat2/Makefile > b/tools/testing/selftests/openat2/Makefile > new file mode 100644 > index ..8235a49928f6 > --- /dev/null > +++ b/tools/testing/selftests/openat2/Makefile > @@ -0,0

Re: [TRIVIAL] [PATCH] powerpc/powernv-eeh: Consisely desribe what this file does

2019-07-07 Thread Michael Ellerman
On Tue, 2019-05-28 at 03:29:25 UTC, Stewart Smith wrote: > If the previous comment made sense, continue debugging or call your > doctor immediately. > > Signed-off-by: Stewart Smith Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/41732bdc9ccd26829cf647711c4b93384e03e529

Re: [PATCH v2 1/3] powerpc/mm: Handle page table allocation failures

2019-07-07 Thread Michael Ellerman
On Tue, 2019-05-28 at 05:36:24 UTC, "Aneesh Kumar K.V" wrote: > This fixes kernel crash that arises due to not handling page table allocation > failures while allocating hugetlb page table. > > Fixes: e2b3d202d1db ("powerpc: Switch 16GB and 16MB explicit hugepages to a > different page table

Re: [PATCH kernel v2] powerpc/pci/of: Parse unassigned resources

2019-07-07 Thread Michael Ellerman
On Wed, 2019-06-26 at 02:37:46 UTC, Alexey Kardashevskiy wrote: > The pseries platform uses the PCI_PROBE_DEVTREE method of PCI probing > which reads "assigned-addresses" of every PCI device and initializes > the device resources. However if the property is missing or zero sized, > then there is

Re: [PATCH kernel] powerpc/powernv: Fix stale iommu table base after VFIO

2019-07-07 Thread Michael Ellerman
On Fri, 2019-06-28 at 06:53:00 UTC, Alexey Kardashevskiy wrote: > The powernv platform uses @dma_iommu_ops for non-bypass DMA. These ops > need an iommu_table pointer which is stored in > dev->archdata.iommu_table_base. It is initialized during > pcibios_setup_device() which handles boot time

Re: [PATCH v2 1/2] powerpc/mm/hash/4k: Don't use 64K page size for vmemmap with 4K pagesize

2019-07-07 Thread Michael Ellerman
On Mon, 2019-07-01 at 14:34:41 UTC, "Aneesh Kumar K.V" wrote: > With hash translation and 4K PAGE_SIZE config, we need to make sure we don't > use 64K page size for vmemmap. > > Signed-off-by: Aneesh Kumar K.V Series applied to powerpc next, thanks.

Re: [PATCH] powerpc/hw_breakpoint: move instruction stepping out of hw_breakpoint_handler()

2019-07-07 Thread Ravi Bangoria
On 7/6/19 1:56 PM, Christophe Leroy wrote: > > > Le 03/07/2019 à 08:20, Ravi Bangoria a écrit : >> >> >> On 6/28/19 9:25 PM, Christophe Leroy wrote: >>> On 8xx, breakpoints stop after executing the instruction, so >>> stepping/emulation is not needed. Move it into a sub-function and >>>

Re: [PATCH] KVM: PPC: Book3S HV: Fix CR0 setting in TM emulation

2019-07-07 Thread Michael Ellerman
On Thu, 2019-06-20 at 06:00:40 UTC, Michael Neuling wrote: > When emulating tsr, treclaim and trechkpt, we incorrectly set CR0. The > code currently sets: > CR0 <- 00 || MSR[TS] > but according to the ISA it should be: > CR0 <- 0 || MSR[TS] || 0 > > This fixes the bit shift to put the

Re: [PATCH] powerpc: Remove unused variable declaration

2019-07-07 Thread Michael Ellerman
On Mon, 2019-07-01 at 14:37:00 UTC, "Aneesh Kumar K.V" wrote: > __kernel_virt_size is not used anymore. > > Signed-off-by: Aneesh Kumar K.V Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/b8c8a524ccad1244916a203ae40292e2786e1b26 cheers