• Chris Wright's avatar
    [PATCH] consolidate arch specific resource.h headers · cf627bbf
    Chris Wright authored
    Most of the include/asm-*/resource.h headers are the same as one another.
    This patch makes one generic version, include/asm-generic/resource.h, and
    uses that when appropriate.  The only vaguely interesting things here are
    that the generic version introduces a new _STK_LIM_MAX macro, which can be
    populated by an arch (ia64 and parisc needed that).  Also, some arches hid
    RLIM_INFINITY under __KERNEL__, while others did not.  The generic version
    does not, so the following arches will see that change:
    
        arm, arm26, mips, ppc, ppc64, sh (and hence sh64)
    
    And, finally, some arches maintain their own order for the resource
    numbers.  This is now marked by __ARCH_RLIMIT_ORDER, and is used by the
    following arches:
    
        alpha, mips, sparc, and sparc64.
    
    This actually uncovered a mips bug (fix already sent, this patch is
    relative to that fix), where the default RLIMIT_MEMLOCK was set to
    RLIM_INFINITY and RLIMIT_NPROC set to MLOCK_LIMIT (the latter is no big
    deal because RLIMIT_NPROC default is overwritten dynamically during bootup
    in fork_init()).  Also, this change makes alpha's default for RLIMIT_NPROC
    change from RLIM_INFINITY to 0, but again...no problem as it's dynamically
    overwritten during bootup.
    
    The following arches are left untouched:
        m68knommu: untouched (uses m68k/resource.h)
        sh64: untouched (uses asm-sh/resource.h)
        um: untouched (uses arch code already)
    Signed-off-by: default avatarChris Wright <chrisw@osdl.org>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    cf627bbf
resource.h 91 Bytes