1. 05 10月, 2008 6 次提交
  2. 29 9月, 2008 9 次提交
  3. 11 9月, 2008 2 次提交
  4. 07 9月, 2008 8 次提交
  5. 06 9月, 2008 15 次提交
    • Y
      x86: move mtrr cpu cap setting early in early_init_xxxx · dd786dd1
      Yinghai Lu 提交于
      Krzysztof Helt found MTRR is not detected on k6-2
      
      root cause:
      	we moved mtrr_bp_init() early for mtrr trimming,
      and in early_detect we only read the CPU capability from cpuid,
      so some cpu doesn't have that bit in cpuid.
      
      So we need to add early_init_xxxx to preset those bit before mtrr_bp_init
      for those earlier cpus.
      
      this patch is for v2.6.27
      Reported-by: NKrzysztof Helt <krzysztof.h1@wp.pl>
      Signed-off-by: NYinghai Lu <yhlu.kernel@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      dd786dd1
    • K
      x86: delay early cpu initialization until cpuid is done · 12cf105c
      Krzysztof Helt 提交于
      Move early cpu initialization after cpu early get cap so the
      early cpu initialization can fix up cpu caps.
      Signed-off-by: NKrzysztof Helt <krzysztof.h1@wp.pl>
      Signed-off-by: NYinghai Lu <yhlu.kernel@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      12cf105c
    • D
      clocksource, acpi_pm.c: check for monotonicity · 4ab6a219
      Dominik Brodowski 提交于
      The current check for monotonicity is way too weak: Andreas Mohr reports (
      http://lkml.org/lkml/2008/8/10/77 ) that on one of his test systems the
      current check only triggers in 50% of all cases, leading to catastrophic
      timer behaviour.  To fix this issue, expand the check for monotonicity by
      doing ten consecutive tests instead of one.
      Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      4ab6a219
    • D
      clocksource, acpi_pm.c: use proper read function also in errata mode · dfdf748a
      Dominik Brodowski 提交于
      On all hardware (some Intel ICH4, PIIX4 and PIIX4E chipsets) affected by a
      hardware errata there's about a 4.2% chance that initialization of the
      ACPI PMTMR fails.  On those chipsets, we need to read out the timer value
      at least three times to get a correct result, for every once in a while
      (i.e.  within a 3 ns window every 69.8 ns) the read returns a bogus
      result.  During normal operation we work around this issue, but during
      initialization reading a bogus value may lead to -EINVAL even though the
      hardware is usable.
      
      Thanks to Andreas Mohr for spotting this issue.
      Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      dfdf748a
    • M
      ntp: fix calculation of the next jiffie to trigger RTC sync · 4ff4b9e1
      Maciej W. Rozycki 提交于
      We have a bug in the calculation of the next jiffie to trigger the RTC
      synchronisation.  The aim here is to run sync_cmos_clock() as close as
      possible to the middle of a second.  Which means we want this function to
      be called less than or equal to half a jiffie away from when now.tv_nsec
      equals 5e8 (500000000).
      
      If this is not the case for a given call to the function, for this purpose
      instead of updating the RTC we calculate the offset in nanoseconds to the
      next point in time where now.tv_nsec will be equal 5e8.  The calculated
      offset is then converted to jiffies as these are the unit used by the
      timer.
      
      Hovewer timespec_to_jiffies() used here uses a ceil()-type rounding mode,
      where the resulting value is rounded up.  As a result the range of
      now.tv_nsec when the timer will trigger is from 5e8 to 5e8 + TICK_NSEC
      rather than the desired 5e8 - TICK_NSEC / 2 to 5e8 + TICK_NSEC / 2.
      
      As a result if for example sync_cmos_clock() happens to be called at the
      time when now.tv_nsec is between 5e8 + TICK_NSEC / 2 and 5e8 to 5e8 +
      TICK_NSEC, it will simply be rescheduled HZ jiffies later, falling in the
      same range of now.tv_nsec again.  Similarly for cases offsetted by an
      integer multiple of TICK_NSEC.
      
      This change addresses the problem by subtracting TICK_NSEC / 2 from the
      nanosecond offset to the next point in time where now.tv_nsec will be
      equal 5e8, effectively shifting the following rounding in
      timespec_to_jiffies() so that it produces a rounded-to-nearest result.
      Signed-off-by: NMaciej W. Rozycki <macro@linux-mips.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      4ff4b9e1
    • T
      Fix CONFIG_AC97_BUS dependency · 8a656496
      Takashi Iwai 提交于
      CONFIG_AC97_BUS is used from both sound and ucb1400 drivers.
      The recent change in Kconfig introduced the exclusive dependency on
      CONFIG_SOUND, and disabled the ucb1400 build without sound.
      This patch makes CONFIG_AC97_BUS independent.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      Tested-by: NRandy Dunlap <randy.dunlap@oracle.com>
      8a656496
    • T
      x86: HPET: read back compare register before reading counter · 72d43d9b
      Thomas Gleixner 提交于
      After fixing the u32 thinko I sill had occasional hickups on ATI chipsets
      with small deltas. There seems to be a delay between writing the compare
      register and the transffer to the internal register which triggers the
      interrupt. Reading back the value makes sure, that it hit the internal
      match register befor we compare against the counter value.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      72d43d9b
    • T
      x86: HPET fix moronic 32/64bit thinko · f7676254
      Thomas Gleixner 提交于
      We use the HPET only in 32bit mode because:
      1) some HPETs are 32bit only
      2) on i386 there is no way to read/write the HPET atomic 64bit wide
      
      The HPET code unification done by the "moron of the year" did
      not take into account that unsigned long is different on 32 and
      64 bit.
      
      This thinko results in a possible endless loop in the clockevents
      code, when the return comparison fails due to the 64bit/332bit
      unawareness. 
      
      unsigned long cnt = (u32) hpet_read() + delta can wrap over 32bit.
      but the final compare will fail and return -ETIME causing endless
      loops.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      f7676254
    • T
      clockevents: broadcast fixup possible waiters · 7300711e
      Thomas Gleixner 提交于
      Until the C1E patches arrived there where no users of periodic broadcast
      before switching to oneshot mode. Now we need to trigger a possible
      waiter for a periodic broadcast when switching to oneshot mode.
      Otherwise we can starve them for ever.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      7300711e
    • H
      x86: use X86_FEATURE_NOPL in alternatives · f31d731e
      H. Peter Anvin 提交于
      Use X86_FEATURE_NOPL to determine if it is safe to use P6 NOPs in
      alternatives.  Also, replace table and loop with simple if statement.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      f31d731e
    • H
      x86: add NOPL as a synthetic CPU feature bit · b6734c35
      H. Peter Anvin 提交于
      The long noops ("NOPL") are supposed to be detected by family >= 6.
      Unfortunately, several non-Intel x86 implementations, both hardware
      and software, don't obey this dictum.  Instead, probe for NOPL
      directly by executing a NOPL instruction and see if we get #UD.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      b6734c35
    • H
      x86: boot: stub out unimplemented CPU feature words · b74b06c5
      H. Peter Anvin 提交于
      The CPU feature detection code in the boot code is somewhat minimal,
      and doesn't include all possible CPUID words.  In particular, it
      doesn't contain the code for CPU feature words 2 (Transmeta),
      3 (Linux-specific), 5 (VIA), or 7 (scattered).  Zero them out, so we
      can still set those bits as known at compile time; in particular, this
      allows creating a Linux-specific NOPL flag and have it required (and
      therefore resolvable at compile time) in 64-bit mode.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      b74b06c5
    • A
      drivers/mmc/card/block.c: fix refcount leak in mmc_block_open() · 70bb0896
      Andrew Morton 提交于
      mmc_block_open() increments md->usage although it returns with -EROFS when
      default mounting a MMC/SD card with write protect switch on.  This
      reference counting bug prevents /dev/mmcblkX from being released on card
      removal, and situation worsen with reinsertion until the minor number
      range runs out.
      
      Reported-by: <sasin@solomon-systech.com>
      Acked-by: NPierre Ossman <drzeus-list@drzeus.cx>
      Cc: <stable@kernel.org>		[2.6.25.x, 2.6.26.x]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      70bb0896
    • R
      tracehook: comment pasto fixes · 22f30168
      Roland McGrath 提交于
      Fix some pasto's in comments in the new linux/tracehook.h and
      asm-generic/syscall.h files.
      Reported-by: NWenji Huang <wenji.huang@oracle.com>
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      22f30168
    • S
      atmel_lcdfb: fix oops in rmmod when framebuffer fails to register · 34a35bdd
      Stanislaw Gruszka 提交于
      If framebuffer registration failed in platform driver ->probe() callback,
      dev_get_drvdata() points to freed memory region, but ->remove() function
      try to use it and the following oops occurs:
      
      Unable to handle kernel NULL pointer dereference at virtual address 00000228
      pgd = c3a20000
      [00000228] *pgd=23a2b031, *pte=00000000, *ppte=00000000
      Internal error: Oops: 17 [#1]
      Modules linked in: atmel_lcdfb(-) cfbcopyarea cfbimgblt cfbfillrect [last unloaded: atmel_lcdfb]
      CPU: 0    Not tainted  (2.6.27-rc2 #116)
      PC is at atmel_lcdfb_remove+0x14/0xf8 [atmel_lcdfb]
      LR is at platform_drv_remove+0x20/0x24
      pc : [<bf006bc4>]    lr : [<c0157d28>]    psr: a0000013
      sp : c3a45e84  ip : c3a45ea0  fp : c3a45e9c
      r10: 00000002  r9 : c3a44000  r8 : c0026c04
      r7 : 00000880  r6 : c02bb228  r5 : 00000000  r4 : c02bb230
      r3 : bf007e3c  r2 : c02bb230  r1 : 00000004  r0 : c02bb228
      Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
      Control: 0005317f  Table: 23a20000  DAC: 00000015
      Process rmmod (pid: 6799, stack limit = 0xc3a44260)
      Stack: (0xc3a45e84 to 0xc3a46000)
      5e80:          c02bb230 bf007e3c bf007e3c c3a45eac c3a45ea0 c0157d28 bf006bc0
      5ea0: c3a45ec4 c3a45eb0 c0156d20 c0157d18 c02bb230 c02bb2d8 c3a45ee0 c3a45ec8
      5ec0: c0156da8 c0156cb8 bf007e3c bf007ee0 c02c8e14 c3a45efc c3a45ee4 c0156018
      5ee0: c0156d50 bf007e3c bf007ee0 00000000 c3a45f18 c3a45f00 c0157220 c0155f9c
      5f00: 00000000 bf007ee0 bf008000 c3a45f28 c3a45f1c c0157e34 c01571ec c3a45f38
      5f20: c3a45f2c bf006ba8 c0157e30 c3a45fa4 c3a45f3c c005772c bf006ba4 656d7461
      5f40: 636c5f6c 00626664 c004c988 c3a45f80 c3a45f5c 00000000 c3a45fb0 00000000
      5f60: ffffffff becaccd8 00000880 00000000 000a5e80 00000001 bf007ee0 00000880
      5f80: c3a45f84 00000000 becaccd4 00000002 000003df 00000081 00000000 c3a45fa8
      5fa0: c0026a60 c0057584 00000002 000003df 00900081 000a5e80 00000880 00000000
      5fc0: becaccd4 00000002 000003df 00000000 000a5e80 00000001 00000002 0000005f
      5fe0: 4004f5ec becacbe8 0001a158 4004f5fc 20000010 00900081 f9ffbadf 7bbfb2bb
      Backtrace:
      [<bf006bb0>] (atmel_lcdfb_remove+0x0/0xf8 [atmel_lcdfb]) from [<c0157d28>] (platform_drv_remove+0x20/0x24)
       r6:bf007e3c r5:bf007e3c r4:c02bb230
      [<c0157d08>] (platform_drv_remove+0x0/0x24) from [<c0156d20>] (__device_release_driver+0x78/0x98)
      [<c0156ca8>] (__device_release_driver+0x0/0x98) from [<c0156da8>] (driver_detach+0x68/0x90)
       r5:c02bb2d8 r4:c02bb230
      [<c0156d40>] (driver_detach+0x0/0x90) from [<c0156018>] (bus_remove_driver+0x8c/0xb4)
       r6:c02c8e14 r5:bf007ee0 r4:bf007e3c
      [<c0155f8c>] (bus_remove_driver+0x0/0xb4) from [<c0157220>] (driver_unregister+0x44/0x48)
       r6:00000000 r5:bf007ee0 r4:bf007e3c
      [<c01571dc>] (driver_unregister+0x0/0x48) from [<c0157e34>] (platform_driver_unregister+0x14/0x18)
       r6:bf008000 r5:bf007ee0 r4:00000000
      [<c0157e20>] (platform_driver_unregister+0x0/0x18) from [<bf006ba8>] (atmel_lcdfb_exit+0x14/0x1c [atmel_lcdfb])
      [<bf006b94>] (atmel_lcdfb_exit+0x0/0x1c [atmel_lcdfb]) from [<c005772c>] (sys_delete_module+0x1b8/0x22c)
      [<c0057574>] (sys_delete_module+0x0/0x22c) from [<c0026a60>] (ret_fast_syscall+0x0/0x2c)
       r7:00000081 r6:000003df r5:00000002 r4:becaccd4
      Code: e92dd870 e24cb004 e59050c4 e1a06000 (e5954228)
      ---[ end trace 85476b184d9e68d8 ]---
      
      This patch fixes the oops.
      Signed-off-by: NStanislaw Gruszka <stf_xl@wp.pl>
      Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com>
      Acked-by: NKrzysztof Helt <krzysztof.h1@wp.pl>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      34a35bdd