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

Commit bdbcdd48 authored by Tejun Heo's avatar Tejun Heo
Browse files

x86: uv cleanup



Impact: cleanup

Make the following uv related cleanups.

* collect visible uv related definitions and interfaces into uv/uv.h
  and use it.  this cleans up the messy situation where on 64bit, uv
  is defined properly, on 32bit generic it's dummy and on the rest
  undefined.  after this clean up, uv is defined on 64 and dummy on
  32.

* update uv_flush_tlb_others() such that it takes cpumask of
  to-be-flushed cpus as argument, instead of that minus self, and
  returns yet-to-be-flushed cpumask, instead of modifying the passed
  in parameter.  this interface change will ease dummy implementation
  of uv_flush_tlb_others() and makes uv tlb flush related stuff
  defined in tlb_uv proper.

Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent d650a514
Loading
Loading
Loading
Loading
+0 −7
Original line number Original line Diff line number Diff line
@@ -138,11 +138,4 @@ struct genapic {
extern struct genapic *genapic;
extern struct genapic *genapic;
extern void es7000_update_genapic_to_cluster(void);
extern void es7000_update_genapic_to_cluster(void);


enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};
#define get_uv_system_type()		UV_NONE
#define is_uv_system()			0
#define uv_wakeup_secondary(a, b)	1
#define uv_system_init()		do {} while (0)


#endif /* _ASM_X86_GENAPIC_32_H */
#endif /* _ASM_X86_GENAPIC_32_H */
+0 −6
Original line number Original line Diff line number Diff line
@@ -51,15 +51,9 @@ extern struct genapic apic_x2apic_phys;
extern int acpi_madt_oem_check(char *, char *);
extern int acpi_madt_oem_check(char *, char *);


extern void apic_send_IPI_self(int vector);
extern void apic_send_IPI_self(int vector);
enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};
extern enum uv_system_type get_uv_system_type(void);
extern int is_uv_system(void);


extern struct genapic apic_x2apic_uv_x;
extern struct genapic apic_x2apic_uv_x;
DECLARE_PER_CPU(int, x2apic_extra_bits);
DECLARE_PER_CPU(int, x2apic_extra_bits);
extern void uv_cpu_init(void);
extern void uv_system_init(void);
extern int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip);


extern void setup_apic_routing(void);
extern void setup_apic_routing(void);


+33 −0
Original line number Original line Diff line number Diff line
#ifndef _ASM_X86_UV_UV_H
#define _ASM_X86_UV_UV_H

enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};

#ifdef CONFIG_X86_64

extern enum uv_system_type get_uv_system_type(void);
extern int is_uv_system(void);
extern void uv_cpu_init(void);
extern void uv_system_init(void);
extern int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip);
extern const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask,
						 struct mm_struct *mm,
						 unsigned long va,
						 unsigned int cpu);

#else	/* X86_64 */

static inline enum uv_system_type get_uv_system_type(void) { return UV_NONE; }
static inline int is_uv_system(void)	{ return 0; }
static inline void uv_cpu_init(void)	{ }
static inline void uv_system_init(void)	{ }
static inline int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip)
{ return 1; }
static inline const struct cpumask *
uv_flush_tlb_others(const struct cpumask *cpumask, struct mm_struct *mm,
		    unsigned long va, unsigned int cpu)
{ return cpumask; }

#endif	/* X86_64 */

#endif	/* _ASM_X86_UV_UV_H */
+0 −2
Original line number Original line Diff line number Diff line
@@ -325,8 +325,6 @@ static inline void bau_cpubits_clear(struct bau_local_cpumask *dstp, int nbits)
#define cpubit_isset(cpu, bau_local_cpumask) \
#define cpubit_isset(cpu, bau_local_cpumask) \
	test_bit((cpu), (bau_local_cpumask).bits)
	test_bit((cpu), (bau_local_cpumask).bits)


extern int uv_flush_tlb_others(struct cpumask *,
			       struct mm_struct *, unsigned long);
extern void uv_bau_message_intr1(void);
extern void uv_bau_message_intr1(void);
extern void uv_bau_timeout_intr1(void);
extern void uv_bau_timeout_intr1(void);


+1 −0
Original line number Original line Diff line number Diff line
@@ -28,6 +28,7 @@
#include <asm/apic.h>
#include <asm/apic.h>
#include <mach_apic.h>
#include <mach_apic.h>
#include <asm/genapic.h>
#include <asm/genapic.h>
#include <asm/uv/uv.h>
#endif
#endif


#include <asm/pgtable.h>
#include <asm/pgtable.h>
Loading