mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Yinghai Lu" <yhlu.kernel@gmail.com>
To: "Cyrill Gorcunov" <gorcunov@gmail.com>
Cc: mingo@elte.hu, macro@linux-mips.org, hpa@zytor.com,
	tglx@linutronix.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/8] x86: apic - unify hard_smp_processor_id
Date: Sat, 23 Aug 2008 12:13:21 -0700	[thread overview]
Message-ID: <86802c440808231213j9a2ffdem548ca91570c981b1@mail.gmail.com> (raw)
In-Reply-To: <ad4298d4a7d4eb0bf4611765df4481ac129b5db6.1219491572.git.gorcunov@gmail.com>

On Sat, Aug 23, 2008 at 6:01 AM, Cyrill Gorcunov <gorcunov@gmail.com> wrote:
> Move hard_smp_processor_id to apic_32.c.
> There is no need to keep it in header - we are linked to
> apic_xx.c code anyway.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
> ---
>  arch/x86/kernel/apic_32.c |    5 +++++
>  include/asm-x86/smp.h     |   10 ----------
>  2 files changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c
> index ad295cf..c71a77c 100644
> --- a/arch/x86/kernel/apic_32.c
> +++ b/arch/x86/kernel/apic_32.c
> @@ -1569,6 +1569,11 @@ void __cpuinit generic_processor_info(int apicid, int version)
>        cpu_set(cpu, cpu_present_map);
>  }
>
> +int hard_smp_processor_id(void)
> +{
> +       return read_apic_id();
> +}
> +
>  /*
>  * Power management
>  */
> diff --git a/include/asm-x86/smp.h b/include/asm-x86/smp.h
> index 29324c1..914a73d 100644
> --- a/include/asm-x86/smp.h
> +++ b/include/asm-x86/smp.h
> @@ -185,17 +185,7 @@ static inline unsigned int read_apic_id(void)
>  }
>  #endif
>
> -
> -# if defined(APIC_DEFINITION) || defined(CONFIG_X86_64)
>  extern int hard_smp_processor_id(void);
> -# else
> -#include <mach_apicdef.h>
> -static inline int hard_smp_processor_id(void)
> -{
> -       /* we don't want to mark this access volatile - bad code generation */
> -       return read_apic_id();
> -}
> -# endif /* APIC_DEFINITION */
>
>  #else /* CONFIG_X86_LOCAL_APIC */
>
> --
> 1.6.0.6.gc667
>
>

this one seems have some problem with 32bit with genericarch

because we have

int hard_smp_processor_id(void)
{
        return genapic->get_apic_id(*(unsigned long *)(APIC_BASE+APIC_ID));
}

arch/x86/mach-generic/probe.c

updated 64 bit to have MACRO.

YH

  reply	other threads:[~2008-08-23 19:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-23 13:01 [PATCH 0/8] tip/x86/apic - merging snippet Cyrill Gorcunov
2008-08-23 13:01 ` [PATCH 1/8] x86: apic_64.c - setup_APIC_timer has to be __cpuinit function Cyrill Gorcunov
2008-08-23 13:01   ` [PATCH 2/8] x86: apic - introduce get_physical_broadcast for 64bit Cyrill Gorcunov
2008-08-23 13:01   ` [PATCH 3/8] x86: apic - unify setup_apicpmtimer Cyrill Gorcunov
2008-08-23 13:01   ` [PATCH 4/8] x86: apic_64.c - add sanity check for spurious vector definition Cyrill Gorcunov
2008-08-23 13:01   ` [PATCH 5/8] x86: apic - unify hard_smp_processor_id Cyrill Gorcunov
2008-08-23 19:13     ` Yinghai Lu [this message]
2008-08-23 19:45       ` Cyrill Gorcunov
2008-08-23 20:16         ` Yinghai Lu
2008-08-23 20:18         ` Cyrill Gorcunov
2008-08-23 13:01   ` [PATCH 6/8] x86: apic - unify setup_local_APIC Cyrill Gorcunov
2008-08-23 13:01   ` [PATCH 7/8] x86: apic_32.c should use __cpuinit section Cyrill Gorcunov
2008-08-23 13:01   ` [PATCH 8/8] x86: apic - unify smp_apic_timer_interrupt Cyrill Gorcunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86802c440808231213j9a2ffdem548ca91570c981b1@mail.gmail.com \
    --to=yhlu.kernel@gmail.com \
    --cc=gorcunov@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=macro@linux-mips.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®