12 May, 2011

1 commit


21 Apr, 2011

1 commit

  • When a DISCONTIGMEM memory range is brought online as a NUMA node, it
    also needs to have its bet set in N_NORMAL_MEMORY. This is necessary for
    generic kernel code that utilizes N_NORMAL_MEMORY as a subset of N_ONLINE
    for memory savings.

    These types of hacks can hopefully be removed once DISCONTIGMEM is either
    removed or abstracted away from CONFIG_NUMA.

    Fixes a panic in the slub code which only initializes structures for
    N_NORMAL_MEMORY to save memory:

    Backtrace:
    [] add_partial+0x28/0x98
    [] __slab_free+0x1d0/0x1d8
    [] kmem_cache_free+0xc4/0x128
    [] ida_get_new_above+0x21c/0x2c0
    [] sysfs_new_dirent+0xd0/0x238
    [] create_dir+0x5c/0x168
    [] sysfs_create_dir+0x98/0x128
    [] kobject_add_internal+0x114/0x258
    [] kobject_add_varg+0x7c/0xa0
    [] kobject_add+0x50/0x90
    [] kobject_create_and_add+0x54/0xc8
    [] cgroup_init+0x138/0x1f0
    [] start_kernel+0x5a0/0x840
    [] start_parisc+0xa4/0xb8
    [] packet_ioctl+0x16c/0x208
    [] ip_mroute_setsockopt+0x260/0xf20

    Signed-off-by: David Rientjes
    Cc: stable@kernel.org
    Signed-off-by: James Bottomley

    David Rientjes
     

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

1 commit

  • Commit ddd588b5dd55 ("oom: suppress nodes that are not allowed from
    meminfo on oom kill") moved lib/show_mem.o out of lib/lib.a, which
    resulted in build warnings on all architectures that implement their own
    versions of show_mem():

    lib/lib.a(show_mem.o): In function `show_mem':
    show_mem.c:(.text+0x1f4): multiple definition of `show_mem'
    arch/sparc/mm/built-in.o:(.text+0xd70): first defined here

    The fix is to remove __show_mem() and add its argument to show_mem() in
    all implementations to prevent this breakage.

    Architectures that implement their own show_mem() actually don't do
    anything with the argument yet, but they could be made to filter nodes
    that aren't allowed in the current context in the future just like the
    generic implementation.

    Reported-by: Stephen Rothwell
    Reported-by: James Bottomley
    Suggested-by: Andrew Morton
    Signed-off-by: David Rientjes
    Signed-off-by: Linus Torvalds

    David Rientjes
     

24 Mar, 2011

5 commits

  • There is no user now.

    Signed-off-by: FUJITA Tomonori
    Cc: David Miller
    Cc: Ralf Baechle
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Matt Turner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     
  • 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
     
  • This introduces CONFIG_GENERIC_FIND_BIT_LE to tell whether to use generic
    implementation of find_*_bit_le() in lib/find_next_bit.c or not.

    For now we select CONFIG_GENERIC_FIND_BIT_LE for all architectures which
    enable CONFIG_GENERIC_FIND_NEXT_BIT.

    But m68knommu wants to define own faster find_next_zero_bit_le() and
    continues using generic find_next_{,zero_}bit().
    (CONFIG_GENERIC_FIND_NEXT_BIT and !CONFIG_GENERIC_FIND_BIT_LE)

    Signed-off-by: Akinobu Mita
    Cc: Greg Ungerer
    Cc: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

23 Mar, 2011

1 commit

  • 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
     

22 Mar, 2011

1 commit


18 Mar, 2011

1 commit

  • Make __get_user_pages return -EHWPOISON for HWPOISON page only if
    FOLL_HWPOISON is specified. With this patch, the interested callers
    can distinguish HWPOISON pages from general FAULT pages, while other
    callers will still get -EFAULT for all these pages, so the user space
    interface need not to be changed.

    This feature is needed by KVM, where UCR MCE should be relayed to
    guest for HWPOISON page, while instruction emulation and MMIO will be
    tried for general FAULT page.

    The idea comes from Andrew Morton.

    Signed-off-by: Huang Ying
    Cc: Andrew Morton
    Signed-off-by: Marcelo Tosatti
    Signed-off-by: Avi Kivity

    Huang Ying
     

17 Mar, 2011

1 commit

  • * 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (76 commits)
    pch_uart: reference clock on CM-iTC
    pch_phub: add new device ML7213
    n_gsm: fix UIH control byte : P bit should be 0
    n_gsm: add a documentation
    serial: msm_serial_hs: Add MSM high speed UART driver
    tty_audit: fix tty_audit_add_data live lock on audit disabled
    tty: move cd1865.h to drivers/staging/tty/
    Staging: tty: fix build with epca.c driver
    pcmcia: synclink_cs: fix prototype for mgslpc_ioctl()
    Staging: generic_serial: fix double locking bug
    nozomi: don't use flush_scheduled_work()
    tty/serial: Relax the device_type restriction from of_serial
    MAINTAINERS: Update HVC file patterns
    tty: phase out of ioctl file pointer for tty3270 as well
    tty: forgot to remove ipwireless from drivers/char/pcmcia/Makefile
    pch_uart: Fix DMA channel miss-setting issue.
    pch_uart: fix exclusive access issue
    pch_uart: fix auto flow control miss-setting issue
    pch_uart: fix uart clock setting issue
    pch_uart : Use dev_xxx not pr_xxx
    ...

    Fix up trivial conflicts in drivers/misc/pch_phub.c (same patch applied
    twice, then changes to the same area in one branch)

    Linus Torvalds
     

16 Mar, 2011

4 commits

  • * 'for-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
    percpu, x86: Add arch-specific this_cpu_cmpxchg_double() support
    percpu: Generic support for this_cpu_cmpxchg_double()
    alpha: use L1_CACHE_BYTES for cacheline size in the linker script
    percpu: align percpu readmostly subsection to cacheline

    Fix up trivial conflict in arch/x86/kernel/vmlinux.lds.S due to the
    percpu alignment having changed ("x86: Reduce back the alignment of the
    per-CPU data section")

    Linus Torvalds
     
  • [AV: on architectures where default conflicts with existing
    flags, that is]

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Al Viro

    Stephen Rothwell
     
  • …l/git/tip/linux-2.6-tip

    * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (62 commits)
    posix-clocks: Check write permissions in posix syscalls
    hrtimer: Remove empty hrtimer_init_hres_timer()
    hrtimer: Update hrtimer->state documentation
    hrtimer: Update base[CLOCK_BOOTTIME].offset correctly
    timers: Export CLOCK_BOOTTIME via the posix timers interface
    timers: Add CLOCK_BOOTTIME hrtimer base
    time: Extend get_xtime_and_monotonic_offset() to also return sleep
    time: Introduce get_monotonic_boottime and ktime_get_boottime
    hrtimers: extend hrtimer base code to handle more then 2 clockids
    ntp: Remove redundant and incorrect parameter check
    mn10300: Switch do_timer() to xtimer_update()
    posix clocks: Introduce dynamic clocks
    posix-timers: Cleanup namespace
    posix-timers: Add support for fd based clocks
    x86: Add clock_adjtime for x86
    posix-timers: Introduce a syscall for clock tuning.
    time: Splitout compat timex accessors
    ntp: Add ADJ_SETOFFSET mode bit
    time: Introduce timekeeping_inject_offset
    posix-timer: Update comment
    ...

    Fix up new system-call-related conflicts in
    arch/x86/ia32/ia32entry.S
    arch/x86/include/asm/unistd_32.h
    arch/x86/include/asm/unistd_64.h
    arch/x86/kernel/syscall_table_32.S
    (name_to_handle_at()/open_by_handle_at() vs clock_adjtime()), and some
    due to movement of get_jiffies_64() in:
    kernel/time.c

    Linus Torvalds
     
  • …el/git/tip/linux-2.6-tip

    * 'core-futexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    arm: Remove bogus comment in futex_atomic_cmpxchg_inatomic()
    futex: Deobfuscate handle_futex_death()
    plist: Add priority list test
    plist: Shrink struct plist_head
    futex,plist: Remove debug lock assignment from plist_node
    futex,plist: Pass the real head of the priority list to plist_del()
    futex: Sanitize futex ops argument types
    futex: Sanitize cmpxchg_futex_value_locked API
    futex: Remove redundant pagefault_disable in futex_atomic_cmpxchg_inatomic()
    futex: Avoid redudant evaluation of task_pid_vnr()
    futex: Update futex_wait_setup comments about locking

    Linus Torvalds
     

14 Mar, 2011

1 commit

  • New helpers: user_statfs() and fd_statfs(), taking userland pathname and
    descriptor resp. and filling struct kstatfs. Syscalls of statfs family
    (native, compat and foreign - osf and hpux on alpha and parisc resp.)
    switched to those. Removes some boilerplate code, simplifies cleanup
    on errors...

    Signed-off-by: Al Viro

    Al Viro
     

11 Mar, 2011

2 commits

  • Change futex_atomic_op_inuser and futex_atomic_cmpxchg_inatomic
    prototypes to use u32 types for the futex as this is the data type the
    futex core code uses all over the place.

    Signed-off-by: Michel Lespinasse
    Cc: Darren Hart
    Cc: Peter Zijlstra
    Cc: Matt Turner
    Cc: Russell King
    Cc: David Howells
    Cc: Tony Luck
    Cc: Michal Simek
    Cc: Ralf Baechle
    Cc: "James E.J. Bottomley"
    Cc: Benjamin Herrenschmidt
    Cc: Martin Schwidefsky
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: Chris Metcalf
    Cc: Linus Torvalds
    LKML-Reference:
    Signed-off-by: Thomas Gleixner

    Michel Lespinasse
     
  • The cmpxchg_futex_value_locked API was funny in that it returned either
    the original, user-exposed futex value OR an error code such as -EFAULT.
    This was confusing at best, and could be a source of livelocks in places
    that retry the cmpxchg_futex_value_locked after trying to fix the issue
    by running fault_in_user_writeable().

    This change makes the cmpxchg_futex_value_locked API more similar to the
    get_futex_value_locked one, returning an error code and updating the
    original value through a reference argument.

    Signed-off-by: Michel Lespinasse
    Acked-by: Chris Metcalf [tile]
    Acked-by: Tony Luck [ia64]
    Acked-by: Thomas Gleixner
    Tested-by: Michal Simek [microblaze]
    Acked-by: David Howells [frv]
    Cc: Darren Hart
    Cc: Peter Zijlstra
    Cc: Matt Turner
    Cc: Russell King
    Cc: Ralf Baechle
    Cc: "James E.J. Bottomley"
    Cc: Benjamin Herrenschmidt
    Cc: Martin Schwidefsky
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: Linus Torvalds
    LKML-Reference:
    Signed-off-by: Thomas Gleixner

    Michel Lespinasse
     

18 Feb, 2011

1 commit

  • This is useful for system management software so that it can kick
    off things like gettys and everything that's started from a tty,
    before we reuse it from/for something else or shut it down.

    Without this ioctl it would have to temporarily become the owner of
    the tty, then call vhangup() and then give it up again.

    Cc: Lennart Poettering
    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     

11 Feb, 2011

4 commits


10 Feb, 2011

2 commits

  • The CHECK_IRQ_PER_CPU is wrong, it should be checking
    irq_to_desc(irq)->status not just irq.

    Signed-off-by: Thomas Gleixner
    Cc: stable@kernel.org
    Signed-off-by: James Bottomley

    Thomas Gleixner
     
  • On parisc, we never implemented invalidate_kernel_vmap_range() because
    it was unnecessary for the xfs use case. However, we do need to
    implement an invalidate for the opposite use case (which occurred in a
    recent NFS change) where the user wants to read through the vmap range
    and write via the kernel address. There's an additional complexity to
    this in that if the page has no userspace mappings, it might have dirty
    cache lines in the kernel (indicated by the PG_dcache_dirty bit). In
    order to get full coherency, we need to flush these pages through the
    kernel mapping before invalidating the vmap range.

    Signed-off-by: James Bottomley

    James Bottomley
     

31 Jan, 2011

1 commit

  • xtime_update() takes the xtime_lock itself.

    Signed-off-by: Torben Hohn
    Cc: hch@infradead.org
    Cc: Peter Zijlstra
    Cc: johnstul@us.ibm.com
    Cc: Helge Deller
    Cc: "James E.J. Bottomley"
    Cc: Kyle McMartin
    Cc: yong.zhang0@gmail.com
    LKML-Reference:
    Signed-off-by: Thomas Gleixner

    Torben Hohn
     

26 Jan, 2011

1 commit

  • The -rt patches change the console_semaphore to console_mutex. As a
    result, a quite large chunk of the patches changes all
    acquire/release_console_sem() to acquire/release_console_mutex()

    This commit makes things use more neutral function names which dont make
    implications about the underlying lock.

    The only real change is the return value of console_trylock which is
    inverted from try_acquire_console_sem()

    This patch also paves the way to switching console_sem from a semaphore to
    a mutex.

    [akpm@linux-foundation.org: coding-style fixes]
    [akpm@linux-foundation.org: make console_trylock return 1 on success, per Geert]
    Signed-off-by: Torben Hohn
    Cc: Thomas Gleixner
    Cc: Greg KH
    Cc: Ingo Molnar
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Torben Hohn
     

25 Jan, 2011

1 commit

  • Currently percpu readmostly subsection may share cachelines with other
    percpu subsections which may result in unnecessary cacheline bounce
    and performance degradation.

    This patch adds @cacheline parameter to PERCPU() and PERCPU_VADDR()
    linker macros, makes each arch linker scripts specify its cacheline
    size and use it to align percpu subsections.

    This is based on Shaohua's x86 only patch.

    Signed-off-by: Tejun Heo
    Cc: Shaohua Li

    Tejun Heo
     

21 Jan, 2011

3 commits

  • No functional change.

    Signed-off-by: Thomas Gleixner
    Cc: Kyle McMartin
    Acked-by: James Bottomley

    Thomas Gleixner
     
  • All architectures are finally converted. Remove the cruft.

    Signed-off-by: Thomas Gleixner
    Cc: Richard Henderson
    Cc: Mike Frysinger
    Cc: David Howells
    Cc: Tony Luck
    Cc: Greg Ungerer
    Cc: Michal Simek
    Acked-by: David Howells
    Cc: Kyle McMartin
    Acked-by: Benjamin Herrenschmidt
    Cc: Chen Liqin
    Cc: "David S. Miller"
    Cc: Chris Metcalf
    Cc: Jeff Dike

    Thomas Gleixner
     
  • The meaning of CONFIG_EMBEDDED has long since been obsoleted; the option
    is used to configure any non-standard kernel with a much larger scope than
    only small devices.

    This patch renames the option to CONFIG_EXPERT in init/Kconfig and fixes
    references to the option throughout the kernel. A new CONFIG_EMBEDDED
    option is added that automatically selects CONFIG_EXPERT when enabled and
    can be used in the future to isolate options that should only be
    considered for embedded systems (RISC architectures, SLOB, etc).

    Calling the option "EXPERT" more accurately represents its intention: only
    expert users who understand the impact of the configuration changes they
    are making should enable it.

    Reviewed-by: Ingo Molnar
    Acked-by: David Woodhouse
    Signed-off-by: David Rientjes
    Cc: Greg KH
    Cc: "David S. Miller"
    Cc: Jens Axboe
    Cc: Arnd Bergmann
    Cc: Robin Holt
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     

15 Jan, 2011

2 commits

  • This was used to flush a region even if the page table entry had been
    cleared. In theory this was never necessary, but now we've switched to
    alias based flushing, the whole set of code associated with it can be dumped.

    Signed-off-by: James Bottomley
    Signed-off-by: James Bottomley

    James Bottomley
     
  • The kernel has an 8M tmpailas space (originally designed for copying
    and clearing pages but now only used for clearing). The idea is
    to place zeros into the cache above a physical page rather than into
    the physical page and flush the cache, because often the zeros end up
    being replaced quickly anyway.

    We can also use the tmpalias space for flushing a page. The difference
    here is that we have to do tmpalias processing in the non access data and
    instruction traps. The principle is the same: as long as we know the physical
    address and have a virtual address congruent to the real one, the flush will
    be effective.

    In order to use the tmpalias space, the icache miss path has to be enhanced to
    check for the alias region to make the fic instruction effective.

    Signed-off-by: James Bottomley

    James Bottomley