Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1407796 > unrolled thread
| Started by | Lv Zheng <lv.zheng@intel.com> |
|---|---|
| First post | 2016-05-27 05:50 +0200 |
| Last post | 2016-05-27 06:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] ACPICA / hardware: Fix address check in acpi_hw_get_access_bit_width() Lv Zheng <lv.zheng@intel.com> - 2016-05-27 05:50 +0200
RE: [PATCH] ACPICA / hardware: Fix address check in acpi_hw_get_access_bit_width() "Zheng, Lv" <lv.zheng@intel.com> - 2016-05-27 06:00 +0200
| From | Lv Zheng <lv.zheng@intel.com> |
|---|---|
| Date | 2016-05-27 05:50 +0200 |
| Subject | [PATCH] ACPICA / hardware: Fix address check in acpi_hw_get_access_bit_width() |
| Message-ID | <rDgWC-6Eh-5@gated-at.bofh.it> |
The address check in acpi_hw_get_access_bit_width() should be byte size
based, not bit width based. This patch fixes this mistake.
Reported-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/acpica/hwregs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/acpica/hwregs.c b/drivers/acpi/acpica/hwregs.c
index 0f18dbc..74a591b 100644
--- a/drivers/acpi/acpica/hwregs.c
+++ b/drivers/acpi/acpica/hwregs.c
@@ -95,7 +95,7 @@ acpi_hw_get_access_bit_width(struct acpi_generic_address *reg, u8 max_bit_width)
if (!reg->bit_offset && reg->bit_width &&
ACPI_IS_POWER_OF_TWO(reg->bit_width) &&
ACPI_IS_ALIGNED(reg->bit_width, 8) &&
- ACPI_IS_ALIGNED(address, reg->bit_width)) {
+ ACPI_IS_ALIGNED(address, reg->bit_width >> 3)) {
return (reg->bit_width);
} else {
if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_IO) {
--
1.7.10
[toc] | [next] | [standalone]
| From | "Zheng, Lv" <lv.zheng@intel.com> |
|---|---|
| Date | 2016-05-27 06:00 +0200 |
| Subject | RE: [PATCH] ACPICA / hardware: Fix address check in acpi_hw_get_access_bit_width() |
| Message-ID | <rDh6h-6HB-1@gated-at.bofh.it> |
| In reply to | #1407796 |
Hi, Boris
Can you help to confirm if this can fix all of the issues you saw in the older qemu.
Thanks and best regards
-Lv
> From: Zheng, Lv
> Subject: [PATCH] ACPICA / hardware: Fix address check in
> acpi_hw_get_access_bit_width()
>
> The address check in acpi_hw_get_access_bit_width() should be byte size
> based, not bit width based. This patch fixes this mistake.
>
> Reported-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Suggested-by: Jan Beulich <jbeulich@suse.com>
> Signed-off-by: Lv Zheng <lv.zheng@intel.com>
> ---
> drivers/acpi/acpica/hwregs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/acpica/hwregs.c b/drivers/acpi/acpica/hwregs.c
> index 0f18dbc..74a591b 100644
> --- a/drivers/acpi/acpica/hwregs.c
> +++ b/drivers/acpi/acpica/hwregs.c
> @@ -95,7 +95,7 @@ acpi_hw_get_access_bit_width(struct
> acpi_generic_address *reg, u8 max_bit_width)
> if (!reg->bit_offset && reg->bit_width &&
> ACPI_IS_POWER_OF_TWO(reg->bit_width) &&
> ACPI_IS_ALIGNED(reg->bit_width, 8) &&
> - ACPI_IS_ALIGNED(address, reg->bit_width)) {
> + ACPI_IS_ALIGNED(address, reg->bit_width >> 3)) {
> return (reg->bit_width);
> } else {
> if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_IO)
> {
> --
> 1.7.10
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web