coreboot-kgpe-d16/src/mainboard/gigabyte
Patrick Georgi b0a9c5ccf3 mptable: Refactor mptable generation some more
The last couple of lines of every mptable function were mostly
identical. Refactor into common code, a new function mptable_finalize.

Coccinelle script:
  @@
  identifier mc;
  @@
  (
  -mc->mpe_checksum = smp_compute_checksum(smp_next_mpc_entry(mc), mc->mpe_length);
  -mc->mpc_checksum = smp_compute_checksum(mc, mc->mpc_length);
  -printk(BIOS_DEBUG, "Wrote the mp table end at: %p - %p\n", mc, smp_next_mpe_entry(mc));
  -return smp_next_mpe_entry(mc);
  +return mptable_finalize(mc);
  |
  -mc->mpe_checksum = smp_compute_checksum(smp_next_mpc_entry(mc), mc->mpe_length);
  -mc->mpc_checksum = smp_compute_checksum(mc, mc->mpc_length);
  -return smp_next_mpe_entry(mc);
  +return mptable_finalize(mc);
  )

Change-Id: Ib2270d800bdd486c5eb49b328544d36bd2298c9e
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/246
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marcj303@gmail.com>
2011-10-13 01:11:08 +02:00
..
ga-6bxc run uart_init() from console_init, just like the other console initialization functions. 2011-04-20 20:54:07 +00:00
ga-6bxe run uart_init() from console_init, just like the other console initialization functions. 2011-04-20 20:54:07 +00:00
ga_2761gxdk mptable: Refactor mptable generation some more 2011-10-13 01:11:08 +02:00
m57sli mptable: Refactor mptable generation some more 2011-10-13 01:11:08 +02:00
ma78gm mptable: Refactor mptable generation some more 2011-10-13 01:11:08 +02:00
ma785gmt mptable: Refactor mptable generation some more 2011-10-13 01:11:08 +02:00
Kconfig Minor ma785gmt clean-up 2011-08-25 15:43:10 +02:00