[SeaBIOS] [PATCH 4/4] cleanup smp_setup()
Igor Mammedov
imammedo at redhat.com
Wed May 11 11:50:36 CEST 2016
On Tue, 10 May 2016 16:43:34 +0200
Igor Mammedov <imammedo at redhat.com> wrote:
> MaxCountCPUs could never be 0 or less CountCPUs
> anymore, remove code that wouldn't be executed.
>
> Signed-off-by: Igor Mammedov <imammedo at redhat.com>
> ---
> src/fw/smp.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/src/fw/smp.c b/src/fw/smp.c
> index 18a4c77..4d82502 100644
> --- a/src/fw/smp.c
> +++ b/src/fw/smp.c
> @@ -175,8 +175,6 @@ smp_setup(void)
> *(u64*)BUILD_AP_BOOT_ADDR = old;
Also looking at usage of BUILD_AP_BOOT_ADDR, it doesn't seem
to user anywhere beside of smp_setup() and
smp_setup every time overwrites it to point to entry_smp trampoline
So saving/restoring 'old' value doesn't look like necessary,
should it be cleaned up as well?
>
> handle_x2apic();
> - if (!MaxCountCPUs || MaxCountCPUs < CountCPUs)
> - MaxCountCPUs = CountCPUs;
>
> dprintf(1, "Found %d cpu(s) max supported %d cpu(s)\n", CountCPUs,
> MaxCountCPUs);
More information about the SeaBIOS
mailing list