1. 30 9月, 2006 2 次提交
    • A
      [PATCH] simplify update_times (avoid jiffies/jiffies_64 aliasing problem) · 3171a030
      Atsushi Nemoto 提交于
      Pass ticks to do_timer() and update_times(), and adjust x86_64 and s390
      timer interrupt handler with this change.
      
      Currently update_times() calculates ticks by "jiffies - wall_jiffies", but
      callers of do_timer() should know how many ticks to update.  Passing ticks
      get rid of this redundant calculation.  Also there are another redundancy
      pointed out by Martin Schwidefsky.
      
      This cleanup make a barrier added by
      5aee405c needless.  So this patch removes
      it.
      
      As a bonus, this cleanup make wall_jiffies can be removed easily, since now
      wall_jiffies is always synced with jiffies.  (This patch does not really
      remove wall_jiffies.  It would be another cleanup patch)
      Signed-off-by: NAtsushi Nemoto <anemo@mba.ocn.ne.jp>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: john stultz <johnstul@us.ibm.com>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Acked-by: NRussell King <rmk@arm.linux.org.uk>
      Cc: Ian Molton <spyro@f2s.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Hirokazu Takata <takata.hirokazu@renesas.com>
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
      Cc: Richard Curnow <rc@rc0.org.uk>
      Cc: William Lee Irwin III <wli@holomorphy.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
      Cc: Chris Zankel <chris@zankel.net>
      Acked-by: N"Luck, Tony" <tony.luck@intel.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3171a030
    • S
      [PATCH] pidspace: is_init() · f400e198
      Sukadev Bhattiprolu 提交于
      This is an updated version of Eric Biederman's is_init() patch.
      (http://lkml.org/lkml/2006/2/6/280).  It applies cleanly to 2.6.18-rc3 and
      replaces a few more instances of ->pid == 1 with is_init().
      
      Further, is_init() checks pid and thus removes dependency on Eric's other
      patches for now.
      
      Eric's original description:
      
      	There are a lot of places in the kernel where we test for init
      	because we give it special properties.  Most  significantly init
      	must not die.  This results in code all over the kernel test
      	->pid == 1.
      
      	Introduce is_init to capture this case.
      
      	With multiple pid spaces for all of the cases affected we are
      	looking for only the first process on the system, not some other
      	process that has pid == 1.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NSukadev Bhattiprolu <sukadev@us.ibm.com>
      Cc: Dave Hansen <haveblue@us.ibm.com>
      Cc: Serge Hallyn <serue@us.ibm.com>
      Cc: Cedric Le Goater <clg@fr.ibm.com>
      Cc: <lxc-devel@lists.sourceforge.net>
      Acked-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f400e198
  2. 26 9月, 2006 1 次提交
  3. 11 7月, 2006 1 次提交
  4. 03 7月, 2006 1 次提交
  5. 01 7月, 2006 2 次提交
  6. 30 6月, 2006 1 次提交
    • I
      [PATCH] genirq: rename desc->handler to desc->chip · d1bef4ed
      Ingo Molnar 提交于
      This patch-queue improves the generic IRQ layer to be truly generic, by adding
      various abstractions and features to it, without impacting existing
      functionality.
      
      While the queue can be best described as "fix and improve everything in the
      generic IRQ layer that we could think of", and thus it consists of many
      smaller features and lots of cleanups, the one feature that stands out most is
      the new 'irq chip' abstraction.
      
      The irq-chip abstraction is about describing and coding and IRQ controller
      driver by mapping its raw hardware capabilities [and quirks, if needed] in a
      straightforward way, without having to think about "IRQ flow"
      (level/edge/etc.) type of details.
      
      This stands in contrast with the current 'irq-type' model of genirq
      architectures, which 'mixes' raw hardware capabilities with 'flow' details.
      The patchset supports both types of irq controller designs at once, and
      converts i386 and x86_64 to the new irq-chip design.
      
      As a bonus side-effect of the irq-chip approach, chained interrupt controllers
      (master/slave PIC constructs, etc.) are now supported by design as well.
      
      The end result of this patchset intends to be simpler architecture-level code
      and more consolidation between architectures.
      
      We reused many bits of code and many concepts from Russell King's ARM IRQ
      layer, the merging of which was one of the motivations for this patchset.
      
      This patch:
      
      rename desc->handler to desc->chip.
      
      Originally i did not want to do this, because it's a big patch.  But having
      both "desc->handler", "desc->handle_irq" and "action->handler" caused a
      large degree of confusion and made the code appear alot less clean than it
      truly is.
      
      I have also attempted a dual approach as well by introducing a
      desc->chip alias - but that just wasnt robust enough and broke
      frequently.
      
      So lets get over with this quickly.  The conversion was done automatically
      via scripts and converts all the code in the kernel.
      
      This renaming patch is the first one amongst the patches, so that the
      remaining patches can stay flexible and can be merged and split up
      without having some big monolithic patch act as a merge barrier.
      
      [akpm@osdl.org: build fix]
      [akpm@osdl.org: another build fix]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d1bef4ed
  7. 28 6月, 2006 1 次提交
    • K
      [PATCH] node hotplug: register cpu: remove node struct · 76b67ed9
      KAMEZAWA Hiroyuki 提交于
      With Goto-san's patch, we can add new pgdat/node at runtime.  I'm now
      considering node-hot-add with cpu + memory on ACPI.
      
      I found acpi container, which describes node, could evaluate cpu before
      memory. This means cpu-hot-add occurs before memory hot add.
      
      In most part, cpu-hot-add doesn't depend on node hot add.  But register_cpu(),
      which creates symbolic link from node to cpu, requires that node should be
      onlined before register_cpu().  When a node is onlined, its pgdat should be
      there.
      
      This patch-set holds off creating symbolic link from node to cpu
      until node is onlined.
      
      This removes node arguments from register_cpu().
      
      Now, register_cpu() requires 'struct node' as its argument.  But the array of
      struct node is now unified in driver/base/node.c now (By Goto's node hotplug
      patch).  We can get struct node in generic way.  So, this argument is not
      necessary now.
      
      This patch also guarantees add cpu under node only when node is onlined.  It
      is necessary for node-hot-add vs.  cpu-hot-add patch following this.
      
      Moreover, register_cpu calculates cpu->node_id by cpu_to_node() without regard
      to its 'struct node *root' argument.  This patch removes it.
      
      Also modify callers of register_cpu()/unregister_cpu, whose args are changed
      by register-cpu-remove-node-struct patch.
      
      [Brice.Goglin@ens-lyon.org: fix it]
      Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Yasunori Goto <y-goto@jp.fujitsu.com>
      Cc: Ashok Raj <ashok.raj@intel.com>
      Cc: Dave Hansen <haveblue@us.ibm.com>
      Signed-off-by: NBrice Goglin <Brice.Goglin@ens-lyon.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      76b67ed9
  8. 20 4月, 2006 3 次提交
  9. 11 4月, 2006 5 次提交
    • 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
    • Y
      [PATCH] Configurable NODES_SHIFT · c80d79d7
      Yasunori Goto 提交于
      Current implementations define NODES_SHIFT in include/asm-xxx/numnodes.h for
      each arch.  Its definition is sometimes configurable.  Indeed, ia64 defines 5
      NODES_SHIFT values in the current git tree.  But it looks a bit messy.
      
      SGI-SN2(ia64) system requires 1024 nodes, and the number of nodes already has
      been changeable by config.  Suitable node's number may be changed in the
      future even if it is other architecture.  So, I wrote configurable node's
      number.
      
      This patch set defines just default value for each arch which needs multi
      nodes except ia64.  But, it is easy to change to configurable if necessary.
      
      On ia64 the number of nodes can be already configured in generic ia64 and SN2
      config.  But, NODES_SHIFT is defined for DIG64 and HP'S machine too.  So, I
      changed it so that all platforms can be configured via CONFIG_NODES_SHIFT.  It
      would be simpler.
      
      See also: http://marc.theaimsgroup.com/?l=linux-kernel&m=114358010523896&w=2Signed-off-by: NYasunori Goto <y-goto@jp.fujitsu.com>
      Cc: Hirokazu Takata <takata@linux-m32r.org>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Jack Steiner <steiner@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c80d79d7
    • 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
  10. 28 3月, 2006 3 次提交
  11. 27 3月, 2006 1 次提交
    • A
      [PATCH] bitops: m32r: use generic bitops · 6d9f937b
      Akinobu Mita 提交于
      - remove __{,test_and_}{set,clear,change}_bit() and test_bit()
      - remove ffz()
      - remove find_{next,first}{,_zero}_bit()
      - remove __ffs()
      - remove generic_fls()
      - remove generic_fls64()
      - remove sched_find_first_bit()
      - remove generic_ffs()
      - remove generic_hweight{32,16,8}()
      - remove ext2_{set,clear,test,find_first_zero,find_next_zero}_bit()
      - remove ext2_{set,clear}_bit_atomic()
      - remove minix_{test,set,test_and_clear,test,find_first_zero}_bit()
      Signed-off-by: NAkinobu Mita <mita@miraclelinux.com>
      Cc: Hirokazu Takata <takata@linux-m32r.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6d9f937b
  12. 26 3月, 2006 1 次提交
  13. 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
  14. 22 3月, 2006 1 次提交
  15. 06 3月, 2006 1 次提交
  16. 25 2月, 2006 2 次提交
  17. 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
  18. 08 2月, 2006 1 次提交
  19. 13 1月, 2006 1 次提交
  20. 11 1月, 2006 2 次提交
  21. 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
  22. 07 1月, 2006 5 次提交
  23. 29 11月, 2005 1 次提交