1. 05 9月, 2009 1 次提交
    • H
      x86, msr: change msr-reg.o to obj-y, and export its symbols · b19ae399
      H. Peter Anvin 提交于
      Change msr-reg.o to obj-y (it will be included in virtually every
      kernel since it is used by the initialization code for AMD processors)
      and add a separate C file to export its symbols to modules, so that
      msr.ko can use them; on uniprocessors we bypass the helper functions
      in msr.o and use the accessor functions directly via inlines.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      LKML-Reference: <20090904140834.GA15789@elte.hu>
      Cc: Borislav Petkov <petkovbb@googlemail.com>
      b19ae399
  2. 04 9月, 2009 6 次提交
    • Y
      x86: Use hard_smp_processor_id() to get apic id for AMD K8 cpus · 0d96b9ff
      Yinghai Lu 提交于
      Otherwise, system with apci id lifting will have wrong apicid in
      /proc/cpuinfo.
      
      and use that in srat_detect_node().
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
      Cc: Suresh Siddha <suresh.b.siddha@intel.com>
      Cc: Cyrill Gorcunov <gorcunov@openvz.org>
      LKML-Reference: <4A998CCA.1040407@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0d96b9ff
    • A
      x86, sched: Workaround broken sched domain creation for AMD Magny-Cours · 5a925b42
      Andreas Herrmann 提交于
      Current sched domain creation code can't handle multi-node processors.
      When switching to power_savings scheduling errors show up and
      system might hang later on (due to broken sched domain hierarchy):
      
        # echo 0  >> /sys/devices/system/cpu/sched_mc_power_savings
        CPU0 attaching sched-domain:
         domain 0: span 0-5 level MC
          groups: 0 1 2 3 4 5
          domain 1: span 0-23 level NODE
           groups: 0-5 6-11 18-23 12-17
        ...
        # echo 1  >> /sys/devices/system/cpu/sched_mc_power_savings
        CPU0 attaching sched-domain:
         domain 0: span 0-11 level MC
          groups: 0 1 2 3 4 5 6 7 8 9 10 11
        ERROR: parent span is not a superset of domain->span
          domain 1: span 0-5 level CPU
        ERROR: domain->groups does not contain CPU0
           groups: 6-11 (__cpu_power = 12288)
        ERROR: groups don't span domain->span
           domain 2: span 0-23 level NODE
            groups:
        ERROR: domain->cpu_power not set
      
        ERROR: groups don't span domain->span
        ...
      
      Fixing all aspects of power-savings scheduling for Magny-Cours needs
      some larger changes in the sched domain creation code.
      
      As a short-term and temporary workaround avoid the problems by
      extending "the worst possible hack" ;-(
      and always use llc_shared_map on AMD Magny-Cours when MC domain span
      is calculated.
      
      With this I get:
      
        # echo 1  >> /sys/devices/system/cpu/sched_mc_power_savings
        CPU0 attaching sched-domain:
         domain 0: span 0-5 level MC
          groups: 0 1 2 3 4 5
          domain 1: span 0-5 level CPU
           groups: 0-5 (__cpu_power = 6144)
           domain 2: span 0-23 level NODE
            groups: 0-5 (__cpu_power = 6144) 6-11 (__cpu_power = 6144) 18-23 (__cpu_power = 6144) 12-17 (__cpu_power = 6144)
        ...
      
      I.e. no errors during sched domain creation, no system hangs, and also
      mc_power_savings scheduling works to a certain extend.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NAndreas Herrmann <andreas.herrmann3@amd.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      5a925b42
    • A
      x86, mcheck: Use correct cpumask for shared bank4 · cb9805ab
      Andreas Herrmann 提交于
      This fixes threshold_bank4 support on multi-node processors.
      
      The correct mask to use is llc_shared_map, representing an internal
      node on Magny-Cours.
      
      We need to create 2 sets of symlinks for sibling shared banks -- one
      set for each internal node, symlinks of each set should target the
      first core on same internal node.
      
      Currently only one set is created where all symlinks are targeting
      the first core of the entire socket.
      Signed-off-by: NAndreas Herrmann <andreas.herrmann3@amd.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      cb9805ab
    • A
      x86, cacheinfo: Fixup L3 cache information for AMD multi-node processors · a326e948
      Andreas Herrmann 提交于
      L3 cache size, associativity and shared_cpu information need to be
      adapted to show information for an internal node instead of the
      entire physical package.
      Signed-off-by: NAndreas Herrmann <andreas.herrmann3@amd.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      a326e948
    • A
      x86: Fix CPU llc_shared_map information for AMD Magny-Cours · 4a376ec3
      Andreas Herrmann 提交于
      Construct entire NodeID and use it as cpu_llc_id. Thus internal node
      siblings are stored in llc_shared_map.
      Signed-off-by: NAndreas Herrmann <andreas.herrmann3@amd.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      4a376ec3
    • I
      x86, msr: Fix msr-reg.S compilation with gas 2.16.1, on 32-bit too · 8adf65cf
      Ingo Molnar 提交于
      The macro was defined in the 32-bit path as well - breaking the
      build on 32-bit platforms:
      
        arch/x86/lib/msr-reg.S: Assembler messages:
        arch/x86/lib/msr-reg.S:53: Error: Bad macro parameter list
        arch/x86/lib/msr-reg.S:100: Error: invalid character '_' in mnemonic
        arch/x86/lib/msr-reg.S:101: Error: invalid character '_' in mnemonic
      
      Cc: Borislav Petkov <petkovbb@googlemail.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      LKML-Reference: <tip-f6909f39@git.kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8adf65cf
  3. 02 9月, 2009 2 次提交
    • H
      x86: Move kernel_fpu_using to irq_fpu_usable in asm/i387.h · ae4b688d
      Huang Ying 提交于
      This function measures whether the FPU/SSE state can be touched in
      interrupt context. If the interrupted code is in user space or has no
      valid FPU/SSE context (CR0.TS == 1), FPU/SSE state can be used in IRQ
      or soft_irq context too.
      
      This is used by AES-NI accelerated AES implementation and PCLMULQDQ
      accelerated GHASH implementation.
      
      v3:
       - Renamed to irq_fpu_usable to reflect the purpose of the function.
      
      v2:
       - Renamed to irq_is_fpu_using to reflect the real situation.
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      CC: H. Peter Anvin <hpa@zytor.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      ae4b688d
    • H
      x86, msr: fix msr-reg.S compilation with gas 2.16.1 · f6909f39
      H. Peter Anvin 提交于
      msr-reg.S used the :req option on a macro argument, which wasn't
      supported by gas 2.16.1 (but apparently by some earlier versions of
      gas, just to be confusing.)  It isn't necessary, so just remove it.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Cc: Borislav Petkov <petkovbb@googlemail.com>
      f6909f39
  4. 01 9月, 2009 9 次提交
  5. 23 8月, 2009 1 次提交
  6. 22 8月, 2009 2 次提交
    • L
      x86: don't call '->send_IPI_mask()' with an empty mask · b04e6373
      Linus Torvalds 提交于
      As noted in 83d349f3 ("x86: don't send
      an IPI to the empty set of CPU's"), some APIC's will be very unhappy
      with an empty destination mask.  That commit added a WARN_ON() for that
      case, and avoided the resulting problem, but didn't fix the underlying
      reason for why those empty mask cases happened.
      
      This fixes that, by checking the result of 'cpumask_andnot()' of the
      current CPU actually has any other CPU's left in the set of CPU's to be
      sent a TLB flush, and not calling down to the IPI code if the mask is
      empty.
      
      The reason this started happening at all is that we started passing just
      the CPU mask pointers around in commit 4595f962 ("x86: change
      flush_tlb_others to take a const struct cpumask"), and when we did that,
      the cpumask was no longer thread-local.
      
      Before that commit, flush_tlb_mm() used to create it's own copy of
      'mm->cpu_vm_mask' and pass that copy down to the low-level flush
      routines after having tested that it was not empty.  But after changing
      it to just pass down the CPU mask pointer, the lower level TLB flush
      routines would now get a pointer to that 'mm->cpu_vm_mask', and that
      could still change - and become empty - after the test due to other
      CPU's having flushed their own TLB's.
      
      See
      
      	http://bugzilla.kernel.org/show_bug.cgi?id=13933
      
      for details.
      Tested-by: NThomas Björnell <thomas.bjornell@gmail.com>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b04e6373
    • L
      x86: don't send an IPI to the empty set of CPU's · 83d349f3
      Linus Torvalds 提交于
      The default_send_IPI_mask_logical() function uses the "flat" APIC mode
      to send an IPI to a set of CPU's at once, but if that set happens to be
      empty, some older local APIC's will apparently be rather unhappy.  So
      just warn if a caller gives us an empty mask, and ignore it.
      
      This fixes a regression in 2.6.30.x, due to commit 4595f962 ("x86:
      change flush_tlb_others to take a const struct cpumask"), documented
      here:
      
      	http://bugzilla.kernel.org/show_bug.cgi?id=13933
      
      which causes a silent lock-up.  It only seems to happen on PPro, P2, P3
      and Athlon XP cores.  Most developers sadly (or not so sadly, if you're
      a developer..) have more modern CPU's.  Also, on x86-64 we don't use the
      flat APIC mode, so it would never trigger there even if the APIC didn't
      like sending an empty IPI mask.
      Reported-by: NPavel Vilim <wylda@volny.cz>
      Reported-and-tested-by: NThomas Björnell <thomas.bjornell@gmail.com>
      Reported-and-tested-by: NMartin Rogge <marogge@onlinehome.de>
      Cc: Mike Travis <travis@sgi.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      83d349f3
  7. 18 8月, 2009 6 次提交
  8. 17 8月, 2009 3 次提交
    • I
      x86, mce: Don't initialize MCEs on unknown CPUs · e412cd25
      Ingo Molnar 提交于
      An older test-box started hanging at the following point during
      bootup:
      
       [    0.022996] Mount-cache hash table entries: 512
       [    0.024996] Initializing cgroup subsys debug
       [    0.025996] Initializing cgroup subsys cpuacct
       [    0.026995] Initializing cgroup subsys devices
       [    0.027995] Initializing cgroup subsys freezer
       [    0.028995] mce: CPU supports 5 MCE banks
      
      I've bisected it down to commit 4efc0670 ("x86, mce: use 64bit
      machine check code on 32bit"), which utilizes the MCE code on
      32-bit systems too.
      
      The problem is caused by this detail in my config:
      
        # CONFIG_CPU_SUP_INTEL is not set
      
      This disables the quirks in mce_cpu_quirks() but still enables
      MCE support - which then hangs due to the missing quirk
      workaround needed on this CPU:
      
      	if (c->x86 == 6 && c->x86_model < 0x1A && banks > 0)
      		mce_banks[0].init = 0;
      
      The safe solution is to not initialize MCEs if we dont know on
      what CPU we are running (or if that CPU's support code got
      disabled in the config).
      
      Also be a bit more defensive on 32-bit systems: dont do a
      boot-time dump of pending MCEs not just on the specific system
      that we found a problem with (Pentium-M), but earlier ones as
      well.
      
      Now this problem is probably not common and disabling CPU
      support is rare - but still being more defensive in something
      we turned on for a wide range of CPUs is prudent.
      
      Cc: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
      LKML-Reference: Message-ID: <4A88E3E4.40506@jp.fujitsu.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e412cd25
    • B
      x86, mce: don't log boot MCEs on Pentium M (model == 13) CPUs · c7f6fa44
      Bartlomiej Zolnierkiewicz 提交于
      On my legacy Pentium M laptop (Acer Extensa 2900) I get bogus MCE on a cold
      boot with CONFIG_X86_NEW_MCE enabled, i.e. (after decoding it with mcelog):
      
      MCE 0
      HARDWARE ERROR. This is *NOT* a software problem!
      Please contact your hardware vendor
      CPU 0 BANK 1 MCG status:
      MCi status:
      Error overflow
      Uncorrected error
      Error enabled
      Processor context corrupt
      MCA: Data CACHE Level-1 UNKNOWN Error
      STATUS f200000000000195 MCGSTATUS 0
      
      [ The other STATUS values observed: f2000000000001b5 (... UNKNOWN error)
        and f200000000000115 (... READ Error).
      
        To verify that this is not a CONFIG_X86_NEW_MCE bug I also modified
        the CONFIG_X86_OLD_MCE code (which doesn't log any MCEs) to dump
        content of STATUS MSR before it is cleared during initialization. ]
      
      Since the bogus MCE results in a kernel taint (which in turn disables
      lockdep support) don't log boot MCEs on Pentium M (model == 13) CPUs
      by default ("mce=bootlog" boot parameter can be be used to get the old
      behavior).
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Reviewed-by: NAndi Kleen <andi@firstfloor.org>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c7f6fa44
    • L
      x86: Annotate section mismatch warnings in kernel/apic/x2apic_uv_x.c · 52459ab9
      Leonardo Potenza 提交于
      The function uv_acpi_madt_oem_check() has been marked __init,
      the struct apic_x2apic_uv_x has been marked __refdata.
      
      The aim is to address the following section mismatch messages:
      
      WARNING: arch/x86/kernel/apic/built-in.o(.data+0x1368): Section mismatch in reference from the variable apic_x2apic_uv_x to the function .cpuinit.text:uv_wakeup_secondary()
      The variable apic_x2apic_uv_x references
      the function __cpuinit uv_wakeup_secondary()
      If the reference is valid then annotate the
      variable with __init* or __refdata (see linux/init.h) or name the variable:
      *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
      
      WARNING: arch/x86/kernel/built-in.o(.data+0x68e8): Section mismatch in reference from the variable apic_x2apic_uv_x to the function .cpuinit.text:uv_wakeup_secondary()
      The variable apic_x2apic_uv_x references
      the function __cpuinit uv_wakeup_secondary()
      If the reference is valid then annotate the
      variable with __init* or __refdata (see linux/init.h) or name the variable:
      *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
      
      WARNING: arch/x86/built-in.o(.text+0x7b36f): Section mismatch in reference from the function uv_acpi_madt_oem_check() to the function .init.text:early_ioremap()
      The function uv_acpi_madt_oem_check() references
      the function __init early_ioremap().
      This is often because uv_acpi_madt_oem_check lacks a __init
      annotation or the annotation of early_ioremap is wrong.
      
      WARNING: arch/x86/built-in.o(.text+0x7b38d): Section mismatch in reference from the function uv_acpi_madt_oem_check() to the function .init.text:early_iounmap()
      The function uv_acpi_madt_oem_check() references
      the function __init early_iounmap().
      This is often because uv_acpi_madt_oem_check lacks a __init
      annotation or the annotation of early_iounmap is wrong.
      
      WARNING: arch/x86/built-in.o(.data+0x8668): Section mismatch in reference from the variable apic_x2apic_uv_x to the function .cpuinit.text:uv_wakeup_secondary()
      The variable apic_x2apic_uv_x references
      the function __cpuinit uv_wakeup_secondary()
      If the reference is valid then annotate the
      variable with __init* or __refdata (see linux/init.h) or name the variable:
      *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
      Signed-off-by: NLeonardo Potenza <lpotenza@inwind.it>
      LKML-Reference: <200908161855.48302.lpotenza@inwind.it>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      52459ab9
  9. 16 8月, 2009 1 次提交
  10. 15 8月, 2009 5 次提交
    • L
      ARM: 5673/1: U300 fix initsection compile warning · a2bb9f4d
      Linus Walleij 提交于
      The u300_init_check_chip() function was not properly tagged with
      the __init macro and provided a initsection mismatch on
      compilation.
      Signed-off-by: NLinus Walleij <linus.walleij@stericsson.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      a2bb9f4d
    • R
      ARM: Fix broken highmem support · dde5828f
      Russell King 提交于
      Currently, highmem is selectable, and you can request an increased
      vmalloc area.  However, none of this has any effect on the memory
      layout since a patch in the highmem series was accidentally dropped.
      Moreover, even if you did want highmem, all memory would still be
      registered as lowmem, possibly resulting in overflow of the available
      virtual mapping space.
      
      The highmem boundary is determined by the highest allowed beginning
      of the vmalloc area, which depends on its configurable minimum size
      (see commit 60296c71 for details on
      this).
      
      We should create mappings and initialize bootmem only for low memory,
      while the zone allocator must still be told about highmem.
      
      Currently, memory nodes which are completely located in high memory
      are not supported.  This is not a huge limitation since systems
      relying on highmem support are unlikely to have discontiguous memory
      with large holes.
      
      [ A similar patch was meant to be merged before commit 5f0fbf9e
        and be available  in Linux v2.6.30, however some git rebase screw-up
        of mine dropped the first commit of the series, and that goofage
        escaped testing somehow as well. -- Nico ]
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Reviewed-by: NNicolas Pitre <nico@marvell.com>
      dde5828f
    • C
      x86: Fix UV BAU destination subnode id · 3ef12c3c
      Cliff Wickman 提交于
      The SGI UV Broadcast Assist Unit is used to send TLB shootdown
      messages to remote nodes of the system.  The header of the
      message must contain the subnode id of the block in the
      receiving hub that handles such messages.  It should always be
      0x10, the id of the "LB" block.
      
      It had previously been documented as a "must be zero" field.
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      Acked-by: NJack Steiner <steiner@sgi.com>
      LKML-Reference: <E1Mc1x7-0005Ce-6t@eag09.americas.sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3ef12c3c
    • M
      sh: sh7724 ddr self-refresh changes · 237674e0
      Magnus Damm 提交于
      This patch updates the SuperH Mobile sleep assembly code with
      support for DBSC memory controller found in the sh7724 processor.
      
      Without this fix the memory hooked up to the sh7724 processor
      will never enter self-refresh mode before suspending to ram. The
      effect of this is that the memory contents most likeley will be
      lost upon resume which may or may not be what you want.
      Signed-off-by: NMagnus Damm <damm@igel.co.jp>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      237674e0
    • M
      sh: use in-soc KEYSC on se7724 · 9747e78b
      Magnus Damm 提交于
      This patch updates the Solution Engine 7724 board code to use
      in-SoC KEYSC resources for the keyboard platform device. Using
      the in-SoC key scan controller fixes a crash-during-resume issue.
      
      Without this patch the KEYSC hardware block located in the board
      specific FPGA is used together with an external IRQ which is
      routed through the FPGA and handled by some board specific demux
      code. This board specific FPGA interrupt code does not implement
      desc->set_wake() so the enable_irq_wake() call in the sh_keysc
      driver will fail at suspend-to-ram time and the disable_irq_wake()
      will bomb out when resuming.
      
      Changing the platform data to use the in-SoC KEYSC hardware makes
      the se7724 board support code less special which is a good thing.
      Also, the board specific KEYSC pin setup code selects in-SoC pin
      functions already which makes the current FPGA platform device data
      look like a typo.
      Signed-off-by: NMagnus Damm <damm@igel.co.jp>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      9747e78b
  11. 14 8月, 2009 3 次提交
    • V
      mx31moboard: invert sdhc ro signal sense · 563abb4b
      Valentin Longchamp 提交于
      Small confusion with our hardware engineer, the WP signal (RO) is
      active low on our boards, the signal has to inverted.
      
      This is a pretty straightforward patch, it could even go to -rc,
      but if not, then push it for 2.6.32.
      Signed-off-by: NValentin Longchamp <valentin.longchamp@epfl.ch>
      Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
      563abb4b
    • T
      percpu, sparc64: fix sparse possible cpu map handling · 74d46d6b
      Tejun Heo 提交于
      percpu code has been assuming num_possible_cpus() == nr_cpu_ids which
      is incorrect if cpu_possible_map contains holes.  This causes percpu
      code to access beyond allocated memories and vmalloc areas.  On a
      sparc64 machine with cpus 0 and 2 (u60), this triggers the following
      warning or fails boot.
      
       WARNING: at /devel/tj/os/work/mm/vmalloc.c:106 vmap_page_range_noflush+0x1f0/0x240()
       Modules linked in:
       Call Trace:
        [00000000004b17d0] vmap_page_range_noflush+0x1f0/0x240
        [00000000004b1840] map_vm_area+0x20/0x60
        [00000000004b1950] __vmalloc_area_node+0xd0/0x160
        [0000000000593434] deflate_init+0x14/0xe0
        [0000000000583b94] __crypto_alloc_tfm+0xd4/0x1e0
        [00000000005844f0] crypto_alloc_base+0x50/0xa0
        [000000000058b898] alg_test_comp+0x18/0x80
        [000000000058dad4] alg_test+0x54/0x180
        [000000000058af00] cryptomgr_test+0x40/0x60
        [0000000000473098] kthread+0x58/0x80
        [000000000042b590] kernel_thread+0x30/0x60
        [0000000000472fd0] kthreadd+0xf0/0x160
       ---[ end trace 429b268a213317ba ]---
      
      This patch fixes generic percpu functions and sparc64
      setup_per_cpu_areas() so that they handle sparse cpu_possible_map
      properly.
      
      Please note that on x86, cpu_possible_map() doesn't contain holes and
      thus num_possible_cpus() == nr_cpu_ids and this patch doesn't cause
      any behavior difference.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Cc: Ingo Molnar <mingo@elte.hu>
      74d46d6b
    • D
      ARM: S3C24XX: Fix clkout mpx error · 48ec45e7
      Davide Rizzo 提交于
      Bug correction: CLK Outputs cannot have XTAL as parent
      Signed-off-by: NDavide Rizzo <elpa.rizzo@gmail.com>
      [ben-linux@fluff.org: updated patch subject]
      Signed-off-by: NBen Dooks <ben-linux@fluff.org>
      48ec45e7
  12. 13 8月, 2009 1 次提交