mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lv Zheng <lv.zheng@intel.com>
To: "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Len Brown <len.brown@intel.com>
Cc: Lv Zheng <lv.zheng@intel.com>, Lv Zheng <zetalog@gmail.com>,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	Bob Moore <robert.moore@intel.com>
Subject: [PATCH 02/18] ACPICA: Hardware: Remove bit_offset masking support
Date: Wed, 28 Dec 2016 15:28:14 +0800	[thread overview]
Message-ID: <0af34dc41c65ffb7457c261bdbb64dbf014ed598.1482821486.git.lv.zheng@intel.com> (raw)
In-Reply-To: <cover.1482821486.git.lv.zheng@intel.com>

ACPICA commit bc7c5291865e099ce01f345d0265f0eba6997e23

This linuxized ACPICA commit is a back port result of the following
Linux commit:
  Commit c3bc26d4b4e36f0dc458eea8b1f722d8a8d9addd
  Subject: ACPICA: ACPI 2.0, Hardware: Add access_width/bit_offset
           support in acpi_hw_read()

The commit was in ACPICA and Linux upstream, after reversion and
re-integration, it is designed not to do bit_offset masking (bit_offset is
only used to determine the boundary of the register) inside of the ACPICA
APIs, but let the callers to do that as:
1. Register can have different masking schemes (W1C, W0C);
2. Normally a mask value will be provided for region format GAS.
So actually the callers are the only ones having the knowledge of masking
the register values. Suggested by Bob Moore, Fixed by Lv Zheng.

Link: https://github.com/acpica/acpica/commit/bc7c5291
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 drivers/acpi/acpica/hwregs.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/acpi/acpica/hwregs.c b/drivers/acpi/acpica/hwregs.c
index 3b7fb99..115c223 100644
--- a/drivers/acpi/acpica/hwregs.c
+++ b/drivers/acpi/acpica/hwregs.c
@@ -252,20 +252,6 @@ acpi_status acpi_hw_read(u32 *value, struct acpi_generic_address *reg)
 							   &value32,
 							   access_width);
 			}
-
-			/*
-			 * Use offset style bit masks because:
-			 * bit_offset < access_width/bit_width < access_width, and
-			 * access_width is ensured to be less than 32-bits by
-			 * acpi_hw_validate_register().
-			 */
-			if (bit_offset) {
-				value32 &= ACPI_MASK_BITS_BELOW(bit_offset);
-				bit_offset = 0;
-			}
-			if (bit_width < access_width) {
-				value32 &= ACPI_MASK_BITS_ABOVE(bit_width);
-			}
 		}
 
 		/*
-- 
2.7.4

  parent reply	other threads:[~2016-12-28  7:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-28  7:28 [PATCH 00/18] ACPICA 20161222 Release Lv Zheng
2016-12-28  7:28 ` [PATCH 01/18] ACPICA: Debugger: Rename debugger OSL names Lv Zheng
2016-12-28  7:28 ` Lv Zheng [this message]
2016-12-28  7:28 ` [PATCH 03/18] ACPICA: Hardware: Add access_width/bit_offset support in acpi_hw_write() Lv Zheng
2016-12-28  7:28 ` [PATCH 04/18] ACPICA: Utilities: Add power of two rounding support Lv Zheng
2016-12-28  7:28 ` [PATCH 05/18] ACPICA: Hardware: Sort access bit width algorithm Lv Zheng
2016-12-28  7:28 ` [PATCH 06/18] ACPICA: Macro header: Fix some typos in comments. No functional change Lv Zheng
2016-12-28  7:28 ` [PATCH 07/18] ACPICA: Hardware: Add sleep register hooks Lv Zheng
2016-12-28  7:28 ` [PATCH 08/18] ACPICA: Linux-specific header: Add support for s390x compilation Lv Zheng
2016-12-28  7:29 ` [PATCH 09/18] ACPICA: MSVC: Fix MSVC6 build issues Lv Zheng
2016-12-28  7:29 ` [PATCH 10/18] ACPICA: EFI: Add efihello demo application Lv Zheng
2016-12-28  7:29 ` [PATCH 11/18] ACPICA: Disassembler: Add Switch/Case disassembly support Lv Zheng
2016-12-28  7:29 ` [PATCH 12/18] ACPICA: Utilities: Update debug output Lv Zheng
2016-12-28  7:29 ` [PATCH 13/18] ACPICA: Resources: Not a valid resource if buffer length too long Lv Zheng
2016-12-28  7:29 ` [PATCH 15/18] ACPICA: Parser: Allow method invocations as target operands Lv Zheng
2016-12-28  7:29 ` [PATCH 16/18] ACPICA: Fix a problem with recent extra support for control method invocations Lv Zheng
2016-12-28  7:29 ` [PATCH 17/18] ACPICA: Parser: Update parse info table for some operators Lv Zheng
2016-12-28  7:30 ` [PATCH 18/18] ACPICA: Update version to 20161222 Lv Zheng
2017-01-02 22:19 ` [PATCH 00/18] ACPICA 20161222 Release Rafael J. Wysocki
2017-01-03  5:23   ` Zheng, Lv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0af34dc41c65ffb7457c261bdbb64dbf014ed598.1482821486.git.lv.zheng@intel.com \
    --to=lv.zheng@intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=robert.moore@intel.com \
    --cc=zetalog@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®