[PULL 0/2] xtensa fixes for 5.12

2021-03-29 Thread Max Filippov
exception vectors when they are placed too far from the rest of the kernel; - fix uaccess-related livelock in do_page_fault. Max Filippov (2): xtensa: move coprocessor_flush to the .text section xtensa: fix uaccess-related

Re: [PATCH 01/23] atomctl.rst: A typo fix

2021-03-28 Thread Max Filippov
On Sun, Mar 28, 2021 at 10:18 PM Bhaskar Chowdhury wrote: > > s/controlers/controllers/ > > Signed-off-by: Bhaskar Chowdhury > --- > Documentation/xtensa/atomctl.rst | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Documentation/xtensa/atomctl.rst >

Re: [PATCH 01/23] atomctl.rst: A typo fix

2021-03-28 Thread Max Filippov
On Sun, Mar 28, 2021 at 10:37 PM Max Filippov wrote: > > On Sun, Mar 28, 2021 at 10:18 PM Bhaskar Chowdhury > wrote: > > > > s/controlers/controllers/ > > > > Signed-off-by: Bhaskar Chowdhury > > --- > > Documentation/xtensa/atomctl.rst | 2 +- &g

[PATCH] xtensa: fix uaccess-related livelock in do_page_fault

2021-03-27 Thread Max Filippov
that instruction and the fault handler. https://lore.kernel.org/lkml/20210121123140.GD48431@C02TD0UTHF1T.local/ Cc: sta...@vger.kernel.org Reported-by: Mark Rutland Signed-off-by: Max Filippov --- arch/xtensa/mm/fault.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/xtensa/mm

[PATCH 2/2] xtensa: ISS: add GDBIO implementation to semihosting interface

2021-03-26 Thread Max Filippov
choices there. Signed-off-by: Max Filippov --- arch/xtensa/Kconfig | 22 .../iss/include/platform/simcall-gdbio.h | 34 ++ .../platforms/iss/include/platform/simcall.h | 36 +++ 3 files changed, 92 insertions(+) create

[PATCH 1/2] xtensa: ISS: split simcall implementation from semihosting interface

2021-03-26 Thread Max Filippov
Disconnect existing ISS simcall implementation from the semihosting interface to allow for alternative implementations selectable at configure time. Signed-off-by: Max Filippov --- .../iss/include/platform/simcall-iss.h| 73 +++ .../platforms/iss/include/platform

[PATCH 0/2] xtensa: add GDBIO implementation to semihosting interface

2021-03-26 Thread Max Filippov
using GDBIO implementation of the semihosting interface. Max Filippov (2): xtensa: ISS: split simcall implementation from semihosting interface xtensa: ISS: add GDBIO implementation to semihosting interface arch/xtensa/Kconfig | 22 .../iss/include/platform

Re: [PATCH] platforms/iss/simcall.h: Change compitible to compatible

2021-03-26 Thread Max Filippov
On Thu, Mar 25, 2021 at 6:29 PM Bhaskar Chowdhury wrote: > > > s/compitible/compatible/ > > Signed-off-by: Bhaskar Chowdhury > --- > arch/xtensa/platforms/iss/include/platform/simcall.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thanks, applied to my xtensa tree with minor

Re: [PATCH] xtensa: Couple of typo fixes

2021-03-26 Thread Max Filippov
On Wed, Mar 24, 2021 at 9:09 PM Bhaskar Chowdhury wrote: > > s/contans/contains/ > s/desination/destination/ > > Signed-off-by: Bhaskar Chowdhury > --- > arch/xtensa/kernel/head.S | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Thanks, applied to my xtensa tree. -- Thanks. --

[PATCH] xtensa: drop extraneous register load from initialize_mmu

2021-03-14 Thread Max Filippov
Commit a9f2fc628e3a ("xtensa: cleanup MMU setup and kernel layout macros") removed the use of a2 in the beginning of the initialize_mmu macro, but left the register load that is no longer used. Remove it as well. Signed-off-by: Max Filippov --- arch/xtensa/include/asm/initialize_mmu.h

[PATCH] xtensa: fix pgprot_noncached assumptions

2021-03-14 Thread Max Filippov
pgprot_noncached assumes that cache bypass attribute is represented as zero. This may not always be true. Fix pgprot_noncached definition by adding _PAGE_CA_BYPASS to the result. Signed-off-by: Max Filippov --- arch/xtensa/include/asm/pgtable.h | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH] xtensa: simplify coherent_kvaddr logic

2021-03-14 Thread Max Filippov
'. Simplify this logic and drop special handling of low memory pages/pages with coherent mapping and always use TLBTEMP_BASE area. Signed-off-by: Max Filippov --- arch/xtensa/mm/cache.c | 9 ++--- arch/xtensa/mm/misc.S | 36 +--- 2 files changed, 7 insertions(+), 38

Re: [PATCH 1/3] xtensa: stop filling syscall array with sys_ni_syscall

2021-03-14 Thread Max Filippov
On Mon, Mar 1, 2021 at 7:37 AM Masahiro Yamada wrote: > > arch/xtensa/kernel/syscalls/syscalltbl.sh fills missing syscall numbers > with sys_ni_syscall. > > So, the generated arch/xtensa/include/generated/asm/syscall_table.h > has no hole. > > Hence, the line: > > [0 ... __NR_syscalls - 1] =

Re: [PATCH v2 1/2] xtensa: move CONFIG_CPU_*_ENDIAN defines to Kconfig

2021-03-14 Thread Max Filippov
On Sat, Mar 13, 2021 at 4:24 AM Masahiro Yamada wrote: > > Move the definition of CONFIG_CPU_*_ENDIAN to Kconfig, the best place > for CONFIG options. > > I slightly simplified the test code. You can use the -P option to suppress > linemarker generation. The grep command is unneeded. > > $ echo

Re: [PATCH] xtensa: move CONFIG_CPU_*_ENDIAN defines to Kconfig

2021-03-13 Thread Max Filippov
he logic to Kconfig from Makefile. > > > arch/xtensa/Kconfig | 6 ++ > arch/xtensa/Makefile | 9 + > 2 files changed, 7 insertions(+), 8 deletions(-) Acked-by: Max Filippov Please let me know if I should take it into the xtensa tree or you will carry it in the kbuild tree. -- Thanks. -- Max

Re: [PATCH] xtensa: fix warning comparing pointer to 0

2021-03-09 Thread Max Filippov
On Tue, Mar 9, 2021 at 11:10 PM Jiapeng Chong wrote: > > Fix the following coccicheck warning: > > ./arch/xtensa/kernel/pci.c:79:17-18: WARNING comparing pointer to 0. > > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chong > --- > arch/xtensa/kernel/pci.c | 2 +- > 1 file changed, 1

Re: [PATCH 30/44] tty: xtensa/iss, don't reassign to tty->port

2021-03-02 Thread Max Filippov
On Mon, Mar 1, 2021 at 10:22 PM Jiri Slaby wrote: > > We already do tty_port_link_device in rs_init, so we don't need to > reassign a port to tty->port. It would be too late in tty::ops::open > anyway. > > Signed-off-by: Jiri Slaby > Cc: Chris Zankel > Cc: Max Filippo

Re: [PATCH 34/44] tty: do not check tty_unregister_driver's return value

2021-03-02 Thread Max Filippov
In the next patch, tty_unregister_driver's return type will be switched > to void. > > Signed-off-by: Jiri Slaby > Cc: Chris Zankel > Cc: Max Filippov > Cc: linux-xte...@linux-xtensa.org > Cc: Jiri Kosina > Cc: David Sterba > --- > arch/xtensa/platforms/iss

Re: [PATCH 33/44] tty: xtensa/iss, make rs_init static

2021-03-02 Thread Max Filippov
On Mon, Mar 1, 2021 at 10:22 PM Jiri Slaby wrote: > > To fix the warning: > warning: no previous prototype for 'rs_init' > > Signed-off-by: Jiri Slaby > Cc: Chris Zankel > Cc: Max Filippov > Cc: linux-xte...@linux-xtensa.org > --- > arch/xtensa/platforms/iss/cons

Re: [PATCH 32/44] tty: xtensa/iss, setup the timer statically

2021-03-02 Thread Max Filippov
On Mon, Mar 1, 2021 at 10:22 PM Jiri Slaby wrote: > > Use DEFINE_TIMER and avoid runtime initialization of the serial_timer. > > Signed-off-by: Jiri Slaby > Cc: Chris Zankel > Cc: Max Filippov > Cc: linux-xte...@linux-xtensa.org > --- > arch/xtensa/p

Re: [PATCH 31/44] tty: xtensa/iss, remove stale comments

2021-03-02 Thread Max Filippov
On Mon, Mar 1, 2021 at 10:22 PM Jiri Slaby wrote: > > These are likely taken over from amiserial. iss doesn't do anything of > that. > > Signed-off-by: Jiri Slaby > Cc: Chris Zankel > Cc: Max Filippov > Cc: linux-xte...@linux-xtensa.org > --- > arch/xtens

Re: [PATCH 29/44] tty: xtensa/iss, drop serial_version & serial_name

2021-03-02 Thread Max Filippov
On Mon, Mar 1, 2021 at 10:22 PM Jiri Slaby wrote: > > There is no need to print the information during module load. Neither to > print some artificial version. So drop these strings and a print. > > Signed-off-by: Jiri Slaby > Cc: Chris Zankel > Cc: Max Filippov >

[PATCH] xtensa: move coprocessor_flush to the .text section

2021-02-26 Thread Max Filippov
-by: Max Filippov --- arch/xtensa/kernel/coprocessor.S | 64 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/arch/xtensa/kernel/coprocessor.S b/arch/xtensa/kernel/coprocessor.S index c426b846beef..45cc0ae0af6f 100644 --- a/arch/xtensa/kernel

Re: [PATCH] mm/memtest: Add ARCH_USE_MEMTEST

2021-02-04 Thread Max Filippov
; Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Chris Zankel > Cc: Max Filippov > Cc: linux-arm-ker...@lists.infradead.org > Cc: linux-m...@vger.kernel.org > Cc: linuxppc-...@lists.ozlabs.org > Cc: linux-xte...@linux-xtensa.org > Cc: linux...@kvack.org > Cc: linux-kernel@vger

Re: Old platforms: bring out your dead

2021-01-14 Thread Max Filippov
Hi Arnd, On Thu, Jan 14, 2021 at 1:25 PM Arnd Bergmann wrote: > | arch/mips/Kconfig:config HIGHMEM > | arch/xtensa/Kconfig:config HIGHMEM > > AFAICT On MIPS (prior to MIPS32r3) and xtensa, you have at > most 512MB in the linear map, so the VMSPLIT_2G or VMSPLIT_4G_4G > tricks won't work.

Re: [PATCH 16/18] arch: xtensa: Remove CONFIG_OPROFILE support

2021-01-14 Thread Max Filippov
oprofile/backtrace.c > delete mode 100644 arch/xtensa/oprofile/init.c Although I still keep userspace oprofile tools that use this interface, I haven't run them for ages. Acked-by: Max Filippov -- Thanks. -- Max

Re: [PATCH] xtensa: fix spelling mistake in Kconfig "wont" -> "won't"

2020-12-17 Thread Max Filippov
On Thu, Dec 17, 2020 at 9:24 AM Colin King wrote: > > From: Colin Ian King > > There is a spelling mistake in the Kconfig help text. Fix it. > > Signed-off-by: Colin Ian King > --- > arch/xtensa/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thanks. Applied to my xtensa tree.

[PULL 0/3] xtensa fixes for v5.10

2020-11-19 Thread Max Filippov
() prototype Max Filippov (2): xtensa: fix TLBTEMP area placement xtensa: disable preemption around cache alias management calls Documentation/xtensa/mmu.rst | 9 ++--- arch/xtensa/include/asm/pgtable.h | 2 +- arch/xtensa/include/asm/uaccess.h | 2 +- arch/xtensa/mm/cache.c

[PATCH v2] xtensa/mm/highmem: Make generic kmap_atomic() work correctly

2020-11-16 Thread Max Filippov
enum which originates from the initial copy of this code from i386. Reported-by: Max Filippov Fixes: 629ed3f7dad2 ("xtensa/mm/highmem: Switch to generic kmap atomic") Signed-off-by: Thomas Gleixner Signed-off-by: Max Filippov Tested-by: Max Filippov --- Changes v1->v2: - fix off

Re: [PATCH] highmem: fix highmem for xtensa

2020-11-16 Thread Max Filippov
Hi Thomas, On Fri, Nov 13, 2020 at 2:34 PM Thomas Gleixner wrote: > I agree that the top down mechanics is not really intuitive, but that > does not justify the ifdeffery in the generic code. But then maybe xtensa did the right thing where everyone else just copied the not really intuitive

[PATCH 2/2] xtensa: disable preemption around cache alias management calls

2020-11-16 Thread Max Filippov
management calls to enforce that. Cc: sta...@vger.kernel.org Signed-off-by: Max Filippov --- arch/xtensa/mm/cache.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/xtensa/mm/cache.c b/arch/xtensa/mm/cache.c index 5835406b3cec..085b8c77b9d9 100644 --- a/arch/xtensa/mm/cache.c

[PATCH 0/2] xtensa: cache aliasing fixes

2020-11-16 Thread Max Filippov
Hello, this series changes TLBTEMP region placement and disables preemption around all cache alias management calls. This fixes TLB miss and multihit issues in the TLBTEMP area seen on cores with aliasing cache. Max Filippov (2): xtensa: fix TLBTEMP area placement xtensa: disable preemption

[PATCH 1/2] xtensa: fix TLBTEMP area placement

2020-11-16 Thread Max Filippov
/0x3c0 kthread+0x10d/0x124 ret_from_kernel_thread+0xc/0x18 Cc: sta...@vger.kernel.org Signed-off-by: Max Filippov --- Documentation/xtensa/mmu.rst | 9 ++--- arch/xtensa/include/asm/pgtable.h | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Documentation/xtensa

Re: [PATCH] highmem: fix highmem for xtensa

2020-11-13 Thread Max Filippov
On Fri, Nov 13, 2020 at 6:36 AM Thomas Gleixner wrote: > On Fri, Nov 13 2020 at 05:50, Max Filippov wrote: > > On Fri, Nov 13, 2020 at 5:40 AM Thomas Gleixner wrote: > >> What's wrong with just doing the obvious and making the fixmap defines > >> the other way round

Re: [PATCH] highmem: fix highmem for xtensa

2020-11-13 Thread Max Filippov
Hi Thomas, On Fri, Nov 13, 2020 at 5:40 AM Thomas Gleixner wrote: > On Fri, Nov 13 2020 at 04:23, Max Filippov wrote: > > Fixmap on xtensa grows upwards, i.e. bigger fixmap entry index > > corresponds to a higher virtual address. This was lost in highmem > > gen

[PATCH] highmem: fix highmem for xtensa

2020-11-13 Thread Max Filippov
primitives differently depending on whether it is defined or not. Cc: Thomas Gleixner Fixes: 629ed3f7dad2 ("xtensa/mm/highmem: Switch to generic kmap atomic") Signed-off-by: Max Filippov --- arch/xtensa/include/asm/fixmap.h | 2 ++ mm/highmem.c

Re: [PATCH v2] xtensa: fix broken TIF_NOTIFY_SIGNAL assembly

2020-11-12 Thread Max Filippov
On Wed, Nov 11, 2020 at 1:05 PM Jens Axboe wrote: > > On 11/11/20 1:53 PM, Max Filippov wrote: > > TIF_NOTIFY_SIGNAL handling in xtensa assembly is implemented > > incorrectly: there should be a call to do_notify_resume when either > > TIF_SIGPENDING, TIF_NOTIFY_RESUME

[PATCH v2] xtensa: fix broken TIF_NOTIFY_SIGNAL assembly

2020-11-11 Thread Max Filippov
opcode. Fixes: 4c6a9dcd4d13 ("xtensa: add support for TIF_NOTIFY_SIGNAL") Cc: Jens Axboe Signed-off-by: Max Filippov --- Changes v1->v2: - use more canonical order of bnone arguments: tested value first, bit mask second. arch/xtensa/include/asm/thread_info.h | 7 --- arch/

[PATCH] xtensa: fix broken TIF_NOTIFY_SIGNAL assembly

2020-11-11 Thread Max Filippov
opcode. Fixes: 4c6a9dcd4d13 ("xtensa: add support for TIF_NOTIFY_SIGNAL") Cc: Jens Axboe Signed-off-by: Max Filippov --- arch/xtensa/include/asm/thread_info.h | 7 --- arch/xtensa/kernel/entry.S| 5 ++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/a

Re: [PATCH] ARM, xtensa: highmem: avoid clobbering non-page aligned memory reservations

2020-10-31 Thread Max Filippov
On Sat, Oct 31, 2020 at 10:16 AM Mike Rapoport wrote: > > On Sat, Oct 31, 2020 at 09:37:09AM -0700, Max Filippov wrote: > > On Sat, Oct 31, 2020 at 2:43 AM Mike Rapoport wrote: > > > Please let me know how do you prefer to take it upstream. > > > If needed

Re: [PATCH] ARM, xtensa: highmem: avoid clobbering non-page aligned memory reservations

2020-10-31 Thread Max Filippov
On Sat, Oct 31, 2020 at 2:43 AM Mike Rapoport wrote: > Please let me know how do you prefer to take it upstream. > If needed this can go via memblock tree. Going through the memblock tree sounds right to me. -- Thanks. -- Max

Re: [PATCH] selftests/harness: Flush stdout before forking

2020-09-16 Thread Max Filippov
simple, we just flush stdout & stderr before fork. Usually > stderr is unbuffered, but that can be changed, so flush it as well > just to be safe. > > Signed-off-by: Michael Ellerman > --- > tools/testing/selftests/kselftest_harness.h | 5 + > 1 file changed, 5 insertions(+) Tested-by: Max Filippov -- Thanks. -- Max

Re: [PATCH 00/15] selftests/seccomp: Refactor change_syscall()

2020-09-15 Thread Max Filippov
On Mon, Sep 14, 2020 at 1:32 PM Kees Cook wrote: > On Mon, Sep 14, 2020 at 10:15:18PM +1000, Michael Ellerman wrote: > > Kees Cook writes: > However... > > > > > cheers > > > > > > ./seccomp_bpf > > TAP version 13 > > 1..86 > > # Starting 86 tests from 7 test cases. > > # RUN

Re: [PATCH 00/15] selftests/seccomp: Refactor change_syscall()

2020-09-15 Thread Max Filippov
Hello, On Sat, Sep 12, 2020 at 4:08 AM Kees Cook wrote: > This refactors the seccomp selftest macros used in change_syscall(), > in an effort to remove special cases for mips, arm, arm64, and xtensa, > which paves the way for powerpc fixes. > > I'm not entirely done testing, but all-arch build

Re: [PATCH 0/3] xtensa: add seccomp support

2020-09-11 Thread Max Filippov
On Fri, Sep 11, 2020 at 12:38 PM Kees Cook wrote: > On Sat, Jul 18, 2020 at 07:16:51PM -0700, Max Filippov wrote: > > Hello, > > > > this series adds support for seccomp filter on xtensa and updates > > selftests/seccomp. > > Hi! > > Firstly, thanks for addi

Re: [PATCH v4 3/4] mm/pageblock: work around multiple arch's cmpxchg support issue

2020-09-03 Thread Max Filippov
On Thu, Sep 3, 2020 at 12:01 AM Alex Shi wrote: > > Armv6, sh2, sparc32 and xtensa can not do cmpxchg1, so we have to use > cmpxchg4 on it. [...] > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig> index > e00d94b16658..03a6c7fd999d 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@

Re: [PATCH v3 23/23] xtensa: use asm-generic/mmu_context.h for no-op implementations

2020-09-01 Thread Max Filippov
On Tue, Sep 1, 2020 at 7:17 AM Nicholas Piggin wrote: > > Cc: Chris Zankel > Cc: Max Filippov > Cc: linux-xte...@linux-xtensa.org > Signed-off-by: Nicholas Piggin > --- > > Please ack or nack if you object to this being mered via > Arnd's tree. > > arch/xtensa

Re: [PATCH trivial] xtensa: fix Kconfig typo

2020-08-30 Thread Max Filippov
On Sat, Aug 29, 2020 at 10:57 PM Randy Dunlap wrote: > > From: Randy Dunlap > > Correct trivial typo (ful -> full). > > Fixes: 76743c0e0915 ("xtensa: move kernel memory layout to platform options") > Signed-off-by: Randy Dunlap > Cc: Chris Zankel > Cc

[PATCH] binfmt_flat: revert "binfmt_flat: don't offset the data start"

2020-08-08 Thread Max Filippov
data segment last few instructions in the text segment may get corrupted by the data segment pointer. Fix it by reverting commit a2357223c50a ("binfmt_flat: don't offset the data start"). Cc: sta...@vger.kernel.org Fixes: a2357223c50a ("binfmt_flat: don't offset the data start"

[PULL 00/10] xtensa updates for v5.9

2020-08-05 Thread Max Filippov
Yamada (1): xtensa: add boot subdirectories build artifacts to 'targets' Max Filippov (8): xtensa: add audit support xtensa: expose syscall through user_pt_regs xtensa: add seccomp support selftests/seccomp: add xtensa support xtensa: move vmlinux.bin[.gz] to boot

Re: [PATCH v1 1/2] Missing instruction_pointer_set() instances

2020-08-04 Thread Max Filippov
| 6 ++ > arch/nds32/include/asm/ptrace.h | 7 +++ > arch/xtensa/include/asm/ptrace.h | 6 ++ > 4 files changed, 25 insertions(+) For xtensa: Acked-by: Max Filippov -- Thanks. -- Max

[PATCH] xtensa: add missing exclusive access state management

2020-07-31 Thread Max Filippov
thread_info and use getex to swap ATOMCTL bit 8 as a part of context switch. Clear exclusive access monitor on kernel entry. Cc: sta...@vger.kernel.org Fixes: f7c34874f04a ("xtensa: add exclusive atomics support") Signed-off-by: Max Filippov --- arch/xtensa/include/asm/thread_info.h | 4

[PATCH] xtensa: fix xtensa_pmu_setup prototype

2020-07-31 Thread Max Filippov
nvert the hotplug notifier to state machine callbacks") Signed-off-by: Max Filippov --- arch/xtensa/kernel/perf_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/xtensa/kernel/perf_event.c b/arch/xtensa/kernel/perf_event.c index 99fcd63ce597..a0d05c8598d0 100644

Re: [PATCH 03/15] arm, xtensa: simplify initialization of high memory pages

2020-07-28 Thread Max Filippov
- > arch/xtensa/mm/init.c | 55 --- > 2 files changed, 18 insertions(+), 85 deletions(-) For the xtensa part: Reviewed-by: Max Filippov Tested-by: Max Filippov -- Thanks. -- Max

[PATCH] xtensa: fix closing endif comment

2020-07-27 Thread Max Filippov
d-by: Mike Rapoport Fixes: 8f74afa22d9b ("xtensa: switch to generic version of pte allocation") Signed-off-by: Max Filippov --- Andrew, could you please take this patch as the change that it fixes is currently in the mm tree? arch/xtensa/include/asm/pgalloc.h | 2 +- 1 file changed, 1 inse

Re: [PATCH 15/18] xtensa: propagate the calling conventions change down into csum_partial_copy_generic()

2020-07-22 Thread Max Filippov
- > 2 files changed, 19 insertions(+), 68 deletions(-) Reviewed-by: Max Filippov Tested-by: Max Filippov -- Thanks. -- Max

[PATCH 1/2] xtensa: move vmlinux.bin[.gz] to boot subdirectory

2020-07-21 Thread Max Filippov
vmlinux.bin and vmlinux.bin.gz are always rebuilt in the kernel build process. Add them to 'targets' and move them to the boot subdirectory where their rules are. Update make rules that refer to them. Signed-off-by: Max Filippov --- arch/xtensa/boot/Makefile | 11 ++- arch

[PATCH 0/2] xtensa: boot targets cleanup

2020-07-21 Thread Max Filippov
Hello, this small clean up in the xtensa boot subdirectory adds more targets to the 'targets' variable to avoid unnecessary rebuils. Max Filippov (2): xtensa: move vmlinux.bin[.gz] to boot subdirectory xtensa: add uImage and xipImage to targets arch/xtensa/boot/Makefile | 12

[PATCH 2/2] xtensa: add uImage and xipImage to targets

2020-07-21 Thread Max Filippov
uImage and xipImage are always rebuilt in the xtensa kernel build process. Add them to 'targets' to avoid that. Signed-off-by: Max Filippov --- arch/xtensa/boot/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/xtensa/boot/Makefile b/arch/xtensa/boot/Makefile index 801fe30b4dfe

Re: [PATCH v2] xtensa: add boot subdirectories targets to extra-y

2020-07-21 Thread Max Filippov
On Tue, Jul 21, 2020 at 5:53 PM Masahiro Yamada wrote: > On Tue, Jul 21, 2020 at 6:37 PM Max Filippov wrote: > > The commit 8fe87a92f262 ("kbuild: always create directories of targets") > > exposed an issue in the xtensa makefiles that results in the following &

Re: [PATCH] xtensa: add boot subdirectories build artifacts to 'targets'

2020-07-21 Thread Max Filippov
+ > arch/xtensa/boot/boot-redboot/Makefile | 1 + > 2 files changed, 2 insertions(+) Acked-by: Max Filippov -- Thanks. -- Max

Re: [PATCH] xtensa: fix access check in csum_and_copy_from_user

2020-07-21 Thread Max Filippov
On Tue, Jul 21, 2020 at 4:04 PM Al Viro wrote: > > On Tue, Jul 21, 2020 at 03:00:35PM -0700, Max Filippov wrote: > > Commit d341659f470b ("xtensa: switch to providing > > csum_and_copy_from_user()") introduced access check, but incorrectly > > tested dst instead

[PATCH] xtensa: fix access check in csum_and_copy_from_user

2020-07-21 Thread Max Filippov
user()") Signed-off-by: Max Filippov --- arch/xtensa/include/asm/checksum.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/xtensa/include/asm/checksum.h b/arch/xtensa/include/asm/checksum.h index d8292cc9ebdf..243a5fe79d3c 100644 --- a/arch/xtensa/include/asm/checksum

Re: [PATCH] xtensa: initialize_mmu.h: fix a duplicated word

2020-07-21 Thread Max Filippov
On Tue, Jul 21, 2020 at 2:00 PM Randy Dunlap wrote: > > Change "The the" to "For the". > > Signed-off-by: Randy Dunlap > Cc: Chris Zankel > Cc: Max Filippov > Cc: linux-xte...@linux-xtensa.org > --- > arch/xtensa/include/asm/initialize_mmu.h

[PATCH v2] xtensa: add boot subdirectories targets to extra-y

2020-07-21 Thread Max Filippov
es of arch/xtensa/boot. Cc: Masahiro Yamada Signed-off-by: Max Filippov --- Changes v1->v2: - update boot-redboot/Makefile in the same manner as boot-elf/Makefile. arch/xtensa/boot/boot-elf/Makefile | 1 + arch/xtensa/boot/boot-redboot/Makefile | 1 + 2 files changed, 2 insertions(+

[PATCH] xtensa: add boot-elf targets to extra-y

2020-07-20 Thread Max Filippov
iro Yamada Signed-off-by: Max Filippov --- arch/xtensa/boot/boot-elf/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/xtensa/boot/boot-elf/Makefile b/arch/xtensa/boot/boot-elf/Makefile index a62a25506536..eb952d809d81 100644 --- a/arch/xtensa/boot/boot-elf/Makefile +++ b/arch/xtensa

[PATCH] xtensa: fix closing endif comment

2020-07-20 Thread Max Filippov
74afa22d9b ("xtensa: switch to generic version of pte allocation") Signed-off-by: Max Filippov --- arch/xtensa/include/asm/pgalloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/xtensa/include/asm/pgalloc.h b/arch/xtensa/include/asm/pgalloc.h index 699a8fdf9005.

[PATCH 0/3] xtensa: add seccomp support

2020-07-18 Thread Max Filippov
Hello, this series adds support for seccomp filter on xtensa and updates selftests/seccomp. Max Filippov (3): xtensa: expose syscall through user_pt_regs xtensa: add seccomp support selftests/seccomp: add xtensa support .../seccomp/seccomp-filter/arch-support.txt | 2 +- arch

[PATCH 3/3] selftests/seccomp: add xtensa support

2020-07-18 Thread Max Filippov
Xtensa returns syscall number can be obtained and changed through the struct user_pt_regs. Syscall return value register is fixed relatively to the current register window in the user_pt_regs, so it needs a bit of special treatment. Signed-off-by: Max Filippov --- tools/testing/selftests

[PATCH 2/3] xtensa: add seccomp support

2020-07-18 Thread Max Filippov
Add SECCOMP to xtensa Kconfig, select HAVE_ARCH_SECCOMP_FILTER, add TIF_SECCOMP and call secure_computing from do_syscall_trace_enter. Signed-off-by: Max Filippov --- .../seccomp/seccomp-filter/arch-support.txt | 2 +- arch/xtensa/Kconfig | 15

[PATCH 1/3] xtensa: expose syscall through user_pt_regs

2020-07-18 Thread Max Filippov
Use one of the reserved slots in struct user_pt_regs to return syscall number in the GPR regset. Update syscall number from the GPR regset only when it's non-zero. Signed-off-by: Max Filippov --- arch/xtensa/include/uapi/asm/ptrace.h | 3 ++- arch/xtensa/kernel/ptrace.c | 4 2

[PATCH] xtensa: add audit support

2020-07-18 Thread Max Filippov
All bits needed for syscall audit are present on xtensa. Add audit_syscall_entry and audit_syscall_exit calls and select HAVE_ARCH_AUDITSYSCALL in Kconfig. Signed-off-by: Max Filippov --- arch/xtensa/Kconfig | 1 + arch/xtensa/include/asm/thread_info.h | 4 +++- arch/xtensa

[PULL 0/3] xtensa fixes for v5.8

2020-07-12 Thread Max Filippov
build warning - update *pos in cpuinfo_op.next to avoid runtime warning - use for_each_set_bit in xtensa_pmu_irq_handler instead of open-coding it Max Filippov (2): xtensa: fix __sync_fetch_and_{and,or}_4 declarations

Re: xtensa-linux-ld: section .start VMA overlaps section .image VMA

2020-07-09 Thread Max Filippov
On Thu, Jul 9, 2020 at 12:37 PM kernel test robot wrote: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > master > head: 0bddd227f3dc55975e2b8dfa7fc6f959b062a2c7 > commit: 5e4417f921238b5acf101bfcd59a7b3463fb2dbd xtensa: reorganize vectors > placement > date:

Re: [PATCH] kernel: perf_event: use for_each_set_bit() to simplify the code

2020-07-08 Thread Max Filippov
On Tue, Jul 7, 2020 at 11:59 PM Xu Wang wrote: > > Using for_each_set_bit() to simplify the code. > > Signed-off-by: Xu Wang > --- > arch/xtensa/kernel/perf_event.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) Thanks! Applied to my xtensa tree with a slightly edited commit

Re: [PATCH] kbuild: do not export LDFLAGS_vmlinux

2020-07-01 Thread Max Filippov
On Wed, Jul 1, 2020 at 12:30 PM Masahiro Yamada wrote: [...] > diff --git a/arch/xtensa/boot/boot-elf/Makefile > b/arch/xtensa/boot/boot-elf/Makefile > index 12ae1e91cb75..c6538d3321b9 100644 > --- a/arch/xtensa/boot/boot-elf/Makefile > +++ b/arch/xtensa/boot/boot-elf/Makefile > @@ -25,7 +25,7

Re: [PATCH 25/25] mm/xtensa: Use mm_fault_accounting()

2020-06-15 Thread Max Filippov
On Mon, Jun 15, 2020 at 3:23 PM Peter Xu wrote: > > Use the new mm_fault_accounting() helper for page fault accounting. > > Avoid doing page fault accounting multiple times if the page fault is retried. > > CC: Chris Zankel > CC: Max Filippov > CC: linux-xte...@linux

[PATCH] kernel/modules: fix build without ARCH_HAS_STRICT_MODULE_RWX

2020-06-04 Thread Max Filippov
Make module_enable_ro() static again") Signed-off-by: Max Filippov --- kernel/module.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/module.c b/kernel/module.c index bca993c5f1bc..a74a29001814 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -2038,6 +2038,7 @@ static void modul

[PULL 0/5] xtensa updates for v5.8

2020-06-03 Thread Max Filippov
comments in entry.S Chris Packham (1): xtensa: Fix spelling/grammar in comment Max Filippov (4): xtensa: add missing __user annotations to __{get,put}_user_check xtensa: fix type conversion in __get_user_size xtensa

Re: [PATCH] xtensa: Fix spelling/grammar in comment

2020-05-25 Thread Max Filippov
On Mon, May 25, 2020 at 4:04 PM Chris Packham wrote: > > Change 'excpetion' to 'exception', 'handeled' to 'handled' and 'the the' > to 'the'. > > Signed-off-by: Chris Packham > --- > arch/xtensa/kernel/entry.S | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Thanks, applied to my

[PATCH] xtensa: fix flush_icache_user_range in noMMU configs

2020-05-25 Thread Max Filippov
: implicit declaration of function ‘flush_icache_user_range’ Move definition outside conditional compilation block. Fixes: 134d96d05d30 ("xtensa: implement flush_icache_user_range") Signed-off-by: Max Filippov --- arch/xtensa/include/asm/cacheflush.h | 4 ++-- 1 file changed, 2 insert

[PATCH] xtensa: fix error paths in __get_user_{check,size}

2020-05-22 Thread Max Filippov
Error paths in __get_user_check and __get_user_size directly assing 0 to the result. It causes the following sparse warnings: sparse: warning: Using plain integer as NULL pointer Convert 0 to the type pointed to by the user pointer before assigning it. Signed-off-by: Max Filippov --- arch

Re: [PATCH 0/3] xtensa: clean up __user annotations in asm/uaccess.h

2020-05-22 Thread Max Filippov
On Fri, May 22, 2020 at 2:58 PM Al Viro wrote: > > On Fri, May 22, 2020 at 02:41:50PM -0700, Max Filippov wrote: > Useful test: > > void __user *f(void __user * __user *p) > { > void __user *q; > (void)get_user(q, p); > return q; > } I thin

[PATCH 0/3] xtensa: clean up __user annotations in asm/uaccess.h

2020-05-22 Thread Max Filippov
Hello, this series adds missing __user annotations to functions in asm/uaccess.h. It fixes a bunch of sparse warnings for otherwise correct code. Max Filippov (3): xtensa: add missing __user annotations to __{get,put}_user_check xtensa: fix type conversion in __get_user_size xtensa: add

[PATCH 1/3] xtensa: add missing __user annotations to __{get,put}_user_check

2020-05-22 Thread Max Filippov
: incorrect type in argument 1 (different address spaces) sparse:expected void [noderef] *to sparse:got long *__pu_addr Add __user annotation to temporary pointer in __get_user_check and __put_user_check. Reported-by: kbuild test robot Reported-by: Arnd Bergmann Signed-off-by: Max Filippov

[PATCH 3/3] xtensa: add missing __user annotations to asm/uaccess.h

2020-05-22 Thread Max Filippov
clear_user, strncpy_user, strnlen_user and their helpers operate on user pointers, but don't have their arguments marked as __user. Add __user annotation to userspace pointers of those functions. Fix open-coded access check in the strnlen_user while at it. Signed-off-by: Max Filippov --- arch

[PATCH 2/3] xtensa: fix type conversion in __get_user_size

2020-05-22 Thread Max Filippov
the __typeof__ and add indirection outside. Signed-off-by: Max Filippov --- arch/xtensa/include/asm/uaccess.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/xtensa/include/asm/uaccess.h b/arch/xtensa/include/asm/uaccess.h index 754a7c96b9da..445bb4cf3c28 100644 --- a/arch/xtensa

Re: xtensa question, was Re: [PATCH V1 00/10] Remove duplicated kmap code

2020-05-01 Thread Max Filippov
On Fri, May 1, 2020 at 2:19 AM Christoph Hellwig wrote: > > On Fri, May 01, 2020 at 02:02:19AM -0700, Max Filippov wrote: > > Hi Christoph, > > > > On Fri, May 1, 2020 at 1:46 AM Christoph Hellwig wrote: > > > any idea why xtensa uses PAGE_KERNEL_EXEC instead o

Re: xtensa question, was Re: [PATCH V1 00/10] Remove duplicated kmap code

2020-05-01 Thread Max Filippov
Hi Christoph, On Fri, May 1, 2020 at 1:46 AM Christoph Hellwig wrote: > any idea why xtensa uses PAGE_KERNEL_EXEC instead of PAGE_KERNEL > for kmap_prot? Mapping all mapped highmem as executable seems rather > dangerous. I sure do: to allow instruction cache flushing when writing to high user

[PULL 0/6] xtensa fixes for v5.4-rc4

2019-10-17 Thread Max Filippov
; - fix warning about static EXPORT_SYMBOL from modpost; - fix PCI IO ports mapping for the virt board; - fix pasto in change_bit for exclusive access option. Al Viro (1): xtensa: fix {get,put}_user() for 64bit values Max

Re: [PATCH] xtensa: implement arch_dma_coherent_to_pfn

2019-10-16 Thread Max Filippov
Hi Christoph, On Wed, Oct 16, 2019 at 12:08 AM Christoph Hellwig wrote: > On Tue, Oct 15, 2019 at 02:25:26PM -0700, Max Filippov wrote: > > Add trivial implementation for arch_dma_coherent_to_pfn. > > This change enables communication with PCI ALSA devices through mmap

[PATCH] xtensa: implement arch_dma_coherent_to_pfn

2019-10-15 Thread Max Filippov
Add trivial implementation for arch_dma_coherent_to_pfn. This change enables communication with PCI ALSA devices through mmapped buffers. Signed-off-by: Max Filippov --- arch/xtensa/Kconfig | 1 + arch/xtensa/kernel/pci-dma.c | 6 ++ 2 files changed, 7 insertions(+) diff --git

Re: [PATCH 20/34] xtensa: Use CONFIG_PREEMPTION

2019-10-15 Thread Max Filippov
t; > Switch the entry code over to use CONFIG_PREEMPTION. Add PREEMPT_RT > output to die(). > > Cc: Chris Zankel > Cc: Max Filippov > Cc: linux-xte...@linux-xtensa.org > Signed-off-by: Thomas Gleixner > [bigeasy: +traps.c] > Signed-off-by: Sebastian Andrzej Siewior &g

[PATCH v3 3/3] xtensa: fix type conversion in __get_user_[no]check

2019-10-14 Thread Max Filippov
cases. This may add at most 1 cycle to the fast path, but saves an instruction and two padding bytes in the fixup section for each use of this macro and works for both misaligned store and store exception. Signed-off-by: Max Filippov --- Changes v2->v3: - rearrange result zero-initializat

[PATCH v3 0/3] xtensa: fix {get,put}_user() for 64bit values

2019-10-14 Thread Max Filippov
ent constraint for error code - rearrange result zero-initialization for error paths in __get_user_asm Changes v1->v2: - initialize result when access_ok check fails in __get_user_check - initialize result in __get_user_asm for unaligned access Al Viro (1): xtensa: fix {get,put}_user() for 64bit value

[PATCH v3 1/3] xtensa: fix {get,put}_user() for 64bit values

2019-10-14 Thread Max Filippov
it to v32, truncating it in process. Current code, OTOH, reads 8 bytes of data and stores them at the address of v32, stomping on the 4 bytes that follow v32 itself. Signed-off-by: Al Viro Signed-off-by: Max Filippov --- arch/xtensa/include/asm/uaccess.h | 13 +++-- 1 file changed, 11

[PATCH v3 2/3] xtensa: clean up assembly arguments in uaccess macros

2019-10-14 Thread Max Filippov
of having it as both input and output. Signed-off-by: Max Filippov --- Changes v2->v3: - fix assembly argument constraint for error code arch/xtensa/include/asm/uaccess.h | 42 +++ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/arch/xtensa/include/

[PATCH v2 4/4] xtensa: initialize result in __get_user_asm for unaligned access

2019-10-11 Thread Max Filippov
__get_user_asm macro leaves result register uninitialized when alignment check fails. Add 'insn' parameter to __check_align_{1,2,4} and pass an instruction that initializes result register from __get_user_asm. Signed-off-by: Max Filippov --- arch/xtensa/include/asm/uaccess.h | 12

[PATCH v2 3/4] xtensa: fix type conversion in __get_user_[no]check

2019-10-11 Thread Max Filippov
to (x) as it may not always be integer-compatible now and issue warning even when it's going to be optimized. Instead do (x) = 0; and call __get_user_bad separately. Signed-off-by: Max Filippov --- Changes v1->v2: - initialize result when access_ok check fails in __get_user_check arch/xte

[PATCH v2 0/4] xtensa: fix {get,put}_user() for 64bit values

2019-10-11 Thread Max Filippov
hen access_ok check fails in __get_user_check - initialize result in __get_user_asm for unaligned access Al Viro (1): xtensa: fix {get,put}_user() for 64bit values Max Filippov (3): xtensa: clean up assembly arguments in uaccess macros xtensa: fix type conversion in __get_user_[no]check xte

  1   2   3   4   5   6   7   8   9   >