mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-22 09:22:37 +00:00
x86, apic: remove apicid_cluster()
There were multiple definitions of apicid_cluster() scattered around in APIC drivers - but the definitions are equivalent to the already existing generic APIC_CLUSTER() method. So remove apicid_cluster() and change all users to APIC_CLUSTER(). No code changed: md5: 1b8244ba8d3d6a454593ce10f09dfa58 summit_32.o.before.asm 1b8244ba8d3d6a454593ce10f09dfa58 summit_32.o.after.asm md5: a593d98a882bf534622c70d9568497ac es7000_32.o.before.asm a593d98a882bf534622c70d9568497ac es7000_32.o.after.asm Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
2c4ce18c95
commit
b9e0d1aa97
@ -146,8 +146,6 @@ extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
|
||||
extern void unmap_unisys_acpi_oem_table(unsigned long oem_addr);
|
||||
extern void setup_unisys(void);
|
||||
|
||||
#define apicid_cluster(apicid) (apicid & 0xF0)
|
||||
|
||||
/*
|
||||
* ES7000 Globals
|
||||
*/
|
||||
@ -595,8 +593,7 @@ es7000_cpu_mask_to_apicid_cluster(const struct cpumask *cpumask)
|
||||
if (cpumask_test_cpu(cpu, cpumask)) {
|
||||
int new_apicid = es7000_cpu_to_logical_apicid(cpu);
|
||||
|
||||
if (apicid_cluster(apicid) !=
|
||||
apicid_cluster(new_apicid)) {
|
||||
if (APIC_CLUSTER(apicid) != APIC_CLUSTER(new_apicid)) {
|
||||
printk ("%s: Not a valid mask!\n", __func__);
|
||||
|
||||
return 0xFF;
|
||||
@ -630,8 +627,7 @@ static unsigned int es7000_cpu_mask_to_apicid(const cpumask_t *cpumask)
|
||||
if (cpu_isset(cpu, *cpumask)) {
|
||||
int new_apicid = es7000_cpu_to_logical_apicid(cpu);
|
||||
|
||||
if (apicid_cluster(apicid) !=
|
||||
apicid_cluster(new_apicid)) {
|
||||
if (APIC_CLUSTER(apicid) != APIC_CLUSTER(new_apicid)) {
|
||||
printk ("%s: Not a valid mask!\n", __func__);
|
||||
|
||||
return es7000_cpu_to_logical_apicid(0);
|
||||
|
@ -375,8 +375,6 @@ static inline unsigned long numaq_check_apicid_present(int bit)
|
||||
return physid_isset(bit, phys_cpu_present_map);
|
||||
}
|
||||
|
||||
#define apicid_cluster(apicid) (apicid & 0xF0)
|
||||
|
||||
static inline int numaq_apic_id_registered(void)
|
||||
{
|
||||
return 1;
|
||||
|
@ -207,14 +207,12 @@ static inline unsigned long summit_check_apicid_present(int bit)
|
||||
return 1;
|
||||
}
|
||||
|
||||
#define apicid_cluster(apicid) ((apicid) & XAPIC_DEST_CLUSTER_MASK)
|
||||
|
||||
static inline void summit_init_apic_ldr(void)
|
||||
{
|
||||
unsigned long val, id;
|
||||
int count = 0;
|
||||
u8 my_id = (u8)hard_smp_processor_id();
|
||||
u8 my_cluster = (u8)apicid_cluster(my_id);
|
||||
u8 my_cluster = APIC_CLUSTER(my_id);
|
||||
#ifdef CONFIG_SMP
|
||||
u8 lid;
|
||||
int i;
|
||||
@ -222,7 +220,7 @@ static inline void summit_init_apic_ldr(void)
|
||||
/* Create logical APIC IDs by counting CPUs already in cluster. */
|
||||
for (count = 0, i = nr_cpu_ids; --i >= 0; ) {
|
||||
lid = cpu_2_logical_apicid[i];
|
||||
if (lid != BAD_APICID && apicid_cluster(lid) == my_cluster)
|
||||
if (lid != BAD_APICID && APIC_CLUSTER(lid) == my_cluster)
|
||||
++count;
|
||||
}
|
||||
#endif
|
||||
@ -319,8 +317,7 @@ static inline unsigned int summit_cpu_mask_to_apicid(const cpumask_t *cpumask)
|
||||
if (cpu_isset(cpu, *cpumask)) {
|
||||
int new_apicid = summit_cpu_to_logical_apicid(cpu);
|
||||
|
||||
if (apicid_cluster(apicid) !=
|
||||
apicid_cluster(new_apicid)) {
|
||||
if (APIC_CLUSTER(apicid) != APIC_CLUSTER(new_apicid)) {
|
||||
printk ("%s: Not a valid mask!\n", __func__);
|
||||
|
||||
return 0xFF;
|
||||
|
Loading…
Reference in New Issue
Block a user