Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 352887d1 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

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: default avatarIngo Molnar <mingo@elte.hu>
parent d3185b37
Loading
Loading
Loading
Loading
+33 −70
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@
 *
 * http://www.unisys.com
 */

#include <linux/notifier.h>
#include <linux/spinlock.h>
#include <linux/cpumask.h>
@@ -63,11 +62,23 @@
#define	MIP_BUSY			1
#define	MIP_SPIN			0xf0000
#define	MIP_VALID			0x0100000000000000ULL
#define	MIP_SW_APIC			0x1020b

#define	MIP_PORT(val)			((val >> 32) & 0xffff)

#define	MIP_RD_LO(val)			(val & 0xffffffff)

struct mip_reg {
	unsigned long long		off_0x00;
	unsigned long long		off_0x08;
	unsigned long long		off_0x10;
	unsigned long long		off_0x18;
	unsigned long long		off_0x20;
	unsigned long long		off_0x28;
	unsigned long long		off_0x30;
	unsigned long long		off_0x38;
};

struct mip_reg_info {
	unsigned long long		mip_info;
	unsigned long long		delivery_info;
@@ -75,69 +86,20 @@ struct mip_reg_info {
	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 es7000_oem_table {
	struct acpi_table_header	Header;
	u32				OEMTableAddr;
	u32				OEMTableSize;
};

#endif

struct mip_reg {
	unsigned long long		off_0x00;
	unsigned long long		off_0x08;
	unsigned long long		off_0x10;
	unsigned long long		off_0x18;
	unsigned long long		off_0x20;
	unsigned long long		off_0x28;
	unsigned long long		off_0x30;
	unsigned long long		off_0x38;
};

#define	MIP_SW_APIC			0x1020b
#define	MIP_FUNC(VALUE)			(VALUE & 0xff)

#define APIC_DFR_VALUE_CLUSTER		(APIC_DFR_CLUSTER)
#define INT_DELIVERY_MODE_CLUSTER	(dest_LowestPrio)
#define INT_DEST_MODE_CLUSTER		(1) /* logical delivery broadcast to all procs */

#define APIC_DFR_VALUE			(APIC_DFR_FLAT)

/*
 * 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))) {
		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_size = t->OEMTableSize;
@@ -486,7 +448,7 @@ static void es7000_init_apic_ldr_cluster(void)
	unsigned long val;
	int cpu = smp_processor_id();

	apic_write(APIC_DFR, APIC_DFR_VALUE_CLUSTER);
	apic_write(APIC_DFR, APIC_DFR_CLUSTER);
	val = calculate_ldr(cpu);
	apic_write(APIC_LDR, val);
}
@@ -496,7 +458,7 @@ static void es7000_init_apic_ldr(void)
	unsigned long val;
	int cpu = smp_processor_id();

	apic_write(APIC_DFR, APIC_DFR_VALUE);
	apic_write(APIC_DFR, APIC_DFR_FLAT);
	val = calculate_ldr(cpu);
	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)
{
	apic->target_cpus = target_cpus_cluster;
	apic->irq_delivery_mode = INT_DELIVERY_MODE_CLUSTER;
	apic->irq_dest_mode = INT_DEST_MODE_CLUSTER;
	apic->irq_delivery_mode = dest_LowestPrio;
	/* logical delivery broadcast to all procs: */
	apic->irq_dest_mode = 1;

	apic->init_apic_ldr = es7000_init_apic_ldr_cluster;