1. 29 1月, 2009 7 次提交
  2. 28 1月, 2009 2 次提交
  3. 27 1月, 2009 16 次提交
  4. 26 1月, 2009 6 次提交
    • R
      x86: fix section mismatch warning · 659d2618
      Rakib Mullick 提交于
      Here function vmi_activate calls a init function activate_vmi , which
      causes the following section mismatch warnings:
      
        LD      arch/x86/kernel/built-in.o
      WARNING: arch/x86/kernel/built-in.o(.text+0x13ba9): Section mismatch
      in reference from the function vmi_activate() to the function
      .init.text:vmi_time_init()
      The function vmi_activate() references
      the function __init vmi_time_init().
      This is often because vmi_activate lacks a __init
      annotation or the annotation of vmi_time_init is wrong.
      
      WARNING: arch/x86/kernel/built-in.o(.text+0x13bd1): Section mismatch
      in reference from the function vmi_activate() to the function
      .devinit.text:vmi_time_bsp_init()
      The function vmi_activate() references
      the function __devinit vmi_time_bsp_init().
      This is often because vmi_activate lacks a __devinit
      annotation or the annotation of vmi_time_bsp_init is wrong.
      
      WARNING: arch/x86/kernel/built-in.o(.text+0x13bdb): Section mismatch
      in reference from the function vmi_activate() to the function
      .devinit.text:vmi_time_ap_init()
      The function vmi_activate() references
      the function __devinit vmi_time_ap_init().
      This is often because vmi_activate lacks a __devinit
      annotation or the annotation of vmi_time_ap_init is wrong.
      
      Fix it by marking vmi_activate() as __init too.
      Signed-off-by: NRakib Mullick <rakib.mullick@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      659d2618
    • I
      x86: improve early fault/irq printout · d5e397cb
      Ingo Molnar 提交于
      Impact: add a stack dump to early IRQs/faults
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d5e397cb
    • I
      x86, debug: remove early_printk() #ifdefs from head_32.S · 34707bcd
      Ingo Molnar 提交于
      Impact: cleanup
      
      Remove such constructs:
      
       #ifdef CONFIG_EARLY_PRINTK
              call early_printk
       #else
              call printk
       #endif
      
      Not only are they ugly, they are also pointless: a call to printk()
      maps to early_printk during early bootup anyway, if CONFIG_EARLY_PRINTK
      is enabled.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      34707bcd
    • F
      x86: micro-optimize __raw_read_trylock() · 2d4d57db
      Frederic Weisbecker 提交于
      The current version of __raw_read_trylock starts with decrementing the lock
      and read its new value as a separate operation after that.
      
      That makes 3 dereferences (read, write (after sub), read) whereas
      a single atomic_dec_return does only two pointers dereferences (read, write).
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      2d4d57db
    • I
      x86: unmask CPUID levels on Intel CPUs, fix · 99fb4d34
      Ingo Molnar 提交于
      Impact: fix boot hang on pre-model-15 Intel CPUs
      
      rdmsrl_safe() does not work in very early bootup code yet, because we
      dont have the pagefault handler installed yet so exception section
      does not get parsed. rdmsr_safe() will just crash and hang the bootup.
      
      So limit the MSR_IA32_MISC_ENABLE MSR read to those CPU types that
      support it.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      99fb4d34
    • E
      x86: work around PAGE_KERNEL_WC not getting WC in iomap_atomic_prot_pfn. · ef5fa0ab
      Eric Anholt 提交于
      In the absence of PAT, PAGE_KERNEL_WC ends up mapping to a memory type that
      gets UC behavior even in the presence of a WC MTRR covering the area in
      question.  By swapping to PAGE_KERNEL_UC_MINUS, we can get the actual
      behavior the caller wanted (WC if you can manage it, UC otherwise).
      
      This recovers the 40% performance improvement of using WC in the DRM
      to upload vertex data.
      Signed-off-by: NEric Anholt <eric@anholt.net>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      ef5fa0ab
  5. 25 1月, 2009 1 次提交
    • I
      x86: use standard PIT frequency · e1b4d114
      Ingo Molnar 提交于
      the RDC and ELAN platforms use slighly different PIT clocks, resulting in
      a timex.h hack that changes PIT_TICK_RATE during build time. But if a
      tester enables any of these platform support .config options, the PIT
      will be miscalibrated on standard PC platforms.
      
      So use one frequency - in a subsequent patch we'll add a quirk to allow
      x86 platforms to define different PIT frequencies.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e1b4d114
  6. 24 1月, 2009 7 次提交
    • H
      x86: filter CPU features dependent on unavailable CPUID levels · b38b0665
      H. Peter Anvin 提交于
      Impact: Fixes potential crashes on misconfigured systems.
      
      Some CPU features require specific CPUID levels to be available in
      order to function, as they contain information about the operation of
      a specific feature.  However, some BIOSes and virtualization software
      provide the ability to mask CPUID levels in order to support legacy
      operating systems.  We try to enable such CPUID levels when we know
      how to do it, but for the remaining cases, filter out such CPU
      features when there is no way for us to support them.
      
      Do this in one place, in the CPUID code, with a table-driven approach.
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      b38b0665
    • H
      x86: handle PAT more like other CPU features · 75a04811
      H. Peter Anvin 提交于
      Impact: Cleanup
      
      When PAT was originally introduced, it was handled specially for a few
      reasons:
      
      - PAT bugs are hard to track down, so we wanted to maintain a
        whitelist of CPUs.
      - The i386 and x86-64 CPUID code was not yet unified.
      
      Both of these are now obsolete, so handle PAT like any other features,
      including ordinary feature blacklisting due to known bugs.
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      75a04811
    • H
      x86: clean up stray space in <asm/processor.h> · b1882e68
      H. Peter Anvin 提交于
      Impact: Whitespace cleanup only
      
      Clean up a stray space character in arch/x86/include/asm/processor.h.
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      b1882e68
    • H
      x86: ia32_signal: use {get|put}_user_try and catch · 3b4b7570
      Hiroshi Shimamoto 提交于
      Impact: use new framework
      
      Use {get|put}_user_try, catch, and _ex in arch/x86/ia32/ia32_signal.c.
      
      Note: this patch contains "WARNING: line over 80 characters", because when
      introducing new block I insert an indent to avoid mistakes by edit.
      Signed-off-by: NHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      3b4b7570
    • H
      x86: signal: use {get|put}_user_try and catch · 98e3d45e
      Hiroshi Shimamoto 提交于
      Impact: use new framework
      
      Use {get|put}_user_try, catch, and _ex in arch/x86/kernel/signal.c.
      
      Note: this patch contains "WARNING: line over 80 characters", because when
      introducing new block I insert an indent to avoid mistakes by edit.
      Signed-off-by: NHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      98e3d45e
    • H
      x86: uaccess: introduce try and catch framework · fe40c0af
      Hiroshi Shimamoto 提交于
      Impact: introduce new uaccess exception handling framework
      
      Introduce {get|put}_user_try and {get|put}_user_catch as new uaccess exception
      handling framework.
      {get|put}_user_try begins exception block and {get|put}_user_catch(err) ends
      the block and gets err if an exception occured in {get|put}_user_ex() in the
      block. The exception is stored thread_info->uaccess_err.
      
      The example usage of this framework is below;
      int func()
      {
      	int err = 0;
      
      	get_user_try {
      		get_user_ex(...);
      		get_user_ex(...);
      		:
      	} get_user_catch(err);
      
      	return err;
      }
      
      Note: get_user_ex() is not clear the value when an exception occurs, it's
      different from the behavior of __get_user(), but I think it doesn't matter.
      Signed-off-by: NHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      fe40c0af
    • P
      x86, mm: fix pte_free() · 42ef73fe
      Peter Zijlstra 提交于
      On -rt we were seeing spurious bad page states like:
      
      Bad page state in process 'firefox'
      page:c1bc2380 flags:0x40000000 mapping:c1bc2390 mapcount:0 count:0
      Trying to fix it up, but a reboot is needed
      Backtrace:
      Pid: 503, comm: firefox Not tainted 2.6.26.8-rt13 #3
      [<c043d0f3>] ? printk+0x14/0x19
      [<c0272d4e>] bad_page+0x4e/0x79
      [<c0273831>] free_hot_cold_page+0x5b/0x1d3
      [<c02739f6>] free_hot_page+0xf/0x11
      [<c0273a18>] __free_pages+0x20/0x2b
      [<c027d170>] __pte_alloc+0x87/0x91
      [<c027d25e>] handle_mm_fault+0xe4/0x733
      [<c043f680>] ? rt_mutex_down_read_trylock+0x57/0x63
      [<c043f680>] ? rt_mutex_down_read_trylock+0x57/0x63
      [<c0218875>] do_page_fault+0x36f/0x88a
      
      This is the case where a concurrent fault already installed the PTE and
      we get to free the newly allocated one.
      
      This is due to pgtable_page_ctor() doing the spin_lock_init(&page->ptl)
      which is overlaid with the {private, mapping} struct.
      
      union {
          struct {
              unsigned long private;
              struct address_space *mapping;
          };
          spinlock_t ptl;
          struct kmem_cache *slab;
          struct page *first_page;
      };
      
      Normally the spinlock is small enough to not stomp on page->mapping, but
      PREEMPT_RT=y has huge 'spin'locks.
      
      But lockdep kernels should also be able to trigger this splat, as the
      lock tracking code grows the spinlock to cover page->mapping.
      
      The obvious fix is calling pgtable_page_dtor() like the regular pte free
      path __pte_free_tlb() does.
      
      It seems all architectures except x86 and nm10300 already do this, and
      nm10300 doesn't seem to use pgtable_page_ctor(), which suggests it
      doesn't do SMP or simply doesnt do MMU at all or something.
      Signed-off-by: NPeter Zijlstra <a.p.zijlsta@chello.nl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Cc: <stable@kernel.org>
      42ef73fe
  7. 23 1月, 2009 1 次提交
    • I
      x86, xen: fix hardirq.h merge fallout · 99d0000f
      Ingo Molnar 提交于
      Impact: build fix
      
      This build error:
      
       arch/x86/xen/suspend.c:22: error: implicit declaration of function 'fix_to_virt'
       arch/x86/xen/suspend.c:22: error: 'FIX_PARAVIRT_BOOTMAP' undeclared (first use in this function)
       arch/x86/xen/suspend.c:22: error: (Each undeclared identifier is reported only once
       arch/x86/xen/suspend.c:22: error: for each function it appears in.)
      
      triggers because the hardirq.h unification removed an implicit fixmap.h
      include - on which arch/x86/xen/suspend.c depended. Add the fixmap.h
      include explicitly.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      99d0000f