Re: [PATCH 5/5] mtd: powernv_flash: Use opal_async_wait_response_interruptible()

2017-07-07 Thread Brian Norris
On Thu, Jun 29, 2017 at 04:54:13PM +1000, Cyril Bur wrote: > The OPAL calls performed in this driver shouldn't be using > opal_async_wait_response() as this performs a wait_event() which, on > long running OPAL calls could result in hung task warnings. wait_event() > also prevents timely signal del

Re: [git pull] vfs.git part 1

2017-07-07 Thread Michael Ellerman
Linus Torvalds writes: > On Fri, Jul 7, 2017 at 8:59 AM, Linus Torvalds > wrote: >> >>> Patch coming. >> >> I'm not seeing a patch, so I did my own. But it's _entirely_ untested. >> Does the attached fix things for you? > > Oh, I see you sent a patch to the list but didn't cc me like in this thr

Re: [git pull] vfs.git part 1

2017-07-07 Thread Michael Ellerman
Linus Torvalds writes: > On Fri, Jul 7, 2017 at 8:59 AM, Linus Torvalds > wrote: >> >> The copy_flock_fields() macro has the arguments in order , >> but all the users seem to do it the other way around. > > Looking more at it, I think I'd also like copy_flock_fields() to take > pointer arguments

Re: [PATCH] powerpc/powernv: Fix local TLB flush for boot and MCE on POWER9

2017-07-07 Thread kbuild test robot
Hi Nicholas, [auto build test ERROR on powerpc/next] [also build test ERROR on v4.12 next-20170707] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Nicholas-Piggin/powerpc-powernv-Fix-local-TLB

[PATCH 2/2] powerpc/mm/radix: Synchronize updates to the process table

2017-07-07 Thread Benjamin Herrenschmidt
When writing to the process table, we need to ensure the store is visible to a subsequent access by the MMU. We assume we never have the PID active while doing the update, so a ptesync/isync pair should hopefully be a big enough hammer for our purpose. Signed-off-by: Benjamin Herrenschmidt --- N

Re: [git pull] vfs.git part 1

2017-07-07 Thread Al Viro
On Fri, Jul 07, 2017 at 10:35:41AM -0700, Linus Torvalds wrote: > Comments? Michael, does this work for your case? Looks sane... > +++ b/fs/fcntl.c > @@ -520,50 +520,50 @@ SYSCALL_DEFINE3(fcntl64, unsigned int, fd, unsigned > int, cmd, > > #ifdef CONFIG_COMPAT > /* careful - don't use anywh

Re: [PATCH 5/5] powernv:idle: Disable LOSE_FULL_CONTEXT states when stop-api fails.

2017-07-07 Thread Gautham R Shenoy
On Fri, Jul 07, 2017 at 01:29:16AM +1000, Nicholas Piggin wrote: > On Wed, 5 Jul 2017 22:08:16 +0530 > "Gautham R. Shenoy" wrote: > > > From: "Gautham R. Shenoy" > > > > Currently, we use the opal call opal_slw_set_reg() to inform the that > > the Sleep-Winkle Engine (SLW) to restore the conte

Re: [git pull] vfs.git part 1

2017-07-07 Thread Linus Torvalds
On Fri, Jul 7, 2017 at 8:59 AM, Linus Torvalds wrote: > > The copy_flock_fields() macro has the arguments in order , > but all the users seem to do it the other way around. Looking more at it, I think I'd also like copy_flock_fields() to take pointer arguments, to match all the code around it (bo

Re: Today's linux-next build fail on powerpc

2017-07-07 Thread Andy Shevchenko
On Thu, Jul 6, 2017 at 9:00 AM, Abdul Haleem wrote: > Hi Luis, > > next-20170705 fails to build on powerpc with below errors. Hi, I had sent a fix yesterday. Had you chance to test it? -- With Best Regards, Andy Shevchenko

Re: [git pull] vfs.git part 1

2017-07-07 Thread Linus Torvalds
On Fri, Jul 7, 2017 at 8:59 AM, Linus Torvalds wrote: > >> Patch coming. > > I'm not seeing a patch, so I did my own. But it's _entirely_ untested. > Does the attached fix things for you? Oh, I see you sent a patch to the list but didn't cc me like in this thread. Hmm. Al - I'd like to add the "

Re: [PATCH v2 2/4] selftests/ftrace: Add a test to probe module functions

2017-07-07 Thread Naveen N. Rao
On 2017/07/03 12:51PM, Masami Hiramatsu wrote: > On Mon, 3 Jul 2017 12:27:33 +0900 > Masami Hiramatsu wrote: > > > On Thu, 29 Jun 2017 19:05:37 +0530 > > "Naveen N. Rao" wrote: > > > > > Add a kprobes test to ensure that we are able to add a probe on a > > > module function using 'p :' format,

Re: [git pull] vfs.git part 1

2017-07-07 Thread Linus Torvalds
On Fri, Jul 7, 2017 at 5:46 AM, Michael Ellerman wrote: > Al Viro writes: > >> >> Switch flock copyin/copyout primitives to copy_{from,to}_user() >> (2017-06-26 23:52:44 -0400) > > This commit seems to have broken networking on a bunch of my PPC > machines (64-bit kernel, 32-bit userspace). B

Re: [PATCH] fs/fcntl: Fix F_GET/SETLK etc. for compat processes

2017-07-07 Thread Al Viro
On Fri, Jul 07, 2017 at 10:48:51PM +1000, Michael Ellerman wrote: > Commit 8c6657cb50cb ("Switch flock copyin/copyout primitives to > copy_{from,to}_user()") added copy_flock_fields(from, to), but then in all > cases > called it with arguments of (to, from). eg: > > static int get_compat_flock(

Re: [PATCH 4/5] powernv:idle: Move initialization of sibling pacas to pnv_alloc_idle_core_states

2017-07-07 Thread Gautham R Shenoy
On Fri, Jul 07, 2017 at 01:16:09AM +1000, Nicholas Piggin wrote: > On Wed, 5 Jul 2017 22:08:15 +0530 > "Gautham R. Shenoy" wrote: > > > From: "Gautham R. Shenoy" > > > > On POWER9 DD1, in order to get around a hardware issue, we store in > > every CPU thread's paca the paca pointers of all its

Applied "ASoC: imx-ssi: add check on platform_get_irq return value" to the asoc tree

2017-07-07 Thread Mark Brown
The patch ASoC: imx-ssi: add check on platform_get_irq return value has been applied to the asoc tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) a

[GIT PULL] Please pull powerpc/linux.git powerpc-4.13-1 tag

2017-07-07 Thread Michael Ellerman
Hi Linus, Please pull powerpc updates for 4.13. No conflicts or anything I'm aware of. I did merge my own fixes branch into my next, so I had to generate the diffstat below by hand, but I'm pretty sure it's correct. The following changes since commit 5ed02dbb497422bf225783f46e6eadd237d23d6b:

[PATCH] fs/fcntl: Fix F_GET/SETLK etc. for compat processes

2017-07-07 Thread Michael Ellerman
Commit 8c6657cb50cb ("Switch flock copyin/copyout primitives to copy_{from,to}_user()") added copy_flock_fields(from, to), but then in all cases called it with arguments of (to, from). eg: static int get_compat_flock(struct flock *kfl, struct compat_flock __user *ufl) { struct compat_

Re: [git pull] vfs.git part 1

2017-07-07 Thread Michael Ellerman
Al Viro writes: > vfs.git topology is rather convoluted this cycle, so > I'm afraid that it'll take more pull requests than usual ;-/ > > The first pile is #work.misc-set_fs. Assorted getting rid > of cargo-culted access_ok(), cargo-culted set_fs() and > field-by-field copyouts. The same

Re: [PATCH 3/5] powernv:idle: Define idle init function for power8

2017-07-07 Thread Gautham R Shenoy
Hi Nicholas, On Fri, Jul 07, 2017 at 01:06:46AM +1000, Nicholas Piggin wrote: > On Wed, 5 Jul 2017 22:08:14 +0530 > "Gautham R. Shenoy" wrote: > > > From: "Gautham R. Shenoy" > > > > In this patch we define a new function named pnv_power8_idle_init(). > > > > We move the following code from

Re: [PATCH 2/5] powernv:idle: Change return type of pnv_probe_idle_states to int

2017-07-07 Thread Gautham R Shenoy
Hello Nicholas, On Fri, Jul 07, 2017 at 01:01:49AM +1000, Nicholas Piggin wrote: > On Wed, 5 Jul 2017 22:08:13 +0530 > "Gautham R. Shenoy" wrote: > > > From: "Gautham R. Shenoy" > > > > In the current idle initialization code, if there are failures in > > pnv_probe_idle_states, then no platfo

Re: [PATCH 1/5] powernv:idle: Move device-tree parsing to one place.

2017-07-07 Thread Gautham R Shenoy
Hello Nicholas, On Fri, Jul 07, 2017 at 12:53:40AM +1000, Nicholas Piggin wrote: > On Wed, 5 Jul 2017 22:08:12 +0530 > "Gautham R. Shenoy" wrote: > > > From: "Gautham R. Shenoy" > > > > The details of the platform idle state are exposed by the firmware to > > the kernel via device tree. > >

Re: [linux-next] cpus stalls detected few hours after booting next kernel

2017-07-07 Thread Abdul Haleem
On Fri, 2017-06-30 at 17:28 +1000, Nicholas Piggin wrote: > On Fri, 30 Jun 2017 10:52:18 +0530 > Abdul Haleem wrote: > > > On Fri, 2017-06-30 at 00:45 +1000, Nicholas Piggin wrote: > > > On Thu, 29 Jun 2017 20:23:05 +1000 > > > Nicholas Piggin wrote: > > > > > > > On Thu, 29 Jun 2017 19:36:14 +

[PATCH v2 5/5] powerpc/mm: Simplify __set_fixmap()

2017-07-07 Thread Christophe Leroy
__set_fixmap() uses __fix_to_virt() then does the boundary checks by it self. Instead, we can use fix_to_virt() which does the verification at build time. For this, we need to use it inline so that GCC can see the real value of idx at buildtime. In the meantime, we remove the 'fixmaps' variable. T

[PATCH v2 4/5] powerpc/mm: declare some local functions static

2017-07-07 Thread Christophe Leroy
get_pteptr() and __mapin_ram_chunk() are only used locally, so define them static Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/32/pgtable.h | 3 --- arch/powerpc/include/asm/nohash/32/pgtable.h | 3 --- arch/powerpc/mm/pgtable_32.c | 4 ++-- 3 files changed

[PATCH v2 3/5] powerpc/mm: Implement STRICT_KERNEL_RWX on PPC32

2017-07-07 Thread Christophe Leroy
This patch implements STRICT_KERNEL_RWX on PPC32. As for CONFIG_DEBUG_PAGEALLOC, it deactivates BAT and LTLB mappings in order to allow page protection setup at the level of each page. As BAT/LTLB mappings are deactivated, there might be a performance impact. Signed-off-by: Christophe Leroy ---

[PATCH v2 2/5] powerpc/mm: Fix kernel RAM protection after freeing unused memory on PPC32

2017-07-07 Thread Christophe Leroy
As seen below, allthough the init sections have been freed, the associated memory area is still marked as executable in the page tables. ~ dmesg [5.860093] Freeing unused kernel memory: 592K (c057 - c0604000) ~ cat /sys/kernel/debug/kernel_page_tables ---[ Start of kernel VM ]--- 0xc0

[PATCH v2 1/5] powerpc/mm: Ensure change_page_attr() doesn't invalidate pinned TLBs

2017-07-07 Thread Christophe Leroy
__change_page_attr() uses flush_tlb_page(). flush_tlb_page() uses tlbie instruction, which also invalidates pinned TLBs, which is not what we expect. This patch modifies the implementation to use flush_tlb_kernel_range() instead. This will make use of tlbia which will preserve pinned TLBs. Signed

[PATCH v2 0/5] powerpc/mm: Fix kernel protection and implement STRICT_KERNEL_RWX on PPC32

2017-07-07 Thread Christophe Leroy
This patch set implements STRICT_KERNEL_RWX on Powerpc32 after fixing a few issues related to kernel code page protection. At the end we take the opportunity to get rid of some unneccessary/outdated fixmap stuff. Changes from v1 to v2: * Rebased on latest linux-next following including of STRICT_

Re: [PATCH v12 01/10] powerpc/powernv: Data structure and macros definitions for IMC

2017-07-07 Thread Michael Ellerman
Hi Maddy/Anju, Anju T Sudhakar writes: > From: Madhavan Srinivasan > > Create a new header file to add the data structures and > macros needed for In-Memory Collection (IMC) counter support. > > Signed-off-by: Anju T Sudhakar > Signed-off-by: Hemant Kumar > Signed-off-by: Madhavan Srinivasan

Re: [PATCH v6 1/7] perf/core: Define the common branch type classification

2017-07-07 Thread Peter Zijlstra
PPC folks, maddy, does this work for you guys? On Thu, Apr 20, 2017 at 08:07:49PM +0800, Jin Yao wrote: > It is often useful to know the branch types while analyzing branch > data. For example, a call is very different from a conditional branch. > > Currently we have to look it up in binary whil

Re: [PATCH v6 0/7] perf report: Show branch type

2017-07-07 Thread Jiri Olsa
On Thu, Apr 20, 2017 at 08:07:48PM +0800, Jin Yao wrote: > v6: >Update according to the review comments from >Jiri Olsa . Major modifications are: > >1. Move that multiline conditional code inside {} brackets. > >2. Move branch_type_stat_display() from builtin-report.c to >

Re: [RFC v5 01/38] powerpc: Free up four 64K PTE bits in 4K backed HPTE pages

2017-07-07 Thread Balbir Singh
On Wed, 2017-07-05 at 14:21 -0700, Ram Pai wrote: > Rearrange 64K PTE bits to free up bits 3, 4, 5 and 6, > in the 4K backed HPTE pages.These bits continue to be used > for 64K backed HPTE pages in this patch, but will be freed > up in the next patch. The bit numbers are big-endian as > def

Re: [PATCH] powerpc/powernv: Fix local TLB flush for boot and MCE on POWER9

2017-07-07 Thread Aneesh Kumar K.V
Nicholas Piggin writes: > There are two cases outside the normal address space management > where a CPU's local TLB is to be flushed: > > 1. Host boot; in case something has left stale entries in the > TLB (e.g., kexec). > > 2. Machine check; to clean corrupted TLB entries. > > CPU state

[PATCH v2] powerpc/powernv: Use darn instr for random_seed on p9

2017-07-07 Thread Matt Brown
Currently ppc_md.get_random_seed uses the powernv_get_random_long function. A guest calling this function would have to go through the hypervisor. The 'darn' instruction, introduced in POWER9, allows us to bypass this by directly obtaining a value from the mmio region. This patch adds a function f