Re: [PATCH v2 11/11] compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING

2019-04-22 Thread Borislav Petkov
On Fri, Apr 19, 2019 at 06:47:54PM +0900, Masahiro Yamada wrote: > Commit 60a3cdd06394 ("x86: add optimized inlining") introduced > CONFIG_OPTIMIZE_INLINING, but it has been available only for x86. > > The idea is obviously arch-agnostic. This commit moves the config > entry from arch/x86/Kconfig.

Re: [PATCH 2/2] ASoC: fsl: Move clock operation to PM runtime

2019-04-22 Thread Viorel Suman
Hi Nicolin, On Sb, 2019-04-20 at 22:54 -0700, Nicolin Chen wrote: > On Sat, Apr 20, 2019 at 03:59:05PM +, Daniel Baluta wrote: > > > > Turn off/on clocks when device enters suspend/resume. This > > helps saving power. > > > > @@ -934,6 +933,25 @@ static int fsl_sai_runtime_suspend(struct dev

Re: [PATCH 3/3 v3] ASoC: fsl_sai: Move clock operation to PM runtime

2019-04-22 Thread Viorel Suman
Hi Daniel, On Du, 2019-04-21 at 19:39 +, Daniel Baluta wrote: > From: Shengjiu Wang > > Turn off/on clocks when device enters suspend/resume. This > can help saving power. > > As a further optimization, we turn off/on mclk only when SAI > is in master mode because otherwise mclk is external

Re: [alsa-devel] [PATCH 3/3 v3] ASoC: fsl_sai: Move clock operation to PM runtime

2019-04-22 Thread Daniel Baluta
On Mon, Apr 22, 2019 at 2:07 PM Viorel Suman wrote: > > Hi Daniel, > > On Du, 2019-04-21 at 19:39 +, Daniel Baluta wrote: > > From: Shengjiu Wang > > > > Turn off/on clocks when device enters suspend/resume. This > > can help saving power. > > > > As a further optimization, we turn off/on mcl

[PATCH v2 33/79] docs: serial: convert docs to ReST and rename to *.rst

2019-04-22 Thread Mauro Carvalho Chehab
The converted files are focused at the Kernel internal API, so, this is a good candidate for the kernel API set of books. The conversion is actually: - add blank lines and identation in order to identify paragraphs; - fix tables markups; - add some lists markups; - mark literal blocks; -

[PATCH v2 26/79] docs: powerpc: convert docs to ReST and rename to *.rst

2019-04-22 Thread Mauro Carvalho Chehab
Convert docs to ReST and add them to the arch-specific book. The conversion here was trivial, as almost every file there was already using an elegant format close to ReST standard. The changes were mostly to mark literal blocks and add a few missing section title identifiers. One note with regar

[PATCH v2 19/79] docs: kdump: convert docs to ReST and rename to *.rst

2019-04-22 Thread Mauro Carvalho Chehab
Convert kdump documentation to ReST and add it to the user faced manual, as the documents are mainly focused on sysadmins that would be enabling kdump. Note: the vmcoreinfo.rst has one very long title on one of its sub-sections: PG_lru|PG_private|PG_swapcache|PG_swapbacked|PG_slab|PG_hwp

Re: [PATCH stable v4.4 00/52] powerpc spectre backports for 4.4

2019-04-22 Thread Diana Madalina Craciun
On 4/21/2019 7:34 PM, Greg KH wrote: > On Mon, Apr 22, 2019 at 12:19:45AM +1000, Michael Ellerman wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> Hi Greg/Sasha, >> >> Please queue up these powerpc patches for 4.4 if you have no objections. > why? Do you, or someone else, really ca

Re: [PATCH stable v4.4 00/52] powerpc spectre backports for 4.4

2019-04-22 Thread Diana Madalina Craciun
Hi Michael, There are some missing NXP Spectre v2 patches. I can send them separately if the series will be accepted. I have merged them, but I did not test them, I was sick today and incapable of doing that. Thanks, Diana On 4/21/2019 5:21 PM, Michael Ellerman wrote: > -BEGIN PGP SIGNED ME

Re: [PATCH v12 09/31] mm: VMA sequence count

2019-04-22 Thread Jerome Glisse
On Fri, Apr 19, 2019 at 05:45:57PM +0200, Laurent Dufour wrote: > Hi Jerome, > > Thanks a lot for reviewing this series. > > Le 19/04/2019 à 00:48, Jerome Glisse a écrit : > > On Tue, Apr 16, 2019 at 03:45:00PM +0200, Laurent Dufour wrote: > > > From: Peter Zijlstra > > > > > > Wrap the VMA mod

Re: [PATCH 1/6] mm: change locked_vm's type from unsigned long to atomic64_t

2019-04-22 Thread Daniel Jordan
On Tue, Apr 16, 2019 at 04:33:51PM -0700, Andrew Morton wrote: Sorry for the delay, I was on vacation all last week. > What's the status of this patchset, btw? > > I have a note here that > powerpc-mmu-drop-mmap_sem-now-that-locked_vm-is-atomic.patch is to be > updated. Yes, the series needs a

Re: [PATCH 2/2] ASoC: fsl: Move clock operation to PM runtime

2019-04-22 Thread Nicolin Chen
On Mon, Apr 22, 2019 at 11:02:22AM +, Viorel Suman wrote: > Hi Nicolin, > > On Sb, 2019-04-20 at 22:54 -0700, Nicolin Chen wrote: > > On Sat, Apr 20, 2019 at 03:59:05PM +, Daniel Baluta wrote: > > > > > > Turn off/on clocks when device enters suspend/resume. This > > > helps saving power.

[PATCH v3 1/3] ASoC: fsl_sai: Update is_slave_mode with correct value

2019-04-22 Thread Daniel Baluta
is_slave_mode defaults to false because sai structure that contains it is kzalloc'ed. Anyhow, if we decide to set the following configuration SAI slave -> SAI master, is_slave_mode will remain set on true altough SAI being master it should be set to false. Fix this by updating is_slave_mode for e

[PATCH v3 3/3] ASoC: fsl_sai: Move clock operation to PM runtime

2019-04-22 Thread Daniel Baluta
From: Shengjiu Wang Turn off/on clocks when device enters suspend/resume. This can help saving power. As a further optimization, we turn off/on mclk only when SAI is in master mode because otherwise mclk is externally provided. Signed-off-by: Shengjiu Wang Signed-off-by: Daniel Baluta --- so

[PATCH v3 2/3] ASoC: fsl_sai: Add support for runtime pm

2019-04-22 Thread Daniel Baluta
Basically the same actions as for system PM, so make use of pm_runtime_force_suspend/pm_runtime_force_resume. Signed-off-by: Shengjiu Wang Signed-off-by: Daniel Baluta --- sound/soc/fsl/fsl_sai.c | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/sound/s

[PATCH v3 0/3] Add runtime PM for SAI digital audio interface

2019-04-22 Thread Daniel Baluta
First patch fixes a bug by correctly setting is_slave_mode, then second patch adds support for runtime PM and finally 3rd patch moves clock handling from startup/shtudown function to runtime PM handlers. Changes since v2: (after Viorel's comments) - no need to check for is_slave_mode when

Re: [PATCH v12 10/31] mm: protect VMA modifications using VMA sequence count

2019-04-22 Thread Jerome Glisse
On Tue, Apr 16, 2019 at 03:45:01PM +0200, Laurent Dufour wrote: > The VMA sequence count has been introduced to allow fast detection of > VMA modification when running a page fault handler without holding > the mmap_sem. > > This patch provides protection against the VMA modification done in : >

Re: [PATCH v12 11/31] mm: protect mremap() against SPF hanlder

2019-04-22 Thread Jerome Glisse
On Tue, Apr 16, 2019 at 03:45:02PM +0200, Laurent Dufour wrote: > If a thread is remapping an area while another one is faulting on the > destination area, the SPF handler may fetch the vma from the RB tree before > the pte has been moved by the other thread. This means that the moved ptes > will o

Re: [PATCH v12 12/31] mm: protect SPF handler against anon_vma changes

2019-04-22 Thread Jerome Glisse
On Tue, Apr 16, 2019 at 03:45:03PM +0200, Laurent Dufour wrote: > The speculative page fault handler must be protected against anon_vma > changes. This is because page_add_new_anon_rmap() is called during the > speculative path. > > In addition, don't try speculative page fault if the VMA don't ha

Re: [PATCH v12 13/31] mm: cache some VMA fields in the vm_fault structure

2019-04-22 Thread Jerome Glisse
On Tue, Apr 16, 2019 at 03:45:04PM +0200, Laurent Dufour wrote: > When handling speculative page fault, the vma->vm_flags and > vma->vm_page_prot fields are read once the page table lock is released. So > there is no more guarantee that these fields would not change in our back. > They will be save

Re: [PATCH v12 14/31] mm/migrate: Pass vm_fault pointer to migrate_misplaced_page()

2019-04-22 Thread Jerome Glisse
On Tue, Apr 16, 2019 at 03:45:05PM +0200, Laurent Dufour wrote: > migrate_misplaced_page() is only called during the page fault handling so > it's better to pass the pointer to the struct vm_fault instead of the vma. > > This way during the speculative page fault path the saved vma->vm_flags > cou

Re: [PATCH v12 15/31] mm: introduce __lru_cache_add_active_or_unevictable

2019-04-22 Thread Jerome Glisse
On Tue, Apr 16, 2019 at 03:45:06PM +0200, Laurent Dufour wrote: > The speculative page fault handler which is run without holding the > mmap_sem is calling lru_cache_add_active_or_unevictable() but the vm_flags > is not guaranteed to remain constant. > Introducing __lru_cache_add_active_or_unevicta

Re: [PATCH v12 16/31] mm: introduce __vm_normal_page()

2019-04-22 Thread Jerome Glisse
On Tue, Apr 16, 2019 at 03:45:07PM +0200, Laurent Dufour wrote: > When dealing with the speculative fault path we should use the VMA's field > cached value stored in the vm_fault structure. > > Currently vm_normal_page() is using the pointer to the VMA to fetch the > vm_flags value. This patch pro

Re: [PATCH v12 17/31] mm: introduce __page_add_new_anon_rmap()

2019-04-22 Thread Jerome Glisse
On Tue, Apr 16, 2019 at 03:45:08PM +0200, Laurent Dufour wrote: > When dealing with speculative page fault handler, we may race with VMA > being split or merged. In this case the vma->vm_start and vm->vm_end > fields may not match the address the page fault is occurring. > > This can only happens

Re: [PATCH v12 18/31] mm: protect against PTE changes done by dup_mmap()

2019-04-22 Thread Jerome Glisse
On Tue, Apr 16, 2019 at 03:45:09PM +0200, Laurent Dufour wrote: > Vinayak Menon and Ganesh Mahendran reported that the following scenario may > lead to thread being blocked due to data corruption: > > CPU 1 CPU 2CPU 3 > Process 1, Process

Re: [PATCH v12 19/31] mm: protect the RB tree with a sequence lock

2019-04-22 Thread Jerome Glisse
On Tue, Apr 16, 2019 at 03:45:10PM +0200, Laurent Dufour wrote: > Introducing a per mm_struct seqlock, mm_seq field, to protect the changes > made in the MM RB tree. This allows to walk the RB tree without grabbing > the mmap_sem, and on the walk is done to double check that sequence counter > was

Re: [PATCH v12 20/31] mm: introduce vma reference counter

2019-04-22 Thread Jerome Glisse
On Tue, Apr 16, 2019 at 03:45:11PM +0200, Laurent Dufour wrote: > The final goal is to be able to use a VMA structure without holding the > mmap_sem and to be sure that the structure will not be freed in our back. > > The lockless use of the VMA will be done through RCU protection and thus a > ded

[PATCH v2 18/79] docs: kbuild: convert docs to ReST and rename to *.rst

2019-04-22 Thread Mauro Carvalho Chehab
The kbuild documentation clearly shows that the documents there are written at different times: some use markdown, some use their own peculiar logic to split sections. Convert everything to ReST without affecting too much the author's style and avoiding adding uneeded markups. The conversion is a

Re: [PATCH] [v2] x86/mpx: fix recursive munmap() corruption

2019-04-22 Thread Yang Shi
On 4/19/19 12:47 PM, Dave Hansen wrote: Changes from v1: * Fix compile errors on UML and non-x86 arches * Clarify commit message and Fixes about the origin of the bug and add the impact to powerpc / uml / unicore32 -- This is a bit of a mess, to put it mildly. But, it's a bug that o

Re: [PATCH v12 21/31] mm: Introduce find_vma_rcu()

2019-04-22 Thread Jerome Glisse
On Tue, Apr 16, 2019 at 03:45:12PM +0200, Laurent Dufour wrote: > This allows to search for a VMA structure without holding the mmap_sem. > > The search is repeated while the mm seqlock is changing and until we found > a valid VMA. > > While under the RCU protection, a reference is taken on the V

Re: [PATCH v12 22/31] mm: provide speculative fault infrastructure

2019-04-22 Thread Jerome Glisse
On Tue, Apr 16, 2019 at 03:45:13PM +0200, Laurent Dufour wrote: > From: Peter Zijlstra > > Provide infrastructure to do a speculative fault (not holding > mmap_sem). > > The not holding of mmap_sem means we can race against VMA > change/removal and page-table destruction. We use the SRCU VMA fre

Re: [PATCH v12 00/31] Speculative page faults

2019-04-22 Thread Michel Lespinasse
Hi Laurent, Thanks a lot for copying me on this patchset. It took me a few days to go through it - I had not been following the previous iterations of this series so I had to catch up. I will be sending comments for individual commits, but before tat I would like to discuss the series as a whole.

Re: [PATCH v12 23/31] mm: don't do swap readahead during speculative page fault

2019-04-22 Thread Jerome Glisse
On Tue, Apr 16, 2019 at 03:45:14PM +0200, Laurent Dufour wrote: > Vinayak Menon faced a panic because one thread was page faulting a page in > swap, while another one was mprotecting a part of the VMA leading to a VMA > split. > This raise a panic in swap_vma_readahead() because the VMA's boundarie

Re: [PATCH kernel RFC 0/2] powerpc/ioda2: An attempt to allow DMA masks between 32 and 59

2019-04-22 Thread Russell Currey
On Fri, 2019-04-12 at 16:44 +1000, Alexey Kardashevskiy wrote: > This is an attempt to allow DMA mask 40 or similar which are not > large > enough to use either a PHB3 bypass mode or a sketchy bypass. > > This is based on sha1 > 582549e3fbe1 Linus Torvalds Merge tag 'for-linus' of > git://git.kern

Re: [PATCH v5 1/6] iommu: add generic boot option iommu.dma_mode

2019-04-22 Thread Leizhen (ThunderTown)
On 2019/4/12 19:16, Joerg Roedel wrote: > On Tue, Apr 09, 2019 at 08:53:03PM +0800, Zhen Lei wrote: >> +static int __init iommu_dma_mode_setup(char *str) >> +{ >> +if (!str) >> +goto fail; >> + >> +if (!strncmp(str, "passthrough", 11)) >> +iommu_default_dma_mode =

[PATCH v3 01/10] arm64: mark (__)cpus_have_const_cap as __always_inline

2019-04-22 Thread Masahiro Yamada
This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for arm64, the following errors are reported: In file included from ././include/linux/compiler_types.h:68, from : ./arch/arm64/include/asm

[PATCH v3 00/10] compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING

2019-04-22 Thread Masahiro Yamada
Major changes in v3: - Fix link error for arch/mips/configs/ci20_defconfig Major changes in v2: - Eliminate more errors and warnings - Delete 'depends on !MIPS' - Split into separate patches Masahiro Yamada (10): arm64: mark (__)cpus_have_const_cap as __always_inline MIPS: mark mult_sh_al

[PATCH v3 02/10] MIPS: mark mult_sh_align_mod() as __always_inline

2019-04-22 Thread Masahiro Yamada
This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for mips, the following error is reported: arch/mips/kernel/cpu-bugs64.c: In function 'mult_sh_align_mod.constprop': arch/mips/kernel/cpu-bugs64.c:33:2: er

[PATCH v3 08/10] powerpc/mm/radix: mark __radix__flush_tlb_range_psize() as __always_inline

2019-04-22 Thread Masahiro Yamada
This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for powerpc, the following error is reported: arch/powerpc/mm/tlb-radix.c: In function '__radix__flush_tlb_range_psize': arch/powerpc/mm/tlb-radix.c:104:2:

[PATCH v3 04/10] mtd: rawnand: vf610_nfc: add initializer to avoid -Wmaybe-uninitialized

2019-04-22 Thread Masahiro Yamada
This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. Kbuild test robot has never reported -Wmaybe-uninitialized warning for this probably because vf610_nfc_run() is inlined by the x86 compiler's inlining heuristic. If CONFIG_

[PATCH v3 03/10] s390/cpacf: mark scpacf_query() as __always_inline

2019-04-22 Thread Masahiro Yamada
This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for s390, the following error is reported: In file included from arch/s390/crypto/des_s390.c:19: ./arch/s390/include/asm/cpacf.h: In function 'cpacf_query'

[PATCH v3 09/10] powerpc/mm/radix: mark as __tlbie_pid() and friends as__always_inline

2019-04-22 Thread Masahiro Yamada
This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for powerpc, the following errors are reported: arch/powerpc/mm/tlb-radix.c: In function '__tlbie_lpid': arch/powerpc/mm/tlb-radix.c:148:2: warning: asm op

[PATCH v3 05/10] MIPS: mark __fls() and __ffs() as __always_inline

2019-04-22 Thread Masahiro Yamada
This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for mips, the following errors are reported: arch/mips/mm/sc-mips.o: In function `mips_sc_prefetch_enable.part.2': sc-mips.c:(.text+0x98): undefined refere

[PATCH v3 06/10] ARM: mark setup_machine_tags() stub as __init __noreturn

2019-04-22 Thread Masahiro Yamada
This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for arm, Clang build results in the following modpost warning: WARNING: vmlinux.o(.text+0x1124): Section mismatch in reference from the function setup_mac

[PATCH v3 07/10] powerpc/prom_init: mark prom_getprop() and prom_getproplen() as __init

2019-04-22 Thread Masahiro Yamada
This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for powerpc, the following modpost warnings are reported: WARNING: vmlinux.o(.text.unlikely+0x20): Section mismatch in reference from the function .prom_g

[PATCH v3 10/10] compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING

2019-04-22 Thread Masahiro Yamada
Commit 60a3cdd06394 ("x86: add optimized inlining") introduced CONFIG_OPTIMIZE_INLINING, but it has been available only for x86. The idea is obviously arch-agnostic. This commit moves the config entry from arch/x86/Kconfig.debug to lib/Kconfig.debug so that all architectures can benefit from it.

Re: [PATCH v2 06/11] MIPS: mark __fls() as __always_inline

2019-04-22 Thread Masahiro Yamada
On Sat, Apr 20, 2019 at 12:45 AM Mathieu Malaterre wrote: > > Hi, > > On Fri, Apr 19, 2019 at 12:06 PM Masahiro Yamada > wrote: > > > > This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common > > place. We need to eliminate potential issues beforehand. > > > > If it is enabled for mip

Re: [PATCH] compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING

2019-04-22 Thread Masahiro Yamada
Hi Christophe, On Tue, Mar 26, 2019 at 3:03 PM Christophe Leroy wrote: > > Hi Masahiro, > > Le 25/03/2019 à 07:44, Masahiro Yamada a écrit : > > Hi Christophe, > > > > > > On Sat, Mar 23, 2019 at 5:27 PM LEROY Christophe > > wrote: > >> > >> Arnd Bergmann a écrit : > >> > >>> On Wed, Mar 20, 20

[RESEND PATCH v3 03/11] MIPS: mark mult_sh_align_mod() as __always_inline

2019-04-22 Thread Masahiro Yamada
This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for mips, the following error is reported: arch/mips/kernel/cpu-bugs64.c: In function 'mult_sh_align_mod.constprop': arch/mips/kernel/cpu-bugs64.c:33:2: er

[RESEND PATCH v3 01/11] ARM: prevent tracing IPI_CPU_BACKTRACE

2019-04-22 Thread Masahiro Yamada
From: Arnd Bergmann When function tracing for IPIs is enabled, we get a warning for an overflow of the ipi_types array with the IPI_CPU_BACKTRACE type as triggered by raise_nmi(): arch/arm/kernel/smp.c: In function 'raise_nmi': arch/arm/kernel/smp.c:489:2: error: array subscript is above array b

[RESEND PATCH v3 00/11] compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING

2019-04-22 Thread Masahiro Yamada
Major changes in v3 RESEND: - I accidentally dropped the first patch. I am resending with the correct patch set. Major changes in v3: - Fix link error for arch/mips/configs/ci20_defconfig Major changes in v2: - Eliminate more errors and warnings - Delete 'depends on !MIPS' - Split into se

[RESEND PATCH v3 04/11] s390/cpacf: mark scpacf_query() as __always_inline

2019-04-22 Thread Masahiro Yamada
This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for s390, the following error is reported: In file included from arch/s390/crypto/des_s390.c:19: ./arch/s390/include/asm/cpacf.h: In function 'cpacf_query'

[RESEND PATCH v3 02/11] arm64: mark (__)cpus_have_const_cap as __always_inline

2019-04-22 Thread Masahiro Yamada
This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for arm64, the following errors are reported: In file included from ././include/linux/compiler_types.h:68, from : ./arch/arm64/include/asm

[RESEND PATCH v3 06/11] MIPS: mark __fls() and __ffs() as __always_inline

2019-04-22 Thread Masahiro Yamada
This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for mips, the following errors are reported: arch/mips/mm/sc-mips.o: In function `mips_sc_prefetch_enable.part.2': sc-mips.c:(.text+0x98): undefined refere

[RESEND PATCH v3 10/11] powerpc/mm/radix: mark as __tlbie_pid() and friends as__always_inline

2019-04-22 Thread Masahiro Yamada
This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for powerpc, the following errors are reported: arch/powerpc/mm/tlb-radix.c: In function '__tlbie_lpid': arch/powerpc/mm/tlb-radix.c:148:2: warning: asm op

[RESEND PATCH v3 07/11] ARM: mark setup_machine_tags() stub as __init __noreturn

2019-04-22 Thread Masahiro Yamada
This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for arm, Clang build results in the following modpost warning: WARNING: vmlinux.o(.text+0x1124): Section mismatch in reference from the function setup_mac

[RESEND PATCH v3 09/11] powerpc/mm/radix: mark __radix__flush_tlb_range_psize() as __always_inline

2019-04-22 Thread Masahiro Yamada
This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for powerpc, the following error is reported: arch/powerpc/mm/tlb-radix.c: In function '__radix__flush_tlb_range_psize': arch/powerpc/mm/tlb-radix.c:104:2:

[RESEND PATCH v3 08/11] powerpc/prom_init: mark prom_getprop() and prom_getproplen() as __init

2019-04-22 Thread Masahiro Yamada
This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. If it is enabled for powerpc, the following modpost warnings are reported: WARNING: vmlinux.o(.text.unlikely+0x20): Section mismatch in reference from the function .prom_g

[RESEND PATCH v3 05/11] mtd: rawnand: vf610_nfc: add initializer to avoid -Wmaybe-uninitialized

2019-04-22 Thread Masahiro Yamada
This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. Kbuild test robot has never reported -Wmaybe-uninitialized warning for this probably because vf610_nfc_run() is inlined by the x86 compiler's inlining heuristic. If CONFIG_

[RESEND PATCH v3 11/11] compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING

2019-04-22 Thread Masahiro Yamada
Commit 60a3cdd06394 ("x86: add optimized inlining") introduced CONFIG_OPTIMIZE_INLINING, but it has been available only for x86. The idea is obviously arch-agnostic. This commit moves the config entry from arch/x86/Kconfig.debug to lib/Kconfig.debug so that all architectures can benefit from it.

powerpc hugepage leak caused by 576ed913 "block: use bio_add_page in bio_iov_iter_get_pages"

2019-04-22 Thread David Gibson
576ed913 "block: use bio_add_page in bio_iov_iter_get_pages", applied late in the 4.19 cycle appears to introduce a regression causing a huge page leak in a complicated set of circumstances I haven't fully identified yet. On a POWER8 machine with a kernel after the commit above, when I run a KVM g