diff mbox

[U-Boot,v2,10/18] x86: acpi: Remove the unnecessary checksum calculation of DSDT

Message ID 1462977912-13666-11-git-send-email-bmeng.cn@gmail.com
State Accepted
Commit 17b63c80bffbaad344a4f6dd2363830e13ed8c03
Delegated to: Bin Meng
Headers show

Commit Message

Bin Meng May 11, 2016, 2:45 p.m. UTC
The generated AmlCode[] from IASL already has the calculated DSDT
table checksum in place. No need for us to calculate it again.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>

---

Changes in v2:
- New patch to remove the unnecessary checksum calculation of DSDT

 arch/x86/lib/acpi_table.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Simon Glass May 19, 2016, 4 a.m. UTC | #1
On 11 May 2016 at 08:45, Bin Meng <bmeng.cn@gmail.com> wrote:
> The generated AmlCode[] from IASL already has the calculated DSDT
> table checksum in place. No need for us to calculate it again.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>
> ---
>
> Changes in v2:
> - New patch to remove the unnecessary checksum calculation of DSDT
>
>  arch/x86/lib/acpi_table.c | 6 ------
>  1 file changed, 6 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Bin Meng May 23, 2016, 7:01 a.m. UTC | #2
On Thu, May 19, 2016 at 12:00 PM, Simon Glass <sjg@chromium.org> wrote:
> On 11 May 2016 at 08:45, Bin Meng <bmeng.cn@gmail.com> wrote:
>> The generated AmlCode[] from IASL already has the calculated DSDT
>> table checksum in place. No need for us to calculate it again.
>>
>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>>
>> ---
>>
>> Changes in v2:
>> - New patch to remove the unnecessary checksum calculation of DSDT
>>
>>  arch/x86/lib/acpi_table.c | 6 ------
>>  1 file changed, 6 deletions(-)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>

applied to u-boot-x86, thanks!
diff mbox

Patch

diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c
index a9fe243..05c958d 100644
--- a/arch/x86/lib/acpi_table.c
+++ b/arch/x86/lib/acpi_table.c
@@ -382,12 +382,6 @@  u32 write_acpi_tables(u32 start)
 			(char *)&AmlCode + sizeof(struct acpi_table_header),
 			dsdt->length - sizeof(struct acpi_table_header));
 		current += dsdt->length - sizeof(struct acpi_table_header);
-
-		/* (Re)calculate length and checksum */
-		dsdt->length = current - (u32)dsdt;
-		dsdt->checksum = 0;
-		dsdt->checksum = table_compute_checksum((void *)dsdt,
-				dsdt->length);
 	}
 	current = ALIGN(current, 16);