1. 13 7月, 2007 1 次提交
  2. 07 7月, 2007 1 次提交
  3. 04 7月, 2007 1 次提交
  4. 02 7月, 2007 2 次提交
    • A
      i386: mtrr crash fix · 84288ad8
      Andrew Morton 提交于
      Commit 3ebad590 ("[PATCH] x86: Save and
      restore the fixed-range MTRRs of the BSP when suspending") added mtrr
      operations without verifying that the CPU has MTRRs.  Crashes transmeta
      CPUs.
      
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: <linux@horizon.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      84288ad8
    • L
      i386: remove bogus mtrr range check · 4710bcce
      Linus Torvalds 提交于
      Commit 9215da33 "fixed" the MTRR range
      check to not allow any MTRR's under the 1MB mark (since that's where the
      fixed MTRR's are active).
      
      However, that was totally bogus, since it's normal (and almost required)
      to have a large variable MTRR that starts at 0, and covers some large
      percentage of the whole RAM, and then using the fixed MTRR's to override
      that large MTRR to handle the special ISA hole in the 640k-1M region.
      
      The old check was bogus too (checking that no variable MTRR is used that
      is entirely under the 1MB range), but at least it wasn't actively
      detrimental, because no sane situation would ever trigger such MTRR
      usage in the first place.
      
      That said, the whole notion of not allowing variable MTRR's in the low
      1MB is just stupid, so rather than revert the commit, this just removes
      the whole sad and unnecessary check entirely.
      
      Cc: Jan Beulich <jbeulich@novell.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Tested-by: NLuca Palermo <darkmage@sabayonlinux.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4710bcce
  5. 29 6月, 2007 1 次提交
    • R
      mtrr/cyrix: fix sections · 80581c43
      Randy Dunlap 提交于
      main.c::mtrr_add() or mtrr_del() [exported]
      calls main.c::mtrr_add_page() or mtrr_del_page() or mtrr_restore() [resume]
      calls main.c::set_mtrr()
      calls main.c::ipi_handler()
      calls main.c::mtrr_if->set_all() == which can be cyrix_set_all
      
      WARNING: arch/i386/kernel/built-in.o(.text+0x8657): Section mismatch: reference to .init.data: (between 'cyrix_set_all' and 'centaur_get_free_region')
      WARNING: arch/i386/kernel/built-in.o(.text+0x866b): Section mismatch: reference to .init.data: (between 'cyrix_set_all' and 'centaur_get_free_region')
      WARNING: arch/i386/kernel/built-in.o(.text+0x867e): Section mismatch: reference to .init.data: (between 'cyrix_set_all' and 'centaur_get_free_region')
      WARNING: arch/i386/kernel/built-in.o(.text+0x8684): Section mismatch: reference to .init.data: (between 'cyrix_set_all' and 'centaur_get_free_region')
      WARNING: arch/i386/kernel/built-in.o(.text+0x868a): Section mismatch: reference to .init.data: (between 'cyrix_set_all' and 'centaur_get_free_region')
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      80581c43
  6. 21 6月, 2007 1 次提交
  7. 17 6月, 2007 3 次提交
  8. 05 6月, 2007 1 次提交
  9. 22 5月, 2007 3 次提交
    • B
      i386: fix PGE mask · 17304383
      Brian Gerst 提交于
      cr4 is a 32-bit register, so casting the mask to an unsigned char is wrong,
      as it clears more than the PGE bit.
      Signed-off-by: NBrian Gerst <bgerst@didntduck.org>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      17304383
    • A
      i386: Clear MCE flag on AMD K6 · c12ceb76
      Andi Kleen 提交于
      It reports machine check capability in CPUID, but doesn't actually
      implement all the necessary MSRs of the standard Intel machine
      check architecture.
      
      This fixes a boot failure on K6s recently introduced.
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c12ceb76
    • A
      Detach sched.h from mm.h · e8edc6e0
      Alexey Dobriyan 提交于
      First thing mm.h does is including sched.h solely for can_do_mlock() inline
      function which has "current" dereference inside. By dealing with can_do_mlock()
      mm.h can be detached from sched.h which is good. See below, why.
      
      This patch
      a) removes unconditional inclusion of sched.h from mm.h
      b) makes can_do_mlock() normal function in mm/mlock.c
      c) exports can_do_mlock() to not break compilation
      d) adds sched.h inclusions back to files that were getting it indirectly.
      e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were
         getting them indirectly
      
      Net result is:
      a) mm.h users would get less code to open, read, preprocess, parse, ... if
         they don't need sched.h
      b) sched.h stops being dependency for significant number of files:
         on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,
         after patch it's only 3744 (-8.3%).
      
      Cross-compile tested on
      
      	all arm defconfigs, all mips defconfigs, all powerpc defconfigs,
      	alpha alpha-up
      	arm
      	i386 i386-up i386-defconfig i386-allnoconfig
      	ia64 ia64-up
      	m68k
      	mips
      	parisc parisc-up
      	powerpc powerpc-up
      	s390 s390-up
      	sparc sparc-up
      	sparc64 sparc64-up
      	um-x86_64
      	x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig
      
      as well as my two usual configs.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e8edc6e0
  10. 17 5月, 2007 1 次提交
  11. 15 5月, 2007 1 次提交
  12. 14 5月, 2007 1 次提交
    • D
      [CPUFREQ] powernow-k7: fix MHz rounding issue with perflib · dc2585eb
      Daniel Drake 提交于
      When the PST tables are broken, powernow-k7 uses ACPI's processor_perflib to
      deduce the available frequency multipliers from the _PSS tables.
      
      Upon frequency change, processor_perflib performs some verification on the
      frequency (checks that it's within allowable bounds).
      
      powernow-k7 deals with absolute frequencies in KHz, whereas perflib only
      deals with MHz values. When performing the above verification, perflib
      multiplies the MHz values by 1000 to obtain the KHz value.
      
      We then end up with situations like the following:
       - powernow-k7 multiplies the multiplier by the FSB, and obtains a value
         such as 1266768 KHz
       - perflib belives the same state has frequency of 1266 MHz
       - acpi_processor_ppc_notifier calls cpufreq_verify_within_limits to verify
         that 1266768 is in the allowable range of 0 to 1266000 (i.e. 1266 * 1000)
       - it's not, so that frequency is rejected
       - the maximum CPU frequency is not reachable
      
      This patch solves the problem by rounding up the MHz values stored in perflib's
      tables. Additionally it corrects a broken URL.
      
      It also fixes http://bugzilla.kernel.org/show_bug.cgi?id=8255 although this
      case is a bit different: the frequencies in the _PSS tables are wildly wrong,
      but we get better results if we force ACPI to respect the fsb * multiplier
      calculations (even though it seems that the multiplier values aren't entirely
      correct either).
      Signed-off-by: NDaniel Drake <dsd@gentoo.org>
      Signed-off-by: NDave Jones <davej@redhat.com>
      dc2585eb
  13. 13 5月, 2007 1 次提交
  14. 10 5月, 2007 2 次提交
  15. 09 5月, 2007 1 次提交
  16. 03 5月, 2007 19 次提交
    • J
      PCI: Cleanup the includes of <linux/pci.h> · 6473d160
      Jean Delvare 提交于
      I noticed that many source files include <linux/pci.h> while they do
      not appear to need it. Here is an attempt to clean it all up.
      
      In order to find all possibly affected files, I searched for all
      files including <linux/pci.h> but without any other occurence of "pci"
      or "PCI". I removed the include statement from all of these, then I
      compiled an allmodconfig kernel on both i386 and x86_64 and fixed the
      false positives manually.
      
      My tests covered 66% of the affected files, so there could be false
      positives remaining. Untested files are:
      
      arch/alpha/kernel/err_common.c
      arch/alpha/kernel/err_ev6.c
      arch/alpha/kernel/err_ev7.c
      arch/ia64/sn/kernel/huberror.c
      arch/ia64/sn/kernel/xpnet.c
      arch/m68knommu/kernel/dma.c
      arch/mips/lib/iomap.c
      arch/powerpc/platforms/pseries/ras.c
      arch/ppc/8260_io/enet.c
      arch/ppc/8260_io/fcc_enet.c
      arch/ppc/8xx_io/enet.c
      arch/ppc/syslib/ppc4xx_sgdma.c
      arch/sh64/mach-cayman/iomap.c
      arch/xtensa/kernel/xtensa_ksyms.c
      arch/xtensa/platform-iss/setup.c
      drivers/i2c/busses/i2c-at91.c
      drivers/i2c/busses/i2c-mpc.c
      drivers/media/video/saa711x.c
      drivers/misc/hdpuftrs/hdpu_cpustate.c
      drivers/misc/hdpuftrs/hdpu_nexus.c
      drivers/net/au1000_eth.c
      drivers/net/fec_8xx/fec_main.c
      drivers/net/fec_8xx/fec_mii.c
      drivers/net/fs_enet/fs_enet-main.c
      drivers/net/fs_enet/mac-fcc.c
      drivers/net/fs_enet/mac-fec.c
      drivers/net/fs_enet/mac-scc.c
      drivers/net/fs_enet/mii-bitbang.c
      drivers/net/fs_enet/mii-fec.c
      drivers/net/ibm_emac/ibm_emac_core.c
      drivers/net/lasi_82596.c
      drivers/parisc/hppb.c
      drivers/sbus/sbus.c
      drivers/video/g364fb.c
      drivers/video/platinumfb.c
      drivers/video/stifb.c
      drivers/video/valkyriefb.c
      include/asm-arm/arch-ixp4xx/dma.h
      sound/oss/au1550_ac97.c
      
      I would welcome test reports for these files. I am fine with removing
      the untested files from the patch if the general opinion is that these
      changes aren't safe. The tested part would still be nice to have.
      
      Note that this patch depends on another header fixup patch I submitted
      to LKML yesterday:
        [PATCH] scatterlist.h needs types.h
        http://lkml.org/lkml/2007/3/01/141Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: Badari Pulavarty <pbadari@us.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6473d160
    • T
      [PATCH] i386: Don't delete cpu_devs data to identify different x86 types in late_initcall · 35060b6a
      Thomas Renninger 提交于
      In arch/i386/cpu/common.c there is:
      cpu_devs[X86_VENDOR_INTEL]
      cpu_devs[X86_VENDOR_CYRIX]
      cpu_devs[X86_VENDOR_AMD]
      ...
      They are all filled with data early.
      The data (struct) got set to NULL  for all, but Intel in different
      late_initcall (exit_cpu_vendor) calls.
      I don't see what sense this makes at all, maybe something that got
      forgotten with the HOTPLUG_CPU extenstions?
      
      Please check/review whether initdata, cpuinitdata is still ok and this
      still works with HOTPLUG_CPU and without, it should...
      Signed-off-by: NThomas Renninger <trenn@suse.de>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: davej@redhat.com
      35060b6a
    • A
      [PATCH] i386: Implement X86_FEATURE_SYNC_RDTSC on i386 · 3aefbe07
      Andi Kleen 提交于
      Syncs up with x86-64.
      Signed-off-by: NAndi Kleen <ak@suse.de>
      3aefbe07
    • A
      [PATCH] i386: Clean up NMI watchdog code · 09198e68
      Andi Kleen 提交于
      - Introduce a wd_ops structure
      - Convert the various nmi watchdogs over to it
      - This allows to split the perfctr reservation from the watchdog
      setup cleanly.
      - Do perfctr reservation globally as it should have always been
      - Remove dead code referenced only by unused EXPORT_SYMBOLs
      Signed-off-by: NAndi Kleen <ak@suse.de>
      09198e68
    • J
      [PATCH] i386: check capability · 2f3c30e6
      Joachim Deguara 提交于
      Currently the i386 architecture checks the family for mce capability and this
      removes that and uses the CPUID information.  Tested on a K8 revE and a
      family10h processor.
      
      This eliminates checking of a set AMD procesor family if mce is
      allowed and relies on the information being in CPUID.
      Signed-off-by: NJoachim Deguara <joachim.deguara@amd.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      2f3c30e6
    • R
      [PATCH] i386: fix mtrr sections · 25c16b99
      Randy Dunlap 提交于
      Fix section mismatch warnings in mtrr code.
      Fix line length on one source line.
      
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data: from .text.get_mtrr_state after 'get_mtrr_state' (at offset 0x103)
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.text: from .text.get_mtrr_state after 'get_mtrr_state' (at offset 0x180)
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.text: from .text.get_mtrr_state after 'get_mtrr_state' (at offset 0x199)
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.text: from .text.get_mtrr_state after 'get_mtrr_state' (at offset 0x1c1)
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      25c16b99
    • B
      [PATCH] i386: Enable support for fixed-range IORRs to keep RdMem & WrMem in sync · de938c51
      Bernhard Kaindl 提交于
      If our copy of the MTRRs of the BSP has RdMem or WrMem set, and
      we are running on an AMD64/K8 system, the boot CPU must have had
      MtrrFixDramEn and MtrrFixDramModEn set (otherwise our RDMSR would
      have copied these bits cleared), so we set them on this CPU as well.
      
      This allows us to keep the AMD64/K8 RdMem and WrMem bits in sync
      across the CPUs of SMP systems in order to fullfill the duty of
      system software to "initialize and maintain MTRR consistency
      across all processors." as written in the AMD and Intel manuals.
      
      If an WRMSR instruction fails because MtrrFixDramModEn is not
      set, I expect that also the Intel-style MTRR bits are not updated.
      
      AK: minor cleanup, moved MSR defines around
      Signed-off-by: NBernhard Kaindl <bk@suse.de>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Dave Jones <davej@codemonkey.org.uk>
      de938c51
    • B
      [PATCH] x86: Save the MTRRs of the BSP before booting an AP · 2b1f6278
      Bernhard Kaindl 提交于
      Applied fix by Andew Morton:
      http://lkml.org/lkml/2007/4/8/88 - Fix `make headers_check'.
      
      AMD and Intel x86 CPU manuals state that it is the responsibility of
      system software to initialize and maintain MTRR consistency across
      all processors in Multi-Processing Environments.
      
      Quote from page 188 of the AMD64 System Programming manual (Volume 2):
      
      7.6.5 MTRRs in Multi-Processing Environments
      
      "In multi-processing environments, the MTRRs located in all processors must
      characterize memory in the same way. Generally, this means that identical
      values are written to the MTRRs used by the processors." (short omission here)
      "Failure to do so may result in coherency violations or loss of atomicity.
      Processor implementations do not check the MTRR settings in other processors
      to ensure consistency. It is the responsibility of system software to
      initialize and maintain MTRR consistency across all processors."
      
      Current Linux MTRR code already implements the above in the case that the
      BIOS does not properly initialize MTRRs on the secondary processors,
      but the case where the fixed-range MTRRs of the boot processor are changed
      after Linux started to boot, before the initialsation of a secondary
      processor, is not handled yet.
      
      In this case, secondary processors are currently initialized by Linux
      with MTRRs which the boot processor had very early, when mtrr_bp_init()
      did run, but not with the MTRRs which the boot processor uses at the
      time when that secondary processors is actually booted,
      causing differing MTRR contents on the secondary processors.
      
      Such situation happens on Acer Ferrari 1000 and 5000 notebooks where the
      BIOS enables and sets AMD-specific IORR bits in the fixed-range MTRRs
      of the boot processor when it transitions the system into ACPI mode.
      The SMI handler of the BIOS does this in SMM, entered while Linux ACPI
      code runs acpi_enable().
      
      Other occasions where the SMI handler of the BIOS may change bits in
      the MTRRs could occur as well. To initialize newly booted secodary
      processors with the fixed-range MTRRs which the boot processor uses
      at that time, this patch saves the fixed-range MTRRs of the boot
      processor before new secondary processors are started. When the
      secondary processors run their Linux initialisation code, their
      fixed-range MTRRs will be updated with the saved fixed-range MTRRs.
      
      If CONFIG_MTRR is not set, we define mtrr_save_state
      as an empty statement because there is nothing to do.
      
      Possible TODOs:
      
      *) CPU-hotplugging outside of SMP suspend/resume is not yet tested
         with this patch.
      
      *) If, even in this case, an AP never runs i386/do_boot_cpu or x86_64/cpu_up,
         then the calls to mtrr_save_state() could be replaced by calls to
         mtrr_save_fixed_ranges(NULL) and  mtrr_save_state() would not be
         needed.
      
         That would need either verification of the CPU-hotplug code or
         at least a test on a >2 CPU machine.
      
      *) The MTRRs of other running processors are not yet checked at this
         time but it might be interesting to syncronize the MTTRs of all
         processors before booting. That would be an incremental patch,
         but of rather low priority since there is no machine known so
         far which would require this.
      
      AK: moved prototypes on x86-64 around to fix warnings
      Signed-off-by: NBernhard Kaindl <bk@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Dave Jones <davej@codemonkey.org.uk>
      2b1f6278
    • B
      [PATCH] x86: Adds mtrr_save_fixed_ranges() for use in two later patches. · 2b3b4835
      Bernhard Kaindl 提交于
      In this current implementation which is used in other patches,
      mtrr_save_fixed_ranges() accepts a dummy void pointer because
      in the current implementation of one of these patches, this
      function may be called from smp_call_function_single() which
      requires that this function takes a void pointer argument.
      
      This function calls get_fixed_ranges(), passing mtrr_state.fixed_ranges
      which is the element of the static struct which stores our current
      backup of the fixed-range MTRR values which all CPUs shall be
      using.
      
      Because  mtrr_save_fixed_ranges calls get_fixed_ranges after
      kernel initialisation time, __init needs to be removed from
      the declaration of get_fixed_ranges().
      
      If CONFIG_MTRR is not set, we define mtrr_save_fixed_ranges
      as an empty statement because there is nothing to do.
      
      AK: Moved prototypes for x86-64 around to fix warnings
      Signed-off-by: NBernhard Kaindl <bk@suse.de>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Dave Jones <davej@codemonkey.org.uk>
      2b3b4835
    • Z
      [PATCH] i386: Clean up arch/i386/kernel/cpu/mcheck/p4.c · 18420001
      Zachary Amsden 提交于
      No, just no.  You do not use goto to skip a code block.  You do not
      return an obvious variable from a singly-inlined function and give
      the function a return value.  You don't put unexplained comments
      about kmalloc in code which doesn't do dynamic allocation.  And
      you don't leave stray warnings around for no good reason.
      
      Also, when possible, it is better to use block scoped variables
      because gcc can sometime generate better code.
      Signed-off-by: NZachary Amsden <zach@vmware.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      18420001
    • J
      [PATCH] i386: Fix UP gdt bugs · c5413fbe
      Jeremy Fitzhardinge 提交于
      Fixes two problems with the GDT when compiling for uniprocessor:
       - There's no percpu segment, so trying to load its selector into %fs fails.
         Use a null selector instead.
       - The real gdt needs to be loaded at some point.  Do it in cpu_init().
      Signed-off-by: NChris Wright <chrisw@sous-sol.org>
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      c5413fbe
    • J
      [PATCH] i386: Convert PDA into the percpu section · 7c3576d2
      Jeremy Fitzhardinge 提交于
      Currently x86 (similar to x84-64) has a special per-cpu structure
      called "i386_pda" which can be easily and efficiently referenced via
      the %fs register.  An ELF section is more flexible than a structure,
      allowing any piece of code to use this area.  Indeed, such a section
      already exists: the per-cpu area.
      
      So this patch:
      (1) Removes the PDA and uses per-cpu variables for each current member.
      (2) Replaces the __KERNEL_PDA segment with __KERNEL_PERCPU.
      (3) Creates a per-cpu mirror of __per_cpu_offset called this_cpu_off, which
          can be used to calculate addresses for this CPU's variables.
      (4) Simplifies startup, because %fs doesn't need to be loaded with a
          special segment at early boot; it can be deferred until the first
          percpu area is allocated (or never for UP).
      
      The result is less code and one less x86-specific concept.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Andi Kleen <ak@suse.de>
      7c3576d2
    • J
      [PATCH] i386: Page-align the GDT · 7a61d35d
      Jeremy Fitzhardinge 提交于
      Xen wants a dedicated page for the GDT.  I believe VMI likes it too.
      lguest, KVM and native don't care.
      
      Simple transformation to page-aligned "struct gdt_page".
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Acked-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      7a61d35d
    • A
      [PATCH] i386: Enable bank 0 on non K7 Athlon · de90c5ce
      Andi Kleen 提交于
      As a bug workaround bank 0 on K7s is normally disabled, but no need
      to do that on other AMD CPUs.
      
      Cc: davej@redhat.com
      Signed-off-by: NAndi Kleen <ak@suse.de>
      de90c5ce
    • A
      [PATCH] x86: Don't use MWAIT on AMD Family 10 · f039b754
      Andi Kleen 提交于
      It doesn't put the CPU into deeper sleep states, so it's better to use the standard
      idle loop to save power. But allow to reenable it anyways for benchmarking.
      
      I also removed the obsolete idle=halt on i386
      
      Cc: andreas.herrmann@amd.com
      Signed-off-by: NAndi Kleen <ak@suse.de>
      f039b754
    • J
      [PATCH] i386: clean up identify_cpu · a6c4e076
      Jeremy Fitzhardinge 提交于
      identify_cpu() is used to identify both the boot CPU and secondary
      CPUs, but it performs some actions which only apply to the boot CPU.
      Those functions are therefore really __init functions, but because
      they're called by identify_cpu(), they must be marked __cpuinit.
      
      This patch splits identify_cpu() into identify_boot_cpu() and
      identify_secondary_cpu(), and calls the appropriate init functions
      from each.  Also, identify_boot_cpu() and all the functions it
      dominates are marked __init.
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      a6c4e076
    • J
      [PATCH] i386: Clean up asm-i386/bugs.h · 1353ebb4
      Jeremy Fitzhardinge 提交于
      Most of asm-i386/bugs.h is code which should be in a C file, so put it there.
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      1353ebb4
    • R
      [PATCH] i386: cleanup GDT Access · 4fbb5968
      Rusty Russell 提交于
      Now we have an explicit per-cpu GDT variable, we don't need to keep the
      descriptors around to use them to find the GDT: expose cpu_gdt directly.
      
      We could go further and make load_gdt() pack the descriptor for us, or even
      assume it means "load the current cpu's GDT" which is what it always does.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      4fbb5968
    • R
      [PATCH] i386: clean up cpu_init() · d2cbcc49
      Rusty Russell 提交于
      We now have cpu_init() and secondary_cpu_init() doing nothing but calling
      _cpu_init() with the same arguments.  Rename _cpu_init() to cpu_init() and use
      it as a replcement for secondary_cpu_init().
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      d2cbcc49