[PATCH 3/3] powerpc/32s: Allow constant folding in mtsr()/mfsr()

2021-02-06 Thread Christophe Leroy
On the same way as we did in wrtee(), add an alternative using mtsr/mfsr instructions instead of mtsrin/mfsrin when the segment register can be determined at compile time. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/reg.h | 10 -- 1 file changed, 8 insertions(+), 2 delet

[PATCH 1/3] powerpc/32s: Change mfsrin() into a static inline function

2021-02-06 Thread Christophe Leroy
mfsrin() is a macro. Change in into an inline function to avoid conflicts in KVM and make it more evolutive. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/reg.h| 11 --- arch/powerpc/kvm/book3s_emulate.c | 4 2 files changed, 8 insertions(+), 7 deletions(-) dif

[PATCH 2/3] powerpc/32s: mfsrin()/mtsrin() become mfsr()/mtsr()

2021-02-06 Thread Christophe Leroy
Function names should tell what the function does, not how. mfsrin() and mtsrin() are read/writing segment registers. They are called that way because they are using mfsrin and mtsrin instructions, but it doesn't matter for the caller. In preparation of following patch, change their name to mfsr

[GIT PULL] Please pull powerpc/linux.git powerpc-5.11-7 tag

2021-02-06 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull some more powerpc fixes for 5.11: The following changes since commit 4025c784c573cab7e3f84746cc82b8033923ec62: powerpc/64s: prevent recursive replay_soft_interrupts causing superfluous interrupt (2021-01-24 22:27:24 +1100)

Re: [PATCH 2/8] powerpc/signal: Add unsafe_copy_{vsx, fpr}_from_user()

2021-02-06 Thread Christophe Leroy
Le 20/10/2020 à 04:01, Christopher M. Riedl a écrit : On Fri Oct 16, 2020 at 10:48 AM CDT, Christophe Leroy wrote: Le 15/10/2020 à 17:01, Christopher M. Riedl a écrit : Reuse the "safe" implementation from signal.c except for calling unsafe_copy_from_user() to copy into a local buffer. Unl

Re: [PATCH 2/8] powerpc/signal: Add unsafe_copy_{vsx,fpr}_from_user()

2021-02-06 Thread Christopher M. Riedl
On Sat Feb 6, 2021 at 10:32 AM CST, Christophe Leroy wrote: > > > Le 20/10/2020 à 04:01, Christopher M. Riedl a écrit : > > On Fri Oct 16, 2020 at 10:48 AM CDT, Christophe Leroy wrote: > >> > >> > >> Le 15/10/2020 à 17:01, Christopher M. Riedl a écrit : > >>> Reuse the "safe" implementation from si

Re: [PATCH v2] powerpc/uprobes: Validation for prefixed instruction

2021-02-06 Thread Oleg Nesterov
On 02/04, Ravi Bangoria wrote: > > +static int get_instr(struct mm_struct *mm, unsigned long addr, u32 *instr) > +{ > + struct page *page; > + struct vm_area_struct *vma; > + void *kaddr; > + unsigned int gup_flags = FOLL_FORCE | FOLL_SPLIT_PMD; > + > + if (get_user_pages_remote

[PATCH] ASoC: fsl: constify static snd_soc_dai_ops structs

2021-02-06 Thread Rikard Falkeborn
The only usage of these is to assign their address to the 'ops' field in the snd_soc_dai_driver struct, which is a pointer to const. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- sound/soc/fsl/fsl_easrc.c | 2 +- sound/soc/fsl/fsl_mic

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.11-7 tag

2021-02-06 Thread pr-tracker-bot
The pull request you sent on Sat, 06 Feb 2021 23:50:45 +1100: > https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git > tags/powerpc-5.11-7 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/f06279ea1908b9cd2d22645dc6d492e612b82744 Thank you! -- Deet-doot-d

[PATCH] powerpc/xive: Assign boolean values to a bool variable

2021-02-06 Thread Jiapeng Chong
Fix the following coccicheck warnings: ./arch/powerpc/kvm/book3s_xive.c:1856:2-17: WARNING: Assignment of 0/1 to bool variable. ./arch/powerpc/kvm/book3s_xive.c:1854:2-17: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- arch/powerpc/kvm/b