1. 13 12月, 2008 1 次提交
    • R
      cpumask: centralize cpu_online_map and cpu_possible_map · 98a79d6a
      Rusty Russell 提交于
      Impact: cleanup
      
      Each SMP arch defines these themselves.  Move them to a central
      location.
      
      Twists:
      1) Some archs (m32, parisc, s390) set possible_map to all 1, so we add a
         CONFIG_INIT_ALL_POSSIBLE for this rather than break them.
      
      2) mips and sparc32 '#define cpu_possible_map phys_cpu_present_map'.
         Those archs simply have phys_cpu_present_map replaced everywhere.
      
      3) Alpha defined cpu_possible_map to cpu_present_map; this is tricky
         so I just manipulate them both in sync.
      
      4) IA64, cris and m32r have gratuitous 'extern cpumask_t cpu_possible_map'
         declarations.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Reviewed-by: NGrant Grundler <grundler@parisc-linux.org>
      Tested-by: NTony Luck <tony.luck@intel.com>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Cc: Mike Travis <travis@sgi.com>
      Cc: ink@jurassic.park.msu.ru
      Cc: rmk@arm.linux.org.uk
      Cc: starvik@axis.com
      Cc: tony.luck@intel.com
      Cc: takata@linux-m32r.org
      Cc: ralf@linux-mips.org
      Cc: grundler@parisc-linux.org
      Cc: paulus@samba.org
      Cc: schwidefsky@de.ibm.com
      Cc: lethal@linux-sh.org
      Cc: wli@holomorphy.com
      Cc: davem@davemloft.net
      Cc: jdike@addtoit.com
      Cc: mingo@redhat.com
      98a79d6a
  2. 01 11月, 2008 2 次提交
  3. 30 10月, 2008 1 次提交
  4. 20 10月, 2008 1 次提交
  5. 16 10月, 2008 1 次提交
  6. 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
  7. 24 8月, 2008 1 次提交
  8. 27 7月, 2008 1 次提交
  9. 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
  10. 25 7月, 2008 1 次提交
  11. 21 7月, 2008 1 次提交
  12. 14 7月, 2008 1 次提交
  13. 01 7月, 2008 1 次提交
  14. 30 6月, 2008 2 次提交
    • J
      [CRIS] Build fixes for compressed and rescue images for v10 and v32: · bdb144b6
      Jesper Nilsson 提交于
      - Use the normal cross gcc instead of using an elf specific cris toolchain.
        This removes the dependency of this second toolchain.
      
      - Use the normal cross objcopy instead of overriding it to use elf-toolchain.
        This allows compiling using "CROSS_COMPILE=$CRIS_GCC/cris-axis-linux-gnu-"
        instead of just "CROSS_COMPILE=$CRIS_GCC/cris-axis-linux-gnu/bin/"
      
      - Remove redundant rules for compiling, the implicit rules are sufficient.
      
      - Convert the arch/cris/arch-v10/boot/compressed/head.S to format
        accepted by the cris-axis-linux-gnu-gcc (registers must be prefixed
        with '$', remove explicit underscore on exported symbols)
      
      - Remove a number of unused (and duplicated) prototypes from
        arch/cris/arch-v10/boot/compressed/misc.c.
      
      - Correct memcpy and memset return values (actually return them!)
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      bdb144b6
    • J
      It looks at least odd to apply spin_unlock to a mutex. · 9be48a94
      Julia Lawall 提交于
      The semantic patch that makes this change is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @def@
      declarer DEFINE_MUTEX;
      identifier m;
      @@
      
      DEFINE_MUTEX(m);
      
      @@
      identifier def.m;
      @@
      
      (
      - spin_lock(&m)
      + mutex_lock(&m)
      |
      - spin_unlock(&m)
      + mutex_unlock(&m)
      )
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      9be48a94
  15. 26 6月, 2008 1 次提交
  16. 21 6月, 2008 2 次提交
  17. 19 5月, 2008 1 次提交
  18. 05 3月, 2008 2 次提交
    • 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
  19. 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
  20. 09 2月, 2008 1 次提交
    • 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
  21. 08 2月, 2008 16 次提交