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

2019-04-18 Thread Jerome Glisse
On Tue, Apr 16, 2019 at 03:45:00PM +0200, Laurent Dufour wrote: > From: Peter Zijlstra > > Wrap the VMA modifications (vma_adjust/unmap_page_range) with sequence > counts such that we can easily test if a VMA is changed. > > The calls to vm_write_begin/end() in unmap_page_range() are > used to

Re: [PATCH 0/2] disable NUMA affinity reassignments at runtime

2019-04-18 Thread Nathan Lynch
Michal Suchánek writes: > On Thu, 18 Apr 2019 13:56:56 -0500 > Nathan Lynch wrote: > > Hello, > >> Changing cpu <-> node relationships at runtime, as the pseries >> platform code attempts to do for LPM, PRRN, and VPHN is essentially >> unsupported by core subsystems. [1] > > Wasn't there a

Re: [PATCH v12 08/31] mm: introduce INIT_VMA()

2019-04-18 Thread Jerome Glisse
On Tue, Apr 16, 2019 at 03:44:59PM +0200, Laurent Dufour wrote: > Some VMA struct fields need to be initialized once the VMA structure is > allocated. > Currently this only concerns anon_vma_chain field but some other will be > added to support the speculative page fault. > > Instead of spreading

Re: [PATCH v12 07/31] mm: make pte_unmap_same compatible with SPF

2019-04-18 Thread Jerome Glisse
On Tue, Apr 16, 2019 at 03:44:58PM +0200, Laurent Dufour wrote: > pte_unmap_same() is making the assumption that the page table are still > around because the mmap_sem is held. > This is no more the case when running a speculative page fault and > additional check must be made to ensure that the

Re: [PATCH v12 06/31] mm: introduce pte_spinlock for FAULT_FLAG_SPECULATIVE

2019-04-18 Thread Jerome Glisse
On Tue, Apr 16, 2019 at 03:44:57PM +0200, Laurent Dufour wrote: > When handling page fault without holding the mmap_sem the fetch of the > pte lock pointer and the locking will have to be done while ensuring > that the VMA is not touched in our back. > > So move the fetch and locking operations

Re: [PATCH v12 05/31] mm: prepare for FAULT_FLAG_SPECULATIVE

2019-04-18 Thread Jerome Glisse
On Tue, Apr 16, 2019 at 03:44:56PM +0200, Laurent Dufour wrote: > From: Peter Zijlstra > > When speculating faults (without holding mmap_sem) we need to validate > that the vma against which we loaded pages is still valid when we're > ready to install the new PTE. > > Therefore, replace the

Re: [PATCH RFT V3 8/8] clk: core: replace clk_{readl, writel} with {readl, writel}

2019-04-18 Thread Stephen Boyd
Quoting Jonas Gorski (2019-04-18 04:12:11) > Now that clk_{readl,writel} is just an alias for {readl,writel}, we can > switch all users of clk_* to use the accessors directly and remove the > helpers. > > Signed-off-by: Jonas Gorski > --- Applied to clk-next

Re: [PATCH RFT V3 7/8] clk: core: remove powerpc special handling

2019-04-18 Thread Stephen Boyd
Quoting Jonas Gorski (2019-04-18 04:12:10) > Now that the powerpc clocks are properly marked as big endian, we can > remove the special handling for PowerPC. > > Signed-off-by: Jonas Gorski > --- Applied to clk-next

Re: [PATCH RFT V3 6/8] powerpc/512x: mark clocks as big endian

2019-04-18 Thread Stephen Boyd
Quoting Jonas Gorski (2019-04-18 04:12:09) > These clocks' registers are accessed as big endian, so mark them as > such. > > Signed-off-by: Jonas Gorski > --- Applied to clk-next

Re: [PATCH RFT V3 5/8] clk: mux: add explicit big endian support

2019-04-18 Thread Stephen Boyd
Quoting Jonas Gorski (2019-04-18 04:12:08) > Add a clock specific flag to switch register accesses to big endian, to > allow runtime configuration of big endian mux clocks. > > Signed-off-by: Jonas Gorski > --- Applied to clk-next

Re: [PATCH RFT V3 4/8] clk: multiplier: add explicit big endian support

2019-04-18 Thread Stephen Boyd
Quoting Jonas Gorski (2019-04-18 04:12:07) > Add a clock specific flag to switch register accesses to big endian, to > allow runtime configuration of big endian multiplier clocks. > > Signed-off-by: Jonas Gorski > --- Applied to clk-next

Re: [PATCH RFT V3 3/8] clk: gate: add explicit big endian support

2019-04-18 Thread Stephen Boyd
Quoting Jonas Gorski (2019-04-18 04:12:06) > Add a clock specific flag to switch register accesses to big endian, to > allow runtime configuration of big endian gated clocks. > > Signed-off-by: Jonas Gorski > --- Applied to clk-next

Re: [PATCH v12 04/31] arm64/mm: define ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT

2019-04-18 Thread Jerome Glisse
On Tue, Apr 16, 2019 at 03:41:56PM +0100, Mark Rutland wrote: > On Tue, Apr 16, 2019 at 04:31:27PM +0200, Laurent Dufour wrote: > > Le 16/04/2019 à 16:27, Mark Rutland a écrit : > > > On Tue, Apr 16, 2019 at 03:44:55PM +0200, Laurent Dufour wrote: > > > > From: Mahendran Ganesh > > > > > > > >

Re: [PATCH RFT V3 2/8] clk: fractional-divider: add explicit big endian support

2019-04-18 Thread Stephen Boyd
Quoting Jonas Gorski (2019-04-18 04:12:05) > Add a clock specific flag to switch register accesses to big endian, to > allow runtime configuration of big endian fractional divider clocks. > > Signed-off-by: Jonas Gorski > --- Applied to clk-next

Re: [PATCH RFT V3 1/8] clk: divider: add explicit big endian support

2019-04-18 Thread Stephen Boyd
Quoting Jonas Gorski (2019-04-18 04:12:04) > Add a clock specific flag to switch register accesses to big endian, to > allow runtime configuration of big endian divider clocks. > > Signed-off-by: Jonas Gorski > --- Applied to clk-next

Re: [PATCH v12 03/31] powerpc/mm: set ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT

2019-04-18 Thread Jerome Glisse
On Tue, Apr 16, 2019 at 03:44:54PM +0200, Laurent Dufour wrote: > Set ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT for BOOK3S_64. This enables > the Speculative Page Fault handler. > > Support is only provide for BOOK3S_64 currently because: > - require CONFIG_PPC_STD_MMU because checks done in >

Re: [PATCH v12 02/31] x86/mm: define ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT

2019-04-18 Thread Jerome Glisse
On Tue, Apr 16, 2019 at 03:44:53PM +0200, Laurent Dufour wrote: > Set ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT which turns on the > Speculative Page Fault handler when building for 64bit. > > Cc: Thomas Gleixner > Signed-off-by: Laurent Dufour I think this patch should be move as last patch in the

Re: [PATCH v12 01/31] mm: introduce CONFIG_SPECULATIVE_PAGE_FAULT

2019-04-18 Thread Jerome Glisse
On Tue, Apr 16, 2019 at 03:44:52PM +0200, Laurent Dufour wrote: > This configuration variable will be used to build the code needed to > handle speculative page fault. > > By default it is turned off, and activated depending on architecture > support, ARCH_HAS_PTE_SPECIAL, SMP and MMU. > > The

Re: [PATCH 0/2] disable NUMA affinity reassignments at runtime

2019-04-18 Thread Michal Suchánek
On Thu, 18 Apr 2019 13:56:56 -0500 Nathan Lynch wrote: Hello, > Changing cpu <-> node relationships at runtime, as the pseries > platform code attempts to do for LPM, PRRN, and VPHN is essentially > unsupported by core subsystems. [1] Wasn't there a patch that solves the discrepancy by

Re: [PATCH V2] ASoC: fsl_esai: Add pm runtime function

2019-04-18 Thread Nicolin Chen
On Thu, Apr 18, 2019 at 11:34:15AM +, S.j. Wang wrote: > Add pm runtime support and move clock handling there. > fsl_esai_suspend is replaced by pm_runtime_force_suspend. > fsl_esai_resume is replaced by pm_runtime_force_resume. The change looks fine, yet I'd prefer to have a good

Re: [PATCH V3 1/2] ASoC: fsl_asrc: replace the process_option table with function

2019-04-18 Thread Nicolin Chen
On Thu, Apr 18, 2019 at 09:37:06AM +, S.j. Wang wrote: > > > > And this is according to IMX6DQRM: > > > > Limited support for the case when output sampling rates is > > > > between 8kHz and 30kHz. The limitation is the supported ratio > > > > (Fsin/Fsout) range as between 1/24 to 8

[PATCH 2/2] powerpc/numa: document topology_updates_enabled, disable by default

2019-04-18 Thread Nathan Lynch
Changing the NUMA associations for CPUs and memory at runtime is basically unsupported by the core mm, scheduler etc. We see all manner of crashes, warnings and instability when the pseries code tries to do this. Disable this behavior by default, and document the switch a bit. Signed-off-by:

[PATCH 0/2] disable NUMA affinity reassignments at runtime

2019-04-18 Thread Nathan Lynch
Changing cpu <-> node relationships at runtime, as the pseries platform code attempts to do for LPM, PRRN, and VPHN is essentially unsupported by core subsystems. [1] While more significant changes (i.e. discarding all that code) likely are in store, these patches are a minimally invasive way to

[PATCH 1/2] powerpc/numa: improve control of topology updates

2019-04-18 Thread Nathan Lynch
When booted with "topology_updates=no", or when "off" is written to /proc/powerpc/topology_updates, NUMA reassignments are inhibited for PRRN and VPHN events. However, migration and suspend unconditionally re-enable reassignments via start_topology_update(). This is incoherent. Check the

Re: Linux 5.1-rc5

2019-04-18 Thread Martin Schwidefsky
On Thu, 18 Apr 2019 08:49:32 -0700 Linus Torvalds wrote: > On Thu, Apr 18, 2019 at 1:02 AM Martin Schwidefsky > wrote: > > > > The problematic lines in the generic gup code are these three: > > > > 1845: pmdp = pmd_offset(, addr); > > 1888: pudp = pud_offset(, addr); > > 1916: p4dp =

Re: Linux 5.1-rc5

2019-04-18 Thread Linus Torvalds
On Thu, Apr 18, 2019 at 1:02 AM Martin Schwidefsky wrote: > > The problematic lines in the generic gup code are these three: > > 1845: pmdp = pmd_offset(, addr); > 1888: pudp = pud_offset(, addr); > 1916: p4dp = p4d_offset(, addr); > > Passing the pointer of a *copy* of a page table entry

Re: [PATCH] crypto: powerpc - convert to use crypto_simd_usable()

2019-04-18 Thread Herbert Xu
On Fri, Apr 12, 2019 at 10:33:12PM -0700, Eric Biggers wrote: > From: Eric Biggers > > Replace all calls to in_interrupt() in the PowerPC crypto code with > !crypto_simd_usable(). This causes the crypto self-tests to test the > no-SIMD code paths when CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y. > >

Re: [PATCH] Linux: Define struct termios2 in under _GNU_SOURCE [BZ #10339]

2019-04-18 Thread hpa
On April 18, 2019 4:09:07 AM PDT, Adhemerval Zanella wrote: > > >On 17/04/2019 19:04, H. Peter Anvin wrote: >> On 4/15/19 10:22 AM, Adhemerval Zanella wrote: New interfaces are only necessary for the handful of architectures >that don't have the speed fields *and* to space to put them

Re: [PATCH] drivers: cpuidle: This patch fix the following checkpatch warning.

2019-04-18 Thread Rafael J. Wysocki
On Wednesday, April 17, 2019 4:52:34 PM CEST Mohan Kumar wrote: > Use pr_debug instead of printk > > WARNING: Prefer [subsystem eg: netdev]_dbg([subsystem]dev, ... then > dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ... > > Signed-off-by: Mohan Kumar > --- >

[PATCH v6 0/1] iommu: enhance IOMMU dma mode build options

2019-04-18 Thread Zhen Lei
v5 --> v6: 1. give up adding boot option iommu.dma_mode v4 --> v5: As Hanjun and Thomas Gleixner's suggestion: 1. Keep the old ARCH specific boot options no change. 2. Keep build option CONFIG_IOMMU_DEFAULT_PASSTHROUGH no change. v4: As Robin Murphy's suggestion: "It's also not necessarily

[PATCH v6 1/1] iommu: enhance IOMMU dma mode build options

2019-04-18 Thread Zhen Lei
First, add build option IOMMU_DEFAULT_{LAZY|STRICT}, so that we have the opportunity to set {lazy|strict} mode as default at build time. Then put the three config options in an choice, make people can only choose one of the three at a time. The default IOMMU dma modes on each ARCHs have no

Re: [PATCH v3 21/21] docs: hwmon: Add an index file and rename docs to *.rst

2019-04-18 Thread Guenter Roeck
On 4/18/19 2:44 AM, Mauro Carvalho Chehab wrote: Em Wed, 17 Apr 2019 10:47:28 -0700 Guenter Roeck escreveu: On Wed, Apr 17, 2019 at 10:43:37AM -0700, Guenter Roeck wrote: On Wed, Apr 17, 2019 at 02:22:15PM -0300, Mauro Carvalho Chehab wrote: Em Wed, 17 Apr 2019 14:13:52 -0300 Mauro Carvalho

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

2019-04-18 Thread Ingo Molnar
* 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 although we need some code fixups. > This commit moves the config entry from

Avoiding merge conflicts while adding new docs - Was: Re: [PATCH 00/57] Convert files to ReST

2019-04-18 Thread Mauro Carvalho Chehab
Jon, Em Mon, 15 Apr 2019 23:55:25 -0300 Mauro Carvalho Chehab escreveu: > I have a separate patch series with do the actual rename and > adjustment of references. I opted to submit this first, as it > sounds easier to merge this way, as each subsystem maintainer > can apply the conversion

[PATCH V2] ASoC: fsl_esai: Add pm runtime function

2019-04-18 Thread S.j. Wang
Add pm runtime support and move clock handling there. fsl_esai_suspend is replaced by pm_runtime_force_suspend. fsl_esai_resume is replaced by pm_runtime_force_resume. Signed-off-by: Shengjiu Wang --- Changes in v2 -refine the commit comments. -move regcache_mark_dirty to runtime suspend.

Re: [PATCH] ASoC: fsl_esai: Add pm runtime function

2019-04-18 Thread S.j. Wang
Hi > On Thu, Apr 18, 2019 at 10:15:24AM +, S.j. Wang wrote: > > > On Thu, Apr 18, 2019 at 02:00:12AM -0700, Nicolin Chen wrote: > > > > On Thu, Apr 18, 2019 at 03:29:09AM +, S.j. Wang wrote: > > > > > Just for curiosity, we had similar situation on imx6sx, so we > > > > added

[PATCH RFT V3 8/8] clk: core: replace clk_{readl, writel} with {readl, writel}

2019-04-18 Thread Jonas Gorski
Now that clk_{readl,writel} is just an alias for {readl,writel}, we can switch all users of clk_* to use the accessors directly and remove the helpers. Signed-off-by: Jonas Gorski --- V2 -> V3: * no actual changes V1 -> V2: * newly added patch drivers/clk/clk-divider.c | 4

[PATCH RFT V3 7/8] clk: core: remove powerpc special handling

2019-04-18 Thread Jonas Gorski
Now that the powerpc clocks are properly marked as big endian, we can remove the special handling for PowerPC. Signed-off-by: Jonas Gorski --- V2 -> V3: * no actual changes V1 -> V2: * no actual changes include/linux/clk-provider.h | 16 1 file changed, 16 deletions(-) diff

[PATCH RFT V3 6/8] powerpc/512x: mark clocks as big endian

2019-04-18 Thread Jonas Gorski
These clocks' registers are accessed as big endian, so mark them as such. Signed-off-by: Jonas Gorski --- V2 -> V3: * slightly rework to avoid a line >80 chars V1 -> V2: * switch from global to local flags arch/powerpc/platforms/512x/clock-commonclk.c | 9 ++--- 1 file changed, 6

[PATCH RFT V3 5/8] clk: mux: add explicit big endian support

2019-04-18 Thread Jonas Gorski
Add a clock specific flag to switch register accesses to big endian, to allow runtime configuration of big endian mux clocks. Signed-off-by: Jonas Gorski --- V2 -> V3: * drop unneeded else in clk_mux_readl V1 -> V2: * switch from global to local flag drivers/clk/clk-mux.c| 22

[PATCH RFT V3 4/8] clk: multiplier: add explicit big endian support

2019-04-18 Thread Jonas Gorski
Add a clock specific flag to switch register accesses to big endian, to allow runtime configuration of big endian multiplier clocks. Signed-off-by: Jonas Gorski --- V2 -> V3: * drop unneeded else in clk_mult_readl V1 -> V2: * switch from global to local flag drivers/clk/clk-multiplier.c | 22

[PATCH RFT V3 3/8] clk: gate: add explicit big endian support

2019-04-18 Thread Jonas Gorski
Add a clock specific flag to switch register accesses to big endian, to allow runtime configuration of big endian gated clocks. Signed-off-by: Jonas Gorski --- V2 -> V3: * drop unneeded else in clk_gate_readl V1 -> V2: * switch from global to local flag drivers/clk/clk-gate.c | 22

[PATCH RFT V3 1/8] clk: divider: add explicit big endian support

2019-04-18 Thread Jonas Gorski
Add a clock specific flag to switch register accesses to big endian, to allow runtime configuration of big endian divider clocks. Signed-off-by: Jonas Gorski --- V2 -> V3: * fix passed arguments to clk_div_readl found by kbuild * drop unneeded else in clk_div_readl V1 -> V2: * switch from

[PATCH RFT V3 2/8] clk: fractional-divider: add explicit big endian support

2019-04-18 Thread Jonas Gorski
Add a clock specific flag to switch register accesses to big endian, to allow runtime configuration of big endian fractional divider clocks. Signed-off-by: Jonas Gorski --- V2 -> V3: * drop unneeded else in clk_fd_readl V1 -> V2: * switch from global to local flag

[PATCH RFT V3 0/8] clk: make register endianness a run-time property

2019-04-18 Thread Jonas Gorski
Currently the endianness for register accesses of basic clocks if fixed based on the architecture (BE for PowerPC, LE for everyone else). This is inconvenient for architectures that support both. To avoid adding more rules to the #ifdef, this patchset adds new flags to the basic clocks to tag the

Re: [PATCH] Linux: Define struct termios2 in under _GNU_SOURCE [BZ #10339]

2019-04-18 Thread Adhemerval Zanella
On 17/04/2019 19:04, H. Peter Anvin wrote: > On 4/15/19 10:22 AM, Adhemerval Zanella wrote: >>> >>> New interfaces are only necessary for the handful of architectures that >>> don't have the speed fields *and* to space to put them in. >> >> Based on your WIP, it seems that both sparc and mips

Re: [PATCH] ASoC: fsl_esai: Add pm runtime function

2019-04-18 Thread S.j. Wang
Hi > > > On Thu, Apr 18, 2019 at 03:29:09AM +, S.j. Wang wrote: > > In imx8 when systerm enter suspend state, the power of subsystem will > > be off, the clock enable state will be lost and register configuration > > Just for curiosity, we had similar situation on imx6sx, so we added >

Re: [PATCH] ASoC: fsl_esai: Add pm runtime function

2019-04-18 Thread Mark Brown
On Thu, Apr 18, 2019 at 10:15:24AM +, S.j. Wang wrote: > > On Thu, Apr 18, 2019 at 02:00:12AM -0700, Nicolin Chen wrote: > > > On Thu, Apr 18, 2019 at 03:29:09AM +, S.j. Wang wrote: > > > Just for curiosity, we had similar situation on imx6sx, so we added > > > suspend/resume with

Re: [PATCH] ASoC: fsl_esai: Add pm runtime function

2019-04-18 Thread S.j. Wang
Hi > > On Thu, Apr 18, 2019 at 02:00:12AM -0700, Nicolin Chen wrote: > > On Thu, Apr 18, 2019 at 03:29:09AM +, S.j. Wang wrote: > > > > In imx8 when systerm enter suspend state, the power of subsystem > > > will be off, the clock enable state will be lost and register > > > configuration >

Re: [PATCH 6/8] powerpc/eeh: Initialize EEH address cache earlier

2019-04-18 Thread Oliver O'Halloran
On Wed, 2019-03-20 at 13:58 +1100, Sam Bobroff wrote: > The EEH address cache is currently initialized and populated by a > single function: eeh_addr_cache_build(). While the initial population > of the cache can only be done once resources are allocated, > initialization (just setting up a

Re: [PATCH 5/8] powerpc/eeh: Add eeh_show_enabled()

2019-04-18 Thread Oliver O'Halloran
On Wed, 2019-03-20 at 13:58 +1100, Sam Bobroff wrote: > Move the EEH enabled message into it's own function so that future > work can call it from multiple places. > > Signed-off-by: Sam Bobroff > --- > arch/powerpc/include/asm/eeh.h | 3 +++ > arch/powerpc/kernel/eeh.c | 16

Re: [PATCH 3/8] powerpc/eeh: Convert PNV_PHB_FLAG_EEH to global flag

2019-04-18 Thread Oliver O'Halloran
On Wed, 2019-03-20 at 13:58 +1100, Sam Bobroff wrote: > The PHB flag, PNV_PHB_FLAG_EEH, is set (on PowerNV) individually on > each PHB once the EEH subsystem is ready. It is the only use of the > flags member of the phb struct. > > However there is no need to store this separately on each PHB, so

Re: [PATCH v3 21/21] docs: hwmon: Add an index file and rename docs to *.rst

2019-04-18 Thread Mauro Carvalho Chehab
Em Wed, 17 Apr 2019 10:47:28 -0700 Guenter Roeck escreveu: > On Wed, Apr 17, 2019 at 10:43:37AM -0700, Guenter Roeck wrote: > > On Wed, Apr 17, 2019 at 02:22:15PM -0300, Mauro Carvalho Chehab wrote: > > > Em Wed, 17 Apr 2019 14:13:52 -0300 > > > Mauro Carvalho Chehab escreveu: > > > > > >

Re: [PATCH V3 1/2] ASoC: fsl_asrc: replace the process_option table with function

2019-04-18 Thread S.j. Wang
Hi > > On Thu, Apr 18, 2019 at 08:50:48AM +, S.j. Wang wrote: > > > And this is according to IMX6DQRM: > > > Limited support for the case when output sampling rates is > > > between 8kHz and 30kHz. The limitation is the supported ratio > > > (Fsin/Fsout) range as between 1/24 to

Re: [PATCH] ASoC: fsl_esai: Add pm runtime function

2019-04-18 Thread Mark Brown
On Thu, Apr 18, 2019 at 02:00:12AM -0700, Nicolin Chen wrote: > On Thu, Apr 18, 2019 at 03:29:09AM +, S.j. Wang wrote: > > In imx8 when systerm enter suspend state, the power of subsystem will > > be off, the clock enable state will be lost and register configuration > Just for curiosity, we

Re: [PATCH V3 1/2] ASoC: fsl_asrc: replace the process_option table with function

2019-04-18 Thread Nicolin Chen
On Thu, Apr 18, 2019 at 08:50:48AM +, S.j. Wang wrote: > > And this is according to IMX6DQRM: > > Limited support for the case when output sampling rates is > > between 8kHz and 30kHz. The limitation is the supported ratio > > (Fsin/Fsout) range as between 1/24 to 8 > > > > This

Re: [PATCH RFT V2 1/8] clk: divider: add explicit big endian support

2019-04-18 Thread Jonas Gorski
On Thu, 18 Apr 2019 at 01:32, Stephen Boyd wrote: > > Quoting Jonas Gorski (2019-04-15 03:10:39) > > @@ -370,7 +388,7 @@ static long clk_divider_round_rate(struct clk_hw *hw, > > unsigned long rate, > > if (divider->flags & CLK_DIVIDER_READ_ONLY) { > > u32 val; > > > > -

Re: [PATCH] ASoC: fsl_esai: Add pm runtime function

2019-04-18 Thread Nicolin Chen
On Thu, Apr 18, 2019 at 03:29:09AM +, S.j. Wang wrote: > In imx8 when systerm enter suspend state, the power of subsystem will > be off, the clock enable state will be lost and register configuration Just for curiosity, we had similar situation on imx6sx, so we added suspend/resume with

Re: [PATCH V3 1/2] ASoC: fsl_asrc: replace the process_option table with function

2019-04-18 Thread S.j. Wang
Hi > > > On Thu, Apr 18, 2019 at 02:37:03AM +, S.j. Wang wrote: > > > Here: > > > > + /* Does not support cases: Tsout > 8.125 * Tsin */ > > > > + if (inrate * 8 > 65 * outrate) > > Though it might not matter any more (see my last comments), it should be > "inrate > 8.125 *

Re: [PATCH V3 1/2] ASoC: fsl_asrc: replace the process_option table with function

2019-04-18 Thread Nicolin Chen
On Thu, Apr 18, 2019 at 02:37:03AM +, S.j. Wang wrote: > > Here: > > > + /* Does not support cases: Tsout > 8.125 * Tsin */ > > > + if (inrate * 8 > 65 * outrate) Though it might not matter any more (see my last comments), it should be "inrate > 8.125 * outrate" in the comments. > >

Re: Linux 5.1-rc5

2019-04-18 Thread Martin Schwidefsky
On Wed, 17 Apr 2019 09:57:01 -0700 Linus Torvalds wrote: > On Wed, Apr 17, 2019 at 1:02 AM Martin Schwidefsky > wrote: > > > > Grumpf, that does *not* work. For gup the table entries may be read only > > once. Now I remember why I open-coded p4d_offset, pud_offset and pmd_offset > > in

Re: [PATCH v2 10/10] powerpc/32s: Implement Kernel Userspace Access Protection

2019-04-18 Thread Michael Ellerman
Christophe Leroy writes: > diff --git a/arch/powerpc/include/asm/book3s/32/kup.h > b/arch/powerpc/include/asm/book3s/32/kup.h > index 5f97c742ca71..b3560b2de435 100644 > --- a/arch/powerpc/include/asm/book3s/32/kup.h > +++ b/arch/powerpc/include/asm/book3s/32/kup.h > @@ -37,6 +37,113 @@ ... > +

Re: [PATCH v2 07/10] powerpc/8xx: Add Kernel Userspace Access Protection

2019-04-18 Thread Michael Ellerman
Christophe Leroy writes: > diff --git a/arch/powerpc/include/asm/nohash/32/kup-8xx.h > b/arch/powerpc/include/asm/nohash/32/kup-8xx.h > new file mode 100644 > index ..a44cc6c1b901 > --- /dev/null > +++ b/arch/powerpc/include/asm/nohash/32/kup-8xx.h > @@ -0,0 +1,68 @@ > +/*

[PATCH v6 10/10] powerpc/mm: Detect bad KUAP faults

2019-04-18 Thread Michael Ellerman
When KUAP is enabled we have logic to detect page faults that occur outside of a valid user access region and are blocked by the AMR. What we don't have at the moment is logic to detect a fault *within* a valid user access region, that has been incorrectly blocked by AMR. This is not meant to

[PATCH v6 09/10] powerpc/64s: Implement KUAP for Radix MMU

2019-04-18 Thread Michael Ellerman
Kernel Userspace Access Prevention utilises a feature of the Radix MMU which disallows read and write access to userspace addresses. By utilising this, the kernel is prevented from accessing user data from outside of trusted paths that perform proper safety checks, such as copy_{to/from}_user()

[PATCH v6 08/10] powerpc/lib: Refactor __patch_instruction() to use __put_user_asm()

2019-04-18 Thread Michael Ellerman
From: Russell Currey __patch_instruction() is called in early boot, and uses __put_user_size(), which includes the allow/prevent calls to enforce KUAP, which could either be called too early, or in the Radix case, forced to use "early_" versions of functions just to safely handle this one case.

[PATCH v6 07/10] powerpc/mm/radix: Use KUEP API for Radix MMU

2019-04-18 Thread Michael Ellerman
From: Russell Currey Execution protection already exists on radix, this just refactors the radix init to provide the KUEP setup function instead. Thus, the only functional change is that it can now be disabled. Signed-off-by: Russell Currey Signed-off-by: Michael Ellerman --- v6:

[PATCH v6 06/10] powerpc/64: Setup KUP on secondary CPUs

2019-04-18 Thread Michael Ellerman
From: Russell Currey Some platforms (i.e. Radix MMU) need per-CPU initialisation for KUP. Any platforms that only want to do KUP initialisation once globally can just check to see if they're running on the boot CPU, or check if whatever setup they need has already been performed. Note that

[PATCH v6 03/10] powerpc: Add framework for Kernel Userspace Protection

2019-04-18 Thread Michael Ellerman
From: Christophe Leroy This patch adds a skeleton for Kernel Userspace Protection functionnalities like Kernel Userspace Access Protection and Kernel Userspace Execution Prevention The subsequent implementation of KUAP for radix makes use of a MMU feature in order to patch out assembly when

[PATCH v6 04/10] powerpc: Add skeleton for Kernel Userspace Execution Prevention

2019-04-18 Thread Michael Ellerman
From: Christophe Leroy This patch adds a skeleton for Kernel Userspace Execution Prevention. Then subarches implementing it have to define CONFIG_PPC_HAVE_KUEP and provide setup_kuep() function. Signed-off-by: Christophe Leroy [mpe: Don't split strings, use pr_crit_ratelimited()]

[PATCH v6 02/10] powerpc/powernv/idle: Restore AMR/UAMOR/AMOR after idle

2019-04-18 Thread Michael Ellerman
In order to implement KUAP (Kernel Userspace Access Protection) on Power9 we will be using the AMR, and therefore indirectly the UAMOR/AMOR. So save/restore these regs in the idle code. Signed-off-by: Michael Ellerman --- v6: Unchanged. v5: Unchanged. v4: New. ---

[PATCH v6 01/10] powerpc/powernv/idle: Restore IAMR after idle

2019-04-18 Thread Michael Ellerman
From: Russell Currey Without restoring the IAMR after idle, execution prevention on POWER9 with Radix MMU is overwritten and the kernel can freely execute userspace without faulting. This is necessary when returning from any stop state that modifies user state, as well as hypervisor state. To

[PATCH v6 05/10] powerpc: Add a framework for Kernel Userspace Access Protection

2019-04-18 Thread Michael Ellerman
From: Christophe Leroy This patch implements a framework for Kernel Userspace Access Protection. Then subarches will have the possibility to provide their own implementation by providing setup_kuap() and allow/prevent_user_access(). Some platforms will need to know the area accessed and

Re: [PATCH V32 01/27] Add the ability to lock down access to the running kernel image

2019-04-18 Thread Daniel Axtens
Hi Andrew, >> +If CONFIG_LOCK_DOWN_KERNEL is enabled, the kernel can be >> +moved to a more locked down state at runtime by writing to >> +this attribute. Valid values are: >> + >> +integrity: >> +The kernel will disable