]> git.sur5r.net Git - u-boot/commit
x86: Fix up PIRQ routing table checksum earlier
authorBin Meng <bmeng.cn@gmail.com>
Wed, 11 May 2016 14:44:57 +0000 (07:44 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Mon, 23 May 2016 07:18:00 +0000 (15:18 +0800)
commit10d569ea1a6083eec6022dfd1e6b35e74c962ee3
tree2c23445b2e70b405509d59116017b585e9cc0162
parent1e2f7b9e8e077cb6937204c305d554ef7a970be5
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 <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/irq.c
arch/x86/lib/pirq_routing.c