12 Oct, 2006

1 commit

  • There's nothing arch-specific about check_signature(), so move it to
    . Use a cross between the Alpha and i386 implementations as
    the generic one.

    Signed-off-by: Matthew Wilcox
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matthew Wilcox
     

09 Oct, 2006

2 commits


08 Oct, 2006

1 commit


02 Oct, 2006

1 commit

  • Some architectures provide an execve function that does not set errno, but
    instead returns the result code directly. Rename these to kernel_execve to
    get the right semantics there. Moreover, there is no reasone for any of these
    architectures to still provide __KERNEL_SYSCALLS__ or _syscallN macros, so
    remove these right away.

    [akpm@osdl.org: build fix]
    [bunk@stusta.de: build fix]
    Signed-off-by: Arnd Bergmann
    Cc: Andi Kleen
    Acked-by: 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: Adrian Bunk
    Cc: Arnd Bergmann
    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
     

24 Sep, 2006

1 commit


19 Sep, 2006

2 commits


17 Sep, 2006

1 commit

  • Alpha currently fails 'make headers_check' in the 2.6.18-rc kernels. This
    patch fixes it, by moving the existing #ifdef __KERNEL__ in asm/page.h so that
    it covers everything that userspace shouldn't so, and by adding asm/compiler.h
    to the list of exported files so that its use within asm/byteorder.h is
    successful.

    [ Note that at least with GCC 4, doesn't do the forced
    inlining about which there are nasty comments (and a workaround) in
    , unless you set CONFIG_FORCED_INLINING. Rather than keep
    the mess you have in you could perhaps just make sure
    CONFIG_FORCED_INLINING=n is also honoured with GCC3, and make sure it cannot
    be set for Alpha? ]

    Signed-off-by: David Woodhouse
    Cc: Sam Ravnborg
    Cc: Ivan Kokshaysky
    Cc: Richard Henderson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Woodhouse
     

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
     

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
     

04 Jul, 2006

1 commit


03 Jul, 2006

1 commit


30 Jun, 2006

2 commits

  • 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
     
  • Add ->retrigger() irq op to consolidate hw_irq_resend() implementations.
    (Most architectures had it defined to NOP anyway.)

    NOTE: ia64 needs testing. i386 and x86_64 tested.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

28 Jun, 2006

1 commit

  • locking init cleanups:

    - convert " = SPIN_LOCK_UNLOCKED" to spin_lock_init() or DEFINE_SPINLOCK()
    - convert rwlocks in a similar manner

    this patch was generated automatically.

    Motivation:

    - cleanliness
    - lockdep needs control of lock initialization, which the open-coded
    variants do not give
    - it's also useful for -rt and for lock debugging in general

    Signed-off-by: Ingo Molnar
    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

26 Jun, 2006

1 commit


23 Jun, 2006

2 commits

  • Correct the return type of handle_IRQ_event() (inconsistency noticed during
    Xen development), and remove redundant declarations. The return type
    adjustment required breaking out the definition of irqreturn_t into a
    separate header, in order to satisfy current include order dependencies.

    Signed-off-by: Jan Beulich

    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Russell King
    Cc: Ian Molton
    Cc: Mikael Starvik
    Cc: Yoshinori Sato
    Cc: Hirokazu Takata
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: William Lee Irwin III
    Cc: "David S. Miller"
    Cc: Miles Bader
    Cc: Geert Uytterhoeven
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Beulich
     
  • VGA_MAP_MEM translates to ioremap() on some architectures. It makes sense
    to do this to vga_vram_base, because we're going to access memory between
    vga_vram_base and vga_vram_end.

    But it doesn't really make sense to map starting at vga_vram_end, because
    we aren't going to access memory starting there. On ia64, which always has
    to be different, ioremapping vga_vram_end gives you something completely
    incompatible with ioremapped vga_vram_start, so vga_vram_size ends up being
    nonsense.

    As a bonus, we often know the size up front, so we can use ioremap()
    correctly, rather than giving it a zero size.

    Signed-off-by: Bjorn Helgaas
    Cc: "Antonino A. Daplas"
    Cc: "Luck, Tony"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     

21 Jun, 2006

1 commit

  • * git://git.infradead.org/hdrcleanup-2.6: (63 commits)
    [S390] __FD_foo definitions.
    Switch to __s32 types in joystick.h instead of C99 types for consistency.
    Add to headers included for userspace in
    Move inclusion of out of user scope in asm-x86_64/mtrr.h
    Remove struct fddi_statistics from user view in
    Move user-visible parts of drivers/s390/crypto/z90crypt.h to include/asm-s390
    Revert include/media changes: Mauro says those ioctls are only used in-kernel(!)
    Include and use __uXX types in
    Use __uXX types in , include too
    Remove private struct dx_hash_info from public view in
    Include and use __uXX types in
    Use __uXX types in for struct divert_blk et al.
    Use __u32 for elf_addr_t in , not u32. It's user-visible.
    Remove PPP_FCS from user view in , remove __P mess entirely
    Use __uXX types in user-visible structures in
    Don't use 'u32' in user-visible struct ip_conntrack_old_tuple.
    Use __uXX types for S390 DASD volume label definitions which are user-visible
    S390 BIODASDREADCMB ioctl should use __u64 not u64 type.
    Remove unneeded inclusion of from
    Fix private integer types used in V4L2 ioctls.
    ...

    Manually resolve conflict in include/linux/mtd/physmap.h

    Linus Torvalds
     

18 Jun, 2006

1 commit


06 Jun, 2006

1 commit

  • From: Ivan Kokshaysky

    After removal of fixup_cpu_present_map() function Alpha ended up with an empty
    cpu_present_map, so secondary CPUs on SMP systems are not being started.

    Worse, on some platforms we route interrupts to secondary CPUs using
    cpu_possible_map which is still populated properly. As a result, these
    interrupts go nowhere so the machines like DP264 aren't able to boot even with
    a primary CPU.

    Fixed basically by s/cpu_present_mask/cpu_present_map/.

    Thanks to Ernst Herzberg for reporting the bug and testing the fix.

    Cc: Ernst Herzberg
    Cc: Richard Henderson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ivan Kokshaysky
     

27 May, 2006

1 commit

  • Some driver wants to use CMSPAR, but it was missing on alpha and powerpc.
    This adds it, with the same value as every other architecture uses.

    (akpm: fixes the build of an upcoming gregkh USB patch)

    Signed-off-by: Paul Mackerras
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Mackerras
     

29 Apr, 2006

1 commit


26 Apr, 2006

1 commit


11 Apr, 2006

1 commit

  • Current implementations define NODES_SHIFT in include/asm-xxx/numnodes.h for
    each arch. Its definition is sometimes configurable. Indeed, ia64 defines 5
    NODES_SHIFT values in the current git tree. But it looks a bit messy.

    SGI-SN2(ia64) system requires 1024 nodes, and the number of nodes already has
    been changeable by config. Suitable node's number may be changed in the
    future even if it is other architecture. So, I wrote configurable node's
    number.

    This patch set defines just default value for each arch which needs multi
    nodes except ia64. But, it is easy to change to configurable if necessary.

    On ia64 the number of nodes can be already configured in generic ia64 and SN2
    config. But, NODES_SHIFT is defined for DIG64 and HP'S machine too. So, I
    changed it so that all platforms can be configured via CONFIG_NODES_SHIFT. It
    would be simpler.

    See also: http://marc.theaimsgroup.com/?l=linux-kernel&m=114358010523896&w=2

    Signed-off-by: Yasunori Goto
    Cc: Hirokazu Takata
    Cc: "Luck, Tony"
    Cc: Andi Kleen
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Ivan Kokshaysky
    Cc: Richard Henderson
    Cc: Kyle McMartin
    Cc: Russell King
    Cc: Ralf Baechle
    Cc: Jack Steiner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yasunori Goto
     

29 Mar, 2006

1 commit


28 Mar, 2006

2 commits

  • This patch removes zone_mem_map.

    pfn_to_page uses pgdat, page_to_pfn uses zone. page_to_pfn can use pgdat
    instead of zone, which is only one user of zone_mem_map. By modifing it,
    we can remove zone_mem_map.

    Signed-off-by: KAMEZAWA Hiroyuki
    Cc: Dave Hansen
    Cc: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     
  • Alpha can use generic funcs.

    Signed-off-by: KAMEZAWA Hiroyuki
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     

27 Mar, 2006

2 commits

  • - unless defined(__alpha_cix__) and defined(__alpha_fix__)

    - remove generic_fls()
    - remove generic_hweight{64,32,16,8}()

    - remove generic_fls64()
    - remove find_{next,first}{,_zero}_bit()
    - remove ext2_{set,clear,test,find_first_zero,find_next_zero}_bit()
    - remove minix_{test,set,test_and_clear,test,find_first_zero}_bit()

    Signed-off-by: Akinobu Mita
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • Use config options instead of gcc builtin definition to tell the use of
    instruction set extensions (CIX and FIX).

    This is introduced to tell the kbuild system the use of opmized hweight*()
    routines on alpha architecture.

    Signed-off-by: Akinobu Mita
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

26 Mar, 2006

1 commit

  • Implement the half-closed devices notifiation, by adding a new POLLRDHUP
    (and its alias EPOLLRDHUP) bit to the existing poll/select sets. Since the
    existing POLLHUP handling, that does not report correctly half-closed
    devices, was feared to be changed, this implementation leaves the current
    POLLHUP reporting unchanged and simply add a new bit that is set in the few
    places where it makes sense. The same thing was discussed and conceptually
    agreed quite some time ago:

    http://lkml.org/lkml/2003/7/12/116

    Since this new event bit is added to the existing Linux poll infrastruture,
    even the existing poll/select system calls will be able to use it. As far
    as the existing POLLHUP handling, the patch leaves it as is. The
    pollrdhup-2.6.16.rc5-0.10.diff defines the POLLRDHUP for all the existing
    archs and sets the bit in the six relevant files. The other attached diff
    is the simple change required to sys/epoll.h to add the EPOLLRDHUP
    definition.

    There is "a stupid program" to test POLLRDHUP delivery here:

    http://www.xmailserver.org/pollrdhup-test.c

    It tests poll(2), but since the delivery is same epoll(2) will work equally.

    Signed-off-by: Davide Libenzi
    Cc: "David S. Miller"
    Cc: Michael Kerrisk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Davide Libenzi
     

24 Mar, 2006

1 commit


23 Mar, 2006

1 commit

  • When we stop allocating percpu memory for not-possible CPUs we must not touch
    the percpu data for not-possible CPUs at all. The correct way of doing this
    is to test cpu_possible() or to use for_each_cpu().

    This patch is a kernel-wide sweep of all instances of NR_CPUS. I found very
    few instances of this bug, if any. But the patch converts lots of open-coded
    test to use the preferred helper macros.

    Cc: Mikael Starvik
    Cc: David Howells
    Acked-by: Kyle McMartin
    Cc: Anton Blanchard
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: William Lee Irwin III
    Cc: Andi Kleen
    Cc: Christian Zankel
    Cc: Philippe Elie
    Cc: Nathan Scott
    Cc: Jens Axboe
    Cc: Eric Dumazet
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

16 Feb, 2006

1 commit

  • Make new MADV_REMOVE, MADV_DONTFORK, MADV_DOFORK consistent across all
    arches. The idea is to make it possible to use them portably even before
    distros include them in libc headers.

    Move common flags to asm-generic/mman.h

    Signed-off-by: Michael S. Tsirkin
    Cc: Roland Dreier
    Cc: Badari Pulavarty
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael S. Tsirkin
     

15 Feb, 2006

1 commit

  • Currently, copy-on-write may change the physical address of a page even if the
    user requested that the page is pinned in memory (either by mlock or by
    get_user_pages). This happens if the process forks meanwhile, and the parent
    writes to that page. As a result, the page is orphaned: in case of
    get_user_pages, the application will never see any data hardware DMA's into
    this page after the COW. In case of mlock'd memory, the parent is not getting
    the realtime/security benefits of mlock.

    In particular, this affects the Infiniband modules which do DMA from and into
    user pages all the time.

    This patch adds madvise options to control whether memory range is inherited
    across fork. Useful e.g. for when hardware is doing DMA from/into these
    pages. Could also be useful to an application wanting to speed up its forks
    by cutting large areas out of consideration.

    Signed-off-by: Michael S. Tsirkin
    Acked-by: Hugh Dickins
    Cc: Michael Kerrisk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael S. Tsirkin