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

Commit e5428ede authored by Natalie.Protasevich@unisys.com's avatar Natalie.Protasevich@unisys.com Committed by Linus Torvalds
Browse files

[PATCH] Compilation fix for ES7000 when no ACPI is specified in config (i386)



ES7000 platform code clean up for compilation errors and a warning.
Ifdef'd the ACPI related parts in the ES7000 platform code.  They were
causing compile errors in certain configuration (without ACPI defined).  I
think this approach would be best (as opposed to Kconfig changes) since it
only touches the subarch...

Signed-off-by: default avatar <Natalie.Protasevich@unisys.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 54a20f8c
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -828,6 +828,8 @@ void __init find_smp_config (void)
		smp_scan_config(address, 0x400);
		smp_scan_config(address, 0x400);
}
}


int es7000_plat;

/* --------------------------------------------------------------------------
/* --------------------------------------------------------------------------
                            ACPI-based MP Configuration
                            ACPI-based MP Configuration
   -------------------------------------------------------------------------- */
   -------------------------------------------------------------------------- */
@@ -1011,8 +1013,6 @@ void __init mp_override_legacy_irq (
	return;
	return;
}
}


int es7000_plat;

void __init mp_config_acpi_legacy_irqs (void)
void __init mp_config_acpi_legacy_irqs (void)
{
{
	struct mpc_config_intsrc intsrc;
	struct mpc_config_intsrc intsrc;
+4 −1
Original line number Original line Diff line number Diff line
@@ -83,6 +83,7 @@ struct es7000_oem_table {
	struct psai psai;
	struct psai psai;
};
};


#ifdef CONFIG_ACPI
struct acpi_table_sdt {
struct acpi_table_sdt {
	unsigned long pa;
	unsigned long pa;
	unsigned long count;
	unsigned long count;
@@ -99,6 +100,9 @@ struct oem_table {
	u32 OEMTableSize;
	u32 OEMTableSize;
};
};


extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
#endif

struct mip_reg {
struct mip_reg {
	unsigned long long off_0;
	unsigned long long off_0;
	unsigned long long off_8;
	unsigned long long off_8;
@@ -114,7 +118,6 @@ struct mip_reg {
#define	MIP_FUNC(VALUE) 	(VALUE & 0xff)
#define	MIP_FUNC(VALUE) 	(VALUE & 0xff)


extern int parse_unisys_oem (char *oemptr);
extern int parse_unisys_oem (char *oemptr);
extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
extern void setup_unisys(void);
extern void setup_unisys(void);
extern int es7000_start_cpu(int cpu, unsigned long eip);
extern int es7000_start_cpu(int cpu, unsigned long eip);
extern void es7000_sw_apic(void);
extern void es7000_sw_apic(void);
+2 −4
Original line number Original line Diff line number Diff line
@@ -51,8 +51,6 @@ struct mip_reg *host_reg;
int 			mip_port;
int 			mip_port;
unsigned long		mip_addr, host_addr;
unsigned long		mip_addr, host_addr;


#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI)

/*
/*
 * GSI override for ES7000 platforms.
 * GSI override for ES7000 platforms.
 */
 */
@@ -76,8 +74,6 @@ es7000_rename_gsi(int ioapic, int gsi)
	return gsi;
	return gsi;
}
}


#endif	/* (CONFIG_X86_IO_APIC) && (CONFIG_ACPI) */

void __init
void __init
setup_unisys(void)
setup_unisys(void)
{
{
@@ -160,6 +156,7 @@ parse_unisys_oem (char *oemptr)
	return es7000_plat;
	return es7000_plat;
}
}


#ifdef CONFIG_ACPI
int __init
int __init
find_unisys_acpi_oem_table(unsigned long *oem_addr)
find_unisys_acpi_oem_table(unsigned long *oem_addr)
{
{
@@ -212,6 +209,7 @@ find_unisys_acpi_oem_table(unsigned long *oem_addr)
	}
	}
	return -1;
	return -1;
}
}
#endif


static void
static void
es7000_spin(int n)
es7000_spin(int n)
+8 −2
Original line number Original line Diff line number Diff line
@@ -30,7 +30,8 @@ static inline int mps_oem_check(struct mp_config_table *mpc, char *oem,
	return 0;
	return 0;
}
}


static inline int es7000_check_dsdt()
#ifdef CONFIG_ACPI
static inline int es7000_check_dsdt(void)
{
{
	struct acpi_table_header *header = NULL;
	struct acpi_table_header *header = NULL;
	if(!acpi_get_table_header_early(ACPI_DSDT, &header))
	if(!acpi_get_table_header_early(ACPI_DSDT, &header))
@@ -54,6 +55,11 @@ static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id)
	}
	}
	return 0;
	return 0;
}
}

#else
static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id)
{
	return 0;
}
#endif


#endif /* __ASM_MACH_MPPARSE_H */
#endif /* __ASM_MACH_MPPARSE_H */