06 Aug, 2010

1 commit


12 Jul, 2010

1 commit

  • Move the preprocessor #warning message:
    warning: #warning Attempt to use kernel headers from user space,
    see http://kernelnewbies.org/KernelHeaders
    from kernel.h to types.h.

    And also fixe the #warning message due to the preprocessor not being able to
    read the web address due to it thinking it was the start of a comment. also
    remove the extra #ifndef _KERNEL_ since it's already there.

    Signed-off-by: Justin P. Mattock
    Cc: Arnd Bergmann
    Signed-off-by: Jiri Kosina

    Justin P. Mattock
     

07 Jul, 2010

1 commit

  • This allows a list_head (or hlist_head, etc.) to be used from places
    that used to be impractical, in particular , which
    used to cause include file recursion: includes
    , which always includes for the
    prefetch macros, as well as , which often includes
    directly or indirectly.

    This avoids a lot of painful workaround hackery on the tile
    architecture, where we use a list_head in the thread_struct to chain
    together tasks that are activated on a particular hardwall.

    Signed-off-by: Chris Metcalf
    Reviewed-by: Matthew Wilcox

    Chris Metcalf
     

17 May, 2010

1 commit

  • When looking at a performance problem on PowerPC, I noticed some awful code
    generation:

    c00000000051fc98: 3b 60 00 01 li r27,1
    ...
    c00000000051fca0: 3b 80 00 00 li r28,0
    ...
    c00000000051fcdc: 93 61 00 70 stw r27,112(r1)
    c00000000051fce0: 93 81 00 74 stw r28,116(r1)
    c00000000051fce4: 81 21 00 70 lwz r9,112(r1)
    c00000000051fce8: 80 01 00 74 lwz r0,116(r1)
    c00000000051fcec: 7d 29 07 b4 extsw r9,r9
    c00000000051fcf0: 7c 00 07 b4 extsw r0,r0

    c00000000051fcf4: 7c 20 04 ac lwsync
    c00000000051fcf8: 7d 60 f8 28 lwarx r11,0,r31
    c00000000051fcfc: 7c 0b 48 00 cmpw r11,r9
    c00000000051fd00: 40 c2 00 10 bne- c00000000051fd10
    c00000000051fd04: 7c 00 f9 2d stwcx. r0,0,r31
    c00000000051fd08: 40 c2 ff f0 bne+ c00000000051fcf8
    c00000000051fd0c: 4c 00 01 2c isync

    We create two constants, write them out to the stack, read them straight back
    in and sign extend them. What a mess.

    It turns out this bad code is a result of us defining atomic_t as a
    volatile int.

    We removed the volatile attribute from the powerpc atomic_t definition years
    ago, but commit ea435467500612636f8f4fb639ff6e76b2496e4b (atomic_t: unify all
    arch definitions) added it back in.

    To dig up an old quote from Linus:

    > The fact is, volatile on data structures is a bug. It's a wart in the C
    > language. It shouldn't be used.
    >
    > Volatile accesses in *code* can be ok, and if we have "atomic_read()"
    > expand to a "*(volatile int *)&(x)->value", then I'd be ok with that.
    >
    > But marking data structures volatile just makes the compiler screw up
    > totally, and makes code for initialization sequences etc much worse.

    And screw up it does :)

    With the volatile removed, we see much more reasonable code generation:

    c00000000051f5b8: 3b 60 00 01 li r27,1
    ...
    c00000000051f5c0: 3b 80 00 00 li r28,0
    ...

    c00000000051fc7c: 7c 20 04 ac lwsync
    c00000000051fc80: 7c 00 f8 28 lwarx r0,0,r31
    c00000000051fc84: 7c 00 d8 00 cmpw r0,r27
    c00000000051fc88: 40 c2 00 10 bne- c00000000051fc98
    c00000000051fc8c: 7f 80 f9 2d stwcx. r28,0,r31
    c00000000051fc90: 40 c2 ff f0 bne+ c00000000051fc80
    c00000000051fc94: 4c 00 01 2c isync

    Six instructions less.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Linus Torvalds

    Anton Blanchard
     

19 Jun, 2009

1 commit

  • Follow-up to "block: enable by default support for large devices
    and files on 32-bit archs".

    Rename CONFIG_LBD to CONFIG_LBDAF to:
    - allow update of existing [def]configs for "default y" change
    - reflect that it is used also for large files support nowadays

    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Jens Axboe

    Bartlomiej Zolnierkiewicz
     

27 Mar, 2009

2 commits


06 Feb, 2009

1 commit


08 Jan, 2009

1 commit


07 Jan, 2009

1 commit

  • The atomic_t type cannot currently be used in some header files because it
    would create an include loop with asm/atomic.h. Move the type definition
    to linux/types.h to break the loop.

    Signed-off-by: Matthew Wilcox
    Cc: Huang Ying
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matthew Wilcox
     

29 Dec, 2008

1 commit

  • We have two seperate config entries for large devices/files. One
    is CONFIG_LBD that guards just the devices, the other is CONFIG_LSF
    that handles large files. This doesn't make a lot of sense, you typically
    want both or none. So get rid of CONFIG_LSF and change CONFIG_LBD wording
    to indicate that it covers both.

    Acked-by: Jean Delvare
    Signed-off-by: Jens Axboe

    Jens Axboe
     

21 Oct, 2008

1 commit


14 Sep, 2008

2 commits


25 May, 2008

1 commit

  • can't be used together with because they
    both define struct ustat:

    $ cat test.c
    #include
    #include
    $ gcc -c test.c
    In file included from test.c:2:
    /usr/include/linux/types.h:165: error: redefinition of 'struct ustat'

    has been reported a while ago to debian, but seems to have been
    lost in cat fighting: http://bugs.debian.org/429064

    Signed-off-by: maximilian attems
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    maximilian attems
     

09 Feb, 2008

1 commit


01 Feb, 2008

1 commit


29 Oct, 2007

1 commit

  • Use of ptrdiff_t in places like

    - if (!access_ok(VERIFY_WRITE, u_tmp->rx_buf, u_tmp->len))
    + if (!access_ok(VERIFY_WRITE, (u8 __user *)
    + (ptrdiff_t) u_tmp->rx_buf,
    + u_tmp->len))

    is wrong; for one thing, it's a bad C (it's what uintptr_t is for; in general
    we are not even promised that ptrdiff_t is large enough to hold a pointer,
    just enough to hold a difference between two pointers within the same object).
    For another, it confuses the fsck out of sparse.

    Use unsigned long or uintptr_t instead. There are several places misusing
    ptrdiff_t; fixed.

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

    Al Viro
     

20 Oct, 2007

1 commit

  • define first set of BIT* macros

    - move BITOP_MASK and BITOP_WORD from asm-generic/bitops/atomic.h to
    include/linux/bitops.h and rename it to BIT_MASK and BIT_WORD
    - move BITS_TO_LONGS and BITS_PER_BYTE to bitops.h too and allow easily
    define another BITS_TO_something (e.g. in event.c) by BITS_TO_TYPE macro
    Remaining (and common) BIT macro will be defined after all occurences and
    conflicts will be sorted out in the patches.

    Signed-off-by: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     

05 Dec, 2006

1 commit

  • CONFIG_LBD and CONFIG_LSF are spread into asm/types.h for no particularly
    good reason.

    Centralising the definition in linux/types.h means that arch maintainers
    don't need to bother adding it, as well as fixing the problem with
    x86-64 users being asked to make a decision that has absolutely no
    effect.

    The H8/300 porters seem particularly confused since I'm not aware of any
    microcontrollers that need to support 2TB filesystems.

    Signed-off-by: Matthew Wilcox
    Signed-off-by: Linus Torvalds

    Matthew Wilcox
     

03 Dec, 2006

2 commits


05 Oct, 2006

1 commit


01 Oct, 2006

1 commit

  • This patch defines:
    * a generic boolean-type, named 'bool'
    * aliases to 0 and 1, named 'false' and 'true'

    Removing colliding definitions of 'bool', 'false' and 'true'.

    Signed-off-by: Richard Knutsson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Richard Knutsson
     

28 Jun, 2006

2 commits


26 Apr, 2006

1 commit


27 Mar, 2006

1 commit

  • Add blkcnt_t as the type of inode.i_blocks. This enables you to make the size
    of blkcnt_t either 4 bytes or 8 bytes on 32 bits architecture with CONFIG_LSF.

    - CONFIG_LSF
    Add new configuration parameter.
    - blkcnt_t
    On h8300, i386, mips, powerpc, s390 and sh that define sector_t,
    blkcnt_t is defined as u64 if CONFIG_LSF is enabled; otherwise it is
    defined as unsigned long.
    On other architectures, it is defined as unsigned long.
    - inode.i_blocks
    Change the type from sector_t to blkcnt_t.

    Signed-off-by: Takashi Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Takashi Sato
     

02 Feb, 2006

1 commit


28 Oct, 2005

1 commit

  • Beginning of gfp_t annotations:

    - -Wbitwise added to CHECKFLAGS
    - old __bitwise renamed to __bitwise__
    - __bitwise defined to either __bitwise__ or nothing, depending on
    __CHECK_ENDIAN__ being defined
    - gfp_t switched from __nocast to __bitwise__
    - force cast to gfp_t added to __GFP_... constants
    - new helper - gfp_zone(); extracts zone bits out of gfp_t value and casts
    the result to int

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

    Al Viro
     

09 Oct, 2005

1 commit

  • - added typedef unsigned int __nocast gfp_t;

    - replaced __nocast uses for gfp flags with gfp_t - it gives exactly
    the same warnings as far as sparse is concerned, doesn't change
    generated code (from gcc point of view we replaced unsigned int with
    typedef) and documents what's going on far better.

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

    Al Viro
     

30 Aug, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds