1. 09 7月, 2010 12 次提交
    • D
      powerpc/iseries: Fix constant warning · 51c7fdba
      Denis Kirjanov 提交于
      Fix smatch warning: constant 0x8000000000000000 is so big it is unsigned long
      Signed-off-by: NDenis Kirjanov <dkirjanov@kernel.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      51c7fdba
    • M
      powerpc/mpic: Add ability to reset a core via MPIC · 66953ebe
      Matthew McClintock 提交于
      We need the ability to reset cores for use with kexec/kdump for
      SMP systems. Calling this function with the specific core you want
      to reset will cause the CPU to spin in reset.
      Signed-off-by: NMatthew McClintock <msm@freescale.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      66953ebe
    • B
      powerpc/fsl-booke: Fix comments in mmu code that mention BATS · d10ac373
      Becky Bruce 提交于
      There are no BATS on BookE - we have the TLBCAM instead.  Also correct
      the page size information to included extended sizes.  We don't actually allow
      a 4G page size to be used, so comment on that as well.
      Signed-off-by: NBecky Bruce <beckyb@kernel.crashing.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      d10ac373
    • K
      powerpc/pseries/eeh: Use for_each_pci_dev() · 6901c6cc
      Kulikov Vasiliy 提交于
      Use for_each_pci_dev() to simplify the code.
      Signed-off-by: NKulikov Vasiliy <segooon@gmail.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      6901c6cc
    • C
      hvc_console: use "*_console" nomenclature to avoid modpost warning. · 4455b119
      Chris Metcalf 提交于
      The use of "hvc_con_driver" as the name for a file-static "struct
      console" with a ".setup" field pointing to an __init function causes
      a modpost warning, since a non-initdata structure points to init code.
      Using "hvc_console" as the name triggers the hacky "*_console"
      workaround in modpost to silence the warning, and is the same thing
      that most of the other console drivers already do.
      
      I made the same change in hvsi.c since I happened to notice it was
      likely to suffer from the same problem.
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      4455b119
    • B
      powerpc/pseries: Partition hibernation support · 32d8ad4e
      Brian King 提交于
      Enables support for HMC initiated partition hibernation. This is
      a firmware assisted hibernation, since the firmware handles writing
      the memory out to disk, along with other partition information,
      so we just mimic suspend to ram.
      Signed-off-by: NBrian King <brking@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      32d8ad4e
    • B
      powerpc/pseries: Migration code reorganization / hibernation prep · 8fe93f8d
      Brian King 提交于
      Partition hibernation will use some of the same code as is
      currently used for Live Partition Migration. This function
      further abstracts this code such that code outside of rtas.c
      can utilize it. It also changes the error field in the suspend
      me data structure to be an atomic type, since it is set and
      checked on different cpus without any barriers or locking.
      Signed-off-by: NBrian King <brking@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8fe93f8d
    • P
      powerpc: Clean up obsolete code relating to decrementer and timebase · c1aa687d
      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>
      c1aa687d
    • P
      powerpc: Rework VDSO gettimeofday to prevent time going backwards · 8fd63a9e
      Paul Mackerras 提交于
      Currently it is possible for userspace to see the result of
      gettimeofday() going backwards by 1 microsecond, assuming that
      userspace is using the gettimeofday() in the VDSO.  The VDSO
      gettimeofday() algorithm computes the time in "xsecs", which are
      units of 2^-20 seconds, or approximately 0.954 microseconds,
      using the algorithm
      
      	now = (timebase - tb_orig_stamp) * tb_to_xs + stamp_xsec
      
      and then converts the time in xsecs to seconds and microseconds.
      
      The kernel updates the tb_orig_stamp and stamp_xsec values every
      tick in update_vsyscall().  If the length of the tick is not an
      integer number of xsecs, then some precision is lost in converting
      the current time to xsecs.  For example, with CONFIG_HZ=1000, the
      tick is 1ms long, which is 1048.576 xsecs.  That means that
      stamp_xsec will advance by either 1048 or 1049 on each tick.
      With the right conditions, it is possible for userspace to get
      (timebase - tb_orig_stamp) * tb_to_xs being 1049 if the kernel is
      slightly late in updating the vdso_datapage, and then for stamp_xsec
      to advance by 1048 when the kernel does update it, and for userspace
      to then see (timebase - tb_orig_stamp) * tb_to_xs being zero due to
      integer truncation.  The result is that time appears to go backwards
      by 1 microsecond.
      
      To fix this we change the VDSO gettimeofday to use a new field in the
      VDSO datapage which stores the nanoseconds part of the time as a
      fractional number of seconds in a 0.32 binary fraction format.
      (Or put another way, as a 32-bit number in units of 0.23283 ns.)
      This is convenient because we can use the mulhwu instruction to
      convert it to either microseconds or nanoseconds.
      
      Since it turns out that computing the time of day using this new field
      is simpler than either using stamp_xsec (as gettimeofday does) or
      stamp_xtime.tv_nsec (as clock_gettime does), this converts both
      gettimeofday and clock_gettime to use the new field.  The existing
      __do_get_tspec function is converted to use the new field and take
      a parameter in r7 that indicates the desired resolution, 1,000,000
      for microseconds or 1,000,000,000 for nanoseconds.  The __do_get_xsec
      function is then unused and is deleted.
      
      The new algorithm is
      
      	now = ((timebase - tb_orig_stamp) << 12) * tb_to_xs
      		+ (stamp_xtime_seconds << 32) + stamp_sec_fraction
      
      with 'now' in units of 2^-32 seconds.  That is then converted to
      seconds and either microseconds or nanoseconds with
      
      	seconds = now >> 32
      	partseconds = ((now & 0xffffffff) * resolution) >> 32
      
      The 32-bit VDSO code also makes a further simplification: it ignores
      the bottom 32 bits of the tb_to_xs value, which is a 0.64 format binary
      fraction.  Doing so gets rid of 4 multiply instructions.  Assuming
      a timebase frequency of 1GHz or less and an update interval of no
      more than 10ms, the upper 32 bits of tb_to_xs will be at least
      4503599, so the error from ignoring the low 32 bits will be at most
      2.2ns, which is more than an order of magnitude less than the time
      taken to do gettimeofday or clock_gettime on our fastest processors,
      so there is no possibility of seeing inconsistent values due to this.
      
      This also moves update_gtod() down next to its only caller, and makes
      update_vsyscall use the time passed in via the wall_time argument rather
      than accessing xtime directly.  At present, wall_time always points to
      xtime, but that could change in future.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8fd63a9e
    • B
      5f07aa75
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband · e467e104
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
        IPoIB: Fix world-writable child interface control sysfs attributes
        IB/qib: Clean up properly if qib_init() fails
        IB/qib: Completion queue callback needs to be single threaded
        IB/qib: Update 7322 serdes tables
        IB/qib: Clear 6120 hardware error register
        IB/qib: Clear eager buffer memory for each new process
        IB/qib: Mask hardware error during link reset
        IB/qib: Don't mark VL15 bufs as WC to avoid a rare 7322 chip problem
        RDMA/cxgb4: Derive smac_idx from port viid
        RDMA/cxgb4: Avoid false GTS CIDX_INC overflows
        RDMA/cxgb4: Don't call abort_connection() for active connect failures
        RDMA/cxgb4: Use the DMA state API instead of the pci equivalents
      e467e104
    • R
      9e770044
  2. 08 7月, 2010 22 次提交
  3. 07 7月, 2010 6 次提交