1. 16 7月, 2014 2 次提交
  2. 02 7月, 2014 1 次提交
    • H
      perf/x86/intel: ignore CondChgd bit to avoid false NMI handling · b292d7a1
      HATAYAMA Daisuke 提交于
      Currently, any NMI is falsely handled by a NMI handler of NMI watchdog
      if CondChgd bit in MSR_CORE_PERF_GLOBAL_STATUS MSR is set.
      
      For example, we use external NMI to make system panic to get crash
      dump, but in this case, the external NMI is falsely handled do to the
      issue.
      
      This commit deals with the issue simply by ignoring CondChgd bit.
      
      Here is explanation in detail.
      
      On x86 NMI watchdog uses performance monitoring feature to
      periodically signal NMI each time performance counter gets overflowed.
      
      intel_pmu_handle_irq() is called as a NMI_LOCAL handler from a NMI
      handler of NMI watchdog, perf_event_nmi_handler(). It identifies an
      owner of a given NMI by looking at overflow status bits in
      MSR_CORE_PERF_GLOBAL_STATUS MSR. If some of the bits are set, then it
      handles the given NMI as its own NMI.
      
      The problem is that the intel_pmu_handle_irq() doesn't distinguish
      CondChgd bit from other bits. Unlike the other status bits, CondChgd
      bit doesn't represent overflow status for performance counters. Thus,
      CondChgd bit cannot be thought of as a mark indicating a given NMI is
      NMI watchdog's.
      
      As a result, if CondChgd bit is set, any NMI is falsely handled by the
      NMI handler of NMI watchdog. Also, if type of the falsely handled NMI
      is either NMI_UNKNOWN, NMI_SERR or NMI_IO_CHECK, the corresponding
      action is never performed until CondChgd bit is cleared.
      
      I noticed this behavior on systems with Ivy Bridge processors: Intel
      Xeon CPU E5-2630 v2 and Intel Xeon CPU E7-8890 v2. On both systems,
      CondChgd bit in MSR_CORE_PERF_GLOBAL_STATUS MSR has already been set
      in the beginning at boot. Then the CondChgd bit is immediately cleared
      by next wrmsr to MSR_CORE_PERF_GLOBAL_CTRL MSR and appears to remain
      0.
      
      On the other hand, on older processors such as Nehalem, Xeon E7540,
      CondChgd bit is not set in the beginning at boot.
      
      I'm not sure about exact behavior of CondChgd bit, in particular when
      this bit is set. Although I read Intel System Programmer's Manual to
      figure out that, the descriptions I found are:
      
        In 18.9.1:
      
        "The MSR_PERF_GLOBAL_STATUS MSR also provides a ¡sticky bit¢ to
         indicate changes to the state of performancmonitoring hardware"
      
        In Table 35-2 IA-32 Architectural MSRs
      
        63 CondChg: status bits of this register has changed.
      
      These are different from the bahviour I see on the actual system as I
      explained above.
      
      At least, I think ignoring CondChgd bit should be enough for NMI
      watchdog perspective.
      Signed-off-by: NHATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
      Acked-by: NDon Zickus <dzickus@redhat.com>
      Signed-off-by: NPeter Zijlstra <peterz@infradead.org>
      Cc: <stable@vger.kernel.org>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: linux-kernel@vger.kernel.org
      Link: http://lkml.kernel.org/r/20140625.103503.409316067.d.hatayama@jp.fujitsu.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      b292d7a1
  3. 20 6月, 2014 15 次提交
    • S
      unicore32: Remove ARCH_HAS_CPUFREQ config option · d670878e
      Stephen Boyd 提交于
      This config exists entirely to hide the cpufreq menu from the
      kernel configuration unless a platform has selected it. Nothing
      is actually built if this config is 'Y' and it just leads to more
      patches that add a select under a platform Kconfig so that some
      other CPUfreq option can be chosen. Let's remove the option so
      that we can always enable CPUfreq drivers on unicore32 platforms.
      
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Reviewed-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      d670878e
    • C
      arch: unicore32: ksyms: export '__cpuc_coherent_kern_range' to avoid compiling failure · 92543fd7
      Chen Gang 提交于
      flush_icache_range() is '__cpuc_coherent_kern_range' under unicore32,
      and lkdtm.ko needs it. At present, '__cpuc_coherent_kern_range' is
      still used by unicore32, so export it to avoid compiling failure.
      
      The related error (with allmodconfig under unicore32):
      
        ERROR: "__cpuc_coherent_kern_range" [drivers/misc/lkdtm.ko] undefined!
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      Acked-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      Signed-off-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      92543fd7
    • C
      arch: unicore32: ksyms: export 'pm_power_off' to avoid compiling failure. · 3420d49d
      Chen Gang 提交于
      Two driver modules need 'pm_power_off', so export it.
      
      The related error (with allmodconfig under unicore32):
      
          MODPOST 4039 modules
        ERROR: "pm_power_off" [drivers/mfd/retu-mfd.ko] undefined!
        ERROR: "pm_power_off" [drivers/char/ipmi/ipmi_poweroff.ko] undefined!
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      Acked-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      Signed-off-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      3420d49d
    • C
      arch: unicore32: ksyms: export additional find_first_*() to avoid compiling failure · 40ad2a67
      Chen Gang 提交于
      Some modules need find_first_bit() and find_first_zero_bit(), so export
      them.
      
      The related error (with allmodconfig under unicore32):
      
          MODPOST 4039 modules
        ERROR: "find_first_bit" [sound/soc/codecs/snd-soc-uda1380.ko] undefined!
        ERROR: "find_first_zero_bit" [net/sctp/sctp.ko] undefined!
        ...
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      Acked-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      Signed-off-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      40ad2a67
    • C
      arch:unicore32:mm: add devmem_is_allowed() to support STRICT_DEVMEM · 8a016596
      Chen Gang 提交于
      unicore32 supports STRICT_DEVMEM, so it needs devmem_is_allowed(), like
      some of other architectures have done (e.g. arm, powerpc, x86 ...).
      
      The related error with allmodconfig:
      
          CC      drivers/char/mem.o
        drivers/char/mem.c: In function ‘range_is_allowed’:
        drivers/char/mem.c:69: error: implicit declaration of function ‘devmem_is_allowed’
        make[2]: *** [drivers/char/mem.o] Error 1
        make[1]: *** [drivers/char] Error 2
        make: *** [drivers] Error 2
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      Acked-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      Signed-off-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      8a016596
    • C
      unicore32: include: asm: add missing ')' for PAGE_* macros in pgtable.h · aaad6183
      Chen Gang 提交于
      Missing related ')', the related compiling error:
      
          CC [M]  drivers/gpu/drm/udl/udl_fb.o
        drivers/gpu/drm/udl/udl_fb.c: In function ‘udl_fb_mmap’:
        drivers/gpu/drm/udl/udl_fb.c:273: error: expected ‘)’ before ‘return’
        drivers/gpu/drm/udl/udl_fb.c:281: error: expected expression before ‘}’ token
        make[4]: *** [drivers/gpu/drm/udl/udl_fb.o] Error 1
        make[3]: *** [drivers/gpu/drm/udl] Error 2
        make[2]: *** [drivers/gpu/drm] Error 2
        make[1]: *** [drivers/gpu] Error 2
        make: *** [drivers] Error 2
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      Acked-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      Signed-off-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      aaad6183
    • C
      arch/unicore32/kernel/setup.c: add generic 'screen_info' to avoid compiling failure · f80561e4
      Chen Gang 提交于
      Add generic 'screen_info' just like another architectures have done
      (e.g. tile, sh, score, ia64, hexagon, and cris).
      
      The related error (with allmodconfig under unicore32):
      
          LD      init/built-in.o
        drivers/built-in.o: In function `vgacon_save_screen':
        powercap_sys.c:(.text+0x21788): undefined reference to `screen_info'
        drivers/built-in.o: In function `vgacon_resize':
        powercap_sys.c:(.text+0x21b54): undefined reference to `screen_info'
        drivers/built-in.o: In function `vgacon_switch':
        powercap_sys.c:(.text+0x21cb4): undefined reference to `screen_info'
        drivers/built-in.o: In function `vgacon_init':
        powercap_sys.c:(.text+0x2296c): undefined reference to `screen_info'
        drivers/built-in.o: In function `vgacon_startup':
        powercap_sys.c:(.text+0x22e80): undefined reference to `screen_info'
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      Acked-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      Signed-off-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      f80561e4
    • C
      arch: unicore32: kernel: ksyms: remove 'bswapsi2' and 'muldi3' to avoid compiling failure · 80650422
      Chen Gang 提交于
      After check the code, 'bswapsi2' and 'muldi3' are useless for
      unicore32, so can remove them to avoid compiling failure.
      
      The related error (with allmodconfig under unicore32):
      
          LD      init/built-in.o
        arch/unicore32/kernel/built-in.o:(___ksymtab+__muldi3+0x0): undefined reference to `__muldi3'
        arch/unicore32/kernel/built-in.o:(___ksymtab+__bswapsi2+0x0): undefined reference to `__bswapsi2'
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      Acked-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      Signed-off-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      80650422
    • C
      arch/unicore32/kernel/ksyms.c: remove 2 export symbols to avoid compiling failure · 5a5ffc99
      Chen Gang 提交于
      'csum_partial' and 'csum_partial_copy_from_user' have already been
      exported in "lib/", so need not export them again, or it will cause
      compiling error.
      
      The related error (with allmodconfig under unicore32):
      
          LD      vmlinux.o
        lib/built-in.o:(___ksymtab+csum_partial+0x0): multiple definition of `__ksymtab_csum_partial'
        arch/unicore32/kernel/built-in.o:(___ksymtab+csum_partial+0x0): first defined here
        lib/built-in.o:(___ksymtab+csum_partial_copy_from_user+0x0): multiple definition of `__ksymtab_csum_partial_copy_from_user'
        arch/unicore32/kernel/built-in.o:(___ksymtab+csum_partial_copy_from_user+0x0): first defined here
        make: *** [vmlinux] Error 1
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      Acked-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      Signed-off-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      5a5ffc99
    • C
      arch/unicore32/include/asm/io.h: add readl_relaxed() generic definition · 312c6df4
      Chen Gang 提交于
      Need generic definition for readl_relaxed(), like other architectures
      have done. Or can not pass compiling with allmodconfig, the related
      error:
      
          CC [M]  drivers/message/fusion/mptbase.o
        drivers/message/fusion/mptbase.c: In function 'mpt_send_handshake_request':
        drivers/message/fusion/mptbase.c:1224: error: implicit declaration of function 'readl_relaxed'
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      Acked-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      Signed-off-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      312c6df4
    • C
      arch/unicore32/include/asm/ptrace.h: add generic definition for profile_pc() · 1febf615
      Chen Gang 提交于
      Add generic definition just like another architectures have done, or
      can not pass compiling with allmodconfig, the related error:
      
          CC      kernel/profile.o
        kernel/profile.c: In function 'profile_tick':
        kernel/profile.c:419: error: implicit declaration of function 'profile_pc'
        make[1]: *** [kernel/profile.o] Error 1
        make: *** [kernel] Error 2
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      Acked-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      Signed-off-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      1febf615
    • C
      arch/unicore32/mm/alignment.c: include "asm/pgtable.h" to avoid compiling error · 1ff38c56
      Chen Gang 提交于
      Need include "asm/pgtable.h" to include "asm-generic/pgtable-nopmd.h",
      so can let 'pmd_t' defined. The related error with allmodconfig:
      
          CC      arch/unicore32/mm/alignment.o
        In file included from arch/unicore32/mm/alignment.c:24:
        arch/unicore32/include/asm/tlbflush.h:135: error: expected .). before .*. token
        arch/unicore32/include/asm/tlbflush.h:154: error: expected .). before .*. token
        In file included from arch/unicore32/mm/alignment.c:27:
        arch/unicore32/mm/mm.h:15: error: expected .=., .,., .;., .sm. or ._attribute__. before .*. token
        arch/unicore32/mm/mm.h:20: error: expected .=., .,., .;., .sm. or ._attribute__. before .*. token
        arch/unicore32/mm/mm.h:25: error: expected .=., .,., .;., .sm. or ._attribute__. before .*. token
        make[1]: *** [arch/unicore32/mm/alignment.o] Error 1
        make: *** [arch/unicore32/mm] Error 2
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      Acked-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      Signed-off-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      1ff38c56
    • C
      arch/unicore32/kernel/clock.c: add readl() and writel() for 'PM_' macros · db7ef289
      Chen Gang 提交于
      Add readl() and writel() for 'PM_' macros, just like another areas have
      done within unicored32, or will cause compiling issue.
      
      The related error (allmodconfig for unicored32):
      
          CC      arch/unicore32/kernel/clock.o
        arch/unicore32/kernel/clock.c: In function 'clk_set_rate':
        arch/unicore32/kernel/clock.c:182: warning: initialization makes integer from pointer without a cast
        arch/unicore32/kernel/clock.c:204: error: lvalue required as left operand of assignment
        arch/unicore32/kernel/clock.c:206: error: lvalue required as left operand of assignment
        arch/unicore32/kernel/clock.c:207: error: invalid operands to binary & (have 'void *' and 'long unsigned int')
        make[1]: *** [arch/unicore32/kernel/clock.o] Error 1
        make: *** [arch/unicore32/kernel] Error 2
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      Acked-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      Signed-off-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      db7ef289
    • C
      arch/unicore32/kernel/module.c: use __vmalloc_node_range() instead of __vmalloc_area() · df8e4c7d
      Chen Gang 提交于
      __vmalloc_area() has already been removed from upstream kernel, need
      use __vmalloc_node_range() instead of.
      
      The related commit: "d0a21265 mm: unify module_alloc code for vmalloc".
      
      The related error (allmodconfig for unicore32):
      
          CC      arch/unicore32/kernel/module.o
        arch/unicore32/kernel/module.c: In function 'module_alloc' :
        arch/unicore32/kernel/module.c:34: error: implicit declaration of function '__vmalloc_area'
        arch/unicore32/kernel/module.c:34: warning: return makes pointer from integer without a cast
        make[1]: *** [arch/unicore32/kernel/module.o] Error 1
        make: *** [arch/unicore32/kernel] Error 2
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      Acked-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      Signed-off-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      df8e4c7d
    • C
      arch/unicore32/kernel/ksyms.c: remove several undefined exported symbols · 4877b60c
      Chen Gang 提交于
      For 'csum_partial_copy_nocheck()', it has default definition in
      'asm-generic'.
      
      For '__raw_reads?()' and '__raw_writes?()' are used by the drivers
      which no relationship with allmodconfig for unicode32, the related
      modules are:
      
        drivers/mmc/host/omap.c
        drivers/mtd/nand/atmel_nand.c
        drivers/mtd/nand/pxa3xx_nand.c
        drivers/usb/gadget/at91_udc.c
      
      Others are only within some architectures (not kernel wide).
      
      The related error with allmodconfig for unicode32:
      
          CC      arch/unicore32/kernel/ksyms.o
        arch/unicore32/kernel/ksyms.c:29: error: ._backtrace. undeclared here (not in a function)
        arch/unicore32/kernel/ksyms.c:29: error: type defaults to .nt. in declaration of ._backtrace.
        arch/unicore32/kernel/ksyms.c:38: error: .sum_partial_copy_nocheck. undeclared here (not in a function)
        arch/unicore32/kernel/ksyms.c:38: error: type defaults to .nt. in declaration of .sum_partial_copy_nocheck.
        arch/unicore32/kernel/ksyms.c:39: error: ._csum_ipv6_magic. undeclared here (not in a function)
        arch/unicore32/kernel/ksyms.c:39: error: type defaults to .nt. in declaration of ._csum_ipv6_magic.
        arch/unicore32/kernel/ksyms.c:43: error: ._raw_readsb. undeclared here (not in a function)
        arch/unicore32/kernel/ksyms.c:43: error: type defaults to .nt. in declaration of ._raw_readsb.
        arch/unicore32/kernel/ksyms.c:46: error: ._raw_readsw. undeclared here (not in a function)
        arch/unicore32/kernel/ksyms.c:46: error: type defaults to .nt. in declaration of ._raw_readsw.
        arch/unicore32/kernel/ksyms.c:49: error: ._raw_readsl. undeclared here (not in a function)
        arch/unicore32/kernel/ksyms.c:49: error: type defaults to .nt. in declaration of ._raw_readsl.
        arch/unicore32/kernel/ksyms.c:52: error: ._raw_writesb. undeclared here (not in a function)
        arch/unicore32/kernel/ksyms.c:52: error: type defaults to .nt. in declaration of ._raw_writesb.
        arch/unicore32/kernel/ksyms.c:55: error: ._raw_writesw. undeclared here (not in a function)
        arch/unicore32/kernel/ksyms.c:55: error: type defaults to .nt. in declaration of ._raw_writesw.
        arch/unicore32/kernel/ksyms.c:58: error: ._raw_writesl. undeclared here (not in a function)
        arch/unicore32/kernel/ksyms.c:58: error: type defaults to .nt. in declaration of ._raw_writesl.
        arch/unicore32/kernel/ksyms.c:79: error: ._get_user_1. undeclared here (not in a function)
        arch/unicore32/kernel/ksyms.c:79: error: type defaults to .nt. in declaration of ._get_user_1.
        arch/unicore32/kernel/ksyms.c:80: error: ._get_user_2. undeclared here (not in a function)
        arch/unicore32/kernel/ksyms.c:80: error: type defaults to .nt. in declaration of ._get_user_2.
        arch/unicore32/kernel/ksyms.c:81: error: ._get_user_4. undeclared here (not in a function)
        arch/unicore32/kernel/ksyms.c:81: error: type defaults to .nt. in declaration of ._get_user_4.
        arch/unicore32/kernel/ksyms.c:83: error: ._put_user_1. undeclared here (not in a function)
        arch/unicore32/kernel/ksyms.c:83: error: type defaults to .nt. in declaration of ._put_user_1.
        arch/unicore32/kernel/ksyms.c:84: error: ._put_user_2. undeclared here (not in a function)
        arch/unicore32/kernel/ksyms.c:84: error: type defaults to .nt. in declaration of ._put_user_2.
        arch/unicore32/kernel/ksyms.c:85: error: ._put_user_4. undeclared here (not in a function)
        arch/unicore32/kernel/ksyms.c:85: error: type defaults to .nt. in declaration of ._put_user_4.
        arch/unicore32/kernel/ksyms.c:86: error: ._put_user_8. undeclared here (not in a function)
        arch/unicore32/kernel/ksyms.c:86: error: type defaults to .nt. in declaration of ._put_user_8.
      Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
      Acked-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      Signed-off-by: NXuetao Guan <gxt@mprc.pku.edu.cn>
      4877b60c
  4. 18 6月, 2014 17 次提交
  5. 17 6月, 2014 5 次提交