1. 06 11月, 2018 1 次提交
  2. 05 11月, 2018 7 次提交
  3. 01 11月, 2018 1 次提交
    • B
      EDAC, skx: Fix randconfig builds · a324e939
      Borislav Petkov 提交于
      The driver depends on the ADXL component glue and selects it. However,
      ADXL itself implicitly depends on ACPI and in nonsensical randconfig
      builds like this:
      
        # CONFIG_ACPI is not set
        CONFIG_ACPI_ADXL=y
      
      where ACPI is not enabled, the build fails with:
      
        drivers/edac/skx_edac.o: In function `skx_mce_check_error':
        skx_edac.c:(.text+0xab): undefined reference to `adxl_decode'
        drivers/edac/skx_edac.o: In function `skx_init':
        skx_edac.c:(.init.text+0x8bf): undefined reference to `adxl_get_component_names'
        make: *** [vmlinux] Error 1
      
      Add stubs for that case so that the build succeeds. CONFIG_ACPI=n
      doesn't make any sense for real configurations but this fix will at
      least silence randconfig builds.
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Acked-by: NTony Luck <tony.luck@intel.com>
      Cc: "Rafael J. Wysocki" <rafael@kernel.org>
      a324e939
  4. 25 10月, 2018 1 次提交
  5. 13 10月, 2018 1 次提交
  6. 10 10月, 2018 1 次提交
  7. 02 10月, 2018 1 次提交
    • P
      x86/cpu: Sanitize FAM6_ATOM naming · f2c4db1b
      Peter Zijlstra 提交于
      Going primarily by:
      
        https://en.wikipedia.org/wiki/List_of_Intel_Atom_microprocessors
      
      with additional information gleaned from other related pages; notably:
      
       - Bonnell shrink was called Saltwell
       - Moorefield is the Merriefield refresh which makes it Airmont
      
      The general naming scheme is: FAM6_ATOM_UARCH_SOCTYPE
      
        for i in `git grep -l FAM6_ATOM` ; do
      	sed -i  -e 's/ATOM_PINEVIEW/ATOM_BONNELL/g'		\
      		-e 's/ATOM_LINCROFT/ATOM_BONNELL_MID/'		\
      		-e 's/ATOM_PENWELL/ATOM_SALTWELL_MID/g'		\
      		-e 's/ATOM_CLOVERVIEW/ATOM_SALTWELL_TABLET/g'	\
      		-e 's/ATOM_CEDARVIEW/ATOM_SALTWELL/g'		\
      		-e 's/ATOM_SILVERMONT1/ATOM_SILVERMONT/g'	\
      		-e 's/ATOM_SILVERMONT2/ATOM_SILVERMONT_X/g'	\
      		-e 's/ATOM_MERRIFIELD/ATOM_SILVERMONT_MID/g'	\
      		-e 's/ATOM_MOOREFIELD/ATOM_AIRMONT_MID/g'	\
      		-e 's/ATOM_DENVERTON/ATOM_GOLDMONT_X/g'		\
      		-e 's/ATOM_GEMINI_LAKE/ATOM_GOLDMONT_PLUS/g' ${i}
        done
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Cc: dave.hansen@linux.intel.com
      Cc: len.brown@intel.com
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      f2c4db1b
  8. 29 9月, 2018 2 次提交
    • T
      EDAC, {i7core,sb,skx}_edac: Fix uncorrected error counting · 432de7fd
      Tony Luck 提交于
      The count of errors is picked up from bits 52:38 of the machine check
      bank status register. But this is the count of *corrected* errors. If an
      uncorrected error is being logged, the h/w sets this field to 0. Which
      means that when edac_mc_handle_error() is called, the EDAC core will
      carefully add zero to the appropriate uncorrected error counts.
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      [ Massage commit message. ]
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Cc: stable@vger.kernel.org
      Cc: Aristeu Rozanski <aris@redhat.com>
      Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
      Cc: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
      Cc: linux-edac <linux-edac@vger.kernel.org>
      Link: http://lkml.kernel.org/r/20180928213934.19890-1-tony.luck@intel.com
      432de7fd
    • R
      edac: cpc925: use for_each_of_cpu_node iterator · 37dc218b
      Rob Herring 提交于
      Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This
      has the side effect of defaulting to iterating using "cpu" node names in
      preference to the deprecated (for FDT) device_type == "cpu".
      
      The error messages are removed in the process as it's not the driver's
      job to be checking cpu nodes. Any problems with cpu nodes should be
      noticed by the architecture code.
      
      Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
      Cc: linux-edac@vger.kernel.org
      Acked-by: NBorislav Petkov <bp@suse.de>
      Signed-off-by: NRob Herring <robh@kernel.org>
      37dc218b
  9. 28 9月, 2018 2 次提交
  10. 26 9月, 2018 3 次提交
  11. 25 9月, 2018 1 次提交
  12. 23 9月, 2018 2 次提交
  13. 15 9月, 2018 1 次提交
  14. 14 9月, 2018 1 次提交
  15. 11 9月, 2018 2 次提交
    • Q
      EDAC, sb_edac: Fix reporting for patrol scrubber errors · 8489b17c
      Qiuxu Zhuo 提交于
      sb_edac sometimes reports the wrong DIMM for a memory error found by
      the patrol scrubber. That is because the hardware provides only a 4KB
      page-aligned address for the error case.
      
      This means that the EDAC driver will point at the DIMM matching offset
      0x0 in the 4KB page, but because of interleaving across channels and
      ranks, the actual DIMM involved may be different if the error is on some
      other cache line within the page.
      
      Therefore, reconstruct the socket/iMC/channel information from the "mce"
      structure passed to the EDAC driver. The DIMM cannot be determined, so
      pass "dimm=-1" to the EDAC core. It will report that all the DIMMs on
      that channel may be affected.
      Signed-off-by: NQiuxu Zhuo <qiuxu.zhuo@intel.com>
      Cc: Aristeu Rozanski <aris@redhat.com>
      Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
      Cc: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
      Cc: linux-edac <linux-edac@vger.kernel.org>
      Link: http://lkml.kernel.org/r/20180907230828.13901-3-tony.luck@intel.com
      [ Improve comments on the functions to convert bank number
        to memory controller number. Minor cleanup to commit message. ]
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      [ Massage commit message more. ]
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      8489b17c
    • Q
      EDAC, sb_edac: Return early on ADDRV bit and address type test · dcc960b2
      Qiuxu Zhuo 提交于
      Users of the mce_register_decode_chain() are called for every logged
      error. EDAC drivers should check:
      
      1) Is this a memory error? [bit 7 in status register]
      2) Is there a valid address? [bit 58 in status register]
      3) Is the address a system address? [bitfield 8:6 in misc register]
      
      The sb_edac driver performed test "1" twice. Waited far too long to
      perform check "2". Didn't do check "3" at all.
      
      Fix it by moving the test for valid address from
      sbridge_mce_output_error() into sbridge_mce_check_error() and add a test
      for the type immediately after. Delete the redundant check for the type
      of the error from sbridge_mce_output_error().
      Signed-off-by: NQiuxu Zhuo <qiuxu.zhuo@intel.com>
      Cc: Aristeu Rozanski <aris@redhat.com>
      Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
      Cc: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
      Cc: linux-edac <linux-edac@vger.kernel.org>
      Link: http://lkml.kernel.org/r/20180907230828.13901-2-tony.luck@intel.com
      [ Re-word commit message. ]
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      dcc960b2
  16. 07 9月, 2018 1 次提交
    • D
      regmap: split up regmap_config.use_single_rw · 1c96a2f6
      David Frey 提交于
      Split regmap_config.use_single_rw into use_single_read and
      use_single_write. This change enables drivers of devices which only
      support bulk operations in one direction to use the regmap_bulk_*()
      functions for both directions and have their bulk operation split into
      single operations only when necessary.
      
      Update all struct regmap_config instances where use_single_rw==true to
      instead set both use_single_read and use_single_write. No attempt was
      made to evaluate whether it is possible to set only one of
      use_single_read or use_single_write.
      Signed-off-by: NDavid Frey <dpfrey@gmail.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      1c96a2f6
  17. 03 9月, 2018 1 次提交
  18. 27 8月, 2018 1 次提交
  19. 17 8月, 2018 1 次提交
  20. 25 7月, 2018 1 次提交
  21. 09 7月, 2018 1 次提交
  22. 18 6月, 2018 1 次提交
  23. 17 6月, 2018 2 次提交
  24. 13 6月, 2018 1 次提交
    • K
      treewide: kzalloc() -> kcalloc() · 6396bb22
      Kees Cook 提交于
      The kzalloc() function has a 2-factor argument form, kcalloc(). This
      patch replaces cases of:
      
              kzalloc(a * b, gfp)
      
      with:
              kcalloc(a * b, gfp)
      
      as well as handling cases of:
      
              kzalloc(a * b * c, gfp)
      
      with:
      
              kzalloc(array3_size(a, b, c), gfp)
      
      as it's slightly less ugly than:
      
              kzalloc_array(array_size(a, b), c, gfp)
      
      This does, however, attempt to ignore constant size factors like:
      
              kzalloc(4 * 1024, gfp)
      
      though any constants defined via macros get caught up in the conversion.
      
      Any factors with a sizeof() of "unsigned char", "char", and "u8" were
      dropped, since they're redundant.
      
      The Coccinelle script used for this was:
      
      // Fix redundant parens around sizeof().
      @@
      type TYPE;
      expression THING, E;
      @@
      
      (
        kzalloc(
      -	(sizeof(TYPE)) * E
      +	sizeof(TYPE) * E
        , ...)
      |
        kzalloc(
      -	(sizeof(THING)) * E
      +	sizeof(THING) * E
        , ...)
      )
      
      // Drop single-byte sizes and redundant parens.
      @@
      expression COUNT;
      typedef u8;
      typedef __u8;
      @@
      
      (
        kzalloc(
      -	sizeof(u8) * (COUNT)
      +	COUNT
        , ...)
      |
        kzalloc(
      -	sizeof(__u8) * (COUNT)
      +	COUNT
        , ...)
      |
        kzalloc(
      -	sizeof(char) * (COUNT)
      +	COUNT
        , ...)
      |
        kzalloc(
      -	sizeof(unsigned char) * (COUNT)
      +	COUNT
        , ...)
      |
        kzalloc(
      -	sizeof(u8) * COUNT
      +	COUNT
        , ...)
      |
        kzalloc(
      -	sizeof(__u8) * COUNT
      +	COUNT
        , ...)
      |
        kzalloc(
      -	sizeof(char) * COUNT
      +	COUNT
        , ...)
      |
        kzalloc(
      -	sizeof(unsigned char) * COUNT
      +	COUNT
        , ...)
      )
      
      // 2-factor product with sizeof(type/expression) and identifier or constant.
      @@
      type TYPE;
      expression THING;
      identifier COUNT_ID;
      constant COUNT_CONST;
      @@
      
      (
      - kzalloc
      + kcalloc
        (
      -	sizeof(TYPE) * (COUNT_ID)
      +	COUNT_ID, sizeof(TYPE)
        , ...)
      |
      - kzalloc
      + kcalloc
        (
      -	sizeof(TYPE) * COUNT_ID
      +	COUNT_ID, sizeof(TYPE)
        , ...)
      |
      - kzalloc
      + kcalloc
        (
      -	sizeof(TYPE) * (COUNT_CONST)
      +	COUNT_CONST, sizeof(TYPE)
        , ...)
      |
      - kzalloc
      + kcalloc
        (
      -	sizeof(TYPE) * COUNT_CONST
      +	COUNT_CONST, sizeof(TYPE)
        , ...)
      |
      - kzalloc
      + kcalloc
        (
      -	sizeof(THING) * (COUNT_ID)
      +	COUNT_ID, sizeof(THING)
        , ...)
      |
      - kzalloc
      + kcalloc
        (
      -	sizeof(THING) * COUNT_ID
      +	COUNT_ID, sizeof(THING)
        , ...)
      |
      - kzalloc
      + kcalloc
        (
      -	sizeof(THING) * (COUNT_CONST)
      +	COUNT_CONST, sizeof(THING)
        , ...)
      |
      - kzalloc
      + kcalloc
        (
      -	sizeof(THING) * COUNT_CONST
      +	COUNT_CONST, sizeof(THING)
        , ...)
      )
      
      // 2-factor product, only identifiers.
      @@
      identifier SIZE, COUNT;
      @@
      
      - kzalloc
      + kcalloc
        (
      -	SIZE * COUNT
      +	COUNT, SIZE
        , ...)
      
      // 3-factor product with 1 sizeof(type) or sizeof(expression), with
      // redundant parens removed.
      @@
      expression THING;
      identifier STRIDE, COUNT;
      type TYPE;
      @@
      
      (
        kzalloc(
      -	sizeof(TYPE) * (COUNT) * (STRIDE)
      +	array3_size(COUNT, STRIDE, sizeof(TYPE))
        , ...)
      |
        kzalloc(
      -	sizeof(TYPE) * (COUNT) * STRIDE
      +	array3_size(COUNT, STRIDE, sizeof(TYPE))
        , ...)
      |
        kzalloc(
      -	sizeof(TYPE) * COUNT * (STRIDE)
      +	array3_size(COUNT, STRIDE, sizeof(TYPE))
        , ...)
      |
        kzalloc(
      -	sizeof(TYPE) * COUNT * STRIDE
      +	array3_size(COUNT, STRIDE, sizeof(TYPE))
        , ...)
      |
        kzalloc(
      -	sizeof(THING) * (COUNT) * (STRIDE)
      +	array3_size(COUNT, STRIDE, sizeof(THING))
        , ...)
      |
        kzalloc(
      -	sizeof(THING) * (COUNT) * STRIDE
      +	array3_size(COUNT, STRIDE, sizeof(THING))
        , ...)
      |
        kzalloc(
      -	sizeof(THING) * COUNT * (STRIDE)
      +	array3_size(COUNT, STRIDE, sizeof(THING))
        , ...)
      |
        kzalloc(
      -	sizeof(THING) * COUNT * STRIDE
      +	array3_size(COUNT, STRIDE, sizeof(THING))
        , ...)
      )
      
      // 3-factor product with 2 sizeof(variable), with redundant parens removed.
      @@
      expression THING1, THING2;
      identifier COUNT;
      type TYPE1, TYPE2;
      @@
      
      (
        kzalloc(
      -	sizeof(TYPE1) * sizeof(TYPE2) * COUNT
      +	array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
        , ...)
      |
        kzalloc(
      -	sizeof(TYPE1) * sizeof(THING2) * (COUNT)
      +	array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
        , ...)
      |
        kzalloc(
      -	sizeof(THING1) * sizeof(THING2) * COUNT
      +	array3_size(COUNT, sizeof(THING1), sizeof(THING2))
        , ...)
      |
        kzalloc(
      -	sizeof(THING1) * sizeof(THING2) * (COUNT)
      +	array3_size(COUNT, sizeof(THING1), sizeof(THING2))
        , ...)
      |
        kzalloc(
      -	sizeof(TYPE1) * sizeof(THING2) * COUNT
      +	array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
        , ...)
      |
        kzalloc(
      -	sizeof(TYPE1) * sizeof(THING2) * (COUNT)
      +	array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
        , ...)
      )
      
      // 3-factor product, only identifiers, with redundant parens removed.
      @@
      identifier STRIDE, SIZE, COUNT;
      @@
      
      (
        kzalloc(
      -	(COUNT) * STRIDE * SIZE
      +	array3_size(COUNT, STRIDE, SIZE)
        , ...)
      |
        kzalloc(
      -	COUNT * (STRIDE) * SIZE
      +	array3_size(COUNT, STRIDE, SIZE)
        , ...)
      |
        kzalloc(
      -	COUNT * STRIDE * (SIZE)
      +	array3_size(COUNT, STRIDE, SIZE)
        , ...)
      |
        kzalloc(
      -	(COUNT) * (STRIDE) * SIZE
      +	array3_size(COUNT, STRIDE, SIZE)
        , ...)
      |
        kzalloc(
      -	COUNT * (STRIDE) * (SIZE)
      +	array3_size(COUNT, STRIDE, SIZE)
        , ...)
      |
        kzalloc(
      -	(COUNT) * STRIDE * (SIZE)
      +	array3_size(COUNT, STRIDE, SIZE)
        , ...)
      |
        kzalloc(
      -	(COUNT) * (STRIDE) * (SIZE)
      +	array3_size(COUNT, STRIDE, SIZE)
        , ...)
      |
        kzalloc(
      -	COUNT * STRIDE * SIZE
      +	array3_size(COUNT, STRIDE, SIZE)
        , ...)
      )
      
      // Any remaining multi-factor products, first at least 3-factor products,
      // when they're not all constants...
      @@
      expression E1, E2, E3;
      constant C1, C2, C3;
      @@
      
      (
        kzalloc(C1 * C2 * C3, ...)
      |
        kzalloc(
      -	(E1) * E2 * E3
      +	array3_size(E1, E2, E3)
        , ...)
      |
        kzalloc(
      -	(E1) * (E2) * E3
      +	array3_size(E1, E2, E3)
        , ...)
      |
        kzalloc(
      -	(E1) * (E2) * (E3)
      +	array3_size(E1, E2, E3)
        , ...)
      |
        kzalloc(
      -	E1 * E2 * E3
      +	array3_size(E1, E2, E3)
        , ...)
      )
      
      // And then all remaining 2 factors products when they're not all constants,
      // keeping sizeof() as the second factor argument.
      @@
      expression THING, E1, E2;
      type TYPE;
      constant C1, C2, C3;
      @@
      
      (
        kzalloc(sizeof(THING) * C2, ...)
      |
        kzalloc(sizeof(TYPE) * C2, ...)
      |
        kzalloc(C1 * C2 * C3, ...)
      |
        kzalloc(C1 * C2, ...)
      |
      - kzalloc
      + kcalloc
        (
      -	sizeof(TYPE) * (E2)
      +	E2, sizeof(TYPE)
        , ...)
      |
      - kzalloc
      + kcalloc
        (
      -	sizeof(TYPE) * E2
      +	E2, sizeof(TYPE)
        , ...)
      |
      - kzalloc
      + kcalloc
        (
      -	sizeof(THING) * (E2)
      +	E2, sizeof(THING)
        , ...)
      |
      - kzalloc
      + kcalloc
        (
      -	sizeof(THING) * E2
      +	E2, sizeof(THING)
        , ...)
      |
      - kzalloc
      + kcalloc
        (
      -	(E1) * E2
      +	E1, E2
        , ...)
      |
      - kzalloc
      + kcalloc
        (
      -	(E1) * (E2)
      +	E1, E2
        , ...)
      |
      - kzalloc
      + kcalloc
        (
      -	E1 * E2
      +	E1, E2
        , ...)
      )
      Signed-off-by: NKees Cook <keescook@chromium.org>
      6396bb22
  25. 21 5月, 2018 1 次提交
  26. 15 5月, 2018 1 次提交
  27. 14 5月, 2018 1 次提交