01 Nov, 2011

1 commit


26 Oct, 2011

1 commit

  • * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits)
    time, s390: Get rid of compile warning
    dw_apb_timer: constify clocksource name
    time: Cleanup old CONFIG_GENERIC_TIME references that snuck in
    time: Change jiffies_to_clock_t() argument type to unsigned long
    alarmtimers: Fix error handling
    clocksource: Make watchdog reset lockless
    posix-cpu-timers: Cure SMP accounting oddities
    s390: Use direct ktime path for s390 clockevent device
    clockevents: Add direct ktime programming function
    clockevents: Make minimum delay adjustments configurable
    nohz: Remove "Switched to NOHz mode" debugging messages
    proc: Consider NO_HZ when printing idle and iowait times
    nohz: Make idle/iowait counter update conditional
    nohz: Fix update_ts_time_stat idle accounting
    cputime: Clean up cputime_to_usecs and usecs_to_cputime macros
    alarmtimers: Rework RTC device selection using class interface
    alarmtimers: Add try_to_cancel functionality
    alarmtimers: Add more refined alarm state tracking
    alarmtimers: Remove period from alarm structure
    alarmtimers: Remove interval cap limit hack
    ...

    Linus Torvalds
     

05 Oct, 2011

1 commit

  • Awhile back I removed all the CONFIG_GENERIC_TIME referecnes as
    the last of the non-GENERIC_TIME arches were converted.

    However, due to the functionality being important and around for
    awhile, there apparently were some out of tree hardware enablement
    patches that used it and have since been merged.

    This patch removes the remaining instances of GENERIC_TIME.

    Singed-off-by: John Stultz

    John Stultz
     

28 Sep, 2011

1 commit

  • There are numerous broken references to Documentation files (in other
    Documentation files, in comments, etc.). These broken references are
    caused by typo's in the references, and by renames or removals of the
    Documentation files. Some broken references are simply odd.

    Fix these broken references, sometimes by dropping the irrelevant text
    they were part of.

    Signed-off-by: Paul Bolle
    Signed-off-by: Jiri Kosina

    Paul Bolle
     

27 Aug, 2011

1 commit


27 Jul, 2011

6 commits

  • After changing all consumers of atomics to include , we
    ran into some compile time errors due to this dependency chain:

    linux/atomic.h
    -> asm/atomic.h
    -> asm-generic/atomic-long.h

    where atomic-long.h could use funcs defined later in linux/atomic.h
    without a prototype. This patches moves the code that includes
    asm-generic/atomic*.h to linux/atomic.h.

    Archs that need need to select
    CONFIG_GENERIC_ATOMIC64 from now on (some of them used to include it
    unconditionally).

    Compile tested on i386 and x86_64 with allnoconfig.

    Signed-off-by: Arun Sharma
    Cc: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     
  • This is in preparation for more generic atomic primitives based on
    __atomic_add_unless.

    Signed-off-by: Arun Sharma
    Signed-off-by: Hans-Christian Egtvedt
    Reviewed-by: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     
  • This allows us to move duplicated code in
    (atomic_inc_not_zero() for now) to

    Signed-off-by: Arun Sharma
    Reviewed-by: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Cc: Eric Dumazet
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     
  • The majority of architectures implement ext2 atomic bitops as
    test_and_{set,clear}_bit() without spinlock.

    This adds this type of generic implementation in ext2-atomic-setbit.h and
    use it wherever possible.

    Signed-off-by: Akinobu Mita
    Suggested-by: Andreas Dilger
    Suggested-by: Arnd Bergmann
    Acked-by: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • [ poleg@redhat.com: no need to declare show_regs() in ptrace.h, sched.h does this ]
    Signed-off-by: Mike Frysinger
    Cc: Tejun Heo
    Signed-off-by: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     
  • The address limit is already set in flush_old_exec() so this
    set_fs(USER_DS) is redundant.

    Signed-off-by: Mathias Krause
    Cc: Koichi Yasutake
    Acked-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mathias Krause
     

24 Jul, 2011

1 commit

  • This patch removes all the module loader hook implementations in the
    architecture specific code where the functionality is the same as that
    now provided by the recently added default hooks.

    Signed-off-by: Jonas Bonn
    Acked-by: Mike Frysinger
    Acked-by: Geert Uytterhoeven
    Tested-by: Michal Simek
    Signed-off-by: Rusty Russell

    Jonas Bonn
     

22 Jun, 2011

1 commit

  • MN10300's asm/uaccess.h needs to #include linux/kernel.h to get might_sleep()
    otherwise it fails to build on MN10300 allyesconfig. This fails in a few
    places with messages like the following:

    In file included from security/keys/trusted.c:14:
    include/linux/uaccess.h: In function '__copy_from_user_nocache':
    include/linux/uaccess.h:52: error: implicit declaration of function 'might_sleep'

    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    David Howells
     

08 Jun, 2011

3 commits

  • _sdata needs to be declared in the linker script now as of commit
    a2d063ac216c ("extable, core_kernel_data(): Make sure all archs define
    _sdata")

    Signed-off-by: David Howells
    Cc: Steven Rostedt
    Signed-off-by: Linus Torvalds

    David Howells
     
  • die_if_no_fixup() shouldn't use get_user() as it doesn't call set_fs() to
    indicate that it wants to probe a kernel address. Instead it should use
    probe_kernel_read().

    This fixes the problem of gdb seeing SIGILL rather than SIGTRAP when hitting
    the KGDB special breakpoint upon SysRq+g being seen. The problem was that
    die_if_no_fixup() was failing to read the opcode of the instruction that caused
    the exception, and thus not fixing up the exception.

    This caused gdb to get a S04 response to the $? request in its remote protocol
    rather than S05 - which would then cause it to continue with $C04 rather than
    $c in an attempt to pass the signal onto the inferior process. The kernel,
    however, does not support $Cnn, and so objects by returning an E22 response,
    indicating an error. gdb does not expect this and prints:

    warning: Remote failure reply: E22

    and then returns to the gdb command prompt unable to continue.

    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    David Howells
     
  • One of the kernel debugger cacheflush variants escaped proper testing. Two of
    the labels are wrong, being derived from the code that was copied to construct
    the variant.

    The first label results in the following assembler message:

    AS arch/mn10300/mm/cache-dbg-flush-by-reg.o
    arch/mn10300/mm/cache-dbg-flush-by-reg.S: Assembler messages:
    arch/mn10300/mm/cache-dbg-flush-by-reg.S:123: Error: symbol `debugger_local_cache_flushinv_no_dcache' is already defined

    And the second label results in the following linker message:

    arch/mn10300/mm/built-in.o:(.text+0x1d39): undefined reference to `mn10300_local_icache_inv_range_reg_end'
    arch/mn10300/mm/built-in.o:(.text+0x1d39): relocation truncated to fit: R_MN10300_PCREL16 against undefined symbol `mn10300_local_icache_inv_range_reg_end'

    To test this file the following configuration pieces must be set:

    CONFIG_AM34=y
    CONFIG_MN10300_CACHE_WBACK=y
    CONFIG_MN10300_DEBUGGER_CACHE_FLUSH_BY_REG=y
    CONFIG_MN10300_CACHE_MANAGE_BY_REG=y
    CONFIG_AM34_HAS_CACHE_SNOOP=n

    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    David Howells
     

29 May, 2011

2 commits

  • * setns:
    ns: Wire up the setns system call

    Done as a merge to make it easier to fix up conflicts in arm due to
    addition of sendmmsg system call

    Linus Torvalds
     
  • 32bit and 64bit on x86 are tested and working. The rest I have looked
    at closely and I can't find any problems.

    setns is an easy system call to wire up. It just takes two ints so I
    don't expect any weird architecture porting problems.

    While doing this I have noticed that we have some architectures that are
    very slow to get new system calls. cris seems to be the slowest where
    the last system calls wired up were preadv and pwritev. avr32 is weird
    in that recvmmsg was wired up but never declared in unistd.h. frv is
    behind with perf_event_open being the last syscall wired up. On h8300
    the last system call wired up was epoll_wait. On m32r the last system
    call wired up was fallocate. mn10300 has recvmmsg as the last system
    call wired up. The rest seem to at least have syncfs wired up which was
    new in the 2.6.39.

    v2: Most of the architecture support added by Daniel Lezcano
    v3: ported to v2.6.36-rc4 by: Eric W. Biederman
    v4: Moved wiring up of the system call to another patch
    v5: ported to v2.6.39-rc6
    v6: rebased onto parisc-next and net-next to avoid syscall conflicts.
    v7: ported to Linus's latest post 2.6.39 tree.

    >  arch/blackfin/include/asm/unistd.h     |    3 ++-
    >  arch/blackfin/mach-common/entry.S      |    1 +
    Acked-by: Mike Frysinger

    Oh - ia64 wiring looks good.
    Acked-by: Tony Luck

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     

27 May, 2011

2 commits

  • By the previous style change, CONFIG_GENERIC_FIND_NEXT_BIT,
    CONFIG_GENERIC_FIND_BIT_LE, and CONFIG_GENERIC_FIND_LAST_BIT are not used
    to test for existence of find bitops anymore.

    Signed-off-by: Akinobu Mita
    Acked-by: Greg Ungerer
    Cc: Arnd Bergmann
    Cc: Russell King
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • The ns_cgroup is an annoying cgroup at the namespace / cgroup frontier and
    leads to some problems:

    * cgroup creation is out-of-control
    * cgroup name can conflict when pids are looping
    * it is not possible to have a single process handling a lot of
    namespaces without falling in a exponential creation time
    * we may want to create a namespace without creating a cgroup

    The ns_cgroup was replaced by a compatibility flag 'clone_children',
    where a newly created cgroup will copy the parent cgroup values.
    The userspace has to manually create a cgroup and add a task to
    the 'tasks' file.

    This patch removes the ns_cgroup as suggested in the following thread:

    https://lists.linux-foundation.org/pipermail/containers/2009-June/018616.html

    The 'cgroup_clone' function is removed because it is no longer used.

    This is a userspace-visible change. Commit 45531757b45c ("cgroup: notify
    ns_cgroup deprecated") (merged into 2.6.27) caused the kernel to emit a
    printk warning users that the feature is planned for removal. Since that
    time we have heard from XXX users who were affected by this.

    Signed-off-by: Daniel Lezcano
    Signed-off-by: Serge E. Hallyn
    Cc: Eric W. Biederman
    Cc: Jamal Hadi Salim
    Reviewed-by: Li Zefan
    Acked-by: Paul Menage
    Acked-by: Matt Helsley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Lezcano
     

25 May, 2011

3 commits


14 Apr, 2011

1 commit

  • For future rework of try_to_wake_up() we'd like to push part of that
    function onto the CPU the task is actually going to run on.

    In order to do so we need a generic callback from the existing scheduler IPI.

    This patch introduces such a generic callback: scheduler_ipi() and
    implements it as a NOP.

    BenH notes: PowerPC might use this IPI on offline CPUs under rare conditions!

    Acked-by: Russell King
    Acked-by: Martin Schwidefsky
    Acked-by: Chris Metcalf
    Acked-by: Jesper Nilsson
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Ralf Baechle
    Reviewed-by: Frank Rowand
    Cc: Mike Galbraith
    Cc: Nick Piggin
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20110405152728.744338123@chello.nl

    Peter Zijlstra
     

31 Mar, 2011

1 commit


30 Mar, 2011

1 commit


29 Mar, 2011

3 commits


25 Mar, 2011

2 commits

  • Percpu allocator honors alignment request upto PAGE_SIZE and both the
    percpu addresses in the percpu address space and the translated kernel
    addresses should be aligned accordingly. The calculation of the
    former depends on the alignment of percpu output section in the kernel
    image.

    The linker script macros PERCPU_VADDR() and PERCPU() are used to
    define this output section and the latter takes @align parameter.
    Several architectures are using @align smaller than PAGE_SIZE breaking
    percpu memory alignment.

    This patch removes @align parameter from PERCPU(), renames it to
    PERCPU_SECTION() and makes it always align to PAGE_SIZE. While at it,
    add PCPU_SETUP_BUG_ON() checks such that alignment problems are
    reliably detected and remove percpu alignment comment recently added
    in workqueue.c as the condition would trigger BUG way before reaching
    there.

    For um, this patch raises the alignment of percpu area. As the area
    is in .init, there shouldn't be any noticeable difference.

    This problem was discovered by David Howells while debugging boot
    failure on mn10300.

    Signed-off-by: Tejun Heo
    Acked-by: Mike Frysinger
    Cc: uclinux-dist-devel@blackfin.uclinux.org
    Cc: David Howells
    Cc: Jeff Dike
    Cc: user-mode-linux-devel@lists.sourceforge.net

    Tejun Heo
     
  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-2.6-mn10300:
    MN10300: gcc 4.6 vs am33 inline assembly
    MN10300: Deprecate gdbstub
    MN10300: Allow KGDB to use the MN10300 serial ports
    MN10300: Emulate single stepping in KGDB on MN10300
    MN10300: Generalise kernel debugger kernel halt, reboot or power off hook
    KGDB: Notify GDB of machine halt, reboot or power off
    MN10300: Use KGDB
    MN10300: Create generic kernel debugger hooks
    MN10300: Create general kernel debugger cache flushing
    MN10300: Introduce a general config option for kernel debugger hooks
    MN10300: The icache invalidate functions should disable the icache first
    MN10300: gdbstub: Restrict single-stepping to non-preemptable non-SMP configs

    Linus Torvalds
     

24 Mar, 2011

4 commits

  • minix bit operations are only used by minix filesystem and useless by
    other modules. Because byte order of inode and block bitmaps is different
    on each architecture like below:

    m68k:
    big-endian 16bit indexed bitmaps

    h8300, microblaze, s390, sparc, m68knommu:
    big-endian 32 or 64bit indexed bitmaps

    m32r, mips, sh, xtensa:
    big-endian 32 or 64bit indexed bitmaps for big-endian mode
    little-endian bitmaps for little-endian mode

    Others:
    little-endian bitmaps

    In order to move minix bit operations from asm/bitops.h to architecture
    independent code in minix filesystem, this provides two config options.

    CONFIG_MINIX_FS_BIG_ENDIAN_16BIT_INDEXED is only selected by m68k.
    CONFIG_MINIX_FS_NATIVE_ENDIAN is selected by the architectures which use
    native byte order bitmaps (h8300, microblaze, s390, sparc, m68knommu,
    m32r, mips, sh, xtensa). The architectures which always use little-endian
    bitmaps do not select these options.

    Finally, we can remove minix bit operations from asm/bitops.h for all
    architectures.

    Signed-off-by: Akinobu Mita
    Acked-by: Arnd Bergmann
    Acked-by: Greg Ungerer
    Cc: Geert Uytterhoeven
    Cc: Roman Zippel
    Cc: Andreas Schwab
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Yoshinori Sato
    Cc: Michal Simek
    Cc: "David S. Miller"
    Cc: Hirokazu Takata
    Acked-by: Ralf Baechle
    Acked-by: Paul Mundt
    Cc: Chris Zankel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • As the result of conversions, there are no users of ext2 non-atomic bit
    operations except for ext2 filesystem itself. Now we can put them into
    architecture independent code in ext2 filesystem, and remove from
    asm/bitops.h for all architectures.

    Signed-off-by: Akinobu Mita
    Cc: Jan Kara
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • Introduce little-endian bit operations to the big-endian architectures
    which do not have native little-endian bit operations and the
    little-endian architectures. (alpha, avr32, blackfin, cris, frv, h8300,
    ia64, m32r, mips, mn10300, parisc, sh, sparc, tile, x86, xtensa)

    These architectures can just include generic implementation
    (asm-generic/bitops/le.h).

    Signed-off-by: Akinobu Mita
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Mikael Starvik
    Cc: David Howells
    Cc: Yoshinori Sato
    Cc: "Luck, Tony"
    Cc: Ralf Baechle
    Cc: Kyle McMartin
    Cc: Matthew Wilcox
    Cc: Grant Grundler
    Cc: Paul Mundt
    Cc: Kazumoto Kojima
    Cc: Hirokazu Takata
    Cc: "David S. Miller"
    Cc: Chris Zankel
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Acked-by: Hans-Christian Egtvedt
    Acked-by: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • GCC 4.6 explicitly represents the MDR register. It may be accessed
    via the "z" constraint. Perhaps more importantly, it tracks when
    the MDR register is clobbered and uses the RETF instruction if the
    incoming value is still valid.

    Thus it is important to (at least) clobber the MDR register in
    relevant inline assembly fragments, lest RETF be used incorrectly.

    The only instances I could find are here. There are reads of the
    MDR register in kernel/gdb-stub.c, but that's harmless. Although,
    frankly, __builtin_return_address(0) might be a better thing in
    those cases. Certainly MDR isn't going to contain anything else
    that might be useful...

    Signed-off-by: Richard Henderson
    Signed-off-by: David Howells

    Richard Henderson
     

23 Mar, 2011

2 commits

  • All architectures can use the common dma_addr_t typedef now. We can
    remove the arch specific dma_addr_t.

    Signed-off-by: FUJITA Tomonori
    Acked-by: Arnd Bergmann
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: Ivan Kokshaysky
    Cc: Richard Henderson
    Cc: Matt Turner
    Cc: "Luck, Tony"
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Chris Metcalf
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     
  • Add a node parameter to alloc_thread_info(), and change its name to
    alloc_thread_info_node()

    This change is needed to allow NUMA aware kthread_create_on_cpu()

    Signed-off-by: Eric Dumazet
    Acked-by: David S. Miller
    Reviewed-by: Andi Kleen
    Acked-by: Rusty Russell
    Cc: Tejun Heo
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: David Howells
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Dumazet
     

19 Mar, 2011

3 commits

  • Deprecate the MN10300 arch's gdbstub in favour of KGDB, which is more capable
    in some areas (such as SMP) and almost as capable in others (it's I/O is not as
    decoupled and it can't start as early). gdbstub will be removed in a later
    version when we're satisfied with KGDB's working.

    Signed-off-by: David Howells

    David Howells
     
  • Allow KGDB to use the MN10300 serial ports through the polled I/O interface
    provided via the TTY/serial layer and the kgdboc driver. This allows the
    kernel to be started with something like:

    kgdboc=ttySM0,115200

    added to the command line.

    Signed-off-by: David Howells

    David Howells
     
  • Emulate single stepping in KGDB on MN10300 by way of temporary breakpoint
    insertion. These breakpoints are never actually seen by KGDB, and will overlay
    KGDB's own breakpoints.

    The breakpoints are removed by switch_to() and reinstalled on switching back so
    that if preemption occurs, the preempting task doesn't hit them (though it will
    still hit KGDB's regular breakpoints). If KGDB is reentered for any reason,
    then the single step breakpoint is completely erased and must be set again by
    the debugger.

    We take advantage of the fact that KGDB will effectively halt all other CPUs
    whilst this CPU is single-stepping to avoid SMP problems.

    If the single-stepping task is preempted and killed without KGDB being
    reinvoked, then the breakpoint(s) will be cleared and KGDB will be jumped back
    into.

    Signed-off-by: David Howells

    David Howells