[PATCH] powerpc/epapr: Move register keyword at the beginning of declaration

2018-01-30 Thread Mathieu Malaterre
Fix warning for all register unsigned long (0,3-12) that appear during W=1 compilation: ./arch/powerpc/include/asm/epapr_hcalls.h:479:2: warning: ‘register’ is not at beginning of declaration [-Wold-style-declaration] unsigned long register r[\d] asm("r[\d]"); Signed-off-by: Mathieu Malaterre

Re: [PATCH v11 0/3] mm, x86, powerpc: Enhancements to Memory Protection Keys.

2018-01-30 Thread Ingo Molnar
* Ram Pai wrote: > This patch series provides arch-neutral enhancements to > enable memory-keys on new architecutes, and the corresponding > changes in x86 and powerpc specific code to support that. > > a) Provides ability to support upto 32 keys. PowerPC > can handle 32 keys and hence n

[PATCH] KVM: PPC: Book3S PR: close a race window when SVCPU pointer is hold before kvmppc_copy_from_svcpu()

2018-01-30 Thread wei . guo . simon
From: Simon Guo commit 40fdd8c88c4a ("KVM: PPC: Book3S: PR: Make svcpu -> vcpu store preempt savvy") and commit 3d3319b45eea ("KVM: PPC: Book3S: PR: Enable interrupts earlier") is trying to turns on preemption early when return into highmem guest exit handler. However there is a race window in f

Re: [PATCH] ibmvfc: fix misdefined reserved field in ibmvfc_fcp_rsp_info

2018-01-30 Thread Martin K. Petersen
Tyrel, > The fcp_rsp_info structure as defined in the FC spec has an initial 3 bytes > reserved field. The ibmvfc driver mistakenly defined this field as 4 bytes > resulting in the rsp_code field being defined in what should be the start of > the second reserved field and thus always being report

Re: [PATCH] ocxl: fix signed comparison with less than zero

2018-01-30 Thread Andrew Donnellan
On 31/01/18 02:11, Colin King wrote: From: Colin Ian King Currently the comparison of used < 0 is always false because uses is a size_t. Fix this by making used a ssize_t type. Detected by Coccinelle: drivers/misc/ocxl/file.c:320:6-10: WARNING: Unsigned expression compared with zero: used < 0

[PATCH v11 3/3] mm, x86: display pkey in smaps only if arch supports pkeys

2018-01-30 Thread Ram Pai
Currently the architecture specific code is expected to display the protection keys in smap for a given vma. This can lead to redundant code and possibly to divergent formats in which the key gets displayed. This patch changes the implementation. It displays the pkey only if the archite

[PATCH v11 2/3] mm, powerpc, x86: introduce an additional vma bit for powerpc pkey

2018-01-30 Thread Ram Pai
Currently only 4bits are allocated in the vma flags to hold 16 keys. This is sufficient for x86. PowerPC supports 32 keys, which needs 5bits. This patch allocates an additional bit. Acked-by: Balbir Singh Signed-off-by: Ram Pai --- fs/proc/task_mmu.c |1 + include/linux/mm.h |3 ++-

[PATCH v11 1/3] mm, powerpc, x86: define VM_PKEY_BITx bits if CONFIG_ARCH_HAS_PKEYS is enabled

2018-01-30 Thread Ram Pai
VM_PKEY_BITx are defined only if CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS is enabled. Powerpc also needs these bits. Hence lets define the VM_PKEY_BITx bits for any architecture that enables CONFIG_ARCH_HAS_PKEYS. Signed-off-by: Ram Pai --- fs/proc/task_mmu.c |4 ++-- include/linux/mm.h |

[PATCH v11 0/3] mm, x86, powerpc: Enhancements to Memory Protection Keys.

2018-01-30 Thread Ram Pai
This patch series provides arch-neutral enhancements to enable memory-keys on new architecutes, and the corresponding changes in x86 and powerpc specific code to support that. a) Provides ability to support upto 32 keys. PowerPC can handle 32 keys and hence needs this. b) Arch-neutral co

Re: [PATCH v10 27/27] mm: display pkey in smaps if arch_pkeys_enabled() is true

2018-01-30 Thread Ram Pai
On Tue, Jan 30, 2018 at 01:16:11PM +0100, Michal Hocko wrote: > On Thu 18-01-18 17:50:48, Ram Pai wrote: > [...] > > @@ -851,9 +848,13 @@ static int show_smap(struct seq_file *m, void *v, int > > is_pid) > >(unsigned long)(mss->pss >> (10 + PSS_SHIFT))); > > > > if (!

[PATCH] ocxl: fix signed comparison with less than zero

2018-01-30 Thread Colin King
From: Colin Ian King Currently the comparison of used < 0 is always false because uses is a size_t. Fix this by making used a ssize_t type. Detected by Coccinelle: drivers/misc/ocxl/file.c:320:6-10: WARNING: Unsigned expression compared with zero: used < 0 Fixes: 5ef3166e8a32 ("ocxl: Driver cod

[PATCH v2] macintosh: Add module license to ans-lcd

2018-01-30 Thread Larry Finger
In kernel 4.15, the modprobe step on my PowerBook G4 started complaining that there was no module license for ans-lcd. Signed-off-by: Larry Finger --- v2 - fixed typo in commit message --- drivers/macintosh/ans-lcd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/macintosh/ans-lcd.c

Re: [PATCH v10 27/27] mm: display pkey in smaps if arch_pkeys_enabled() is true

2018-01-30 Thread Michal Hocko
On Thu 18-01-18 17:50:48, Ram Pai wrote: [...] > @@ -851,9 +848,13 @@ static int show_smap(struct seq_file *m, void *v, int > is_pid) > (unsigned long)(mss->pss >> (10 + PSS_SHIFT))); > > if (!rollup_mode) { > - arch_show_smap(m, vma); > +#ifdef CONFIG_