12 Dec, 2011

1 commit


18 Nov, 2011

2 commits


16 Nov, 2011

1 commit

  • As per the comments added by this commit, %g2 turns out to not be a
    usable place to save away orig_i0 for syscall restart handling.

    In fact all of %g2, %g3, %g4, and %g5 are assumed to be saved across
    a system call by various bits of code in glibc.

    %g1 can't be used because that holds the syscall number, which would
    need to be saved and restored for syscall restart handling too, and
    that would only compound our problems :-)

    This leaves us with %g6 and %g7 which are for "system use". %g7 is
    used as the "thread register" by glibc, but %g6 is used as a compiler
    and assembler temporary scratch register. And in no instance is %g6
    used to hold a value across a system call.

    Therefore %g6 is safe for storing away orig_i0, at least for now.

    Signed-off-by: David S. Miller

    David S. Miller
     

15 Nov, 2011

1 commit

  • Although we provide a proper way for a debugger to control whether
    syscall restart occurs, we run into problems because orig_i0 is not
    saved and restored properly.

    Luckily we can solve this problem without having to make debuggers
    aware of the issue. Across system calls, several registers are
    considered volatile and can be safely clobbered.

    Therefore we use the pt_regs save area of one of those registers, %g2,
    as a place to save and restore orig_i0.

    Debuggers transparently will do the right thing because they save and
    restore this register already.

    Signed-off-by: David S. Miller

    David S. Miller
     

14 Nov, 2011

1 commit

  • This file introduced in 2.6.32.47 currently fails to compile:

    arch/sparc/kernel/sigutil_64.c: In function 'save_fpu_state':
    arch/sparc/kernel/sigutil_64.c:25: error: 'EFAULT' undeclared (first use in this function)

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     

09 Nov, 2011

1 commit


07 Nov, 2011

3 commits

  • …/kernel/git/jeremy/xen

    * 'upstream/jump-label-noearly' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen:
    jump-label: initialize jump-label subsystem much earlier
    x86/jump_label: add arch_jump_label_transform_static()
    s390/jump-label: add arch_jump_label_transform_static()
    jump_label: add arch_jump_label_transform_static() to optimise non-live code updates
    sparc/jump_label: drop arch_jump_label_text_poke_early()
    x86/jump_label: drop arch_jump_label_text_poke_early()
    jump_label: if a key has already been initialized, don't nop it out
    stop_machine: make stop_machine safe and efficient to call early
    jump_label: use proper atomic_t initializer

    Conflicts:
    - arch/x86/kernel/jump_label.c
    Added __init_or_module to arch_jump_label_text_poke_early vs
    removal of that function entirely
    - kernel/stop_machine.c
    same patch ("stop_machine: make stop_machine safe and efficient
    to call early") merged twice, with whitespace fix in one version

    Linus Torvalds
     
  • * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
    Revert "tracing: Include module.h in define_trace.h"
    irq: don't put module.h into irq.h for tracking irqgen modules.
    bluetooth: macroize two small inlines to avoid module.h
    ip_vs.h: fix implicit use of module_get/module_put from module.h
    nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
    include: replace linux/module.h with "struct module" wherever possible
    include: convert various register fcns to macros to avoid include chaining
    crypto.h: remove unused crypto_tfm_alg_modname() inline
    uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
    pm_runtime.h: explicitly requires notifier.h
    linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
    miscdevice.h: fix up implicit use of lists and types
    stop_machine.h: fix implicit use of smp.h for smp_processor_id
    of: fix implicit use of errno.h in include/linux/of.h
    of_platform.h: delete needless include
    acpi: remove module.h include from platform/aclinux.h
    miscdevice.h: delete unnecessary inclusion of module.h
    device_cgroup.h: delete needless include
    net: sch_generic remove redundant use of
    net: inet_timewait_sock doesnt need
    ...

    Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in
    - drivers/media/dvb/frontends/dibx000_common.c
    - drivers/media/video/{mt9m111.c,ov6650.c}
    - drivers/mfd/ab3550-core.c
    - include/linux/dmaengine.h

    Linus Torvalds
     
  • * 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    scsi: drop unused Kconfig symbol
    pci: drop unused Kconfig symbol
    stmmac: drop unused Kconfig symbol
    x86: drop unused Kconfig symbol
    powerpc: drop unused Kconfig symbols
    powerpc: 40x: drop unused Kconfig symbol
    mips: drop unused Kconfig symbols
    openrisc: drop unused Kconfig symbols
    arm: at91: drop unused Kconfig symbol
    samples: drop unused Kconfig symbol
    m32r: drop unused Kconfig symbol
    score: drop unused Kconfig symbols
    sh: drop unused Kconfig symbol
    um: drop unused Kconfig symbol
    sparc: drop unused Kconfig symbol
    alpha: drop unused Kconfig symbol

    Fix up trivial conflict in drivers/net/ethernet/stmicro/stmmac/Kconfig
    as per Michal: the STMMAC_DUAL_MAC config variable is still unused and
    should be deleted.

    Linus Torvalds
     

03 Nov, 2011

2 commits

  • This avoids duplicating the function in every arch gup_fast.

    Signed-off-by: Andrea Arcangeli
    Cc: Peter Zijlstra
    Cc: Hugh Dickins
    Cc: Johannes Weiner
    Cc: Rik van Riel
    Cc: Mel Gorman
    Cc: KOSAKI Motohiro
    Cc: Benjamin Herrenschmidt
    Cc: David Gibson
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: David Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Arcangeli
     
  • Up to this point the code assumed old refcounting for hugepages (pre-thp).
    This updates the code directly to the thp mapcount tail page refcounting.

    Signed-off-by: Andrea Arcangeli
    Cc: Peter Zijlstra
    Cc: Hugh Dickins
    Cc: Johannes Weiner
    Cc: Rik van Riel
    Cc: Mel Gorman
    Cc: KOSAKI Motohiro
    Cc: Benjamin Herrenschmidt
    Cc: David Gibson
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Acked-by: David Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Arcangeli
     

01 Nov, 2011

9 commits

  • Signed-off-by: David S. Miller

    David S. Miller
     
  • The file mm/extable.c needs module.h for within_module_init(), and
    also for search_exception_tables [which arguably could be living somewhere
    more appropriate than module.h] - eventually causing this:

    arch/sparc/mm/extable.c: In function 'trim_init_extable':
    arch/sparc/mm/extable.c:74: error: dereferencing pointer to incomplete type
    arch/sparc/mm/extable.c:75: error: dereferencing pointer to incomplete type
    arch/sparc/mm/extable.c:77: error: implicit declaration of function 'within_module_init'
    arch/sparc/mm/extable.c:77: error: dereferencing pointer to incomplete type
    arch/sparc/mm/extable.c:78: error: dereferencing pointer to incomplete type
    arch/sparc/mm/extable.c:80: error: dereferencing pointer to incomplete type
    arch/sparc/mm/extable.c: In function 'search_extables_range':
    arch/sparc/mm/extable.c:93: error: implicit declaration of function 'search_exception_tables'

    The other instances are more straight forward uses of things
    like MODULE_* and module_*

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     
  • Building an allyesconfig doesn't reveal a hidden need
    for any of these. Since module.h brings in the whole kitchen
    sink, it just needlessly adds 30k+ lines to the cpp burden.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     
  • Many of the core sparc kernel files are not modules, but just
    including module.h for exporting symbols. Now these files can
    use the lighter footprint export.h for this role.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     
  • These files are only exporting symbols, so they don't need
    the full module.h header file. Previously they were getting
    access to EXPORT_SYMBOL implicitly via overuse of module.h
    from within other .h files, but that is being cleaned up.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     
  • Building sparc64 with the module.h cleanup reveals this implicit
    include being taken advantage of:

    arch/sparc/kernel/mdesc.c: In function 'mdesc_read':
    arch/sparc/kernel/mdesc.c:900: error: implicit declaration of function 'copy_to_user'

    Fix it up before the implicit module.h presence is removed.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     
  • To resolve these on 64bit allnoconfig builds:

    CC arch/sparc/kernel/pcr.o
    arch/sparc/kernel/pcr.c: In function 'register_perf_hsvc':
    arch/sparc/kernel/pcr.c:102: error: 'tlb_type' undeclared (first use in this function)

    CC arch/sparc/kernel/of_device_64.o
    arch/sparc/kernel/of_device_64.c: In function 'build_device_resources':
    arch/sparc/kernel/of_device_64.c:406: error: 'tlb_type' undeclared (first use in this function)

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     
  • Signed-off-by: Paul Bolle
    Signed-off-by: Michal Marek

    Paul Bolle
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
    sparc64: Fix masking and shifting in VIS fpcmp emulation.
    sparc32: Correct the return value of memcpy.
    sparc32: Remove uses of %g7 in memcpy implementation.
    sparc32: Remove non-kernel code from memcpy implementation.

    Linus Torvalds
     

31 Oct, 2011

1 commit


28 Oct, 2011

1 commit

  • This was found by inspection while tracking a similar
    bug in compat_statfs64, that has been fixed in mainline
    since decemeber.

    - This fixes a bug where not all of the f_spare fields
    were cleared on mips and s390.
    - Add the f_flags field to struct compat_statfs
    - Copy f_flags to userspace in case someone cares.
    - Use __clear_user to copy the f_spare field to userspace
    to ensure that all of the elements of f_spare are cleared.
    On some architectures f_spare is has 5 ints and on some
    architectures f_spare only has 4 ints. Which makes
    the previous technique of clearing each int individually
    broken.

    I don't expect anyone actually uses the old statfs system
    call anymore but if they do let them benefit from having
    the compat and the native version working the same.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Christoph Hellwig

    Eric W. Biederman
     

26 Oct, 2011

1 commit


21 Oct, 2011

3 commits


20 Oct, 2011

1 commit

  • Currently no type of alignment is specified for PCI expansion roms while
    parsing the openfirmware tree. This causes calls to pci_map_rom() to fail.
    IORESOURCE_SIZEALIGN is the default alignment used for rom resouces in
    pci/probe.c, and has been verified to work with various cards on a ultra 10.

    Signed-off-By: Kjetil Oftedal
    Signed-off-by: David S. Miller

    Kjetil Oftedal
     

13 Oct, 2011

2 commits


08 Oct, 2011

1 commit

  • The LEON MMU Model (SRMMU) does not implement MMu Table probing
    in hardware, instead it is implemented in software. However the
    software implementation does not return the PTE as it should which
    always results in INVALID entires and the PROM mappings are not
    inherited as they should during startup. The following patch
    removes the masking of the PTE.

    Signed-off-by: Daniel Hellstrom
    Signed-off-by: David S. Miller

    Daniel Hellstrom
     

30 Sep, 2011

1 commit

  • In the OF 'translations' property, the template TTEs in the mappings
    never specify the executable bit. This is the case even though some
    of these mappings are for OF's code segment.

    Therefore, we need to force the execute bit on in every mapping.

    This problem can only really trigger on Niagara/sun4v machines and the
    history behind this is a little complicated.

    Previous to sun4v, the sun4u TTE entries lacked a hardware execute
    permission bit. So OF didn't have to ever worry about setting
    anything to handle executable pages. Any valid TTE loaded into the
    I-TLB would be respected by the chip.

    But sun4v Niagara chips have a real hardware enforced executable bit
    in their TTEs. So it has to be set or else the I-TLB throws an
    instruction access exception with type code 6 (protection violation).

    We've been extremely fortunate to not get bitten by this in the past.

    The best I can tell is that the OF's mappings for it's executable code
    were mapped using permanent locked mappings on sun4v in the past.
    Therefore, the fact that we didn't have the exec bit set in the OF
    translations we would use did not matter in practice.

    Thanks to Greg Onufer for helping me track this down.

    Signed-off-by: David S. Miller

    David S. Miller
     

22 Sep, 2011

1 commit

  • If "-p" is given on the command line, clear the CON_BOOT
    flag for the initial early boot PROM console.

    This is necessary to try and see crash messages that occur
    between the registry of the VT console and the probing of
    the first framebuffer or serial console. During this time
    no console messages are emitted because the VT console
    registry (even if no backend is registered to it) removes
    the early console if CON_BOOT is set.

    Signed-off-by: David S. Miller

    David S. Miller
     

21 Sep, 2011

1 commit


17 Sep, 2011

1 commit


30 Aug, 2011

3 commits


27 Aug, 2011

1 commit


21 Aug, 2011

1 commit

  • If we can't push the pending register windows onto the user's stack,
    we disallow signal delivery even if the signal would be delivered on a
    valid seperate signal stack.

    Add a register window save area in the signal frame, and store any
    unsavable windows there.

    On sigreturn, if any windows are still queued up in the signal frame,
    try to push them back onto the stack and if that fails we kill the
    process immediately.

    This allows the debug/tst-longjmp_chk2 glibc test case to pass.

    Signed-off-by: David S. Miller

    David S. Miller