Messages in this thread | | | Date | Thu, 27 Oct 2011 09:35:33 +0200 | From | Ingo Molnar <> | Subject | Re: [PATCH 1/3] Add Numachip APIC support |
| |
* Daniel J Blueman <daniel@numascale-asia.com> wrote:
> From: Steffen Persvold <sp@numascale.com> > > From: Steffen Persvold <sp@numascale.com>
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@numascale.com> > Signed-off-by: Daniel J Blueman <daniel@numascale-asia.com>
> +/* > + * 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
| |