[PATCH v7 10/11] hugetlb: Introduce generic version of huge_ptep_set_access_flags

2018-09-19 Thread Alexandre Ghiti
arm, ia64, sh, x86 architectures use the same version of huge_ptep_set_access_flags, so move this generic implementation into asm-generic/hugetlb.h. Signed-off-by: Alexandre Ghiti Tested-by: Helge Deller # parisc Acked-by: Catalin Marinas # arm64 Acked-by: Paul Burton # MIPS parts Acked-by: In

[PATCH v7 11/11] hugetlb: Introduce generic version of huge_ptep_get

2018-09-19 Thread Alexandre Ghiti
ia64, mips, parisc, powerpc, sh, sparc, x86 architectures use the same version of huge_ptep_get, so move this generic implementation into asm-generic/hugetlb.h. Signed-off-by: Alexandre Ghiti Tested-by: Helge Deller # parisc Acked-by: Catalin Marinas # arm64 Acked-by: Paul Burton # MIPS parts

[PATCH v7 09/11] hugetlb: Introduce generic version of huge_ptep_set_wrprotect

2018-09-19 Thread Alexandre Ghiti
arm, ia64, mips, powerpc, sh, x86 architectures use the same version of huge_ptep_set_wrprotect, so move this generic implementation into asm-generic/hugetlb.h. Signed-off-by: Alexandre Ghiti Tested-by: Helge Deller # parisc Acked-by: Catalin Marinas # arm64 Acked-by: Paul Burton # MIPS parts

[PATCH v7 08/11] hugetlb: Introduce generic version of prepare_hugepage_range

2018-09-19 Thread Alexandre Ghiti
arm, arm64, powerpc, sparc, x86 architectures use the same version of prepare_hugepage_range, so move this generic implementation into asm-generic/hugetlb.h. Signed-off-by: Alexandre Ghiti Tested-by: Helge Deller # parisc Acked-by: Catalin Marinas # arm64 Acked-by: Paul Burton # MIPS parts Ack

[PATCH v7 07/11] hugetlb: Introduce generic version of huge_pte_wrprotect

2018-09-19 Thread Alexandre Ghiti
arm, arm64, ia64, mips, parisc, powerpc, sh, sparc, x86 architectures use the same version of huge_pte_wrprotect, so move this generic implementation into asm-generic/hugetlb.h. Signed-off-by: Alexandre Ghiti Tested-by: Helge Deller # parisc Acked-by: Catalin Marinas # arm64 Acked-by: Paul Burt

[PATCH v7 06/11] hugetlb: Introduce generic version of huge_pte_none

2018-09-19 Thread Alexandre Ghiti
arm, arm64, ia64, mips, parisc, powerpc, sh, sparc, x86 architectures use the same version of huge_pte_none, so move this generic implementation into asm-generic/hugetlb.h. Signed-off-by: Alexandre Ghiti Tested-by: Helge Deller # parisc Acked-by: Catalin Marinas # arm64 Acked-by: Paul Burton #

[PATCH v7 05/11] hugetlb: Introduce generic version of huge_ptep_clear_flush

2018-09-19 Thread Alexandre Ghiti
arm, x86 architectures use the same version of huge_ptep_clear_flush, so move this generic implementation into asm-generic/hugetlb.h. Signed-off-by: Alexandre Ghiti Tested-by: Helge Deller # parisc Acked-by: Catalin Marinas # arm64 Acked-by: Paul Burton # MIPS parts Acked-by: Ingo Molnar # x8

[PATCH v7 04/11] hugetlb: Introduce generic version of huge_ptep_get_and_clear

2018-09-19 Thread Alexandre Ghiti
arm, ia64, sh, x86 architectures use the same version of huge_ptep_get_and_clear, so move this generic implementation into asm-generic/hugetlb.h. Signed-off-by: Alexandre Ghiti Tested-by: Helge Deller # parisc Acked-by: Catalin Marinas # arm64 Acked-by: Paul Burton # MIPS parts Acked-by: Ingo

[PATCH v7 03/11] hugetlb: Introduce generic version of set_huge_pte_at

2018-09-19 Thread Alexandre Ghiti
arm, ia64, mips, powerpc, sh, x86 architectures use the same version of set_huge_pte_at, so move this generic implementation into asm-generic/hugetlb.h. Signed-off-by: Alexandre Ghiti Tested-by: Helge Deller # parisc Acked-by: Catalin Marinas # arm64 Acked-by: Paul Burton # MIPS parts Acked-by

[PATCH v7 02/11] hugetlb: Introduce generic version of hugetlb_free_pgd_range

2018-09-19 Thread Alexandre Ghiti
arm, arm64, mips, parisc, sh, x86 architectures use the same version of hugetlb_free_pgd_range, so move this generic implementation into asm-generic/hugetlb.h. Signed-off-by: Alexandre Ghiti Tested-by: Helge Deller # parisc Acked-by: Catalin Marinas # arm64 Acked-by: Paul Burton # MIPS parts A

[PATCH v7 01/11] hugetlb: Harmonize hugetlb.h arch specific defines with pgtable.h

2018-09-19 Thread Alexandre Ghiti
asm-generic/hugetlb.h proposes generic implementations of hugetlb related functions: use __HAVE_ARCH_HUGE* defines in order to make arch specific implementations of hugetlb functions consistent with pgtable.h scheme. Signed-off-by: Alexandre Ghiti Acked-by: Catalin Marinas # arm64 Reviewed-by: L

[PATCH v7 00/11] hugetlb: Factorize hugetlb architecture primitives

2018-09-19 Thread Alexandre Ghiti
Hi Andrew, As suggested by people who reviewed/acked this series, please consider including this series into -mm tree. In order to reduce copy/paste of functions across architectures and then make riscv hugetlb port (and future ports) simpler and smaller, this patchset int

Re: [PATCH v2 4/5] powerpc: Fix duplicate const clang warning in user access code

2018-09-19 Thread Christophe LEROY
Le 19/09/2018 à 09:45, Joel Stanley a écrit : On Sat, 15 Sep 2018 at 03:27, Nick Desaulniers wrote: On Thu, Sep 13, 2018 at 9:07 PM Joel Stanley wrote: From: Anton Blanchard This re-applies b91c1e3e7a6f which was reverted in f2ca80905929 d466f6c5cac1 f84ed59a612d (powerpc/sparse: Const

[PATCH] powerpc/pkeys: Fix reading of ibm, processor-storage-keys property

2018-09-19 Thread Thiago Jung Bauermann
scan_pkey_feature() uses of_property_read_u32_array() to read the ibm,processor-storage-keys property and calls be32_to_cpu() on the value it gets. The problem is that of_property_read_u32_array() already returns the value converted to the CPU byte order. The value of pkeys_total ends up more or l

Re: [PATCH] powerpc/pseries: Track LMB nid instead of using device tree

2018-09-19 Thread Michael Ellerman
Nathan Fontenot writes: > When removing memory we need to remove the memory from the node > it was added to instead of looking up the node it should be in > in the device tree. > > During testing we have seen scenarios where the affinity for a > LMB changes due to a partition migration or PRRN ev

Re: [PATCH] MAINTAINERS: Add PPC contacts for PCI core error handling

2018-09-19 Thread Sam Bobroff
On Tue, Sep 18, 2018 at 04:58:54PM -0500, Bjorn Helgaas wrote: > On Wed, Sep 12, 2018 at 11:55:26AM -0500, Bjorn Helgaas wrote: > > From: Bjorn Helgaas > > > > The original PCI error recovery functionality was for the powerpc-specific > > IBM EEH feature. PCIe subsequently added some similar fea

Re: [v2] powerpc/configs: Update skiroot defconfig

2018-09-19 Thread Michael Ellerman
On Tue, 2018-09-18 at 03:36:17 UTC, Joel Stanley wrote: > Disable new features from recent releases, and clean out some other > unused options: > > - Enable EXPERT, so we can disable some things > - Disable non-powerpc BPF decoders > - Disable TASKSTATS > - Disable unused syscalls > - Se

Re: powerpc/fadump: re-register firmware-assisted dump if already registered

2018-09-19 Thread Michael Ellerman
On Fri, 2018-09-14 at 14:06:02 UTC, Hari Bathini wrote: > Firmware-Assisted Dump (FADump) needs to be registered again after any > memory hot add/remove operation to update the crash memory ranges. But > currently, the kernel returns '-EEXIST' if we try to register without > uregistering it first.

Re: [01/12] powerpc/64s/hash: Fix stab_rr off by one initialization

2018-09-19 Thread Michael Ellerman
On Fri, 2018-09-14 at 15:30:45 UTC, Nicholas Piggin wrote: > This causes SLB alloation to start 1 beyond the start of the SLB. > There is no real problem because after it wraps it stats behaving > properly, it's just surprisig to see when looking at SLB traces. > > Signed-off-by: Nicholas Piggin

Re: powerpc/pseries: Disable CPU hotplug across migrations

2018-09-19 Thread Michael Ellerman
On Mon, 2018-09-17 at 19:14:02 UTC, Nathan Fontenot wrote: > When performing partition migrations all present CPUs must be online > as all present CPUs must make the H_JOIN call as part of the migration > process. Once all present CPUs make the H_JOIN call, one CPU is returned > to make the rtas ca

Re: [1/3] powerpc: remove old GCC version checks

2018-09-19 Thread Michael Ellerman
On Fri, 2018-09-14 at 05:08:52 UTC, Nicholas Piggin wrote: > GCC 4.6 is the minimum supported now. > > Signed-off-by: Nicholas Piggin > Reviewed-by: Joel Stanley Series applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/f2910f0e6835339e6ce82cef22fa15 cheers

Re: [v2, 4/5] powerpc: Fix duplicate const clang warning in user access code

2018-09-19 Thread Michael Ellerman
On Fri, 2018-09-14 at 04:06:48 UTC, Joel Stanley wrote: > From: Anton Blanchard > > This re-applies b91c1e3e7a6f which was reverted in f2ca80905929 > d466f6c5cac1 f84ed59a612d (powerpc/sparse: Constify the address pointer > ..."). > > We see a large number of duplicate const errors in the user a

Re: [v2,3/5] powerpc/boot: Ensure _zimage_start is a weak symbol

2018-09-19 Thread Michael Ellerman
On Fri, 2018-09-14 at 04:06:47 UTC, Joel Stanley wrote: > When building with clang crt0's _zimage_start is not marked weak, which > breaks the build when linking the kernel image: > > $ objdump -t arch/powerpc/boot/crt0.o |grep _zimage_start$ > 0058 g .text _z

Re: PowerPC/VDSO: Correct call frame information

2018-09-19 Thread Michael Ellerman
On Fri, 2018-09-14 at 03:40:04 UTC, Alan Modra wrote: > Call Frame Information is used by gdb for back-traces and inserting > breakpoints on function return for the "finish" command. This failed > when inside __kernel_clock_gettime. More concerning than difficulty > debugging is that CFI is also

Re: [v2] selftests/powerpc: Do not fail with reschedule

2018-09-19 Thread Michael Ellerman
On Wed, 2018-09-12 at 20:31:05 UTC, Breno Leitao wrote: > There are cases where the test is not expecting to have the transaction > aborted, but, the test process might have been rescheduled, either in the > OS level or by KVM (if it is running on a KVM guest machine). The process > reschedule will

Re: [v10,1/5] powerpc/pseries: Define MCE error event section.

2018-09-19 Thread Michael Ellerman
On Tue, 2018-09-11 at 14:26:52 UTC, Mahesh J Salgaonkar wrote: > From: Mahesh Salgaonkar > > On pseries, the machine check error details are part of RTAS extended > event log passed under Machine check exception section. This patch adds > the definition of rtas MCE event section and related helpe

Re: powerpc/tm: Fix HFSCR bit for no suspend case

2018-09-19 Thread Michael Ellerman
On Tue, 2018-09-11 at 03:07:56 UTC, Michael Neuling wrote: > Currently on P9N DD2.1 we end up taking infinite TM facility > unavailable exceptions on the first TM usage by userspace. > > In the special case of TM no suspend (P9N DD2.1), Linux is told TM is > off via CPU dt-ftrs but told to (partia

Re: [v5,1/2] powerpc/pseries: Remove prrn_work workqueue

2018-09-19 Thread Michael Ellerman
On Mon, 2018-09-10 at 14:57:00 UTC, Nathan Fontenot wrote: > When a PRRN event is received we are already running in a worker > thread. Instead of spawning off another worker thread on the prrn_work > workqueue to handle the PRRN event we can just call the PRRN handler > routine directly. > > With

Re: [1/2] powerpc/prom: Remove VLA in prom_check_platform_support()

2018-09-19 Thread Michael Ellerman
On Wed, 2018-09-05 at 02:09:50 UTC, Suraj Jitindar Singh wrote: > In prom_check_platform_support() we retrieve and parse the > "ibm,arch-vec-5-platform-support" property of the chosen node. > Currently we use a variable length array however to avoid this use an > array of constant length 8. > > Th

Re: [v2] powerpc/xive: Avoid unitialized variable

2018-09-19 Thread Michael Ellerman
On Thu, 2018-08-23 at 23:26:39 UTC, Breno Leitao wrote: > From: Breno Leitao > > Function xive_native_get_ipi() might uses chip_id without it being > initialized. > > This gives the following error on 'smatch' tool: > > error: uninitialized symbol 'chip_id' > > The suggestion is using xc

Re: powerpc/iommu: avoid derefence before pointer check

2018-09-19 Thread Michael Ellerman
On Tue, 2018-08-21 at 18:44:48 UTC, Breno Leitao wrote: > The tbl pointer is being derefenced by IOMMU_PAGE_SIZE prior the check if > it is not NULL. > > Just moving the dereference code to after the check, where there will be > guarantee that 'tbl' will not be NULL. > > CC: Alistair Popple > Si

Re: powerpc/powernv: Don't select the cpufreq governors

2018-09-19 Thread Michael Ellerman
On Tue, 2018-08-21 at 02:14:28 UTC, Joel Stanley wrote: > Deciding wich govenors should be built into the kernel can be left to > users to configure. > > Fixes: 81f359027a3a ("cpufreq: powernv: Select CPUFreq related Kconfig > options for powernv") > Signed-off-by: Joel Stanley Applied to power

Re: powerpc/64: Remove static branch hints from memset()

2018-09-19 Thread Michael Ellerman
On Tue, 2018-08-21 at 01:04:12 UTC, Anton Blanchard wrote: > From: Anton Blanchard > > Static branch hints override dynamic branch prediction on recent > POWER CPUs. We should only use them when we are overwhelmingly > sure of the direction. > > Signed-off-by: Anton Blanchard Applied to powerp

Re: [v2,1/3] powerpc/pseries/mm: Introducing FW_FEATURE_BLOCK_REMOVE

2018-09-19 Thread Michael Ellerman
On Mon, 2018-08-20 at 14:29:34 UTC, Laurent Dufour wrote: > This feature tells if the hcall H_BLOCK_REMOVE is available. > > Cc: "Aneesh Kumar K.V" > Cc: Nicholas Piggin > Cc: Michael Ellerman > Cc: Paul Mackerras > Cc: Benjamin Herrenschmidt > Reviewed-by: Aneesh Kumar K.V > Signed-off-by:

Re: powerpc/memtrace: Remove memory in chunks

2018-09-19 Thread Michael Ellerman
On Fri, 2018-08-17 at 04:25:01 UTC, Rashmica Gupta wrote: > When hot-removing memory release_mem_region_adjustable() splits iomem > resources if they are not the exact size of the memory being > hot-deleted. Adding this memory back to the kernel adds a new resource. > > Eg a node has memory 0x0 -

Re: [V3] ocxl: Fix access to the AFU Descriptor Data

2018-09-19 Thread Michael Ellerman
On Tue, 2018-08-14 at 12:45:15 UTC, Christophe Lombard wrote: > The AFU Information DVSEC capability is a means to extract common, > general information about all of the AFUs associated with a Function > independent of the specific functionality that each AFU provides. > Write in the AFU Index fiel

Re: powerpc/selftests: Wait all threads to join

2018-09-19 Thread Michael Ellerman
On Tue, 2018-07-31 at 20:55:57 UTC, Breno Leitao wrote: > Test tm-tmspr might exit before all threads stop executing, because it just > waits for the very last thread to join before proceeding/exiting. > > This patch makes sure that all threads that were created will join before > proceeding/exiti

Re: [v2,2/4] powerpc/tm: Fix HTM documentation

2018-09-19 Thread Michael Ellerman
On Mon, 2018-06-18 at 22:59:42 UTC, Breno Leitao wrote: > This patch simply fix part of the documentation on the HTM code. > > This fixes reference to old fields that were renamed in commit > 000ec280e3dd ("powerpc: tm: Rename transct_(*) to ck(\1)_state") > > It also documents better the flow af

Re: pseries/memory-hotplug: Only update DT once per memory DLPAR request

2018-09-19 Thread Michael Ellerman
On Fri, 2018-04-20 at 20:29:48 UTC, Nathan Fontenot wrote: > The updates to powerpc numa and memory hotplug code now use the > in-kernel LMB array instead of the device tree. This change > allows the pseries memory DLPAR code to only update the device > tree once after successfully handling a DLPAR

Re: [PATCH net-next] net: toshiba: fix return type of ndo_start_xmit function

2018-09-19 Thread David Miller
From: YueHaibing Date: Wed, 19 Sep 2018 18:23:39 +0800 > The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', > which is a typedef for an enum type, so make sure the implementation in > this driver has returns 'netdev_tx_t' value, and change the function > return type to netdev_t

Re: Checkpatch bad Warning (Re: [PATCH] powerpc/kgdb: add kgdb_arch_set/remove_breakpoint())

2018-09-19 Thread Joe Perches
On Tue, 2018-09-18 at 09:33 +, Christophe Leroy wrote: > On the below patch, checkpatch reports > > WARNING: struct kgdb_arch should normally be const > #127: FILE: arch/powerpc/kernel/kgdb.c:480: > +struct kgdb_arch arch_kgdb_ops; > > But when I add 'const', I get compilation failure So don

[PATCH -next] tty: serial: remove set but not used variable 'error'

2018-09-19 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/tty/serial/pmac_zilog.c: In function 'pmz_receive_chars': drivers/tty/serial/pmac_zilog.c:222:30: warning: variable 'error' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing --- drivers/tty/serial/pmac_zilog.c | 4 +---

Re: [PATCH v2 1/2] sched: move stack_canary field at the top of task_struct

2018-09-19 Thread Michael Ellerman
Christophe LEROY writes: > Le 19/09/2018 à 13:58, Peter Zijlstra a écrit : >> On Wed, Sep 19, 2018 at 11:14:43AM +, Christophe Leroy wrote: >>> In order to allow the use of non global stack protector canary, >>> the stack canary needs to be located at a know offset defined >>> in Makefile via

Re: [PATCH] MAINTAINERS: Add PPC contacts for PCI core error handling

2018-09-19 Thread Michael Ellerman
Bjorn Helgaas writes: > On Wed, Sep 12, 2018 at 11:55:26AM -0500, Bjorn Helgaas wrote: >> From: Bjorn Helgaas >> >> The original PCI error recovery functionality was for the powerpc-specific >> IBM EEH feature. PCIe subsequently added some similar features, including >> AER and DPC, that can be

Re: [PATCH] MAINTAINERS: Add PPC contacts for PCI core error handling

2018-09-19 Thread Bjorn Helgaas
On Wed, Sep 19, 2018 at 11:49:26AM +1000, Russell Currey wrote: > On Tue, 2018-09-18 at 16:58 -0500, Bjorn Helgaas wrote: > > On Wed, Sep 12, 2018 at 11:55:26AM -0500, Bjorn Helgaas wrote: > > > From: Bjorn Helgaas > > > > > > The original PCI error recovery functionality was for the powerpc-spec

Re: [PATCH net-next] net: toshiba: fix return type of ndo_start_xmit function

2018-09-19 Thread Geoff Levand
Hi Yue, On 09/19/2018 03:23 AM, YueHaibing wrote: > The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', > which is a typedef for an enum type, so make sure the implementation in > this driver has returns 'netdev_tx_t' value, and change the function > return type to netdev_tx_t.

Re: [PATCH v2 2/2] powerpc/32: add stack protector support

2018-09-19 Thread Segher Boessenkool
On Wed, Sep 19, 2018 at 04:22:52PM +0200, Christophe LEROY wrote: > >It looks like it will be easy to enable on 64 bit as well. > > Will it ? It seems that PPC64 doesn't have r2 pointing to current task > struct, but instead it has r13 pointing to the paca struct. Which means > we should add a c

Re: [PATCH v2 2/2] powerpc/32: add stack protector support

2018-09-19 Thread Christophe LEROY
Le 19/09/2018 à 15:26, Segher Boessenkool a écrit : On Wed, Sep 19, 2018 at 11:14:45AM +, Christophe Leroy wrote: --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -112,6 +112,10 @@ KBUILD_LDFLAGS += -m elf$(BITS)$(LDEMULATION) KBUILD_ARFLAGS+= --target=elf$(BITS)-$

Re: [PATCH v2 2/2] powerpc/32: add stack protector support

2018-09-19 Thread Segher Boessenkool
On Wed, Sep 19, 2018 at 11:14:45AM +, Christophe Leroy wrote: > --- a/arch/powerpc/Makefile > +++ b/arch/powerpc/Makefile > @@ -112,6 +112,10 @@ KBUILD_LDFLAGS += -m elf$(BITS)$(LDEMULATION) > KBUILD_ARFLAGS += --target=elf$(BITS)-$(GNUTARGET) > endif > > +cflags-$(CONFIG_STACKPROTE

Re: [PATCH v2 1/2] sched: move stack_canary field at the top of task_struct

2018-09-19 Thread Peter Zijlstra
On Wed, Sep 19, 2018 at 02:25:00PM +0200, Christophe LEROY wrote: > I have not been able to find a way to define the compilation flags AFTER > building asm-offsets.h, see https://patchwork.ozlabs.org/patch/971521/ > > If you have a suggestion, it is welcomed. Not really; I always get lost in that

Re: [PATCH v2 1/2] sched: move stack_canary field at the top of task_struct

2018-09-19 Thread Christophe LEROY
Le 19/09/2018 à 13:58, Peter Zijlstra a écrit : On Wed, Sep 19, 2018 at 11:14:43AM +, Christophe Leroy wrote: In order to allow the use of non global stack protector canary, the stack canary needs to be located at a know offset defined in Makefile via -mstack-protector-guard-offset. On p

Re: [PATCH v2 1/2] sched: move stack_canary field at the top of task_struct

2018-09-19 Thread Peter Zijlstra
On Wed, Sep 19, 2018 at 11:14:43AM +, Christophe Leroy wrote: > In order to allow the use of non global stack protector canary, > the stack canary needs to be located at a know offset defined > in Makefile via -mstack-protector-guard-offset. > > On powerpc/32, register r2 points to current tas

[PATCH v2 2/2] powerpc/32: add stack protector support

2018-09-19 Thread Christophe Leroy
This functionality was tentatively added in the past (commit 6533b7c16ee5 ("powerpc: Initial stack protector (-fstack-protector) support")) but had to be reverted (commit f2574030b0e3 ("powerpc: Revert the initial stack protector support") because of GCC implementing it differently whether it had b

[PATCH v2 1/2] sched: move stack_canary field at the top of task_struct

2018-09-19 Thread Christophe Leroy
In order to allow the use of non global stack protector canary, the stack canary needs to be located at a know offset defined in Makefile via -mstack-protector-guard-offset. On powerpc/32, register r2 points to current task_struct at all time, the stack_canary located inside task_struct can be use

Re: [RFC PATCH 03/29] mm: remove CONFIG_HAVE_MEMBLOCK

2018-09-19 Thread Mike Rapoport
On Wed, Sep 19, 2018 at 11:45:07AM +0100, Jonathan Cameron wrote: > On Wed, 19 Sep 2018 13:34:57 +0300 > Mike Rapoport wrote: > > > Hi Jonathan, > > > > On Wed, Sep 19, 2018 at 10:04:49AM +0100, Jonathan Cameron wrote: > > > On Wed, 5 Sep 2018 18:59:18 +0300 > > > Mike Rapoport wrote: > > >

Re: [RFC PATCH 03/29] mm: remove CONFIG_HAVE_MEMBLOCK

2018-09-19 Thread Jonathan Cameron
On Wed, 19 Sep 2018 13:34:57 +0300 Mike Rapoport wrote: > Hi Jonathan, > > On Wed, Sep 19, 2018 at 10:04:49AM +0100, Jonathan Cameron wrote: > > On Wed, 5 Sep 2018 18:59:18 +0300 > > Mike Rapoport wrote: > > > > > All architecures use memblock for early memory management. There is no > > >

Re: [RFC PATCH 03/29] mm: remove CONFIG_HAVE_MEMBLOCK

2018-09-19 Thread Mike Rapoport
Hi Jonathan, On Wed, Sep 19, 2018 at 10:04:49AM +0100, Jonathan Cameron wrote: > On Wed, 5 Sep 2018 18:59:18 +0300 > Mike Rapoport wrote: > > > All architecures use memblock for early memory management. There is no need > > for the CONFIG_HAVE_MEMBLOCK configuration option. > > > > Signed-off-b

[PATCH net-next] net: toshiba: fix return type of ndo_start_xmit function

2018-09-19 Thread YueHaibing
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, so make sure the implementation in this driver has returns 'netdev_tx_t' value, and change the function return type to netdev_tx_t. Found by coccinelle. Signed-off-by: YueHaibing --- drive

[PATCH 1/2] iommu: Tidy up window attributes

2018-09-19 Thread Robin Murphy
The external interface to get/set window attributes is already abstracted behind iommu_domain_{get,set}_attr(), so there's no real reason for the internal interface to be different. Since we only have one window-based driver anyway, clean up the core code by just moving the DOMAIN_ATTR_WINDOWS hand

[PATCH 2/2] iommu: Remove .domain_{get,set}_windows

2018-09-19 Thread Robin Murphy
Since these are trivially handled by the .domain_{get,set}_attr callbacks when relevant, we can streamline struct iommu_ops for everyone. Signed-off-by: Robin Murphy --- drivers/iommu/fsl_pamu_domain.c | 125 +--- include/linux/iommu.h | 6 -- 2 files chan

How to define some additional KBUILD_CFLAGS after building include/generated/asm-offsets.h ?

2018-09-19 Thread Christophe Leroy
I'm trying to implement TLS based stack protector in the Linux Kernel. For that I need to give to GCC the offset at which it will find the canary (register r2 is pointing to the current task struct). I have been able to do it with the below patch, but it only works when include/generated/asm-o

[RFC PATCH 3/4] powerpc/pseries: Introduce helpers to change the DTL enable mask

2018-09-19 Thread Naveen N. Rao
In a subsequent patch, we want to be able to change the DTL enable mask globally for all cpus. This conflicts with the current debugfs interface that provides access to the DTL buffer contents. To ensure consistent behavior, we introduce helpers to change the DTL enable mask on either a specific c

Re: [RFC PATCH 03/29] mm: remove CONFIG_HAVE_MEMBLOCK

2018-09-19 Thread Jonathan Cameron
On Wed, 5 Sep 2018 18:59:18 +0300 Mike Rapoport wrote: > All architecures use memblock for early memory management. There is no need > for the CONFIG_HAVE_MEMBLOCK configuration option. > > Signed-off-by: Mike Rapoport Hi Mike, A minor editing issue in here that is stopping boot on arm64 plat

[RFC PATCH 4/4] powerpc/pseries: Introduce dtl_entry tracepoint

2018-09-19 Thread Naveen N. Rao
This tracepoint provides access to the fields of each DTL entry in the Dispatch Trace Log buffer, and is hit when processing the DTL buffer for accounting stolen time. As such, this tracepoint is only available when CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is enabled. Apart from making the DTL entries av

[RFC PATCH 2/4] powerpc/pseries: Do not save the previous DTL mask value

2018-09-19 Thread Naveen N. Rao
When CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is enabled, we always initialize DTL enable mask to DTL_LOG_PREEMPT (0x2). There are no other places where the mask is changed. As such, when reading the DTL log buffer through debugfs, there is no need to save and restore the previous mask value. We don't ne

[RFC PATCH 1/4] powerpc/pseries: Use macros for referring to the DTL enable mask

2018-09-19 Thread Naveen N. Rao
Introduce macros to encode the DTL enable mask fields and use those instead of hardcoding numbers. Signed-off-by: Naveen N. Rao --- arch/powerpc/include/asm/lppaca.h | 11 +++ arch/powerpc/platforms/pseries/dtl.c | 8 +--- arch/powerpc/platforms/pseries/lpar.c | 2 +- arch/

[RFC PATCH 0/4] Add a tracepoint for DTL entries

2018-09-19 Thread Naveen N. Rao
Add a tracepoint for the DTL entries to enable processing the DTL entries via the kernel tracing infrastructure. In addition to that, the tracpoint also exposes where a vcpu was dispatched in a SPLPAR environment, relative to the Power Hypervisor's idea of that vcpu's home node. This is workin

Re: [PATCH v2 4/5] powerpc: Fix duplicate const clang warning in user access code

2018-09-19 Thread Joel Stanley
On Sat, 15 Sep 2018 at 03:27, Nick Desaulniers wrote: > > On Thu, Sep 13, 2018 at 9:07 PM Joel Stanley wrote: > > > > From: Anton Blanchard > > > > This re-applies b91c1e3e7a6f which was reverted in f2ca80905929 > > d466f6c5cac1 f84ed59a612d (powerpc/sparse: Constify the address pointer > > ..."

Re: [PATCH v1 0/6] mm: online/offline_pages called w.o. mem_hotplug_lock

2018-09-19 Thread David Hildenbrand
Am 19.09.18 um 03:22 schrieb Balbir Singh: > On Tue, Sep 18, 2018 at 01:48:16PM +0200, David Hildenbrand wrote: >> Reading through the code and studying how mem_hotplug_lock is to be used, >> I noticed that there are two places where we can end up calling >> device_online()/device_offline() - onlin