x86, es7000: remove dead code, clean up
Impact: cleanup - a number of structure definitions were stale - remove needless wrappers around apic definitions - fix details noticed by checkpatch No code changed: md5: 029d8fde0aaf6e934ea63bd8b36430fd es7000_32.o.before.asm 029d8fde0aaf6e934ea63bd8b36430fd es7000_32.o.after.asm Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -23,7 +23,6 @@
|
|||||||
*
|
*
|
||||||
* http://www.unisys.com
|
* http://www.unisys.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/notifier.h>
|
#include <linux/notifier.h>
|
||||||
#include <linux/spinlock.h>
|
#include <linux/spinlock.h>
|
||||||
#include <linux/cpumask.h>
|
#include <linux/cpumask.h>
|
||||||
@@ -63,61 +62,12 @@
|
|||||||
#define MIP_BUSY 1
|
#define MIP_BUSY 1
|
||||||
#define MIP_SPIN 0xf0000
|
#define MIP_SPIN 0xf0000
|
||||||
#define MIP_VALID 0x0100000000000000ULL
|
#define MIP_VALID 0x0100000000000000ULL
|
||||||
|
#define MIP_SW_APIC 0x1020b
|
||||||
|
|
||||||
#define MIP_PORT(val) ((val >> 32) & 0xffff)
|
#define MIP_PORT(val) ((val >> 32) & 0xffff)
|
||||||
|
|
||||||
#define MIP_RD_LO(val) (val & 0xffffffff)
|
#define MIP_RD_LO(val) (val & 0xffffffff)
|
||||||
|
|
||||||
struct mip_reg_info {
|
|
||||||
unsigned long long mip_info;
|
|
||||||
unsigned long long delivery_info;
|
|
||||||
unsigned long long host_reg;
|
|
||||||
unsigned long long mip_reg;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct part_info {
|
|
||||||
unsigned char type;
|
|
||||||
unsigned char length;
|
|
||||||
unsigned char part_id;
|
|
||||||
unsigned char apic_mode;
|
|
||||||
unsigned long snum;
|
|
||||||
char ptype[16];
|
|
||||||
char sname[64];
|
|
||||||
char pname[64];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct psai {
|
|
||||||
unsigned long long entry_type;
|
|
||||||
unsigned long long addr;
|
|
||||||
unsigned long long bep_addr;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct es7000_mem_info {
|
|
||||||
unsigned char type;
|
|
||||||
unsigned char length;
|
|
||||||
unsigned char resv[6];
|
|
||||||
unsigned long long start;
|
|
||||||
unsigned long long size;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct es7000_oem_table {
|
|
||||||
unsigned long long hdr;
|
|
||||||
struct mip_reg_info mip;
|
|
||||||
struct part_info pif;
|
|
||||||
struct es7000_mem_info shm;
|
|
||||||
struct psai psai;
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef CONFIG_ACPI
|
|
||||||
|
|
||||||
struct oem_table {
|
|
||||||
struct acpi_table_header Header;
|
|
||||||
u32 OEMTableAddr;
|
|
||||||
u32 OEMTableSize;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct mip_reg {
|
struct mip_reg {
|
||||||
unsigned long long off_0x00;
|
unsigned long long off_0x00;
|
||||||
unsigned long long off_0x08;
|
unsigned long long off_0x08;
|
||||||
@@ -129,14 +79,26 @@ struct mip_reg {
|
|||||||
unsigned long long off_0x38;
|
unsigned long long off_0x38;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MIP_SW_APIC 0x1020b
|
struct mip_reg_info {
|
||||||
#define MIP_FUNC(VALUE) (VALUE & 0xff)
|
unsigned long long mip_info;
|
||||||
|
unsigned long long delivery_info;
|
||||||
|
unsigned long long host_reg;
|
||||||
|
unsigned long long mip_reg;
|
||||||
|
};
|
||||||
|
|
||||||
#define APIC_DFR_VALUE_CLUSTER (APIC_DFR_CLUSTER)
|
struct psai {
|
||||||
#define INT_DELIVERY_MODE_CLUSTER (dest_LowestPrio)
|
unsigned long long entry_type;
|
||||||
#define INT_DEST_MODE_CLUSTER (1) /* logical delivery broadcast to all procs */
|
unsigned long long addr;
|
||||||
|
unsigned long long bep_addr;
|
||||||
|
};
|
||||||
|
|
||||||
#define APIC_DFR_VALUE (APIC_DFR_FLAT)
|
#ifdef CONFIG_ACPI
|
||||||
|
struct es7000_oem_table {
|
||||||
|
struct acpi_table_header Header;
|
||||||
|
u32 OEMTableAddr;
|
||||||
|
u32 OEMTableSize;
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ES7000 Globals
|
* ES7000 Globals
|
||||||
@@ -302,7 +264,7 @@ static int __init find_unisys_acpi_oem_table(unsigned long *oem_addr)
|
|||||||
|
|
||||||
while (ACPI_SUCCESS(acpi_get_table_with_size("OEM1", i++, &header, &tbl_size))) {
|
while (ACPI_SUCCESS(acpi_get_table_with_size("OEM1", i++, &header, &tbl_size))) {
|
||||||
if (!memcmp((char *) &header->oem_id, "UNISYS", 6)) {
|
if (!memcmp((char *) &header->oem_id, "UNISYS", 6)) {
|
||||||
struct oem_table *t = (struct oem_table *)header;
|
struct es7000_oem_table *t = (void *)header;
|
||||||
|
|
||||||
oem_addrX = t->OEMTableAddr;
|
oem_addrX = t->OEMTableAddr;
|
||||||
oem_size = t->OEMTableSize;
|
oem_size = t->OEMTableSize;
|
||||||
@@ -486,7 +448,7 @@ static void es7000_init_apic_ldr_cluster(void)
|
|||||||
unsigned long val;
|
unsigned long val;
|
||||||
int cpu = smp_processor_id();
|
int cpu = smp_processor_id();
|
||||||
|
|
||||||
apic_write(APIC_DFR, APIC_DFR_VALUE_CLUSTER);
|
apic_write(APIC_DFR, APIC_DFR_CLUSTER);
|
||||||
val = calculate_ldr(cpu);
|
val = calculate_ldr(cpu);
|
||||||
apic_write(APIC_LDR, val);
|
apic_write(APIC_LDR, val);
|
||||||
}
|
}
|
||||||
@@ -496,7 +458,7 @@ static void es7000_init_apic_ldr(void)
|
|||||||
unsigned long val;
|
unsigned long val;
|
||||||
int cpu = smp_processor_id();
|
int cpu = smp_processor_id();
|
||||||
|
|
||||||
apic_write(APIC_DFR, APIC_DFR_VALUE);
|
apic_write(APIC_DFR, APIC_DFR_FLAT);
|
||||||
val = calculate_ldr(cpu);
|
val = calculate_ldr(cpu);
|
||||||
apic_write(APIC_LDR, val);
|
apic_write(APIC_LDR, val);
|
||||||
}
|
}
|
||||||
@@ -658,8 +620,9 @@ static int es7000_phys_pkg_id(int cpuid_apic, int index_msb)
|
|||||||
void __init es7000_update_genapic_to_cluster(void)
|
void __init es7000_update_genapic_to_cluster(void)
|
||||||
{
|
{
|
||||||
apic->target_cpus = target_cpus_cluster;
|
apic->target_cpus = target_cpus_cluster;
|
||||||
apic->irq_delivery_mode = INT_DELIVERY_MODE_CLUSTER;
|
apic->irq_delivery_mode = dest_LowestPrio;
|
||||||
apic->irq_dest_mode = INT_DEST_MODE_CLUSTER;
|
/* logical delivery broadcast to all procs: */
|
||||||
|
apic->irq_dest_mode = 1;
|
||||||
|
|
||||||
apic->init_apic_ldr = es7000_init_apic_ldr_cluster;
|
apic->init_apic_ldr = es7000_init_apic_ldr_cluster;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user