1. 02 9月, 2010 3 次提交
    • P
      powerpc: Account time using timebase rather than PURR · cf9efce0
      Paul Mackerras 提交于
      Currently, when CONFIG_VIRT_CPU_ACCOUNTING is enabled, we use the
      PURR register for measuring the user and system time used by
      processes, as well as other related times such as hardirq and
      softirq times.  This turns out to be quite confusing for users
      because it means that a program will often be measured as taking
      less time when run on a multi-threaded processor (SMT2 or SMT4 mode)
      than it does when run on a single-threaded processor (ST mode), even
      though the program takes longer to finish.  The discrepancy is
      accounted for as stolen time, which is also confusing, particularly
      when there are no other partitions running.
      
      This changes the accounting to use the timebase instead, meaning that
      the reported user and system times are the actual number of real-time
      seconds that the program was executing on the processor thread,
      regardless of which SMT mode the processor is in.  Thus a program will
      generally show greater user and system times when run on a
      multi-threaded processor than on a single-threaded processor.
      
      On pSeries systems on POWER5 or later processors, we measure the
      stolen time (time when this partition wasn't running) using the
      hypervisor dispatch trace log.  We check for new entries in the
      log on every entry from user mode and on every transition from
      kernel process context to soft or hard IRQ context (i.e. when
      account_system_vtime() gets called).  So that we can correctly
      distinguish time stolen from user time and time stolen from system
      time, without having to check the log on every exit to user mode,
      we store separate timestamps for exit to user mode and entry from
      user mode.
      
      On systems that have a SPURR (POWER6 and POWER7), we read the SPURR
      in account_system_vtime() (as before), and then apportion the SPURR
      ticks since the last time we read it between scaled user time and
      scaled system time according to the relative proportions of user
      time and system time over the same interval.  This avoids having to
      read the SPURR on every kernel entry and exit.  On systems that have
      PURR but not SPURR (i.e., POWER5), we do the same using the PURR
      rather than the SPURR.
      
      This disables the DTL user interface in /sys/debug/kernel/powerpc/dtl
      for now since it conflicts with the use of the dispatch trace log
      by the time accounting code.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      cf9efce0
    • P
      powerpc: Abstract indexing of lppaca structs · 8154c5d2
      Paul Mackerras 提交于
      Currently we have the lppaca structs as a simple array of NR_CPUS
      entries, taking up space in the data section of the kernel image.
      In future we would like to allocate them dynamically, so this
      abstracts out the accesses to the array, making it easier to
      change how we locate the lppaca for a given cpu in future.
      Specifically, lppaca[cpu] changes to lppaca_of(cpu).
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8154c5d2
    • N
      powerpc/pseries: Correct rtas_data_buf locking in dlpar code · 93f68f1e
      Nathan Fontenot 提交于
      The dlpar code can cause a deadlock to occur when making the RTAS
      configure-connector call.  This occurs because we make kmalloc calls,
      which can block, while parsing the rtas_data_buf and holding the
      rtas_data_buf_lock.  This an cause issues if someone else attempts
      to grab the rtas_data_bug_lock.
      
      This patch alleviates this issue by copying the contents of the rtas_data_buf
      to a local buffer before parsing.  This allows us to only hold the
      rtas_data_buf_lock around the RTAS configure-connector calls.
      Signed-off-by: NNathan Fontenot <nfont@austin.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      93f68f1e
  2. 01 9月, 2010 3 次提交
  3. 24 8月, 2010 6 次提交
  4. 10 8月, 2010 2 次提交
    • A
      spufs conversion to ->evict_inode() · 0f3f63a4
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      0f3f63a4
    • C
      remove inode_setattr · 1025774c
      Christoph Hellwig 提交于
      Replace inode_setattr with opencoded variants of it in all callers.  This
      moves the remaining call to vmtruncate into the filesystem methods where it
      can be replaced with the proper truncate sequence.
      
      In a few cases it was obvious that we would never end up calling vmtruncate
      so it was left out in the opencoded variant:
      
       spufs: explicitly checks for ATTR_SIZE earlier
       btrfs,hugetlbfs,logfs,dlmfs: explicitly clears ATTR_SIZE earlier
       ufs: contains an opencoded simple_seattr + truncate that sets the filesize just above
      
      In addition to that ncpfs called inode_setattr with handcrafted iattrs,
      which allowed to trim down the opencoded variant.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      1025774c
  5. 07 8月, 2010 1 次提交
    • E
      powerpc/5200: add mpc5200_psc_ac97_gpio_reset · cfa6a88c
      Eric Millbrandt 提交于
      Work around a silicon bug in the ac97 reset functionality of the
      mpc5200(b).  The implementation of the ac97 "cold" reset is flawed.
      If the sync and output lines are high when reset is asserted the
      attached ac97 device may go into test mode.  Avoid this by
      reconfiguring the psc to gpio mode and generating the reset manually.
      
      From MPC5200B User's Manual:
      "Some AC97 devices goes to a test mode, if the Sync line is high
      during the Res line is low (reset phase). To avoid this behavior the
      Sync line must be also forced to zero during the reset phase. To do
      that, the pin muxing should switch to GPIO mode and the GPIO control
      register should be used to control the output lines."
      Signed-off-by: NEric Millbrandt <emillbrandt@dekaresearch.com>
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      cfa6a88c
  6. 06 8月, 2010 1 次提交
  7. 05 8月, 2010 7 次提交
  8. 03 8月, 2010 1 次提交
  9. 02 8月, 2010 4 次提交
  10. 01 8月, 2010 1 次提交
    • G
      of/address: Clean up function declarations · 22ae782f
      Grant Likely 提交于
      This patch moves the declaration of of_get_address(), of_get_pci_address(),
      and of_pci_address_to_resource() out of arch code and into the common
      linux/of_address header file.
      
      This patch also fixes some of the asm/prom.h ordering issues.  It still
      includes some header files that it ideally shouldn't be, but at least the
      ordering is consistent now so that of_* overrides work.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      22ae782f
  11. 31 7月, 2010 4 次提交
  12. 29 7月, 2010 2 次提交
    • I
      powerpc: Use IRQF_NO_SUSPEND not IRQF_TIMER for non-timer interrupts · ba461f09
      Ian Campbell 提交于
      kw_i2c_irq and via_pmu_interrupt are not timer interrupts and
      therefore should not use IRQF_TIMER. Use the recently introduced
      IRQF_NO_SUSPEND instead since that is the actual desired behaviour.
      Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: linuxppc-dev@ozlabs.org
      Cc: devicetree-discuss@lists.ozlabs.org
      LKML-Reference: <1280398595-29708-3-git-send-email-ian.campbell@citrix.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      ba461f09
    • P
      powerpc: Clean up obsolete code relating to decrementer and timebase · d75d68cf
      Paul Mackerras 提交于
      Since the decrementer and timekeeping code was moved over to using
      the generic clockevents and timekeeping infrastructure, several
      variables and functions have been obsolete and effectively unused.
      This deletes them.
      
      In particular, wakeup_decrementer() is no longer needed since the
      generic code reprograms the decrementer as part of the process of
      resuming the timekeeping code, which happens during sysdev resume.
      Thus the wakeup_decrementer calls in the suspend_enter methods for
      52xx platforms have been removed.  The call in the powermac cpu
      frequency change code has been replaced by set_dec(1), which will
      cause a timer interrupt as soon as interrupts are enabled, and the
      generic code will then reprogram the decrementer with the correct
      value.
      
      This also simplifies the generic_suspend_en/disable_irqs functions
      and makes them static since they are not referenced outside time.c.
      The preempt_enable/disable calls are removed because the generic
      code has disabled all but the boot cpu at the point where these
      functions are called, so we can't be moved to another cpu.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      d75d68cf
  13. 26 7月, 2010 1 次提交
  14. 24 7月, 2010 3 次提交
    • J
      of: remove of_default_bus_ids · c0dd394c
      Jonas Bonn 提交于
      This list used was by only two platforms with all other platforms defining an
      own list of valid bus id's to pass to of_platform_bus_probe.  This patch:
      
      i)   copies the default list to the two platforms that depended on it (powerpc)
      ii)  remove the usage of of_default_bus_ids in of_platform_bus_probe
      iii) removes the definition of the list from all architectures that defined it
      
      Passing a NULL 'matches' parameter to of_platform_bus_probe is still valid; the
      function returns no error in that case as the NULL value is equivalent to an
      empty list.
      Signed-off-by: NJonas Bonn <jonas@southpole.se>
      [grant.likely@secretlab.ca: added __initdata annotations, warn on and return error on missing match table, and fix whitespace errors]
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      c0dd394c
    • G
      powerpc: remove references to of_device and to_of_device · a454dc50
      Grant Likely 提交于
      of_device is just a #define alias to platform_device.  This patch
      replaces all references to it with platform_device.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      a454dc50
    • G
      of: Merge of_platform_bus_type with platform_bus_type · eca39301
      Grant Likely 提交于
      of_platform_bus was being used in the same manner as the platform_bus.
      The only difference being that of_platform_bus devices are generated
      from data in the device tree, and platform_bus devices are usually
      statically allocated in platform code.  Having them separate causes
      the problem of device drivers having to be registered twice if it
      was possible for the same device to appear on either bus.
      
      This patch removes of_platform_bus_type and registers all of_platform
      bus devices and drivers on the platform bus instead.  A previous patch
      made the of_device structure an alias for the platform_device structure,
      and a shim is used to adapt of_platform_drivers to the platform bus.
      
      After all of of_platform_bus drivers are converted to be normal platform
      drivers, the shim code can be removed.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      eca39301
  15. 23 7月, 2010 1 次提交
新手
引导
客服 返回
顶部