06 Dec, 2009

1 commit


04 Nov, 2009

2 commits

  • cpu_is_xxx() macros are identifying generic at91sam9g45 chip. This patch adds
    the capacity to differentiate Engineering Samples and final lots through the
    inclusion of at91_cpu_fully_identify() and the related chip IDs with chip
    version field preserved.

    Signed-off-by: Nicolas Ferre
    Acked-by: Jean-Christophe PLAGNIOL-VILLARD
    Acked-by: Hans-Christian Egtvedt

    Nicolas Ferre
     
  • Somme common drivers will need those at91 cpu_is_xxx() definitions. As
    at91sam9g10 and at91sam9g45 are on the way to linus' tree, here is the patch
    that adds those chips to cpu.h in AVR32 architecture.

    Signed-off-by: Nicolas Ferre
    Signed-off-by: Haavard Skinnemoen

    Nicolas Ferre
     

24 Sep, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next: (30 commits)
    Use macros for .data.page_aligned section.
    Use macros for .bss.page_aligned section.
    Use new __init_task_data macro in arch init_task.c files.
    kbuild: Don't define ALIGN and ENTRY when preprocessing linker scripts.
    arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash 4.0
    kbuild: add static to prototypes
    kbuild: fail build if recordmcount.pl fails
    kbuild: set -fconserve-stack option for gcc 4.5
    kbuild: echo the record_mcount command
    gconfig: disable "typeahead find" search in treeviews
    kbuild: fix cc1 options check to ensure we do not use -fPIC when compiling
    checkincludes.pl: add option to remove duplicates in place
    markup_oops: use modinfo to avoid confusion with underscored module names
    checkincludes.pl: provide usage helper
    checkincludes.pl: close file as soon as we're done with it
    ctags: usability fix
    kernel hacking: move STRIP_ASM_SYMS from General
    gitignore usr/initramfs_data.cpio.bz2 and usr/initramfs_data.cpio.lzma
    kbuild: Check if linker supports the -X option
    kbuild: introduce ld-option
    ...

    Fix trivial conflict in scripts/basic/fixdep.c

    Linus Torvalds
     

22 Sep, 2009

3 commits

  • A number of architectures have identical asm/mman.h files so they can all
    be merged by using the new generic file.

    The remaining asm/mman.h files are substantially different from each
    other.

    Signed-off-by: Arnd Bergmann
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     
  • Add a flag for mmap that will be used to request a huge page region that
    will look like anonymous memory to user space. This is accomplished by
    using a file on the internal vfsmount. MAP_HUGETLB is a modifier of
    MAP_ANONYMOUS and so must be specified with it. The region will behave
    the same as a MAP_ANONYMOUS region using small pages.

    The patch also adds the MAP_STACK flag, which was previously defined only
    on some architectures but not on others. Since MAP_STACK is meant to be a
    hint only, architectures can define it without assigning a specific
    meaning to it.

    Signed-off-by: Arnd Bergmann
    Cc: Eric B Munson
    Cc: Hugh Dickins
    Cc: David Rientjes
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     
  • Commit 96177299416dbccb73b54e6b344260154a445375 ("Drop free_pages()")
    modified nr_free_pages() to return 'unsigned long' instead of 'unsigned
    int'. This made the casts to 'unsigned long' in most callers superfluous,
    so remove them.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Geert Uytterhoeven
    Reviewed-by: Christoph Lameter
    Acked-by: Ingo Molnar
    Acked-by: Russell King
    Acked-by: David S. Miller
    Acked-by: Kyle McMartin
    Acked-by: WANG Cong
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Haavard Skinnemoen
    Cc: Mikael Starvik
    Cc: "Luck, Tony"
    Cc: Hirokazu Takata
    Cc: Ralf Baechle
    Cc: David Howells
    Acked-by: Benjamin Herrenschmidt
    Cc: Martin Schwidefsky
    Cc: Paul Mundt
    Cc: Chris Zankel
    Cc: Michal Simek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     

21 Sep, 2009

2 commits


16 Sep, 2009

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (46 commits)
    powerpc64: convert to dynamic percpu allocator
    sparc64: use embedding percpu first chunk allocator
    percpu: kill lpage first chunk allocator
    x86,percpu: use embedding for 64bit NUMA and page for 32bit NUMA
    percpu: update embedding first chunk allocator to handle sparse units
    percpu: use group information to allocate vmap areas sparsely
    vmalloc: implement pcpu_get_vm_areas()
    vmalloc: separate out insert_vmalloc_vm()
    percpu: add chunk->base_addr
    percpu: add pcpu_unit_offsets[]
    percpu: introduce pcpu_alloc_info and pcpu_group_info
    percpu: move pcpu_lpage_build_unit_map() and pcpul_lpage_dump_cfg() upward
    percpu: add @align to pcpu_fc_alloc_fn_t
    percpu: make @dyn_size mandatory for pcpu_setup_first_chunk()
    percpu: drop @static_size from first chunk allocators
    percpu: generalize first chunk allocator selection
    percpu: build first chunk allocators selectively
    percpu: rename 4k first chunk allocator to page
    percpu: improve boot messages
    percpu: fix pcpu_reclaim() locking
    ...

    Fix trivial conflict as by Tejun Heo in kernel/sched.c

    Linus Torvalds
     

15 Sep, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1623 commits)
    netxen: update copyright
    netxen: fix tx timeout recovery
    netxen: fix file firmware leak
    netxen: improve pci memory access
    netxen: change firmware write size
    tg3: Fix return ring size breakage
    netxen: build fix for INET=n
    cdc-phonet: autoconfigure Phonet address
    Phonet: back-end for autoconfigured addresses
    Phonet: fix netlink address dump error handling
    ipv6: Add IFA_F_DADFAILED flag
    net: Add DEVTYPE support for Ethernet based devices
    mv643xx_eth.c: remove unused txq_set_wrr()
    ucc_geth: Fix hangs after switching from full to half duplex
    ucc_geth: Rearrange some code to avoid forward declarations
    phy/marvell: Make non-aneg speed/duplex forcing work for 88E1111 PHYs
    drivers/net/phy: introduce missing kfree
    drivers/net/wan: introduce missing kfree
    net: force bridge module(s) to be GPL
    Subject: [PATCH] appletalk: Fix skb leak when ipddp interface is not loaded
    ...

    Fixed up trivial conflicts:

    - arch/x86/include/asm/socket.h

    converted to in the x86 tree. The generic
    header has the same new #define's, so that works out fine.

    - drivers/net/tun.c

    fix conflict between 89f56d1e9 ("tun: reuse struct sock fields") that
    switched over to using 'tun->socket.sk' instead of the redundantly
    available (and thus removed) 'tun->sk', and 2b980dbd ("lsm: Add hooks
    to the TUN driver") which added a new 'tun->sk' use.

    Noted in 'next' by Stephen Rothwell.

    Linus Torvalds
     

11 Sep, 2009

1 commit


09 Sep, 2009

1 commit


02 Sep, 2009

2 commits

  • Add a keyctl to install a process's session keyring onto its parent. This
    replaces the parent's session keyring. Because the COW credential code does
    not permit one process to change another process's credentials directly, the
    change is deferred until userspace next starts executing again. Normally this
    will be after a wait*() syscall.

    To support this, three new security hooks have been provided:
    cred_alloc_blank() to allocate unset security creds, cred_transfer() to fill in
    the blank security creds and key_session_to_parent() - which asks the LSM if
    the process may replace its parent's session keyring.

    The replacement may only happen if the process has the same ownership details
    as its parent, and the process has LINK permission on the session keyring, and
    the session keyring is owned by the process, and the LSM permits it.

    Note that this requires alteration to each architecture's notify_resume path.
    This has been done for all arches barring blackfin, m68k* and xtensa, all of
    which need assembly alteration to support TIF_NOTIFY_RESUME. This allows the
    replacement to be performed at the point the parent process resumes userspace
    execution.

    This allows the userspace AFS pioctl emulation to fully emulate newpag() and
    the VIOCSETTOK and VIOCSETTOK2 pioctls, all of which require the ability to
    alter the parent process's PAG membership. However, since kAFS doesn't use
    PAGs per se, but rather dumps the keys into the session keyring, the session
    keyring of the parent must be replaced if, for example, VIOCSETTOK is passed
    the newpag flag.

    This can be tested with the following program:

    #include
    #include
    #include

    #define KEYCTL_SESSION_TO_PARENT 18

    #define OSERROR(X, S) do { if ((long)(X) == -1) { perror(S); exit(1); } } while(0)

    int main(int argc, char **argv)
    {
    key_serial_t keyring, key;
    long ret;

    keyring = keyctl_join_session_keyring(argv[1]);
    OSERROR(keyring, "keyctl_join_session_keyring");

    key = add_key("user", "a", "b", 1, keyring);
    OSERROR(key, "add_key");

    ret = keyctl(KEYCTL_SESSION_TO_PARENT);
    OSERROR(ret, "KEYCTL_SESSION_TO_PARENT");

    return 0;
    }

    Compiled and linked with -lkeyutils, you should see something like:

    [dhowells@andromeda ~]$ keyctl show
    Session Keyring
    -3 --alswrv 4043 4043 keyring: _ses
    355907932 --alswrv 4043 -1 \_ keyring: _uid.4043
    [dhowells@andromeda ~]$ /tmp/newpag
    [dhowells@andromeda ~]$ keyctl show
    Session Keyring
    -3 --alswrv 4043 4043 keyring: _ses
    1055658746 --alswrv 4043 4043 \_ user: a
    [dhowells@andromeda ~]$ /tmp/newpag hello
    [dhowells@andromeda ~]$ keyctl show
    Session Keyring
    -3 --alswrv 4043 4043 keyring: hello
    340417692 --alswrv 4043 4043 \_ user: a

    Where the test program creates a new session keyring, sticks a user key named
    'a' into it and then installs it on its parent.

    Signed-off-by: David Howells
    Signed-off-by: James Morris

    David Howells
     
  • Implement TIF_NOTIFY_RESUME for most of those architectures in which isn't yet
    available, and, whilst we're at it, have it call the appropriate tracehook.

    After this patch, blackfin, m68k* and xtensa still lack support and need
    alteration of assembly code to make it work.

    Resume notification can then be used (by a later patch) to install a new
    session keyring on the parent of a process.

    Signed-off-by: David Howells
    Acked-by: Russell King

    cc: linux-arch@vger.kernel.org
    Signed-off-by: James Morris

    David Howells
     

25 Aug, 2009

1 commit


14 Aug, 2009

1 commit

  • Conflicts:
    arch/sparc/kernel/smp_64.c
    arch/x86/kernel/cpu/perf_counter.c
    arch/x86/kernel/setup_percpu.c
    drivers/cpufreq/cpufreq_ondemand.c
    mm/percpu.c

    Conflicts in core and arch percpu codes are mostly from commit
    ed78e1e078dd44249f88b1dd8c76dafb39567161 which substituted many
    num_possible_cpus() with nr_cpu_ids. As for-next branch has moved all
    the first chunk allocators into mm/percpu.c, the changes are moved
    from arch code to mm/percpu.c.

    Signed-off-by: Tejun Heo

    Tejun Heo
     

13 Aug, 2009

1 commit


06 Aug, 2009

2 commits

  • This sockopt goes in line with SO_TYPE and SO_PROTOCOL. It makes it
    possible for userspace programs to pass around file descriptors — I
    am referring to arguments-to-functions, but it may even work for the
    fd passing over UNIX sockets — without needing to also pass the
    auxiliary information (PF_INET6/IPPROTO_TCP).

    Signed-off-by: Jan Engelhardt
    Signed-off-by: David S. Miller

    Jan Engelhardt
     
  • Similar to SO_TYPE returning the socket type, SO_PROTOCOL allows to
    retrieve the protocol used with a given socket.

    I am not quite sure why we have that-many copies of socket.h, and why
    the values are not the same on all arches either, but for where hex
    numbers dominate, I use 0x1029 for SO_PROTOCOL as that seems to be
    the next free unused number across a bunch of operating systems, or
    so Google results make me want to believe. SO_PROTOCOL for others
    just uses the next free Linux number, 38.

    Signed-off-by: Jan Engelhardt
    Signed-off-by: David S. Miller

    Jan Engelhardt
     

28 Jul, 2009

1 commit

  • mm: Pass virtual address to [__]p{te,ud,md}_free_tlb()

    Upcoming paches to support the new 64-bit "BookE" powerpc architecture
    will need to have the virtual address corresponding to PTE page when
    freeing it, due to the way the HW table walker works.

    Basically, the TLB can be loaded with "large" pages that cover the whole
    virtual space (well, sort-of, half of it actually) represented by a PTE
    page, and which contain an "indirect" bit indicating that this TLB entry
    RPN points to an array of PTEs from which the TLB can then create direct
    entries. Thus, in order to invalidate those when PTE pages are deleted,
    we need the virtual address to pass to tlbilx or tlbivax instructions.

    The old trick of sticking it somewhere in the PTE page struct page sucks
    too much, the address is almost readily available in all call sites and
    almost everybody implemets these as macros, so we may as well add the
    argument everywhere. I added it to the pmd and pud variants for consistency.

    Signed-off-by: Benjamin Herrenschmidt
    Acked-by: David Howells [MN10300 & FRV]
    Acked-by: Nick Piggin
    Acked-by: Martin Schwidefsky [s390]
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     

27 Jul, 2009

3 commits

  • The ezLCD+101 board (to which an favr-32 is fitted) has a long,
    unshielded, nasty lead between the touch panel and the ads7843 touch
    controller. In order to get satisfactory response then, we need to
    employ every noise-reduction trick in the driver's arsenal. After
    extensive fiddling I've found some good settings:

    1) We keep vref on all the time to dramatically reduce settling times
    (at the cost of a tiny increase in power consumption).

    2) Despite 1 the settling time is still non-zero. 500uS is plenty of
    time for the signals to settle

    3) Despite 1 and 2 there's still a little bit of noise around. By
    setting a pen recheck delay we make the panel feel less touchy and
    twitchy.

    Someone with more time and patience myself might be able to tune this
    numbers further but these settings are now perfectly acceptable for
    normal use.

    Tested on ezLCD+101 though should only improve response on other ezLCD+/
    favr-32 boards too.

    Signed-off-by: Ben Nizette
    Signed-off-by: Haavard Skinnemoen

    Ben Nizette
     
  • in case of memcpy(p, unaligned, 1..3) we get 1..3 as the
    return value instead of p

    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Haavard Skinnemoen

    Sebastian Andrzej Siewior
     
  • memcpy(p, unaligned, 4..) returns (p + num_of_unaligned_by_copied)
    instead of p because p is not preserved in the unaligned case.

    Noticed by Herbert Xu's superior parameter recycling coding technique
    which let the md4 self-test fail on avr32.

    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Haavard Skinnemoen

    Sebastian Andrzej Siewior
     

11 Jul, 2009

1 commit

  • Pull the initial preempt_count value into a single
    definition site.

    Maintainers for: alpha, ia64 and m68k, please have a look,
    your arch code is funny.

    The header magic is a bit odd, but similar to the KERNEL_DS
    one, CPP waits with expanding these macros until the
    INIT_THREAD_INFO macro itself is expanded, which is in
    arch/*/kernel/init_task.c where we've already included
    sched.h so we're good.

    Cc: tony.luck@intel.com
    Cc: rth@twiddle.net
    Cc: geert@linux-m68k.org
    Signed-off-by: Peter Zijlstra
    Acked-by: Matt Mackall
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     

09 Jul, 2009

2 commits

  • Discarded sections in different archs share some commonality but have
    considerable differences. This led to linker script for each arch
    implementing its own /DISCARD/ definition, which makes maintaining
    tedious and adding new entries error-prone.

    This patch makes all linker scripts to move discard definitions to the
    end of the linker script and use the common DISCARDS macro. As ld
    uses the first matching section definition, archs can include default
    discarded sections by including them earlier in the linker script.

    ia64 is notable because it first throws away some ia64 specific
    subsections and then include the rest of the sections into the final
    image, so those sections must be discarded before the inclusion.

    defconfig compile tested for x86, x86-64, powerpc, powerpc64, ia64,
    alpha, sparc, sparc64 and s390. Michal Simek tested microblaze.

    Signed-off-by: Tejun Heo
    Acked-by: Paul Mundt
    Acked-by: Mike Frysinger
    Tested-by: Michal Simek
    Cc: linux-arch@vger.kernel.org
    Cc: Michal Simek
    Cc: microblaze-uclinux@itee.uq.edu.au
    Cc: Sam Ravnborg
    Cc: Tony Luck

    Tejun Heo
     
  • Commit 5fd29d6ccbc98884569d6f3105aeca70858b3e0f ("printk: clean up
    handling of log-levels and newlines") changed printk semantics. printk
    lines with multiple KERN_ prefixes are no longer emitted as
    before the patch.

    is now included in the output on each additional use.

    Remove all uses of multiple KERN_s in formats.

    Signed-off-by: Joe Perches
    Signed-off-by: Linus Torvalds

    Joe Perches
     

24 Jun, 2009

1 commit

  • x86 throws away .discard section but no other archs do. Also,
    .discard is not thrown away while linking modules. Make every arch
    and module linking throw it away. This will be used to define dummy
    variables for percpu declarations and definitions.

    This patch is based on Ivan Kokshaysky's alpha percpu patch.

    [ Impact: always throw away everything in .discard ]

    Signed-off-by: Tejun Heo
    Cc: Ivan Kokshaysky
    Cc: Richard Henderson
    Cc: Russell King
    Cc: Haavard Skinnemoen
    Cc: Bryan Wu
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc: David Howells
    Cc: Yoshinori Sato
    Cc: Tony Luck
    Cc: Hirokazu Takata
    Cc: Geert Uytterhoeven
    Cc: Michal Simek
    Cc: Ralf Baechle
    Cc: Kyle McMartin
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Cc: David S. Miller
    Cc: Jeff Dike
    Cc: Chris Zankel
    Cc: Rusty Russell
    Cc: Ingo Molnar

    Tejun Heo
     

22 Jun, 2009

1 commit

  • This allows the callers to now pass down the full set of FAULT_FLAG_xyz
    flags to handle_mm_fault(). All callers have been (mechanically)
    converted to the new calling convention, there's almost certainly room
    for architectures to clean up their code and then add FAULT_FLAG_RETRY
    when that support is added.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

19 Jun, 2009

1 commit

  • avr32, mn10300, parisc, s390, sh, xtensa:

    They never set PT_DTRACE, but clear it after do_execve().

    Signed-off-by: Oleg Nesterov
    Cc: David Howells
    Acked-by: Kyle McMartin
    Cc: Grant Grundler
    Cc: Matthew Wilcox
    Acked-by: Martin Schwidefsky
    Cc: Heiko Carstens
    Acked-by: Paul Mundt
    Acked-by: Chris Zankel
    Acked-by: Roland McGrath
    Acked-by: Haavard Skinnemoen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     

17 Jun, 2009

1 commit

  • * create mm/init-mm.c, move init_mm there
    * remove INIT_MM, initialize init_mm with C99 initializer
    * unexport init_mm on all arches:

    init_mm is already unexported on x86.

    One strange place is some OMAP driver (drivers/video/omap/) which
    won't build modular, but it's already wants get_vm_area() export.
    Somebody should look there.

    [akpm@linux-foundation.org: add missing #includes]
    Signed-off-by: Alexey Dobriyan
    Cc: Mike Frysinger
    Cc: Americo Wang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

15 Jun, 2009

1 commit


14 Jun, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6:
    avr32: Fix oops on unaligned user access
    avr32: Add support for Mediama RMTx add-on board for ATNGW100
    avr32: Change Atmel ATNGW100 config to add choice of add-on board
    Fix MIMC200 board LCD init
    avr32: Fix clash in ATMEL_USART_ flags
    avr32: remove obsolete hw_interrupt_type
    avr32: Solves problem with inverted MCI detect pin on Merisc board
    atmel-mci: Add support for inverted detect pin

    Linus Torvalds
     

13 Jun, 2009

3 commits

  • The unaligned address exception handler (and others) does not scan the
    fixup tables before oopsing. This is bad because it means passing a
    badly aligned pointer from user space might crash the kernel.

    Fix this by scanning the fixup tables in _exception(). This should
    resolve the issue for unaligned addresses as well as other less common
    exceptions that might be happening during a userspace access. The page
    fault handler already does fixup processing.

    Signed-off-by: Haavard Skinnemoen

    Haavard Skinnemoen
     
  • Haavard Skinnemoen
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
    add generic lib/checksum.c
    asm-generic: add a generic uaccess.h
    asm-generic: add generic NOMMU versions of some headers
    asm-generic: add generic atomic.h and io.h
    asm-generic: add legacy I/O header files
    asm-generic: add generic versions of common headers
    asm-generic: make bitops.h usable
    asm-generic: make pci.h usable directly
    asm-generic: make get_rtc_time overridable
    asm-generic: rename page.h and uaccess.h
    asm-generic: rename atomic.h to atomic-long.h
    asm-generic: add a generic unistd.h
    asm-generic: add generic ABI headers
    asm-generic: add generic sysv ipc headers
    asm-generic: introduce asm/bitsperlong.h
    asm-generic: rename termios.h, signal.h and mman.h

    Linus Torvalds
     

12 Jun, 2009

4 commits

  • Everyone cut and paste this comment from my original one. We now do
    it generically, so cut the comments.

    Signed-off-by: Rusty Russell
    Cc: Amerigo Wang

    Rusty Russell
     
  • The existing asm-generic/atomic.h only defines the
    atomic_long type. This renames it to atomic-long.h
    so we have a place to add a truly generic atomic.h
    that can be used on all non-SMP systems.

    Signed-off-by: Remis Lima Baima
    Signed-off-by: Arnd Bergmann
    Acked-by: Ingo Molnar

    Arnd Bergmann
     
  • This provides a reliable way for asm-generic/types.h and other
    files to find out if it is running on a 32 or 64 bit platform.

    We cannot use CONFIG_64BIT for this in headers that are included
    from user space because CONFIG symbols are not available there.
    We also cannot do it inside of asm/types.h because some headers
    need the word size but cannot include types.h.

    The solution is to introduce a new header
    that defines both __BITS_PER_LONG for user space and
    BITS_PER_LONG for usage in the kernel. The asm-generic
    version falls back to 32 bit unless the architecture overrides
    it, which I did for all 64 bit platforms.

    Signed-off-by: Remis Lima Baima
    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     
  • The existing asm-generic versions are incomplete and included
    by some architectures. New architectures should be able
    to use a generic version, so rename the existing files and
    change all users, which lets us add the new files.

    Signed-off-by: Remis Lima Baima
    Signed-off-by: Arnd Bergmann

    Arnd Bergmann