Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1207413ybl; Sun, 1 Dec 2019 23:06:29 -0800 (PST) X-Google-Smtp-Source: APXvYqxx2xihV4bF864jaMKS6lo3PQyQfzdW+EQTZnCrq46TnIZRz3xyaPMN97jfTkpBgAFExQFF X-Received: by 2002:a17:906:692:: with SMTP id u18mr22290118ejb.295.1575270389034; Sun, 01 Dec 2019 23:06:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575270389; cv=none; d=google.com; s=arc-20160816; b=SJlxPqUY1Lh1XrxQZNI/jF2b0iqVLLDC6KLGoogYNPecCKBURuYHqB2/WUGivSipWg iJPZFZl3ox4tUtGsQRALa2/N97KzBGSr1qFFLNGRElfw+zw4Jdyvv/3mXaDOpw0wS81F D4Gzg9NbUSzxF/3rZEUE+JU6PJYtmsNRHh7QcHyAn4ScZwjpL/2Bkca/8s/K2/z1A0j5 1DQMk2WilozzYbqwcUN9uioy7Cfo5UGdOOjm4KObJlalDxV5cVK8Pl+2666OeJ7vQOzW 0E3B6jQPB7J5wd72mq1JJGN909fKjQt5PTFiFb5yqOrj9hrLzLGgO42S33iWkRighcD0 4pgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Ecl31pEOzPWYAEMVKbaj+BiCL+XKZei1OStA6vzQdZA=; b=0CxI51VmDrSh/+bVrMtXk9Q1D5QWWqPbwkVBdSx6y+xZsjzlFCQ7gGLokRYBV53MxU 4iZrAoB1Jm+KQiRmZApz+lBEFDZoe8NJ0Vs/JhZiLzvqcvWEjbGgx3r7dNDxzBxgTt73 YDdrURKWRGgsdCjna0hFP0RXYPMy49ASDVGfZ6X9iLa0CXOGqZIH26Q+Td4njCHNZ1Cz xDa6mqQSJj3yMS+F2SNAivQ2+PpgBGCQYimI/luCAxjKM3ixTxQx42qo4ZT4FEPMBSLp A3AesTAAxKQuEqzqZE70BjKpZTSR5uZneUr4jQYrFfXtG8uZWxX5F5aULS2HpGVbKexh VPSw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z10si1509406ejr.64.2019.12.01.23.06.05; Sun, 01 Dec 2019 23:06:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726142AbfLBHDy (ORCPT + 99 others); Mon, 2 Dec 2019 02:03:54 -0500 Received: from mga03.intel.com ([134.134.136.65]:4373 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725965AbfLBHDy (ORCPT ); Mon, 2 Dec 2019 02:03:54 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Dec 2019 23:03:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,268,1571727600"; d="scan'208";a="207980148" Received: from tao-optiplex-7060.sh.intel.com ([10.239.159.36]) by fmsmga008.fm.intel.com with ESMTP; 01 Dec 2019 23:03:51 -0800 From: Tao Xu To: rafael.j.wysocki@intel.com, lenb@kernel.org, keith.busch@intel.com, gregkh@linuxfoundation.org, dan.j.williams@intel.com, dave.hansen@linux.intel.com Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Tao Xu Subject: [PATCH] ACPI/HMAT: Fix the parsing of Cache Associativity and Write Policy Date: Mon, 2 Dec 2019 15:03:48 +0800 Message-Id: <20191202070348.32148-1-tao3.xu@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In chapter 5.2.27.5, Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec: 0 is "None", 1 is "Direct Mapped", 2 is "Complex Cache Indexing" for Cache Associativity; 0 is "None", 1 is "Write Back", 2 is "Write Through" for Write Policy. Signed-off-by: Tao Xu --- drivers/acpi/numa/hmat.c | 4 ++-- include/linux/node.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c index 2c32cfb72370..719d0279563d 100644 --- a/drivers/acpi/numa/hmat.c +++ b/drivers/acpi/numa/hmat.c @@ -383,7 +383,7 @@ static __init int hmat_parse_cache(union acpi_subtable_headers *header, break; case ACPI_HMAT_CA_NONE: default: - tcache->cache_attrs.indexing = NODE_CACHE_OTHER; + tcache->cache_attrs.indexing = NODE_CACHE_NONE; break; } @@ -396,7 +396,7 @@ static __init int hmat_parse_cache(union acpi_subtable_headers *header, break; case ACPI_HMAT_CP_NONE: default: - tcache->cache_attrs.write_policy = NODE_CACHE_WRITE_OTHER; + tcache->cache_attrs.write_policy = NODE_CACHE_WRITE_NONE; break; } list_add_tail(&tcache->node, &target->caches); diff --git a/include/linux/node.h b/include/linux/node.h index 4866f32a02d8..6dbd764d09ce 100644 --- a/include/linux/node.h +++ b/include/linux/node.h @@ -36,15 +36,15 @@ struct node_hmem_attrs { }; enum cache_indexing { + NODE_CACHE_NONE, NODE_CACHE_DIRECT_MAP, NODE_CACHE_INDEXED, - NODE_CACHE_OTHER, }; enum cache_write_policy { + NODE_CACHE_WRITE_NONE, NODE_CACHE_WRITE_BACK, NODE_CACHE_WRITE_THROUGH, - NODE_CACHE_WRITE_OTHER, }; /** -- 2.20.1