1. 20 4月, 2006 1 次提交
    • H
      [PATCH] m32r: Fix pt_regs for !COFNIG_ISA_DSP_LEVEL2 target · 8e8ff02c
      Hirokazu Takata 提交于
      This modification is required to fix debugging function for m32r targets
      with !CONFIG_ISA_DSP_LEVEL2, by unifying 'struct pt_regs' and 'struct
      sigcontext' size for all M32R ISA.
      
      Some m32r processor core with !CONFIG_ISA_DSP_LEVEL2 configuration has only
      single accumulator a0 (ex.  VDEC2 core, M32102 core, etc.), the others with
      CONFIG_ISA_DSP_LEVEL2 has two accumulators, a0 and a1.
      
      This means there are two variations of thread context.  So far, we reduced
      and changed stackframe size at a syscall for their context size.  However,
      this causes a problem that a GDB for processors with CONFIG_ISA_DSP_LEVEL2
      cannot be used for processors with !CONFIG_ISA_DSP_LEVEL2.
      
      From the viewpoint of GDB support, we should reduce such variation of
      stackframe size for simplicity.
      
      In this patch, dummy members are added to 'struct pt_regs' and 'struct
      sigcontext' to adjust their size for !CONFIG_ISA_DSP_LEVEL2.
      
      This modification is also a one step for a GDB update in future.
      Currently, on the m32r, GDB can access process's context by using ptrace
      functions in a simple way of register by register access.  By unifying
      stackframe size, we have a possibility to make use of ptrace functions of
      not only a single register access but also block register access,
      PTRACE_{GETREGS,PUTREGS}.
      
      However, for this purpose, we might have to modify stackframe structure
      some more; for example, PSW (processor status word) register should be
      pre-processed before pushing to stack at a syscall, and so on.  In this
      case, we must update carefully both kernel and GDB at a time...
      Signed-off-by: NHayato Fujiwara <fujiwara@linux-m32r.org>
      Signed-off-by: NHirokazu Takata <takata@linux-m32r.org>
      Cc: Kei Sakamoto <ksakamot@linux-m32r.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8e8ff02c
  2. 11 4月, 2006 4 次提交
    • K
      [PATCH] No arch-specific strpbrk implementations · 894b5779
      Kyle McMartin 提交于
      While cleaning up parisc_ksyms.c earlier, I noticed that strpbrk wasn't
      being exported from lib/string.c.  Investigating further, I noticed a
      changeset that removed its export and added it to _ksyms.c on a few more
      architectures.  The justification was that "other arches do it."
      
      I think this is wrong, since no architecture currently defines
      __HAVE_ARCH_STRPBRK, there's no reason for any of them to be exporting it
      themselves.  Therefore, consolidate the export to lib/string.c.
      Signed-off-by: NKyle McMartin <kyle@parisc-linux.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      894b5779
    • H
      [PATCH] m32r: Remove symbols exported twice · 73830056
      Hirokazu Takata 提交于
      Remove multi-exported symbols from arch/m32r/kernel/m32r_ksyms.c.
      
      WARNING: vmlinux: 'enable_irq' exported twice. Previous export was in vmlinux
      WARNING: vmlinux: 'disable_irq' exported twice. Previous export was in vmlinux
      WARNING: vmlinux: 'disable_irq_nosync' exported twice. Previous export was in vmlinux
      WARNING: vmlinux: 'synchronize_irq' exported twice. Previous export was in vmlinux
      WARNING: vmlinux: 'memchr' exported twice. Previous export was in vmlinux
      WARNING: vmlinux: 'strstr' exported twice. Previous export was in vmlinux
      WARNING: vmlinux: 'memscan' exported twice. Previous export was in vmlinux
      WARNING: vmlinux: 'memcmp' exported twice. Previous export was in vmlinux
      WARNING: vmlinux: 'memmove' exported twice. Previous export was in vmlinux
      WARNING: vmlinux: 'strnlen' exported twice. Previous export was in vmlinux
      WARNING: vmlinux: 'strchr' exported twice. Previous export was in vmlinux
      WARNING: vmlinux: 'strncmp' exported twice. Previous export was in vmlinux
      WARNING: vmlinux: 'strcmp' exported twice. Previous export was in vmlinux
      WARNING: vmlinux: 'strncat' exported twice. Previous export was in vmlinux
      WARNING: vmlinux: 'strcat' exported twice. Previous export was in vmlinux
      WARNING: vmlinux: 'strncpy' exported twice. Previous export was in vmlinux
      WARNING: vmlinux: 'strcpy' exported twice. Previous export was in vmlinux
      Signed-off-by: NHirokazu Takata <takata@linux-m32r.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      73830056
    • H
      [PATCH] m32r: security fix of {get,put}_user macros · 04dfd0de
      Hirokazu Takata 提交于
      Update {get,put}_user macros for m32r kernel.
      - Modify get_user to use __get_user_asm macro, instead of __get_user_x macro.
      - Remove arch/m32r/lib/{get,put}user.S.
      - Some cosmetic updates.
      
      I would like to thank NIIBE Yutaka for his reporting about the m32r kernel's
      security problem in {get,put}_user macros.
      
      There were no address checking for user space access in {get,put}_user macros.
       ;-)
      Signed-off-by: NHirokazu Takata <takata@linux-m32r.org>
      Cc: NIIBE Yutaka <gniibe@fsij.org>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      04dfd0de
    • H
      [PATCH] m32r: Fix cpu_possible_map and cpu_present_map initialization for SMP kernel · 7c1c4e54
      Hirokazu Takata 提交于
      This patch fixes a boot problem of the m32r SMP kernel 2.6.16-rc1-mm3 or
      later.
      
      In this patch, cpu_possible_map is statically initialized, and cpu_present_map
      is also copied from cpu_possible_map in smp_prepare_cpus(), because the m32r
      architecture has not supported CPU hotplug yet.
      Signed-off-by: NHayato Fujiwara <fujiwara.hayato@renesas.com>
      Signed-off-by: NHirokazu Takata <takata@linux-m32r.org>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      7c1c4e54
  3. 28 3月, 2006 1 次提交
    • D
      [PATCH] unify PFN_* macros · 22a9835c
      Dave Hansen 提交于
      Just about every architecture defines some macros to do operations on pfns.
       They're all virtually identical.  This patch consolidates all of them.
      
      One minor glitch is that at least i386 uses them in a very skeletal header
      file.  To keep away from #include dependency hell, I stuck the new
      definitions in a new, isolated header.
      
      Of all of the implementations, sh64 is the only one that varied by a bit.
      It used some masks to ensure that any sign-extension got ripped away before
      the arithmetic is done.  This has been posted to that sh64 maintainers and
      the development list.
      
      Compiles on x86, x86_64, ia64 and ppc64.
      Signed-off-by: NDave Hansen <haveblue@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      22a9835c
  4. 23 3月, 2006 1 次提交
    • A
      [PATCH] more for_each_cpu() conversions · 394e3902
      Andrew Morton 提交于
      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 <starvik@axis.com>
      Cc: David Howells <dhowells@redhat.com>
      Acked-by: NKyle McMartin <kyle@parisc-linux.org>
      Cc: Anton Blanchard <anton@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: William Lee Irwin III <wli@holomorphy.com>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Christian Zankel <chris@zankel.net>
      Cc: Philippe Elie <phil.el@wanadoo.fr>
      Cc: Nathan Scott <nathans@sgi.com>
      Cc: Jens Axboe <axboe@suse.de>
      Cc: Eric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      394e3902
  5. 25 2月, 2006 1 次提交
  6. 21 2月, 2006 1 次提交
    • H
      [PATCH] m32r: update sys_tas() routine · cf535ea5
      Hirokazu Takata 提交于
      This patch updates and fixes sys_tas() routine for m32r.
      
      In the previous implementation, a lockup rarely caused at sys_tas()
      routine in SMP environment.
      
      > > The problem is that touching *addr will generate an oops if that page isn't
      > > paged in.  If we convert it to use get_user() then that's an improvement,
      > > but we must not run get_user() under spinlock or local_irq_disable().
      
      I rewrote sys_tas() routine by using "lock -> unlock" instructions, and
      utilizing the m32r's interrupt handling characteristics; the m32r processor
      can accept interrupts only at the 32-bit instruction boundary.  So, the
      "unlock" instruction can be executed continuously after the "lock"
      instruction execution without any interruptions.
      
      In addition, to solve such a page_fault problem, I use a fixup code like
      get_user().
      
      And, as for the kernel lockup problem, we found that a calling
      do_page_fault() routine with disabling interrupts might cause a lockup at
      flush_tlb_others(), because we checked a completion of IPI handler's
      operations in a spin-locked critical section.
      
      Therefore, by using "lock -> unlock" code, we can implement the sys_tas()
      rouitine without disabling interrupts explicitly, then no lockups would
      happen at flush_tlb_others(), I hope.
      
      Compile check and some working test in SMP environment have done.
      Signed-off-by: NHirokazu Takata <takata@linux-m32r.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      cf535ea5
  7. 08 2月, 2006 1 次提交
  8. 13 1月, 2006 1 次提交
  9. 11 1月, 2006 1 次提交
  10. 09 1月, 2006 2 次提交
    • E
      [PATCH] Don't attempt to power off if power off is not implemented · 5e38291d
      Eric W. Biederman 提交于
      The problem.  It is expected that /sbin/halt -p works exactly like
      /sbin/halt, when the kernel does not implement power off functionality.
      
      The kernel can do a lot of work in the reboot notifiers and in
      device_shutdown before we even get to machine_power_off.  Some of that
      shutdown is not safe if you are leaving the power on, and it definitely
      gets in the way of using sysrq or pressing ctrl-alt-del.  Since the
      shutdown happens in generic code there is no way to fix this in
      architecture specific code :(
      
      Some machines are kernel oopsing today because of this.
      
      The simple solution is to turn LINUX_REBOOT_CMD_POWER_OFF into
      LINUX_REBOOT_CMD_HALT if power_off functionality is not implemented.
      
      This has the unfortunate side effect of disabling the power off
      functionality on architectures that leave pm_power_off to null and still
      implement something in machine_power_off.  And it will break the build on
      some architectures that don't have a pm_power_off variable at all.
      
      On both counts I say tough.
      
      For architectures like alpha that don't implement the pm_power_off variable
      pm_power_off is declared in linux/pm.h and it is a generic part of our
      power management code, and all architectures should implement it.
      
      For architectures like parisc that have a default power off method in
      machine_power_off if pm_power_off is not implemented or fails.  It is easy
      enough to set the pm_power_off variable.  And nothing bad happens there,
      the machines just stop powering off.
      
      The current semantics are impossible without a flag at the top level so we
      can avoid the problem code if a power off is not implemented.  pm_power_off
      is as good a flag as any with the bonus that it works without modification
      on at least x86, x86_64, powerpc, and ppc today.
      
      Andrew can you pick this up and put this in the mm tree.  Kernels that
      don't compile or don't power off seem saner than kernels that oops or
      panic.  Until we get the arch specific patches for the problem
      architectures this probably isn't smart to push into the stable kernel.
      Unfortunately I don't have the time at the moment to walk through every
      architecture and make them work.  And even if I did I couldn't test it :(
      
      From: Hirokazu Takata <takata@linux-m32r.org>
      
          Add pm_power_off() for build fix of arch/m32r/kernel/process.c.
      
      From: Miklos Szeredi <miklos@szeredi.hu>
      
          UML build fix
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NHayato Fujiwara <fujiwara@linux-m32r.org>
      Signed-off-by: NHirokazu Takata <takata@linux-m32r.org>
      Signed-off-by: NMiklos Szeredi <miklos@szeredi.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5e38291d
    • C
      [PATCH] use ptrace_get_task_struct in various places · 6b9c7ed8
      Christoph Hellwig 提交于
      The ptrace_get_task_struct() helper that I added as part of the ptrace
      consolidation is useful in variety of places that currently opencode it.
      Switch them to the common helpers.
      
      Add a ptrace_traceme() helper that needs to be explicitly called, and simplify
      the ptrace_get_task_struct() interface.  We don't need the request argument
      now, and we return the task_struct directly, using ERR_PTR() for error
      returns.  It's a bit more code in the callers, but we have two sane routines
      that do one thing well now.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6b9c7ed8
  11. 07 1月, 2006 4 次提交
  12. 29 11月, 2005 2 次提交
    • H
      [PATCH] m32r: M3A-2170(Mappi-III) IDE support · ad09d583
      Hirokazu Takata 提交于
      This patch is for supporting IDE interface for M3A-2170(Mappi-III) board.
      Signed-off-by: NMamoru Sakugawa <sakugawa@linux-m32r.org>
      Signed-off-by: NHirokazu Takata <takata@linux-m32r.org>
      Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ad09d583
    • H
      [PATCH] m32r: Fix sys_tas() syscall · 91f4ab05
      Hirokazu Takata 提交于
      This patch fixes a deadlock problem of the m32r SMP kernel.
      
      In the m32r kernel, sys_tas() system call is provided as a test-and-set
      function for userspace, for backward compatibility.
      
      In some multi-threading application program, deadlocks were rarely caused
      at sys_tas() funcion.  Such a deadlock was caused due to a collision of
      __pthread_lock() and __pthread_unlock() operations.
      
      The "tas" syscall is repeatedly called by pthread_mutex_lock() to get a
      lock, while a lock variable's value is not 0.  On the other hand,
      pthead_mutex_unlock() sets the lock variable to 0 for unlocking.
      
      In the previous implementation of sys_tas() routine, there was a
      possibility that a unlock operation was ignored in the following case:
      
      - Assume a lock variable (*addr) was equal to 1 before sys_tas() execution.
      - __pthread_unlock() operation is executed by the other processor
        and the lock variable (*addr) is set to 0, between a read operation
        ("oldval = *addr;") and the following write operation ("*addr = 1;")
        during a execution of sys_tas().
      
      In this case, the following write operation ("*addr = 1;") overwrites the
      __pthread_unlock() result, and sys_tas() fails to get a lock in the next
      turn and after that.
      
      According to the attatched patch, sys_tas() returns 0 value in the next
      turn and deadlocks never happen.
      Signed-off-by: NHitoshi Yamamoto <Yamamoto.Hitoshi@ap.MitsubishiElectric.co.jp>
      Signed-off-by: NHirokazu Takata <takata@linux-m32r.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      91f4ab05
  13. 09 11月, 2005 1 次提交
    • N
      [PATCH] sched: disable preempt in idle tasks · 5bfb5d69
      Nick Piggin 提交于
      Run idle threads with preempt disabled.
      
      Also corrected a bugs in arm26's cpu_idle (make it actually call schedule()).
      How did it ever work before?
      
      Might fix the CPU hotplugging hang which Nigel Cunningham noted.
      
      We think the bug hits if the idle thread is preempted after checking
      need_resched() and before going to sleep, then the CPU offlined.
      
      After calling stop_machine_run, the CPU eventually returns from preemption and
      into the idle thread and goes to sleep.  The CPU will continue executing
      previous idle and have no chance to call play_dead.
      
      By disabling preemption until we are ready to explicitly schedule, this bug is
      fixed and the idle threads generally become more robust.
      
      From: alexs <ashepard@u.washington.edu>
      
        PPC build fix
      
      From: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
      
        MIPS build fix
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Signed-off-by: NYoichi Yuasa <yuasa@hh.iij4u.or.jp>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5bfb5d69
  14. 31 10月, 2005 6 次提交
  15. 30 10月, 2005 1 次提交
  16. 15 10月, 2005 1 次提交
  17. 12 10月, 2005 1 次提交
  18. 11 9月, 2005 1 次提交
    • I
      [PATCH] spinlock consolidation · fb1c8f93
      Ingo Molnar 提交于
      This patch (written by me and also containing many suggestions of Arjan van
      de Ven) does a major cleanup of the spinlock code.  It does the following
      things:
      
       - consolidates and enhances the spinlock/rwlock debugging code
      
       - simplifies the asm/spinlock.h files
      
       - encapsulates the raw spinlock type and moves generic spinlock
         features (such as ->break_lock) into the generic code.
      
       - cleans up the spinlock code hierarchy to get rid of the spaghetti.
      
      Most notably there's now only a single variant of the debugging code,
      located in lib/spinlock_debug.c.  (previously we had one SMP debugging
      variant per architecture, plus a separate generic one for UP builds)
      
      Also, i've enhanced the rwlock debugging facility, it will now track
      write-owners.  There is new spinlock-owner/CPU-tracking on SMP builds too.
      All locks have lockup detection now, which will work for both soft and hard
      spin/rwlock lockups.
      
      The arch-level include files now only contain the minimally necessary
      subset of the spinlock code - all the rest that can be generalized now
      lives in the generic headers:
      
       include/asm-i386/spinlock_types.h       |   16
       include/asm-x86_64/spinlock_types.h     |   16
      
      I have also split up the various spinlock variants into separate files,
      making it easier to see which does what. The new layout is:
      
         SMP                         |  UP
         ----------------------------|-----------------------------------
         asm/spinlock_types_smp.h    |  linux/spinlock_types_up.h
         linux/spinlock_types.h      |  linux/spinlock_types.h
         asm/spinlock_smp.h          |  linux/spinlock_up.h
         linux/spinlock_api_smp.h    |  linux/spinlock_api_up.h
         linux/spinlock.h            |  linux/spinlock.h
      
      /*
       * here's the role of the various spinlock/rwlock related include files:
       *
       * on SMP builds:
       *
       *  asm/spinlock_types.h: contains the raw_spinlock_t/raw_rwlock_t and the
       *                        initializers
       *
       *  linux/spinlock_types.h:
       *                        defines the generic type and initializers
       *
       *  asm/spinlock.h:       contains the __raw_spin_*()/etc. lowlevel
       *                        implementations, mostly inline assembly code
       *
       *   (also included on UP-debug builds:)
       *
       *  linux/spinlock_api_smp.h:
       *                        contains the prototypes for the _spin_*() APIs.
       *
       *  linux/spinlock.h:     builds the final spin_*() APIs.
       *
       * on UP builds:
       *
       *  linux/spinlock_type_up.h:
       *                        contains the generic, simplified UP spinlock type.
       *                        (which is an empty structure on non-debug builds)
       *
       *  linux/spinlock_types.h:
       *                        defines the generic type and initializers
       *
       *  linux/spinlock_up.h:
       *                        contains the __raw_spin_*()/etc. version of UP
       *                        builds. (which are NOPs on non-debug, non-preempt
       *                        builds)
       *
       *   (included on UP-non-debug builds:)
       *
       *  linux/spinlock_api_up.h:
       *                        builds the _spin_*() APIs.
       *
       *  linux/spinlock.h:     builds the final spin_*() APIs.
       */
      
      All SMP and UP architectures are converted by this patch.
      
      arm, i386, ia64, ppc, ppc64, s390/s390x, x64 was build-tested via
      crosscompilers.  m32r, mips, sh, sparc, have not been tested yet, but should
      be mostly fine.
      
      From: Grant Grundler <grundler@parisc-linux.org>
      
        Booted and lightly tested on a500-44 (64-bit, SMP kernel, dual CPU).
        Builds 32-bit SMP kernel (not booted or tested).  I did not try to build
        non-SMP kernels.  That should be trivial to fix up later if necessary.
      
        I converted bit ops atomic_hash lock to raw_spinlock_t.  Doing so avoids
        some ugly nesting of linux/*.h and asm/*.h files.  Those particular locks
        are well tested and contained entirely inside arch specific code.  I do NOT
        expect any new issues to arise with them.
      
       If someone does ever need to use debug/metrics with them, then they will
        need to unravel this hairball between spinlocks, atomic ops, and bit ops
        that exist only because parisc has exactly one atomic instruction: LDCW
        (load and clear word).
      
      From: "Luck, Tony" <tony.luck@intel.com>
      
         ia64 fix
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NArjan van de Ven <arjanv@infradead.org>
      Signed-off-by: NGrant Grundler <grundler@parisc-linux.org>
      Cc: Matthew Wilcox <willy@debian.org>
      Signed-off-by: NHirokazu Takata <takata@linux-m32r.org>
      Signed-off-by: NMikael Pettersson <mikpe@csd.uu.se>
      Signed-off-by: NBenoit Boissinot <benoit.boissinot@ens-lyon.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      fb1c8f93
  19. 10 9月, 2005 1 次提交
  20. 08 9月, 2005 1 次提交
  21. 30 8月, 2005 1 次提交
    • S
      [PATCH] convert signal handling of NODEFER to act like other Unix boxes. · 69be8f18
      Steven Rostedt 提交于
      It has been reported that the way Linux handles NODEFER for signals is
      not consistent with the way other Unix boxes handle it.  I've written a
      program to test the behavior of how this flag affects signals and had
      several reports from people who ran this on various Unix boxes,
      confirming that Linux seems to be unique on the way this is handled.
      
      The way NODEFER affects signals on other Unix boxes is as follows:
      
      1) If NODEFER is set, other signals in sa_mask are still blocked.
      
      2) If NODEFER is set and the signal is in sa_mask, then the signal is
      still blocked. (Note: this is the behavior of all tested but Linux _and_
      NetBSD 2.0 *).
      
      The way NODEFER affects signals on Linux:
      
      1) If NODEFER is set, other signals are _not_ blocked regardless of
      sa_mask (Even NetBSD doesn't do this).
      
      2) If NODEFER is set and the signal is in sa_mask, then the signal being
      handled is not blocked.
      
      The patch converts signal handling in all current Linux architectures to
      the way most Unix boxes work.
      
      Unix boxes that were tested:  DU4, AIX 5.2, Irix 6.5, NetBSD 2.0, SFU
      3.5 on WinXP, AIX 5.3, Mac OSX, and of course Linux 2.6.13-rcX.
      
      * NetBSD was the only other Unix to behave like Linux on point #2. The
      main concern was brought up by point #1 which even NetBSD isn't like
      Linux.  So with this patch, we leave NetBSD as the lonely one that
      behaves differently here with #2.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      69be8f18
  22. 24 8月, 2005 2 次提交
  23. 02 8月, 2005 1 次提交
    • H
      [PATCH] m32r: Fix local-timer event handling · 2757a71c
      Hirokazu Takata 提交于
      There was a scheduling problem of the m32r SMP kernel; A process rarely
      stopped and gave no responding but the other process have been handled by
      the other CPU still lives, then if we did something in the other terminal
      or something like that, the stopped process came back to life and continued
      its operation...  (ex.  LMbench: lat_sig)
      
      In the m32r SMP kernel, a local-timer event is delivered by using an
      IPI(inter processor interrupts); LOCAL_TIMER_IPI.  And a function
      smp_send_timer() is prepared to send the LOCAL_TIMER_IPI from the current
      CPU to the other CPUs.
      
      The funtion smp_send_timer() was placed and used in do_IRQ() in
      former times (before 2.6.10-rc3-mm1 kernel), however, it was
      unintentionally removed when arch/m32r/kernel/irq.c was modified to
      employ the generic hardirq framework (CONFIG_GENERIC_HARDIRQ) in
      my previous patch.
      
        [PATCH 2.6.10-rc3-mm1] m32r: Use generic hardirq framework
        http://www.ussg.iu.edu/hypermail/linux/kernel/0412.2/0358.html
      
      The following patch fixes the above problem.
      Signed-off-by: NHitoshi Yamamoto <hitoshiy@isl.melco.co.jp>
      Signed-off-by: NHirokazu Takata <takata@linux-m32r.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      2757a71c
  24. 27 7月, 2005 1 次提交
  25. 08 7月, 2005 1 次提交
  26. 26 6月, 2005 1 次提交
    • C
      [PATCH] Cleanup patch for process freezing · 3e1d1d28
      Christoph Lameter 提交于
      1. Establish a simple API for process freezing defined in linux/include/sched.h:
      
         frozen(process)		Check for frozen process
         freezing(process)		Check if a process is being frozen
         freeze(process)		Tell a process to freeze (go to refrigerator)
         thaw_process(process)	Restart process
         frozen_process(process)	Process is frozen now
      
      2. Remove all references to PF_FREEZE and PF_FROZEN from all
         kernel sources except sched.h
      
      3. Fix numerous locations where try_to_freeze is manually done by a driver
      
      4. Remove the argument that is no longer necessary from two function calls.
      
      5. Some whitespace cleanup
      
      6. Clear potential race in refrigerator (provides an open window of PF_FREEZE
         cleared before setting PF_FROZEN, recalc_sigpending does not check
         PF_FROZEN).
      
      This patch does not address the problem of freeze_processes() violating the rule
      that a task may only modify its own flags by setting PF_FREEZE. This is not clean
      in an SMP environment. freeze(process) is therefore not SMP safe!
      Signed-off-by: NChristoph Lameter <christoph@lameter.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3e1d1d28