Re: [PATCH 1/3] Add Numachip APIC support

From: Ingo Molnar
Date: Thu Oct 27 2011 - 03:37:19 EST



* Daniel J Blueman <daniel@xxxxxxxxxxxxxxxxxx> wrote:

> From: Steffen Persvold <sp@xxxxxxxxxxxxx>
>
> From: Steffen Persvold <sp@xxxxxxxxxxxxx>

Please fix these duplicate lines.

> Add support for Numascale's NumaChip APIC mapping mechanism to allow
> booting more than ~168 cores.
>
> v2:
> - [Steffen] enumerate only accessible northbridges
> - [Daniel] rediffed and validated against 3.1-rc10
>
> Signed-off-by: Steffen Persvold <sp@xxxxxxxxxxxxx>
> Signed-off-by: Daniel J Blueman <daniel@xxxxxxxxxxxxxxxxxx>

> +/*
> + * Set up the logical destination ID.
> + *
> + * Intel recommends to set DFR, LDR and TPR before enabling
> + * an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel
> + * document number 292116).
> + */
> +static void numachip_init_apic_ldr(void)
> +{
> + unsigned long val;
> + unsigned long num, id;
> +
> + num = smp_processor_id();
> + id = 1UL << num;
> + apic_write(APIC_DFR, APIC_DFR_FLAT);
> + val = apic_read(APIC_LDR) & ~APIC_LDR_MASK;
> + val |= SET_APIC_LOGICAL_ID(id);
> + apic_write(APIC_LDR, val);
> +}

Looks like a flat out copy of arch/x86/kernel/apic/apic_flat_64.c's
flat_init_apic_ldr(). Please make that function global instead of
copying it.

Also, when you copy another file to derive your new code from you
*MUST* refer in your copyright notices to the code you copied from.

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/