1. 23 2月, 2009 1 次提交
    • S
      powerpc64: port of the function graph tracer · 6794c782
      Steven Rostedt 提交于
      This is a port of the function graph tracer that was written by
      Frederic Weisbecker for the x86.
      
      This only works for PPC64 at the moment and only for static tracing.
      PPC32 and dynamic function graph tracing support will come later.
      
      The trace produces a visual calling of functions:
      
       # tracer: function_graph
       #
       # CPU  DURATION                  FUNCTION CALLS
       # |     |   |                     |   |   |   |
        0)   2.224 us    |                        }
        0) ! 271.024 us  |                      }
        0) ! 320.080 us  |                    }
        0) ! 324.656 us  |                  }
        0) ! 329.136 us  |                }
        0)               |                .put_prev_task_fair() {
        0)               |                  .update_curr() {
        0)   2.240 us    |                    .update_min_vruntime();
        0)   6.512 us    |                  }
        0)   2.528 us    |                  .__enqueue_entity();
        0) + 15.536 us   |                }
        0)               |                .pick_next_task_fair() {
        0)   2.032 us    |                  .__pick_next_entity();
        0)   2.064 us    |                  .__clear_buddies();
        0)               |                  .set_next_entity() {
        0)   2.672 us    |                    .__dequeue_entity();
        0)   6.864 us    |                  }
      
      Geoff Lavand tested on PS3.
      Tested-by: NGeoff Levand <geoffrey.levand@am.sony.com>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      6794c782
  2. 29 1月, 2009 3 次提交
    • K
      powerpc/fsl: Ensure PCI_QUIRKS are enabled for FSL_PCI · d0839118
      Kumar Gala 提交于
      The FSL PCI code depends on PCI quirks being enabled to function
      properly.  We can ensure this by doing a select in Kconfig of
      PCI_QUIRKS.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      d0839118
    • T
      powerpc/fsl-booke: Make CAM entries used for lowmem configurable · 96051465
      Trent Piepho 提交于
      On booke processors, the code that maps low memory only uses up to three
      CAM entries, even though there are sixteen and nothing else uses them.
      
      Make this number configurable in the advanced options menu along with max
      low memory size.  If one wants 1 GB of lowmem, then it's typically
      necessary to have four CAM entries.
      Signed-off-by: NTrent Piepho <tpiepho@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      96051465
    • T
      powerpc/fsl-booke: Allow larger CAM sizes than 256 MB · c8f3570b
      Trent Piepho 提交于
      The code that maps kernel low memory would only use page sizes up to 256
      MB.  On E500v2 pages up to 4 GB are supported.
      
      However, a page must be aligned to a multiple of the page's size.  I.e.
      256 MB pages must aligned to a 256 MB boundary.  This was enforced by a
      requirement that the physical and virtual addresses of the start of lowmem
      be aligned to 256 MB.  Clearly requiring 1GB or 4GB alignment to allow
      pages of that size isn't acceptable.
      
      To solve this, I simply have adjust_total_lowmem() take alignment into
      account when it decides what size pages to use.  Give it PAGE_OFFSET =
      0x7000_0000, PHYSICAL_START = 0x3000_0000, and 2GB of RAM, and it will map
      pages like this:
      PA 0x3000_0000 VA 0x7000_0000 Size 256 MB
      PA 0x4000_0000 VA 0x8000_0000 Size 1 GB
      PA 0x8000_0000 VA 0xC000_0000 Size 256 MB
      PA 0x9000_0000 VA 0xD000_0000 Size 256 MB
      PA 0xA000_0000 VA 0xE000_0000 Size 256 MB
      
      Because the lowmem mapping code now takes alignment into account,
      PHYSICAL_ALIGN can be lowered from 256 MB to 64 MB.  Even lower might be
      possible.  The lowmem code will work down to 4 kB but it's possible some of
      the boot code will fail before then.  Poor alignment will force small pages
      to be used, which combined with the limited number of TLB1 pages available,
      will result in very little memory getting mapped.  So alignments less than
      64 MB probably aren't very useful anyway.
      Signed-off-by: NTrent Piepho <tpiepho@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      c8f3570b
  3. 28 1月, 2009 1 次提交
  4. 14 1月, 2009 1 次提交
  5. 08 1月, 2009 2 次提交
  6. 29 12月, 2008 1 次提交
  7. 23 12月, 2008 1 次提交
  8. 03 12月, 2008 1 次提交
    • B
      powerpc: Add sync_*_for_* to dma_ops · 15e09c0e
      Becky Bruce 提交于
      We need to swap these out once we start using swiotlb, so add
      them to dma_ops.  Create CONFIG_PPC_NEED_DMA_SYNC_OPS Kconfig
      option; this is currently enabled automatically if we're
      CONFIG_NOT_COHERENT_CACHE.  In the future, this will also
      be enabled for builds that need swiotlb.  If PPC_NEED_DMA_SYNC_OPS
      is not defined, the dma_sync_*_for_* ops compile to nothing.
      Otherwise, they access the dma_ops pointers for the sync ops.
      
      This patch also changes dma_sync_single_range_* to actually
      sync the range - previously it was using a generous
      dma_sync_single.  dma_sync_single_* is now implemented
      as a dma_sync_single_range with an offset of 0.
      Signed-off-by: NBecky Bruce <becky.bruce@freescale.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      15e09c0e
  9. 11 11月, 2008 1 次提交
  10. 23 10月, 2008 1 次提交
    • S
      ftrace: disable dynamic ftrace for all archs that use daemon · 07c4cc1c
      Steven Rostedt 提交于
      The ftrace daemon is complex and can cause nasty races if something goes
      wrong. Since it affects all of the kernel, this patch disables dynamic
      ftrace from any arch that depends on the daemon. Until the archs are
      ported over to the new MCOUNT_RECORD method, I am disabling dynamic
      ftrace from them.
      
      Note: I am leaving in the arch/<arch>/kernel/ftrace.c code alone since
      that can be used when the arch is ported to MCOUNT_RECORD. To port
      the arch to MCOUNT_RECORD, the scripts/recordmcount.pl needs to be
      updated. I will make that easier to do for 2.6.29. For 28, we will keep
      the archs disabled.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      07c4cc1c
  11. 22 10月, 2008 1 次提交
    • M
      powerpc: Support for relocatable kdump kernel · 54622f10
      Mohan Kumar M 提交于
      This adds relocatable kernel support for kdump. With this one can
      use the same regular kernel to capture the kdump. A signature (0xfeed1234)
      is passed in r6 from panic code to the next kernel through kexec_sequence
      and purgatory code. The signature is used to differentiate between
      kdump kernel and non-kdump kernels.
      
      The purgatory code compares the signature and sets the __kdump_flag in
      head_64.S.  During the boot up, kernel code checks __kdump_flag and if it
      is set, the kernel will behave as relocatable kdump kernel. This kernel
      will boot at the address where it was loaded by kexec-tools ie. at the
      address reserved through crashkernel boot parameter.
      
      CONFIG_CRASH_DUMP depends on CONFIG_RELOCATABLE option to build kdump
      kernel as relocatable. So the same kernel can be used as production and
      kdump kernel.
      
      This patch incorporates the changes suggested by Paul Mackerras to avoid
      GOT use and to avoid two copies of the code.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NMohan Kumar M <mohan@in.ibm.com>
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      54622f10
  12. 21 10月, 2008 2 次提交
  13. 20 10月, 2008 1 次提交
    • M
      container freezer: implement freezer cgroup subsystem · dc52ddc0
      Matt Helsley 提交于
      This patch implements a new freezer subsystem in the control groups
      framework.  It provides a way to stop and resume execution of all tasks in
      a cgroup by writing in the cgroup filesystem.
      
      The freezer subsystem in the container filesystem defines a file named
      freezer.state.  Writing "FROZEN" to the state file will freeze all tasks
      in the cgroup.  Subsequently writing "RUNNING" will unfreeze the tasks in
      the cgroup.  Reading will return the current state.
      
      * Examples of usage :
      
         # mkdir /containers/freezer
         # mount -t cgroup -ofreezer freezer  /containers
         # mkdir /containers/0
         # echo $some_pid > /containers/0/tasks
      
      to get status of the freezer subsystem :
      
         # cat /containers/0/freezer.state
         RUNNING
      
      to freeze all tasks in the container :
      
         # echo FROZEN > /containers/0/freezer.state
         # cat /containers/0/freezer.state
         FREEZING
         # cat /containers/0/freezer.state
         FROZEN
      
      to unfreeze all tasks in the container :
      
         # echo RUNNING > /containers/0/freezer.state
         # cat /containers/0/freezer.state
         RUNNING
      
      This is the basic mechanism which should do the right thing for user space
      task in a simple scenario.
      
      It's important to note that freezing can be incomplete.  In that case we
      return EBUSY.  This means that some tasks in the cgroup are busy doing
      something that prevents us from completely freezing the cgroup at this
      time.  After EBUSY, the cgroup will remain partially frozen -- reflected
      by freezer.state reporting "FREEZING" when read.  The state will remain
      "FREEZING" until one of these things happens:
      
      	1) Userspace cancels the freezing operation by writing "RUNNING" to
      		the freezer.state file
      	2) Userspace retries the freezing operation by writing "FROZEN" to
      		the freezer.state file (writing "FREEZING" is not legal
      		and returns EIO)
      	3) The tasks that blocked the cgroup from entering the "FROZEN"
      		state disappear from the cgroup's set of tasks.
      
      [akpm@linux-foundation.org: coding-style fixes]
      [akpm@linux-foundation.org: export thaw_process]
      Signed-off-by: NCedric Le Goater <clg@fr.ibm.com>
      Signed-off-by: NMatt Helsley <matthltc@us.ibm.com>
      Acked-by: NSerge E. Hallyn <serue@us.ibm.com>
      Tested-by: NMatt Helsley <matthltc@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dc52ddc0
  14. 07 10月, 2008 1 次提交
  15. 16 9月, 2008 1 次提交
    • P
      powerpc: Make the 64-bit kernel as a position-independent executable · 549e8152
      Paul Mackerras 提交于
      This implements CONFIG_RELOCATABLE for 64-bit by making the kernel as
      a position-independent executable (PIE) when it is set.  This involves
      processing the dynamic relocations in the image in the early stages of
      booting, even if the kernel is being run at the address it is linked at,
      since the linker does not necessarily fill in words in the image for
      which there are dynamic relocations.  (In fact the linker does fill in
      such words for 64-bit executables, though not for 32-bit executables,
      so in principle we could avoid calling relocate() entirely when we're
      running a 64-bit kernel at the linked address.)
      
      The dynamic relocations are processed by a new function relocate(addr),
      where the addr parameter is the virtual address where the image will be
      run.  In fact we call it twice; once before calling prom_init, and again
      when starting the main kernel.  This means that reloc_offset() returns
      0 in prom_init (since it has been relocated to the address it is running
      at), which necessitated a few adjustments.
      
      This also changes __va and __pa to use an equivalent definition that is
      simpler.  With the relocatable kernel, PAGE_OFFSET and MEMORY_START are
      constants (for 64-bit) whereas PHYSICAL_START is a variable (and
      KERNELBASE ideally should be too, but isn't yet).
      
      With this, relocatable kernels still copy themselves down to physical
      address 0 and run there.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      549e8152
  16. 14 9月, 2008 1 次提交
  17. 12 8月, 2008 1 次提交
  18. 30 7月, 2008 1 次提交
  19. 28 7月, 2008 1 次提交
  20. 26 7月, 2008 2 次提交
    • M
      gpiolib: allow user-selection · 7444a72e
      Michael Buesch 提交于
      This patch adds functionality to the gpio-lib subsystem to make it
      possible to enable the gpio-lib code even if the architecture code didn't
      request to get it built in.
      
      The archtitecture code does still need to implement the gpiolib accessor
      functions in its asm/gpio.h file.  This patch adds the implementations for
      x86 and PPC.
      
      With these changes it is possible to run generic GPIO expansion cards on
      every architecture that implements the trivial wrapper functions.  Support
      for more architectures can easily be added.
      Signed-off-by: NMichael Buesch <mb@bu3sch.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Jean Delvare <khali@linux-fr.org>
      Cc: Samuel Ortiz <sameo@openedhand.com>
      Cc: Kumar Gala <galak@gate.crashing.org>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Adrian Bunk <bunk@stusta.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7444a72e
    • J
      introduce HAVE_EFFICIENT_UNALIGNED_ACCESS Kconfig symbol · 58340a07
      Johannes Berg 提交于
      In many cases, especially in networking, it can be beneficial to know at
      compile time whether the architecture can do unaligned accesses efficiently.
      This patch introduces a new Kconfig symbol
      
      	HAVE_EFFICIENT_UNALIGNED_ACCESS
      
      for that purpose and adds it to the powerpc and x86 architectures.  Also add
      some documentation about alignment and networking, and especially one intended
      use of this symbol.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      Acked-by: Ingo Molnar <mingo@elte.hu> [x86 architecture part]
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      58340a07
  21. 25 7月, 2008 2 次提交
  22. 24 7月, 2008 1 次提交
    • J
      kgdb, powerpc: arch specific powerpc kgdb support · 17ce452f
      Jason Wessel 提交于
      This patch removes the old kgdb reminants from ARCH=powerpc and
      implements the new style arch specific stub for the common kgdb core
      interface.
      
      It is possible to have xmon and kgdb in the same kernel, but you
      cannot use both at the same time because there is only one set of
      debug hooks.
      
      The arch specific kgdb implementation saves the previous state of the
      debug hooks and restores them if you unconfigure the kgdb I/O driver.
      Kgdb should have no impact on a kernel that has no kgdb I/O driver
      configured.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      17ce452f
  23. 17 7月, 2008 2 次提交
  24. 15 7月, 2008 2 次提交
  25. 09 7月, 2008 2 次提交
  26. 01 7月, 2008 1 次提交
  27. 26 6月, 2008 1 次提交
  28. 10 6月, 2008 1 次提交
    • A
      powerpc/sysdev: implement FSL GTM support · 83ff9dcf
      Anton Vorontsov 提交于
      GTM stands for General-purpose Timers Module and able to generate
      timer{1,2,3,4} interrupts. These timers are used by the drivers that
      need time precise interrupts (like for USB transactions scheduling for
      the Freescale USB Host controller as found in some QE and CPM chips),
      or these timers could be used as wakeup events from the CPU deep-sleep
      mode.
      
      Things unimplemented:
      1. Cascaded (32 bit) timers (1-2, 3-4).
         This is straightforward to implement when needed, two timers should
         be marked as "requested" and configured as appropriate.
      2. Super-cascaded (64 bit) timers (1-2-3-4).
         This is also straightforward to implement when needed, all timers
         should be marked as "requested" and configured as appropriate.
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      83ff9dcf
  29. 24 5月, 2008 2 次提交
  30. 29 4月, 2008 1 次提交