diff options
| author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-13 15:00:22 +0000 | 
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-13 15:00:22 +0000 | 
| commit | 4de3a8e101150feaefa1139611a50ff37467f33e (patch) | |
| tree | daada742542518b02d7db7c5d32e715eaa5f166d /arch/x86/include | |
| parent | 294064f58953f9964e5945424b09c51800330a83 (diff) | |
| parent | 099469502f62fbe0d7e4f0b83a2f22538367f734 (diff) | |
| download | olio-linux-3.10-4de3a8e101150feaefa1139611a50ff37467f33e.tar.xz olio-linux-3.10-4de3a8e101150feaefa1139611a50ff37467f33e.zip  | |
Merge branch 'master' into fixes
Diffstat (limited to 'arch/x86/include')
| -rw-r--r-- | arch/x86/include/asm/amd_nb.h | 2 | ||||
| -rw-r--r-- | arch/x86/include/asm/bootparam.h | 2 | ||||
| -rw-r--r-- | arch/x86/include/asm/cpufeature.h | 3 | ||||
| -rw-r--r-- | arch/x86/include/asm/efi.h | 4 | ||||
| -rw-r--r-- | arch/x86/include/asm/fixmap.h | 2 | ||||
| -rw-r--r-- | arch/x86/include/asm/init.h | 2 | ||||
| -rw-r--r-- | arch/x86/include/asm/iommu.h | 1 | ||||
| -rw-r--r-- | arch/x86/include/asm/kvm_emulate.h | 2 | ||||
| -rw-r--r-- | arch/x86/include/asm/kvm_host.h | 90 | ||||
| -rw-r--r-- | arch/x86/include/asm/mce.h | 2 | ||||
| -rw-r--r-- | arch/x86/include/asm/mrst.h | 2 | ||||
| -rw-r--r-- | arch/x86/include/asm/pci.h | 9 | ||||
| -rw-r--r-- | arch/x86/include/asm/pci_x86.h | 2 | ||||
| -rw-r--r-- | arch/x86/include/asm/percpu.h | 28 | ||||
| -rw-r--r-- | arch/x86/include/asm/serpent.h | 63 | ||||
| -rw-r--r-- | arch/x86/include/asm/setup.h | 2 | ||||
| -rw-r--r-- | arch/x86/include/asm/smp.h | 6 | ||||
| -rw-r--r-- | arch/x86/include/asm/thread_info.h | 6 | ||||
| -rw-r--r-- | arch/x86/include/asm/topology.h | 2 | ||||
| -rw-r--r-- | arch/x86/include/asm/x86_init.h | 1 | 
20 files changed, 170 insertions, 61 deletions
diff --git a/arch/x86/include/asm/amd_nb.h b/arch/x86/include/asm/amd_nb.h index 8e41071704a..49ad773f4b9 100644 --- a/arch/x86/include/asm/amd_nb.h +++ b/arch/x86/include/asm/amd_nb.h @@ -1,6 +1,7 @@  #ifndef _ASM_X86_AMD_NB_H  #define _ASM_X86_AMD_NB_H +#include <linux/ioport.h>  #include <linux/pci.h>  struct amd_nb_bus_dev_range { @@ -13,6 +14,7 @@ extern const struct pci_device_id amd_nb_misc_ids[];  extern const struct amd_nb_bus_dev_range amd_nb_bus_dev_ranges[];  extern bool early_is_amd_nb(u32 value); +extern struct resource *amd_get_mmconfig_range(struct resource *res);  extern int amd_cache_northbridges(void);  extern void amd_flush_garts(void);  extern int amd_numa_init(void); diff --git a/arch/x86/include/asm/bootparam.h b/arch/x86/include/asm/bootparam.h index e020d88ec02..2f90c51cc49 100644 --- a/arch/x86/include/asm/bootparam.h +++ b/arch/x86/include/asm/bootparam.h @@ -64,6 +64,8 @@ struct setup_header {  	__u32	payload_offset;  	__u32	payload_length;  	__u64	setup_data; +	__u64	pref_address; +	__u32	init_size;  } __attribute__((packed));  struct sys_desc_table { diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index f3444f700f3..17c5d4bdee5 100644 --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86/include/asm/cpufeature.h @@ -197,7 +197,10 @@  /* Intel-defined CPU features, CPUID level 0x00000007:0 (ebx), word 9 */  #define X86_FEATURE_FSGSBASE	(9*32+ 0) /* {RD/WR}{FS/GS}BASE instructions*/ +#define X86_FEATURE_BMI1	(9*32+ 3) /* 1st group bit manipulation extensions */ +#define X86_FEATURE_AVX2	(9*32+ 5) /* AVX2 instructions */  #define X86_FEATURE_SMEP	(9*32+ 7) /* Supervisor Mode Execution Protection */ +#define X86_FEATURE_BMI2	(9*32+ 8) /* 2nd group bit manipulation extensions */  #define X86_FEATURE_ERMS	(9*32+ 9) /* Enhanced REP MOVSB/STOSB */  #if defined(__KERNEL__) && !defined(__ASSEMBLY__) diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h index 7093e4a6a0b..844f735fd63 100644 --- a/arch/x86/include/asm/efi.h +++ b/arch/x86/include/asm/efi.h @@ -3,6 +3,8 @@  #ifdef CONFIG_X86_32 +#define EFI_LOADER_SIGNATURE	"EL32" +  extern unsigned long asmlinkage efi_call_phys(void *, ...);  #define efi_call_phys0(f)		efi_call_phys(f) @@ -37,6 +39,8 @@ extern unsigned long asmlinkage efi_call_phys(void *, ...);  #else /* !CONFIG_X86_32 */ +#define EFI_LOADER_SIGNATURE	"EL64" +  extern u64 efi_call0(void *fp);  extern u64 efi_call1(void *fp, u64 arg1);  extern u64 efi_call2(void *fp, u64 arg1, u64 arg2); diff --git a/arch/x86/include/asm/fixmap.h b/arch/x86/include/asm/fixmap.h index 460c74e4852..4da3c0c4c97 100644 --- a/arch/x86/include/asm/fixmap.h +++ b/arch/x86/include/asm/fixmap.h @@ -117,7 +117,7 @@ enum fixed_addresses {  #endif  	FIX_TEXT_POKE1,	/* reserve 2 pages for text_poke() */  	FIX_TEXT_POKE0, /* first page is last, because allocation is backward */ -#ifdef	CONFIG_X86_MRST +#ifdef	CONFIG_X86_INTEL_MID  	FIX_LNW_VRTC,  #endif  	__end_of_permanent_fixed_addresses, diff --git a/arch/x86/include/asm/init.h b/arch/x86/include/asm/init.h index 8dbe353e41e..adcc0ae73d0 100644 --- a/arch/x86/include/asm/init.h +++ b/arch/x86/include/asm/init.h @@ -5,6 +5,8 @@  extern void __init early_ioremap_page_table_range_init(void);  #endif +extern void __init zone_sizes_init(void); +  extern unsigned long __init  kernel_physical_mapping_init(unsigned long start,  			     unsigned long end, diff --git a/arch/x86/include/asm/iommu.h b/arch/x86/include/asm/iommu.h index 345c99cef15..dffc38ee625 100644 --- a/arch/x86/include/asm/iommu.h +++ b/arch/x86/include/asm/iommu.h @@ -5,6 +5,7 @@ extern struct dma_map_ops nommu_dma_ops;  extern int force_iommu, no_iommu;  extern int iommu_detected;  extern int iommu_pass_through; +extern int iommu_group_mf;  /* 10 seconds */  #define DMAR_OPERATION_TIMEOUT ((cycles_t) tsc_khz*10*1000) diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h index a026507893e..ab4092e3214 100644 --- a/arch/x86/include/asm/kvm_emulate.h +++ b/arch/x86/include/asm/kvm_emulate.h @@ -181,6 +181,7 @@ struct x86_emulate_ops {  	int (*set_dr)(struct x86_emulate_ctxt *ctxt, int dr, ulong value);  	int (*set_msr)(struct x86_emulate_ctxt *ctxt, u32 msr_index, u64 data);  	int (*get_msr)(struct x86_emulate_ctxt *ctxt, u32 msr_index, u64 *pdata); +	int (*read_pmc)(struct x86_emulate_ctxt *ctxt, u32 pmc, u64 *pdata);  	void (*halt)(struct x86_emulate_ctxt *ctxt);  	void (*wbinvd)(struct x86_emulate_ctxt *ctxt);  	int (*fix_hypercall)(struct x86_emulate_ctxt *ctxt); @@ -364,6 +365,7 @@ enum x86_intercept {  #endif  int x86_decode_insn(struct x86_emulate_ctxt *ctxt, void *insn, int insn_len); +bool x86_page_table_writing_insn(struct x86_emulate_ctxt *ctxt);  #define EMULATION_FAILED -1  #define EMULATION_OK 0  #define EMULATION_RESTART 1 diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index b4973f4dab9..52d6640a5ca 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -16,10 +16,12 @@  #include <linux/mmu_notifier.h>  #include <linux/tracepoint.h>  #include <linux/cpumask.h> +#include <linux/irq_work.h>  #include <linux/kvm.h>  #include <linux/kvm_para.h>  #include <linux/kvm_types.h> +#include <linux/perf_event.h>  #include <asm/pvclock-abi.h>  #include <asm/desc.h> @@ -31,6 +33,8 @@  #define KVM_MEMORY_SLOTS 32  /* memory slots that does not exposed to userspace */  #define KVM_PRIVATE_MEM_SLOTS 4 +#define KVM_MEM_SLOTS_NUM (KVM_MEMORY_SLOTS + KVM_PRIVATE_MEM_SLOTS) +  #define KVM_MMIO_SIZE 16  #define KVM_PIO_PAGE_OFFSET 1 @@ -228,7 +232,7 @@ struct kvm_mmu_page {  	 * One bit set per slot which has memory  	 * in this shadow page.  	 */ -	DECLARE_BITMAP(slot_bitmap, KVM_MEMORY_SLOTS + KVM_PRIVATE_MEM_SLOTS); +	DECLARE_BITMAP(slot_bitmap, KVM_MEM_SLOTS_NUM);  	bool unsync;  	int root_count;          /* Currently serving as active root */  	unsigned int unsync_children; @@ -239,14 +243,9 @@ struct kvm_mmu_page {  	int clear_spte_count;  #endif -	struct rcu_head rcu; -}; +	int write_flooding_count; -struct kvm_pv_mmu_op_buffer { -	void *ptr; -	unsigned len; -	unsigned processed; -	char buf[512] __aligned(sizeof(long)); +	struct rcu_head rcu;  };  struct kvm_pio_request { @@ -294,6 +293,37 @@ struct kvm_mmu {  	u64 pdptrs[4]; /* pae */  }; +enum pmc_type { +	KVM_PMC_GP = 0, +	KVM_PMC_FIXED, +}; + +struct kvm_pmc { +	enum pmc_type type; +	u8 idx; +	u64 counter; +	u64 eventsel; +	struct perf_event *perf_event; +	struct kvm_vcpu *vcpu; +}; + +struct kvm_pmu { +	unsigned nr_arch_gp_counters; +	unsigned nr_arch_fixed_counters; +	unsigned available_event_types; +	u64 fixed_ctr_ctrl; +	u64 global_ctrl; +	u64 global_status; +	u64 global_ovf_ctrl; +	u64 counter_bitmask[2]; +	u64 global_ctrl_mask; +	u8 version; +	struct kvm_pmc gp_counters[X86_PMC_MAX_GENERIC]; +	struct kvm_pmc fixed_counters[X86_PMC_MAX_FIXED]; +	struct irq_work irq_work; +	u64 reprogram_pmi; +}; +  struct kvm_vcpu_arch {  	/*  	 * rip and regs accesses must go through @@ -345,19 +375,10 @@ struct kvm_vcpu_arch {  	 */  	struct kvm_mmu *walk_mmu; -	/* only needed in kvm_pv_mmu_op() path, but it's hot so -	 * put it here to avoid allocation */ -	struct kvm_pv_mmu_op_buffer mmu_op_buffer; -  	struct kvm_mmu_memory_cache mmu_pte_list_desc_cache;  	struct kvm_mmu_memory_cache mmu_page_cache;  	struct kvm_mmu_memory_cache mmu_page_header_cache; -	gfn_t last_pt_write_gfn; -	int   last_pt_write_count; -	u64  *last_pte_updated; -	gfn_t last_pte_gfn; -  	struct fpu guest_fpu;  	u64 xcr0; @@ -436,6 +457,8 @@ struct kvm_vcpu_arch {  	unsigned access;  	gfn_t mmio_gfn; +	struct kvm_pmu pmu; +  	/* used for guest single stepping over the given code position */  	unsigned long singlestep_rip; @@ -444,6 +467,9 @@ struct kvm_vcpu_arch {  	cpumask_var_t wbinvd_dirty_mask; +	unsigned long last_retry_eip; +	unsigned long last_retry_addr; +  	struct {  		bool halted;  		gfn_t gfns[roundup_pow_of_two(ASYNC_PF_PER_VCPU)]; @@ -459,7 +485,6 @@ struct kvm_arch {  	unsigned int n_requested_mmu_pages;  	unsigned int n_max_mmu_pages;  	unsigned int indirect_shadow_pages; -	atomic_t invlpg_counter;  	struct hlist_head mmu_page_hash[KVM_NUM_MMU_PAGES];  	/*  	 * Hash table of struct kvm_mmu_page. @@ -660,6 +685,8 @@ void kvm_mmu_set_mask_ptes(u64 user_mask, u64 accessed_mask,  int kvm_mmu_reset_context(struct kvm_vcpu *vcpu);  void kvm_mmu_slot_remove_write_access(struct kvm *kvm, int slot); +int kvm_mmu_rmap_write_protect(struct kvm *kvm, u64 gfn, +			       struct kvm_memory_slot *slot);  void kvm_mmu_zap_all(struct kvm *kvm);  unsigned int kvm_mmu_calculate_mmu_pages(struct kvm *kvm);  void kvm_mmu_change_mmu_pages(struct kvm *kvm, unsigned int kvm_nr_mmu_pages); @@ -668,8 +695,6 @@ int load_pdptrs(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu, unsigned long cr3);  int emulator_write_phys(struct kvm_vcpu *vcpu, gpa_t gpa,  			  const void *val, int bytes); -int kvm_pv_mmu_op(struct kvm_vcpu *vcpu, unsigned long bytes, -		  gpa_t addr, unsigned long *ret);  u8 kvm_get_guest_memory_type(struct kvm_vcpu *vcpu, gfn_t gfn);  extern bool tdp_enabled; @@ -692,6 +717,7 @@ enum emulation_result {  #define EMULTYPE_NO_DECODE	    (1 << 0)  #define EMULTYPE_TRAP_UD	    (1 << 1)  #define EMULTYPE_SKIP		    (1 << 2) +#define EMULTYPE_RETRY		    (1 << 3)  int x86_emulate_instruction(struct kvm_vcpu *vcpu, unsigned long cr2,  			    int emulation_type, void *insn, int insn_len); @@ -734,6 +760,7 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data);  unsigned long kvm_get_rflags(struct kvm_vcpu *vcpu);  void kvm_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags); +bool kvm_rdpmc(struct kvm_vcpu *vcpu);  void kvm_queue_exception(struct kvm_vcpu *vcpu, unsigned nr);  void kvm_queue_exception_e(struct kvm_vcpu *vcpu, unsigned nr, u32 error_code); @@ -754,13 +781,14 @@ int fx_init(struct kvm_vcpu *vcpu);  void kvm_mmu_flush_tlb(struct kvm_vcpu *vcpu);  void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa, -		       const u8 *new, int bytes, -		       bool guest_initiated); +		       const u8 *new, int bytes); +int kvm_mmu_unprotect_page(struct kvm *kvm, gfn_t gfn);  int kvm_mmu_unprotect_page_virt(struct kvm_vcpu *vcpu, gva_t gva);  void __kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu);  int kvm_mmu_load(struct kvm_vcpu *vcpu);  void kvm_mmu_unload(struct kvm_vcpu *vcpu);  void kvm_mmu_sync_roots(struct kvm_vcpu *vcpu); +gpa_t translate_nested_gpa(struct kvm_vcpu *vcpu, gpa_t gpa, u32 access);  gpa_t kvm_mmu_gva_to_gpa_read(struct kvm_vcpu *vcpu, gva_t gva,  			      struct x86_exception *exception);  gpa_t kvm_mmu_gva_to_gpa_fetch(struct kvm_vcpu *vcpu, gva_t gva, @@ -782,6 +810,11 @@ void kvm_disable_tdp(void);  int complete_pio(struct kvm_vcpu *vcpu);  bool kvm_check_iopl(struct kvm_vcpu *vcpu); +static inline gpa_t translate_gpa(struct kvm_vcpu *vcpu, gpa_t gpa, u32 access) +{ +	return gpa; +} +  static inline struct kvm_mmu_page *page_header(hpa_t shadow_page)  {  	struct page *page = pfn_to_page(shadow_page >> PAGE_SHIFT); @@ -894,4 +927,17 @@ extern bool kvm_find_async_pf_gfn(struct kvm_vcpu *vcpu, gfn_t gfn);  void kvm_complete_insn_gp(struct kvm_vcpu *vcpu, int err); +int kvm_is_in_guest(void); + +void kvm_pmu_init(struct kvm_vcpu *vcpu); +void kvm_pmu_destroy(struct kvm_vcpu *vcpu); +void kvm_pmu_reset(struct kvm_vcpu *vcpu); +void kvm_pmu_cpuid_update(struct kvm_vcpu *vcpu); +bool kvm_pmu_msr(struct kvm_vcpu *vcpu, u32 msr); +int kvm_pmu_get_msr(struct kvm_vcpu *vcpu, u32 msr, u64 *data); +int kvm_pmu_set_msr(struct kvm_vcpu *vcpu, u32 msr, u64 data); +int kvm_pmu_read_pmc(struct kvm_vcpu *vcpu, unsigned pmc, u64 *data); +void kvm_handle_pmu_event(struct kvm_vcpu *vcpu); +void kvm_deliver_pmi(struct kvm_vcpu *vcpu); +  #endif /* _ASM_X86_KVM_HOST_H */ diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h index 6add827381c..f35ce43c1a7 100644 --- a/arch/x86/include/asm/mce.h +++ b/arch/x86/include/asm/mce.h @@ -151,7 +151,7 @@ static inline void enable_p5_mce(void) {}  void mce_setup(struct mce *m);  void mce_log(struct mce *m); -DECLARE_PER_CPU(struct sys_device, mce_sysdev); +DECLARE_PER_CPU(struct device, mce_device);  /*   * Maximum banks number. diff --git a/arch/x86/include/asm/mrst.h b/arch/x86/include/asm/mrst.h index 93f79094c22..0a0a9546043 100644 --- a/arch/x86/include/asm/mrst.h +++ b/arch/x86/include/asm/mrst.h @@ -67,7 +67,7 @@ extern struct console early_mrst_console;  extern void mrst_early_console_init(void);  extern struct console early_hsu_console; -extern void hsu_early_console_init(void); +extern void hsu_early_console_init(const char *);  extern void intel_scu_devices_create(void);  extern void intel_scu_devices_destroy(void); diff --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h index d498943b906..df75d07571c 100644 --- a/arch/x86/include/asm/pci.h +++ b/arch/x86/include/asm/pci.h @@ -112,19 +112,28 @@ static inline void x86_teardown_msi_irq(unsigned int irq)  {  	x86_msi.teardown_msi_irq(irq);  } +static inline void x86_restore_msi_irqs(struct pci_dev *dev, int irq) +{ +	x86_msi.restore_msi_irqs(dev, irq); +}  #define arch_setup_msi_irqs x86_setup_msi_irqs  #define arch_teardown_msi_irqs x86_teardown_msi_irqs  #define arch_teardown_msi_irq x86_teardown_msi_irq +#define arch_restore_msi_irqs x86_restore_msi_irqs  /* implemented in arch/x86/kernel/apic/io_apic. */  int native_setup_msi_irqs(struct pci_dev *dev, int nvec, int type);  void native_teardown_msi_irq(unsigned int irq); +void native_restore_msi_irqs(struct pci_dev *dev, int irq);  /* default to the implementation in drivers/lib/msi.c */  #define HAVE_DEFAULT_MSI_TEARDOWN_IRQS +#define HAVE_DEFAULT_MSI_RESTORE_IRQS  void default_teardown_msi_irqs(struct pci_dev *dev); +void default_restore_msi_irqs(struct pci_dev *dev, int irq);  #else  #define native_setup_msi_irqs		NULL  #define native_teardown_msi_irq		NULL  #define default_teardown_msi_irqs	NULL +#define default_restore_msi_irqs	NULL  #endif  #define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys) diff --git a/arch/x86/include/asm/pci_x86.h b/arch/x86/include/asm/pci_x86.h index e3819780685..b3a53174602 100644 --- a/arch/x86/include/asm/pci_x86.h +++ b/arch/x86/include/asm/pci_x86.h @@ -44,8 +44,6 @@ enum pci_bf_sort_state {  /* pci-i386.c */ -extern unsigned int pcibios_max_latency; -  void pcibios_resource_survey(void);  void pcibios_set_cache_line_size(void); diff --git a/arch/x86/include/asm/percpu.h b/arch/x86/include/asm/percpu.h index 529bf07e806..7a11910a63c 100644 --- a/arch/x86/include/asm/percpu.h +++ b/arch/x86/include/asm/percpu.h @@ -414,22 +414,6 @@ do {									\  #define this_cpu_xchg_2(pcp, nval)	percpu_xchg_op(pcp, nval)  #define this_cpu_xchg_4(pcp, nval)	percpu_xchg_op(pcp, nval) -#define irqsafe_cpu_add_1(pcp, val)	percpu_add_op((pcp), val) -#define irqsafe_cpu_add_2(pcp, val)	percpu_add_op((pcp), val) -#define irqsafe_cpu_add_4(pcp, val)	percpu_add_op((pcp), val) -#define irqsafe_cpu_and_1(pcp, val)	percpu_to_op("and", (pcp), val) -#define irqsafe_cpu_and_2(pcp, val)	percpu_to_op("and", (pcp), val) -#define irqsafe_cpu_and_4(pcp, val)	percpu_to_op("and", (pcp), val) -#define irqsafe_cpu_or_1(pcp, val)	percpu_to_op("or", (pcp), val) -#define irqsafe_cpu_or_2(pcp, val)	percpu_to_op("or", (pcp), val) -#define irqsafe_cpu_or_4(pcp, val)	percpu_to_op("or", (pcp), val) -#define irqsafe_cpu_xor_1(pcp, val)	percpu_to_op("xor", (pcp), val) -#define irqsafe_cpu_xor_2(pcp, val)	percpu_to_op("xor", (pcp), val) -#define irqsafe_cpu_xor_4(pcp, val)	percpu_to_op("xor", (pcp), val) -#define irqsafe_cpu_xchg_1(pcp, nval)	percpu_xchg_op(pcp, nval) -#define irqsafe_cpu_xchg_2(pcp, nval)	percpu_xchg_op(pcp, nval) -#define irqsafe_cpu_xchg_4(pcp, nval)	percpu_xchg_op(pcp, nval) -  #ifndef CONFIG_M386  #define __this_cpu_add_return_1(pcp, val) percpu_add_return_op(pcp, val)  #define __this_cpu_add_return_2(pcp, val) percpu_add_return_op(pcp, val) @@ -445,9 +429,6 @@ do {									\  #define this_cpu_cmpxchg_2(pcp, oval, nval)	percpu_cmpxchg_op(pcp, oval, nval)  #define this_cpu_cmpxchg_4(pcp, oval, nval)	percpu_cmpxchg_op(pcp, oval, nval) -#define irqsafe_cpu_cmpxchg_1(pcp, oval, nval)	percpu_cmpxchg_op(pcp, oval, nval) -#define irqsafe_cpu_cmpxchg_2(pcp, oval, nval)	percpu_cmpxchg_op(pcp, oval, nval) -#define irqsafe_cpu_cmpxchg_4(pcp, oval, nval)	percpu_cmpxchg_op(pcp, oval, nval)  #endif /* !CONFIG_M386 */  #ifdef CONFIG_X86_CMPXCHG64 @@ -464,7 +445,6 @@ do {									\  #define __this_cpu_cmpxchg_double_4	percpu_cmpxchg8b_double  #define this_cpu_cmpxchg_double_4	percpu_cmpxchg8b_double -#define irqsafe_cpu_cmpxchg_double_4	percpu_cmpxchg8b_double  #endif /* CONFIG_X86_CMPXCHG64 */  /* @@ -492,13 +472,6 @@ do {									\  #define this_cpu_xchg_8(pcp, nval)	percpu_xchg_op(pcp, nval)  #define this_cpu_cmpxchg_8(pcp, oval, nval)	percpu_cmpxchg_op(pcp, oval, nval) -#define irqsafe_cpu_add_8(pcp, val)	percpu_add_op((pcp), val) -#define irqsafe_cpu_and_8(pcp, val)	percpu_to_op("and", (pcp), val) -#define irqsafe_cpu_or_8(pcp, val)	percpu_to_op("or", (pcp), val) -#define irqsafe_cpu_xor_8(pcp, val)	percpu_to_op("xor", (pcp), val) -#define irqsafe_cpu_xchg_8(pcp, nval)	percpu_xchg_op(pcp, nval) -#define irqsafe_cpu_cmpxchg_8(pcp, oval, nval)	percpu_cmpxchg_op(pcp, oval, nval) -  /*   * Pretty complex macro to generate cmpxchg16 instruction.  The instruction   * is not supported on early AMD64 processors so we must be able to emulate @@ -521,7 +494,6 @@ do {									\  #define __this_cpu_cmpxchg_double_8	percpu_cmpxchg16b_double  #define this_cpu_cmpxchg_double_8	percpu_cmpxchg16b_double -#define irqsafe_cpu_cmpxchg_double_8	percpu_cmpxchg16b_double  #endif diff --git a/arch/x86/include/asm/serpent.h b/arch/x86/include/asm/serpent.h new file mode 100644 index 00000000000..d3ef63fe0c8 --- /dev/null +++ b/arch/x86/include/asm/serpent.h @@ -0,0 +1,63 @@ +#ifndef ASM_X86_SERPENT_H +#define ASM_X86_SERPENT_H + +#include <linux/crypto.h> +#include <crypto/serpent.h> + +#ifdef CONFIG_X86_32 + +#define SERPENT_PARALLEL_BLOCKS 4 + +asmlinkage void __serpent_enc_blk_4way(struct serpent_ctx *ctx, u8 *dst, +				       const u8 *src, bool xor); +asmlinkage void serpent_dec_blk_4way(struct serpent_ctx *ctx, u8 *dst, +				     const u8 *src); + +static inline void serpent_enc_blk_xway(struct serpent_ctx *ctx, u8 *dst, +					const u8 *src) +{ +	__serpent_enc_blk_4way(ctx, dst, src, false); +} + +static inline void serpent_enc_blk_xway_xor(struct serpent_ctx *ctx, u8 *dst, +					    const u8 *src) +{ +	__serpent_enc_blk_4way(ctx, dst, src, true); +} + +static inline void serpent_dec_blk_xway(struct serpent_ctx *ctx, u8 *dst, +					const u8 *src) +{ +	serpent_dec_blk_4way(ctx, dst, src); +} + +#else + +#define SERPENT_PARALLEL_BLOCKS 8 + +asmlinkage void __serpent_enc_blk_8way(struct serpent_ctx *ctx, u8 *dst, +				       const u8 *src, bool xor); +asmlinkage void serpent_dec_blk_8way(struct serpent_ctx *ctx, u8 *dst, +				     const u8 *src); + +static inline void serpent_enc_blk_xway(struct serpent_ctx *ctx, u8 *dst, +				   const u8 *src) +{ +	__serpent_enc_blk_8way(ctx, dst, src, false); +} + +static inline void serpent_enc_blk_xway_xor(struct serpent_ctx *ctx, u8 *dst, +				       const u8 *src) +{ +	__serpent_enc_blk_8way(ctx, dst, src, true); +} + +static inline void serpent_dec_blk_xway(struct serpent_ctx *ctx, u8 *dst, +				   const u8 *src) +{ +	serpent_dec_blk_8way(ctx, dst, src); +} + +#endif + +#endif diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h index 9756551ec76..d0f19f9fb84 100644 --- a/arch/x86/include/asm/setup.h +++ b/arch/x86/include/asm/setup.h @@ -47,7 +47,7 @@ extern void reserve_standard_io_resources(void);  extern void i386_reserve_resources(void);  extern void setup_default_timer_irq(void); -#ifdef CONFIG_X86_MRST +#ifdef CONFIG_X86_INTEL_MID  extern void x86_mrst_early_setup(void);  #else  static inline void x86_mrst_early_setup(void) { } diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h index 73b11bc0ae6..0434c400287 100644 --- a/arch/x86/include/asm/smp.h +++ b/arch/x86/include/asm/smp.h @@ -225,5 +225,11 @@ extern int hard_smp_processor_id(void);  #endif /* CONFIG_X86_LOCAL_APIC */ +#ifdef CONFIG_DEBUG_NMI_SELFTEST +extern void nmi_selftest(void); +#else +#define nmi_selftest() do { } while (0) +#endif +  #endif /* __ASSEMBLY__ */  #endif /* _ASM_X86_SMP_H */ diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h index 185b719ec61..bc817cd8b44 100644 --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h @@ -40,8 +40,8 @@ struct thread_info {  						*/  	__u8			supervisor_stack[0];  #endif -	int			sig_on_uaccess_error:1; -	int			uaccess_err:1;	/* uaccess failed */ +	unsigned int		sig_on_uaccess_error:1; +	unsigned int		uaccess_err:1;	/* uaccess failed */  };  #define INIT_THREAD_INFO(tsk)			\ @@ -91,7 +91,6 @@ struct thread_info {  #define TIF_MEMDIE		20	/* is terminating due to OOM killer */  #define TIF_DEBUG		21	/* uses debug registers */  #define TIF_IO_BITMAP		22	/* uses I/O bitmap */ -#define TIF_FREEZE		23	/* is freezing for suspend */  #define TIF_FORCED_TF		24	/* true if TF in eflags artificially */  #define TIF_BLOCKSTEP		25	/* set when we want DEBUGCTLMSR_BTF */  #define TIF_LAZY_MMU_UPDATES	27	/* task is updating the mmu lazily */ @@ -113,7 +112,6 @@ struct thread_info {  #define _TIF_FORK		(1 << TIF_FORK)  #define _TIF_DEBUG		(1 << TIF_DEBUG)  #define _TIF_IO_BITMAP		(1 << TIF_IO_BITMAP) -#define _TIF_FREEZE		(1 << TIF_FREEZE)  #define _TIF_FORCED_TF		(1 << TIF_FORCED_TF)  #define _TIF_BLOCKSTEP		(1 << TIF_BLOCKSTEP)  #define _TIF_LAZY_MMU_UPDATES	(1 << TIF_LAZY_MMU_UPDATES) diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h index 800f77c6005..b9676ae37ad 100644 --- a/arch/x86/include/asm/topology.h +++ b/arch/x86/include/asm/topology.h @@ -172,7 +172,7 @@ static inline void arch_fix_phys_package_id(int num, u32 slot)  }  struct pci_bus; -void x86_pci_root_bus_res_quirks(struct pci_bus *b); +void x86_pci_root_bus_resources(int bus, struct list_head *resources);  #ifdef CONFIG_SMP  #define mc_capable()	((boot_cpu_data.x86_max_cores > 1) && \ diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h index 1ac860a0984..517d4767ffd 100644 --- a/arch/x86/include/asm/x86_init.h +++ b/arch/x86/include/asm/x86_init.h @@ -179,6 +179,7 @@ struct x86_msi_ops {  	int (*setup_msi_irqs)(struct pci_dev *dev, int nvec, int type);  	void (*teardown_msi_irq)(unsigned int irq);  	void (*teardown_msi_irqs)(struct pci_dev *dev); +	void (*restore_msi_irqs)(struct pci_dev *dev, int irq);  };  extern struct x86_init_ops x86_init;  |