1. 26 11月, 2009 1 次提交
    • M
      timers, init: Limit the number of per cpu calibration bootup messages · feae3203
      Mike Travis 提交于
      Limit the number of per cpu calibration messages by only
      printing out results for the first cpu to boot.
      
      Also, don't print "CPUx is down" as this is expected, and we
      don't need 4096 reminders... ;-)
      Signed-off-by: NMike Travis <travis@sgi.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Roland Dreier <rdreier@cisco.com>
      Cc: Randy Dunlap <rdunlap@xenotime.net>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: Yinghai Lu <yhlu.kernel@gmail.com>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      Cc: Jack Steiner <steiner@sgi.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20091118002219.889552000@alcatraz.americas.sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      feae3203
  2. 18 11月, 2009 3 次提交
  3. 16 11月, 2009 2 次提交
  4. 14 11月, 2009 8 次提交
    • T
      clocksource/events: Fix fallout of generic code changes · a362c638
      Thomas Gleixner 提交于
      powerpc grew a new warning due to the type change of clockevent->mult.
      
      The architectures which use parts of the generic time keeping
      infrastructure tripped over my wrong assumption that
      clocksource_register is only used when GENERIC_TIME=y.
      
      I should have looked and also I should have known better. These
      renitent Gaul villages are racking my nerves. Some serious deprecating
      is due.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      a362c638
    • J
      nohz: Allow 32-bit machines to sleep for more than 2.15 seconds · 97813f2f
      Jon Hunter 提交于
      In the dynamic tick code, "max_delta_ns" (member of the
      "clock_event_device" structure) represents the maximum sleep time
      that can occur between timer events in nanoseconds.
      
      The variable, "max_delta_ns", is defined as an unsigned long
      which is a 32-bit integer for 32-bit machines and a 64-bit
      integer for 64-bit machines (if -m64 option is used for gcc).
      The value of max_delta_ns is set by calling the function
      "clockevent_delta2ns()" which returns a maximum value of LONG_MAX.
      For a 32-bit machine LONG_MAX is equal to 0x7fffffff and in
      nanoseconds this equates to ~2.15 seconds. Hence, the maximum
      sleep time for a 32-bit machine is ~2.15 seconds, where as for
      a 64-bit machine it will be many years.
      
      This patch changes the type of max_delta_ns to be "u64" instead of
      "unsigned long" so that this variable is a 64-bit type for both 32-bit
      and 64-bit machines. It also changes the maximum value returned by
      clockevent_delta2ns() to KTIME_MAX.  Hence this allows a 32-bit
      machine to sleep for longer than ~2.15 seconds. Please note that this
      patch also changes "min_delta_ns" to be "u64" too and although this is
      unnecessary, it makes the patch simpler as it avoids to fixup all
      callers of clockevent_delta2ns().
      
      [ tglx: changed "unsigned long long" to u64 as we use this data type
        	through out the time code ]
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      Cc: John Stultz <johnstul@us.ibm.com>
      LKML-Reference: <1250617512-23567-3-git-send-email-jon-hunter@ti.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      97813f2f
    • T
      nohz: Track last do_timer() cpu · 27185016
      Thomas Gleixner 提交于
      The previous patch which limits the sleep time to the maximum
      deferment time of the time keeping clocksource has some limitations on
      SMP machines: if all CPUs are idle then for all CPUs the maximum sleep
      time is limited.
      
      Solve this by keeping track of which cpu had the do_timer() duty
      assigned last and limit the sleep time only for this cpu.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      LKML-Reference: <new-submission>
      Cc: Jon Hunter <jon-hunter@ti.com>
      Cc: John Stultz <johnstul@us.ibm.com>
      27185016
    • J
      nohz: Prevent clocksource wrapping during idle · 98962465
      Jon Hunter 提交于
      The dynamic tick allows the kernel to sleep for periods longer than a
      single tick, but it does not limit the sleep time currently. In the
      worst case the kernel could sleep longer than the wrap around time of
      the time keeping clock source which would result in losing track of
      time.
      
      Prevent this by limiting it to the safe maximum sleep time of the
      current time keeping clock source. The value is calculated when the
      clock source is registered.
      
      [ tglx: simplified the code a bit and massaged the commit msg ]
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      Cc: John Stultz <johnstul@us.ibm.com>
      LKML-Reference: <1250617512-23567-2-git-send-email-jon-hunter@ti.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      98962465
    • T
      nohz: Type cast printk argument · 529eaccd
      Thomas Gleixner 提交于
      On some archs local_softirq_pending() has a data type of unsigned long
      on others its unsigned int. Type cast it to (unsigned int) in the
      printk to avoid the compiler warning.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      LKML-Reference: <new-submission>
      529eaccd
    • T
      mips: Use generic mult/shift factor calculation for clocks · e3a4fab0
      Thomas Gleixner 提交于
      Replace the MIPS functions of mult/shift factor calculation for clock
      events and clock sources with inline functions which call the generic
      functions. The minimum guaranteed conversion range is set to 4 seconds
      which corresponds to the current MIPS implementation.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Mikael Pettersson <mikpe@it.uu.se>
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Acked-by: NLinus Walleij <linus.walleij@stericsson.com>
      Cc: John Stultz <johnstul@us.ibm.com>
      LKML-Reference: <20091111134229.807255074@linutronix.de>
      e3a4fab0
    • T
      clocksource: Provide a generic mult/shift factor calculation · 7d2f944a
      Thomas Gleixner 提交于
      MIPS has two functions to calculcate the mult/shift factors for clock
      sources and clock events at run time. ARM needs such functions as
      well.
      
      Implement a function which calculates the mult/shift factors based on
      the frequencies to which and from which is converted. The function
      also has a parameter to specify the minimum conversion range in
      seconds. This range is guaranteed not to produce a 64bit overflow when
      a value is multiplied with the calculated mult factor. The larger the
      conversion range the less becomes the conversion accuracy.
      
      Provide two inline wrappers which handle clock events and clock
      sources. For clock events the "from" frequency is nano seconds per
      second which corresponds to 1GHz and "to" is the device frequency. For
      clock sources "from" is the device frequency and "to" is nano seconds
      per second.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Tested-by: NMikael Pettersson <mikpe@it.uu.se>
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Acked-by: NLinus Walleij <linus.walleij@stericsson.com>
      Cc: John Stultz <johnstul@us.ibm.com>
      LKML-Reference: <20091111134229.766673305@linutronix.de>
      7d2f944a
    • T
      clockevents: Use u32 for mult and shift factors · 23af368e
      Thomas Gleixner 提交于
      The mult and shift factors of clock events differ in their data type
      from those of clock sources for no reason. u32 is sufficient for
      both. shift is always <= 32 and mult is limited to 2^32-1 to avoid
      64bit multiplication overflows in the conversion.
      
      Preparatory patch for a generic mult/shift factor calculation
      function.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Tested-by: NMikael Pettersson <mikpe@it.uu.se>
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Acked-by: NLinus Walleij <linus.walleij@stericsson.com>
      Cc: John Stultz <johnstul@us.ibm.com>
      LKML-Reference: <20091111134229.725664788@linutronix.de>
      23af368e
  5. 05 11月, 2009 2 次提交
    • M
      nohz: Introduce arch_needs_cpu · 3c5d92a0
      Martin Schwidefsky 提交于
      Allow the architecture to request a normal jiffy tick when the system
      goes idle and tick_nohz_stop_sched_tick is called . On s390 the hook is
      used to prevent the system going fully idle if there has been an
      interrupt other than a clock comparator interrupt since the last wakeup.
      
      On s390 the HiperSockets response time for 1 connection ping-pong goes
      down from 42 to 34 microseconds. The CPU cost decreases by 27%.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      LKML-Reference: <20090929122533.402715150@de.ibm.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      3c5d92a0
    • M
      nohz: Reuse ktime in sub-functions of tick_check_idle. · eed3b9cf
      Martin Schwidefsky 提交于
      On a system with NOHZ=y tick_check_idle calls tick_nohz_stop_idle and
      tick_nohz_update_jiffies. Given the right conditions (ts->idle_active
      and/or ts->tick_stopped) both function get a time stamp with ktime_get.
      The same time stamp can be reused if both function require one.
      
      On s390 this change has the additional benefit that gcc inlines the
      tick_nohz_stop_idle function into tick_check_idle. The number of
      instructions to execute tick_check_idle drops from 225 to 144
      (without the ktime_get optimization it is 367 vs 215 instructions).
      
      before:
      
       0)               |  tick_check_idle() {
       0)               |    tick_nohz_stop_idle() {
       0)               |      ktime_get() {
       0)               |        read_tod_clock() {
       0)   0.601 us    |        }
       0)   1.765 us    |      }
       0)   3.047 us    |    }
       0)               |    ktime_get() {
       0)               |      read_tod_clock() {
       0)   0.570 us    |      }
       0)   1.727 us    |    }
       0)               |    tick_do_update_jiffies64() {
       0)   0.609 us    |    }
       0)   8.055 us    |  }
      
      after:
      
       0)               |  tick_check_idle() {
       0)               |    ktime_get() {
       0)               |      read_tod_clock() {
       0)   0.617 us    |      }
       0)   1.773 us    |    }
       0)               |    tick_do_update_jiffies64() {
       0)   0.593 us    |    }
       0)   4.477 us    |  }
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: john stultz <johnstul@us.ibm.com>
      LKML-Reference: <20090929122533.206589318@de.ibm.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      eed3b9cf
  6. 05 10月, 2009 2 次提交
    • J
      time: Remove xtime_cache · 7bc7d637
      john stultz 提交于
      With the prior logarithmic time accumulation patch, xtime will now
      always be within one "tick" of the current time, instead of
      possibly half a second off.
      
      This removes the need for the xtime_cache value, which always
      stored the time at the last interrupt, so this patch cleans that up
      removing the xtime_cache related code.
      
      This is a bit simpler, but still could use some wider testing.
      Signed-off-by: NJohn Stultz <johnstul@us.ibm.com>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: NJohn Kacur <jkacur@redhat.com>
      Cc: Clark Williams <williams@redhat.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      LKML-Reference: <1254525855.7741.95.camel@localhost.localdomain>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      7bc7d637
    • J
      time: Implement logarithmic time accumulation · a092ff0f
      john stultz 提交于
      Accumulating one tick at a time works well unless we're using NOHZ.
      Then it can be an issue, since we may have to run through the loop
      a few thousand times, which can increase timer interrupt caused
      latency.
      
      The current solution was to accumulate in half-second intervals
      with NOHZ. This kept the number of loops down, however it did
      slightly change how we make NTP adjustments. While not an issue
      with NTPd users, as NTPd makes adjustments over a longer period of
      time, other adjtimex() users have noticed the half-second
      granularity with which we can apply frequency changes to the clock.
      
      For instance, if a application tries to apply a 100ppm frequency
      correction for 20ms to correct a 2us offset, with NOHZ they either
      get no correction, or a 50us correction.
      
      Now, there will always be some granularity error for applying
      frequency corrections. However with users sensitive to this error
      have seen a 50-500x increase with NOHZ compared to running without
      NOHZ.
      
      So I figured I'd try another approach then just simply increasing
      the interval. My approach is to consume the time interval
      logarithmically. This reduces the number of times through the loop
      needed keeping latency down, while still preserving the original
      granularity error for adjtimex() changes.
      
      Further, this change allows us to remove the xtime_cache code
      (patch to follow), as xtime is always within one tick of the
      current time, instead of the half-second updates it saw before.
      
      An earlier version of this patch has been shipping to x86 users in
      the RedHat MRG releases for awhile without issue, but I've reworked
      this version to be even more careful about avoiding possible
      overflows if the shift value gets too large.
      Signed-off-by: NJohn Stultz <johnstul@us.ibm.com>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: NJohn Kacur <jkacur@redhat.com>
      Cc: Clark Williams <williams@redhat.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      LKML-Reference: <1254525473.7741.88.camel@localhost.localdomain>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a092ff0f
  7. 04 10月, 2009 12 次提交
  8. 03 10月, 2009 10 次提交
    • E
      [PATCH] ext4: retry failed direct IO allocations · fbbf6945
      Eric Sandeen 提交于
      On a 256M filesystem, doing this in a loop:
      
              xfs_io -F -f -d -c 'pwrite 0 64m' test
              rm -f test
      
      eventually leads to ENOSPC.  (the xfs_io command does a
      64m direct IO write to the file "test")
      
      As with other block allocation callers, it looks like we need to
      potentially retry the allocations on the initial ENOSPC.
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      fbbf6945
    • C
      ext4: Fix build warning in ext4_dirty_inode() · 74072d0a
      Curt Wohlgemuth 提交于
      This fixes the following warning:
      
      fs/ext4/inode.c: In function 'ext4_dirty_inode':
      fs/ext4/inode.c:5615: warning: unused variable 'current_handle'
      
      We remove the jbd_debug() statement which does use current_handle, as
      it's not terribly important in the grand scheme of things.
      
      Thanks to Stephen Rothwell for pointing this out.
      Signed-off-by: NCurt Wohlgemuth <curtw@google.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      74072d0a
    • L
      Merge master.kernel.org:/home/rmk/linux-2.6-arm · a037a79d
      Linus Torvalds 提交于
      * master.kernel.org:/home/rmk/linux-2.6-arm: (25 commits)
        ARM: 5728/1: Proper prefetch abort handling on ARMv6 and ARMv7
        ARM: 5727/1: Pass IFSR register to do_PrefetchAbort()
        ARM: 5740/1: fix valid_phys_addr_range() range check
        ARM: 5739/1: ARM: allow empty ATAG_CORE
        ARM: 5735/1: sa1111: CodingStyle cleanups
        ARM: 5738/1: Correct TCM documentation
        ARM: 5734/1: arm: fix compilation of entry-common.S for older CPUs
        ARM: 5733/1: fix bcmring compile error
        ARM: 5732/1: remove redundant include file
        ARM: 5731/2: Fix U300 generic GPIO, remove ifdefs from MMCI v3
        ARM: Ensure do_cache_op takes mmap_sem
        ARM: Fix __cpuexit section mismatch warnings
        ARM: Don't allow highmem on SMP platforms without h/w TLB ops broadcast
        ARM: includecheck fix: mach-davinci, board-dm365-evm.c
        ARM: Remove unused CONFIG SA1100_H3XXX
        ARM: Fix warning: unused variable 'highmem'
        ARM: Fix warning: #warning syscall migrate_pages not implemented
        ARM: Fix SA11x0 clocksource warning
        ARM: Fix SA1100 Neponset serial section mismatch
        ARM: Fix SA1100 Assabet/Neponset PCMCIA section mismatch warnings
        ...
      a037a79d
    • K
      ARM: 5728/1: Proper prefetch abort handling on ARMv6 and ARMv7 · d25ef8b8
      Kirill A. Shutemov 提交于
      Currently, on ARMv6 and ARMv7, if an application tries to execute
      code (or garbage) on non-executable page it hangs. It caused by
      incorrect prefetch abort handling. Now every prefetch abort
      processes as a translation fault.
      
      To fix this we have to analyze instruction fault status register
      to figure out reason why we've got the abort and process it
      accordingly.
      
      To make IFSR different from DFSR we set bit 31 which is reserved in
      both IFSR and DFSR.
      
      This patch also tries to protect from future hangs on unexpected
      exceptions. An application will be killed if unexpected exception
      type was received.
      Signed-off-by: NKirill A. Shutemov <kirill@shutemov.name>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      d25ef8b8
    • K
      ARM: 5727/1: Pass IFSR register to do_PrefetchAbort() · 4fb28474
      Kirill A. Shutemov 提交于
      Instruction fault status register, IFSR, was introduced on ARMv6 to
      provide status information about the last insturction fault. It
      needed for proper prefetch abort handling.
      
      Now we have three prefetch abort model:
      
        * legacy - for CPUs before ARMv6. They doesn't provide neither
          IFSR nor IFAR. We simulate IFSR with section translation fault
          status for them to generalize code;
        * ARMv6 - provides IFSR, but not IFAR;
        * ARMv7 - provides both IFSR and IFAR.
      Signed-off-by: NKirill A. Shutemov <kirill@shutemov.name>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      4fb28474
    • G
      ARM: 5740/1: fix valid_phys_addr_range() range check · 6806bfe1
      Greg Ungerer 提交于
      Commit 1522ac3e
      ("Fix virtual to physical translation macro corner cases")
      breaks the end of memory check in valid_phys_addr_range().
      The modified expression results in the apparent /dev/mem size
      being 2 bytes smaller than what it actually is.
      
      This patch reworks the expression to correctly check the address,
      while maintaining use of a valid address to __pa().
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      6806bfe1
    • D
      ARM: 5739/1: ARM: allow empty ATAG_CORE · 31abdb74
      David Brown 提交于
      From: David Brown <davidb@quicinc.com>
      
      The ATAG_CORE is allowed to be empty.  Although this is handled
      by parse_tag_core(), __vet_atags during startup rejects this tag
      unless it contains data.  Allow the initial tag to be either the
      full size, or empty.
      Signed-off-by: NDavid Brown <davidb@quicinc.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      31abdb74
    • H
      ARM: 5735/1: sa1111: CodingStyle cleanups · 0a4bc5e8
      Hartley Sweeten 提交于
      EXPORT_* macros should follow immediately after the closing function
      brace line.
      Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
      Acked-by: NKristoffer Ericson <kristoffer.ericson@gmail.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      0a4bc5e8
    • R
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/xscaleiop · 534d0c92
      Russell King 提交于
      Conflicts:
      	MAINTAINERS
      534d0c92
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · 90d5ffc7
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (46 commits)
        cnic: Fix NETDEV_UP event processing.
        uvesafb/connector: Disallow unpliviged users to send netlink packets
        pohmelfs/connector: Disallow unpliviged users to configure pohmelfs
        dst/connector: Disallow unpliviged users to configure dst
        dm/connector: Only process connector packages from privileged processes
        connector: Removed the destruct_data callback since it is always kfree_skb()
        connector/dm: Fixed a compilation warning
        connector: Provide the sender's credentials to the callback
        connector: Keep the skb in cn_callback_data
        e1000e/igb/ixgbe: Don't report an error if devices don't support AER
        net: Fix wrong sizeof
        net: splice() from tcp to pipe should take into account O_NONBLOCK
        net: Use sk_mark for routing lookup in more places
        sky2: irqname based on pci address
        skge: use unique IRQ name
        IPv4 TCP fails to send window scale option when window scale is zero
        net/ipv4/tcp.c: fix min() type mismatch warning
        Kconfig: STRIP: Remove stale bits of STRIP help text
        NET: mkiss: Fix typo
        tg3: Remove prev_vlan_tag from struct tx_ring_info
        ...
      90d5ffc7