08 Apr, 2014

1 commit

  • If the renamed symbol is defined lib/iomap.c implements ioport_map and
    ioport_unmap and currently (nearly) all platforms define the port
    accessor functions outb/inb and friend unconditionally. So
    HAS_IOPORT_MAP is the better name for this.

    Consequently NO_IOPORT is renamed to NO_IOPORT_MAP.

    The motivation for this change is to reintroduce a symbol HAS_IOPORT
    that signals if outb/int et al are available. I will address that at
    least one merge window later though to keep surprises to a minimum and
    catch new introductions of (HAS|NO)_IOPORT.

    The changes in this commit were done using:

    $ git grep -l -E '(NO|HAS)_IOPORT' | xargs perl -p -i -e 's/\b((?:CONFIG_)?(?:NO|HAS)_IOPORT)\b/$1_MAP/'

    Signed-off-by: Uwe Kleine-König
    Acked-by: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Uwe Kleine-König
     

10 Feb, 2014

2 commits

  • This patch allows each architecture to add its specific assembly optimized
    arch_mcs_spin_lock_contended and arch_mcs_spinlock_uncontended for
    MCS lock and unlock functions.

    Signed-off-by: Tim Chen
    Cc: Scott J Norton
    Cc: Raghavendra K T
    Cc: AswinChandramouleeswaran
    Cc: George Spelvin
    Cc: Rik vanRiel
    Cc: Andrea Arcangeli
    Cc: MichelLespinasse
    Cc: Peter Hurley
    Cc: Andi Kleen
    Cc: Alex Shi
    Cc: Dave Hansen
    Cc: Tim Chen
    Cc: Arnd Bergmann
    Cc: "Figo.zhang"
    Cc: "Paul E.McKenney"
    Cc: "H. Peter Anvin"
    Cc: Davidlohr Bueso
    Cc: Waiman Long
    Cc: Ingo Molnar
    Cc: Will Deacon
    Cc: Andrew Morton
    Cc: Linus Torvalds
    Cc: Matthew R Wilcox
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1390347382.3138.67.camel@schen9-DESK
    Signed-off-by: Ingo Molnar

    Tim Chen
     
  • We perform a clean up of the Kbuid files in each architecture.
    We order the files in each Kbuild in alphabetical order
    by running the below script.

    for i in arch/*/include/asm/Kbuild
    do
    cat $i | gawk '/^generic-y/ {
    i = 3;
    do {
    for (; i ${i}.sorted;
    mv ${i}.sorted $i;
    done

    Signed-off-by: Tim Chen
    Cc: Arnd Bergmann
    Cc: Matthew R Wilcox
    Cc: AswinChandramouleeswaran
    Cc: Dave Hansen
    Cc: "Paul E.McKenney"
    Cc: Scott J Norton
    Cc: Will Deacon
    Cc: "Figo.zhang"
    Cc: Linus Torvalds
    Cc: Rik van Riel
    Cc: Waiman Long
    Cc: Peter Hurley
    Cc: Andrea Arcangeli
    Cc: Tim Chen
    Cc: Alex Shi
    Cc: Raghavendra K T
    Cc: Andi Kleen
    Cc: George Spelvin
    Cc: MichelLespinasse
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Davidlohr Bueso
    Cc: Andrew Morton
    Signed-off-by: Peter Zijlstra
    [ Fixed build bug. ]
    Signed-off-by: Ingo Molnar

    Tim Chen
     

31 Jan, 2014

1 commit

  • Pull OpenRISC updates from Jonas Bonn:
    "The interesting change here is a rework of the OpenRISC signal
    handling to make it more like other architectures in the hopes that
    this makes it easier for others to comment on and understand. This
    rework fixes some real bugs, like the fact that syscall restart did
    not work reliably"

    * tag 'for-3.14' of git://openrisc.net/~jonas/linux:
    openrisc: Use get_signal() signal_setup_done()
    openrisc: Rework signal handling

    Linus Torvalds
     

09 Jan, 2014

2 commits

  • Use the more generic functions get_signal() signal_setup_done()
    for signal delivery.

    Signed-off-by: Richard Weinberger
    Signed-off-by: Jonas Bonn

    Richard Weinberger
     
  • The mainline signal handling code for OpenRISC has been buggy since day
    one with respect to syscall restart. This patch significantly reworks
    the signal handling code:

    i) Move the "work pending" loop to C code (borrowed from ARM arch)

    ii) Allow a tracer to muck about with the IP and skip syscall restart
    in that case (again, borrowed from ARM)

    iii) Make signal handling WRT syscall restart actually work

    v) Make the signal handling code look more like that of other
    architectures so that it's easier for others to follow

    Reported-by: Anders Nystrom
    Signed-off-by: Jonas Bonn

    Jonas Bonn
     

18 Dec, 2013

1 commit


16 Nov, 2013

1 commit

  • Pull OpenRISC updates from Jonas Bonn:
    - small cleanups to make allmodconfig pass
    - defconfig refresh
    - a handful of code sanitization patches

    * tag 'for-3.13' of git://git.openrisc.net/~jonas/linux:
    openrisc: Refactor or32_early_setup()
    openrisc: Remove unused declaration of __initramfs_start
    openrisc: Use the declarations provided by
    openrisc: Refresh or1ksim_defconfig for v3.12
    openrisc: Refactor 16-bit constant relocation
    openrisc: include: asm: Kbuild: add default "vga.h"
    openrisc: Makefile: append "-D__linux__" to KBUILD_CFLAGS

    Linus Torvalds
     

15 Nov, 2013

5 commits


12 Nov, 2013

1 commit

  • Pull devicetree updates from Rob Herring:
    "DeviceTree updates for 3.13. This is a bit larger pull request than
    usual for this cycle with lots of clean-up.

    - Cross arch clean-up and consolidation of early DT scanning code.
    - Clean-up and removal of arch prom.h headers. Makes arch specific
    prom.h optional on all but Sparc.
    - Addition of interrupts-extended property for devices connected to
    multiple interrupt controllers.
    - Refactoring of DT interrupt parsing code in preparation for
    deferred probe of interrupts.
    - ARM cpu and cpu topology bindings documentation.
    - Various DT vendor binding documentation updates"

    * tag 'devicetree-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (82 commits)
    powerpc: add missing explicit OF includes for ppc
    dt/irq: add empty of_irq_count for !OF_IRQ
    dt: disable self-tests for !OF_IRQ
    of: irq: Fix interrupt-map entry matching
    MIPS: Netlogic: replace early_init_devtree() call
    of: Add Panasonic Corporation vendor prefix
    of: Add Chunghwa Picture Tubes Ltd. vendor prefix
    of: Add AU Optronics Corporation vendor prefix
    of/irq: Fix potential buffer overflow
    of/irq: Fix bug in interrupt parsing refactor.
    of: set dma_mask to point to coherent_dma_mask
    of: add vendor prefix for PHYTEC Messtechnik GmbH
    DT: sort vendor-prefixes.txt
    of: Add vendor prefix for Cadence
    of: Add empty for_each_available_child_of_node() macro definition
    arm/versatile: Fix versatile irq specifications.
    of/irq: create interrupts-extended property
    microblaze/pci: Drop PowerPC-ism from irq parsing
    of/irq: Create of_irq_parse_and_map_pci() to consolidate arch code.
    of/irq: Use irq_of_parse_and_map()
    ...

    Linus Torvalds
     

05 Nov, 2013

3 commits

  • arch/openrisc/kernel/module.c: In function 'apply_relocate_add':
    arch/openrisc/kernel/module.c:50:13: warning: assignment from incompatible pointer type
    arch/openrisc/kernel/module.c:54:13: warning: assignment from incompatible pointer type

    Move the pointer increments to the dereference statements to avoid
    incompatible pointer assignments, and remove superfluous casts.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Jonas Bonn

    Geert Uytterhoeven
     
  • Add default "vga.h", or compiling fails with 'allmodconfig'.

    The related error:

    CC [M] drivers/gpu/drm/drm_irq.o
    In file included from include/linux/vgaarb.h:34:0,
    from drivers/gpu/drm/drm_irq.c:42:
    include/video/vga.h:22:21: fatal error: asm/vga.h: No such file or directory
    compilation terminated.
    make[3]: *** [drivers/gpu/drm/drm_irq.o] Error 1
    make[2]: *** [drivers/gpu/drm] Error 2
    make[1]: *** [drivers/gpu] Error 2
    make: *** [drivers] Error 2

    Signed-off-by: Chen Gang
    Signed-off-by: Jonas Bonn

    Chen Gang
     
  • Need append "_D__linux__" to KBUILD_CFLAGS, just like some of another
    architectures have done, or 'allmodconfig' can not pass compiling.

    The related error:

    CC [M] fs/coda/psdev.o
    In file included from include/linux/coda.h:65:0,
    from fs/coda/psdev.c:45:
    include/uapi/linux/coda.h:221:2: error: expected specifier-qualifier-list before 'u_quad_t'

    The related compiler information:

    [root@dhcp122 ~]# /usr/local/bin/or32-linux-gcc -v
    Using built-in specs.
    COLLECT_GCC=/usr/local/bin/or32-linux-gcc
    COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/or32-linux/4.5.1-or32-1.0rc1/lto-wrapper
    Target: or32-linux
    Configured with: ../gcc-openrisc/configure --target=or32-linux --disable-nls --enable-languages=c --without-headers --disable-shared --disable-threads --enable-werror=no
    Thread model: single
    gcc version 4.5.1-or32-1.0rc1 (GCC)

    Signed-off-by: Chen Gang
    Signed-off-by: Jonas Bonn

    Chen Gang
     

10 Oct, 2013

8 commits

  • Now that prom.h is optional, all the empty prom.h headers can be removed.

    Signed-off-by: Rob Herring
    Acked-by: Vineet Gupta
    Acked-by: Catalin Marinas
    Acked-by: Grant Likely
    Cc: Will Deacon
    Cc: Mark Salter
    Cc: Aurelien Jacquiot
    Cc: James Hogan
    Cc: Jonas Bonn
    Cc: Chris Zankel
    Cc: Max Filippov

    Rob Herring
     
  • HAVE_ARCH_DEVTREE_FIXUPS appears to always be needed except for sparc,
    but it is only used for /proc/device-teee and sparc does not enable
    /proc/device-tree. So this option is redundant. Remove the option and
    always enable it. This has the side effect of fixing /proc/device-tree
    on arches such as arm64 which failed to define this option.

    Signed-off-by: Rob Herring
    Acked-by: Vineet Gupta
    Acked-by: Grant Likely
    Cc: Russell King
    Cc: James Hogan
    Cc: Michal Simek
    Cc: Jonas Bonn
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: x86@kernel.org
    Cc: Chris Zankel
    Cc: Max Filippov

    Rob Herring
     
  • It appears openrisc prom.c was just copied from another arch with a
    bunch of unnecessary includes. Remove all the unecessary ones.

    Signed-off-by: Rob Herring
    Cc: Jonas Bonn
    Cc: linux@lists.openrisc.net

    Rob Herring
     
  • All arches do essentially the same thing now for
    early_init_dt_setup_initrd_arch, so it can now be removed.

    Signed-off-by: Rob Herring
    Acked-by: Vineet Gupta
    Cc: Russell King
    Cc: Mark Salter
    Cc: Aurelien Jacquiot
    Cc: James Hogan
    Cc: Michal Simek
    Cc: Ralf Baechle
    Cc: Jonas Bonn
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: x86@kernel.org
    Cc: Chris Zankel
    Cc: Max Filippov
    Acked-by: Grant Likely

    Rob Herring
     
  • Create a weak version of early_init_dt_add_memory_arch which uses
    memblock. This will unify all architectures except ones with custom
    memory bank structs.

    Signed-off-by: Rob Herring
    Acked-by: Catalin Marinas
    Cc: Will Deacon
    Cc: Michal Simek
    Cc: Jonas Bonn
    Acked-by: Grant Likely
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: microblaze-uclinux@itee.uq.edu.au
    Cc: linux@lists.openrisc.net
    Cc: devicetree@vger.kernel.org

    Rob Herring
     
  • Convert openrisc to use new early_init_dt_scan function.

    Signed-off-by: Rob Herring
    Cc: Jonas Bonn
    Cc: linux@lists.openrisc.net

    Rob Herring
     
  • Use the common unflatten_and_copy_device_tree to copy the built-in FDT
    out of init section. This moves the copy later in the boot, but there
    do not appear to be any references to strings in the FDT before the copy.

    Signed-off-by: Rob Herring
    Cc: Jonas Bonn
    Cc: linux@lists.openrisc.net

    Rob Herring
     
  • Save some pointless copying of the kernel command line and just use
    boot_command_line instead. The DT code already handles CONFIG_CMDLINE,
    so a separate copy is not needed.

    Signed-off-by: Rob Herring
    Cc: Jonas Bonn
    Cc: linux@lists.openrisc.net
    Reviewed-by: Grant Likely

    Rob Herring
     

09 Oct, 2013

1 commit


25 Sep, 2013

2 commits

  • In order to prepare to per-arch implementations of preempt_count move
    the required bits into an asm-generic header and use this for all
    archs.

    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/n/tip-h5j0c1r3e3fk015m30h8f1zx@git.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Clean-up some copy/paste declarations that are not necessary. All the
    functions either don't exist or are already declared in other headers.
    This is needed in preparation of of_irq.h clean-up.

    Signed-off-by: Rob Herring
    Cc: Jonas Bonn
    Cc: linux@lists.openrisc.net

    Rob Herring
     

13 Sep, 2013

2 commits

  • After the last architecture switched to generic hard irqs the config
    options HAVE_GENERIC_HARDIRQS & GENERIC_HARDIRQS and the related code
    for !CONFIG_GENERIC_HARDIRQS can be removed.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • Unlike global OOM handling, memory cgroup code will invoke the OOM killer
    in any OOM situation because it has no way of telling faults occuring in
    kernel context - which could be handled more gracefully - from
    user-triggered faults.

    Pass a flag that identifies faults originating in user space from the
    architecture-specific fault handlers to generic code so that memcg OOM
    handling can be improved.

    Signed-off-by: Johannes Weiner
    Reviewed-by: Michal Hocko
    Cc: David Rientjes
    Cc: KAMEZAWA Hiroyuki
    Cc: azurIt
    Cc: KOSAKI Motohiro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     

11 Sep, 2013

1 commit

  • Pull device tree core updates from Grant Likely:
    "Generally minor changes. A bunch of bug fixes, particularly for
    initialization and some refactoring. Most notable change if feeding
    the entire flattened tree into the random pool at boot. May not be
    significant, but shouldn't hurt either"

    Tim Bird questions whether the boot time cost of the random feeding may
    be noticeable. And "add_device_randomness()" is definitely not some
    speed deamon of a function.

    * tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux:
    of/platform: add error reporting to of_amba_device_create()
    irq/of: Fix comment typo for irq_of_parse_and_map
    of: Feed entire flattened device tree into the random pool
    of/fdt: Clean up casting in unflattening path
    of/fdt: Remove duplicate memory clearing on FDT unflattening
    gpio: implement gpio-ranges binding document fix
    of: call __of_parse_phandle_with_args from of_parse_phandle
    of: introduce of_parse_phandle_with_fixed_args
    of: move of_parse_phandle()
    of: move documentation of of_parse_phandle_with_args
    of: Fix missing memory initialization on FDT unflattening
    of: consolidate definition of early_init_dt_alloc_memory_arch()
    of: Make of_get_phy_mode() return int i.s.o. const int
    include: dt-binding: input: create a DT header defining key codes.
    of/platform: Staticize of_platform_device_create_pdata()
    of: Specify initrd location using 64-bit
    dt: Typo fix
    OF: make of_property_for_each_{u32|string}() use parameters if OF is not enabled

    Linus Torvalds
     

29 Aug, 2013

2 commits


21 Aug, 2013

1 commit


14 Aug, 2013

1 commit

  • All architectures include "kernel/Kconfig.freezer" except three left, so
    let them include it too, or 'allmodconfig' will report error.

    The related errors: (with allmodconfig for openrisc):

    CC kernel/cgroup_freezer.o
    kernel/cgroup_freezer.c: In function 'freezer_css_online':
    kernel/cgroup_freezer.c:133:15: error: 'system_freezing_cnt' undeclared (first use in this function)
    kernel/cgroup_freezer.c:133:15: note: each undeclared identifier is reported only once for each function it appears in
    kernel/cgroup_freezer.c: In function 'freezer_css_offline':
    kernel/cgroup_freezer.c:157:15: error: 'system_freezing_cnt' undeclared (first use in this function)
    kernel/cgroup_freezer.c: In function 'freezer_attach':
    kernel/cgroup_freezer.c:200:4: error: implicit declaration of function 'freeze_task'
    kernel/cgroup_freezer.c: In function 'freezer_apply_state':
    kernel/cgroup_freezer.c:371:16: error: 'system_freezing_cnt' undeclared (first use in this function)

    Signed-off-by: Chen Gang
    Cc: Richard Kuo
    Cc: Jonas Bonn
    Cc: Chen Liqin
    Cc: Lennox Wu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chen Gang
     

24 Jul, 2013

1 commit

  • On some PAE architectures, the entire range of physical memory could reside
    outside the 32-bit limit. These systems need the ability to specify the
    initrd location using 64-bit numbers.

    This patch globally modifies the early_init_dt_setup_initrd_arch() function to
    use 64-bit numbers instead of the current unsigned long.

    There has been quite a bit of debate about whether to use u64 or phys_addr_t.
    It was concluded to stick to u64 to be consistent with rest of the device
    tree code. As summarized by Geert, "The address to load the initrd is decided
    by the bootloader/user and set at that point later in time. The dtb should not
    be tied to the kernel you are booting"

    More details on the discussion can be found here:
    https://lkml.org/lkml/2013/6/20/690
    https://lkml.org/lkml/2012/9/13/544

    Signed-off-by: Santosh Shilimkar
    Acked-by: Rob Herring
    Acked-by: Vineet Gupta
    Acked-by: Jean-Christophe PLAGNIOL-VILLARD
    Signed-off-by: Grant Likely

    Santosh Shilimkar
     

15 Jul, 2013

1 commit

  • The __cpuinit type of throwaway sections might have made sense
    some time ago when RAM was more constrained, but now the savings
    do not offset the cost and complications. For example, the fix in
    commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time")
    is a good example of the nasty type of bugs that can be created
    with improper use of the various __init prefixes.

    After a discussion on LKML[1] it was decided that cpuinit should go
    the way of devinit and be phased out. Once all the users are gone,
    we can then finally remove the macros themselves from linux/init.h.

    Note that some harmless section mismatch warnings may result, since
    notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
    are flagged as __cpuinit -- so if we remove the __cpuinit from
    arch specific callers, we will also get section mismatch warnings.
    As an intermediate step, we intend to turn the linux/init.h cpuinit
    content into no-ops as early as possible, since that will get rid
    of these warnings. In any case, they are temporary and harmless.

    This removes all the arch/openrisc uses of the __cpuinit macros from
    all C files. Currently openrisc does not have any __CPUINIT used in
    assembly files.

    [1] https://lkml.org/lkml/2013/5/20/589

    Cc: Jonas Bonn
    Cc: linux@lists.openrisc.net
    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

10 Jul, 2013

1 commit

  • A few remaining architectures directly kill the page faulting task in an
    out of memory situation. This is usually not a good idea since that
    task might not even use a significant amount of memory and so may not be
    the optimal victim to resolve the situation.

    Since 2.6.29's 1c0fe6e ("mm: invoke oom-killer from page fault") there
    is a hook that architecture page fault handlers are supposed to call to
    invoke the OOM killer and let it pick the right task to kill. Convert
    the remaining architectures over to this hook.

    To have the previous behavior of simply taking out the faulting task the
    vm.oom_kill_allocating_task sysctl can be set to 1.

    Signed-off-by: Johannes Weiner
    Reviewed-by: Michal Hocko
    Cc: KAMEZAWA Hiroyuki
    Acked-by: David Rientjes
    Acked-by: Vineet Gupta [arch/arc bits]
    Cc: James Hogan
    Cc: David Howells
    Cc: Jonas Bonn
    Cc: Chen Liqin
    Cc: Lennox Wu
    Cc: Chris Metcalf
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     

05 Jul, 2013

2 commits

  • Merge Kconfig menu diet patches from Dave Hansen:
    "I think the "Kernel Hacking" menu has gotten a bit out of hand. It is
    over 120 lines long on my system with everything enabled and options
    are scattered around it haphazardly.

    http://sr71.net/~dave/linux/kconfig-horror.png

    Let's try to introduce some sanity. This set takes that 120 lines
    down to 55 and makes it vastly easier to find some things. It's a
    start.

    This set stands on its own, but there is plenty of room for follow-up
    patches. The arch-specific debug options still end up getting stuck
    in the top-level "kernel hacking" menu. OPTIMIZE_INLINING, for
    instance, could obviously go in to the "compiler options" menu, but
    the fact that it is defined in arch/ in a separate Kconfig file keeps
    it on its own for the moment.

    The Signed-off-by's in here look funky. I changed employers while
    working on this set, so I have signoffs from both email addresses"

    * emailed patches from Dave Hansen :
    hang and lockup detection menu
    kconfig: consolidate printk options
    group locking debugging options
    consolidate compilation option configs
    consolidate runtime testing configs
    order memory debugging Kconfig options
    consolidate per-arch stack overflow debugging options

    Linus Torvalds
     
  • Original posting:

    http://lkml.kernel.org/r/20121214184202.F54094D9@kernel.stglabs.ibm.com

    Several architectures have similar stack debugging config options.
    They all pretty much do the same thing, some with slightly
    differing help text.

    This patch changes the architectures to instead enable a Kconfig
    boolean, and then use that boolean in the generic Kconfig.debug
    to present the actual menu option. This removes a bunch of
    duplication and adds consistency across arches.

    Signed-off-by: Dave Hansen
    Reviewed-by: H. Peter Anvin
    Reviewed-by: James Hogan
    Acked-by: Chris Metcalf [for tile]
    Signed-off-by: Dave Hansen
    Signed-off-by: Linus Torvalds

    Dave Hansen