27 Mar, 2007

1 commit

  • Compiling 2.6.21-rc5 with gcc-4.2.0 20070317 (prerelease)
    for sparc64 fails as follows:

    gcc -Wp,-MD,arch/sparc64/kernel/.time.o.d -nostdinc -isystem /home/mikpe/pkgs/linux-sparc64/gcc-4.2.0/lib/gcc/sparc64-unknown-linux-gnu/4.2.0/include -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare -Wa,--undeclared-regs -fomit-frame-pointer -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -Werror -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(time)" -D"KBUILD_MODNAME=KBUILD_STR(time)" -c -o arch/sparc64/kernel/time.o arch/sparc64/kernel/time.c
    cc1: warnings being treated as errors
    arch/sparc64/kernel/time.c: In function 'kick_start_clock':
    arch/sparc64/kernel/time.c:559: warning: overflow in implicit constant conversion
    make[1]: *** [arch/sparc64/kernel/time.o] Error 1
    make: *** [arch/sparc64/kernel] Error 2

    gcc gets unhappy when the MSTK_SET macro's u8 __val variable
    is updated with &= ~0xff (MSTK_YEAR_MASK). Making the constant
    unsigned fixes the problem.

    [ I fixed up the sparc32 side as well -DaveM ]

    Signed-off-by: Mikael Pettersson
    Signed-off-by: David S. Miller

    Mikael Pettersson
     

15 Mar, 2007

1 commit


13 Mar, 2007

1 commit


10 Mar, 2007

1 commit


03 Mar, 2007

2 commits


12 Feb, 2007

2 commits

  • same as on sparc64

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • The line discipline numbers N_* are currently defined for each architecture
    individually, but (except for a seeming mistake) identically, in
    asm/termios.h. There is no obvious reason why these numbers should be
    architecture specific, nor any apparent relationship with the termios
    structure. The total number of these, NR_LDISCS, is defined in linux/tty.h
    anyway. So I propose the following patch which moves the definitions of
    the individual line disciplines to linux/tty.h too.

    Three of these numbers (N_MASC, N_PROFIBUS_FDL, and N_SMSBLOCK) are unused
    in the current kernel, but the patch still keeps the complete set in case
    there are plans to use them yet.

    Signed-off-by: Tilman Schmidt
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tilman Schmidt
     

02 Feb, 2007

1 commit


01 Jan, 2007

1 commit


18 Dec, 2006

1 commit


14 Dec, 2006

1 commit

  • Virtually index, physically tagged cache architectures can get away
    without cache flushing when forking. This patch adds a new cache
    flushing function flush_cache_dup_mm(struct mm_struct *) which for the
    moment I've implemented to do the same thing on all architectures
    except on MIPS where it's a no-op.

    Signed-off-by: Ralf Baechle
    Signed-off-by: Linus Torvalds

    Ralf Baechle
     

09 Dec, 2006

1 commit

  • In order to sort out our struct termios and add proper speed control we need
    to separate the kernel and user termios structures. Glibc is fine but the
    other libraries rely on the kernel exported struct termios and we need to
    extend this without breaking the ABI/API

    To do so we add a struct ktermios which is the kernel view of a termios
    structure and overlaps the struct termios with extra fields on the end for
    now. (That limitation will go away in later patches). Some platforms (eg
    alpha) planned ahead and thus use the same struct for both, others did not.

    This just adds the structures but does not use them, it seems a sensible
    splitting point for bisect if there are compile failures (not that I expect
    them)

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     

08 Dec, 2006

1 commit

  • The last thing we agreed on was to remove the macros entirely for 2.6.19,
    on all architectures. Unfortunately, I think nobody actually _did_ that,
    so they are still there.

    [akpm@osdl.org: x86_64 fix]
    Cc: David Woodhouse
    Cc: Greg Schafer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     

03 Dec, 2006

1 commit


02 Dec, 2006

1 commit

  • Add arch specific dev_archdata to struct device

    Adds an arch specific struct dev_arch to struct device. This enables
    architecture to add specific fields to every device in the system, like
    DMA operation pointers, NUMA node ID, firmware specific data, etc...

    Signed-off-by: Benjamin Herrenschmidt
    Acked-by: Andi Kleen
    Acked-By: David Howells
    Signed-off-by: Greg Kroah-Hartman

    Benjamin Herrenschmidt
     

06 Nov, 2006

1 commit

  • When I added the entries for the robust futex syscall entries, I
    forgot to bump NR_SYSCALLS. The current situation is error-prone
    because NR_SYSCALLS lives in entry.S where the system call limit
    checks are enforced. Move the definition to asm/unistd.h in order to
    make this mistake much more difficult to make.

    And wire up sys_migrate_pages since the powerpc folks implemented the
    compat wrapper for us.

    Signed-off-by: David S. Miller

    David S. Miller
     

20 Oct, 2006

1 commit


09 Oct, 2006

3 commits

  • Use the new typedef for interrupt handler function pointers rather than
    actually spelling out the full thing each time. This was scripted with the
    following small shell script:

    #!/bin/sh
    egrep -nHrl -e 'irqreturn_t[ ]*[(][*]' $* |
    while read i
    do
    echo $i
    perl -pi -e 's/irqreturn_t\s*[(]\s*[*]\s*([_a-zA-Z0-9]*)\s*[)]\s*[(]\s*int\s*,\s*void\s*[*]\s*[)]/irq_handler_t \1/g' $i || exit $?
    done

    Signed-Off-By: David Howells

    David Howells
     
  • read_trylock() is broken on sparc32 (doesn't build and didn't work
    right, actually). Proposed fix:

    - make "writer holds lock" distinguishable from "reader tries to grab
    lock"

    - have __raw_read_trylock() try to acquire the mutex (in LSB of lock),
    terminating spin if we see that there's writer holding it. Then do
    the rest as we do in read_lock().

    Thanks to Ingo for discussion...

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     

04 Oct, 2006

1 commit


02 Oct, 2006

1 commit

  • The last in-kernel user of errno is gone, so we should remove the definition
    and everything referring to it. This also removes the now-unused lib/execve.c
    file that was introduced earlier.

    Also remove every trace of __KERNEL_SYSCALLS__ that still remained in the
    kernel.

    Signed-off-by: Arnd Bergmann
    Cc: Andi Kleen
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Russell King
    Cc: Ian Molton
    Cc: Mikael Starvik
    Cc: David Howells
    Cc: Yoshinori Sato
    Cc: Hirokazu Takata
    Cc: Ralf Baechle
    Cc: Kyle McMartin
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Paul Mundt
    Cc: Kazumoto Kojima
    Cc: Richard Curnow
    Cc: William Lee Irwin III
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Cc: Miles Bader
    Cc: Chris Zankel
    Cc: "Luck, Tony"
    Cc: Geert Uytterhoeven
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     

01 Oct, 2006

1 commit

  • On systems running with virtual cpus there is optimization potential in
    regard to spinlocks and rw-locks. If the virtual cpu that has taken a lock
    is known to a cpu that wants to acquire the same lock it is beneficial to
    yield the timeslice of the virtual cpu in favour of the cpu that has the
    lock (directed yield).

    With CONFIG_PREEMPT="n" this can be implemented by the architecture without
    common code changes. Powerpc already does this.

    With CONFIG_PREEMPT="y" the lock loops are coded with _raw_spin_trylock,
    _raw_read_trylock and _raw_write_trylock in kernel/spinlock.c. If the lock
    could not be taken cpu_relax is called. A directed yield is not possible
    because cpu_relax doesn't know anything about the lock. To be able to
    yield the lock in favour of the current lock holder variants of cpu_relax
    for spinlocks and rw-locks are needed. The new _raw_spin_relax,
    _raw_read_relax and _raw_write_relax primitives differ from cpu_relax
    insofar that they have an argument: a pointer to the lock structure.

    Signed-off-by: Martin Schwidefsky
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Haavard Skinnemoen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Martin Schwidefsky
     

26 Sep, 2006

2 commits

  • One of the changes necessary for shared page tables is to standardize the
    pxx_page macros. pte_page and pmd_page have always returned the struct
    page associated with their entry, while pte_page_kernel and pmd_page_kernel
    have returned the kernel virtual address. pud_page and pgd_page, on the
    other hand, return the kernel virtual address.

    Shared page tables needs pud_page and pgd_page to return the actual page
    structures. There are very few actual users of these functions, so it is
    simple to standardize their usage.

    Since this is basic cleanup, I am submitting these changes as a standalone
    patch. Per Hugh Dickins' comments about it, I am also changing the
    pxx_page_kernel macros to pxx_page_vaddr to clarify their meaning.

    Signed-off-by: Dave McCracken
    Cc: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave McCracken
     
  • They all contain the same thing. Instead, have a single generic one in
    include/asm-generic, and permit an arch to override as needed.

    Signed-off-by: Jeff Garzik

    Jeff Garzik
     

25 Sep, 2006

1 commit


24 Sep, 2006

1 commit


21 Sep, 2006

1 commit


19 Sep, 2006

1 commit


13 Sep, 2006

1 commit


08 Sep, 2006

1 commit

  • This prevents cross-region mappings on IA64 and SPARC which could lead
    to system crash. They were correctly trapped for normal mmap() calls,
    but not for the kernel internal calls generated by executable loading.

    This code just moves the architecture-specific cross-region checks into
    an arch-specific "arch_mmap_check()" macro, and defines that for the
    architectures that needed it (ia64, sparc and sparc64).

    Architectures that don't have any special requirements can just ignore
    the new cross-region check, since the mmap() code will just notice on
    its own when the macro isn't defined.

    Signed-off-by: Pavel Emelianov
    Signed-off-by: Kirill Korotaev
    Acked-by: David Miller
    Signed-off-by: Greg Kroah-Hartman
    [ Cleaned up to not affect architectures that don't need it ]
    Signed-off-by: Linus Torvalds

    Kirill Korotaev
     

10 Aug, 2006

1 commit

  • Kill host_set->next
    Fix simplex support
    Allow per platform setting of IDE legacy bases

    Some of this can be tidied further later on, in particular all the
    legacy port gunge belongs as a PCI quirk/PCI header decode to understand
    the special legacy IDE rules in the PCI spec.

    Longer term Jeff also wants to move the request_irq/free_irq out of core
    which will make this even cleaner.

    tj: folded in three followup patches - ata_piix-fix, broken-arch-fix
    and fix-new-legacy-handling, and separated per-dev xfermask into
    separate patch preceding this one. Folded in fixes are...

    * ata_piix-fix: fix build failure due to host_set->next removal
    * broken-arch-fix: add missing include/asm-*/libata-portmap.h
    * fix-new-legacy-handling:
    * In ata_pci_init_legacy_port(), probe_num was incorrectly
    incremented during initialization of the secondary port and
    probe_ent->n_ports was incorrectly fixed to 1.

    * Both legacy ports ended up having the same hard_port_no.

    * When printing port information, both legacy ports printed
    the first irq.

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Tejun Heo

    Alan Cox
     

25 Jul, 2006

1 commit


22 Jul, 2006

1 commit


15 Jul, 2006

1 commit

  • set_wmb should not be used in the kernel because it just confuses the
    code more and has no benefit. Since it is not currently used in the
    kernel this patch removes it so that new code does not include it.

    All archs define set_wmb(var, value) to do { var = value; wmb(); }
    while(0) except ia64 and sparc which use a mb() instead. But this is
    still moot since it is not used anyway.

    Hasn't been tested on any archs but x86 and x86_64 (and only compiled
    tested)

    Signed-off-by: Steven Rostedt
    Signed-off-by: Linus Torvalds

    Steven Rostedt
     

05 Jul, 2006

1 commit

  • * git://git.infradead.org/hdrinstall-2.6:
    Remove export of include/linux/isdn/tpam.h
    Remove and from userspace export
    Restrict headers exported to userspace for SPARC and SPARC64
    Add empty Kbuild files for 'make headers_install' in remaining arches.
    Add Kbuild file for Alpha 'make headers_install'
    Add Kbuild file for SPARC 'make headers_install'
    Add Kbuild file for IA64 'make headers_install'
    Add Kbuild file for S390 'make headers_install'
    Add Kbuild file for i386 'make headers_install'
    Add Kbuild file for x86_64 'make headers_install'
    Add Kbuild file for PowerPC 'make headers_install'
    Add generic Kbuild files for 'make headers_install'
    Basic implementation of 'make headers_check'
    Basic implementation of 'make headers_install'

    Linus Torvalds
     

03 Jul, 2006

1 commit


30 Jun, 2006

2 commits

  • * master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (30 commits)
    [TIPC]: Initial activation message now includes TIPC version number
    [TIPC]: Improve response to requests for node/link information
    [TIPC]: Fixed skb_under_panic caused by tipc_link_bundle_buf
    [IrDA]: Fix the AU1000 FIR dependencies
    [IrDA]: Fix RCU lock pairing on error path
    [XFRM]: unexport xfrm_state_mtu
    [NET]: make skb_release_data() static
    [NETFILTE] ipv4: Fix typo (Bugzilla #6753)
    [IrDA]: MCS7780 usb_driver struct should be static
    [BNX2]: Turn off link during shutdown
    [BNX2]: Use dev_kfree_skb() instead of the _irq version
    [ATM]: basic sysfs support for ATM devices
    [ATM]: [suni] change suni_init to __devinit
    [ATM]: [iphase] should be __devinit not __init
    [ATM]: [idt77105] should be __devinit not __init
    [BNX2]: Add NETIF_F_TSO_ECN
    [NET]: Add ECN support for TSO
    [AF_UNIX]: Datagram getpeersec
    [NET]: Fix logical error in skb_gso_ok
    [PKT_SCHED]: PSCHED_TADD() and PSCHED_TADD2() can result,tv_usec >= 1000000
    ...

    Linus Torvalds
     
  • This patch implements an API whereby an application can determine the
    label of its peer's Unix datagram sockets via the auxiliary data mechanism of
    recvmsg.

    Patch purpose:

    This patch enables a security-aware application to retrieve the
    security context of the peer of a Unix datagram socket. The application
    can then use this security context to determine the security context for
    processing on behalf of the peer who sent the packet.

    Patch design and implementation:

    The design and implementation is very similar to the UDP case for INET
    sockets. Basically we build upon the existing Unix domain socket API for
    retrieving user credentials. Linux offers the API for obtaining user
    credentials via ancillary messages (i.e., out of band/control messages
    that are bundled together with a normal message). To retrieve the security
    context, the application first indicates to the kernel such desire by
    setting the SO_PASSSEC option via getsockopt. Then the application
    retrieves the security context using the auxiliary data mechanism.

    An example server application for Unix datagram socket should look like this:

    toggle = 1;
    toggle_len = sizeof(toggle);

    setsockopt(sockfd, SOL_SOCKET, SO_PASSSEC, &toggle, &toggle_len);
    recvmsg(sockfd, &msg_hdr, 0);
    if (msg_hdr.msg_controllen > sizeof(struct cmsghdr)) {
    cmsg_hdr = CMSG_FIRSTHDR(&msg_hdr);
    if (cmsg_hdr->cmsg_len cmsg_level == SOL_SOCKET &&
    cmsg_hdr->cmsg_type == SCM_SECURITY) {
    memcpy(&scontext, CMSG_DATA(cmsg_hdr), sizeof(scontext));
    }
    }

    sock_setsockopt is enhanced with a new socket option SOCK_PASSSEC to allow
    a server socket to receive security context of the peer.

    Testing:

    We have tested the patch by setting up Unix datagram client and server
    applications. We verified that the server can retrieve the security context
    using the auxiliary data mechanism of recvmsg.

    Signed-off-by: Catherine Zhang
    Acked-by: Acked-by: James Morris
    Signed-off-by: David S. Miller

    Catherine Zhang