Module Name:    src
Committed By:   msaitoh
Date:           Thu Oct 18 05:20:06 UTC 2018

Modified Files:
        src/usr.sbin/acpitools/acpidump: acpi.c

Log Message:
 Fix output of Cache type in PPTT.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/usr.sbin/acpitools/acpidump/acpi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/acpitools/acpidump/acpi.c
diff -u src/usr.sbin/acpitools/acpidump/acpi.c:1.37 src/usr.sbin/acpitools/acpidump/acpi.c:1.38
--- src/usr.sbin/acpitools/acpidump/acpi.c:1.37	Thu Oct 18 05:04:44 2018
+++ src/usr.sbin/acpitools/acpidump/acpi.c	Thu Oct 18 05:20:05 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.37 2018/10/18 05:04:44 msaitoh Exp $ */
+/* $NetBSD: acpi.c,v 1.38 2018/10/18 05:20:05 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 1998 Doug Rabson
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: acpi.c,v 1.37 2018/10/18 05:04:44 msaitoh Exp $");
+__RCSID("$NetBSD: acpi.c,v 1.38 2018/10/18 05:20:05 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/endian.h>
@@ -2102,8 +2102,7 @@ acpi_print_pptt_cache(ACPI_PPTT_CACHE *c
 		printf("\tAssociativity=%d\n", cache->Associativity);
 	if (cache->Flags & ACPI_PPTT_ALLOCATION_TYPE_VALID) {
 		printf("\tAllocation type=");
-		switch (__SHIFTOUT(cache->Attributes,
-			ACPI_PPTT_MASK_ALLOCATION_TYPE)) {
+		switch (cache->Attributes & ACPI_PPTT_MASK_ALLOCATION_TYPE) {
 		case ACPI_PPTT_CACHE_READ_ALLOCATE:
 			printf("Read allocate\n");
 			break;
@@ -2118,8 +2117,7 @@ acpi_print_pptt_cache(ACPI_PPTT_CACHE *c
 	}
 	if (cache->Flags & ACPI_PPTT_CACHE_TYPE_VALID) {
 		printf("\tCache type=");
-		switch (__SHIFTOUT(cache->Attributes,
-			ACPI_PPTT_MASK_CACHE_TYPE)) {
+		switch (cache->Attributes & ACPI_PPTT_MASK_CACHE_TYPE) {
 		case ACPI_PPTT_CACHE_TYPE_DATA:
 			printf("Data\n");
 			break;

Reply via email to