28 Oct, 2020

1 commit


27 Oct, 2020

1 commit


09 Sep, 2020

1 commit

  • Add a CONFIG_SET_FS option that is selected by architecturess that
    implement set_fs, which is all of them initially. If the option is not
    set stubs for routines related to overriding the address space are
    provided so that architectures can start to opt out of providing set_fs.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Kees Cook
    Signed-off-by: Al Viro

    Christoph Hellwig
     

05 Jul, 2020

1 commit

  • All architectures support copy_thread_tls() now, so remove the legacy
    copy_thread() function and the HAVE_COPY_THREAD_TLS config option. Everyone
    uses the same process creation calling convention based on
    copy_thread_tls() and struct kernel_clone_args. This will make it easier to
    maintain the core process creation code under kernel/, simplifies the
    callpaths and makes the identical for all architectures.

    Cc: linux-arch@vger.kernel.org
    Acked-by: Thomas Bogendoerfer
    Acked-by: Greentime Hu
    Acked-by: Geert Uytterhoeven
    Reviewed-by: Kees Cook
    Signed-off-by: Christian Brauner

    Christian Brauner
     

08 Apr, 2020

1 commit

  • Pull OpenRISC updates from Stafford Horne:
    "A few cleanups all over the place, things of note:

    - Enable the clone3 syscall

    - Remove CONFIG_CROSS_COMPILE from Krzysztof Kozlowski

    - Update to use mmgrab from Julia Lawall"

    * tag 'for-linus' of git://github.com/openrisc/linux:
    openrisc: Remove obsolete show_trace_task function
    openrisc: Cleanup copy_thread_tls docs and comments
    openrisc: Enable the clone3 syscall
    openrisc: Convert copy_thread to copy_thread_tls
    openrisc: use mmgrab
    openrisc: configs: Cleanup CONFIG_CROSS_COMPILE

    Linus Torvalds
     

16 Mar, 2020

1 commit


02 Mar, 2020

1 commit


23 Nov, 2019

1 commit


15 Jun, 2019

1 commit

  • The kbuild documentation clearly shows that the documents
    there are written at different times: some use markdown,
    some use their own peculiar logic to split sections.

    Convert everything to ReST without affecting too much
    the author's style and avoiding adding uneeded markups.

    The conversion is actually:
    - add blank lines and identation in order to identify paragraphs;
    - fix tables markups;
    - add some lists markups;
    - mark literal blocks;
    - adjust title markups.

    At its new index.rst, let's add a :orphan: while this is not linked to
    the main index.rst file, in order to avoid build warnings.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

07 May, 2019

1 commit

  • Pull locking updates from Ingo Molnar:
    "Here are the locking changes in this cycle:

    - rwsem unification and simpler micro-optimizations to prepare for
    more intrusive (and more lucrative) scalability improvements in
    v5.3 (Waiman Long)

    - Lockdep irq state tracking flag usage cleanups (Frederic
    Weisbecker)

    - static key improvements (Jakub Kicinski, Peter Zijlstra)

    - misc updates, cleanups and smaller fixes"

    * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (26 commits)
    locking/lockdep: Remove unnecessary unlikely()
    locking/static_key: Don't take sleeping locks in __static_key_slow_dec_deferred()
    locking/static_key: Factor out the fast path of static_key_slow_dec()
    locking/static_key: Add support for deferred static branches
    locking/lockdep: Test all incompatible scenarios at once in check_irq_usage()
    locking/lockdep: Avoid bogus Clang warning
    locking/lockdep: Generate LOCKF_ bit composites
    locking/lockdep: Use expanded masks on find_usage_*() functions
    locking/lockdep: Map remaining magic numbers to lock usage mask names
    locking/lockdep: Move valid_state() inside CONFIG_TRACE_IRQFLAGS && CONFIG_PROVE_LOCKING
    locking/rwsem: Prevent unneeded warning during locking selftest
    locking/rwsem: Optimize rwsem structure for uncontended lock acquisition
    locking/rwsem: Enable lock event counting
    locking/lock_events: Don't show pvqspinlock events on bare metal
    locking/lock_events: Make lock_events available for all archs & other locks
    locking/qspinlock_stat: Introduce generic lockevent_*() counting APIs
    locking/rwsem: Enhance DEBUG_RWSEMS_WARN_ON() macro
    locking/rwsem: Add debug check for __down_read*()
    locking/rwsem: Micro-optimize rwsem_try_read_lock_unqueued()
    locking/rwsem: Move rwsem internal function declarations to rwsem-xadd.h
    ...

    Linus Torvalds
     

03 Apr, 2019

2 commits

  • Currently, we have two different implementation of rwsem:

    1) CONFIG_RWSEM_GENERIC_SPINLOCK (rwsem-spinlock.c)
    2) CONFIG_RWSEM_XCHGADD_ALGORITHM (rwsem-xadd.c)

    As we are going to use a single generic implementation for rwsem-xadd.c
    and no architecture-specific code will be needed, there is no point
    in keeping two different implementations of rwsem. In most cases, the
    performance of rwsem-spinlock.c will be worse. It also doesn't get all
    the performance tuning and optimizations that had been implemented in
    rwsem-xadd.c over the years.

    For simplication, we are going to remove rwsem-spinlock.c and make all
    architectures use a single implementation of rwsem - rwsem-xadd.c.

    All references to RWSEM_GENERIC_SPINLOCK and RWSEM_XCHGADD_ALGORITHM
    in the code are removed.

    Suggested-by: Peter Zijlstra
    Signed-off-by: Waiman Long
    Signed-off-by: Peter Zijlstra (Intel)
    Acked-by: Linus Torvalds
    Cc: Andrew Morton
    Cc: Arnd Bergmann
    Cc: Borislav Petkov
    Cc: Davidlohr Bueso
    Cc: H. Peter Anvin
    Cc: Paul E. McKenney
    Cc: Thomas Gleixner
    Cc: Tim Chen
    Cc: Will Deacon
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-c6x-dev@linux-c6x.org
    Cc: linux-m68k@lists.linux-m68k.org
    Cc: linux-riscv@lists.infradead.org
    Cc: linux-um@lists.infradead.org
    Cc: linux-xtensa@linux-xtensa.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: nios2-dev@lists.rocketboards.org
    Cc: openrisc@lists.librecores.org
    Cc: uclinux-h8-devel@lists.sourceforge.jp
    Link: https://lkml.kernel.org/r/20190322143008.21313-3-longman@redhat.com
    Signed-off-by: Ingo Molnar

    Waiman Long
     
  • For the architectures that do not implement their own tlb_flush() but
    do already use the generic mmu_gather, there are two options:

    1) the platform has an efficient flush_tlb_range() and
    asm-generic/tlb.h doesn't need any overrides at all.

    2) the platform lacks an efficient flush_tlb_range() and
    we select MMU_GATHER_NO_RANGE to minimize full invalidates.

    Convert all 'simple' architectures to one of these two forms.

    alpha: has no range invalidate -> 2
    arc: already used flush_tlb_range() -> 1
    c6x: has no range invalidate -> 2
    hexagon: has an efficient flush_tlb_range() -> 1
    (flush_tlb_mm() is in fact a full range invalidate,
    so no need to shoot down everything)
    m68k: has inefficient flush_tlb_range() -> 2
    microblaze: has no flush_tlb_range() -> 2
    mips: has efficient flush_tlb_range() -> 1
    (even though it currently seems to use flush_tlb_mm())
    nds32: already uses flush_tlb_range() -> 1
    nios2: has inefficient flush_tlb_range() -> 2
    (no limit on range iteration)
    openrisc: has inefficient flush_tlb_range() -> 2
    (no limit on range iteration)
    parisc: already uses flush_tlb_range() -> 1
    sparc32: already uses flush_tlb_range() -> 1
    unicore32: has inefficient flush_tlb_range() -> 2
    (no limit on range iteration)
    xtensa: has efficient flush_tlb_range() -> 1

    Note this also fixes a bug in the existing code for a number
    platforms. Those platforms that did:

    tlb_end_vma() -> if (!full_mm) flush_tlb_*()
    tlb_flush -> if (full_mm) flush_tlb_mm()

    missed the case of shift_arg_pages(), which doesn't have @fullmm set,
    nor calls into tlb_*vma(), but still frees page-tables and thus needs
    an invalidate. The new code handles this by detecting a non-empty
    range, and either issuing the matching range invalidate or a full
    invalidate, depending on the capabilities.

    No change in behavior intended.

    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Andrew Morton
    Cc: Andy Lutomirski
    Cc: Aneesh Kumar K.V
    Cc: Borislav Petkov
    Cc: Dave Hansen
    Cc: David S. Miller
    Cc: Greentime Hu
    Cc: Guan Xuetao
    Cc: H. Peter Anvin
    Cc: Helge Deller
    Cc: Jonas Bonn
    Cc: Ley Foon Tan
    Cc: Linus Torvalds
    Cc: Mark Salter
    Cc: Max Filippov
    Cc: Michal Simek
    Cc: Nick Piggin
    Cc: Paul Burton
    Cc: Peter Zijlstra
    Cc: Richard Henderson
    Cc: Richard Kuo
    Cc: Rik van Riel
    Cc: Thomas Gleixner
    Cc: Vineet Gupta
    Cc: Will Deacon
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

19 Feb, 2019

1 commit

  • All new 32-bit architectures should have 64-bit userspace off_t type, but
    existing architectures has 32-bit ones.

    To enforce the rule, new config option is added to arch/Kconfig that defaults
    ARCH_32BIT_OFF_T to be disabled for new 32-bit architectures. All existing
    32-bit architectures enable it explicitly.

    New option affects force_o_largefile() behaviour. Namely, if userspace
    off_t is 64-bits long, we have no reason to reject user to open big files.

    Note that even if architectures has only 64-bit off_t in the kernel
    (arc, c6x, h8300, hexagon, nios2, openrisc, and unicore32),
    a libc may use 32-bit off_t, and therefore want to limit the file size
    to 4GB unless specified differently in the open flags.

    Signed-off-by: Yury Norov
    Acked-by: Arnd Bergmann
    Signed-off-by: Yury Norov
    Signed-off-by: Arnd Bergmann

    Yury Norov
     

30 Dec, 2018

1 commit

  • Pull Kconfig updates from Masahiro Yamada:

    - support -y option for merge_config.sh to avoid downgrading =y to =m

    - remove S_OTHER symbol type, and touch include/config/*.h files correctly

    - fix file name and line number in lexer warnings

    - fix memory leak when EOF is encountered in quotation

    - resolve all shift/reduce conflicts of the parser

    - warn no new line at end of file

    - make 'source' statement more strict to take only string literal

    - rewrite the lexer and remove the keyword lookup table

    - convert to SPDX License Identifier

    - compile C files independently instead of including them from zconf.y

    - fix various warnings of gconfig

    - misc cleanups

    * tag 'kconfig-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (39 commits)
    kconfig: surround dbg_sym_flags with #ifdef DEBUG to fix gconf warning
    kconfig: split images.c out of qconf.cc/gconf.c to fix gconf warnings
    kconfig: add static qualifiers to fix gconf warnings
    kconfig: split the lexer out of zconf.y
    kconfig: split some C files out of zconf.y
    kconfig: convert to SPDX License Identifier
    kconfig: remove keyword lookup table entirely
    kconfig: update current_pos in the second lexer
    kconfig: switch to ASSIGN_VAL state in the second lexer
    kconfig: stop associating kconf_id with yylval
    kconfig: refactor end token rules
    kconfig: stop supporting '.' and '/' in unquoted words
    treewide: surround Kconfig file paths with double quotes
    microblaze: surround string default in Kconfig with double quotes
    kconfig: use T_WORD instead of T_VARIABLE for variables
    kconfig: use specific tokens instead of T_ASSIGN for assignments
    kconfig: refactor scanning and parsing "option" properties
    kconfig: use distinct tokens for type and default properties
    kconfig: remove redundant token defines
    kconfig: rename depends_list to comment_option_list
    ...

    Linus Torvalds
     

21 Dec, 2018

1 commit

  • The Kconfig lexer supports special characters such as '.' and '/' in
    the parameter context. In my understanding, the reason is just to
    support bare file paths in the source statement.

    I do not see a good reason to complicate Kconfig for the room of
    ambiguity.

    The majority of code already surrounds file paths with double quotes,
    and it makes sense since file paths are constant string literals.

    Make it treewide consistent now.

    Signed-off-by: Masahiro Yamada
    Acked-by: Wolfram Sang
    Acked-by: Geert Uytterhoeven
    Acked-by: Ingo Molnar

    Masahiro Yamada
     

14 Dec, 2018

1 commit

  • All architectures except for sparc64 use the dma-direct code in some
    form, and even for sparc64 we had the discussion of a direct mapping
    mode a while ago. In preparation for directly calling the direct
    mapping code don't bother having it optionally but always build the
    code in. This is a minor hardship for some powerpc and arm configs
    that don't pull it in yet (although they should in a relase ot two),
    and sparc64 which currently doesn't need it at all, but it will
    reduce the ifdef mess we'd otherwise need significantly.

    Signed-off-by: Christoph Hellwig
    Acked-by: Jesper Dangaard Brouer
    Tested-by: Jesper Dangaard Brouer
    Tested-by: Tony Luck

    Christoph Hellwig
     

31 Oct, 2018

2 commits

  • All architecures use memblock for early memory management. There is no need
    for the CONFIG_HAVE_MEMBLOCK configuration option.

    [rppt@linux.vnet.ibm.com: of/fdt: fixup #ifdefs]
    Link: http://lkml.kernel.org/r/20180919103457.GA20545@rapoport-lnx
    [rppt@linux.vnet.ibm.com: csky: fixups after bootmem removal]
    Link: http://lkml.kernel.org/r/20180926112744.GC4628@rapoport-lnx
    [rppt@linux.vnet.ibm.com: remove stale #else and the code it protects]
    Link: http://lkml.kernel.org/r/1538067825-24835-1-git-send-email-rppt@linux.vnet.ibm.com
    Link: http://lkml.kernel.org/r/1536927045-23536-4-git-send-email-rppt@linux.vnet.ibm.com
    Signed-off-by: Mike Rapoport
    Acked-by: Michal Hocko
    Tested-by: Jonathan Cameron
    Cc: Catalin Marinas
    Cc: Chris Zankel
    Cc: "David S. Miller"
    Cc: Geert Uytterhoeven
    Cc: Greentime Hu
    Cc: Greg Kroah-Hartman
    Cc: Guan Xuetao
    Cc: Ingo Molnar
    Cc: "James E.J. Bottomley"
    Cc: Jonas Bonn
    Cc: Jonathan Corbet
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Martin Schwidefsky
    Cc: Matt Turner
    Cc: Michael Ellerman
    Cc: Michal Simek
    Cc: Palmer Dabbelt
    Cc: Paul Burton
    Cc: Richard Kuo
    Cc: Richard Weinberger
    Cc: Rich Felker
    Cc: Russell King
    Cc: Serge Semin
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Vineet Gupta
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     
  • All achitectures select NO_BOOTMEM which essentially becomes 'Y' for any
    kernel configuration and therefore it can be removed.

    [alexander.h.duyck@linux.intel.com: remove now defunct NO_BOOTMEM from depends list for deferred init]
    Link: http://lkml.kernel.org/r/20180925201814.3576.15105.stgit@localhost.localdomain
    Link: http://lkml.kernel.org/r/1536927045-23536-3-git-send-email-rppt@linux.vnet.ibm.com
    Signed-off-by: Mike Rapoport
    Signed-off-by: Alexander Duyck
    Acked-by: Michal Hocko
    Cc: Catalin Marinas
    Cc: Chris Zankel
    Cc: "David S. Miller"
    Cc: Geert Uytterhoeven
    Cc: Greentime Hu
    Cc: Greg Kroah-Hartman
    Cc: Guan Xuetao
    Cc: Ingo Molnar
    Cc: "James E.J. Bottomley"
    Cc: Jonas Bonn
    Cc: Jonathan Corbet
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Martin Schwidefsky
    Cc: Matt Turner
    Cc: Michael Ellerman
    Cc: Michal Simek
    Cc: Palmer Dabbelt
    Cc: Paul Burton
    Cc: Richard Kuo
    Cc: Richard Weinberger
    Cc: Rich Felker
    Cc: Russell King
    Cc: Serge Semin
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Vineet Gupta
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     

20 Sep, 2018

1 commit


24 Aug, 2018

1 commit

  • Pull OpenRISC update from Stafford Horne:
    "Just one change for 4.19: refactoring from Christoph Hellwig to use
    generic DMA facilities"

    * tag 'for-linus' of git://github.com/openrisc/linux:
    openrisc: use generic dma_noncoherent_ops
    openrisc: fix cache maintainance the the sync_single_for_device DMA operation
    openrisc: remove the no-op unmap_page and unmap_sg DMA operations
    openrisc: remove the sync_single_for_cpu DMA operation

    Linus Torvalds
     

16 Aug, 2018

1 commit

  • Pull Kconfig consolidation from Masahiro Yamada:
    "Consolidation of Kconfig files by Christoph Hellwig.

    Move the source statements of arch-independent Kconfig files instead
    of duplicating the includes in every arch/$(SRCARCH)/Kconfig"

    * tag 'kconfig-v4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kconfig: add a Memory Management options" menu
    kconfig: move the "Executable file formats" menu to fs/Kconfig.binfmt
    kconfig: use a menu in arch/Kconfig to reduce clutter
    kconfig: include kernel/Kconfig.preempt from init/Kconfig
    Kconfig: consolidate the "Kernel hacking" menu
    kconfig: include common Kconfig files from top-level Kconfig
    kconfig: remove duplicate SWAP symbol defintions
    um: create a proper drivers Kconfig
    um: cleanup Kconfig files
    um: stop abusing KBUILD_KCONFIG

    Linus Torvalds
     

03 Aug, 2018

1 commit

  • It appears that openrisc copied arm64's GENERIC_IRQ_MULTI_HANDLER code
    (which came from arm). Cnvert it to use the generic version.

    Signed-off-by: Palmer Dabbelt
    Signed-off-by: Thomas Gleixner
    Acked-by: Stafford Horne
    Cc: linux@armlinux.org.uk
    Cc: catalin.marinas@arm.com
    Cc: Will Deacon
    Cc: jonas@southpole.se
    Cc: stefan.kristiansson@saunalahti.fi
    Cc: jason@lakedaemon.net
    Cc: marc.zyngier@arm.com
    Cc: Arnd Bergmann
    Cc: nicolas.pitre@linaro.org
    Cc: vladimir.murzin@arm.com
    Cc: keescook@chromium.org
    Cc: jinb.park7@gmail.com
    Cc: yamada.masahiro@socionext.com
    Cc: alexandre.belloni@bootlin.com
    Cc: pombredanne@nexb.com
    Cc: Greg KH
    Cc: kstewart@linuxfoundation.org
    Cc: jhogan@kernel.org
    Cc: mark.rutland@arm.com
    Cc: ard.biesheuvel@linaro.org
    Cc: james.morse@arm.com
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: openrisc@lists.librecores.org
    Link: https://lkml.kernel.org/r/20180622170126.6308-5-palmer@sifive.com

    Palmer Dabbelt
     

02 Aug, 2018

3 commits

  • Almost all architectures include it. Add a ARCH_NO_PREEMPT symbol to
    disable preempt support for alpha, hexagon, non-coldfire m68k and
    user mode Linux.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Masahiro Yamada

    Christoph Hellwig
     
  • Move the source of lib/Kconfig.debug and arch/$(ARCH)/Kconfig.debug to
    the top-level Kconfig. For two architectures that means moving their
    arch-specific symbols in that menu into a new arch Kconfig.debug file,
    and for a few more creating a dummy file so that we can include it
    unconditionally.

    Also move the actual 'Kernel hacking' menu to lib/Kconfig.debug, where
    it belongs.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Masahiro Yamada

    Christoph Hellwig
     
  • Instead of duplicating the source statements in every architecture just
    do it once in the toplevel Kconfig file.

    Note that with this the inclusion of arch/$(SRCARCH/Kconfig moves out of
    the top-level Kconfig into arch/Kconfig so that don't violate ordering
    constraits while keeping a sensible menu structure.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Masahiro Yamada

    Christoph Hellwig
     

21 Jul, 2018

1 commit


04 Apr, 2018

1 commit

  • arm has an optional MULTI_IRQ_HANDLER, which openrisc copied but didn't
    make optional. The multi irq handler infrastructure has been copied to
    generic code selectable with a new config symbol. That symbol can be
    selected by randconfig builds and can cause build breakage.

    Introduce CONFIG_MULTI_IRQ_HANDLER as an intermediate step which prevents
    the core config symbol from being selected. The openrisc local config
    symbol will be removed once openrisc gets converted to the generic code.

    Signed-off-by: Palmer Dabbelt
    Signed-off-by: Thomas Gleixner
    Cc: Linus Torvalds
    Cc: Arnd Bergmann
    Link: https://lkml.kernel.org/r/20180404043130.31277-3-palmer@sifive.com

    Palmer Dabbelt
     

14 Nov, 2017

1 commit

  • Pull OpenRISC updates from Stafford Horne:
    "The OpenRISC work is a bit more interesting this time, adding SMP
    support and a few general cleanups.

    Small Things:

    - Move OpenRISC docs into Documentation and clean them up

    - Document previously undocumented devicetree bindings

    - Update the or1ksim dts to use stdout-path

    OpenRISC SMP support details:

    - First the "use shadow registers" and "define CPU_BIG_ENDIAN as
    true" get the architecture ready for SMP.

    - The "add 1 and 2 byte cmpxchg support" and "use qspinlocks and
    qrwlocks" add the SMP locking infrastructure as needed. Using the
    qspinlocks and qrwlocks as suggested by Peter Z while reviewing the
    original spinlocks implementation.

    - The "support for ompic" adds a new irqchip device which is used for
    IPI communication to support SMP.

    - The "initial SMP support" adds smp.c and makes changes to all of
    the necessary data-structures to be per-cpu.

    The remaining patches are bug fixes and debug helpers which I wanted
    to keep separate from the "initial SMP support" in order to allow them
    to be reviewed on their own. This includes:

    - add cacheflush support to fix icache aliasing

    - fix initial preempt state for secondary cpu tasks

    - sleep instead of spin on secondary wait

    - support framepointers and STACKTRACE_SUPPORT

    - enable LOCKDEP_SUPPORT and irqflags tracing

    - timer sync: Add tick timer sync logic

    - fix possible deadlock in timer sync, pointed out by mips guys

    Note: the irqchip patch was reviewed with Marc and we agreed to push
    it together with these patches"

    * tag 'for-linus' of git://github.com/openrisc/linux:
    openrisc: fix possible deadlock scenario during timer sync
    openrisc: pass endianness info to sparse
    openrisc: add tick timer multi-core sync logic
    openrisc: enable LOCKDEP_SUPPORT and irqflags tracing
    openrisc: support framepointers and STACKTRACE_SUPPORT
    openrisc: add simple_smp dts and defconfig for simulators
    openrisc: add cacheflush support to fix icache aliasing
    openrisc: sleep instead of spin on secondary wait
    openrisc: fix initial preempt state for secondary cpu tasks
    openrisc: initial SMP support
    irqchip: add initial support for ompic
    dt-bindings: add openrisc to vendor prefixes list
    openrisc: use qspinlocks and qrwlocks
    openrisc: add 1 and 2 byte cmpxchg support
    openrisc: use shadow registers to save regs on exception
    dt-bindings: openrisc: Add OpenRISC platform SoC
    Documentation: openrisc: Updates to README
    Documentation: Move OpenRISC docs out of arch/
    MAINTAINERS: Add OpenRISC pic maintainer
    openrisc: dts: or1ksim: Add stdout-path

    Linus Torvalds
     

03 Nov, 2017

7 commits

  • Lockdep is needed for proving the spinlocks and rwlocks work fine on our
    platform. It also requires calling the trace_hardirqs_off() and
    trace_hardirqs_on() pair of routines when entering and exiting an
    interrupt.

    For OpenRISC the interrupt stack frame does not support frame pointers,
    so to call trace_hardirqs_on() and trace_hardirqs_off() here the macro's
    build up a stack frame each time.

    There is one necessary small change in _sys_call_handler to move
    interrupt enabling later so they can get re-enabled during syscall
    restart. This was done to fix lockdep warnings that are now possible due
    to this
    patch.

    Signed-off-by: Stafford Horne

    Stafford Horne
     
  • For lockdep support a reliable stack trace mechanism is needed. This
    patch adds support in OpenRISC for the stacktrace framework, implemented
    by a simple unwinder api. The unwinder api supports both framepointer
    and basic stack tracing.

    The unwinder is now used to replace the stack_dump() implementation as
    well. The new traces are inline with other architectures trace format:

    Call trace:
    [] show_stack+0x3c/0x58
    [] dump_stack+0xa8/0xe4
    [] __cpu_up+0x64/0x130
    [] bringup_cpu+0x3c/0x178
    [] cpuhp_invoke_callback+0xa8/0x1fc
    [] cpuhp_up_callbacks+0x44/0x14c
    [] cpu_up+0x14c/0x1bc
    [] smp_init+0x104/0x15c
    [] ? kernel_init+0x0/0x140
    [] kernel_init_freeable+0xbc/0x25c
    [] ? kernel_init+0x0/0x140
    [] kernel_init+0x1c/0x140
    [] ? schedule_tail+0x18/0xa0
    [] ret_from_fork+0x1c/0x9c

    Signed-off-by: Stafford Horne

    Stafford Horne
     
  • On OpenRISC the icache does not snoop data stores. This can cause
    aliasing as reported by Jan. This patch fixes the issue to ensure icache
    is properly synchronized when code is written to memory. It supports both
    SMP and UP flushing.

    This supports dcache flush as well for architectures that do not support
    write-through caches; most OpenRISC implementations do implement
    write-through cache however. Dcache flushes are done only on a single
    core as OpenRISC dcaches all support snooping of bus stores.

    Signed-off-by: Jan Henrik Weinstock
    [shorne@gmail.com: Squashed patches and wrote commit message]
    Signed-off-by: Stafford Horne

    Jan Henrik Weinstock
     
  • This patch introduces the SMP support for the OpenRISC architecture.
    The SMP architecture requires cores which have multi-core features which
    have been introduced a few years back including:

    - New SPRS SPR_COREID SPR_NUMCORES
    - Shadow SPRs
    - Atomic Instructions
    - Cache Coherency
    - A wired in IPI controller

    This patch adds all of the SMP specific changes to core infrastructure,
    it looks big but it needs to go all together as its hard to split this
    one up.

    Boot loader spinning of second cpu is not supported yet, it's assumed
    that Linux is booted straight after cpu reset.

    The bulk of these changes are trivial changes to refactor to use per cpu
    data structures throughout. The addition of the smp.c and changes in
    time.c are the changes. Some specific notes:

    MM changes
    ----------
    The reason why this is created as an array, and not with DEFINE_PER_CPU
    is that doing it this way, we'll save a load in the tlb-miss handler
    (the load from __per_cpu_offset).

    TLB Flush
    ---------
    The SMP implementation of flush_tlb_* works by sending out a
    function-call IPI to all the non-local cpus by using the generic
    on_each_cpu() function.

    Currently, all flush_tlb_* functions will result in a flush_tlb_all(),
    which has always been the behaviour in the UP case.

    CPU INFO
    --------
    This creates a per cpu cpuinfo struct and fills it out accordingly for
    each activated cpu. show_cpuinfo is also updated to reflect new version
    information in later versions of the spec.

    SMP API
    -------
    This imitates the arm64 implementation by having a smp_cross_call
    callback that can be set by set_smp_cross_call to initiate an IPI and a
    handle_IPI function that is expected to be called from an IPI irqchip
    driver.

    Signed-off-by: Stefan Kristiansson
    [shorne@gmail.com: added cpu stop, checkpatch fixes, wrote commit message]
    Signed-off-by: Stafford Horne

    Stefan Kristiansson
     
  • IPI driver for the Open Multi-Processor Interrupt Controller (ompic) as
    described in the Multi-core support section of the OpenRISC 1.2
    architecture specification:

    https://github.com/openrisc/doc/raw/master/openrisc-arch-1.2-rev0.pdf

    Each OpenRISC core contains a full interrupt controller which is used in
    the SMP architecture for interrupt balancing. This IPI device, the
    ompic, is the only external device required for enabling SMP on
    OpenRISC.

    Pending ops are stored in a memory bit mask which can allow multiple
    pending operations to be set and serviced at a time. This is mostly
    borrowed from the alpha IPI implementation.

    Reviewed-by: Marc Zyngier
    Acked-by: Rob Herring
    Signed-off-by: Stefan Kristiansson
    [shorne@gmail.com: converted ops to bitmask, wrote commit message]
    Signed-off-by: Stafford Horne

    Stafford Horne
     
  • Enable OpenRISC to use qspinlocks and qrwlocks for upcoming SMP support.

    Signed-off-by: Stafford Horne

    Stafford Horne
     
  • Previously, the area between 0x0-0x100 have been used as a "scratch"
    memory area to temporarily store regs during exception entry. In a
    multi-core environment, this will not work.

    This change is to use shadow registers for nested context.

    Currently only the "critical" temp load/stores are covered, the
    EMERGENCY_PRINT ones are left as is (when they are used, it's game over
    anyway), they need to be handled as well in the future.

    Signed-off-by: Stefan Kristiansson
    Signed-off-by: Stafford Horne

    Stefan Kristiansson
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

09 Sep, 2017

1 commit

  • Patch series "Define CPU_BIG_ENDIAN or warn for inconsistencies", v3.

    While working on enabling queued rwlock on SPARC, found this following
    code in include/asm-generic/qrwlock.h which uses CONFIG_CPU_BIG_ENDIAN to
    clear a byte.

    static inline u8 *__qrwlock_write_byte(struct qrwlock *lock)
    {
    return (u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN);
    }

    Problem is many of the fixed big endian architectures don't define
    CPU_BIG_ENDIAN and clears the wrong byte.

    Define CPU_BIG_ENDIAN for all the fixed big endian architecture to fix it.

    Also found few more references of this config parameter in
    drivers/of/base.c
    drivers/of/fdt.c
    drivers/tty/serial/earlycon.c
    drivers/tty/serial/serial_core.c
    Be aware that this may cause regressions if someone has worked-around
    problems in the above code already. Remove the work-around.

    Here is our original discussion
    https://lkml.org/lkml/2017/5/24/620

    Link: http://lkml.kernel.org/r/1499358861-179979-2-git-send-email-babu.moger@oracle.com
    Signed-off-by: Babu Moger
    Suggested-by: Arnd Bergmann
    Acked-by: Geert Uytterhoeven
    Acked-by: David S. Miller
    Acked-by: Stafford Horne
    Cc: Yoshinori Sato
    Cc: Jonas Bonn
    Cc: Stefan Kristiansson
    Cc: "James E.J. Bottomley"
    Cc: Helge Deller
    Cc: Alexander Viro
    Cc: Michal Simek
    Cc: Michael Ellerman (powerpc)
    Cc: Peter Zijlstra
    Cc: Ingo Molnar
    Cc: Max Filippov
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Babu Moger
     

06 Feb, 2017

1 commit


12 Dec, 2016

2 commits