1. 22 8月, 2008 5 次提交
    • M
      x86: fix section mismatch warning - uv_cpu_init · c4bd1fda
      Marcin Slusarz 提交于
      WARNING: vmlinux.o(.cpuinit.text+0x3cc4): Section mismatch in reference from the function uv_cpu_init() to the function .init.text:uv_system_init()
      The function __cpuinit uv_cpu_init() references
      a function __init uv_system_init().
      If uv_system_init is only used by uv_cpu_init then
      annotate uv_system_init with a matching annotation.
      
      uv_system_init was ment to be called only once, so do it from codepath
      (native_smp_prepare_cpus) which is called once, right before activation
      of other cpus (smp_init).
      
      Note: old code relied on uv_node_to_blade being initialized to 0,
      but it'a not initialized from anywhere.
      Signed-off-by: NMarcin Slusarz <marcin.slusarz@gmail.com>
      Acked-by: NJack Steiner <steiner@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c4bd1fda
    • A
      x86: fix VMI for early params · 3a6ddd5f
      Alok Kataria 提交于
      while fixing a different bug i moved the call to vmi_init before
      early params could be parsed.
      
      This broke the vmi specific commandline parameters.
      Fix that, by moving vmi initialization after kernel has got a chance to
      parse early parameters.
      Signed-off-by: NAlok N Kataria <akataria@vmware.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3a6ddd5f
    • J
      x86: fix two modpost warnings in mm/init_64.c · 9482ac6e
      Jan Beulich 提交于
      early_io{re,un}map() are __init and hence can't be called from __meminit
      functions.
      Signed-off-by: NJan Beulich <jbeulich@novell.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      9482ac6e
    • J
      x86: fix 1:1 mapping init on 64-bit (memory hotplug case) · 8ae3a5a8
      Jan Beulich 提交于
      While I don't have a hotplug capable system at hand, I think two issues need
      fixing:
      
      - pud_phys (in kernel_physical_ampping_init()) would remain uninitialized in
        the after_bootmem case
      
      - the locking done just around phys_pmd_{init,update}() would leave out pgd
        updates, and it was needlessly covering code portions that do allocations
        (perhaps using a more friendly gfp value in alloc_low_page() would then be
        possible)
      Signed-off-by: NJan Beulich <jbeulich@novell.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8ae3a5a8
    • Y
      x86: work around MTRR mask setting · 38cc1c3d
      Yinghai Lu 提交于
      Joshua Hoblitt reported that only 3 GB of his 16 GB of RAM is
      usable. Booting with mtrr_show showed us the BIOS-initialized
      MTRR settings - which are all wrong.
      
      So the root cause is that the BIOS has not set the mask correctly:
      
      >               [    0.429971]  MSR00000200: 00000000d0000000
      >               [    0.433305]  MSR00000201: 0000000ff0000800
      > should be ==> [    0.433305]  MSR00000201: 0000003ff0000800
      >
      >               [    0.436638]  MSR00000202: 00000000e0000000
      >               [    0.439971]  MSR00000203: 0000000fe0000800
      > should be ==> [    0.439971]  MSR00000203: 0000003fe0000800
      >
      >               [    0.443304]  MSR00000204: 0000000000000006
      >               [    0.446637]  MSR00000205: 0000000c00000800
      > should be ==> [    0.446637]  MSR00000205: 0000003c00000800
      >
      >               [    0.449970]  MSR00000206: 0000000400000006
      >               [    0.453303]  MSR00000207: 0000000fe0000800
      > should be ==> [    0.453303]  MSR00000207: 0000003fe0000800
      >
      >               [    0.456636]  MSR00000208: 0000000420000006
      >               [    0.459970]  MSR00000209: 0000000ff0000800
      > should be ==> [    0.459970]  MSR00000209: 0000003ff0000800
      
      So detect this borkage and add the prefix 111.
      Signed-off-by: NYinghai Lu <yhlu.kernel@gmail.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      38cc1c3d
  2. 21 8月, 2008 9 次提交
  3. 20 8月, 2008 4 次提交
    • A
      x86: fix oprofile + hibernation badness · 80a8c9ff
      Andi Kleen 提交于
      Vegard Nossum reported oprofile + hibernation problems:
      
      > Now some warnings:
      >
      > ------------[ cut here ]------------
      > WARNING: at /uio/arkimedes/s29/vegardno/git-working/linux-2.6/kernel/smp.c:328 s
      > mp_call_function_mask+0x194/0x1a0()
      
      The usual problem: the suspend function when interrupts are
      already disabled calls smp_call_function which is not allowed with
      interrupt off. But at this point all the other CPUs should be already
      down anyways, so it should be enough to just drop that.
      
      This patch should fix that problem at least by fixing cpu hotplug&
      suspend support.
      
      [ mingo@elte.hu: fixed 5 coding style errors. ]
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Tested-by: NVegard Nossum <vegard.nossum@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      80a8c9ff
    • C
      x86, SGI UV: hardcode the TLB flush interrupt system vector · 99dd8713
      Cliff Wickman 提交于
      The UV TLB shootdown mechanism needs a system interrupt vector.
      
      Its vector had been hardcoded as 200, but needs to moved to the reserved
      system vector range so that it does not collide with some device vector.
      
      This is still temporary until dynamic system IRQ allocation is provided.
      But it will be needed when real UV hardware becomes available and runs 2.6.27.
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      99dd8713
    • V
      x86: fix Xorg startup/shutdown slowdown with PAT · 80c5e73d
      Venki Pallipadi 提交于
      Rene Herman reported significant Xorg startup/shutdown slowdown due
      to PAT. It turns out that the memtype list has thousands of entries.
      
      Add cached_entry to list add routine, in order to speed up the
      lookup for sequential reserve_memtype calls.
      Reported-by: NRene Herman <rene.herman@keyaccess.nl>
      Signed-off-by: NVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      80c5e73d
    • S
      x86: fix "kernel won't boot on a Cyrix MediaGXm (Geode)" · c6744955
      Samuel Sieb 提交于
      Cyrix MediaGXm/Cx5530 Unicorn Revision 1.19.3B has stopped
      booting starting at v2.6.22.
      
      The reason is this commit:
      
      > commit f25f64ed
      > Author: Juergen Beisert <juergen@kreuzholzen.de>
      > Date:   Sun Jul 22 11:12:38 2007 +0200
      >
      >     x86: Replace NSC/Cyrix specific chipset access macros by inlined functions.
      
      this commit activated a macro which was dormant before due to (buggy)
      macro side-effects.
      
      I've looked through various datasheets and found that the GXm and GXLV
      Geode processors don't have an incrementor.
      
      Remove the incrementor setup entirely.  As the incrementor value
      differs according to clock speed and we would hope that the BIOS
      configures it correctly, it is probably the right solution.
      
      Cc: <stable@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c6744955
  4. 19 8月, 2008 5 次提交
  5. 18 8月, 2008 17 次提交
    • D
      lockdep: fix spurious 'inconsistent lock state' warning · 6951b12a
      Dmitry Baryshkov 提交于
      Since f82b217e lockdep can output spurious
      warnings related to hwirqs due to hardirq_off shrinkage from int to bit-sized
      flag. Guard it with double negation to fix the warning.
      Signed-off-by: NDmitry Baryshkov <dbaryshkov@gmail.com>
      Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      6951b12a
    • A
      x86: fix build warnings in real mode code · 1b72691c
      Andi Kleen 提交于
      This recent patch
      
      commit c3965bd1
      Author: Paul Jackson <pj@sgi.com>
      Date:   Wed May 14 08:15:34 2008 -0700
      
          x86 boot: proper use of ARRAY_SIZE instead of repeated E820MAX constant
      
      caused these new warnings during a normal build:
      
      In file included from linux-2.6/arch/x86/boot/memory.c:17:
      linux-2.6/include/linux/log2.h: In function '__ilog2_u32':
      linux-2.6/include/linux/log2.h:34: warning: implicit declaration of function 'fls'
      linux-2.6/include/linux/log2.h: In function '__ilog2_u64':
      linux-2.6/include/linux/log2.h:42: warning: implicit declaration of function 'fls64'
      linux-2.6/include/linux/log2.h: In function '__roundup_pow_of_two ':
      linux-2.6/include/linux/log2.h:63: warning: implicit declaration of function 'fls_long'
      
      I tried to fix them in log2.h, but it's difficult because the real mode
      environment is completely different from a normal kernel environment. Instead
      define an own ARRAY_SIZE macro in boot.h, similar to the other private
      macros there.
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1b72691c
    • M
      x86, calgary: fix section mismatch warning - get_tce_space_from_tar · f7106662
      Marcin Slusarz 提交于
      WARNING: vmlinux.o(.text+0x27032): Section mismatch in reference from the function get_tce_space_from_tar() to the function .init.text:calgary_bus_has_devices()
      The function get_tce_space_from_tar() references
      the function __init calgary_bus_has_devices().
      This is often because get_tce_space_from_tar lacks a __init
      annotation or the annotation of calgary_bus_has_devices is wrong.
      
      get_tce_space_from_tar is called only from __init function (calgary_init)
      and calls __init function (calgary_bus_has_devices).
      So annotate it properly.
      Signed-off-by: NMarcin Slusarz <marcin.slusarz@gmail.com>
      Cc: Chandru Siddalingappa <chandru@in.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f7106662
    • M
      x86: silence section mismatch warning - get_local_pda · d19fbfdf
      Marcin Slusarz 提交于
      Take out part of get_local_pda referencing __init function (free_bootmem)
      to new (static) function marked as __ref. It's safe to do because free_bootmem
      is called before __init sections are dropped.
      
      WARNING: vmlinux.o(.cpuinit.text+0x3cd7): Section mismatch in reference from the function get_local_pda() to the function .init.text:free_bootmem()
      The function __cpuinit get_local_pda() references
      a function __init free_bootmem().
      If free_bootmem is only used by get_local_pda then
      annotate free_bootmem with a matching annotation.
      Signed-off-by: NMarcin Slusarz <marcin.slusarz@gmail.com>
      Cc: Mike Travis <travis@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d19fbfdf
    • M
      x86, percpu: silence section mismatch warnings related to EARLY_PER_CPU variables · c6a92a25
      Marcin Slusarz 提交于
      Quoting Mike Travis in "x86: cleanup early per cpu variables/accesses v4"
      (23ca4bba):
      
          The DEFINE macro defines the per_cpu variable as well as the early
          map and pointer.  It also initializes the per_cpu variable and map
          elements to "_initvalue".  The early_* macros provide access to
          the initial map (usually setup during system init) and the early
          pointer.  This pointer is initialized to point to the early map
          but is then NULL'ed when the actual per_cpu areas are setup.  After
          that the per_cpu variable is the correct access to the variable.
      
      As these variables are NULL'ed before __init sections are dropped
      (in setup_per_cpu_maps), they can be safely annotated as __ref.
      
      This change silences following section mismatch warnings:
      
      WARNING: vmlinux.o(.data+0x46c0): Section mismatch in reference from the variable x86_cpu_to_apicid_early_ptr to the variable .init.data:x86_cpu_to_apicid_early_map
      The variable x86_cpu_to_apicid_early_ptr references
      the variable __initdata x86_cpu_to_apicid_early_map
      If the reference is valid then annotate the
      variable with __init* (see linux/init.h) or name the variable:
      *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
      
      WARNING: vmlinux.o(.data+0x46c8): Section mismatch in reference from the variable x86_bios_cpu_apicid_early_ptr to the variable .init.data:x86_bios_cpu_apicid_early_map
      The variable x86_bios_cpu_apicid_early_ptr references
      the variable __initdata x86_bios_cpu_apicid_early_map
      If the reference is valid then annotate the
      variable with __init* (see linux/init.h) or name the variable:
      *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
      
      WARNING: vmlinux.o(.data+0x46d0): Section mismatch in reference from the variable x86_cpu_to_node_map_early_ptr to the variable .init.data:x86_cpu_to_node_map_early_map
      The variable x86_cpu_to_node_map_early_ptr references
      the variable __initdata x86_cpu_to_node_map_early_map
      If the reference is valid then annotate the
      variable with __init* (see linux/init.h) or name the variable:
      *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
      Signed-off-by: NMarcin Slusarz <marcin.slusarz@gmail.com>
      Cc: Mike Travis <travis@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c6a92a25
    • D
      x86: fix i486 suspend to disk CR4 oops · e532c06f
      David Fries 提交于
      arch/x86/power/cpu_32.c __save_processor_state calls read_cr4()
      only a i486 CPU doesn't have the CR4 register.  Trying to read it
      produces an invalid opcode oops during suspend to disk.
      
      Use the safe rc4 reading op instead. If the value to be written is
      zero the write is skipped.
      
      arch/x86/power/hibernate_asm_32.S
      done: swapped the use of %eax and %ecx to use jecxz for
      the zero test and jump over store to %cr4.
      restore_image: s/%ecx/%eax/ to be consistent with done:
      
      In addition to __save_processor_state, acpi_save_state_mem,
      efi_call_phys_prelog, and efi_call_phys_epilog had checks added
      (acpi restore was in assembly and already had a check for
      non-zero).  There were other reads and writes of CR4, but MCE and
      virtualization shouldn't be executed on a i486 anyway.
      Signed-off-by: NDavid Fries <david@fries.net>
      Acked-by: NH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e532c06f
    • M
      x86: mpparse.c: fix section mismatch warning · 39e00fe2
      Marcin Slusarz 提交于
      WARNING: vmlinux.o(.text+0x118f7): Section mismatch in reference from the function construct_ioapic_table() to the function .init.text:MP_bus_info()
      The function construct_ioapic_table() references
      the function __init MP_bus_info().
      This is often because construct_ioapic_table lacks a __init
      annotation or the annotation of MP_bus_info is wrong.
      
      construct_ioapic_table is called only from construct_default_ISA_mptable which is __init
      Signed-off-by: NMarcin Slusarz <marcin.slusarz@gmail.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      39e00fe2
    • M
      x86: mmconf: fix section mismatch warning · c72a5efe
      Marcin Slusarz 提交于
      WARNING: arch/x86/kernel/built-in.o(.cpuinit.text+0x1591): Section mismatch in reference from the function init_amd() to the function .init.text:check_enable_amd_mmconf_dmi()
      The function __cpuinit init_amd() references
      a function __init check_enable_amd_mmconf_dmi().
      If check_enable_amd_mmconf_dmi is only used by init_amd then
      annotate check_enable_amd_mmconf_dmi with a matching annotation.
      
      check_enable_amd_mmconf_dmi is only called from init_amd which is __cpuinit
      Signed-off-by: NMarcin Slusarz <marcin.slusarz@gmail.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c72a5efe
    • M
      x86: fix MP_processor_info section mismatch warning · 67d0c9eb
      Marcin Slusarz 提交于
      WARNING: arch/x86/kernel/built-in.o(.cpuinit.text+0x1fe7): Section mismatch in reference from the function MP_processor_info() to the variable .init.data:x86_quirks
      The function __cpuinit MP_processor_info() references
      a variable __initdata x86_quirks.
      If x86_quirks is only used by MP_processor_info then
      annotate x86_quirks with a matching annotation.
      
      MP_processor_info uses x86_quirks which is __init and is used only from
      smp_read_mpc and construct_default_ISA_mptable which are __init
      Signed-off-by: NMarcin Slusarz <marcin.slusarz@gmail.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      67d0c9eb
    • M
      x86, tsc: fix section mismatch warning · d554d9a4
      Marcin Slusarz 提交于
      WARNING: vmlinux.o(.text+0x7950): Section mismatch in reference from the function native_calibrate_tsc() to the function .init.text:tsc_read_refs()
      The function native_calibrate_tsc() references
      the function __init tsc_read_refs().
      This is often because native_calibrate_tsc lacks a __init
      annotation or the annotation of tsc_read_refs is wrong.
      
      tsc_read_refs is called from native_calibrate_tsc which is not __init
      and native_calibrate_tsc cannot be marked __init
      Signed-off-by: NMarcin Slusarz <marcin.slusarz@gmail.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d554d9a4
    • M
      x86: correct register constraints for 64-bit atomic operations · 3c3b5c3b
      Mathieu Desnoyers 提交于
      x86_64 add/sub atomic ops does not seems to accept integer values bigger
      than 32 bits as immediates. Intel's add/sub documentation specifies they
      have to be passed as registers.
      
      The only operations in the x86-64 architecture which accept arbitrary
      64-bit immediates is "movq" to any register; similarly, the only
      operation which accept arbitrary 64-bit displacement is "movabs" to or
      from al/ax/eax/rax.
      
      http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Machine-Constraints.html
      
      states :
      
      e
          32-bit signed integer constant, or a symbolic reference known to fit
          that range (for immediate operands in sign-extending x86-64
          instructions).
      Z
          32-bit unsigned integer constant, or a symbolic reference known to
          fit that range (for immediate operands in zero-extending x86-64
          instructions).
      
      Since add/sub does sign extension, using the "e" constraint seems appropriate.
      
      It applies to 2.6.27-rc, 2.6.26, 2.6.25...
      Signed-off-by: NMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3c3b5c3b
    • C
      powerpc: Use generic compat_sys_old_readdir · 50d0b176
      Christoph Hellwig 提交于
      Use the generic compat_sys_old_readdir instead of the powerpc one which
      is almost the same except for the almost complete lack of error
      handling.
      
      Note that we can't just use SYSCALL() in systbl.h because the native
      syscall is named old_readdir, not sys_old_readdir.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      50d0b176
    • P
      powerpc/kexec: Fix up KEXEC_CONTROL_CODE_SIZE missed during conversion · d9178f4c
      Paul Collins 提交于
      Commit 163f6876 missed one, resulting in
      the following compile error:
      
        AS      arch/powerpc/kernel/misc_32.o
      arch/powerpc/kernel/misc_32.S: Assembler messages:
      arch/powerpc/kernel/misc_32.S:902: Error: unsupported relocation against KEXEC_CONTROL_CODE_SIZE
      make[2]: *** [arch/powerpc/kernel/misc_32.o] Error 1
      make[1]: *** [arch/powerpc/kernel] Error 2
      make: *** [vmlinux] Error 2
      
      I grepped arch/ and found no further instances.
      Signed-off-by: NPaul Collins <paul@ondioline.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      d9178f4c
    • S
      powerpc: Remove dead module_find_bug code · b9754568
      Steven Rostedt 提交于
      Doing some various "make randconfig", I came across an error when
      CONFIG_BUG was not set:
      
      arch/powerpc/kernel/module.c: In function 'module_find_bug':
      arch/powerpc/kernel/module.c:111: error: increment of pointer to unknown structure
      arch/powerpc/kernel/module.c:111: error: arithmetic on pointer to an incomplete type
      arch/powerpc/kernel/module.c:112: error: dereferencing pointer to incomplete type
      
      Looking further into this, I found that module_find_bug, defined in
      powerpc arch code, is not called anywhere, so this just removes it.
      
      There is a static module_find_bug in lib/bug.c but that is a separate issue.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      b9754568
    • R
      powerpc: Add CMO enabled flag and paging space data to lparcfg · ac22429d
      Robert Jennings 提交于
      Add a field in lparcfg output to indicate whether the kernel is
      running on a dedicated or shared memory lpar.  Added fields to show
      the paging space pool IDs and the CMO page size.
      Submitted-by: NRobert Jennings <rcj@linux.vnet.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      ac22429d
    • B
      powerpc: Fix CMM page loaning on 64k page kernel with 4k hardware pages · 370e4587
      Brian King 提交于
      If the firmware page size used for collaborative memory overcommit
      is 4k, but the kernel is using 64k pages, the page loaning is currently
      broken as it only marks the first 4k page of each 64k page as loaned.
      This fixes this to iterate through each 4k page and mark them all as
      loaned/active.
      Signed-off-by: NBrian King <brking@linux.vnet.ibm.com>
      Signed-off-by: NRobert Jennings <rcj@linux.vnet.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      370e4587
    • R
      powerpc: Make CMO paging space pool ID and page size available · 81f14997
      Robert Jennings 提交于
      During platform setup, save off the primary/secondary paging space
      pool IDs and the page size.  Added accessors in hvcall.h for these
      variables.  This is needed for a subsequent fix.
      Submitted-by: NRobert Jennings <rcj@linux.vnet.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      81f14997