Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136597
b: refs/heads/master
c: ca6c8ed
h: refs/heads/master
i:
  136595: f2c2381
v: v3
  • Loading branch information
Ingo Molnar committed Jan 28, 2009
1 parent c8724f9 commit d268f70
Show file tree
Hide file tree
Showing 18 changed files with 33 additions and 42 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9c7642470ecf03d8b4946a2addc8fe631b8426dd
refs/heads/master: ca6c8ed4646f8ccaa4f7db618bf69b8b8fb49767
6 changes: 2 additions & 4 deletions trunk/arch/x86/include/asm/bigsmp/apicdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@

#define APIC_ID_MASK (0xFF<<24)

static inline unsigned get_apic_id(unsigned long x)
static inline unsigned bigsmp_get_apic_id(unsigned long x)
{
return (((x)>>24)&0xFF);
return (x >> 24) & 0xFF;
}

#define GET_APIC_ID(x) get_apic_id(x)

#endif
6 changes: 2 additions & 4 deletions trunk/arch/x86/include/asm/es7000/apicdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@

#define APIC_ID_MASK (0xFF<<24)

static inline unsigned get_apic_id(unsigned long x)
static inline unsigned int es7000_get_apic_id(unsigned long x)
{
return (((x)>>24)&0xFF);
return (x >> 24) & 0xFF;
}

#define GET_APIC_ID(x) get_apic_id(x)

#endif
2 changes: 1 addition & 1 deletion trunk/arch/x86/include/asm/mach-default/mach_apic.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ static inline const struct cpumask *default_target_cpus(void)
#include <asm/genapic.h>
#define cpu_mask_to_apicid (apic->cpu_mask_to_apicid)
#define cpu_mask_to_apicid_and (apic->cpu_mask_to_apicid_and)
#define read_apic_id() (GET_APIC_ID(apic_read(APIC_ID)))
#define read_apic_id() (apic->get_apic_id(apic_read(APIC_ID)))
#define send_IPI_self (apic->send_IPI_self)
#define wakeup_secondary_cpu (apic->wakeup_cpu)
extern void default_setup_apic_routing(void);
Expand Down
10 changes: 5 additions & 5 deletions trunk/arch/x86/include/asm/mach-default/mach_apicdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@

#ifdef CONFIG_X86_64
#define APIC_ID_MASK (apic->apic_id_mask)
#define GET_APIC_ID(x) (apic->get_apic_id(x))
#define SET_APIC_ID(x) (apic->set_apic_id(x))
#else
#define APIC_ID_MASK (0xF<<24)
static inline unsigned get_apic_id(unsigned long x)

static inline unsigned default_get_apic_id(unsigned long x)
{
unsigned int ver = GET_APIC_VERSION(apic_read(APIC_LVR));

if (APIC_XAPIC(ver))
return (((x)>>24)&0xFF);
return (x >> 24) & 0xFF;
else
return (((x)>>24)&0xF);
return (x >> 24) & 0x0F;
}

#define GET_APIC_ID(x) get_apic_id(x)
#endif

#endif /* _ASM_X86_MACH_DEFAULT_MACH_APICDEF_H */
1 change: 0 additions & 1 deletion trunk/arch/x86/include/asm/mach-generic/mach_apicdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#ifndef APIC_DEFINITION
#include <asm/genapic.h>

#define GET_APIC_ID (apic->get_apic_id)
#define APIC_ID_MASK (apic->apic_id_mask)
#endif

Expand Down
7 changes: 2 additions & 5 deletions trunk/arch/x86/include/asm/numaq/apicdef.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
#ifndef __ASM_NUMAQ_APICDEF_H
#define __ASM_NUMAQ_APICDEF_H


#define APIC_ID_MASK (0xF<<24)

static inline unsigned get_apic_id(unsigned long x)
static inline unsigned int numaq_get_apic_id(unsigned long x)
{
return (((x)>>24)&0x0F);
return (x >> 24) & 0x0F;
}

#define GET_APIC_ID(x) get_apic_id(x)

#endif
2 changes: 1 addition & 1 deletion trunk/arch/x86/include/asm/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ static inline unsigned int read_apic_id(void)

reg = *(u32 *)(APIC_BASE + APIC_ID);

return GET_APIC_ID(reg);
return apic->get_apic_id(reg);
}
#endif

Expand Down
6 changes: 2 additions & 4 deletions trunk/arch/x86/include/asm/summit/apicdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@

#define APIC_ID_MASK (0xFF<<24)

static inline unsigned get_apic_id(unsigned long x)
static inline unsigned summit_get_apic_id(unsigned long x)
{
return (x>>24)&0xFF;
return (x >> 24) & 0xFF;
}

#define GET_APIC_ID(x) get_apic_id(x)

#endif
9 changes: 5 additions & 4 deletions trunk/arch/x86/kernel/genapic_flat_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,12 @@ static void flat_send_IPI_all(int vector)
__send_IPI_shortcut(APIC_DEST_ALLINC, vector, apic->dest_logical);
}

static unsigned int get_apic_id(unsigned long x)
static unsigned int flat_get_apic_id(unsigned long x)
{
unsigned int id;

id = (((x)>>24) & 0xFFu);

return id;
}

Expand All @@ -146,7 +147,7 @@ static unsigned int read_xapic_id(void)
{
unsigned int id;

id = get_apic_id(apic_read(APIC_ID));
id = flat_get_apic_id(apic_read(APIC_ID));
return id;
}

Expand Down Expand Up @@ -205,7 +206,7 @@ struct genapic apic_flat = {
.phys_pkg_id = flat_phys_pkg_id,
.mps_oem_check = NULL,

.get_apic_id = get_apic_id,
.get_apic_id = flat_get_apic_id,
.set_apic_id = set_apic_id,
.apic_id_mask = 0xFFu << 24,

Expand Down Expand Up @@ -349,7 +350,7 @@ struct genapic apic_physflat = {
.phys_pkg_id = flat_phys_pkg_id,
.mps_oem_check = NULL,

.get_apic_id = get_apic_id,
.get_apic_id = flat_get_apic_id,
.set_apic_id = set_apic_id,
.apic_id_mask = 0xFFu<<24,

Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/x86/kernel/genx2apic_cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ static unsigned int x2apic_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
return BAD_APICID;
}

static unsigned int get_apic_id(unsigned long x)
static unsigned int x2apic_cluster_phys_get_apic_id(unsigned long x)
{
unsigned int id;

Expand Down Expand Up @@ -207,7 +207,7 @@ struct genapic apic_x2apic_cluster = {
.phys_pkg_id = x2apic_cluster_phys_pkg_id,
.mps_oem_check = NULL,

.get_apic_id = get_apic_id,
.get_apic_id = x2apic_cluster_phys_get_apic_id,
.set_apic_id = set_apic_id,
.apic_id_mask = 0xFFFFFFFFu,

Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/x86/kernel/genx2apic_phys.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ static unsigned int x2apic_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
return BAD_APICID;
}

static unsigned int get_apic_id(unsigned long x)
static unsigned int x2apic_phys_get_apic_id(unsigned long x)
{
unsigned int id;

Expand Down Expand Up @@ -203,7 +203,7 @@ struct genapic apic_x2apic_phys = {
.phys_pkg_id = x2apic_phys_pkg_id,
.mps_oem_check = NULL,

.get_apic_id = get_apic_id,
.get_apic_id = x2apic_phys_get_apic_id,
.set_apic_id = set_apic_id,
.apic_id_mask = 0xFFFFFFFFu,

Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/x86/kernel/genx2apic_uv_x.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ static unsigned int uv_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
return BAD_APICID;
}

static unsigned int get_apic_id(unsigned long x)
static unsigned int x2apic_get_apic_id(unsigned long x)
{
unsigned int id;

Expand All @@ -223,7 +223,7 @@ static unsigned long set_apic_id(unsigned int id)
static unsigned int uv_read_apic_id(void)
{

return get_apic_id(apic_read(APIC_ID));
return x2apic_get_apic_id(apic_read(APIC_ID));
}

static int uv_phys_pkg_id(int initial_apicid, int index_msb)
Expand Down Expand Up @@ -268,7 +268,7 @@ struct genapic apic_x2apic_uv_x = {
.phys_pkg_id = uv_phys_pkg_id,
.mps_oem_check = NULL,

.get_apic_id = get_apic_id,
.get_apic_id = x2apic_get_apic_id,
.set_apic_id = set_apic_id,
.apic_id_mask = 0xFFFFFFFFu,

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/mach-generic/bigsmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ struct genapic apic_bigsmp = {
.phys_pkg_id = bigsmp_phys_pkg_id,
.mps_oem_check = NULL,

.get_apic_id = get_apic_id,
.get_apic_id = bigsmp_get_apic_id,
.set_apic_id = NULL,
.apic_id_mask = APIC_ID_MASK,

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/mach-generic/default.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ struct genapic apic_default = {
.phys_pkg_id = default_phys_pkg_id,
.mps_oem_check = NULL,

.get_apic_id = get_apic_id,
.get_apic_id = default_get_apic_id,
.set_apic_id = NULL,
.apic_id_mask = APIC_ID_MASK,

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/mach-generic/es7000.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ struct genapic apic_es7000 = {
.phys_pkg_id = es7000_phys_pkg_id,
.mps_oem_check = es7000_mps_oem_check,

.get_apic_id = get_apic_id,
.get_apic_id = es7000_get_apic_id,
.set_apic_id = NULL,
.apic_id_mask = APIC_ID_MASK,

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/mach-generic/numaq.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ struct genapic apic_numaq = {
.phys_pkg_id = numaq_phys_pkg_id,
.mps_oem_check = __numaq_mps_oem_check,

.get_apic_id = get_apic_id,
.get_apic_id = numaq_get_apic_id,
.set_apic_id = NULL,
.apic_id_mask = APIC_ID_MASK,

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/mach-generic/summit.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ struct genapic apic_summit = {
.phys_pkg_id = summit_phys_pkg_id,
.mps_oem_check = summit_mps_oem_check,

.get_apic_id = get_apic_id,
.get_apic_id = summit_get_apic_id,
.set_apic_id = NULL,
.apic_id_mask = APIC_ID_MASK,

Expand Down

0 comments on commit d268f70

Please sign in to comment.