From 10d569ea1a6083eec6022dfd1e6b35e74c962ee3 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Wed, 11 May 2016 07:44:57 -0700 Subject: x86: Fix up PIRQ routing table checksum earlier PIRQ routing table checksum is fixed up in copy_pirq_routing_table(), which is fine if we only write the configuration table once. But with the SeaBIOS case, when we write the table for the second time, the checksum will be fixed up to zero per the checksum algorithm, which is caused by the checksum field not being zero before fix up, since the checksum has already been calculated in the first run. To fix this, move the checksum fixup to create_pirq_routing_table(), so that copy_pirq_routing_table() only does what its function name suggests: copy the table to somewhere else. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- arch/x86/lib/pirq_routing.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'arch/x86/lib') diff --git a/arch/x86/lib/pirq_routing.c b/arch/x86/lib/pirq_routing.c index 3cc6adbbbb..a93d355d8a 100644 --- a/arch/x86/lib/pirq_routing.c +++ b/arch/x86/lib/pirq_routing.c @@ -10,7 +10,6 @@ #include #include #include -#include static bool irq_already_routed[16]; @@ -111,9 +110,6 @@ u32 copy_pirq_routing_table(u32 addr, struct irq_routing_table *rt) { struct irq_routing_table *rom_rt; - /* Fix up the table checksum */ - rt->checksum = table_compute_checksum(rt, rt->size); - /* Align the table to be 16 byte aligned */ addr = ALIGN(addr, 16); -- cgit v1.2.1