1. 16 10月, 2008 1 次提交
  2. 14 10月, 2008 1 次提交
  3. 09 9月, 2008 1 次提交
    • M
      kernel/cpu.c: create a CPU_STARTING cpu_chain notifier · e545a614
      Manfred Spraul 提交于
      Right now, there is no notifier that is called on a new cpu, before the new
      cpu begins processing interrupts/softirqs.
      Various kernel function would need that notification, e.g. kvm works around
      by calling smp_call_function_single(), rcu polls cpu_online_map.
      
      The patch adds a CPU_STARTING notification. It also adds a helper function
      that sends the message to all cpu_chain handlers.
      
      Tested on x86-64.
      All other archs are untested. Especially on sparc, I'm not sure if I got
      it right.
      Signed-off-by: NManfred Spraul <manfred@colorfullife.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e545a614
  4. 07 9月, 2008 1 次提交
  5. 24 8月, 2008 1 次提交
  6. 27 7月, 2008 2 次提交
  7. 26 7月, 2008 1 次提交
    • T
      inflate: refactor inflate malloc code · 2d6ffcca
      Thomas Petazzoni 提交于
      Inflate requires some dynamic memory allocation very early in the boot
      process and this is provided with a set of four functions:
      malloc/free/gzip_mark/gzip_release.
      
      The old inflate code used a mark/release strategy rather than implement
      free.  This new version instead keeps a count on the number of outstanding
      allocations and when it hits zero, it resets the malloc arena.
      
      This allows removing all the mark and release implementations and unifying
      all the malloc/free implementations.
      
      The architecture-dependent code must define two addresses:
       - free_mem_ptr, the address of the beginning of the area in which
         allocations should be made
       - free_mem_end_ptr, the address of the end of the area in which
         allocations should be made. If set to 0, then no check is made on
         the number of allocations, it just grows as much as needed
      
      The architecture-dependent code can also provide an arch_decomp_wdog()
      function call.  This function will be called several times during the
      decompression process, and allow to notify the watchdog that the system is
      still running.  If an architecture provides such a call, then it must
      define ARCH_HAS_DECOMP_WDOG so that the generic inflate code calls
      arch_decomp_wdog().
      
      Work initially done by Matt Mackall, updated to a recent version of the
      kernel and improved by me.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Cc: Matt Mackall <mpm@selenic.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Mikael Starvik <mikael.starvik@axis.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Acked-by: NPaul Mundt <lethal@linux-sh.org>
      Acked-by: NYoshinori Sato <ysato@users.sourceforge.jp>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2d6ffcca
  8. 25 7月, 2008 2 次提交
  9. 21 7月, 2008 1 次提交
  10. 14 7月, 2008 1 次提交
  11. 01 7月, 2008 3 次提交
  12. 30 6月, 2008 3 次提交
  13. 26 6月, 2008 1 次提交
  14. 21 6月, 2008 2 次提交
  15. 19 5月, 2008 1 次提交
  16. 17 5月, 2008 1 次提交
  17. 09 5月, 2008 2 次提交
  18. 29 4月, 2008 1 次提交
  19. 28 4月, 2008 1 次提交
  20. 17 4月, 2008 1 次提交
  21. 05 3月, 2008 3 次提交
    • J
      cris: correct usage of __user for copy to and from user space in lib/usercopy and uaccess.h · 07f2402b
      Jesper Nilsson 提交于
      Function __copy_user_zeroing in arch/lib/usercopy.c had the wrong parameter
      set as __user, and in include/asm-cris/uaccess.h, it was not set at all for
      some of the calling functions.
      
      This will cut the number of warnings quite dramatically when using sparse.
      
      While we're here, remove useless CVS log and correct confusing typo.
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      Cc: Mikael Starvik <mikael.starvik@axis.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      07f2402b
    • J
      CRIS: Import string.c (memcpy) from newlib: fixes compile error with gcc 4 · 9fe3fd03
      Jesper Nilsson 提交于
      Adrian Bunk reported another compile error with a SVN head GCC:
      
      ...
        CC      arch/cris/arch-v10/lib/string.o
      /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/string.c:138:
      error: lvalue required as increment operand
      /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/string.c:138:
      error: lvalue required as increment operand
      /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/string.c:139:
      error: lvalue required as increment operand
      ...
      
      This is due to the use of the construct:
      
      	*((long*)dst)++ = lc;
      
      Which isn't legal since casts don't return an lvalue.
      
      The solution is to import the implementation from newlib,
      which is continually autotested together with GCC mainline,
      and uses the construct:
      
      	*(long *) dst = lc; dst += 4;
      
      Since this is an import of a file from newlib, I'm not touching
      the formatting or correcting any checkpatch errors.
      
      As for the earlier fix for memset.c, even if the two files for
      CRIS v10 and CRIS v32 are identical at the moment, it might
      be possible to tweak the CRIS v32 version.
      Thus, I'm not yet folding them into the same file, at least not
      until we've done some research on it.
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Adrian Bunk <bunk@stusta.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9fe3fd03
    • J
      CRIS v10: Include mm.h instead of vmstat.h in kernel/time.c · a1056873
      Jesper Nilsson 提交于
      Commit 2f569afd
      (CONFIG_HIGHPTE vs. sub-page page tables) introduced use of
      inc_zone_page_state and dec_zone_page_state in include/linux/mm.h.
      
      Those are defined in include/linux/vmstat.h, but after it includes
      mm.h, making it impossible to include vmstat.h since inc_zone_page_state
      and dec_zone_page_state then would be undefined.
      
      arch/cris/arch-v10/kernel/time.c does just this, which makes the
      CRIS v10 build break with the following error:
      
      ...
        CC      arch/cris/arch-v10/kernel/time.o
      In file included from include/linux/vmstat.h:7,
                       from arch/cris/arch-v10/kernel/time.c:17:
      include/linux/mm.h: In function 'pgtable_page_ctor':
      include/linux/mm.h:902: error: implicit declaration of function 'inc_zone_page_state'
      include/linux/mm.h: In function 'pgtable_page_dtor':
      include/linux/mm.h:908: error: implicit declaration of function 'dec_zone_page_state'
      make[2]: *** [arch/cris/arch-v10/kernel/time.o] Error 1
      make[1]: *** [arch/cris/arch-v10/kernel] Error 2
      make: *** [sub-make] Error 2
      ...
      
      By changing kernel/time.c to include linux/mm.h, the build succeeds.
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      Cc: Mikael Starvik <mikael.starvik@axis.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a1056873
  22. 15 2月, 2008 1 次提交
    • J
      cris: import memset.c from newlib: fixes compile error with newer (pre4.3) gcc · 77a746ce
      Jesper Nilsson 提交于
      Adrian Bunk reported the following compile error with a SVN head GCC:
      
      ...
      CC arch/cris/arch-v10/lib/memset.o
      /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c: In function 'memset':
      /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:164: error: lvalue required as increment operand
      /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:165: error: lvalue required as increment operand
      /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:166: error: lvalue required as increment operand
      /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:167: error: lvalue required as increment operand
      /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:185: error: lvalue required as increment operand
      /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:189: error: lvalue required as increment operand
      /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:192: error: lvalue required as increment operand
      ... etc ...
      
      This is due to the use of the construct:
      
      	*((long*)dst)++ = lc;
      
      Which is no longer legal since casts don't return an lvalue.
      
      The solution is to import the implementation from newlib,
      which is continually autotested together with GCC mainline,
      and uses the construct:
      
      	*(long *) dst = lc; dst += 4;
      
      With this change, the generated code actually shrinks 76 bytes
      since gcc notices that it can use autoincrement for the move
      instruction in CRIS.
      
         text    data     bss     dec     hex filename
          304       0       0     304     130 memset.old.o
         text    data     bss     dec     hex filename
          228       0       0     228      e4 memset.o
      
      Since this is an import of a file from newlib, I'm not touching
      the formatting or correcting any checkpatch errors.
      
      Note also that even if the two files for the CRIS v10 and CRIS v32
      are identical at the moment, it might be possible to tweak the
      CRIS v32 version. Thus, I'm not yet folding them into the same file,
      at least not until we've done some research on it.
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      Cc: Mikael Starvik <mikael.starvik@axis.com>
      Cc: Adrian Bunk <bunk@stusta.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      77a746ce
  23. 09 2月, 2008 4 次提交
    • S
      ide: introduce HAVE_IDE · ec7748b5
      Sam Ravnborg 提交于
      To allow flexible configuration of IDE introduce HAVE_IDE.
      All archs except arm, um and s390 unconditionally select it.
      For arm the actual configuration determine if IDE is supported.
      
      This is a step towards introducing drivers/Kconfig for arm.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Acked-by: NRussell King - ARM Linux <linux@arm.linux.org.uk>
      Acked-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      ec7748b5
    • H
      avoid overflows in kernel/time.c · bdc80787
      H. Peter Anvin 提交于
      When the conversion factor between jiffies and milli- or microseconds is
      not a single multiply or divide, as for the case of HZ == 300, we currently
      do a multiply followed by a divide.  The intervening result, however, is
      subject to overflows, especially since the fraction is not simplified (for
      HZ == 300, we multiply by 300 and divide by 1000).
      
      This is exposed to the user when passing a large timeout to poll(), for
      example.
      
      This patch replaces the multiply-divide with a reciprocal multiplication on
      32-bit platforms.  When the input is an unsigned long, there is no portable
      way to do this on 64-bit platforms there is no portable way to do this
      since it requires a 128-bit intermediate result (which gcc does support on
      64-bit platforms but may generate libgcc calls, e.g.  on 64-bit s390), but
      since the output is a 32-bit integer in the cases affected, just simplify
      the multiply-divide (*3/10 instead of *300/1000).
      
      The reciprocal multiply used can have off-by-one errors in the upper half
      of the valid output range.  This could be avoided at the expense of having
      to deal with a potential 65-bit intermediate result.  Since the intent is
      to avoid overflow problems and most of the other time conversions are only
      semiexact, the off-by-one errors were considered an acceptable tradeoff.
      
      At Ralf Baechle's suggestion, this version uses a Perl script to compute
      the necessary constants.  We already have dependencies on Perl for kernel
      compiles.  This does, however, require the Perl module Math::BigInt, which
      is included in the standard Perl distribution starting with version 5.8.0.
      In order to support older versions of Perl, include a table of canned
      constants in the script itself, and structure the script so that
      Math::BigInt isn't required if pulling values from said table.
      
      Running the script requires that the HZ value is available from the
      Makefile.  Thus, this patch also adds the Kconfig variable CONFIG_HZ to the
      architectures which didn't already have it (alpha, cris, frv, h8300, m32r,
      m68k, m68knommu, sparc, v850, and xtensa.) It does *not* touch the sh or
      sh64 architectures, since Paul Mundt has dealt with those separately in the
      sh tree.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>,
      Cc: Sam Ravnborg <sam@ravnborg.org>,
      Cc: Paul Mundt <lethal@linux-sh.org>,
      Cc: Richard Henderson <rth@twiddle.net>,
      Cc: Michael Starvik <starvik@axis.com>,
      Cc: David Howells <dhowells@redhat.com>,
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>,
      Cc: Hirokazu Takata <takata@linux-m32r.org>,
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
      Cc: Roman Zippel <zippel@linux-m68k.org>,
      Cc: William L. Irwin <sparclinux@vger.kernel.org>,
      Cc: Chris Zankel <chris@zankel.net>,
      Cc: H. Peter Anvin <hpa@zytor.com>,
      Cc: Jan Engelhardt <jengelh@computergmbh.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bdc80787
    • J
    • J
      CRIS v32: Change drivers/i2c.c locking. · 69b06c15
      Jesper Nilsson 提交于
      - Change spin_lock + local_irq_save into spin_lock_irqsave
      - Change spin_unlock + local_irq_restore into spin_unlock_irqrestore
      - Return ENOTTY if ioctl is not recognized as a cris ioctl.
      - Make init functions static.
      69b06c15
  24. 08 2月, 2008 4 次提交
    • J
      CRIS v32: Rewrite ARTPEC-3 gpio driver to avoid volatiles and general cleanup. · a34d2442
      Jesper Nilsson 提交于
      Changes as suggested by Andrew Morton, plus general cleanup to
      ease later consolidation of driver into machine common driver.
      
      - Correct parameter type of gpio_write to const char __user *
      - Remove volatile from the arrays of machine dependent registers, use
        readl and writel to access them instead.
      - Remove useless casts of void.
      - Use spin_lock_irqsave for locking.
      - Break gpio_write into smaller sub-functions.
      - Remove useless breaks after returns.
      - Don't perform any change in IO_CFG_WRITE_MODE if values are invalid.
        (previously values were set and then set to zero)
      - Change cast for copy_to_user to (void __user *)
      - Make file_operations gpio_fops static and const.
      - Make setget_output static. (However, it's still inline since the CRIS
        architecture is still not SMP, which makes the function small enough
        to inline)
      a34d2442
    • J
      CRIS: Add new timerfd syscall entries. · 7800029d
      Jesper Nilsson 提交于
      7800029d
    • J
      eb090473
    • J
      CRIS v32: Clean up nandflash.c for ARTPEC-3 and ETRAX FS. · 9f68ff9e
      Jesper Nilsson 提交于
      Clean up issues noticed by Andrew Morton:
      
      - Use a combined struct for allocating the mtd_info and nand_chip structs
        instead of using anonymous memory as the example in
        Documentation/DocBook/mtdnand.tmpl
      - Use kzalloc instead of using kmalloc/memset(0)
      - Make crisv32_device_ready static.
      9f68ff9e